/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
//@ sourceMappingURL=jquery-1.10.2.min.map
*/
(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t
}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);
u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);

/*! jQuery UI - v1.10.3 - 2013-08-03
* http://jqueryui.com
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js
* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */

(function(e,t){function i(t,i){var a,n,r,o=t.nodeName.toLowerCase();return"area"===o?(a=t.parentNode,n=a.name,t.href&&n&&"map"===a.nodeName.toLowerCase()?(r=e("img[usemap=#"+n+"]")[0],!!r&&s(r)):!1):(/input|select|textarea|button|object/.test(o)?!t.disabled:"a"===o?t.href||i:i)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var a=0,n=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var s,a,n=e(this[0]);n.length&&n[0]!==document;){if(s=n.css("position"),("absolute"===s||"relative"===s||"fixed"===s)&&(a=parseInt(n.css("zIndex"),10),!isNaN(a)&&0!==a))return a;n=n.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})},removeUniqueId:function(){return this.each(function(){n.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var s=e.attr(t,"tabindex"),a=isNaN(s);return(a||s>=0)&&i(t,!a)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,s){function a(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===s?["Left","Right"]:["Top","Bottom"],r=s.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+s]=function(i){return i===t?o["inner"+s].call(this):this.each(function(){e(this).css(r,a(this,i)+"px")})},e.fn["outer"+s]=function(t,i){return"number"!=typeof t?o["outer"+s].call(this,t):this.each(function(){e(this).css(r,a(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,s){var a,n=e.ui[t].prototype;for(a in s)n.plugins[a]=n.plugins[a]||[],n.plugins[a].push([i,s[a]])},call:function(e,t,i){var s,a=e.plugins[t];if(a&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(s=0;a.length>s;s++)e.options[a[s][0]]&&a[s][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",a=!1;return t[s]>0?!0:(t[s]=1,a=t[s]>0,t[s]=0,a)}})})(jQuery);(function(e,t){var i=0,s=Array.prototype.slice,n=e.cleanData;e.cleanData=function(t){for(var i,s=0;null!=(i=t[s]);s++)try{e(i).triggerHandler("remove")}catch(a){}n(t)},e.widget=function(i,s,n){var a,r,o,h,l={},u=i.split(".")[0];i=i.split(".")[1],a=u+"-"+i,n||(n=s,s=e.Widget),e.expr[":"][a.toLowerCase()]=function(t){return!!e.data(t,a)},e[u]=e[u]||{},r=e[u][i],o=e[u][i]=function(e,i){return this._createWidget?(arguments.length&&this._createWidget(e,i),t):new o(e,i)},e.extend(o,r,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),h=new s,h.options=e.widget.extend({},h.options),e.each(n,function(i,n){return e.isFunction(n)?(l[i]=function(){var e=function(){return s.prototype[i].apply(this,arguments)},t=function(e){return s.prototype[i].apply(this,e)};return function(){var i,s=this._super,a=this._superApply;return this._super=e,this._superApply=t,i=n.apply(this,arguments),this._super=s,this._superApply=a,i}}(),t):(l[i]=n,t)}),o.prototype=e.widget.extend(h,{widgetEventPrefix:r?h.widgetEventPrefix:i},l,{constructor:o,namespace:u,widgetName:i,widgetFullName:a}),r?(e.each(r._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete r._childConstructors):s._childConstructors.push(o),e.widget.bridge(i,o)},e.widget.extend=function(i){for(var n,a,r=s.call(arguments,1),o=0,h=r.length;h>o;o++)for(n in r[o])a=r[o][n],r[o].hasOwnProperty(n)&&a!==t&&(i[n]=e.isPlainObject(a)?e.isPlainObject(i[n])?e.widget.extend({},i[n],a):e.widget.extend({},a):a);return i},e.widget.bridge=function(i,n){var a=n.prototype.widgetFullName||i;e.fn[i]=function(r){var o="string"==typeof r,h=s.call(arguments,1),l=this;return r=!o&&h.length?e.widget.extend.apply(null,[r].concat(h)):r,o?this.each(function(){var s,n=e.data(this,a);return n?e.isFunction(n[r])&&"_"!==r.charAt(0)?(s=n[r].apply(n,h),s!==n&&s!==t?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):t):e.error("no such method '"+r+"' for "+i+" widget instance"):e.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+r+"'")}):this.each(function(){var t=e.data(this,a);t?t.option(r||{})._init():e.data(this,a,new n(r,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,s){s=e(s||this.defaultElement||this)[0],this.element=e(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),s!==this&&(e.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===s&&this.destroy()}}),this.document=e(s.style?s.ownerDocument:s.document||s),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(i,s){var n,a,r,o=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(o={},n=i.split("."),i=n.shift(),n.length){for(a=o[i]=e.widget.extend({},this.options[i]),r=0;n.length-1>r;r++)a[n[r]]=a[n[r]]||{},a=a[n[r]];if(i=n.pop(),s===t)return a[i]===t?null:a[i];a[i]=s}else{if(s===t)return this.options[i]===t?null:this.options[i];o[i]=s}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var a,r=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=a=e(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,a=this.widget()),e.each(n,function(n,o){function h(){return i||r.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?r[o]:o).apply(r,arguments):t}"string"!=typeof o&&(h.guid=o.guid=o.guid||h.guid||e.guid++);var l=n.match(/^(\w+)\s*(.*)$/),u=l[1]+r.eventNamespace,c=l[2];c?a.delegate(c,u,h):s.bind(u,h)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,r=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(r)&&r.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var r,o=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),r=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),r&&e.effects&&e.effects.effect[o]?s[t](n):o!==t&&s[o]?s[o](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}})})(jQuery);(function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a="string"==typeof this.options.cancel&&i.target.nodeName?e(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===e.data(i.target,this.widgetName+".preventClickEvent")&&e.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return s._mouseMove(e)},this._mouseUpDelegate=function(e){return s._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var a,o=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(a!==e)return a;var i,s,n=t("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=n.children()[0];return t("body").append(n),i=o.offsetWidth,n.css("overflow","scroll"),s=o.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),a=i-s},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),s=e.isWindow?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,a="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:a?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]);return{element:i,isWindow:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var a,p,m,g,v,b,_=t(e.of),y=t.position.getWithinInfo(e.within),w=t.position.getScrollInfo(y),x=(e.collision||"flip").split(" "),k={};return b=n(_),_[0].preventDefault&&(e.at="left top"),p=b.width,m=b.height,g=b.offset,v=t.extend({},g),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=l.test(s[0])?s.concat(["center"]):c.test(s[0])?["center"].concat(s):["center","center"]),s[0]=l.test(s[0])?s[0]:"center",s[1]=c.test(s[1])?s[1]:"center",t=u.exec(s[0]),i=u.exec(s[1]),k[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=m:"center"===e.at[1]&&(v.top+=m/2),a=i(k.at,p,m),v.left+=a[0],v.top+=a[1],this.each(function(){var n,l,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,"marginLeft"),b=s(this,"marginTop"),D=u+f+s(this,"marginRight")+w.width,T=d+b+s(this,"marginBottom")+w.height,C=t.extend({},v),M=i(k.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?C.left-=u:"center"===e.my[0]&&(C.left-=u/2),"bottom"===e.my[1]?C.top-=d:"center"===e.my[1]&&(C.top-=d/2),C.left+=M[0],C.top+=M[1],t.support.offsetFractions||(C.left=h(C.left),C.top=h(C.top)),n={marginLeft:f,marginTop:b},t.each(["left","top"],function(i,s){t.ui.position[x[i]]&&t.ui.position[x[i]][s](C,{targetWidth:p,targetHeight:m,elemWidth:u,elemHeight:d,collisionPosition:n,collisionWidth:D,collisionHeight:T,offset:[a[0]+M[0],a[1]+M[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(l=function(t){var i=g.left-C.left,s=i+p-u,n=g.top-C.top,a=n+m-d,h={target:{element:_,left:g.left,top:g.top,width:p,height:m},element:{element:c,left:C.left,top:C.top,width:u,height:d},horizontal:0>s?"left":i>0?"right":"center",vertical:0>a?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(h.horizontal="center"),d>m&&m>r(n+a)&&(h.vertical="middle"),h.important=o(r(i),r(s))>o(r(n),r(a))?"horizontal":"vertical",e.using.call(this,t,h)}),c.offset(t.extend(C,{using:l}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,a=n.offset.left+n.scrollLeft,o=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-o-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-o-a,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,a=n.offset.top+n.scrollTop,o=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-o-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionHeight-o-a,t.top+p+f+m>c&&(0>s||r(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-h,t.top+p+f+m>u&&(i>0||u>r(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,a,o=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(o?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(a in s)e.style[a]=s[a];e.appendChild(r),i=o||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()})(jQuery);(function(e){e.widget("ui.draggable",e.ui.mouse,{version:"1.10.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(t){var i=this.options;return this.helper||i.disabled||e(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(e(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){e("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",t,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=this,s=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(s=e.ui.ddmanager.drop(this,t)),this.dropped&&(s=this.dropped,this.dropped=!1),"original"!==this.options.helper||e.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",t)!==!1&&i._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1):!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options;return n.containment?"window"===n.containment?(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):"document"===n.containment?(this.containment=[0,0,e(document).width()-this.helperProportions.width-this.margins.left,(e(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):n.containment.constructor===Array?(this.containment=n.containment,undefined):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=e(n.containment),s=i[0],s&&(t="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i),undefined):(this.containment=null,undefined)},_convertPositionTo:function(t,i){i||(i=this.position);var s="absolute"===t?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:n.scrollTop(),left:n.scrollLeft()}),{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*s}},_generatePosition:function(t){var i,s,n,a,o=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=t.pageX,l=t.pageY;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,h=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(t,i,s){return s=s||this._uiHash(),e.ui.plugin.call(this,t,[i,s]),"drag"===t&&(this.positionAbs=this._convertPositionTo("absolute")),e.Widget.prototype._trigger.call(this,t,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i){var s=e(this).data("ui-draggable"),n=s.options,a=e.extend({},i,{item:s.element});s.sortables=[],e(n.connectToSortable).each(function(){var i=e.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",t,a))})},stop:function(t,i){var s=e(this).data("ui-draggable"),n=e.extend({},i,{item:s.element});e.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,n))})},drag:function(t,i){var s=e(this).data("ui-draggable"),n=this;e.each(s.sortables,function(){var a=!1,o=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(a=!0,e.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==o&&this.instance._intersectsWith(this.instance.containerCache)&&e.contains(o.instance.element[0],this.instance.element[0])&&(a=!1),a})),a?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=e(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",t),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",t),s.dropped=!1)})}}),e.ui.plugin.add("draggable","cursor",{start:function(){var t=e("body"),i=e(this).data("ui-draggable").options;t.css("cursor")&&(i._cursor=t.css("cursor")),t.css("cursor",i.cursor)},stop:function(){var t=e(this).data("ui-draggable").options;t._cursor&&e("body").css("cursor",t._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i){var s=e(i.helper),n=e(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(t,i){var s=e(this).data("ui-draggable").options;s._opacity&&e(i.helper).css("opacity",s._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(){var t=e(this).data("ui-draggable");t.scrollParent[0]!==document&&"HTML"!==t.scrollParent[0].tagName&&(t.overflowOffset=t.scrollParent.offset())},drag:function(t){var i=e(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-t.pageY<s.scrollSensitivity?i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+s.scrollSpeed:t.pageY-i.overflowOffset.top<s.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-t.pageX<s.scrollSensitivity?i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+s.scrollSpeed:t.pageX-i.overflowOffset.left<s.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(t.pageY-e(document).scrollTop()<s.scrollSensitivity?n=e(document).scrollTop(e(document).scrollTop()-s.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<s.scrollSensitivity&&(n=e(document).scrollTop(e(document).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(t.pageX-e(document).scrollLeft()<s.scrollSensitivity?n=e(document).scrollLeft(e(document).scrollLeft()-s.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<s.scrollSensitivity&&(n=e(document).scrollLeft(e(document).scrollLeft()+s.scrollSpeed)))),n!==!1&&e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(i,t)}}),e.ui.plugin.add("draggable","snap",{start:function(){var t=e(this).data("ui-draggable"),i=t.options;t.snapElements=[],e(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=e(this),s=i.offset();this!==t.element[0]&&t.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:s.top,left:s.left})})},drag:function(t,i){var s,n,a,o,r,h,l,u,c,d,p=e(this).data("ui-draggable"),f=p.options,m=f.snapTolerance,g=i.offset.left,v=g+p.helperProportions.width,b=i.offset.top,y=b+p.helperProportions.height;for(c=p.snapElements.length-1;c>=0;c--)r=p.snapElements[c].left,h=r+p.snapElements[c].width,l=p.snapElements[c].top,u=l+p.snapElements[c].height,r-m>v||g>h+m||l-m>y||b>u+m||!e.contains(p.snapElements[c].item.ownerDocument,p.snapElements[c].item)?(p.snapElements[c].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[c].item})),p.snapElements[c].snapping=!1):("inner"!==f.snapMode&&(s=m>=Math.abs(l-y),n=m>=Math.abs(u-b),a=m>=Math.abs(r-v),o=m>=Math.abs(h-g),s&&(i.position.top=p._convertPositionTo("relative",{top:l-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:u,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h}).left-p.margins.left)),d=s||n||a||o,"outer"!==f.snapMode&&(s=m>=Math.abs(l-b),n=m>=Math.abs(u-y),a=m>=Math.abs(r-g),o=m>=Math.abs(h-v),s&&(i.position.top=p._convertPositionTo("relative",{top:l,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:u-p.helperProportions.height,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[c].snapping&&(s||n||a||o||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[c].item})),p.snapElements[c].snapping=s||n||a||o||d)}}),e.ui.plugin.add("draggable","stack",{start:function(){var t,i=this.data("ui-draggable").options,s=e.makeArray(e(i.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});s.length&&(t=parseInt(e(s[0]).css("zIndex"),10)||0,e(s).each(function(i){e(this).css("zIndex",t+i)}),this.css("zIndex",t+s.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i){var s=e(i.helper),n=e(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(t,i){var s=e(this).data("ui-draggable").options;s._zIndex&&e(i.helper).css("zIndex",s._zIndex)}})})(jQuery);(function(e){function t(e,t,i){return e>t&&t+i>e}e.widget("ui.droppable",{version:"1.10.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t=this.options,i=t.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(i)?i:function(e){return e.is(i)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},e.ui.ddmanager.droppables[t.scope]=e.ui.ddmanager.droppables[t.scope]||[],e.ui.ddmanager.droppables[t.scope].push(this),t.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var t=0,i=e.ui.ddmanager.droppables[this.options.scope];i.length>t;t++)i[t]===this&&i.splice(t,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){"accept"===t&&(this.accept=e.isFunction(i)?i:function(e){return e.is(i)}),e.Widget.prototype._setOption.apply(this,arguments)},_activate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var s=i||e.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=e.data(this,"ui-droppable");return t.options.greedy&&!t.options.disabled&&t.options.scope===s.options.scope&&t.accept.call(t.element[0],s.currentItem||s.element)&&e.ui.intersect(s,e.extend(t,{offset:t.element.offset()}),t.options.tolerance)?(n=!0,!1):undefined}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(s)),this.element):!1):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(e,i,s){if(!i.offset)return!1;var n,a,o=(e.positionAbs||e.position.absolute).left,r=o+e.helperProportions.width,h=(e.positionAbs||e.position.absolute).top,l=h+e.helperProportions.height,u=i.offset.left,c=u+i.proportions.width,d=i.offset.top,p=d+i.proportions.height;switch(s){case"fit":return o>=u&&c>=r&&h>=d&&p>=l;case"intersect":return o+e.helperProportions.width/2>u&&c>r-e.helperProportions.width/2&&h+e.helperProportions.height/2>d&&p>l-e.helperProportions.height/2;case"pointer":return n=(e.positionAbs||e.position.absolute).left+(e.clickOffset||e.offset.click).left,a=(e.positionAbs||e.position.absolute).top+(e.clickOffset||e.offset.click).top,t(a,d,i.proportions.height)&&t(n,u,i.proportions.width);case"touch":return(h>=d&&p>=h||l>=d&&p>=l||d>h&&l>p)&&(o>=u&&c>=o||r>=u&&c>=r||u>o&&r>c);default:return!1}},e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var s,n,a=e.ui.ddmanager.droppables[t.options.scope]||[],o=i?i.type:null,r=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(s=0;a.length>s;s++)if(!(a[s].options.disabled||t&&!a[s].accept.call(a[s].element[0],t.currentItem||t.element))){for(n=0;r.length>n;n++)if(r[n]===a[s].element[0]){a[s].proportions.height=0;continue e}a[s].visible="none"!==a[s].element.css("display"),a[s].visible&&("mousedown"===o&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions={width:a[s].element[0].offsetWidth,height:a[s].element[0].offsetHeight})}},drop:function(t,i){var s=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(t,i){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,a,o=e.ui.intersect(t,this,this.options.tolerance),r=!o&&this.isover?"isout":o&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,a=this.element.parents(":data(ui-droppable)").filter(function(){return e.data(this,"ui-droppable").options.scope===n}),a.length&&(s=e.data(a[0],"ui-droppable"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}}})(jQuery);(function(e){function t(e){return parseInt(e,10)||0}function i(e){return!isNaN(parseInt(e,10))}e.widget("ui.resizable",e.ui.mouse,{version:"1.10.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var t,i,s,n,a,o=this,r=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(e("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),t=this.handles.split(","),this.handles={},i=0;t.length>i;i++)s=e.trim(t[i]),a="ui-resizable-"+s,n=e("<div class='ui-resizable-handle "+a+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(t){var i,s,n,a;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=e(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=e(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(n,a),this._proportionallyResize()),e(this.handles[i]).length},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(e(this).removeClass("ui-resizable-autohide"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(e(this).addClass("ui-resizable-autohide"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var i,s,n=!1;for(i in this.handles)s=e(this.handles[i])[0],(s===t.target||e.contains(s,t.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(i){var s,n,a,o=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),s=t(this.helper.css("left")),n=t(this.helper.css("top")),o.containment&&(s+=e(o.containment).scrollLeft()||0,n+=e(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,a=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===a?this.axis+"-resize":a),h.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(t){var i,s=this.helper,n={},a=this.originalMousePosition,o=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,u=this.size.height,c=t.pageX-a.left||0,d=t.pageY-a.top||0,p=this._change[o];return p?(i=p.apply(this,[t,c,d]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==u&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(n)||this._trigger("resize",t,this.ui()),!1):!1},_mouseStop:function(t){this.resizing=!1;var i,s,n,a,o,r,h,l=this.options,u=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&e.ui.hasScroll(i[0],"left")?0:u.sizeDiff.height,a=s?0:u.sizeDiff.width,o={width:u.helper.width()-a,height:u.helper.height()-n},r=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null,h=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null,l.animate||this.element.css(e.extend(o,{top:h,left:r})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!l.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(e){var t,s,n,a,o,r=this.options;o={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||e)&&(t=o.minHeight*this.aspectRatio,n=o.minWidth/this.aspectRatio,s=o.maxHeight*this.aspectRatio,a=o.maxWidth/this.aspectRatio,t>o.minWidth&&(o.minWidth=t),n>o.minHeight&&(o.minHeight=n),o.maxWidth>s&&(o.maxWidth=s),o.maxHeight>a&&(o.maxHeight=a)),this._vBoundaries=o},_updateCache:function(e){this.offset=this.helper.offset(),i(e.left)&&(this.position.left=e.left),i(e.top)&&(this.position.top=e.top),i(e.height)&&(this.size.height=e.height),i(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,s=this.size,n=this.axis;return i(e.height)?e.width=e.height*this.aspectRatio:i(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===n&&(e.left=t.left+(s.width-e.width),e.top=null),"nw"===n&&(e.top=t.top+(s.height-e.height),e.left=t.left+(s.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,s=this.axis,n=i(e.width)&&t.maxWidth&&t.maxWidth<e.width,a=i(e.height)&&t.maxHeight&&t.maxHeight<e.height,o=i(e.width)&&t.minWidth&&t.minWidth>e.width,r=i(e.height)&&t.minHeight&&t.minHeight>e.height,h=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,u=/sw|nw|w/.test(s),c=/nw|ne|n/.test(s);return o&&(e.width=t.minWidth),r&&(e.height=t.minHeight),n&&(e.width=t.maxWidth),a&&(e.height=t.maxHeight),o&&u&&(e.left=h-t.minWidth),n&&u&&(e.left=h-t.maxWidth),r&&c&&(e.top=l-t.minHeight),a&&c&&(e.top=l-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var e,t,i,s,n,a=this.helper||this.element;for(e=0;this._proportionallyResizeElements.length>e;e++){if(n=this._proportionallyResizeElements[e],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],t=0;i.length>t;t++)this.borderDif[t]=(parseInt(i[t],10)||0)+(parseInt(s[t],10)||0);n.css({height:a.height()-this.borderDif[0]-this.borderDif[2]||0,width:a.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize,s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},sw:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,s]))},ne:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},nw:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,s]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var i=e(this).data("ui-resizable"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&e.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(h,u&&l?{top:u,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&e(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var i,s,n,a,o,r,h,l=e(this).data("ui-resizable"),u=l.options,c=l.element,d=u.containment,p=d instanceof e?d.get(0):/parent/.test(d)?c.parent().get(0):d;p&&(l.containerElement=e(p),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(i=e(p),s=[],e(["Top","Right","Left","Bottom"]).each(function(e,n){s[e]=t(i.css("padding"+n))}),l.containerOffset=i.offset(),l.containerPosition=i.position(),l.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},n=l.containerOffset,a=l.containerSize.height,o=l.containerSize.width,r=e.ui.hasScroll(p,"left")?p.scrollWidth:o,h=e.ui.hasScroll(p)?p.scrollHeight:a,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(t){var i,s,n,a,o=e(this).data("ui-resizable"),r=o.options,h=o.containerOffset,l=o.position,u=o._aspectRatio||t.shiftKey,c={top:0,left:0},d=o.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(c=h),l.left<(o._helper?h.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-h.left:o.position.left-c.left),u&&(o.size.height=o.size.width/o.aspectRatio),o.position.left=r.helper?h.left:0),l.top<(o._helper?h.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-h.top:o.position.top),u&&(o.size.width=o.size.height*o.aspectRatio),o.position.top=o._helper?h.top:0),o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top,i=Math.abs((o._helper?o.offset.left-c.left:o.offset.left-c.left)+o.sizeDiff.width),s=Math.abs((o._helper?o.offset.top-c.top:o.offset.top-h.top)+o.sizeDiff.height),n=o.containerElement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerElement.css("position")),n&&a&&(i-=o.parentData.left),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,u&&(o.size.height=o.size.width/o.aspectRatio)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,u&&(o.size.width=o.size.height*o.aspectRatio))},stop:function(){var t=e(this).data("ui-resizable"),i=t.options,s=t.containerOffset,n=t.containerPosition,a=t.containerElement,o=e(t.helper),r=o.offset(),h=o.outerWidth()-t.sizeDiff.width,l=o.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l}),t._helper&&!i.animate&&/static/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).data("ui-resizable"),i=t.options,s=function(t){e(t).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):e.each(i.alsoResize,function(e){s(e)})},resize:function(t,i){var s=e(this).data("ui-resizable"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0},h=function(t,s){e(t).each(function(){var t=e(this),n=e(this).data("ui-resizable-alsoresize"),a={},o=s&&s.length?s:t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(o,function(e,t){var i=(n[t]||0)+(r[t]||0);i&&i>=0&&(a[t]=i||null)}),t.css(a)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):e.each(n.alsoResize,function(e,t){h(e,t)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).data("ui-resizable"),i=t.options,s=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).data("ui-resizable");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).data("ui-resizable");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t=e(this).data("ui-resizable"),i=t.options,s=t.size,n=t.originalSize,a=t.originalPosition,o=t.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,u=Math.round((s.width-n.width)/h)*h,c=Math.round((s.height-n.height)/l)*l,d=n.width+u,p=n.height+c,f=i.maxWidth&&d>i.maxWidth,m=i.maxHeight&&p>i.maxHeight,g=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,g&&(d+=h),v&&(p+=l),f&&(d-=h),m&&(p-=l),/^(se|s|e)$/.test(o)?(t.size.width=d,t.size.height=p):/^(ne)$/.test(o)?(t.size.width=d,t.size.height=p,t.position.top=a.top-c):/^(sw)$/.test(o)?(t.size.width=d,t.size.height=p,t.position.left=a.left-u):(t.size.width=d,t.size.height=p,t.position.top=a.top-c,t.position.left=a.left-u)}})})(jQuery);(function(e){e.widget("ui.selectable",e.ui.mouse,{version:"1.10.3",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t=e(i.options.filter,i.element[0]),t.addClass("ui-selectee"),t.each(function(){var t=e(this),i=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=t.addClass("ui-selectee"),this._mouseInit(),this.helper=e("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var i=this,s=this.options;this.opos=[t.pageX,t.pageY],this.options.disabled||(this.selectees=e(s.filter,this.element[0]),this._trigger("start",t),e(s.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=e.data(this,"selectable-item");s.startselected=!0,t.metaKey||t.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",t,{unselecting:s.element}))}),e(t.target).parents().addBack().each(function(){var s,n=e.data(this,"selectable-item");return n?(s=!t.metaKey&&!t.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",t,{selecting:n.element}):i._trigger("unselecting",t,{unselecting:n.element}),!1):undefined}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,a=this.opos[0],o=this.opos[1],r=t.pageX,h=t.pageY;return a>r&&(i=r,r=a,a=i),o>h&&(i=h,h=o,o=i),this.helper.css({left:a,top:o,width:r-a,height:h-o}),this.selectees.each(function(){var i=e.data(this,"selectable-item"),l=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||a>i.right||i.top>h||o>i.bottom):"fit"===n.tolerance&&(l=i.left>a&&r>i.right&&i.top>o&&h>i.bottom),l?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",t,{selecting:i.element}))):(i.selecting&&((t.metaKey||t.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",t,{unselecting:i.element}))),i.selected&&(t.metaKey||t.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",t,{unselecting:i.element})))))}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,e(".ui-unselecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",t,{unselected:s.element})}),e(".ui-selecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",t,{selected:s.element})}),this._trigger("stop",t),this.helper.remove(),!1}})})(jQuery);(function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=null,n=!1,a=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,a.widgetName+"-item")===a?(s=t(this),!1):undefined}),t.data(e.target,a.widgetName+"-item")===a&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,a,o=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(a=this.document.find("body"),this.storedCursor=a.css("cursor"),a.css("cursor",o.cursor),this.storedStylesheet=t("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(a)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,a,o=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+o.scrollSpeed:e.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<o.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+o.scrollSpeed:e.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(e.pageY-t(document).scrollTop()<o.scrollSensitivity?r=t(document).scrollTop(t(document).scrollTop()-o.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<o.scrollSensitivity&&(r=t(document).scrollTop(t(document).scrollTop()+o.scrollSpeed)),e.pageX-t(document).scrollLeft()<o.scrollSensitivity?r=t(document).scrollLeft(t(document).scrollLeft()-o.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<o.scrollSensitivity&&(r=t(document).scrollLeft(t(document).scrollLeft()+o.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],a=this._intersectsWithPointer(s),a&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===a?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===a?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),a=this.options.axis,o={};a&&"x"!==a||(o.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),a&&"y"!==a||(o.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,a=t.left,o=a+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>a&&o>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>a&&o>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var i="x"===this.options.axis||e(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||e(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=i&&s,a=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return n?this.floating?o&&"right"===o||"down"===a?2:1:a&&("down"===a?2:1):!1},_intersectsWithSides:function(t){var i=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return this.floating&&a?"right"===a&&s||"left"===a&&!s:n&&("down"===n&&i||"up"===n&&!i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i,s,n,a,o=[],r=[],h=this._connectWith();if(h&&e)for(i=h.length-1;i>=0;i--)for(n=t(h[i]),s=n.length-1;s>=0;s--)a=t.data(n[s],this.widgetFullName),a&&a!==this&&!a.options.disabled&&r.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(r.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=r.length-1;i>=0;i--)r[i][0].each(function(){o.push(this)});return t(o)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,a,o,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i]),s=n.length-1;s>=0;s--)a=t.data(n[s],this.widgetFullName),a&&a!==this&&!a.options.disabled&&(u.push([t.isFunction(a.options.items)?a.options.items.call(a.element[0],e,{item:this.currentItem}):t(a.options.items,a.element),a]),this.containers.push(a));for(i=u.length-1;i>=0;i--)for(o=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",o),c.push({item:h,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,a;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),a=n.offset(),s.left=a.left,s.top=a.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)a=this.containers[i].element.offset(),this.containers[i].containerCache.left=a.left,this.containers[i].containerCache.top=a.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?e.currentItem.children().each(function(){t("<td>&#160;</td>",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)}):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactContainers:function(s){var n,a,o,r,h,l,c,u,d,p,f=null,m=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],m=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",s,this._uiHash(this)),this.containers[n].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[m].containerCache.over||(this.containers[m]._trigger("over",s,this._uiHash(this)),this.containers[m].containerCache.over=1);else{for(o=1e4,r=null,p=f.floating||i(this.currentItem),h=p?"left":"top",l=p?"width":"height",c=this.positionAbs[h]+this.offset.click[h],a=this.items.length-1;a>=0;a--)t.contains(this.containers[m].element[0],this.items[a].item[0])&&this.items[a].item[0]!==this.currentItem[0]&&(!p||e(this.positionAbs.top+this.offset.click.top,this.items[a].top,this.items[a].height))&&(u=this.items[a].item.offset()[h],d=!1,Math.abs(u-c)>Math.abs(u+this.items[a][l]-c)&&(d=!0,u+=this.items[a][l]),o>Math.abs(u-c)&&(o=Math.abs(u-c),r=this.items[a],this.direction=d?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[m])return;r?this._rearrange(s,r,null,!0):this._rearrange(s,null,this.containers[m].element,!0),this._trigger("change",s,this._uiHash()),this.containers[m]._trigger("change",s,this._uiHash(this)),this.currentContainer=this.containers[m],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[m]._trigger("over",s,this._uiHash(this)),this.containers[m].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,a=e.pageX,o=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(a=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(a=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1],o=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((a-this.originalPageX)/n.grid[0])*n.grid[0],a=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)e||s.push(function(t){return function(e){t._trigger("deactivate",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(function(t){return function(e){t._trigger("out",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})})(jQuery);(function(t){var e=0,i={},s={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="hide",s.height=s.paddingTop=s.paddingBottom=s.borderTopWidth=s.borderBottomWidth="show",t.widget("ui.accordion",{version:"1.10.3",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t(),content:this.active.length?this.active.next():t()}},_createIcons:function(){var e=this.options.icons;e&&(t("<span>").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?(this._activate(e),undefined):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),"disabled"===t&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!e),undefined)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),a=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:a=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:a=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:a=this.headers[0];break;case i.END:a=this.headers[s-1]}a&&(t(e.target).attr("tabIndex",-1),t(a).attr("tabIndex",0),a.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,s=this.options,n=s.heightStyle,a=this.element.parent(),o=this.accordionId="ui-accordion-"+(this.element.attr("id")||++e);this.active=this._findActive(s.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(e){var i=t(this),s=i.attr("id"),n=i.next(),a=n.attr("id");s||(s=o+"-header-"+e,i.attr("id",s)),a||(a=o+"-panel-"+e,n.attr("id",a)),i.attr("aria-controls",a),n.attr("aria-labelledby",s)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(s.event),"fill"===n?(i=a.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.headers.each(function(){i-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===n&&(i=0,this.headers.next().each(function(){i=Math.max(i,t(this).css("height","").height())}).height(i))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),a=n[0]===s[0],o=a&&i.collapsible,r=o?t():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:o?t():n,newPanel:r};e.preventDefault(),a&&!i.collapsible||this._trigger("beforeActivate",e,l)===!1||(i.active=o?!1:this.headers.index(n),this.active=a?t():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),a||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-expanded":"false","aria-hidden":"true"}),s.prev().attr("aria-selected","false"),i.length&&s.length?s.prev().attr("tabIndex",-1):i.length&&this.headers.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(t,e,n){var a,o,r,h=this,l=0,c=t.length&&(!e.length||t.index()<e.index()),u=this.options.animate||{},d=c&&u.down||u,p=function(){h._toggleComplete(n)};return"number"==typeof d&&(r=d),"string"==typeof d&&(o=d),o=o||d.easing||u.easing,r=r||d.duration||u.duration,e.length?t.length?(a=t.show().outerHeight(),e.animate(i,{duration:r,easing:o,step:function(t,e){e.now=Math.round(t)}}),t.hide().animate(s,{duration:r,easing:o,complete:p,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?l+=i.now:"content"!==h.options.heightStyle&&(i.now=Math.round(a-e.outerHeight()-l),l=0)}}),undefined):e.animate(i,r,o,p):t.animate(s,r,o,p)},_toggleComplete:function(t){var e=t.oldPanel;e.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}})})(jQuery);(function(t){var e=0;t.widget("ui.autocomplete",{version:"1.10.3",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,undefined;e=!1,s=!1,i=!1;var a=t.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:e=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case a.UP:e=!0,this._keyEvent("previous",n);break;case a.DOWN:e=!0,this._keyEvent("next",n);break;case a.ENTER:case a.NUMPAD_ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),undefined;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),undefined):(this._searchTimeout(t),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(t),this._change(t),undefined)}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(s){s.target===e.element[0]||s.target===i||t.contains(i,s.target)||e.close()})})},menufocus:function(e,i){if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),undefined;var s=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",e,{item:s})?e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(s.value):this.liveRegion.text(s.value)},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=t("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):undefined},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var t=this,i=++e;return function(s){i===e&&t.__response(s),t.pending--,t.pending||t.element.removeClass("ui-autocomplete-loading")}},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({label:e.label||e.value,value:e.value||e.label},e)})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<a>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[t](e),undefined):(this.search(null,e),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.text(e))}})})(jQuery);(function(t){var e,i,s,n,a="ui-button ui-widget ui-state-default ui-corner-all",o="ui-state-hover ui-state-active ",r="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",h=function(){var e=t(this);setTimeout(function(){e.find(":ui-button").button("refresh")},1)},l=function(e){var i=e.name,s=e.form,n=t([]);return i&&(i=i.replace(/'/g,"\\'"),n=s?t(s).find("[name='"+i+"']"):t("[name='"+i+"']",e.ownerDocument).filter(function(){return!this.form})),n};t.widget("ui.button",{version:"1.10.3",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,h),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var o=this,r=this.options,c="checkbox"===this.type||"radio"===this.type,u=c?"":"ui-state-active",d="ui-state-focus";null===r.label&&(r.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(a).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){r.disabled||this===e&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){r.disabled||t(this).removeClass(u)}).bind("click"+this.eventNamespace,function(t){r.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){o.buttonElement.addClass(d)}).bind("blur"+this.eventNamespace,function(){o.buttonElement.removeClass(d)}),c&&(this.element.bind("change"+this.eventNamespace,function(){n||o.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(t){r.disabled||(n=!1,i=t.pageX,s=t.pageY)}).bind("mouseup"+this.eventNamespace,function(t){r.disabled||(i!==t.pageX||s!==t.pageY)&&(n=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return r.disabled||n?!1:undefined}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled||n)return!1;t(this).addClass("ui-state-active"),o.buttonElement.attr("aria-pressed","true");var e=o.element[0];l(e).not(e).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return r.disabled?!1:(t(this).addClass("ui-state-active"),e=this,o.document.one("mouseup",function(){e=null}),undefined)}).bind("mouseup"+this.eventNamespace,function(){return r.disabled?!1:(t(this).removeClass("ui-state-active"),undefined)}).bind("keydown"+this.eventNamespace,function(e){return r.disabled?!1:((e.keyCode===t.ui.keyCode.SPACE||e.keyCode===t.ui.keyCode.ENTER)&&t(this).addClass("ui-state-active"),undefined)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",r.disabled),this._resetButton()},_determineButtonType:function(){var t,e,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(a+" "+o+" "+r).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){return this._super(t,e),"disabled"===t?(e?this.element.prop("disabled",!0):this.element.prop("disabled",!1),undefined):(this._resetButton(),undefined)},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?l(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),undefined;var e=this.buttonElement.removeClass(r),i=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),s=this.options.icons,n=s.primary&&s.secondary,a=[];s.primary||s.secondary?(this.options.text&&a.push("ui-button-text-icon"+(n?"s":s.primary?"-primary":"-secondary")),s.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(a.push(n?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):a.push("ui-button-text-only"),e.addClass(a.join(" "))}}),t.widget("ui.buttonset",{version:"1.10.3",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var e="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})})(jQuery);(function(t,e){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.dpDiv=s(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function s(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(i,"mouseout",function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){t.datepicker._isDisabledDatepicker(a.inline?e.parent()[0]:a.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))})}function n(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}t.extend(t.ui,{datepicker:{version:"1.10.3"}});var a,r="datepicker";t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return n(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,a;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),a=this._newInst(t(e),n),a.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,a):n&&this._inlineDatepicker(e,a)},_newInst:function(e,i){var n=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?s(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,r,i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,a,r=this._get(i,"appendText"),o=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=t("<span class='"+this._appendClass+"'>"+r+"</span>"),e[o?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.focus(this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),a=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:a,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(a?t("<img/>").attr({src:a,alt:n,title:n}):n)),e[o?"before":"after"](i.trigger),i.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,a=new Date(2009,11,20),r=this._get(t,"dateFormat");r.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},a.setMonth(e(this._get(t,r.match(/MM/)?"monthNames":"monthNamesShort"))),a.setDate(e(this._get(t,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-a.getDay())),t.input.attr("size",this._formatDate(t,a).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,r,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,a,o){var h,l,c,u,d,p=this._dialogInst;return p||(this.uuid+=1,h="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+h+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},t.data(this._dialogInput[0],r,p)),n(p.settings,a||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(l=document.documentElement.clientWidth,c=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+u,c/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],r,p),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,r);s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,r),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty())},_enableDatepicker:function(e){var i,s,n=t(e),a=t.data(e,r);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,a.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),a=t.data(e,r);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,a.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,r)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,s,a){var r,o,h,l,c=this._getInst(i);return 2===arguments.length&&"string"==typeof s?"defaults"===s?t.extend({},t.datepicker._defaults):c?"all"===s?t.extend({},c.settings):this._get(c,s):null:(r=s||{},"string"==typeof s&&(r={},r[s]=a),c&&(this._curInst===c&&this._hideDatepicker(),o=this._getDateDatepicker(i,!0),h=this._getMinMaxDate(c,"min"),l=this._getMinMaxDate(c,"max"),n(c.settings,r),null!==h&&r.dateFormat!==e&&r.minDate===e&&(c.settings.minDate=this._formatDate(c,h)),null!==l&&r.dateFormat!==e&&r.maxDate===e&&(c.settings.maxDate=this._formatDate(c,l)),"disabled"in r&&(r.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(t(i),c),this._autoSize(c),this._setDate(c,o),this._updateAlternate(c),this._updateDatepicker(c)),e)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,a=t.datepicker._getInst(e.target),r=!0,o=a.dpDiv.is(".ui-datepicker-rtl");if(a._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),r=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",a.dpDiv),n[0]&&t.datepicker._selectDay(e.target,a.selectedMonth,a.selectedYear,n[0]),i=t.datepicker._get(a,"onSelect"),i?(s=t.datepicker._formatDate(a),i.apply(a.input?a.input[0]:null,[s,a])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(a,"stepBigMonths"):-t.datepicker._get(a,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(a,"stepBigMonths"):+t.datepicker._get(a,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),r=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),r=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,o?1:-1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(a,"stepBigMonths"):-t.datepicker._get(a,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),r=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,o?-1:1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(a,"stepBigMonths"):+t.datepicker._get(a,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),r=e.ctrlKey||e.metaKey;break;default:r=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):r=!1;r&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(i){var s,n,a=t.datepicker._getInst(i.target);return t.datepicker._get(a,"constrainInput")?(s=t.datepicker._possibleChars(t.datepicker._get(a,"dateFormat")),n=String.fromCharCode(null==i.charCode?i.keyCode:i.charCode),i.ctrlKey||i.metaKey||" ">n||!s||s.indexOf(n)>-1):e},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var i,s,a,r,o,h,l;i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),s=t.datepicker._get(i,"beforeShow"),a=s?s.apply(e,[e,i]):{},a!==!1&&(n(i.settings,a),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),o={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),o=t.datepicker._checkOffset(i,o,r),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:o.left+"px",top:o.top+"px"}),i.inline||(h=t.datepicker._get(i,"showAnim"),l=t.datepicker._get(i,"duration"),i.dpDiv.zIndex(t(e).zIndex()+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?i.dpDiv.show(h,t.datepicker._get(i,"showOptions"),l):i.dpDiv[h||"show"](h?l:null),t.datepicker._shouldFocusInput(i)&&i.input.focus(),t.datepicker._curInst=i))}},_updateDatepicker:function(e){this.maxRows=4,a=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,s=this._getNumberOfMonths(e),n=s[1],r=17;e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",r*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),a=e.dpDiv.outerHeight(),r=e.input?e.input.outerWidth():0,o=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-r:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+o?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+a>l&&l>a?Math.abs(a+o):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,a,o=this._curInst;!o||e&&o!==t.data(e,r)||this._datepickerShowing&&(i=this._get(o,"showAnim"),s=this._get(o,"duration"),n=function(){t.datepicker._tidyDialog(o)},t.effects&&(t.effects.effect[i]||t.effects[i])?o.dpDiv.hide(i,t.datepicker._get(o,"showOptions"),s,n):o.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,a=this._get(o,"onClose"),a&&a.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),a=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(a,i+("M"===s?this._get(a,"showCurrentAtPos"):0),s),this._updateDatepicker(a))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),a=this._getInst(n[0]);a["selected"+("M"===s?"Month":"Year")]=a["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(a),this._adjustDate(n)},_selectDay:function(e,i,s,n){var a,r=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(a=this._getInst(r[0]),a.selectedDay=a.currentDay=t("a",n).html(),a.selectedMonth=a.currentMonth=i,a.selectedYear=a.currentYear=s,this._selectDate(e,this._formatDate(a,a.currentDay,a.currentMonth,a.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),a=this._getInst(n[0]);i=null!=i?i:this._formatDate(a),a.input&&a.input.val(i),this._updateAlternate(a),s=this._get(a,"onSelect"),s?s.apply(a.input?a.input[0]:null,[i,a]):a.input&&a.input.trigger("change"),a.inline?this._updateDatepicker(a):(this._hideDatepicker(),this._lastInput=a.input[0],"object"!=typeof a.input[0]&&a.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,a=this._get(e,"altField");a&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(a).each(function(){t(this).val(n)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(i,s,n){if(null==i||null==s)throw"Invalid arguments";if(s="object"==typeof s?""+s:s+"",""===s)return null;var a,r,o,h,l=0,c=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),d=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,p=(n?n.dayNames:null)||this._defaults.dayNames,f=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,m=(n?n.monthNames:null)||this._defaults.monthNames,g=-1,v=-1,_=-1,b=-1,y=!1,x=function(t){var e=i.length>a+1&&i.charAt(a+1)===t;return e&&a++,e},k=function(t){var e=x(t),i="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n=RegExp("^\\d{1,"+i+"}"),a=s.substring(l).match(n);if(!a)throw"Missing number at position "+l;return l+=a[0].length,parseInt(a[0],10)},w=function(i,n,a){var r=-1,o=t.map(x(i)?a:n,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(o,function(t,i){var n=i[1];return s.substr(l,n.length).toLowerCase()===n.toLowerCase()?(r=i[0],l+=n.length,!1):e}),-1!==r)return r+1;throw"Unknown name at position "+l},D=function(){if(s.charAt(l)!==i.charAt(a))throw"Unexpected literal at position "+l;l++};for(a=0;i.length>a;a++)if(y)"'"!==i.charAt(a)||x("'")?D():y=!1;else switch(i.charAt(a)){case"d":_=k("d");break;case"D":w("D",d,p);break;case"o":b=k("o");break;case"m":v=k("m");break;case"M":v=w("M",f,m);break;case"y":g=k("y");break;case"@":h=new Date(k("@")),g=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"!":h=new Date((k("!")-this._ticksTo1970)/1e4),g=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"'":x("'")?D():y=!0;break;default:D()}if(s.length>l&&(o=s.substr(l),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=g?0:-100)),b>-1)for(v=1,_=b;;){if(r=this._getDaysInMonth(g,v-1),r>=_)break;v++,_-=r}if(h=this._daylightSavingAdjust(new Date(g,v-1,_)),h.getFullYear()!==g||h.getMonth()+1!==v||h.getDate()!==_)throw"Invalid date";return h},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,a=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,o=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,a);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),r,o);break;case"y":u+=h("y")?e.getFullYear():(10>e.getYear()%100?"0":"")+e.getYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,i){return t.settings[i]!==e?t.settings[i]:this._defaults[i]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),a=n,r=this._getFormatConfig(t);try{a=this.parseDate(i,s,r)||n}catch(o){s=e?"":s}t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),t.currentDay=s?a.getDate():0,t.currentMonth=s?a.getMonth():0,t.currentYear=s?a.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},a=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,a=n.getFullYear(),r=n.getMonth(),o=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":o+=parseInt(l[1],10);break;case"w":case"W":o+=7*parseInt(l[1],10);break;case"m":case"M":r+=parseInt(l[1],10),o=Math.min(o,t.datepicker._getDaysInMonth(a,r));break;case"y":case"Y":a+=parseInt(l[1],10),o=Math.min(o,t.datepicker._getDaysInMonth(a,r))}l=h.exec(i)}return new Date(a,r,o)},r=null==i||""===i?s:"string"==typeof i?a(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return r=r&&"Invalid Date"==""+r?s:r,r&&(r.setHours(0),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0)),this._daylightSavingAdjust(r)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,a=t.selectedYear,r=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=r.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=r.getMonth(),t.drawYear=t.selectedYear=t.currentYear=r.getFullYear(),n===t.selectedMonth&&a===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,a,r,o,h,l,c,u,d,p,f,m,g,v,_,b,y,x,k,w,D,T,C,M,S,N,I,P,A,z,H,E,F,O,W,j,R=new Date,L=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),Y=this._get(t,"isRTL"),B=this._get(t,"showButtonPanel"),J=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),Q=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),U=this._get(t,"stepMonths"),q=1!==Q[0]||1!==Q[1],X=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),G=this._getMinMaxDate(t,"min"),$=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,te=t.drawYear;if(0>Z&&(Z+=12,te--),$)for(e=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth()-Q[0]*Q[1]+1,$.getDate())),e=G&&G>e?G:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-U,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":J?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+U,1)),this._getFormatConfig(t)):n,a=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":J?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",r=this._get(t,"currentText"),o=this._get(t,"gotoCurrent")&&t.currentDay?X:L,r=K?this.formatDate(r,o,this._getFormatConfig(t)):r,h=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(t,o)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+r+"</button>":"")+(Y?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),m=this._get(t,"monthNamesShort"),g=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),_=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;Q[0]>k;k++){for(w="",this.maxRows=4,D=0;Q[1]>D;D++){if(T=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),C=" ui-corner-all",M="",q){if(M+="<div class='ui-datepicker-group",Q[1]>1)switch(D){case 0:M+=" ui-datepicker-group-first",C=" ui-corner-"+(Y?"right":"left");break;case Q[1]-1:M+=" ui-datepicker-group-last",C=" ui-corner-"+(Y?"left":"right");break;default:M+=" ui-datepicker-group-middle",C=""}M+="'>"}for(M+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+C+"'>"+(/all|left/.test(C)&&0===k?Y?a:s:"")+(/all|right/.test(C)&&0===k?Y?s:a:"")+this._generateMonthYearHeader(t,Z,te,G,$,k>0||D>0,f,m)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",S=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",x=0;7>x;x++)N=(x+c)%7,S+="<th"+((x+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[N]+"'>"+p[N]+"</span></th>";for(M+=S+"</tr></thead><tbody>",I=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,I)),P=(this._getFirstDayOfMonth(te,Z)-c+7)%7,A=Math.ceil((P+I)/7),z=q?this.maxRows>A?this.maxRows:A:A,this.maxRows=z,H=this._daylightSavingAdjust(new Date(te,Z,1-P)),E=0;z>E;E++){for(M+="<tr>",F=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(H)+"</td>":"",x=0;7>x;x++)O=g?g.apply(t.input?t.input[0]:null,[H]):[!0,""],W=H.getMonth()!==Z,j=W&&!_||!O[0]||G&&G>H||$&&H>$,F+="<td class='"+((x+c+6)%7>=5?" ui-datepicker-week-end":"")+(W?" ui-datepicker-other-month":"")+(H.getTime()===T.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===H.getTime()&&b.getTime()===T.getTime()?" "+this._dayOverClass:"")+(j?" "+this._unselectableClass+" ui-state-disabled":"")+(W&&!v?"":" "+O[1]+(H.getTime()===X.getTime()?" "+this._currentClass:"")+(H.getTime()===L.getTime()?" ui-datepicker-today":""))+"'"+(W&&!v||!O[2]?"":" title='"+O[2].replace(/'/g,"&#39;")+"'")+(j?"":" data-handler='selectDay' data-event='click' data-month='"+H.getMonth()+"' data-year='"+H.getFullYear()+"'")+">"+(W&&!v?"&#xa0;":j?"<span class='ui-state-default'>"+H.getDate()+"</span>":"<a class='ui-state-default"+(H.getTime()===L.getTime()?" ui-state-highlight":"")+(H.getTime()===X.getTime()?" ui-state-active":"")+(W?" ui-priority-secondary":"")+"' href='#'>"+H.getDate()+"</a>")+"</td>",H.setDate(H.getDate()+1),H=this._daylightSavingAdjust(H);M+=F+"</tr>"}Z++,Z>11&&(Z=0,te++),M+="</tbody></table>"+(q?"</div>"+(Q[0]>0&&D===Q[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),w+=M}y+=w}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,a,r,o){var h,l,c,u,d,p,f,m,g=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),_=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(a||!g)y+="<span class='ui-datepicker-month'>"+r[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+o[c]+"</option>");y+="</select>"}if(_||(b+=y+(!a&&g&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",a||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);
return isNaN(e)?d:e},f=p(u[0]),m=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,m=n?Math.min(m,n.getFullYear()):m,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),_&&(b+=(!a&&g&&v?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.drawYear+("Y"===i?e:0),n=t.drawMonth+("M"===i?e:0),a=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),r=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,a)));t.selectedDay=r.getDate(),t.drawMonth=t.selectedMonth=r.getMonth(),t.drawYear=t.selectedYear=r.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),a=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(t,a)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),a=this._getMinMaxDate(t,"max"),r=null,o=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),r=parseInt(i[0],10),o=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=s),i[1].match(/[+\-].*/)&&(o+=s)),(!n||e.getTime()>=n.getTime())&&(!a||e.getTime()<=a.getTime())&&(!r||e.getFullYear()>=r)&&(!o||o>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.10.3"})(jQuery);(function(t){var e={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};t.widget("ui.dialog",{version:"1.10.3",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||t(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!e&&this._trigger("focus",t),i},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),undefined):(this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._trigger("open"),undefined)},_focusTabbable:function(){var t=this.element.find("[autofocus]");t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).focus()},_keepFocus:function(e){function i(){var e=this.document[0].activeElement,i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),undefined;if(e.keyCode===t.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(n.focus(1),e.preventDefault()):(s.focus(1),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=t("<button></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title||t.html("&#160;"),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),undefined):(t.each(i,function(i,s){var n,a;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(e.element[0],arguments)},a={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,t("<button></button>",s).button(a).appendTo(e.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),undefined)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){t(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,a){s.position=[a.position.left-i.document.scrollLeft(),a.position.top-i.document.scrollTop()],t(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(a))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,a=this.uiDialog.css("position"),o="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:o,start:function(s,n){t(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,a){s.height=t(this).height(),s.width=t(this).width(),t(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(a))}}).css("position",a)},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(s){var n=this,a=!1,o={};t.each(s,function(t,s){n._setOption(t,s),t in e&&(a=!0),t in i&&(o[t]=s)}),a&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",o)},_setOption:function(t,e){var i,s,n=this.uiDialog;"dialogClass"===t&&n.removeClass(this.options.dialogClass).addClass(e),"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:""+e}),"draggable"===t&&(i=n.is(":data(ui-draggable)"),i&&!e&&n.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(s=n.is(":data(ui-resizable)"),s&&!e&&n.resizable("destroy"),s&&"string"==typeof e&&n.resizable("option","handles",e),s||e===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=this,i=this.widgetFullName;t.ui.dialog.overlayInstances||this._delay(function(){t.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(s){e._allowInteraction(s)||(s.preventDefault(),t(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),t.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(t.ui.dialog.overlayInstances--,t.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),t.ui.dialog.overlayInstances=0,t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{_position:function(){var e,i=this.options.position,s=[],n=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(s=i.split?i.split(" "):[i[0],i[1]],1===s.length&&(s[1]=s[0]),t.each(["left","top"],function(t,e){+s[t]===s[t]&&(n[t]=s[t],s[t]=e)}),i={my:s[0]+(0>n[0]?n[0]:"+"+n[0])+" "+s[1]+(0>n[1]?n[1]:"+"+n[1]),at:s.join(" ")}),i=t.extend({},t.ui.dialog.prototype.options.position,i)):i=t.ui.dialog.prototype.options.position,e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.position(i),e||this.uiDialog.hide()}})})(jQuery);(function(t){t.widget("ui.menu",{version:"1.10.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(e),i.has(".ui-menu").length?this.expand(e):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,a,o,r,h=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:h=!1,n=this.previousFilter||"",a=String.fromCharCode(e.keyCode),o=!1,clearTimeout(this.filterTimer),a===n?o=!0:a=n+a,r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())}),s=o&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(a=String.fromCharCode(e.keyCode),r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousFilter=a,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}h&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=e.height(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(e),undefined)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(e),undefined)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})})(jQuery);(function(t,e){t.widget("ui.progressbar",{version:"1.10.3",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=t("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){return t===e?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),e)},_constrainedValue:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})})(jQuery);(function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)o.push(a);this.handles=n.add(t(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):this.range=t([])},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,a,o,r,h,l,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-u.values(e));(n>i||n===i&&(e===u._lastChangedValue||u.values(e)===c.min))&&(n=i,a=t(this),o=e)}),r=this._start(e,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass("ui-state-active").focus(),h=a.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-a.width()/2,top:e.pageY-h.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,a;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,a=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),a!==!1&&this.values(e,i,!0))):i!==this.value()&&(a=this._trigger("slide",t,{handle:this.handles[e],value:i}),a!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(e,i){var s,n,a;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),undefined;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,a,o=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),u["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](u,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](u,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(i){var s,n,a,o,r=t(i.target).data("ui-slider-handle-index");switch(i.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(i.target).addClass("ui-state-active"),s=this._start(i,r),s===!1))return}switch(o=this.options.step,n=a=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keyCode){case t.ui.keyCode.HOME:a=this._valueMin();break;case t.ui.keyCode.END:a=this._valueMax();break;case t.ui.keyCode.PAGE_UP:a=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:a=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;a=this._trimAlignValue(n+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;a=this._trimAlignValue(n-o)}this._slide(i,r,a)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})})(jQuery);(function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.10.3",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>&#9660;</span>"+"</a>"},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,this.element.val(this._format(i)),void 0}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(e(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})})(jQuery);(function(t,e){function i(){return++n}function s(t){return t.hash.length>1&&decodeURIComponent(t.href.replace(a,""))===decodeURIComponent(location.href.replace(a,""))}var n=0,a=/#.*$/;t.widget("ui.tabs",{version:"1.10.3",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var i=this.options.active,s=this.options.collapsible,n=location.hash.substring(1);return null===i&&(n&&this.tabs.each(function(s,a){return t(a).attr("aria-controls")===n?(i=s,!1):e}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===i||-1===i)&&(i=this.tabs.length?0:!1)),i!==!1&&(i=this.tabs.index(this.tabs.eq(i)),-1===i&&(i=s?!1:0)),!s&&i===!1&&this.anchors.length&&(i=0),i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(i){var s=t(this.document[0].activeElement).closest("li"),n=this.tabs.index(s),a=!0;if(!this._handlePageNav(i)){switch(i.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:a=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return i.preventDefault(),clearTimeout(this.activating),this._activate(n),e;case t.ui.keyCode.ENTER:return i.preventDefault(),clearTimeout(this.activating),this._activate(n===this.options.active?!1:n),e;default:return}i.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,a),i.ctrlKey||(s.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(i){return i.altKey&&i.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):i.altKey&&i.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):e},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,i){return"active"===t?(this._activate(i),e):"disabled"===t?(this._setupDisabled(i),e):(this._super(t,i),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(i),"heightStyle"===t&&this._setupHeightStyle(i),e)},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,n){var a,o,r,h=t(n).uniqueId().attr("id"),l=t(n).closest("li"),u=l.attr("aria-controls");s(n)?(a=n.hash,o=e.element.find(e._sanitizeSelector(a))):(r=e._tabId(l),a="#"+r,o=e.element.find(a),o.length||(o=e._createPanel(r),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),u&&l.data("ui-tabs-aria-controls",u),l.attr({"aria-controls":a.substring(1),"aria-labelledby":h}),o.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inArray(s,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),a=n.closest("li"),o=a[0]===s[0],r=o&&i.collapsible,h=r?t():this._getPanelForTab(a),l=s.length?this._getPanelForTab(s):t(),u={oldTab:s,oldPanel:l,newTab:r?t():a,newPanel:h};e.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||this._trigger("beforeActivate",e,u)===!1||(i.active=r?!1:this.tabs.index(a),this.active=o?t():a,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),e),this._toggle(e,u))},_toggle:function(e,i){function s(){a.running=!1,a._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),o.length&&r.length?i.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),o.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getIndex(i),s=t.isArray(s)?t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getIndex(i),-1!==t.inArray(i,s))return;s=t.isArray(s)?t.merge([i],s).sort():[i]}this._setupDisabled(s)}},load:function(e,i){e=this._getIndex(e);var n=this,a=this.tabs.eq(e),o=a.find(".ui-tabs-anchor"),r=this._getPanelForTab(a),h={tab:a,panel:r};s(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(a.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){r.html(t),n._trigger("load",i,h)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&n.panels.stop(!1,!0),a.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,a){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:a},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})})(jQuery);(function(t){function e(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")}var s=0;t.widget("ui.tooltip",{version:"1.10.3",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),this.options[e]=i,void 0):(this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e)}),void 0)},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,a=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&n._delay(function(){e&&(e.type=a),this._open(e,t,i)})}),i&&this._open(e,t,i),void 0)},_open:function(i,s,n){function a(t){l.of=t,o.is(":hidden")||o.position(l)}var o,r,h,l=t.extend({},this.options.position);if(n){if(o=this._find(s),o.length)return o.find(".ui-tooltip-content").html(n),void 0;s.is("[title]")&&(i&&"mouseover"===i.type?s.attr("title",""):s.removeAttr("title")),o=this._tooltip(s),e(s,o.attr("id")),o.find(".ui-tooltip-content").html(n),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:a}),a(i)):o.position(t.extend({of:s},this.options.position)),o.hide(),this._show(o,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){o.is(":visible")&&(a(l.of),clearInterval(h))},t.fx.interval)),this._trigger("open",i,{tooltip:o}),r={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=s[0],this.close(i,!0)}},remove:function(){this._removeTooltip(o)}},i&&"mouseover"!==i.type||(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!0,s,r)}},close:function(e){var s=this,n=t(e?e.currentTarget:this.element),a=this._find(n);this.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&n.attr("title",n.data("ui-tooltip-title")),i(n),a.stop(!0),this._hide(a,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:a}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+s++,n=t("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("<div>").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[i]=e,n},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))})}})})(jQuery);(function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,a){var o,r=a.re.exec(i),h=r&&a.parse(r),l=a.space||"rgba";return h?(o=s[l](h),s[c[l].cache]=o[c[l].cache],n=s._rgba=o._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,a.transparent),s):a[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var a,o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,o,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(o),o=e);var u=this,d=t.type(n),p=this._rgba=[];return o!==e&&(n=[n,o,r,h],d="array"),"string"===d?this.parse(s(n)||a._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var a=s.cache;f(s.props,function(t,e){if(!u[a]&&s.to){if("alpha"===t||null==n[t])return;u[a]=s.to(u._rgba)}u[a][e.idx]=i(n[t],e,!0)}),u[a]&&0>t.inArray(null,u[a].slice(0,3))&&(u[a][3]=1,s.from&&(u._rgba=s.from(u[a])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,a){var o,r=i[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===o[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),a=c[n],o=0===this.alpha()?l("transparent"):this,r=o[a.cache]||a.to(o._rgba),h=r.slice();return s=s[a.cache],f(a.props,function(t,n){var a=n.idx,o=r[a],l=s[a],c=u[n.type]||{};null!==l&&(null===o?h[a]=l:(c.mod&&(l-o>c.mod/2?o+=c.mod:o-l>c.mod/2&&(o-=c.mod)),h[a]=i((l-o)*e+o,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,a=t[2]/255,o=t[3],r=Math.max(s,n,a),h=Math.min(s,n,a),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-a)/l+360:n===r?60*(a-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==o?1:o]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],a=t[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*n(r,o,e+1/3)),Math.round(255*n(r,o,e)),Math.round(255*n(r,o,e-1/3)),a]},f(c,function(s,n){var a=n.props,o=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[o]&&(this[o]=h(this._rgba)),s===e)return this[o].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[o].slice();return f(a,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[o]=d,n):l(d)},f(a,function(e,i){l.fn[e]||(l.fn[e]=function(n){var a,o=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===o?c:("function"===o&&(n=n.call(this,c),o=t.type(n)),null==n&&i.empty?this:("string"===o&&(a=r.exec(n),a&&(n=c+parseFloat(a[2])*("+"===a[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var a,o,r="";if("transparent"!==n&&("string"!==t.type(n)||(a=s(n)))){if(n=l(a||n),!d.rgba&&1!==n._rgba[3]){for(o="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&o&&o.style;)try{r=t.css(o,"backgroundColor"),o=o.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(o),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},a=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(a[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}function s(e,i){var s,n,o={};for(s in i)n=i[s],e[s]!==n&&(a[s]||(t.fx.step[s]||!isNaN(parseFloat(n)))&&(o[s]=n));return o}var n=["add","remove","toggle"],a={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,a,o,r){var h=t.speed(a,o,r);return this.queue(function(){var a,o=t(this),r=o.attr("class")||"",l=h.children?o.find("*").addBack():o;l=l.map(function(){var e=t(this);return{el:e,start:i(this)}}),a=function(){t.each(n,function(t,i){e[i]&&o[i+"Class"](e[i])})},a(),l=l.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),o.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){a(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(o[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,a){return s?t.effects.animateClass.call(this,{add:i},s,n,a):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,a){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,a):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(i){return function(s,n,a,o,r){return"boolean"==typeof n||n===e?a?t.effects.animateClass.call(this,n?{add:s}:{remove:s},a,o,r):i.apply(this,arguments):t.effects.animateClass.call(this,{toggle:s},n,a,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,a){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,a)}})}(),function(){function s(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.10.3",save:function(t,e){for(var s=0;e.length>s;s++)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var n,a;for(a=0;s.length>a;a++)null!==s[a]&&(n=t.data(i+s[a]),n===e&&(n=""),t.css(s[a],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return e.wrap(s),(e[0]===a||t.contains(e[0],a))&&t(a).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var a=e.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),t.fn.extend({effect:function(){function e(e){function s(){t.isFunction(a)&&a.call(n[0]),t.isFunction(e)&&e()}var n=t(this),a=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),s()):o.call(n[0],i,s)}var i=s.apply(this,arguments),n=i.mode,a=i.queue,o=t.effects.effect[i.effect];return t.fx.off||!o?n?this[n](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):a===!1?this.each(e):this.queue(a||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()})(jQuery);(function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(s,n){var a,o,r,h=t(this),l=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(h,s.mode||"hide"),u=s.direction||"up",d=e.test(u),p=d?"height":"width",f=d?"top":"left",m=i.test(u),g={},v="show"===c;h.parent().is(".ui-effects-wrapper")?t.effects.save(h.parent(),l):t.effects.save(h,l),h.show(),a=t.effects.createWrapper(h).css({overflow:"hidden"}),o=a[p](),r=parseFloat(a.css(f))||0,g[p]=v?o:0,m||(h.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),g[f]=v?r:o+r),v&&(a.css(p,0),m||a.css(f,r+o)),a.animate(g,{duration:s.duration,easing:s.easing,queue:!1,complete:function(){"hide"===c&&h.hide(),t.effects.restore(h,l),t.effects.removeWrapper(h),n()}})}})(jQuery);(function(t){t.effects.effect.bounce=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(o,e.mode||"effect"),l="hide"===h,c="show"===h,u=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||l?1:0),m=e.duration/f,g=e.easing,v="up"===u||"down"===u?"top":"left",_="up"===u||"left"===u,b=o.queue(),y=b.length;for((c||l)&&r.push("opacity"),t.effects.save(o,r),o.show(),t.effects.createWrapper(o),d||(d=o["top"===v?"outerHeight":"outerWidth"]()/3),c&&(a={opacity:1},a[v]=0,o.css("opacity",0).css(v,_?2*-d:2*d).animate(a,m,g)),l&&(d/=Math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(_?"-=":"+=")+d,o.animate(n,m,g).animate(a,m,g),d=l?2*d:d/2;l&&(n={opacity:0},n[v]=(_?"-=":"+=")+d,o.animate(n,m,g)),o.queue(function(){l&&o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),o.dequeue()}})(jQuery);(function(t){t.effects.effect.clip=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(o,e.mode||"hide"),l="show"===h,c=e.direction||"vertical",u="vertical"===c,d=u?"height":"width",p=u?"top":"left",f={};t.effects.save(o,r),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),n="IMG"===o[0].tagName?s:o,a=n[d](),l&&(n.css(d,0),n.css(p,a/2)),f[d]=l?a:0,f[p]=l?0:a/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){l||o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.drop=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","opacity","height","width"],o=t.effects.setMode(n,e.mode||"hide"),r="show"===o,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h?"pos":"neg",u={opacity:r?1:0};t.effects.save(n,a),n.show(),t.effects.createWrapper(n),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(l,"pos"===c?-s:s),u[l]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery);(function(t){t.effects.effect.explode=function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),m||p.hide(),i()}var a,o,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),m="show"===f,g=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/u),b=[];for(a=0;u>a;a++)for(h=g.top+a*_,c=a-(u-1)/2,o=0;d>o;o++)r=g.left+o*v,l=o-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-o*v,top:-a*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(m?l*v:0),top:h+(m?c*_:0),opacity:m?0:1}).animate({left:r+(m?0:l*v),top:h+(m?0:c*_),opacity:m?1:0},e.duration||500,e.easing,s)}})(jQuery);(function(t){t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}})(jQuery);(function(t){t.effects.effect.fold=function(e,i){var s,n,a=t(this),o=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(a,e.mode||"hide"),h="show"===r,l="hide"===r,c=e.size||15,u=/([0-9]+)%/.exec(c),d=!!e.horizFirst,p=h!==d,f=p?["width","height"]:["height","width"],m=e.duration/2,g={},v={};t.effects.save(a,o),a.show(),s=t.effects.createWrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],u&&(c=parseInt(u[1],10)/100*n[l?0:1]),h&&s.css(d?{height:0,width:c}:{height:c,width:0}),g[f[0]]=h?n[0]:c,v[f[1]]=h?n[1]:0,s.animate(g,m,e.easing).animate(v,m,e.easing,function(){l&&a.hide(),t.effects.restore(a,o),t.effects.removeWrapper(a),i()})}})(jQuery);(function(t){t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],a=t.effects.setMode(s,e.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&s.hide(),t.effects.restore(s,n),i()}})}})(jQuery);(function(t){t.effects.effect.pulsate=function(e,i){var s,n=t(this),a=t.effects.setMode(n,e.mode||"show"),o="show"===a,r="hide"===a,h=o||"hide"===a,l=2*(e.times||5)+(h?1:0),c=e.duration/l,u=0,d=n.queue(),p=d.length;for((o||!n.is(":visible"))&&(n.css("opacity",0).show(),u=1),s=1;l>s;s++)n.animate({opacity:u},c,e.easing),u=1-u;n.animate({opacity:u},c,e.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,l+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),a="hide"===n,o=parseInt(e.percent,10)||150,r=o/100,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?h:{height:h.height*r,width:h.width*r,outerHeight:h.outerHeight*r,outerWidth:h.outerWidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),a=t.effects.setMode(s,e.mode||"effect"),o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===a?0:100),r=e.direction||"both",h=e.origin,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},c={y:"horizontal"!==r?o/100:1,x:"vertical"!==r?o/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=h||["middle","center"],n.restore=!0),n.from=e.from||("show"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:l),n.to={height:l.height*c.y,width:l.width*c.x,outerHeight:l.outerHeight*c.y,outerWidth:l.outerWidth*c.x},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],h=["position","top","bottom","left","right","overflow","opacity"],l=["width","height","overflow"],c=["fontSize"],u=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(o,e.mode||"effect"),f=e.restore||"effect"!==p,m=e.scale||"both",g=e.origin||["middle","center"],v=o.css("position"),_=f?r:h,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&o.show(),s={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},"toggle"===e.mode&&"show"===p?(o.from=e.to||b,o.to=e.from||s):(o.from=e.from||("show"===p?b:s),o.to=e.to||("hide"===p?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},("box"===m||"both"===m)&&(a.from.y!==a.to.y&&(_=_.concat(u),o.from=t.effects.setTransition(o,u,a.from.y,o.from),o.to=t.effects.setTransition(o,u,a.to.y,o.to)),a.from.x!==a.to.x&&(_=_.concat(d),o.from=t.effects.setTransition(o,d,a.from.x,o.from),o.to=t.effects.setTransition(o,d,a.to.x,o.to))),("content"===m||"both"===m)&&a.from.y!==a.to.y&&(_=_.concat(c).concat(l),o.from=t.effects.setTransition(o,c,a.from.y,o.from),o.to=t.effects.setTransition(o,c,a.to.y,o.to)),t.effects.save(o,_),o.show(),t.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),g&&(n=t.effects.getBaseline(g,s),o.from.top=(s.outerHeight-o.outerHeight())*n.y,o.from.left=(s.outerWidth-o.outerWidth())*n.x,o.to.top=(s.outerHeight-o.to.outerHeight)*n.y,o.to.left=(s.outerWidth-o.to.outerWidth)*n.x),o.css(o.from),("content"===m||"both"===m)&&(u=u.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),l=r.concat(u).concat(d),o.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,l),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=t.effects.setTransition(i,u,a.from.y,i.from),i.to=t.effects.setTransition(i,u,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=t.effects.setTransition(i,d,a.from.x,i.from),i.to=t.effects.setTransition(i,d,a.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,l)})})),o.animate(o.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===p&&o.hide(),t.effects.restore(o,_),f||("static"===v?o.css({position:"relative",top:o.to.top,left:o.to.left}):t.each(["top","left"],function(t,e){o.css(e,function(e,i){var s=parseInt(i,10),n=t?o.to.left:o.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.shake=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","height","width"],o=t.effects.setMode(n,e.mode||"effect"),r=e.direction||"left",h=e.distance||20,l=e.times||3,c=2*l+1,u=Math.round(e.duration/c),d="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},m={},g={},v=n.queue(),_=v.length;for(t.effects.save(n,a),n.show(),t.effects.createWrapper(n),f[d]=(p?"-=":"+=")+h,m[d]=(p?"+=":"-=")+2*h,g[d]=(p?"-=":"+=")+2*h,n.animate(f,u,e.easing),s=1;l>s;s++)n.animate(m,u,e.easing).animate(g,u,e.easing);n.animate(m,u,e.easing).animate(f,u/2,e.easing).queue(function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.slide=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","width","height"],o=t.effects.setMode(n,e.mode||"show"),r="show"===o,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u={};t.effects.save(n,a),n.show(),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(l,c?isNaN(s)?"-"+s:-s:s),u[l]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery);(function(t){t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),a="fixed"===n.css("position"),o=t("body"),r=a?o.scrollTop():0,h=a?o.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:a?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}})(jQuery);

;// (c) 2010 CodePlex Foundation
(function(g,b){var p="object",t="set_",n="#",o="$",k="string",i=".",h=" ",s="onreadystatechange",l="load",y="_readyQueue",x="_domReadyQueue",m="error",d=false,r="on",a=null,c=true,f="function",j="number",e="undefined",A=function(a){a=a||{};q(arguments,function(b){b&&v(b,function(c,b){a[b]=c})},1);return a},v=function(a,c){for(var b in a)c(a[b],b)},q=function(a,h,i){var d;if(a){a=a!==g&&typeof a.nodeType===e&&(a instanceof Array||typeof a.length===j&&(typeof a.callee===f||a.item&&typeof a.nodeType===e&&!a.addEventListener&&!a.attachEvent))?a:[a];for(var b=i||0,k=a.length;b<k;b++)if(h(a[b],b)){d=c;break}}return!d},u=function(b,e,d){var c=b[e],a=typeof c===f;a&&c.call(b,d);return a};if(!b||!b.loader){function M(a){a=a||{};q(arguments,function(b){b&&v(b,function(c,b){if(typeof a[b]===e)a[b]=c})},1);return a}var z=!!document.attachEvent;function C(b,a){var c=b[a];delete b[a];return c}function K(d,b,c){q(C(d,b),function(b){b.apply(a,c||[])})}function I(a,c,b){return a?(a[c]=a[c]||b):b}function G(c,b,a){I(c,b,[]).push(a)}function B(b,a){return(a||document).getElementsByTagName(b)}function J(a){return document.createElement(a)}function D(b,e,g,i,h,f){function c(){if(!z||!h||/loaded|complete/.test(b.readyState)){if(z)b.detachEvent(g||r+e,c);else{b.removeEventListener(e,c,d);f&&b.removeEventListener(m,c,d)}i.apply(b);b=a}}if(z)b.attachEvent(g||r+e,c);else{b.addEventListener(e,c,d);f&&b.addEventListener(m,c,d)}}function E(){b._domReady&&b._2Pass(C(b,x))}function F(){var a=b._ready;if(!a&&b._domReady&&!(b.loader&&b.loader._loading))b._ready=a=c;a&&b._2Pass(C(b,y))}g.Sys=b=M(b,{version:[3,0,31106,0],__namespace:c,debug:d,scripts:{},activateDom:c,composites:{},components:{},plugins:{},create:{},converters:{},_domLoaded:function(){if(b._domChecked)return;b._domChecked=c;function d(){if(!b._domReady){b._domReady=c;var d=b._autoRequire;d&&b.require(d,function(){b._autoRequire=a;K(b,"_autoQueue")},autoToken);E();F()}}D(g,l,a,d);var e;if(z)if(g==g.top&&document.documentElement.doScroll){var h,i,f=J("div");e=function(){try{f.doScroll("left")}catch(b){h=g.setTimeout(e,0);return}f=a;d()};e()}else D(document,a,s,d,c);else document.addEventListener&&D(document,"DOMContentLoaded",a,d)},_getById:function(b,d,h,f,a,g){if(a)if(f&&a.id===d)b.push(a);else!g&&q(B("*",a),function(a){if(a.id===d){b.push(a);return c}});else{var e=document.getElementById(d);e&&b.push(e)}return b.length},_getByClass:function(l,d,g,m,a,n){function j(b){var e,a=b.className;if(a&&(a===d||a.indexOf(h+d)>=0||a.indexOf(d+h)>=0)){l.push(b);e=c}return e}var b,f,e;if(m&&j(a)&&g)return c;if(!n){a=a||document;var k=a.querySelectorAll||a.getElementsByClassName;if(k){if(a.querySelectorAll)d=i+d;e=k.call(a,d);for(b=0,f=e.length;b<f;b++){l.push(e[b]);if(g)return c}}else{e=B("*",a);for(b=0,f=e.length;b<f;b++)if(j(e[b])&&g)return c}}},query:function(a,c){return new b.ElementSet(a,c)},"get":function(b,a){return a&&typeof a.get===f?a.get(b):this._find(b,a,c)},_find:function(l,d,f,h){var e=[],j;if(typeof l===k)j=[l];else j=l;var i=d instanceof Array,m=/^([\$#\.])((\w|[$:\.\-])+)$/,p=/^((\w+)|\*)$/;if(typeof d===k||d instanceof Array)d=b._find(d);if(d instanceof b.ElementSet)d=d.get();q(j,function(a){if(typeof a!==k)if(h)contains(d,a)&&e.push(a);else e.push(a);else{var j=m.exec(a);if(j&&j.length===4){a=j[2];var s=j[1];if(s===o)b._getComponent(e,a,d);else{var r=s===n?b._getById:b._getByClass;if(d)q(d,function(b){if(b.nodeType===1)return r(e,a,f,i,b,h)});else r(e,a,f)}}else if(p.test(a))if(d instanceof Array)q(d,function(b){if(b.nodeType===1){if(i&&(a==="*"||b.tagName.toLowerCase()===a)){e.push(b);if(f)return c}if(!h)if(!q(B(a,b),function(a){e.push(a);if(f)return c}))return c}});else{var l=B(a,d);if(f){l[0]&&e.push(l[0]);return c}q(l,function(a){e.push(a)})}else if(g.jQuery){!h&&e.push.apply(e,jQuery(a,d).get());i&&e.push.apply(e,jQuery(d).filter(a).get())}}});return e.length?f?e[0]||a:e:a},onDomReady:function(a){G(this,x,a);E()},onReady:function(a){G(this,y,a);F()},_set:function(a,b){v(b,function(c,b){u(a,"add_"+b,c)||u(a,t+b,c)||(a[b]=c)})}});b._getComponent=b._getComponent||function(){};b._2Pass=b._2Pass||function(a){q(a,function(a){a()})};var w;if(!b.ElementSet){w=b.ElementSet=function(c,a){this._elements=typeof a===p&&typeof a.query===f?a.query(c).get():b._find(c,a)||[]};w.prototype={__class:c,components:function(d,c){var a=new b.ElementSet(this.get());return new b.ComponentSet(a,d,c)},component:function(b,a){return this.components(b,a).get(0)},each:function(c){for(var b=this._elements,a=0,e=b.length;a<e;a++)if(c.call(b[a],a)===d)break;return this},"get":function(c){var b=this._elements;return typeof c===e?Array.apply(a,b):b[c]||a},find:function(a){return new b.ElementSet(a,this)},filter:function(a){return new b.ElementSet(b._find(a,this._elements,d,c))}}}if(!b.ComponentSet){w=b.ComponentSet=function(a,d,c){this._elementSet=a||(a=new b.ElementSet);this._components=this._execute(a,d,c)};w.prototype={__class:c,setProperties:function(a){return this.each(function(){b._set(this,a)})},"get":function(c){var b=this._components;return typeof c===e?Array.apply(a,b):b[c||0]||a},each:function(a){q(this._components,function(b,e){if(a.call(b,e)===d)return c});return this},elements:function(){return this._elementSet},_execute:function(f,b,c){var a=[];function d(c){var a;return c instanceof b||(a=c.constructor)&&(a===b||a.inheritsFrom&&a.inheritsFrom(b)||a.implementsInterface&&a.implementsInterface(b))}if(b instanceof Array)a.push.apply(a,b);else f.each(function(){var c=this.control;c&&(!b||d(c))&&a.push(c);q(this._behaviors,function(c){(!b||d(c))&&a.push(c)})});if(typeof c!==e)if(a[c])a=[a[c]];else a=[];return a}}}w=a}var L=function(a,d){if(d)return function(){return b.plugins[a.name].plugin.apply(this,arguments)};else{var c=function(){var c=arguments.callee,a=c._component;return b._createComp.call(this,a,a.defaults,arguments)};c._component=a;return c}};b._getCreate=L;function H(){var ub="callback",S="completed",jb="completedRequest",ib="invokingRequest",xb="Sys.Net.XMLHttpExecutor",R="uploadAbort",M="Content-Type",Q="progress",mb="text/xml",tb="SelectionLanguage",hb="navigate",gb="dispose",fb="init",L="unload",P="none",eb="HTML",I="absolute",O="BODY",db="InternetExplorer",cb="disposing",H="+",sb="MonthNames",rb="MonthGenitiveNames",bb="Abbreviated",E="-",D="/",ab="yyyy",Z="MMMM",Y="dddd",B=100,J="collectionChanged",X="get_",C="propertyChanged",G=",",W="null",U="Firefox",V="initialize",lb="beginUpdate",y=-1,qb="Undefined",x="",F="\n",pb="Exception",w,z;b._foreach=q;b._forIn=v;b._merge=A;b._callIf=u;w=Function;w.__typeName="Function";w.__class=c;w.createCallback=function(b,a){return function(){var e=arguments.length;if(e>0){for(var d=[],c=0;c<e;c++)d[c]=arguments[c];d[e]=a;return b.apply(this,d)}return b.call(this,a)}};w.createDelegate=function(a,b){return function(){return b.apply(a,arguments)}};w.emptyFunction=w.emptyMethod=function(){};w.validateParameters=function(c,b,a){return Function._validateParams(c,b,a)};w._validateParams=function(i,g,e){var b,f=g.length;e=e!==d;b=Function._validateParameterCount(i,g,e);if(b){b.popStackFrame();return b}for(var c=0,k=i.length;c<k;c++){var h=g[Math.min(c,f-1)],j=h.name;if(h.parameterArray)j+="["+(c-f+1)+"]";else if(!e&&c>=f)break;b=Function._validateParameter(i[c],h,j);if(b){b.popStackFrame();return b}}return a};w._validateParameterCount=function(m,g,l){var b,f,e=g.length,h=m.length;if(h<e){var i=e;for(b=0;b<e;b++){var j=g[b];if(j.optional||j.parameterArray)i--}if(h<i)f=c}else if(l&&h>e){f=c;for(b=0;b<e;b++)if(g[b].parameterArray){f=d;break}}if(f){var k=Error.parameterCount();k.popStackFrame();return k}return a};w._validateParameter=function(d,b,j){var c,i=b.type,n=!!b.integer,m=!!b.domElement,o=!!b.mayBeNull;c=Function._validateParameterType(d,i,n,m,o,j);if(c){c.popStackFrame();return c}var g=b.elementType,h=!!b.elementMayBeNull;if(i===Array&&typeof d!==e&&d!==a&&(g||!h))for(var l=!!b.elementInteger,k=!!b.elementDomElement,f=0;f<d.length;f++){var p=d[f];c=Function._validateParameterType(p,g,l,k,h,j+"["+f+"]");if(c){c.popStackFrame();return c}}return a};w._validateParameterType=function(c,f,n,m,o,g){var d,k;if(typeof c===e||c===a){if(o)return a;d=c===a?Error.argumentNull(g):Error.argumentUndefined(g);d.popStackFrame();return d}if(f&&f.__enum){if(typeof c!==j){d=Error.argumentType(g,Object.getType(c),f);d.popStackFrame();return d}if(c%1===0){var h=f.prototype;if(!f.__flags||c===0){for(k in h)if(h[k]===c)return a}else{var l=c;for(k in h){var i=h[k];if(i===0)continue;if((i&c)===i)l-=i;if(l===0)return a}}}d=Error.argumentOutOfRange(g,c,String.format(b.Res.enumInvalidValue,c,f.getName()));d.popStackFrame();return d}if(m&&(!b._isDomElement(c)||c.nodeType===3)){d=Error.argument(g,b.Res.argumentDomElement);d.popStackFrame();return d}if(f&&!b._isInstanceOfType(f,c)){d=Error.argumentType(g,Object.getType(c),f);d.popStackFrame();return d}if(f===Number&&n)if(c%1!==0){d=Error.argumentOutOfRange(g,c,b.Res.argumentInteger);d.popStackFrame();return d}return a};w=Error;w.__typeName="Error";w.__class=c;b._errorArgument=function(e,a,g){var f="Sys.Argument"+e+pb,d=f+": "+(g||b.Res["argument"+e]);if(a)d+=F+String.format(b.Res.paramName,a);var c=Error.create(d,{name:f,paramName:a});c.popStackFrame();c.popStackFrame();return c};b._error=function(g,f,d){var c="Sys."+g+pb,e=c+": "+(f||b.Res[d]),a=Error.create(e,{name:c});a.popStackFrame();a.popStackFrame();return a};w.create=function(c,b){var a=new Error(c);a.message=c;if(b)for(var d in b)a[d]=b[d];a.popStackFrame();return a};w.argument=function(a,c){return b._errorArgument(x,a,c)};w.argumentNull=function(a,c){return b._errorArgument("Null",a,c)};w.argumentOutOfRange=function(f,c,h){var d="Sys.ArgumentOutOfRangeException: "+(h||b.Res.argumentOutOfRange);if(f)d+=F+String.format(b.Res.paramName,f);if(typeof c!==e&&c!==a)d+=F+String.format(b.Res.actualValue,c);var g=Error.create(d,{name:"Sys.ArgumentOutOfRangeException",paramName:f,actualValue:c});g.popStackFrame();return g};w.argumentType=function(e,d,c,f){var a="Sys.ArgumentTypeException: ";if(f)a+=f;else if(d&&c)a+=String.format(b.Res.argumentTypeWithTypes,d.getName(),c.getName());else a+=b.Res.argumentType;if(e)a+=F+String.format(b.Res.paramName,e);var g=Error.create(a,{name:"Sys.ArgumentTypeException",paramName:e,actualType:d,expectedType:c});g.popStackFrame();return g};w.argumentUndefined=function(a,c){return b._errorArgument(qb,a,c)};w.format=function(a){return b._error("Format",a,"format")};w.invalidOperation=function(a){return b._error("InvalidOperation",a,"invalidOperation")};w.notImplemented=function(a){return b._error("NotImplemented",a,"notImplemented")};w.parameterCount=function(a){return b._error("ParameterCount",a,"parameterCount")};w.prototype.popStackFrame=function(){var b=this;if(typeof b.stack===e||b.stack===a||typeof b.fileName===e||b.fileName===a||typeof b.lineNumber===e||b.lineNumber===a)return;var c=b.stack.split(F),f=c[0],h=b.fileName+":"+b.lineNumber;while(typeof f!==e&&f!==a&&f.indexOf(h)<0){c.shift();f=c[0]}var g=c[1];if(typeof g===e||g===a)return;var d=g.match(/@(.*):(\d+)$/);if(typeof d===e||d===a)return;b.fileName=d[1];b.lineNumber=parseInt(d[2]);c.shift();b.stack=c.join(F)};w=Object;w.__typeName="Object";w.__class=c;w.getType=function(b){var a=b.constructor;return!a||typeof a!==f||!a.__typeName||a.__typeName==="Object"?Object:a};w.getTypeName=function(a){return Object.getType(a).getName()};w=String;w.__typeName="String";w.__class=c;z=w.prototype;z.endsWith=function(a){return this.substr(this.length-a.length)===a};z.startsWith=function(a){return this.substr(0,a.length)===a};z.trim=function(){return this.replace(/^\s+|\s+$/g,x)};z.trimEnd=function(){return this.replace(/\s+$/,x)};z.trimStart=function(){return this.replace(/^\s+/,x)};w.format=function(){return String._toFormattedString(d,arguments)};w._toFormattedString=function(o,m){for(var f=x,h=m[0],b=0;c;){var i=h.indexOf("{",b),g=h.indexOf("}",b);if(i<0&&g<0){f+=h.slice(b);break}if(g>0&&(g<i||i<0)){f+=h.slice(b,g+1);b=g+2;continue}f+=h.slice(b,i);b=i+1;if(h.charAt(b)==="{"){f+="{";b++;continue}if(g<0)break;var k=h.substring(b,g),j=k.indexOf(":"),n=parseInt(j<0?k:k.substring(0,j),10)+1,l=j<0?x:k.substring(j+1),d=m[n];if(typeof d===e||d===a)d=x;if(d.toFormattedString)f+=d.toFormattedString(l);else if(o&&d.localeFormat)f+=d.localeFormat(l);else if(d.format)f+=d.format(l);else f+=d.toString();b=g+1}return f};w=Boolean;w.__typeName="Boolean";w.__class=c;w.parse=function(e){var b=e.trim().toLowerCase(),a;if(b==="false")a=d;else if(b==="true")a=c;return a};w=Date;w.__typeName="Date";w.__class=c;w=Number;w.__typeName="Number";w.__class=c;w=RegExp;w.__typeName="RegExp";w.__class=c;if(!g)this.window=this;g.Type=w=Function;z=w.prototype;z.callBaseMethod=function(a,e,c){var d=b._getBaseMethod(this,a,e);return c?d.apply(a,c):d.apply(a)};z.getBaseMethod=function(a,c){return b._getBaseMethod(this,a,c)};z.getBaseType=function(){return typeof this.__baseType===e?a:this.__baseType};z.getInterfaces=function(){var c=[],a=this;while(a){var b=a.__interfaces;if(b)for(var d=0,f=b.length;d<f;d++){var e=b[d];!Array.contains(c,e)&&c.push(e)}a=a.__baseType}return c};z.getName=function(){return typeof this.__typeName===e?x:this.__typeName};z.implementsInterface=function(h){var f=this;f.resolveInheritance();var g=h.getName(),a=f.__interfaceCache;if(a){var i=a[g];if(typeof i!==e)return i}else a=f.__interfaceCache={};var b=f;while(b){var j=b.__interfaces;if(j&&Array.indexOf(j,h)!==y)return a[g]=c;b=b.__baseType}return a[g]=d};z.inheritsFrom=function(a){this.resolveInheritance();return b._inheritsFrom(this,a)};b._inheritsFrom=function(e,b){var d;if(b){var a=e.__baseType;while(a){if(a===b){d=c;break}a=a.__baseType}}return!!d};z.initializeBase=function(b,c){this.resolveInheritance();var a=this.__baseType;if(a)c?a.apply(b,c):a.apply(b);return b};z.isImplementedBy=function(b){if(typeof b===e||b===a)return d;var c=Object.getType(b);return!!(c.implementsInterface&&c.implementsInterface(this))};z.isInstanceOfType=function(a){return b._isInstanceOfType(this,a)};z.registerClass=function(f,e,g){var a=this,j=a.prototype;j.constructor=a;a.__typeName=f;a.__class=c;if(e){a.__baseType=e;a.__basePrototypePending=c}b.__upperCaseTypes[f.toUpperCase()]=a;if(g)for(var i=a.__interfaces=[],d=2,k=arguments.length;d<k;d++){var h=arguments[d];i.push(h)}return a};b.registerComponent=function(d,c){var f=d.getName(),e=b.UI&&(b._inheritsFrom(d,b.UI.Control)||b._inheritsFrom(d,b.UI.Behavior)),a=c&&c.name;if(!a){a=f;var g=a.lastIndexOf(i);if(g>=0){a=a.substr(g+1);if(a&&a.charAt(0)==="_")return}a=a.substr(0,1).toLowerCase()+a.substr(1)}if(!c)c={};c.name=a;c.type=d;c.typeName=f;c._isBehavior=e;c=b.components[a]=A(b.components[a],c);var j=b._getCreate(c),h=e?b.ElementSet.prototype:b.create;h[a]=j};b.registerPlugin=function(a){var e=a.name,f=a.functionName||e;b.plugins[e]=A(b.plugins[e],a);var g=a.plugin,d;if(a.global)d=b;else if(a.dom)d=b.ElementSet.prototype;else if(a.components)d=b.ComponentSet.prototype;if(d)d[f]=b._getCreate(a,c)};b._createComp=function(d,l,f){var i=d.type,h=d.parameters||[],j=d._isBehavior,m=j?f[0]:a,c=f[h.length]||{};c=A({},l,c);q(h,function(a,g){var d=typeof a===k?a:a.name,b=f[g];if(typeof b!==e&&typeof c[d]===e)c[d]=b});if(this instanceof b.ElementSet){var g=[];this.each(function(){g.push(b._create(i,c,this))});return new b.ComponentSet(this,g)}else return b._create(i,c)};b._create=function(f,g,c){var d=typeof c;if(d===k)c=b.get(c);var a;b._2Pass(function(){a=d===e?new f:new f(c);u(a,lb);b._set(a,g);var h=b.Component;if(!h||!h._register(a))u(a,"endUpdate")||u(a,V)});return a};z.registerInterface=function(d){var a=this;b.__upperCaseTypes[d.toUpperCase()]=a;a.prototype.constructor=a;a.__typeName=d;a.__interface=c;return a};z.resolveInheritance=function(){var a=this;if(a.__basePrototypePending){var e=a.__baseType;e.resolveInheritance();var c=e.prototype,d=a.prototype;for(var b in c)d[b]=d[b]||c[b];delete a.__basePrototypePending}};w.getRootNamespaces=function(){return Array.clone(b.__rootNamespaces)};w.isClass=function(a){return!!(a&&a.__class)};w.isInterface=function(a){return!!(a&&a.__interface)};w.isNamespace=function(a){return!!(a&&a.__namespace)};w.parse=function(d,f){var c;if(f){c=b.__upperCaseTypes[f.getName().toUpperCase()+i+d.toUpperCase()];return c||a}if(!d)return a;var e=Type.__htClasses;if(!e)Type.__htClasses=e={};c=e[d];if(!c){c=g.eval(d);e[d]=c}return c};w.registerNamespace=function(a){Type._registerNamespace(a)};w._registerNamespace=function(h){for(var f=g,e=h.split(i),d=0,k=e.length;d<k;d++){var j=e[d],a=f[j];if(!a)a=f[j]={};if(!a.__namespace){!d&&h!=="Sys"&&b.__rootNamespaces.push(a);a.__namespace=c;a.__typeName=e.slice(0,d+1).join(i);a.getName=function(){return this.__typeName}}f=a}};w._checkDependency=function(f,a){var g=Type._registerScript._scripts,c=g?!!g[f]:d;if(typeof a!==e&&!c)throw Error.invalidOperation(String.format(b.Res.requiredScriptReferenceNotIncluded,a,f));return c};w._registerScript=function(a,e){var d=Type._registerScript._scripts;if(!d)Type._registerScript._scripts=d={};if(d[a])throw Error.invalidOperation(String.format(b.Res.scriptAlreadyLoaded,a));d[a]=c;if(e)for(var f=0,h=e.length;f<h;f++){var g=e[f];if(!Type._checkDependency(g))throw Error.invalidOperation(String.format(b.Res.scriptDependencyNotFound,a,g));}};w._registerNamespace("Sys");b.__upperCaseTypes={};b.__rootNamespaces=[b];b._isInstanceOfType=function(g,f){if(typeof f===e||f===a)return d;if(f instanceof g)return c;var b=Object.getType(f);return!!(b===g)||b.inheritsFrom&&b.inheritsFrom(g)||b.implementsInterface&&b.implementsInterface(g)};b._getBaseMethod=function(e,f,d){var c=e.getBaseType();if(c){var b=c.prototype[d];return b instanceof Function?b:a}return a};b._isDomElement=function(a){var e=d;if(typeof a.nodeType!==j){var c=a.ownerDocument||a.document||a;if(c!=a){var f=c.defaultView||c.parentWindow;e=f!=a}else e=!c.body||!b._isDomElement(c.body)}return!e};var kb=b._isBrowser=function(a){return b.Browser.agent===b.Browser[a]};q(b._ns,w._registerNamespace);delete b._ns;w=Array;w.__typeName="Array";w.__class=c;var vb=b._indexOf=function(d,f,a){if(typeof f===e)return y;var c=d.length;if(c!==0){a=a-0;if(isNaN(a))a=0;else{if(isFinite(a))a=a-a%1;if(a<0)a=Math.max(0,c+a)}for(var b=a;b<c;b++)if(d[b]===f)return b}return y};w.add=w.enqueue=function(a,b){a[a.length]=b};w.addRange=function(a,b){a.push.apply(a,b)};w.clear=function(a){a.length=0};w.clone=function(b){return b.length===1?[b[0]]:Array.apply(a,b)};w.contains=function(a,b){return vb(a,b)>=0};w.dequeue=function(a){return a.shift()};w.forEach=function(b,f,d){for(var a=0,g=b.length;a<g;a++){var c=b[a];typeof c!==e&&f.call(d,c,a,b)}};w.indexOf=vb;w.insert=function(a,b,c){a.splice(b,0,c)};w.parse=function(a){return a?g.eval("("+a+")"):[]};w.remove=function(b,c){var a=vb(b,c);a>=0&&b.splice(a,1);return a>=0};w.removeAt=function(a,b){a.splice(b,1)};Type._registerScript._scripts={"MicrosoftAjaxCore.js":c,"MicrosoftAjaxGlobalization.js":c,"MicrosoftAjaxSerialization.js":c,"MicrosoftAjaxComponentModel.js":c,"MicrosoftAjaxHistory.js":c,"MicrosoftAjaxNetwork.js":c,"MicrosoftAjaxWebServices.js":c};w=b.IDisposable=function(){};w.registerInterface("Sys.IDisposable");w=b.StringBuilder=function(b){this._parts=typeof b!==e&&b!==a&&b!==x?[b.toString()]:[];this._value={};this._len=0};w.prototype={append:function(a){this._parts.push(a);return this},appendLine:function(b){this._parts.push(typeof b===e||b===a||b===x?"\r\n":b+"\r\n");return this},clear:function(){this._parts=[];this._value={};this._len=0},isEmpty:function(){return!this._parts.length||!this.toString()},toString:function(b){var d=this;b=b||x;var c=d._parts;if(d._len!==c.length){d._value={};d._len=c.length}var i=d._value,h=i[b];if(typeof h===e){if(b!==x)for(var f=0;f<c.length;){var g=c[f];if(typeof g===e||g===x||g===a)c.splice(f,1);else f++}i[b]=h=c.join(b)}return h}};w.registerClass("Sys.StringBuilder");var nb=navigator.userAgent,K=b.Browser={InternetExplorer:{},Firefox:{},Safari:{},Opera:{},agent:a,hasDebuggerStatement:d,name:navigator.appName,version:parseFloat(navigator.appVersion),documentMode:0};if(nb.indexOf(" MSIE ")>y){K.agent=K.InternetExplorer;K.version=parseFloat(nb.match(/MSIE (\d+\.\d+)/)[1]);if(K.version>7&&document.documentMode>6)K.documentMode=document.documentMode;K.hasDebuggerStatement=c}else if(nb.indexOf(" Firefox/")>y){K.agent=K.Firefox;K.version=parseFloat(nb.match(/ Firefox\/(\d+\.\d+)/)[1]);K.name=U;K.hasDebuggerStatement=c}else if(nb.indexOf(" AppleWebKit/")>y){K.agent=K.Safari;K.version=parseFloat(nb.match(/ AppleWebKit\/(\d+(\.\d+)?)/)[1]);K.name="Safari"}else if(nb.indexOf("Opera/")>y)K.agent=K.Opera;w=b.EventArgs=function(){};w.registerClass("Sys.EventArgs");b.EventArgs.Empty=new b.EventArgs;w=b.CancelEventArgs=function(){b.CancelEventArgs.initializeBase(this);this._cancel=d};w.prototype={get_cancel:function(){return this._cancel},set_cancel:function(a){this._cancel=a}};w.registerClass("Sys.CancelEventArgs",b.EventArgs);Type.registerNamespace("Sys.UI");w=b._Debug=function(){};w.prototype={_appendConsole:function(a){typeof Debug!==e&&Debug.writeln;g.console&&g.console.log&&g.console.log(a);g.opera&&g.opera.postError(a);g.debugService&&g.debugService.trace(a)},_getTrace:function(){var c=b.get("#TraceConsole");return c&&c.tagName.toUpperCase()==="TEXTAREA"?c:a},_appendTrace:function(b){var a=this._getTrace();if(a)a.value+=b+F},"assert":function(d,a,c){if(!d){a=c&&this.assert.caller?String.format(b.Res.assertFailedCaller,a,this.assert.caller):String.format(b.Res.assertFailed,a);confirm(String.format(b.Res.breakIntoDebugger,a))&&this.fail(a)}},clearTrace:function(){var a=this._getTrace();if(a)a.value=x},fail:function(a){this._appendConsole(a);b.Browser.hasDebuggerStatement&&g.eval("debugger")},trace:function(a){this._appendConsole(a);this._appendTrace(a)},traceDump:function(a,b){this._traceDump(a,b,c)},_traceDump:function(b,l,n,c,h){var d=this;l=l||"traceDump";c=c||x;var i=c+l+": ";if(b===a){d.trace(i+W);return}switch(typeof b){case e:d.trace(i+qb);break;case j:case k:case"boolean":d.trace(i+b);break;default:if(Date.isInstanceOfType(b)||RegExp.isInstanceOfType(b)){d.trace(i+b.toString());break}if(!h)h=[];else if(Array.contains(h,b)){d.trace(i+"...");return}h.push(b);if(b==g||b===document||g.HTMLElement&&b instanceof HTMLElement||typeof b.nodeName===k){var s=b.tagName||"DomElement";if(b.id)s+=" - "+b.id;d.trace(c+l+" {"+s+"}")}else{var q=Object.getTypeName(b);d.trace(c+l+(typeof q===k?" {"+q+"}":x));if(c===x||n){c+="    ";var m,r,t,o,p;if(b instanceof Array){r=b.length;for(m=0;m<r;m++)d._traceDump(b[m],"["+m+"]",n,c,h)}else for(o in b){p=b[o];typeof p!==f&&d._traceDump(p,o,n,c,h)}}}Array.remove(h,b)}}};w.registerClass("Sys._Debug");w=b.Debug=new b._Debug;w.isDebug=d;function Jb(e,g){var d=this,c,a,m;if(g){c=d.__lowerCaseValues;if(!c){d.__lowerCaseValues=c={};var i=d.prototype;for(var l in i)c[l.toLowerCase()]=i[l]}}else c=d.prototype;function h(c){if(typeof a!==j)throw Error.argument("value",String.format(b.Res.enumInvalidValue,c,this.__typeName));}if(!d.__flags){m=g?e.toLowerCase():e;a=c[m.trim()];typeof a!==j&&h.call(d,e);return a}else{for(var k=(g?e.toLowerCase():e).split(G),n=0,f=k.length-1;f>=0;f--){var o=k[f].trim();a=c[o];typeof a!==j&&h.call(d,e.split(G)[f].trim());n|=a}return n}}function Ib(d){var f=this;if(typeof d===e||d===a)return f.__string;var g=f.prototype,b;if(!f.__flags||d===0){for(b in g)if(g[b]===d)return b}else{var c=f.__sortedValues;if(!c){c=[];for(b in g)c.push({key:b,value:g[b]});c.sort(function(a,b){return a.value-b.value});f.__sortedValues=c}var i=[],j=d;for(b=c.length-1;b>=0;b--){var k=c[b],h=k.value;if(h===0)continue;if((h&d)===h){i.push(k.key);j-=h;if(j===0)break}}if(i.length&&j===0)return i.reverse().join(", ")}return x}w=Type;w.prototype.registerEnum=function(d,f){var a=this;b.__upperCaseTypes[d.toUpperCase()]=a;for(var e in a.prototype)a[e]=a.prototype[e];a.__typeName=d;a.parse=Jb;a.__string=a.toString();a.toString=Ib;a.__flags=f;a.__enum=c};w.isEnum=function(a){return!!(a&&a.__enum)};w.isFlags=function(a){return!!(a&&a.__flags)};w=b.CollectionChange=function(g,b,e,c,f){var d=this;d.action=g;if(b)if(!(b instanceof Array))b=[b];d.newItems=b||a;if(typeof e!==j)e=y;d.newStartingIndex=e;if(c)if(!(c instanceof Array))c=[c];d.oldItems=c||a;if(typeof f!==j)f=y;d.oldStartingIndex=f};w.registerClass("Sys.CollectionChange");w=b.NotifyCollectionChangedAction=function(){};w.prototype={add:0,remove:1,reset:2};w.registerEnum("Sys.NotifyCollectionChangedAction");w=b.NotifyCollectionChangedEventArgs=function(a){this._changes=a;b.NotifyCollectionChangedEventArgs.initializeBase(this)};w.prototype={get_changes:function(){return this._changes||[]}};w.registerClass("Sys.NotifyCollectionChangedEventArgs",b.EventArgs);w=b.Observer=function(){};w.registerClass("Sys.Observer");w.makeObservable=function(a){var d=a instanceof Array,c=b.Observer;if(a.setValue===c._observeMethods.setValue)return a;c._addMethods(a,c._observeMethods);d&&c._addMethods(a,c._arrayMethods);return a};w._addMethods=function(c,a){for(var b in a)c[b]=a[b]};w._addEventHandler=function(e,a,d){b.Observer._getContext(e,c).events._addHandler(a,d)};w.addEventHandler=function(d,a,c){b.Observer._addEventHandler(d,a,c)};w._removeEventHandler=function(e,a,d){b.Observer._getContext(e,c).events._removeHandler(a,d)};w.removeEventHandler=function(d,a,c){b.Observer._removeEventHandler(d,a,c)};w.clearEventHandlers=function(d,a){b.Observer._getContext(d,c).events._removeHandlers(a)};w.raiseEvent=function(c,f,e){var d=b.Observer._getContext(c);if(!d)return;var a=d.events.getHandler(f);a&&a(c,e||b.EventArgs.Empty)};w.addPropertyChanged=function(c,a){b.Observer._addEventHandler(c,C,a)};w.removePropertyChanged=function(c,a){b.Observer._removeEventHandler(c,C,a)};w.beginUpdate=function(a){b.Observer._getContext(a,c).updating=c};w.endUpdate=function(e){var c=b.Observer._getContext(e);if(!c||!c.updating)return;c.updating=d;var g=c.dirty;c.dirty=d;if(g){if(e instanceof Array){var f=c.changes;c.changes=a;b.Observer.raiseCollectionChanged(e,f)}b.Observer.raisePropertyChanged(e,x)}};w.isUpdating=function(c){var a=b.Observer._getContext(c);return a?a.updating:d};w._setValue=function(d,o,l){for(var g,v,p=d,j=o.split(i),n=0,r=j.length-1;n<r;n++){var q=j[n];g=d[X+q];if(typeof g===f)d=g.call(d);else d=d[q];var s=typeof d;if(d===a||s===e)throw Error.invalidOperation(String.format(b.Res.nullReferenceInPath,o));}var k,h=j[r];g=d[X+h];if(typeof g===f)k=g.call(d);else k=d[h];u(d,t+h,l)||(d[h]=l);if(k!==l){var m=b.Observer._getContext(p);if(m&&m.updating){m.dirty=c;return}b.Observer.raisePropertyChanged(p,j[0])}};w.setValue=function(c,a,d){b.Observer._setValue(c,a,d)};w.raisePropertyChanged=function(c,a){b.Observer.raiseEvent(c,C,new b.PropertyChangedEventArgs(a))};w.addCollectionChanged=function(c,a){b.Observer._addEventHandler(c,J,a)};w.removeCollectionChanged=function(c,a){b.Observer._removeEventHandler(c,J,a)};w._collectionChange=function(e,d){var a=this._getContext(e);if(a&&a.updating){a.dirty=c;var b=a.changes;if(!b)a.changes=b=[d];else b.push(d)}else{this.raiseCollectionChanged(e,[d]);this.raisePropertyChanged(e,"length")}};w.add=function(a,c){var d=new b.CollectionChange(b.NotifyCollectionChangedAction.add,[c],a.length);Array.add(a,c);b.Observer._collectionChange(a,d)};w.addRange=function(a,c){var d=new b.CollectionChange(b.NotifyCollectionChangedAction.add,c,a.length);Array.addRange(a,c);b.Observer._collectionChange(a,d)};w.clear=function(c){var d=Array.clone(c);Array.clear(c);b.Observer._collectionChange(c,new b.CollectionChange(b.NotifyCollectionChangedAction.reset,a,y,d,0))};w.insert=function(a,c,d){Array.insert(a,c,d);b.Observer._collectionChange(a,new b.CollectionChange(b.NotifyCollectionChangedAction.add,[d],c))};w.remove=function(e,f){var g=Array.indexOf(e,f);if(g!==y){Array.remove(e,f);b.Observer._collectionChange(e,new b.CollectionChange(b.NotifyCollectionChangedAction.remove,a,y,[f],g));return c}return d};w.removeAt=function(d,c){if(c>y&&c<d.length){var e=d[c];Array.removeAt(d,c);b.Observer._collectionChange(d,new b.CollectionChange(b.NotifyCollectionChangedAction.remove,a,y,[e],c))}};w.raiseCollectionChanged=function(c,a){b.Observer.raiseEvent(c,J,new b.NotifyCollectionChangedEventArgs(a))};w._observeMethods={add_propertyChanged:function(a){b.Observer._addEventHandler(this,C,a)},remove_propertyChanged:function(a){b.Observer._removeEventHandler(this,C,a)},addEventHandler:function(a,c){b.Observer._addEventHandler(this,a,c)},removeEventHandler:function(a,c){b.Observer._removeEventHandler(this,a,c)},clearEventHandlers:function(a){b.Observer._getContext(this,c).events._removeHandlers(a)},get_isUpdating:function(){return b.Observer.isUpdating(this)},beginUpdate:function(){b.Observer.beginUpdate(this)},endUpdate:function(){b.Observer.endUpdate(this)},setValue:function(c,a){b.Observer._setValue(this,c,a)},raiseEvent:function(d,c){b.Observer.raiseEvent(this,d,c||a)},raisePropertyChanged:function(a){b.Observer.raiseEvent(this,C,new b.PropertyChangedEventArgs(a))}};w._arrayMethods={add_collectionChanged:function(a){b.Observer._addEventHandler(this,J,a)},remove_collectionChanged:function(a){b.Observer._removeEventHandler(this,J,a)},add:function(a){b.Observer.add(this,a)},addRange:function(a){b.Observer.addRange(this,a)},clear:function(){b.Observer.clear(this)},insert:function(a,c){b.Observer.insert(this,a,c)},remove:function(a){return b.Observer.remove(this,a)},removeAt:function(a){b.Observer.removeAt(this,a)},raiseCollectionChanged:function(a){b.Observer.raiseEvent(this,J,new b.NotifyCollectionChangedEventArgs(a))}};w._getContext=function(c,d){var b=c._observerContext;return b?b():d?(c._observerContext=this._createContext())():a};w._createContext=function(){var a={events:new b.EventHandlerList};return function(){return a}};function N(a,c,b){return a<c||a>b}function Kb(c,a){var d=new Date,e=yb(d);if(a<B){var b=Ab(d,c,e);a+=b-b%B;if(a>c.Calendar.TwoDigitYearMax)a-=B}return a}function yb(f,d){if(!d)return 0;for(var c,e=f.getTime(),b=0,g=d.length;b<g;b+=4){c=d[b+2];if(c===a||e>=c)return b}return 0}function Ab(d,b,e,c){var a=d.getFullYear();if(!c&&b.eras)a-=b.eras[e+3];return a}b._appendPreOrPostMatch=function(f,b){for(var e=0,a=d,c=0,h=f.length;c<h;c++){var g=f.charAt(c);switch(g){case"'":if(a)b.push("'");else e++;a=d;break;case"\\":a&&b.push("\\");a=!a;break;default:b.push(g);a=d}}return e};w=Date;w._expandFormat=function(a,c){c=c||"F";var d=c.length;if(d===1)switch(c){case"d":return a.ShortDatePattern;case"D":return a.LongDatePattern;case"t":return a.ShortTimePattern;case"T":return a.LongTimePattern;case"f":return a.LongDatePattern+h+a.ShortTimePattern;case"F":return a.FullDateTimePattern;case"M":case"m":return a.MonthDayPattern;case"s":return a.SortableDateTimePattern;case"Y":case"y":return a.YearMonthPattern;default:throw Error.format(b.Res.formatInvalidString);}else if(d===2&&c.charAt(0)==="%")c=c.charAt(1);return c};w._getParseRegExp=function(g,i){var h=g._parseRegExp;if(!h)g._parseRegExp=h={};else{var n=h[i];if(n)return n}var e=Date._expandFormat(g,i);e=e.replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1");var d=["^"],p=[],j=0,m=0,l=Date._getTokenRegExp(),f;while((f=l.exec(e))!==a){var s=e.slice(j,f.index);j=l.lastIndex;m+=b._appendPreOrPostMatch(s,d);if(m%2){d.push(f[0]);continue}var q=f[0],t=q.length,c;switch(q){case Y:case"ddd":case Z:case"MMM":case"gg":case"g":c="(\\D+)";break;case"tt":case"t":c="(\\D*)";break;case ab:case"fff":case"ff":case"f":c="(\\d{"+t+"})";break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":c="(\\d\\d?)";break;case"zzz":c="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":c="([+-]?\\d\\d?)";break;case D:c="(\\"+g.DateSeparator+")"}c&&d.push(c);p.push(f[0])}b._appendPreOrPostMatch(e.slice(j),d);d.push(o);var r=d.join(x).replace(/\s+/g,"\\s+"),k={regExp:r,groups:p};h[i]=k;return k};w._getTokenRegExp=function(){return/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g};w.parseLocale=function(a){return Date._parse(a,b.CultureInfo.CurrentCulture,arguments)};w.parseInvariant=function(a){return Date._parse(a,b.CultureInfo.InvariantCulture,arguments)};w._parse=function(k,g,l){var b,f,e,i,h,j=d;for(b=1,f=l.length;b<f;b++){i=l[b];if(i){j=c;e=Date._parseExact(k,i,g);if(e)return e}}if(!j){h=g._getDateTimeFormats();for(b=0,f=h.length;b<f;b++){e=Date._parseExact(k,h[b],g);if(e)return e}}return a};w._parseExact=function(w,J,s){w=w.trim();var e=s.dateTimeFormat,F=this._getParseRegExp(e,J),I=(new RegExp(F.regExp)).exec(w);if(I===a)return a;for(var H=F.groups,y=a,j=a,h=a,i=a,p=a,f=0,k,z=0,A=0,x=0,l=a,v=d,r=0,K=H.length;r<K;r++){var g=I[r+1];if(g){var G=H[r],m=G.length,c=parseInt(g,10);switch(G){case"dd":case"d":i=c;if(N(i,1,31))return a;break;case"MMM":case Z:h=s._getMonthIndex(g,m===3);if(N(h,0,11))return a;break;case"M":case"MM":h=c-1;if(N(h,0,11))return a;break;case"y":case"yy":case ab:j=m<4?Kb(e,c):c;if(N(j,0,9999))return a;break;case"h":case"hh":f=c;if(f===12)f=0;if(N(f,0,11))return a;break;case"H":case"HH":f=c;if(N(f,0,23))return a;break;case"m":case"mm":z=c;if(N(z,0,59))return a;break;case"s":case"ss":A=c;if(N(A,0,59))return a;break;case"tt":case"t":var D=g.toUpperCase();v=D===e.PMDesignator.toUpperCase();if(!v&&D!==e.AMDesignator.toUpperCase())return a;break;case"f":case"ff":case"fff":x=c*Math.pow(10,3-m);if(N(x,0,999))return a;break;case"ddd":case Y:p=s._getDayIndex(g,m===3);if(N(p,0,6))return a;break;case"zzz":var u=g.split(/:/);if(u.length!==2)return a;k=parseInt(u[0],10);if(N(k,-12,13))return a;var t=parseInt(u[1],10);if(N(t,0,59))return a;l=k*60+(g.startsWith(E)?-t:t);break;case"z":case"zz":k=c;if(N(k,-12,13))return a;l=k*60;break;case"g":case"gg":var o=g;if(!o||!e.eras)return a;o=o.toLowerCase().trim();for(var q=0,L=e.eras.length;q<L;q+=4)if(o===e.eras[q+1].toLowerCase()){y=q;break}if(y===a)return a}}}var b=new Date,C,n=e.Calendar.convert;C=n?n.fromGregorian(b)[0]:b.getFullYear();if(j===a)j=C;else if(e.eras)j+=e.eras[(y||0)+3];if(h===a)h=0;if(i===a)i=1;if(n){b=n.toGregorian(j,h,i);if(b===a)return a}else{b.setFullYear(j,h,i);if(b.getDate()!==i)return a;if(p!==a&&b.getDay()!==p)return a}if(v&&f<12)f+=12;b.setHours(f,z,A,x);if(l!==a){var B=b.getMinutes()-(l+b.getTimezoneOffset());b.setHours(b.getHours()+parseInt(B/60,10),B%60)}return b};z=w.prototype;z.format=function(a){return this._toFormattedString(a,b.CultureInfo.InvariantCulture)};z.localeFormat=function(a){return this._toFormattedString(a,b.CultureInfo.CurrentCulture)};z._toFormattedString=function(h,n){var d=this,e=n.dateTimeFormat,o=e.Calendar.convert;if(!h||!h.length||h==="i"){var a;if(n&&n.name.length)if(o)a=d._toFormattedString(e.FullDateTimePattern,n);else{var z=new Date(d.getTime()),K=yb(d,e.eras);z.setFullYear(Ab(d,e,K));a=z.toLocaleString()}else a=d.toString();return a}var A=e.eras,w=h==="s";h=Date._expandFormat(e,h);a=[];var i,J=["0","00","000"];function g(c,a){var b=c+x;return a>1&&b.length<a?(J[a-2]+b).substr(-a):b}var l,t,C=/([^d]|^)(d|dd)([^d]|$)/g;function G(){if(l||t)return l;l=C.test(h);t=c;return l}var v=0,s=Date._getTokenRegExp(),k;if(!w&&o)k=o.fromGregorian(d);for(;c;){var I=s.lastIndex,m=s.exec(h),F=h.slice(I,m?m.index:h.length);v+=b._appendPreOrPostMatch(F,a);if(!m)break;if(v%2){a.push(m[0]);continue}function p(a,b){if(k)return k[b];switch(b){case 0:return a.getFullYear();case 1:return a.getMonth();case 2:return a.getDate()}}var y=m[0],f=y.length;switch(y){case"ddd":case Y:q=f===3?e.AbbreviatedDayNames:e.DayNames;a.push(q[d.getDay()]);break;case"d":case"dd":l=c;a.push(g(p(d,2),f));break;case"MMM":case Z:var u=f===3?bb:x,r=e[u+rb],q=e[u+sb],j=p(d,1);a.push(r&&G()?r[j]:q[j]);break;case"M":case"MM":a.push(g(p(d,1)+1,f));break;case"y":case"yy":case ab:j=k?k[0]:Ab(d,e,yb(d,A),w);if(f<4)j=j%B;a.push(g(j,f));break;case"h":case"hh":i=d.getHours()%12;if(i===0)i=12;a.push(g(i,f));break;case"H":case"HH":a.push(g(d.getHours(),f));break;case"m":case"mm":a.push(g(d.getMinutes(),f));break;case"s":case"ss":a.push(g(d.getSeconds(),f));break;case"t":case"tt":j=d.getHours()<12?e.AMDesignator:e.PMDesignator;a.push(f===1?j.charAt(0):j);break;case"f":case"ff":case"fff":a.push(g(d.getMilliseconds(),3).substr(0,f));break;case"z":case"zz":i=d.getTimezoneOffset()/60;a.push((i<=0?H:E)+g(Math.floor(Math.abs(i)),f));break;case"zzz":i=d.getTimezoneOffset()/60;a.push((i<=0?H:E)+g(Math.floor(Math.abs(i)),2)+":"+g(Math.abs(d.getTimezoneOffset()%60),2));break;case"g":case"gg":e.eras&&a.push(e.eras[yb(d,A)+1]);break;case D:a.push(e.DateSeparator)}}return a.join(x)};String.localeFormat=function(){return String._toFormattedString(c,arguments)};var Hb={P:["Percent",["-n %","-n%","-%n"],["n %","n%","%n"],B],N:["Number",["(n)","-n","- n","n-","n -"],a,1],C:["Currency",["($n)","-$n","$-n","$n-","(n$)","-n$","n-$","n$-","-n $","-$ n","n $-","$ n-","$ -n","n- $","($ n)","(n $)"],["$n","n$","$ n","n $"],1]};b._toFormattedString=function(f,q){var j=this;if(!f||!f.length||f==="i")return q&&q.name.length?j.toLocaleString():j.toString();function n(a,c,d){for(var b=a.length;b<c;b++)a=d?"0"+a:a+"0";return a}function s(l,j,o,q,s){var k=o[0],m=1,r=Math.pow(10,j),p=Math.round(l*r)/r;if(!isFinite(p))p=l;l=p;var b=l+x,a=x,e,g=b.split(/e/i);b=g[0];e=g.length>1?parseInt(g[1]):0;g=b.split(i);b=g[0];a=g.length>1?g[1]:x;var t;if(e>0){a=n(a,e,d);b+=a.slice(0,e);a=a.substr(e)}else if(e<0){e=-e;b=n(b,e+1,c);a=b.slice(-e,b.length)+a;b=b.slice(0,-e)}if(j>0)a=s+(a.length>j?a.slice(0,j):n(a,j,d));else a=x;var f=b.length-1,h=x;while(f>=0){if(k===0||k>f)return b.slice(0,f+1)+(h.length?q+h+a:a);h=b.slice(f-k+1,f+1)+(h.length?q+h:x);f-=k;if(m<o.length){k=o[m];m++}}return b.slice(0,f+1)+q+h+a}var a=q.numberFormat,g=Math.abs(j);f=f||"D";var h=y;if(f.length>1)h=parseInt(f.slice(1),10);var m,e=f.charAt(0).toUpperCase();switch(e){case"D":m="n";if(h!==y)g=n(x+g,h,c);if(j<0)g=-g;break;case"C":case"N":case"P":e=Hb[e];var k=e[0];m=j<0?e[1][a[k+"NegativePattern"]]:e[2]?e[2][a[k+"PositivePattern"]]:"n";if(h===y)h=a[k+"DecimalDigits"];g=s(Math.abs(j)*e[3],h,a[k+"GroupSizes"],a[k+"GroupSeparator"],a[k+"DecimalSeparator"]);break;default:throw Error.format(b.Res.formatBadFormatSpecifier);}for(var r=/n|\$|-|%/g,l=x;c;){var t=r.lastIndex,p=r.exec(m);l+=m.slice(t,p?p.index:m.length);if(!p)break;switch(p[0]){case"n":l+=g;break;case o:l+=a.CurrencySymbol;break;case E:if(/[1-9]/.test(g))l+=a.NegativeSign;break;case"%":l+=a.PercentSymbol}}return l};w=Number;w.parseLocale=function(a){return Number._parse(a,b.CultureInfo.CurrentCulture)};w.parseInvariant=function(a){return Number._parse(a,b.CultureInfo.InvariantCulture)};w._parse=function(b,t){b=b.trim();if(b.match(/^[+-]?infinity$/i))return parseFloat(b);if(b.match(/^0x[a-f0-9]+$/i))return parseInt(b);var c=t.numberFormat,j=Number._parseNumberNegativePattern(b,c,c.NumberNegativePattern),k=j[0],f=j[1];if(k===x&&c.NumberNegativePattern!==1){j=Number._parseNumberNegativePattern(b,c,1);k=j[0];f=j[1]}if(k===x)k=H;var m,e,g=f.indexOf("e");if(g<0)g=f.indexOf("E");if(g<0){e=f;m=a}else{e=f.substr(0,g);m=f.substr(g+1)}var d,n,s=c.NumberDecimalSeparator,q=e.indexOf(s);if(q<0){d=e;n=a}else{d=e.substr(0,q);n=e.substr(q+s.length)}var p=c.NumberGroupSeparator;d=d.split(p).join(x);var r=p.replace(/\u00A0/g,h);if(p!==r)d=d.split(r).join(x);var o=k+d;if(n!==a)o+=i+n;if(m!==a){var l=Number._parseNumberNegativePattern(m,c,1);if(l[0]===x)l[0]=H;o+="e"+l[0]+l[1]}return o.match(/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/)?parseFloat(o):Number.NaN};w._parseNumberNegativePattern=function(a,d,e){var b=d.NegativeSign,c=d.PositiveSign;switch(e){case 4:b=h+b;c=h+c;case 3:if(a.endsWith(b))return[E,a.substr(0,a.length-b.length)];else if(a.endsWith(c))return[H,a.substr(0,a.length-c.length)];break;case 2:b+=h;c+=h;case 1:if(a.startsWith(b))return[E,a.substr(b.length)];else if(a.startsWith(c))return[H,a.substr(c.length)];break;case 0:if(a.startsWith("(")&&a.endsWith(")"))return[E,a.substr(1,a.length-2)]}return[x,a]};z=w.prototype;z.format=function(a){return b._toFormattedString.call(this,a,b.CultureInfo.InvariantCulture)};z.localeFormat=function(a){return b._toFormattedString.call(this,a,b.CultureInfo.CurrentCulture)};function Cb(a){return a.split(" ").join(h).toUpperCase()}function zb(b){var a=[];q(b,function(b,c){a[c]=Cb(b)});return a}function Eb(c){var b={};v(c,function(c,d){b[d]=c instanceof Array?c.length===1?[c]:Array.apply(a,c):typeof c===p?Eb(c):c});return b}w=b.CultureInfo=function(c,b,a){this.name=c;this.numberFormat=b;this.dateTimeFormat=a};w.prototype={_getDateTimeFormats:function(){var b=this._dateTimeFormats;if(!b){var a=this.dateTimeFormat;this._dateTimeFormats=b=[a.MonthDayPattern,a.YearMonthPattern,a.ShortDatePattern,a.ShortTimePattern,a.LongDatePattern,a.LongTimePattern,a.FullDateTimePattern,a.RFC1123Pattern,a.SortableDateTimePattern,a.UniversalSortableDateTimePattern]}return b},_getMonthIndex:function(b,g){var a=this,c=g?"_upperAbbrMonths":"_upperMonths",e=c+"Genitive",h=a[c];if(!h){var f=g?bb:x;a[c]=zb(a.dateTimeFormat[f+sb]);a[e]=zb(a.dateTimeFormat[f+rb])}b=Cb(b);var d=vb(a[c],b);if(d<0)d=vb(a[e],b);return d},_getDayIndex:function(e,c){var a=this,b=c?"_upperAbbrDays":"_upperDays",d=a[b];if(!d)a[b]=zb(a.dateTimeFormat[(c?bb:x)+"DayNames"]);return vb(a[b],Cb(e))}};w.registerClass("Sys.CultureInfo");w._parse=function(a){var c=a.dateTimeFormat;if(c&&!c.eras)c.eras=a.eras;return new b.CultureInfo(a.name,a.numberFormat,c)};w._setup=function(){var c=this,b=g.__cultureInfo,f=["January","February","March","April","May","June","July","August","September","October","November","December",x],e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",x],h={name:x,numberFormat:{CurrencyDecimalDigits:2,CurrencyDecimalSeparator:i,CurrencyGroupSizes:[3],NumberGroupSizes:[3],PercentGroupSizes:[3],CurrencyGroupSeparator:G,CurrencySymbol:"¤",NaNSymbol:"NaN",CurrencyNegativePattern:0,NumberNegativePattern:1,PercentPositivePattern:0,PercentNegativePattern:0,NegativeInfinitySymbol:"-Infinity",NegativeSign:E,NumberDecimalDigits:2,NumberDecimalSeparator:i,NumberGroupSeparator:G,CurrencyPositivePattern:0,PositiveInfinitySymbol:"Infinity",PositiveSign:H,PercentDecimalDigits:2,PercentDecimalSeparator:i,PercentGroupSeparator:G,PercentSymbol:"%",PerMilleSymbol:"‰",NativeDigits:["0","1","2","3","4","5","6","7","8","9"],DigitSubstitution:1},dateTimeFormat:{AMDesignator:"AM",Calendar:{MinSupportedDateTime:"@-62135568000000@",MaxSupportedDateTime:"@253402300799999@",AlgorithmType:1,CalendarType:1,Eras:[1],TwoDigitYearMax:2029},DateSeparator:D,FirstDayOfWeek:0,CalendarWeekRule:0,FullDateTimePattern:"dddd, dd MMMM yyyy HH:mm:ss",LongDatePattern:"dddd, dd MMMM yyyy",LongTimePattern:"HH:mm:ss",MonthDayPattern:"MMMM dd",PMDesignator:"PM",RFC1123Pattern:"ddd, dd MMM yyyy HH':'mm':'ss 'GMT'",ShortDatePattern:"MM/dd/yyyy",ShortTimePattern:"HH:mm",SortableDateTimePattern:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",TimeSeparator:":",UniversalSortableDateTimePattern:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",YearMonthPattern:"yyyy MMMM",AbbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ShortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],DayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],AbbreviatedMonthNames:e,MonthNames:f,NativeCalendarName:"Gregorian Calendar",AbbreviatedMonthGenitiveNames:Array.clone(e),MonthGenitiveNames:Array.clone(f)},eras:[1,"A.D.",a,0]};c.InvariantCulture=c._parse(h);switch(typeof b){case k:b=g.eval("("+b+")");case p:c.CurrentCulture=c._parse(b);delete __cultureInfo;break;default:b=Eb(h);b.name="en-US";b.numberFormat.CurrencySymbol=o;var d=b.dateTimeFormat;d.FullDatePattern="dddd, MMMM dd, yyyy h:mm:ss tt";d.LongDatePattern="dddd, MMMM dd, yyyy";d.LongTimePattern="h:mm:ss tt";d.ShortDatePattern="M/d/yyyy";d.ShortTimePattern="h:mm tt";d.YearMonthPattern="MMMM, yyyy";c.CurrentCulture=c._parse(b)}};w._setup();Type.registerNamespace("Sys.Serialization");w=b.Serialization.JavaScriptSerializer=function(){};w.registerClass("Sys.Serialization.JavaScriptSerializer");w._esc={charsRegExs:{'"':/\"/g,"\\":/\\/g},chars:["\\",'"'],dateRegEx:/(^|[^\\])\"\\\/Date\((-?[0-9]+)(?:[a-zA-Z]|(?:\+|-)[0-9]{4})?\)\\\/\"/g,escapeChars:{"\\":"\\\\",'"':'\\"',"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r"},escapeRegExG:/[\"\\\x00-\x1F]/g,escapeRegEx:/[\"\\\x00-\x1F]/i,jsonRegEx:/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/g,jsonStringRegEx:/\"(\\.|[^\"\\])*\"/g};w._init=function(){for(var d=this._esc,g=d.chars,f=d.charsRegExs,e=d.escapeChars,b=0;b<32;b++){var a=String.fromCharCode(b);g[b+2]=a;f[a]=new RegExp(a,"g");e[a]=e[a]||"\\u"+("000"+b.toString(16)).slice(-4)}this._load=c};w._serializeNumberWithBuilder=function(a,c){if(!isFinite(a))throw Error.invalidOperation(b.Res.cannotSerializeNonFiniteNumbers);c.append(String(a))};w._serializeStringWithBuilder=function(a,e){e.append('"');var b=this._esc;if(b.escapeRegEx.test(a)){!this._load&&this._init();if(a.length<128)a=a.replace(b.escapeRegExG,function(a){return b.escapeChars[a]});else for(var d=0;d<34;d++){var c=b.chars[d];if(a.indexOf(c)!==y){var f=b.escapeChars[c];a=kb("Opera")||kb(U)?a.split(c).join(f):a.replace(b.charsRegExs[c],f)}}}e.append(a).append('"')};w._serializeWithBuilder=function(b,a,q,n){var h=this,g;switch(typeof b){case p:if(b)if(Number.isInstanceOfType(b))h._serializeNumberWithBuilder(b,a);else if(Boolean.isInstanceOfType(b))a.append(b);else if(String.isInstanceOfType(b))h._serializeStringWithBuilder(b,a);else if(b instanceof Array){a.append("[");for(g=0;g<b.length;++g){g&&a.append(G);h._serializeWithBuilder(b[g],a,d,n)}a.append("]")}else{if(Date.isInstanceOfType(b)){a.append('"\\/Date(').append(b.getTime()).append(')\\/"');break}var i=[],l=0;for(var m in b)if(m.charAt(0)!==o)if(m==="__type"&&l){i[l++]=i[0];i[0]=m}else i[l++]=m;q&&i.sort();a.append("{");var r;for(g=0;g<l;g++){var t=i[g],s=b[t],u=typeof s;if(u!==e&&u!==f){r&&a.append(G);h._serializeWithBuilder(t,a,q,n);a.append(":");h._serializeWithBuilder(s,a,q,n);r=c}}a.append("}")}else a.append(W);break;case j:h._serializeNumberWithBuilder(b,a);break;case k:h._serializeStringWithBuilder(b,a);break;case"boolean":a.append(b);break;default:a.append(W)}};w.serialize=function(c){var a=new b.StringBuilder;b.Serialization.JavaScriptSerializer._serializeWithBuilder(c,a,d);return a.toString()};w.deserialize=function(d,f){if(!d.length)throw Error.argument("data",b.Res.cannotDeserializeEmptyString);var h,c=b.Serialization.JavaScriptSerializer._esc;try{var e=d.replace(c.dateRegEx,"$1new Date($2)");if(f&&c.jsonRegEx.test(e.replace(c.jsonStringRegEx,x)))throw a;return g.eval("("+e+")")}catch(h){throw Error.argument("data",b.Res.cannotDeserializeInvalidJson);}};Type.registerNamespace("Sys.UI");w=b.EventHandlerList=function(){this._list={}};w.prototype={_addHandler:function(b,a){Array.add(this._getEvent(b,c),a)},addHandler:function(b,a){this._addHandler(b,a)},_removeHandler:function(c,b){var a=this._getEvent(c);if(!a)return;Array.remove(a,b)},_removeHandlers:function(b){if(!b)this._list={};else{var a=this._getEvent(b);if(!a)return;a.length=0}},removeHandler:function(b,a){this._removeHandler(b,a)},getHandler:function(c){var b=this._getEvent(c);if(!b||!b.length)return a;b=Array.clone(b);return function(c,d){for(var a=0,e=b.length;a<e;a++)b[a](c,d)}},_getEvent:function(c,d){var b=this._list[c];if(!b){if(!d)return a;this._list[c]=b=[]}return b}};w.registerClass("Sys.EventHandlerList");w=b.CommandEventArgs=function(f,c,d,e){var a=this;b.CommandEventArgs.initializeBase(a);a._commandName=f;a._commandArgument=c;a._commandSource=d;a._commandEvent=e};w.prototype={get_commandName:function(){return this._commandName||a},get_commandArgument:function(){return this._commandArgument},get_commandSource:function(){return this._commandSource||a},get_commandEvent:function(){return this._commandEvent||a}};w.registerClass("Sys.CommandEventArgs",b.CancelEventArgs);w=b.INotifyPropertyChange=function(){};w.registerInterface("Sys.INotifyPropertyChange");w=b.PropertyChangedEventArgs=function(a){b.PropertyChangedEventArgs.initializeBase(this);this._propertyName=a};w.prototype={get_propertyName:function(){return this._propertyName}};w.registerClass("Sys.PropertyChangedEventArgs",b.EventArgs);w=b.INotifyDisposing=function(){};w.registerInterface("Sys.INotifyDisposing");w=b.Component=function(){b.Application&&b.Application.registerDisposableObject(this)};w.prototype={get_events:function(){return b.Observer._getContext(this,c).events},get_id:function(){return this._id||a},set_id:function(a){this._id=a},get_isInitialized:function(){return!!this._initialized},get_isUpdating:function(){return!!this._updating},add_disposing:function(a){this._addHandler(cb,a)},remove_disposing:function(a){this._removeHandler(cb,a)},add_propertyChanged:function(a){this._addHandler(C,a)},remove_propertyChanged:function(a){this._removeHandler(C,a)},_addHandler:function(a,c){b.Observer.addEventHandler(this,a,c)},_removeHandler:function(a,c){b.Observer.removeEventHandler(this,a,c)},beginUpdate:function(){this._updating=c},dispose:function(){var a=this;b.Observer.raiseEvent(a,cb);b.Observer.clearEventHandlers(a);b.Application.unregisterDisposableObject(a);b.Application.removeComponent(a)},endUpdate:function(){var a=this;a._updating=d;!a._initialized&&a.initialize();a.updated()},initialize:function(){this._initialized=c},raisePropertyChanged:function(a){b.Observer.raisePropertyChanged(this,a)},updated:function(){}};w.registerClass("Sys.Component",a,b.IDisposable,b.INotifyPropertyChange,b.INotifyDisposing);w._setProperties=function(c,l){var e,m=Object.getType(c),h=m===Object||m===b.UI.DomElement,k=b.Component.isInstanceOfType(c)&&!c.get_isUpdating();k&&c.beginUpdate();for(var g in l){var d=l[g],i=h?a:c[X+g];if(h||typeof i!==f){var n=c[g];if(!d||typeof d!==p||h&&!n)c[g]=d;else this._setProperties(n,d)}else{var o=c[t+g];if(typeof o===f)o.apply(c,[d]);else if(d instanceof Array){e=i.apply(c);for(var j=0,q=e.length,r=d.length;j<r;j++,q++)e[q]=d[j]}else if(typeof d===p&&Object.getType(d)===Object){e=i.apply(c);this._setProperties(e,d)}}}k&&c.endUpdate()};w._setReferences=function(e,d){var a,c={};v(d,function(d,e){c[e]=a=$find(d);if(!a)throw Error.invalidOperation(String.format(b.Res.referenceNotFound,d));});b._set(e,c)};$create=w.create=function(g,d,c,h,e){var a=e?new g(e):new g;u(a,lb);d&&b.Component._setProperties(a,d);if(c)for(var f in c)a["add_"+f](c[f]);b.Component._register(a,h);return a};w._register=function(a,d,f){var g;if(b.Component.isInstanceOfType(a)){g=c;var e=b.Application;a.get_id()&&e.addComponent(a);if(e.get_isCreatingComponents()){e._createdComponents.push(a);if(d)e._addComponentToSecondPass(a,d);else!f&&a.endUpdate()}else{d&&b.Component._setReferences(a,d);!f&&a.endUpdate()}}return g};b._getComponent=function(d,c){var a=b.Application.findComponent(c);a&&d.push(a)};b._2Pass=function(d){var a=b.Application,c=!a.get_isCreatingComponents();c&&a.beginCreateComponents();q(d,function(a){a()});c&&a.endCreateComponents()};w=b.UI.MouseButton=function(){};w.prototype={leftButton:0,middleButton:1,rightButton:2};w.registerEnum("Sys.UI.MouseButton");w=b.UI.Key=function(){};w.prototype={backspace:8,tab:9,enter:13,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,del:127};w.registerEnum("Sys.UI.Key");w=b.UI.Point=function(a,b){this.x=a;this.y=b};w.registerClass("Sys.UI.Point");w=b.UI.Bounds=function(d,e,c,b){var a=this;a.x=d;a.y=e;a.height=b;a.width=c};w.registerClass("Sys.UI.Bounds");w=b.UI.DomEvent=function(h){var c=this,a=h,d=c.type=a.type.toLowerCase();c.rawEvent=a;c.altKey=a.altKey;if(typeof a.button!==e)c.button=typeof a.which!==e?a.button:a.button===4?b.UI.MouseButton.middleButton:a.button===2?b.UI.MouseButton.rightButton:b.UI.MouseButton.leftButton;if(d==="keypress")c.charCode=a.charCode||a.keyCode;else if(a.keyCode&&a.keyCode===46)c.keyCode=127;else c.keyCode=a.keyCode;c.clientX=a.clientX;c.clientY=a.clientY;c.ctrlKey=a.ctrlKey;c.target=a.target||a.srcElement;if(!d.startsWith("key"))if(typeof a.offsetX!==e&&typeof a.offsetY!==e){c.offsetX=a.offsetX;c.offsetY=a.offsetY}else if(c.target&&c.target.nodeType!==3&&typeof a.clientX===j){var f=b.UI.DomElement.getLocation(c.target),g=b.UI.DomElement._getWindow(c.target);c.offsetX=(g.pageXOffset||0)+a.clientX-f.x;c.offsetY=(g.pageYOffset||0)+a.clientY-f.y}c.screenX=a.screenX;c.screenY=a.screenY;c.shiftKey=a.shiftKey};w.prototype={preventDefault:function(){var a=this.rawEvent;if(a.preventDefault)a.preventDefault();else if(g.event)a.returnValue=d},stopPropagation:function(){var a=this.rawEvent;if(a.stopPropagation)a.stopPropagation();else if(g.event)a.cancelBubble=c}};w.registerClass("Sys.UI.DomEvent");$addHandler=w.addHandler=function(f,a,c,e){b.query(f).each(function(){var f=this,i=f.nodeType;if(i===3||i===2||i===8)return;if(!f._events)f._events={};var h=f._events[a];if(!h)f._events[a]=h=[];var j=f,g;if(f.addEventListener){g=function(a){return c.call(j,new b.UI.DomEvent(a))};f.addEventListener(a,g,d)}else if(f.attachEvent){g=function(){var d,a={};try{a=b.UI.DomElement._getWindow(j).event}catch(d){}return c.call(j,new b.UI.DomEvent(a))};f.attachEvent(r+a,g)}h.push({handler:c,browserHandler:g,autoRemove:e});e&&b.UI.DomElement._onDispose(f,b.UI.DomEvent._disposeHandlers)})};b.registerPlugin({name:"addHandler",dom:c,plugin:function(c,d,a){b.UI.DomEvent.addHandler(this.get(),c,d,a);return this}});$addHandlers=w.addHandlers=function(f,c,a,e){b.query(f).each(function(){var b=this.nodeType;if(b===3||b===2||b===8)return;for(var g in c){var f=c[g];if(a)f=Function.createDelegate(a,f);$addHandler(this,g,f,e||d)}})};b.registerPlugin({name:"addHandlers",dom:c,plugin:function(d,a,c){b.UI.DomEvent.addHandlers(this.get(),d,a,c);return this}});$clearHandlers=w.clearHandlers=function(a){b.query(a).each(function(){var a=this.nodeType;if(a===3||a===2||a===8)return;b.UI.DomEvent._clearHandlers(this,d)})};b.registerPlugin({name:"clearHandlers",dom:c,plugin:function(){b.UI.DomEvent.clearHandlers(this.get());return this}});w._clearHandlers=function(c,a){b.query(c).each(function(){var b=this.nodeType;if(b===3||b===2||b===8)return;var c=this._events;if(c)for(var g in c)for(var e=c[g],d=e.length-1;d>=0;d--){var f=e[d];(!a||f.autoRemove)&&$removeHandler(this,g,f.handler)}})};w._disposeHandlers=function(){b.UI.DomEvent._clearHandlers(this,c)};$removeHandler=w.removeHandler=function(c,a,d){b.UI.DomEvent._removeHandler(c,a,d)};w._removeHandler=function(e,c,f){b.query(e).each(function(){var b=this,i=b.nodeType;if(i===3||i===2||i===8)return;for(var h=a,g=b._events[c],e=0,j=g.length;e<j;e++)if(g[e].handler===f){h=g[e].browserHandler;break}if(b.removeEventListener)b.removeEventListener(c,h,d);else b.detachEvent&&b.detachEvent(r+c,h);g.splice(e,1)})};b.registerPlugin({name:"removeHandler",dom:c,plugin:function(a,c){b.UI.DomEvent.removeHandler(this.get(),a,c);return this}});w=b.UI.DomElement=function(){};w.registerClass("Sys.UI.DomElement");w.addCssClass=function(a,c){if(!b.UI.DomElement.containsCssClass(a,c))if(a.className===x)a.className=c;else a.className+=h+c};w.containsCssClass=function(b,a){return Array.contains(b.className.split(h),a)};w.getBounds=function(a){var c=b.UI.DomElement.getLocation(a);return new b.UI.Bounds(c.x,c.y,a.offsetWidth||0,a.offsetHeight||0)};$get=w.getElementById=function(d,c){return b.get(n+d,c||a)};if(document.documentElement.getBoundingClientRect)w.getLocation=function(d){if(d.self||d.nodeType===9||d===document.documentElement||d.parentNode===d.ownerDocument.documentElement)return new b.UI.Point(0,0);var j=d.getBoundingClientRect();if(!j)return new b.UI.Point(0,0);var n,e=d.ownerDocument,i=e.documentElement,f=Math.round(j.left)+(i.scrollLeft||(e.body?e.body.scrollLeft:0)),g=Math.round(j.top)+(i.scrollTop||(e.body?e.body.scrollTop:0));if(kb(db)){try{var h=d.ownerDocument.parentWindow.frameElement||a;if(h){h=h.frameBorder;var k=h==="0"||h==="no"?2:0;f+=k;g+=k}}catch(n){}if(b.Browser.version===7&&!document.documentMode){var l=document.body,m=l.getBoundingClientRect(),c=(m.right-m.left)/l.clientWidth;c=Math.round(c*B);c=(c-c%5)/B;if(!isNaN(c)&&c!==1){f=Math.round(f/c);g=Math.round(g/c)}}if((document.documentMode||0)<8){f-=i.clientLeft;g-=i.clientTop}}return new b.UI.Point(f,g)};else if(kb("Safari"))w.getLocation=function(e){if(e.window&&e.window===e||e.nodeType===9)return new b.UI.Point(0,0);for(var f=0,g=0,k=a,i=a,d,c=e;c;k=c,i=d,c=c.offsetParent){d=b.UI.DomElement._getCurrentStyle(c);var h=c.tagName?c.tagName.toUpperCase():a;if((c.offsetLeft||c.offsetTop)&&(h!==O||(!i||i.position!==I))){f+=c.offsetLeft;g+=c.offsetTop}if(k&&b.Browser.version>=3){f+=parseInt(d.borderLeftWidth);g+=parseInt(d.borderTopWidth)}}d=b.UI.DomElement._getCurrentStyle(e);var l=d?d.position:a;if(l!==I)for(c=e.parentNode;c;c=c.parentNode){h=c.tagName?c.tagName.toUpperCase():a;if(h!==O&&h!==eb&&(c.scrollLeft||c.scrollTop)){f-=c.scrollLeft||0;g-=c.scrollTop||0}d=b.UI.DomElement._getCurrentStyle(c);var j=d?d.position:a;if(j&&j===I)break}return new b.UI.Point(f,g)};else w.getLocation=function(f){if(f.window&&f.window===f||f.nodeType===9)return new b.UI.Point(0,0);for(var g=0,h=0,j=a,i=a,d=a,c=f;c;j=c,i=d,c=c.offsetParent){var e=c.tagName?c.tagName.toUpperCase():a;d=b.UI.DomElement._getCurrentStyle(c);if((c.offsetLeft||c.offsetTop)&&!(e===O&&(!i||i.position!==I))){g+=c.offsetLeft;h+=c.offsetTop}if(j!==a&&d){if(e!=="TABLE"&&e!=="TD"&&e!==eb){g+=parseInt(d.borderLeftWidth)||0;h+=parseInt(d.borderTopWidth)||0}if(e==="TABLE"&&(d.position==="relative"||d.position===I)){g+=parseInt(d.marginLeft)||0;h+=parseInt(d.marginTop)||0}}}d=b.UI.DomElement._getCurrentStyle(f);var k=d?d.position:a;if(k!==I)for(c=f.parentNode;c;c=c.parentNode){e=c.tagName?c.tagName.toUpperCase():a;if(e!==O&&e!==eb&&(c.scrollLeft||c.scrollTop)){g-=c.scrollLeft||0;h-=c.scrollTop||0;d=b.UI.DomElement._getCurrentStyle(c);if(d){g+=parseInt(d.borderLeftWidth)||0;h+=parseInt(d.borderTopWidth)||0}}}return new b.UI.Point(g,h)};w.isDomElement=function(a){return b._isDomElement(a)};w.removeCssClass=function(d,c){var a=h+d.className+h,b=a.indexOf(h+c+h);if(b>=0)d.className=(a.substr(0,b)+h+a.substring(b+c.length+1,a.length)).trim()};w.resolveElement=function(d,e){var c=d;if(!c)return a;if(typeof c===k)c=b.get(n+c,e);return c};w.raiseBubbleEvent=function(c,d){var b=c;while(b){var a=b.control;if(a&&a.onBubbleEvent&&a.raiseBubbleEvent){!a.onBubbleEvent(c,d)&&a._raiseBubbleEvent(c,d);return}b=b.parentNode}};w._ensureGet=function(a,c){return b.get(a,c)};w.setLocation=function(b,c,d){var a=b.style;a.position=I;a.left=c+"px";a.top=d+"px"};w.toggleCssClass=function(c,a){if(b.UI.DomElement.containsCssClass(c,a))b.UI.DomElement.removeCssClass(c,a);else b.UI.DomElement.addCssClass(c,a)};w.getVisibilityMode=function(a){return a._visibilityMode===b.UI.VisibilityMode.hide?b.UI.VisibilityMode.hide:b.UI.VisibilityMode.collapse};w.setVisibilityMode=function(a,c){b.UI.DomElement._ensureOldDisplayMode(a);if(a._visibilityMode!==c){a._visibilityMode=c;if(b.UI.DomElement.getVisible(a)===d)a.style.display=c===b.UI.VisibilityMode.hide?a._oldDisplayMode:P}};w.getVisible=function(d){var a=d.currentStyle||b.UI.DomElement._getCurrentStyle(d);return a?a.visibility!=="hidden"&&a.display!==P:c};w.setVisible=function(a,c){if(c!==b.UI.DomElement.getVisible(a)){b.UI.DomElement._ensureOldDisplayMode(a);var d=a.style;d.visibility=c?"visible":"hidden";d.display=c||a._visibilityMode===b.UI.VisibilityMode.hide?a._oldDisplayMode:P}};w.setCommand=function(d,f,a,e){b.UI.DomEvent.addHandler(d,"click",function(d){var c=e||this;b.UI.DomElement.raiseBubbleEvent(c,new b.CommandEventArgs(f,a,this,d))},c)};b.registerPlugin({name:"setCommand",dom:c,plugin:function(e,a,d){return this.addHandler("click",function(f){var c=d||this;b.UI.DomElement.raiseBubbleEvent(c,new b.CommandEventArgs(e,a,this,f))},c)}});w._ensureOldDisplayMode=function(b){if(!b._oldDisplayMode){var e=b.currentStyle||this._getCurrentStyle(b);b._oldDisplayMode=e?e.display:a;if(!b._oldDisplayMode||b._oldDisplayMode===P){var d=b.tagName,c="inline";if(/^(DIV|P|ADDRESS|BLOCKQUOTE|BODY|COL|COLGROUP|DD|DL|DT|FIELDSET|FORM|H1|H2|H3|H4|H5|H6|HR|IFRAME|LEGEND|OL|PRE|TABLE|TD|TH|TR|UL)$/i.test(d))c="block";else if(d.toUpperCase()==="LI")c="list-item";b._oldDisplayMode=c}}};w._getWindow=function(a){var b=a.ownerDocument||a.document||a;return b.defaultView||b.parentWindow};w._getCurrentStyle=function(b){if(b.nodeType===3)return a;var c=this._getWindow(b);if(b.documentElement)b=b.documentElement;var d=c&&b!==c&&c.getComputedStyle?c.getComputedStyle(b,a):b.currentStyle||b.style;return d};w._onDispose=function(a,e){var c,d=a.dispose;if(d!==b.UI.DomElement._dispose){a.dispose=b.UI.DomElement._dispose;a.__msajaxdispose=c=[];typeof d===f&&c.push(d)}else c=a.__msajaxdispose;c.push(e)};w._dispose=function(){var b=this,c=b.__msajaxdispose;if(c)for(var d=0,e=c.length;d<e;d++)c[d].apply(b);b.control&&typeof b.control.dispose===f&&b.control.dispose();b.__msajaxdispose=a;b.dispose=a};w=b.IContainer=function(){};w.registerInterface("Sys.IContainer");w=b.ApplicationLoadEventArgs=function(c,a){b.ApplicationLoadEventArgs.initializeBase(this);this._components=c;this._isPartialLoad=a};w.prototype={get_components:function(){return this._components},get_isPartialLoad:function(){return this._isPartialLoad}};w.registerClass("Sys.ApplicationLoadEventArgs",b.EventArgs);w=b._Application=function(){var a=this;b._Application.initializeBase(a);a._disposableObjects=[];a._components={};a._createdComponents=[];a._secondPassComponents=[];a._unloadHandlerDelegate=Function.createDelegate(a,a._unloadHandler);b.UI.DomEvent.addHandler(g,L,a._unloadHandlerDelegate)};w.prototype={_deleteCount:0,get_isCreatingComponents:function(){return!!this._creatingComponents},get_isDisposing:function(){return!!this._disposing},add_init:function(a){if(this._initialized)a(this,b.EventArgs.Empty);else this._addHandler(fb,a)},remove_init:function(a){this._removeHandler(fb,a)},add_load:function(a){this._addHandler(l,a)},remove_load:function(a){this._removeHandler(l,a)},add_unload:function(a){this._addHandler(L,a)},remove_unload:function(a){this._removeHandler(L,a)},addComponent:function(a){this._components[a.get_id()]=a},beginCreateComponents:function(){this._creatingComponents=c},dispose:function(){var a=this;if(!a._disposing){a._disposing=c;if(a._timerCookie){g.clearTimeout(a._timerCookie);delete a._timerCookie}var f=a._endRequestHandler,d=a._beginRequestHandler;if(f||d){var k=b.WebForms.PageRequestManager.getInstance();f&&k.remove_endRequest(f);d&&k.remove_beginRequest(d);delete a._endRequestHandler;delete a._beginRequestHandler}g.pageUnload&&g.pageUnload(a,b.EventArgs.Empty);b.Observer.raiseEvent(a,L);for(var i=Array.clone(a._disposableObjects),h=0,m=i.length;h<m;h++){var j=i[h];typeof j!==e&&j.dispose()}a._disposableObjects.length=0;b.UI.DomEvent.removeHandler(g,L,a._unloadHandlerDelegate);if(b._ScriptLoader){var l=b._ScriptLoader.getInstance();l&&l.dispose()}b._Application.callBaseMethod(a,gb)}},disposeElement:function(c,m){var i=this;if(c.nodeType===1){for(var h,d,b,k=c.getElementsByTagName("*"),j=k.length,l=new Array(j),e=0;e<j;e++)l[e]=k[e];for(e=j-1;e>=0;e--){var g=l[e];h=g.dispose;if(h&&typeof h===f)g.dispose();else{d=g.control;d&&typeof d.dispose===f&&d.dispose()}b=g._behaviors;b&&i._disposeComponents(b);b=g._components;if(b){i._disposeComponents(b);g._components=a}}if(!m){h=c.dispose;if(h&&typeof h===f)c.dispose();else{d=c.control;d&&typeof d.dispose===f&&d.dispose()}b=c._behaviors;b&&i._disposeComponents(b);b=c._components;if(b){i._disposeComponents(b);c._components=a}}}},endCreateComponents:function(){for(var c=this._secondPassComponents,a=0,g=c.length;a<g;a++){var f=c[a],e=f.component;b.Component._setReferences(e,f.references);e.endUpdate()}this._secondPassComponents=[];this._creatingComponents=d},findComponent:function(d,c){return c?b.IContainer.isInstanceOfType(c)?c.findComponent(d):c[d]||a:b.Application._components[d]||a},getComponents:function(){var c=[],a=this._components;for(var b in a)a.hasOwnProperty(b)&&c.push(a[b]);return c},initialize:function(){g.setTimeout(Function.createDelegate(this,this._doInitialize),0)},_doInitialize:function(){var a=this;if(!a.get_isInitialized()&&!a._disposing){b._Application.callBaseMethod(a,V);a._raiseInit();if(a.get_stateString){if(b.WebForms&&b.WebForms.PageRequestManager){var d=b.WebForms.PageRequestManager.getInstance();a._beginRequestHandler=Function.createDelegate(a,a._onPageRequestManagerBeginRequest);d.add_beginRequest(a._beginRequestHandler);a._endRequestHandler=Function.createDelegate(a,a._onPageRequestManagerEndRequest);d.add_endRequest(a._endRequestHandler)}var c=a.get_stateString();if(c!==a._currentEntry)a._navigate(c);else a._ensureHistory()}a.raiseLoad()}},notifyScriptLoaded:function(){},registerDisposableObject:function(b){if(!this._disposing){var a=this._disposableObjects,c=a.length;a[c]=b;b.__msdisposeindex=c}},raiseLoad:function(){var a=this,d=new b.ApplicationLoadEventArgs(Array.clone(a._createdComponents),!!a._loaded);a._loaded=c;b.Observer.raiseEvent(a,l,d);g.pageLoad&&g.pageLoad(a,d);a._createdComponents=[]},removeComponent:function(b){var a=b.get_id();if(a)delete this._components[a]},unregisterDisposableObject:function(a){var b=this;if(!b._disposing){var g=a.__msdisposeindex;if(typeof g===j){var c=b._disposableObjects;delete c[g];delete a.__msdisposeindex;if(++b._deleteCount>1e3){for(var d=[],f=0,h=c.length;f<h;f++){a=c[f];if(typeof a!==e){a.__msdisposeindex=d.length;d.push(a)}}b._disposableObjects=d;b._deleteCount=0}}}},_addComponentToSecondPass:function(b,a){this._secondPassComponents.push({component:b,references:a})},_disposeComponents:function(a){if(a)for(var b=a.length-1;b>=0;b--){var c=a[b];typeof c.dispose===f&&c.dispose()}},_raiseInit:function(){this.beginCreateComponents();b.Observer.raiseEvent(this,fb);this.endCreateComponents()},_unloadHandler:function(){this.dispose()}};w.registerClass("Sys._Application",b.Component,b.IContainer);b.Application=new b._Application;g.$find=b.Application.findComponent;b.onReady(function(){b.Application._doInitialize()});w=b.UI.Behavior=function(a){b.UI.Behavior.initializeBase(this);this._element=a;var c=a._behaviors=a._behaviors||[];c.push(this)};w.prototype={get_element:function(){return this._element},get_id:function(){var c=b.UI.Behavior.callBaseMethod(this,"get_id");if(c)return c;var a=this._element;return!a||!a.id?x:a.id+o+this.get_name()},get_name:function(){var a=this;if(a._name)return a._name;var b=Object.getTypeName(a),c=b.lastIndexOf(i);if(c>=0)b=b.substr(c+1);if(!a._initialized)a._name=b;return b},set_name:function(a){this._name=a},initialize:function(){var a=this;b.UI.Behavior.callBaseMethod(a,V);var c=a.get_name();if(c)a._element[c]=a},dispose:function(){var c=this;b.UI.Behavior.callBaseMethod(c,gb);var d=c._element;if(d){var f=c.get_name();if(f)d[f]=a;var e=d._behaviors;Array.remove(e,c);if(!e.length)d._behaviors=a;delete c._element}}};w.registerClass("Sys.UI.Behavior",b.Component);w.getBehaviorByName=function(d,e){var c=d[e];return c&&b.UI.Behavior.isInstanceOfType(c)?c:a};w.getBehaviors=function(b){var a=b._behaviors;return a?Array.clone(a):[]};b.UI.Behavior.getBehaviorsByType=function(e,f){var a=e._behaviors,d=[];if(a)for(var b=0,g=a.length;b<g;b++){var c=a[b];f.isInstanceOfType(c)&&d.push(c)}return d};w=b.UI.VisibilityMode=function(){};w.prototype={hide:0,collapse:1};w.registerEnum("Sys.UI.VisibilityMode");w=b.UI.Control=function(c){var a=this;b.UI.Control.initializeBase(a);a._element=c;c.control=a;var d=a.get_role();d&&c.setAttribute("role",d)};w.prototype={_parent:a,_visibilityMode:b.UI.VisibilityMode.hide,get_element:function(){return this._element},get_id:function(){return this._id||(this._element?this._element.id:x)},get_parent:function(){var c=this;if(c._parent)return c._parent;if(!c._element)return a;var b=c._element.parentNode;while(b){if(b.control)return b.control;b=b.parentNode}return a},set_parent:function(a){this._parent=a},get_role:function(){return a},get_visibilityMode:function(){return b.UI.DomElement.getVisibilityMode(this._element)},set_visibilityMode:function(a){b.UI.DomElement.setVisibilityMode(this._element,a)},get_visible:function(){return b.UI.DomElement.getVisible(this._element)},set_visible:function(a){b.UI.DomElement.setVisible(this._element,a)},addCssClass:function(a){b.UI.DomElement.addCssClass(this._element,a)},dispose:function(){var c=this;b.UI.Control.callBaseMethod(c,gb);if(c._element){c._element.control=a;delete c._element}if(c._parent)delete c._parent},onBubbleEvent:function(){return d},raiseBubbleEvent:function(a,b){this._raiseBubbleEvent(a,b)},_raiseBubbleEvent:function(b,c){var a=this.get_parent();while(a){if(a.onBubbleEvent(b,c))return;a=a.get_parent()}},removeCssClass:function(a){b.UI.DomElement.removeCssClass(this._element,a)},toggleCssClass:function(a){b.UI.DomElement.toggleCssClass(this._element,a)}};w.registerClass("Sys.UI.Control",b.Component);w=b.HistoryEventArgs=function(a){b.HistoryEventArgs.initializeBase(this);this._state=a};w.prototype={get_state:function(){return this._state}};w.registerClass("Sys.HistoryEventArgs",b.EventArgs);w=b.Application;w._currentEntry=x;w._initialState=a;w._state={};z=b._Application.prototype;z.get_stateString=function(){var b=a;if(kb(U)){var d=g.location.href,c=d.indexOf(n);if(c!==y)b=d.substring(c+1);else b=x;return b}else b=g.location.hash;if(b.length&&b.charAt(0)===n)b=b.substring(1);return b};z.get_enableHistory=function(){return!!this._enableHistory};z.set_enableHistory=function(a){this._enableHistory=a};z.add_navigate=function(a){this._addHandler(hb,a)};z.remove_navigate=function(a){this._removeHandler(hb,a)};z.addHistoryPoint=function(g,j){var b=this;b._ensureHistory();var d=b._state;for(var f in g){var h=g[f];if(h===a){if(typeof d[f]!==e)delete d[f]}else d[f]=h}var i=b._serializeState(d);b._historyPointIsNew=c;b._setState(i,j);b._raiseNavigate()};z.setServerId=function(a,b){this._clientId=a;this._uniqueId=b};z.setServerState=function(a){this._ensureHistory();this._state.__s=a;this._updateHiddenField(a)};z._deserializeState=function(a){var e={};a=a||x;var b=a.indexOf("&&");if(b!==y&&b+2<a.length){e.__s=a.substr(b+2);a=a.substr(0,b)}for(var g=a.split("&"),f=0,j=g.length;f<j;f++){var d=g[f],c=d.indexOf("=");if(c!==y&&c+1<d.length){var i=d.substr(0,c),h=d.substr(c+1);e[i]=decodeURIComponent(h)}}return e};z._enableHistoryInScriptManager=function(){this._enableHistory=c};z._ensureHistory=function(){var a=this;if(!a._historyInitialized&&a._enableHistory){if(kb(db)&&b.Browser.documentMode<8){a._historyFrame=b.get("#__historyFrame");a._ignoreIFrame=c}a._timerHandler=Function.createDelegate(a,a._onIdle);a._timerCookie=g.setTimeout(a._timerHandler,B);var d;try{a._initialState=a._deserializeState(a.get_stateString())}catch(d){}a._historyInitialized=c}};z._navigate=function(d){var a=this;a._ensureHistory();var c=a._deserializeState(d);if(a._uniqueId){var e=a._state.__s||x,b=c.__s||x;if(b!==e){a._updateHiddenField(b);__doPostBack(a._uniqueId,b);a._state=c;return}}a._setState(d);a._state=c;a._raiseNavigate()};z._onIdle=function(){var a=this;delete a._timerCookie;var b=a.get_stateString();if(b!==a._currentEntry){if(!a._ignoreTimer){a._historyPointIsNew=d;a._navigate(b)}}else a._ignoreTimer=d;a._timerCookie=g.setTimeout(a._timerHandler,B)};z._onIFrameLoad=function(b){var a=this;a._ensureHistory();if(!a._ignoreIFrame){a._historyPointIsNew=d;a._navigate(b)}a._ignoreIFrame=d};z._onPageRequestManagerBeginRequest=function(){this._ignoreTimer=c;this._originalTitle=document.title};z._onPageRequestManagerEndRequest=function(n,m){var f=this,j=m.get_dataItems()[f._clientId],i=f._originalTitle;f._originalTitle=a;var h=b.get("#__EVENTTARGET");if(h&&h.value===f._uniqueId)h.value=x;if(typeof j!==e){f.setServerState(j);f._historyPointIsNew=c}else f._ignoreTimer=d;var g=f._serializeState(f._state);if(g!==f._currentEntry){f._ignoreTimer=c;if(typeof i===k){if(!kb(db)||b.Browser.version>7){var l=document.title;document.title=i;f._setState(g);document.title=l}else f._setState(g);f._raiseNavigate()}else{f._setState(g);f._raiseNavigate()}}};z._raiseNavigate=function(){var a=this,e=a._historyPointIsNew,d={};for(var c in a._state)if(c!=="__s")d[c]=a._state[c];var f=new b.HistoryEventArgs(d);b.Observer.raiseEvent(a,hb,f);if(!e){var h;try{if(kb(U)&&g.location.hash&&(!g.frameElement||g.top.location.hash))b.Browser.version<3.5?g.history.go(0):(location.hash=a.get_stateString())}catch(h){}}};z._serializeState=function(d){var c=[];for(var a in d){var e=d[a];if(a==="__s")var b=e;else c.push(a+"="+encodeURIComponent(e))}return c.join("&")+(b?"&&"+b:x)};z._setState=function(h,i){var f=this;if(f._enableHistory){h=h||x;if(h!==f._currentEntry){if(g.theForm){var k=g.theForm.action,l=k.indexOf(n);g.theForm.action=(l!==y?k.substring(0,l):k)+n+h}if(f._historyFrame&&f._historyPointIsNew){f._ignoreIFrame=c;var j=f._historyFrame.contentWindow.document;j.open("javascript:'<html></html>'");j.write("<html><head><title>"+(i||document.title)+'</title><script type="text/javascript">parent.Sys.Application._onIFrameLoad('+b.Serialization.JavaScriptSerializer.serialize(h)+");<\/script></head><body></body></html>");j.close()}f._ignoreTimer=d;f._currentEntry=h;if(f._historyFrame||f._historyPointIsNew){var m=f.get_stateString();if(h!==m){g.location.hash=h;f._currentEntry=f.get_stateString();if(typeof i!==e&&i!==a)document.title=i}}f._historyPointIsNew=d}}};z._updateHiddenField=function(b){if(this._clientId){var a=document.getElementById(this._clientId);if(a)a.value=b}};if(!g.XMLHttpRequest)g.XMLHttpRequest=function(){for(var e,c=["Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP"],b=0,d=c.length;b<d;b++)try{return new ActiveXObject(c[b])}catch(e){}return a};Type.registerNamespace("Sys.Net");w=b.Net.WebRequestExecutor=function(){this._webRequest=a;this._resultObject=a};var T=function(){};w.prototype={get_started:T,get_responseAvailable:T,get_timedOut:T,get_aborted:T,get_responseData:T,get_statusCode:T,get_statusText:T,get_xml:T,executeRequest:T,abort:T,getAllResponseHeaders:T,getResponseHeader:T,get_webRequest:function(){return this._webRequest},_set_webRequest:function(a){this._webRequest=a},get_object:function(){var a=this._resultObject;if(!a)this._resultObject=a=b.Serialization.JavaScriptSerializer.deserialize(this.get_responseData());return a}};w.registerClass("Sys.Net.WebRequestExecutor");b.Net.XMLDOM=function(f){if(!g.DOMParser)for(var j,e=["Msxml2.DOMDocument.3.0","Msxml2.DOMDocument"],c=0,i=e.length;c<i;c++)try{var b=new ActiveXObject(e[c]);b.async=d;b.loadXML(f);b.setProperty(tb,"XPath");return b}catch(j){}else try{var h=new g.DOMParser;return h.parseFromString(f,mb)}catch(j){}return a};w=b.Net.XMLHttpExecutor=function(){var f=this;b.Net.XMLHttpExecutor.initializeBase(f);var d=f;f._onReadyStateChange=function(){if(d._xmlHttpRequest.readyState===4){try{if(typeof d._xmlHttpRequest.status===e)return}catch(f){return}d._clearTimer();d._responseAvailable=c;try{d._webRequest.completed(b.EventArgs.Empty)}finally{if(d._xmlHttpRequest){d._xmlHttpRequest.onreadystatechange=Function.emptyMethod;d._xmlHttpRequest=a}}}};f._clearTimer=function(){if(d._timer){g.clearTimeout(d._timer);d._timer=a}};f._onTimeout=function(){if(!d._responseAvailable){d._clearTimer();d._timedOut=c;var e=d._xmlHttpRequest;e.onreadystatechange=Function.emptyMethod;e.abort();d._webRequest.completed(b.EventArgs.Empty);d._xmlHttpRequest=a}}};w.prototype={get_timedOut:function(){return!!this._timedOut},get_started:function(){return!!this._started},get_responseAvailable:function(){return!!this._responseAvailable},get_aborted:function(){return!!this._aborted},executeRequest:function(){var b=this,j=d;if(arguments.length===1&&arguments[0].toString()==="[object FormData]")j=c;var h=b.get_webRequest();b._webRequest=h;var k=h.get_body(),i=h.get_headers(),e=new XMLHttpRequest;b._xmlHttpRequest=e;e.onreadystatechange=b._onReadyStateChange;if(j&&e.upload){e.upload.addEventListener(l,b.bind(b.load,b),d);e.upload.addEventListener(Q,b.bind(b.progress,b),d);e.upload.addEventListener(m,b.bind(b.error,b),d);e.upload.addEventListener("abort",b.bind(b.uploadAbort,b),d)}var p=h.get_httpVerb();e.open(p,h.getResolvedUrl(),c);e.setRequestHeader("X-Requested-With","XMLHttpRequest");if(i)for(var o in i){var q=i[o];typeof q!==f&&e.setRequestHeader(o,q)}if(p.toLowerCase()==="post"){if(!j)(i===a||!i[M])&&e.setRequestHeader(M,"application/x-www-form-urlencoded; charset=utf-8");if(!k)k=x}var n=h.get_timeout();if(n>0)b._timer=g.setTimeout(Function.createDelegate(b,b._onTimeout),n);if(j)e.send(arguments[0]);else e.send(k);b._started=c},getResponseHeader:function(b){var c,a;try{a=this._xmlHttpRequest.getResponseHeader(b)}catch(c){}if(!a)a=x;return a},getAllResponseHeaders:function(){return this._xmlHttpRequest.getAllResponseHeaders()},get_responseData:function(){return this._xmlHttpRequest.responseText},get_statusCode:function(){var b,a=0;try{a=this._xmlHttpRequest.status}catch(b){}return a},get_statusText:function(){return this._xmlHttpRequest.statusText},get_xml:function(){var d="parsererror",e=this._xmlHttpRequest,c=e.responseXML;if(!c||!c.documentElement){c=b.Net.XMLDOM(e.responseText);if(!c||!c.documentElement)return a}else navigator.userAgent.indexOf("MSIE")!==y&&c.setProperty(tb,"XPath");return c.documentElement.namespaceURI==="http://www.mozilla.org/newlayout/xml/parsererror.xml"&&c.documentElement.tagName===d?a:c.documentElement.firstChild&&c.documentElement.firstChild.tagName===d?a:c},abort:function(){var d=this;if(d._aborted||d._responseAvailable||d._timedOut)return;d._aborted=c;d._clearTimer();var e=d._xmlHttpRequest;if(e&&!d._responseAvailable){e.onreadystatechange=Function.emptyMethod;e.abort();d._xmlHttpRequest=a;d._webRequest.completed(b.EventArgs.Empty)}},bind:function(b,a){return function(){b.apply(a,arguments)}},add_load:function(a){b.Observer.addEventHandler(this,l,a)},remove_load:function(a){b.Observer.removeEventHandler(this,l,a)},load:function(a){function d(g,f,e){var d=b.Observer._getContext(g,c).events.getHandler(e);d&&d(f,a)}d(this,this,l);b.Observer.clearEventHandlers(this,l)},add_progress:function(a){b.Observer.addEventHandler(this,Q,a)},remove_progress:function(a){b.Observer.removeEventHandler(this,Q,a)},progress:function(a){function d(g,f,e){var d=b.Observer._getContext(g,c).events.getHandler(e);d&&d(f,a)}d(this,this,Q)},add_error:function(a){b.Observer.addEventHandler(this,m,a)},remove_error:function(a){b.Observer.removeEventHandler(this,m,a)},error:function(a){function d(g,f,e){var d=b.Observer._getContext(g,c).events.getHandler(e);d&&d(f,a)}d(this,this,m);b.Observer.clearEventHandlers(this,m)},add_uploadAbort:function(a){b.Observer.addEventHandler(this,R,a)},remove_uploadAbort:function(a){b.Observer.removeEventHandler(this,R,a)},uploadAbort:function(a){function d(g,f,e){var d=b.Observer._getContext(g,c).events.getHandler(e);d&&d(f,a)}d(this,this,R);b.Observer.clearEventHandlers(this,R)}};w.registerClass(xb,b.Net.WebRequestExecutor);w=b.Net._WebRequestManager=function(){this._defaultExecutorType=xb};w.prototype={add_invokingRequest:function(a){b.Observer.addEventHandler(this,ib,a)},remove_invokingRequest:function(a){b.Observer.removeEventHandler(this,ib,a)},add_completedRequest:function(a){b.Observer.addEventHandler(this,jb,a)},remove_completedRequest:function(a){b.Observer.removeEventHandler(this,jb,a)},get_defaultTimeout:function(){return this._defaultTimeout||0},set_defaultTimeout:function(a){this._defaultTimeout=a},get_defaultExecutorType:function(){return this._defaultExecutorType},set_defaultExecutorType:function(a){this._defaultExecutorType=a},executeRequest:function(d){var a=d.get_executor();if(!a){var i,h;try{var f=g.eval(this._defaultExecutorType);a=new f}catch(i){h=c}d.set_executor(a)}if(!a.get_aborted()){var e=new b.Net.NetworkRequestEventArgs(d);b.Observer.raiseEvent(this,ib,e);!e.get_cancel()&&a.executeRequest()}}};w.registerClass("Sys.Net._WebRequestManager");b.Net.WebRequestManager=new b.Net._WebRequestManager;w=b.Net.NetworkRequestEventArgs=function(a){b.Net.NetworkRequestEventArgs.initializeBase(this);this._webRequest=a};w.prototype={get_webRequest:function(){return this._webRequest}};w.registerClass("Sys.Net.NetworkRequestEventArgs",b.CancelEventArgs);w=b.Net.WebRequest=function(){var b=this;b._url=x;b._headers={};b._body=a;b._userContext=a;b._httpVerb=a};w.prototype={add_completed:function(a){b.Observer.addEventHandler(this,S,a)},remove_completed:function(a){b.Observer.removeEventHandler(this,S,a)},completed:function(e){var a=this;function d(g,f,d){var a=b.Observer._getContext(g,c).events.getHandler(d);a&&a(f,e)}d(b.Net.WebRequestManager,a._executor,jb);d(a,a._executor,S);b.Observer.clearEventHandlers(a,S)},get_url:function(){return this._url},set_url:function(a){this._url=a},get_headers:function(){return this._headers},get_httpVerb:function(){return this._httpVerb===a?this._body===a?"GET":"POST":this._httpVerb},set_httpVerb:function(a){this._httpVerb=a},get_body:function(){return this._body},set_body:function(a){this._body=a},get_userContext:function(){return this._userContext},set_userContext:function(a){this._userContext=a},get_executor:function(){return this._executor||a},set_executor:function(a){this._executor=a;a._set_webRequest(this)},get_timeout:function(){return this._timeout||b.Net.WebRequestManager.get_defaultTimeout()},set_timeout:function(a){this._timeout=a},getResolvedUrl:function(){return b.Net.WebRequest._resolveUrl(this._url)},invoke:function(){b.Net.WebRequestManager.executeRequest(this)}};w._resolveUrl=function(c,a){if(c&&c.indexOf("://")>0)return c;if(!a||!a.length){var e=b.get("base");if(e&&e.href&&e.href.length)a=e.href;else a=document.URL}var d=a.indexOf("?");if(d>0)a=a.substr(0,d);d=a.indexOf(n);if(d>0)a=a.substr(0,d);a=a.substr(0,a.lastIndexOf(D)+1);if(!c||!c.length)return a;if(c.charAt(0)===D){var f=a.indexOf("://"),h=a.indexOf(D,f+3);return a.substr(0,h)+c}else{var g=a.lastIndexOf(D);return a.substr(0,g+1)+c}};w._createQueryString=function(d,c,h){c=c||encodeURIComponent;var j=0,g,i,e,a=new b.StringBuilder;if(d)for(e in d){g=d[e];if(typeof g===f)continue;i=b.Serialization.JavaScriptSerializer.serialize(g);j++&&a.append("&");a.append(e);a.append("=");a.append(c(i))}if(h){j&&a.append("&");a.append(h)}return a.toString()};w._createUrl=function(c,d,e){if(!d&&!e)return c;var f=b.Net.WebRequest._createQueryString(d,a,e);return f.length?c+(c&&c.indexOf("?")>=0?"&":"?")+f:c};w.registerClass("Sys.Net.WebRequest");Type.registerNamespace("Sys.Net");w=b.Net.WebServiceProxy=function(){var a=Object.getType(this);if(a._staticInstance&&typeof a._staticInstance.get_enableJsonp===f)this._jsonp=a._staticInstance.get_enableJsonp()};w.prototype={get_timeout:function(){return this._timeout||0},set_timeout:function(a){this._timeout=a},get_defaultUserContext:function(){return typeof this._userContext===e?a:this._userContext},set_defaultUserContext:function(a){this._userContext=a},get_defaultSucceededCallback:function(){return this._succeeded||a},set_defaultSucceededCallback:function(a){this._succeeded=a},get_defaultFailedCallback:function(){return this._failed||a},set_defaultFailedCallback:function(a){this._failed=a},get_enableJsonp:function(){return!!this._jsonp},set_enableJsonp:function(a){this._jsonp=a},get_path:function(){return this._path||a},set_path:function(a){this._path=a},get_jsonpCallbackParameter:function(){return this._callbackParameter||ub},set_jsonpCallbackParameter:function(a){this._callbackParameter=a},_invoke:function(h,i,k,j,g,f,d){var c=this;g=g||c.get_defaultSucceededCallback();f=f||c.get_defaultFailedCallback();if(d===a||typeof d===e)d=c.get_defaultUserContext();return b.Net.WebServiceProxy.invoke(h,i,k,j,g,f,d,c.get_timeout(),c.get_enableJsonp(),c.get_jsonpCallbackParameter())}};w.registerClass("Sys.Net.WebServiceProxy");w.invoke=function(v,f,r,q,p,h,l,m,C,u){var o=C!==d?b.Net.WebServiceProxy._xdomain.exec(v):a,i,s=o&&o.length===3&&(o[1]!==location.protocol||o[2]!==location.host);r=s||r;if(s){u=u||ub;i="_jsonp"+b._jsonp++}if(!q)q={};var w=q;if(!r||!w)w={};var n,k=a,t=a,A=b.Net.WebRequest._createUrl(f?v+D+encodeURIComponent(f):v,w,s?u+"=Sys."+i:a);if(s){function B(){if(k===a)return;k=a;n=new b.Net.WebServiceError(c,String.format(b.Res.webServiceTimedOut,f));delete b[i];h&&h(n,l,f)}function z(c,j){if(k!==a){g.clearTimeout(k);k=a}delete b[i];i=a;if(typeof j!==e&&j!==200){if(h){n=new b.Net.WebServiceError(d,c.Message||String.format(b.Res.webServiceFailedNoMsg,f),c.StackTrace||a,c.ExceptionType||a,c);n._statusCode=j;h(n,l,f)}}else p&&p(c,l,f)}b[i]=z;m=m||b.Net.WebRequestManager.get_defaultTimeout();if(m>0)k=g.setTimeout(B,m);b._loadJsonp(A,function(){i&&z({Message:String.format(b.Res.webServiceFailedNoMsg,f)},y)});return a}var j=new b.Net.WebRequest;j.set_url(A);j.get_headers()[M]="application/json; charset=utf-8";if(!r){t=b.Serialization.JavaScriptSerializer.serialize(q);if(t==="{}")t=x}j.set_body(t);j.add_completed(E);m>0&&j.set_timeout(m);j.invoke();function E(g){if(g.get_responseAvailable()){var s,i=g.get_statusCode(),c=a,k;try{var m=g.getResponseHeader(M);k=m.startsWith("application/json");c=k?g.get_object():m.startsWith(mb)?g.get_xml():g.get_responseData()}catch(s){}var o=g.getResponseHeader("jsonerror"),j=o==="true";if(j){if(c)c=new b.Net.WebServiceError(d,c.Message,c.StackTrace,c.ExceptionType,c)}else if(k)c=!c||typeof c.d===e?c:c.d;if(i<200||i>=300||j){if(h){if(!c||!j)c=new b.Net.WebServiceError(d,String.format(b.Res.webServiceFailedNoMsg,f));c._statusCode=i;h(c,l,f)}}else p&&p(c,l,f)}else{var n=g.get_timedOut(),q=String.format(n?b.Res.webServiceTimedOut:b.Res.webServiceFailedNoMsg,f);h&&h(new b.Net.WebServiceError(n,q,x,x),l,f)}}return j};w._generateTypedConstructor=function(a){return function(b){if(b)for(var c in b)this[c]=b[c];this.__type=a}};b._jsonp=0;w._xdomain=/^\s*([a-zA-Z0-9\+\-\.]+\:)\/\/([^?#\/]+)/;b._loadJsonp=function(h,g){var c=document.createElement("script");c.type="text/javascript";c.src=h;var f=c.attachEvent;function e(){if(!f||/loaded|complete/.test(c.readyState)){if(f)c.detachEvent(s,e);else{c.removeEventListener(l,e,d);c.removeEventListener(m,e,d)}g.apply(c);c=a}}if(f)c.attachEvent(s,e);else{c.addEventListener(l,e,d);c.addEventListener(m,e,d)}b.get("head").appendChild(c)};w=b.Net.WebServiceError=function(e,f,d,b,c){var a=this;a._timedOut=e;a._message=f;a._stackTrace=d;a._exceptionType=b;a._errorObject=c;a._statusCode=y};w.prototype={get_timedOut:function(){return this._timedOut},get_statusCode:function(){return this._statusCode},get_message:function(){return this._message},get_stackTrace:function(){return this._stackTrace||x},get_exceptionType:function(){return this._exceptionType||x},get_errorObject:function(){return this._errorObject||a}};w.registerClass("Sys.Net.WebServiceError");Type.registerNamespace("Sys.Services");var ob=b.Services,wb="Service",Gb="Role",Fb="Authentication",Db="Profile";function Bb(a){this._path=a}ob[Fb+wb]={set_path:Bb,_setAuthenticated:function(a){this._auth=a}};ob["_"+Fb+wb]={};ob[Db+wb]={set_path:Bb};ob["_"+Db+wb]={};ob.ProfileGroup=function(a){this._propertygroup=a};ob[Gb+wb]={set_path:Bb};ob["_"+Gb+wb]={};b._domLoaded()}if(b.loader)b.loader.registerScript("MicrosoftAjax",a,H);else H()})(window,window.Sys);var $get,$create,$addHandler,$addHandlers,$clearHandlers;Sys.Res={actualValue:"Actual value was {0}.",argument:"Value does not fall within the expected range.",argumentDomElement:"Value must be a DOM element.",argumentInteger:"Value must be an integer.",argumentNull:"Value cannot be null.",argumentOutOfRange:"Specified argument was out of the range of valid values.",argumentType:"Object cannot be converted to the required type.",argumentTypeWithTypes:"Object of type '{0}' cannot be converted to type '{1}'.",argumentUndefined:"Value cannot be undefined.",assertFailed:"Assertion Failed: {0}",assertFailedCaller:"Assertion Failed: {0}\r\nat {1}",breakIntoDebugger:"{0}\r\n\r\nBreak into debugger?",cannotDeserializeEmptyString:"Cannot deserialize empty string.",cannotDeserializeInvalidJson:"Cannot deserialize. The data does not correspond to valid JSON.",cannotSerializeNonFiniteNumbers:"Cannot serialize non finite numbers.",enumInvalidValue:"'{0}' is not a valid value for enum {1}.",format:"One of the identified items was in an invalid format.",formatBadFormatSpecifier:"Format specifier was invalid.",formatInvalidString:"Input string was not in a correct format.",invalidOperation:"Operation is not valid due to the current state of the object.",notImplemented:"The method or operation is not implemented.",parameterCount:"Parameter count mismatch.",paramName:"Parameter name: {0}",scriptLoadFailed:"The script '{0}' could not be loaded.",servicePathNotSet:"The path to the web service has not been set.",webServiceFailedNoMsg:"The server method '{0}' failed.",webServiceInvalidReturnType:"The server method '{0}' returned an invalid type. Expected type: {1}",webServiceTimedOut:"The server method '{0}' timed out.",scriptDependencyNotFound:"The script '{0}' failed to load because it is dependent on script '{1}'.",scriptAlreadyLoaded:"The script '{0}' has been referenced multiple times. If referencing Microsoft AJAX scripts explicitly, set the MicrosoftAjaxMode property of the ScriptManager to Explicit.",requiredScriptReferenceNotIncluded:"'{0}' requires that you have included a script reference to '{1}'.",nullReferenceInPath:"Null reference while evaluating data path: '{0}'."};
// (c) 2010 CodePlex Foundation
(function(){function a(){var s="aria-hidden",k="status",j="submit",h="=",g="undefined",d=-1,f="",u="function",r="pageLoading",q="pageLoaded",p="initializeRequest",o="endRequest",n="beginRequest",m="script",l="error",t="readystatechange",i="load",a=null,c=true,b=false;Type._registerScript("MicrosoftAjaxWebForms.js",["MicrosoftAjaxCore.js","MicrosoftAjaxSerialization.js","MicrosoftAjaxNetwork.js","MicrosoftAjaxComponentModel.js"]);var e,v;Type.registerNamespace("Sys.WebForms");e=Sys.WebForms.BeginRequestEventArgs=function(d,c,b){var a=this;Sys.WebForms.BeginRequestEventArgs.initializeBase(a);a._request=d;a._postBackElement=c;a._updatePanelsToUpdate=b};e.prototype={get_postBackElement:function(){return this._postBackElement},get_request:function(){return this._request},get_updatePanelsToUpdate:function(){return this._updatePanelsToUpdate?Array.clone(this._updatePanelsToUpdate):[]}};e.registerClass("Sys.WebForms.BeginRequestEventArgs",Sys.EventArgs);e=Sys.WebForms.EndRequestEventArgs=function(e,c,d){var a=this;Sys.WebForms.EndRequestEventArgs.initializeBase(a);a._errorHandled=b;a._error=e;a._dataItems=c||{};a._response=d};e.prototype={get_dataItems:function(){return this._dataItems},get_error:function(){return this._error},get_errorHandled:function(){return this._errorHandled},set_errorHandled:function(a){this._errorHandled=a},get_response:function(){return this._response}};e.registerClass("Sys.WebForms.EndRequestEventArgs",Sys.EventArgs);e=Sys.WebForms.InitializeRequestEventArgs=function(d,c,b){var a=this;Sys.WebForms.InitializeRequestEventArgs.initializeBase(a);a._request=d;a._postBackElement=c;a._updatePanelsToUpdate=b};e.prototype={get_postBackElement:function(){return this._postBackElement},get_request:function(){return this._request},get_updatePanelsToUpdate:function(){return this._updatePanelsToUpdate?Array.clone(this._updatePanelsToUpdate):[]},set_updatePanelsToUpdate:function(a){this._updated=c;this._updatePanelsToUpdate=a}};e.registerClass("Sys.WebForms.InitializeRequestEventArgs",Sys.CancelEventArgs);e=Sys.WebForms.PageLoadedEventArgs=function(c,b,d){var a=this;Sys.WebForms.PageLoadedEventArgs.initializeBase(a);a._panelsUpdated=c;a._panelsCreated=b;a._dataItems=d||{}};e.prototype={get_dataItems:function(){return this._dataItems},get_panelsCreated:function(){return this._panelsCreated},get_panelsUpdated:function(){return this._panelsUpdated}};e.registerClass("Sys.WebForms.PageLoadedEventArgs",Sys.EventArgs);e=Sys.WebForms.PageLoadingEventArgs=function(c,b,d){var a=this;Sys.WebForms.PageLoadingEventArgs.initializeBase(a);a._panelsUpdating=c;a._panelsDeleting=b;a._dataItems=d||{}};e.prototype={get_dataItems:function(){return this._dataItems},get_panelsDeleting:function(){return this._panelsDeleting},get_panelsUpdating:function(){return this._panelsUpdating}};e.registerClass("Sys.WebForms.PageLoadingEventArgs",Sys.EventArgs);e=Sys._ScriptLoaderTask=function(b,a){this._scriptElement=b;this._completedCallback=a};e.prototype={get_scriptElement:function(){return this._scriptElement},dispose:function(){var b=this;if(b._disposed)return;b._disposed=c;b._removeScriptElementHandlers();Sys._ScriptLoaderTask._clearScript(b._scriptElement);b._scriptElement=a},execute:function(){this._addScriptElementHandlers();document.getElementsByTagName("head")[0].appendChild(this._scriptElement)},_addScriptElementHandlers:function(){var a=this;a._scriptLoadDelegate=Function.createDelegate(a,a._scriptLoadHandler);if(document.addEventListener){if(!a._scriptElement.readyState)a._scriptElement.readyState="loaded";$addHandler(a._scriptElement,i,a._scriptLoadDelegate)}else $addHandler(a._scriptElement,t,a._scriptLoadDelegate);if(a._scriptElement.addEventListener){a._scriptErrorDelegate=Function.createDelegate(a,a._scriptErrorHandler);a._scriptElement.addEventListener(l,a._scriptErrorDelegate,b)}},_removeScriptElementHandlers:function(){var c=this;if(c._scriptLoadDelegate){var d=c.get_scriptElement();if(document.addEventListener)$removeHandler(d,i,c._scriptLoadDelegate);else $removeHandler(d,t,c._scriptLoadDelegate);if(c._scriptErrorDelegate){c._scriptElement.removeEventListener(l,c._scriptErrorDelegate,b);c._scriptErrorDelegate=a}c._scriptLoadDelegate=a}},_scriptErrorHandler:function(){if(this._disposed)return;this._completedCallback(this.get_scriptElement(),b)},_scriptLoadHandler:function(){if(this._disposed)return;var a=this.get_scriptElement();if(a.readyState!=="loaded"&&a.readyState!=="complete")return;this._completedCallback(a,c)}};e.registerClass("Sys._ScriptLoaderTask",a,Sys.IDisposable);e._clearScript=function(a){!Sys.Debug.isDebug&&a.parentNode.removeChild(a)};e=Sys._ScriptLoader=function(){var b=this;b._scriptsToLoad=a;b._sessions=[];b._scriptLoadedDelegate=Function.createDelegate(b,b._scriptLoadedHandler)};e.prototype={dispose:function(){var c=this;c._stopSession();c._loading=b;if(c._events)delete c._events;c._sessions=a;c._currentSession=a;c._scriptLoadedDelegate=a},loadScripts:function(f,d,e,c){var b=this,g={allScriptsLoadedCallback:d,scriptLoadFailedCallback:e,scriptLoadTimeoutCallback:c,scriptsToLoad:b._scriptsToLoad,scriptTimeout:f};b._scriptsToLoad=a;b._sessions.push(g);!b._loading&&b._nextSession()},queueCustomScriptTag:function(a){if(!this._scriptsToLoad)this._scriptsToLoad=[];Array.add(this._scriptsToLoad,a)},queueScriptBlock:function(a){if(!this._scriptsToLoad)this._scriptsToLoad=[];Array.add(this._scriptsToLoad,{text:a})},queueScriptReference:function(a){if(!this._scriptsToLoad)this._scriptsToLoad=[];Array.add(this._scriptsToLoad,{src:a})},_createScriptElement:function(b){var a=document.createElement(m);a.type="text/javascript";for(var c in b)a[c]=b[c];return a},_loadScriptsInternal:function(){var a=this,c=a._currentSession;if(c.scriptsToLoad&&c.scriptsToLoad.length>0){var d=Array.dequeue(c.scriptsToLoad),b=a._createScriptElement(d);if(b.text&&Sys.Browser.agent===Sys.Browser.Safari){b.innerHTML=b.text;delete b.text}if(typeof d.src==="string"){a._currentTask=new Sys._ScriptLoaderTask(b,a._scriptLoadedDelegate);a._currentTask.execute()}else{document.getElementsByTagName("head")[0].appendChild(b);Sys._ScriptLoaderTask._clearScript(b);a._loadScriptsInternal()}}else{a._stopSession();var e=c.allScriptsLoadedCallback;e&&e(a);a._nextSession()}},_nextSession:function(){var d=this;if(d._sessions.length===0){d._loading=b;d._currentSession=a;return}d._loading=c;var e=Array.dequeue(d._sessions);d._currentSession=e;if(e.scriptTimeout>0)d._timeoutCookie=window.setTimeout(Function.createDelegate(d,d._scriptLoadTimeoutHandler),e.scriptTimeout*1e3);d._loadScriptsInternal()},_raiseError:function(){var a=this,d=a._currentSession.scriptLoadFailedCallback,c=a._currentTask.get_scriptElement();a._stopSession();if(d){d(a,c);a._nextSession()}else{a._loading=b;throw Sys._ScriptLoader._errorScriptLoadFailed(c.src);}},_scriptLoadedHandler:function(c,d){var b=this;if(d){Array.add(Sys._ScriptLoader._getLoadedScripts(),c.src);b._currentTask.dispose();b._currentTask=a;b._loadScriptsInternal()}else b._raiseError()},_scriptLoadTimeoutHandler:function(){var a=this,b=a._currentSession.scriptLoadTimeoutCallback;a._stopSession();b&&b(a);a._nextSession()},_stopSession:function(){var b=this;if(b._timeoutCookie){window.clearTimeout(b._timeoutCookie);b._timeoutCookie=a}if(b._currentTask){b._currentTask.dispose();b._currentTask=a}}};e.registerClass("Sys._ScriptLoader",a,Sys.IDisposable);e.getInstance=function(){var a=Sys._ScriptLoader._activeInstance;if(!a)a=Sys._ScriptLoader._activeInstance=new Sys._ScriptLoader;return a};e.isScriptLoaded=function(b){var a=document.createElement(m);a.src=b;return Array.contains(Sys._ScriptLoader._getLoadedScripts(),a.src)};e.readLoadedScripts=function(){if(!Sys._ScriptLoader._referencedScripts)for(var c=Sys._ScriptLoader._referencedScripts=[],d=document.getElementsByTagName(m),b=d.length-1;b>=0;b--){var e=d[b],a=e.src;if(a.length)!Array.contains(c,a)&&Array.add(c,a)}};e._errorScriptLoadFailed=function(b){var a;a=Sys.Res.scriptLoadFailed;var d="Sys.ScriptLoadFailedException: "+String.format(a,b),c=Error.create(d,{name:"Sys.ScriptLoadFailedException",scriptUrl:b});c.popStackFrame();return c};e._getLoadedScripts=function(){if(!Sys._ScriptLoader._referencedScripts){Sys._ScriptLoader._referencedScripts=[];Sys._ScriptLoader.readLoadedScripts()}return Sys._ScriptLoader._referencedScripts};e=Sys.WebForms.PageRequestManager=function(){var c=this;c._form=a;c._activeDefaultButton=a;c._activeDefaultButtonClicked=b;c._updatePanelIDs=a;c._updatePanelClientIDs=a;c._updatePanelHasChildrenAsTriggers=a;c._asyncPostBackControlIDs=a;c._asyncPostBackControlClientIDs=a;c._postBackControlIDs=a;c._postBackControlClientIDs=a;c._scriptManagerID=a;c._pageLoadedHandler=a;c._additionalInput=a;c._onsubmit=a;c._onSubmitStatements=[];c._originalDoPostBack=a;c._originalDoPostBackWithOptions=a;c._originalFireDefaultButton=a;c._originalDoCallback=a;c._isCrossPost=b;c._postBackSettings=a;c._request=a;c._onFormSubmitHandler=a;c._onFormElementClickHandler=a;c._onWindowUnloadHandler=a;c._asyncPostBackTimeout=a;c._controlIDToFocus=a;c._scrollPosition=a;c._processingRequest=b;c._scriptDisposes={};c._transientFields=["__VIEWSTATEENCRYPTED","__VIEWSTATEFIELDCOUNT"];c._textTypes=/^(text|password|hidden|search|tel|url|email|number|range|color|datetime|date|month|week|time|datetime-local)$/i};e.prototype={get_isInAsyncPostBack:function(){return this._request!==a},add_beginRequest:function(a){Sys.Observer.addEventHandler(this,n,a)},remove_beginRequest:function(a){Sys.Observer.removeEventHandler(this,n,a)},add_endRequest:function(a){Sys.Observer.addEventHandler(this,o,a)},remove_endRequest:function(a){Sys.Observer.removeEventHandler(this,o,a)},add_initializeRequest:function(a){Sys.Observer.addEventHandler(this,p,a)},remove_initializeRequest:function(a){Sys.Observer.removeEventHandler(this,p,a)},add_pageLoaded:function(a){Sys.Observer.addEventHandler(this,q,a)},remove_pageLoaded:function(a){Sys.Observer.removeEventHandler(this,q,a)},add_pageLoading:function(a){Sys.Observer.addEventHandler(this,r,a)},remove_pageLoading:function(a){Sys.Observer.removeEventHandler(this,r,a)},abortPostBack:function(){var b=this;if(!b._processingRequest&&b._request){b._request.get_executor().abort();b._request=a}},beginAsyncPostBack:function(h,e,k,i,j){var d=this;if(i&&typeof Page_ClientValidate===u&&!Page_ClientValidate(j||a))return;d._postBackSettings=d._createPostBackSettings(c,h,e);var g=d._form;g.__EVENTTARGET.value=e||f;g.__EVENTARGUMENT.value=k||f;d._isCrossPost=b;d._additionalInput=a;d._onFormSubmit()},_cancelPendingCallbacks:function(){for(var b=0,g=window.__pendingCallbacks.length;b<g;b++){var e=window.__pendingCallbacks[b];if(e){if(!e.async)window.__synchronousCallBackIndex=d;window.__pendingCallbacks[b]=a;var f="__CALLBACKFRAME"+b,c=document.getElementById(f);c&&c.parentNode.removeChild(c)}}},_commitControls:function(b,d){var c=this;if(b){c._updatePanelIDs=b.updatePanelIDs;c._updatePanelClientIDs=b.updatePanelClientIDs;c._updatePanelHasChildrenAsTriggers=b.updatePanelHasChildrenAsTriggers;c._asyncPostBackControlIDs=b.asyncPostBackControlIDs;c._asyncPostBackControlClientIDs=b.asyncPostBackControlClientIDs;c._postBackControlIDs=b.postBackControlIDs;c._postBackControlClientIDs=b.postBackControlClientIDs}if(typeof d!==g&&d!==a)c._asyncPostBackTimeout=d*1e3},_createHiddenField:function(d,e){var b,a=document.getElementById(d);if(a)if(!a._isContained)a.parentNode.removeChild(a);else b=a.parentNode;if(!b){b=document.createElement("span");b.style.cssText="display:none !important";this._form.appendChild(b)}b.innerHTML="<input type='hidden' />";a=b.childNodes[0];a._isContained=c;a.id=a.name=d;a.value=e},_createPageRequestManagerTimeoutError:function(){var b="Sys.WebForms.PageRequestManagerTimeoutException: "+Sys.WebForms.Res.PRM_TimeoutError,a=Error.create(b,{name:"Sys.WebForms.PageRequestManagerTimeoutException"});a.popStackFrame();return a},_createPageRequestManagerServerError:function(a,d){var c="Sys.WebForms.PageRequestManagerServerErrorException: "+(d||String.format(Sys.WebForms.Res.PRM_ServerError,a)),b=Error.create(c,{name:"Sys.WebForms.PageRequestManagerServerErrorException",httpStatusCode:a});b.popStackFrame();return b},_createPageRequestManagerParserError:function(b){var c="Sys.WebForms.PageRequestManagerParserErrorException: "+String.format(Sys.WebForms.Res.PRM_ParserError,b),a=Error.create(c,{name:"Sys.WebForms.PageRequestManagerParserErrorException"});a.popStackFrame();return a},_createPanelID:function(e,b){var c=b.asyncTarget,a=this._ensureUniqueIds(e||b.panelsToUpdate),d=a instanceof Array?a.join(","):a||this._scriptManagerID;if(c)d+="|"+c;return encodeURIComponent(this._scriptManagerID)+h+encodeURIComponent(d)+"&"},_createPostBackSettings:function(d,a,c,b){return{async:d,asyncTarget:c,panelsToUpdate:a,sourceElement:b}},_convertToClientIDs:function(a,g,e,d){if(a)for(var b=0,i=a.length;b<i;b+=d?2:1){var c=a[b],h=(d?a[b+1]:f)||this._uniqueIDToClientID(c);Array.add(g,c);Array.add(e,h)}},dispose:function(){var b=this;Sys.Observer.clearEventHandlers(b);if(b._form){Sys.UI.DomEvent.removeHandler(b._form,j,b._onFormSubmitHandler);Sys.UI.DomEvent.removeHandler(b._form,"click",b._onFormElementClickHandler);Sys.UI.DomEvent.removeHandler(window,"unload",b._onWindowUnloadHandler);Sys.UI.DomEvent.removeHandler(window,i,b._pageLoadedHandler)}if(b._originalDoPostBack){window.__doPostBack=b._originalDoPostBack;b._originalDoPostBack=a}if(b._originalDoPostBackWithOptions){window.WebForm_DoPostBackWithOptions=b._originalDoPostBackWithOptions;b._originalDoPostBackWithOptions=a}if(b._originalFireDefaultButton){window.WebForm_FireDefaultButton=b._originalFireDefaultButton;b._originalFireDefaultButton=a}if(b._originalDoCallback){window.WebForm_DoCallback=b._originalDoCallback;b._originalDoCallback=a}b._form=a;b._updatePanelIDs=a;b._updatePanelClientIDs=a;b._asyncPostBackControlIDs=a;b._asyncPostBackControlClientIDs=a;b._postBackControlIDs=a;b._postBackControlClientIDs=a;b._asyncPostBackTimeout=a;b._scrollPosition=a},_doCallback:function(d,b,c,f,a,e){!this.get_isInAsyncPostBack()&&this._originalDoCallback(d,b,c,f,a,e)},_doPostBack:function(e,l){var d=this;d._additionalInput=a;var j=d._form;if(e===a||typeof e===g||d._isCrossPost){d._postBackSettings=d._createPostBackSettings(b);d._isCrossPost=b}else{var f=d._masterPageUniqueID,k=d._uniqueIDToClientID(e),i=document.getElementById(k);if(!i&&f)if(k.indexOf(f+"$")===0)i=document.getElementById(k.substr(f.length+1));if(!i)if(Array.contains(d._asyncPostBackControlIDs,e))d._postBackSettings=d._createPostBackSettings(c,a,e);else if(Array.contains(d._postBackControlIDs,e))d._postBackSettings=d._createPostBackSettings(b);else{var h=d._findNearestElement(e);if(h)d._postBackSettings=d._getPostBackSettings(h,e);else{if(f){f+="$";if(e.indexOf(f)===0)h=d._findNearestElement(e.substr(f.length))}if(h)d._postBackSettings=d._getPostBackSettings(h,e);else d._postBackSettings=d._createPostBackSettings(b)}}else d._postBackSettings=d._getPostBackSettings(i,e)}if(!d._postBackSettings.async){j.onsubmit=d._onsubmit;d._originalDoPostBack(e,l);j.onsubmit=a;return}j.__EVENTTARGET.value=e;j.__EVENTARGUMENT.value=l;d._onFormSubmit()},_doPostBackWithOptions:function(a){this._isCrossPost=a&&a.actionUrl;this._originalDoPostBackWithOptions(a)},_elementContains:function(d,a){while(a){if(a===d)return c;a=a.parentNode}return b},_endPostBack:function(d,f,g){var c=this;if(c._request===f.get_webRequest()){c._processingRequest=b;c._additionalInput=a;c._request=a}var e=new Sys.WebForms.EndRequestEventArgs(d,g?g.dataItems:{},f);Sys.Observer.raiseEvent(c,o,e);if(d&&!e.get_errorHandled())throw d;},_ensureUniqueIds:function(a){if(!a)return a;a=a instanceof Array?a:[a];for(var c=[],b=0,g=a.length;b<g;b++){var f=a[b],e=Array.indexOf(this._updatePanelClientIDs,f);c.push(e>d?this._updatePanelIDs[e]:f)}return c},_findNearestElement:function(b){while(b.length>0){var f=this._uniqueIDToClientID(b),e=document.getElementById(f);if(e)return e;var c=b.lastIndexOf("$");if(c===d)return a;b=b.substring(0,c)}return a},_findText:function(b,a){var c=Math.max(0,a-20),d=Math.min(b.length,a+20);return b.substring(c,d)},_fireDefaultButton:function(d,h){if(d.keyCode===13){var f=d.srcElement||d.target;if(!f||f.tagName.toLowerCase()!=="textarea"){var e=document.getElementById(h);if(e&&typeof e.click!==g){this._activeDefaultButton=e;this._activeDefaultButtonClicked=b;try{e.click()}finally{this._activeDefaultButton=a}d.cancelBubble=c;typeof d.stopPropagation===u&&d.stopPropagation();return b}}}return c},_getPageLoadedEventArgs:function(r,g){var q=[],p=[],o=g?g.version4:b,h=g?g.updatePanelData:a,i,k,l,e;if(!h){i=this._updatePanelIDs;k=this._updatePanelClientIDs;l=a;e=a}else{i=h.updatePanelIDs;k=h.updatePanelClientIDs;l=h.childUpdatePanelIDs;e=h.panelsToRefreshIDs}var c,j,n,m;if(e)for(c=0,j=e.length;c<j;c+=o?2:1){n=e[c];m=(o?e[c+1]:f)||this._uniqueIDToClientID(n);Array.add(q,document.getElementById(m))}for(c=0,j=i.length;c<j;c++)(r||Array.indexOf(l,i[c])!==d)&&Array.add(p,document.getElementById(k[c]));return new Sys.WebForms.PageLoadedEventArgs(q,p,g?g.dataItems:{})},_getPageLoadingEventArgs:function(h){var l=[],k=[],c=h.updatePanelData,m=c.oldUpdatePanelIDs,n=c.oldUpdatePanelClientIDs,p=c.updatePanelIDs,o=c.childUpdatePanelIDs,e=c.panelsToRefreshIDs,a,g,b,i,j=h.version4;for(a=0,g=e.length;a<g;a+=j?2:1){b=e[a];i=(j?e[a+1]:f)||this._uniqueIDToClientID(b);Array.add(l,document.getElementById(i))}for(a=0,g=m.length;a<g;a++){b=m[a];Array.indexOf(e,b)===d&&(Array.indexOf(p,b)===d||Array.indexOf(o,b)>d)&&Array.add(k,document.getElementById(n[a]))}return new Sys.WebForms.PageLoadingEventArgs(l,k,h.dataItems)},_getPostBackSettings:function(f,h){var e=this,i=f,g=a;while(f){if(f.id){if(!g&&Array.contains(e._asyncPostBackControlClientIDs,f.id))g=e._createPostBackSettings(c,a,h,i);else if(!g&&Array.contains(e._postBackControlClientIDs,f.id))return e._createPostBackSettings(b);else{var j=Array.indexOf(e._updatePanelClientIDs,f.id);if(j!==d)return e._updatePanelHasChildrenAsTriggers[j]?e._createPostBackSettings(c,[e._updatePanelIDs[j]],h,i):e._createPostBackSettings(c,a,h,i)}if(!g&&e._matchesParentIDInList(f.id,e._asyncPostBackControlClientIDs))g=e._createPostBackSettings(c,a,h,i);else if(!g&&e._matchesParentIDInList(f.id,e._postBackControlClientIDs))return e._createPostBackSettings(b)}f=f.parentNode}return!g?e._createPostBackSettings(b):g},_getScrollPosition:function(){var b=this,a=document.documentElement;if(a&&(b._validPosition(a.scrollLeft)||b._validPosition(a.scrollTop)))return{x:a.scrollLeft,y:a.scrollTop};else{a=document.body;return a&&(b._validPosition(a.scrollLeft)||b._validPosition(a.scrollTop))?{x:a.scrollLeft,y:a.scrollTop}:b._validPosition(window.pageXOffset)||b._validPosition(window.pageYOffset)?{x:window.pageXOffset,y:window.pageYOffset}:{x:0,y:0}}},_initializeInternal:function(k,l,d,e,h,f,g){var b=this;if(b._prmInitialized)throw Error.invalidOperation(Sys.WebForms.Res.PRM_CannotRegisterTwice);b._prmInitialized=c;b._masterPageUniqueID=g;b._scriptManagerID=k;b._form=Sys.UI.DomElement.resolveElement(l);b._onsubmit=b._form.onsubmit;b._form.onsubmit=a;b._onFormSubmitHandler=Function.createDelegate(b,b._onFormSubmit);b._onFormElementClickHandler=Function.createDelegate(b,b._onFormElementClick);b._onWindowUnloadHandler=Function.createDelegate(b,b._onWindowUnload);Sys.UI.DomEvent.addHandler(b._form,j,b._onFormSubmitHandler);Sys.UI.DomEvent.addHandler(b._form,"click",b._onFormElementClickHandler);Sys.UI.DomEvent.addHandler(window,"unload",b._onWindowUnloadHandler);b._originalDoPostBack=window.__doPostBack;if(b._originalDoPostBack)window.__doPostBack=Function.createDelegate(b,b._doPostBack);b._originalDoPostBackWithOptions=window.WebForm_DoPostBackWithOptions;if(b._originalDoPostBackWithOptions)window.WebForm_DoPostBackWithOptions=Function.createDelegate(b,b._doPostBackWithOptions);b._originalFireDefaultButton=window.WebForm_FireDefaultButton;if(b._originalFireDefaultButton)window.WebForm_FireDefaultButton=Function.createDelegate(b,b._fireDefaultButton);b._originalDoCallback=window.WebForm_DoCallback;if(b._originalDoCallback)window.WebForm_DoCallback=Function.createDelegate(b,b._doCallback);b._pageLoadedHandler=Function.createDelegate(b,b._pageLoadedInitialLoad);Sys.UI.DomEvent.addHandler(window,i,b._pageLoadedHandler);d&&b._updateControls(d,e,h,f,c)},_matchesParentIDInList:function(e,d){for(var a=0,f=d.length;a<f;a++)if(e.startsWith(d[a]+"_"))return c;return b},_onFormElementActive:function(a,e,f){var b=this;if(a.disabled)return;b._postBackSettings=b._getPostBackSettings(a,a.name);if(a.name){var c=a.tagName.toUpperCase();if(c==="INPUT"){var d=a.type;if(d===j)b._additionalInput=encodeURIComponent(a.name)+h+encodeURIComponent(a.value);else if(d==="image")b._additionalInput=encodeURIComponent(a.name)+".x="+e+"&"+encodeURIComponent(a.name)+".y="+f}else if(c==="BUTTON"&&a.name.length!==0&&a.type===j)b._additionalInput=encodeURIComponent(a.name)+h+encodeURIComponent(a.value)}},_onFormElementClick:function(a){this._activeDefaultButtonClicked=a.target===this._activeDefaultButton;this._onFormElementActive(a.target,a.offsetX,a.offsetY)},_onFormSubmit:function(r){var e=this,m,C,q=c,D=e._isCrossPost;e._isCrossPost=b;if(e._onsubmit)q=e._onsubmit();if(q)for(m=0,C=e._onSubmitStatements.length;m<C;m++)if(!e._onSubmitStatements[m]()){q=b;break}if(!q){r&&r.preventDefault();return}var v=e._form;if(D)return;e._activeDefaultButton&&!e._activeDefaultButtonClicked&&e._onFormElementActive(e._activeDefaultButton,0,0);if(!e._postBackSettings||!e._postBackSettings.async)return;var f=new Sys.StringBuilder,F=v.elements.length,z=e._createPanelID(a,e._postBackSettings);f.append(z);for(m=0;m<F;m++){var l=v.elements[m],o=l.name;if(typeof o===g||o===a||o.length===0||o===e._scriptManagerID)continue;var u=l.tagName.toUpperCase();if(u==="INPUT"){var w=l.type;if(e._textTypes.test(w)||(w==="checkbox"||w==="radio")&&l.checked){f.append(encodeURIComponent(o));f.append(h);f.append(encodeURIComponent(l.value));f.append("&")}}else if(u==="SELECT")for(var E=l.options.length,x=0;x<E;x++){var A=l.options[x];if(A.selected){f.append(encodeURIComponent(o));f.append(h);f.append(encodeURIComponent(A.value));f.append("&")}}else if(u==="TEXTAREA"){f.append(encodeURIComponent(o));f.append(h);f.append(encodeURIComponent(l.value));f.append("&")}}f.append("__ASYNCPOST=true&");if(e._additionalInput){f.append(e._additionalInput);e._additionalInput=a}var i=new Sys.Net.WebRequest,j=v.action;if(Sys.Browser.agent===Sys.Browser.InternetExplorer){var y=j.indexOf("#");if(y!==d)j=j.substr(0,y);var t=j.indexOf("?");if(t!==d){var B=j.substr(0,t);if(B.indexOf("%")===d)j=encodeURI(B)+j.substr(t)}else if(j.indexOf("%")===d)j=encodeURI(j)}i.set_url(j);i.get_headers()["X-MicrosoftAjax"]="Delta=true";i.get_headers()["Cache-Control"]="no-cache";i.set_timeout(e._asyncPostBackTimeout);i.add_completed(Function.createDelegate(e,e._onFormSubmitCompleted));i.set_body(f.toString());var s,k;s=e._postBackSettings.panelsToUpdate;k=new Sys.WebForms.InitializeRequestEventArgs(i,e._postBackSettings.sourceElement,s);Sys.Observer.raiseEvent(e,p,k);q=!k.get_cancel();if(!q){r&&r.preventDefault();return}if(k&&k._updated){s=k.get_updatePanelsToUpdate();i.set_body(i.get_body().replace(z,e._createPanelID(s,e._postBackSettings)))}e._scrollPosition=e._getScrollPosition();e.abortPostBack();k=new Sys.WebForms.BeginRequestEventArgs(i,e._postBackSettings.sourceElement,s||e._postBackSettings.panelsToUpdate);Sys.Observer.raiseEvent(e,n,k);e._originalDoCallback&&e._cancelPendingCallbacks();e._request=i;e._processingRequest=b;i.invoke();r&&r.preventDefault()},_onFormSubmitCompleted:function(h){var d=this;d._processingRequest=c;if(h.get_timedOut()){d._endPostBack(d._createPageRequestManagerTimeoutError(),h,a);return}if(h.get_aborted()){d._endPostBack(a,h,a);return}if(!d._request||h.get_webRequest()!==d._request)return;if(h.get_statusCode()!==200){d._endPostBack(d._createPageRequestManagerServerError(h.get_statusCode()),h,a);return}var e=d._parseDelta(h);if(!e)return;var g,j;if(e.asyncPostBackControlIDsNode&&e.postBackControlIDsNode&&e.updatePanelIDsNode&&e.panelsToRefreshNode&&e.childUpdatePanelIDsNode){var x=d._updatePanelIDs,t=d._updatePanelClientIDs,n=e.childUpdatePanelIDsNode.content,v=n.length?n.split(","):[],s=d._splitNodeIntoArray(e.asyncPostBackControlIDsNode),u=d._splitNodeIntoArray(e.postBackControlIDsNode),w=d._splitNodeIntoArray(e.updatePanelIDsNode),l=d._splitNodeIntoArray(e.panelsToRefreshNode),m=e.version4;for(g=0,j=l.length;g<j;g+=m?2:1){var o=(m?l[g+1]:f)||d._uniqueIDToClientID(l[g]);if(!document.getElementById(o)){d._endPostBack(Error.invalidOperation(String.format(Sys.WebForms.Res.PRM_MissingPanel,o)),h,e);return}}var k=d._processUpdatePanelArrays(w,s,u,m);k.oldUpdatePanelIDs=x;k.oldUpdatePanelClientIDs=t;k.childUpdatePanelIDs=v;k.panelsToRefreshIDs=l;e.updatePanelData=k}e.dataItems={};var i;for(g=0,j=e.dataItemNodes.length;g<j;g++){i=e.dataItemNodes[g];e.dataItems[i.id]=i.content}for(g=0,j=e.dataItemJsonNodes.length;g<j;g++){i=e.dataItemJsonNodes[g];e.dataItems[i.id]=Sys.Serialization.JavaScriptSerializer.deserialize(i.content)}var q=Sys.Observer._getContext(d,c).events.getHandler(r);q&&q(d,d._getPageLoadingEventArgs(e));Sys._ScriptLoader.readLoadedScripts();Sys.Application.beginCreateComponents();var p=Sys._ScriptLoader.getInstance();d._queueScripts(p,e.scriptBlockNodes,c,b);d._processingRequest=c;p.loadScripts(0,Function.createDelegate(d,Function.createCallback(d._scriptIncludesLoadComplete,e)),Function.createDelegate(d,Function.createCallback(d._scriptIncludesLoadFailed,e)),a)},_onWindowUnload:function(){this.dispose()},_pageLoaded:function(a,b){Sys.Observer.raiseEvent(this,q,this._getPageLoadedEventArgs(a,b));!a&&Sys.Application.raiseLoad()},_pageLoadedInitialLoad:function(){this._pageLoaded(c,a)},_parseDelta:function(n){var h=this,g=n.get_responseData(),i,o,K,L,J,f=0,j=a,p=[];while(f<g.length){i=g.indexOf("|",f);if(i===d){j=h._findText(g,f);break}o=parseInt(g.substring(f,i),10);if(o%1!==0){j=h._findText(g,f);break}f=i+1;i=g.indexOf("|",f);if(i===d){j=h._findText(g,f);break}K=g.substring(f,i);f=i+1;i=g.indexOf("|",f);if(i===d){j=h._findText(g,f);break}L=g.substring(f,i);f=i+1;if(f+o>=g.length){j=h._findText(g,g.length);break}J=g.substr(f,o);f+=o;if(g.charAt(f)!=="|"){j=h._findText(g,f);break}f++;Array.add(p,{type:K,id:L,content:J})}if(j){h._endPostBack(h._createPageRequestManagerParserError(String.format(Sys.WebForms.Res.PRM_ParserErrorDetails,j)),n,a);return a}for(var D=[],B=[],v=[],C=[],y=[],I=[],G=[],F=[],A=[],x=[],r,u,z,s,t,w,E,m,q=0,M=p.length;q<M;q++){var e=p[q];switch(e.type){case"#":m=e;break;case"updatePanel":Array.add(D,e);break;case"hiddenField":Array.add(B,e);break;case"arrayDeclaration":Array.add(v,e);break;case"scriptBlock":Array.add(C,e);break;case"scriptStartupBlock":Array.add(y,e);break;case"expando":Array.add(I,e);break;case"onSubmit":Array.add(G,e);break;case"asyncPostBackControlIDs":r=e;break;case"postBackControlIDs":u=e;break;case"updatePanelIDs":z=e;break;case"asyncPostBackTimeout":s=e;break;case"childUpdatePanelIDs":t=e;break;case"panelsToRefreshIDs":w=e;break;case"formAction":E=e;break;case"dataItem":Array.add(F,e);break;case"dataItemJson":Array.add(A,e);break;case"scriptDispose":Array.add(x,e);break;case"pageRedirect":if(m&&parseFloat(m.content)>=4)e.content=unescape(e.content);if(Sys.Browser.agent===Sys.Browser.InternetExplorer){var k=document.createElement("a");k.style.display="none";k.attachEvent("onclick",H);k.href=e.content;h._form.parentNode.insertBefore(k,h._form);k.click();k.detachEvent("onclick",H);h._form.parentNode.removeChild(k);function H(a){a.cancelBubble=c}}else window.location.href=e.content;return a;case l:h._endPostBack(h._createPageRequestManagerServerError(Number.parseInvariant(e.id),e.content),n,a);return a;case"pageTitle":document.title=e.content;break;case"focus":h._controlIDToFocus=e.content;break;default:h._endPostBack(h._createPageRequestManagerParserError(String.format(Sys.WebForms.Res.PRM_UnknownToken,e.type)),n,a);return a}}return{version4:m?parseFloat(m.content)>=4:b,executor:n,updatePanelNodes:D,hiddenFieldNodes:B,arrayDeclarationNodes:v,scriptBlockNodes:C,scriptStartupNodes:y,expandoNodes:I,onSubmitNodes:G,dataItemNodes:F,dataItemJsonNodes:A,scriptDisposeNodes:x,asyncPostBackControlIDsNode:r,postBackControlIDsNode:u,updatePanelIDsNode:z,asyncPostBackTimeoutNode:s,childUpdatePanelIDsNode:t,panelsToRefreshNode:w,formActionNode:E}},_processUpdatePanelArrays:function(e,r,s,g){var d,c,b;if(e){var j=e.length,k=g?2:1;d=new Array(j/k);c=new Array(j/k);b=new Array(j/k);for(var h=0,i=0;h<j;h+=k,i++){var q,a=e[h],l=g?e[h+1]:f;q=a.charAt(0)==="t";a=a.substr(1);if(!l)l=this._uniqueIDToClientID(a);b[i]=q;d[i]=a;c[i]=l}}else{d=[];c=[];b=[]}var o=[],m=[];this._convertToClientIDs(r,o,m,g);var p=[],n=[];this._convertToClientIDs(s,p,n,g);return{updatePanelIDs:d,updatePanelClientIDs:c,updatePanelHasChildrenAsTriggers:b,asyncPostBackControlIDs:o,asyncPostBackControlClientIDs:m,postBackControlIDs:p,postBackControlClientIDs:n}},_queueScripts:function(d,b,e,f){for(var a=0,h=b.length;a<h;a++){var g=b[a].id;switch(g){case"ScriptContentNoTags":if(!f)continue;d.queueScriptBlock(b[a].content);break;case"ScriptContentWithTags":var c=window.eval("("+b[a].content+")");if(c.src){if(!e||Sys._ScriptLoader.isScriptLoaded(c.src))continue}else if(!f)continue;d.queueCustomScriptTag(c);break;case"ScriptPath":if(!e||Sys._ScriptLoader.isScriptLoaded(b[a].content))continue;d.queueScriptReference(b[a].content)}}},_registerDisposeScript:function(a,b){if(!this._scriptDisposes[a])this._scriptDisposes[a]=[b];else Array.add(this._scriptDisposes[a],b)},_scriptIncludesLoadComplete:function(j,e){var i=this;if(e.executor.get_webRequest()!==i._request)return;i._commitControls(e.updatePanelData,e.asyncPostBackTimeoutNode?e.asyncPostBackTimeoutNode.content:a);if(e.formActionNode)i._form.action=e.formActionNode.content;var d,h,g;for(d=0,h=e.updatePanelNodes.length;d<h;d++){g=e.updatePanelNodes[d];var o=document.getElementById(g.id);if(!o){i._endPostBack(Error.invalidOperation(String.format(Sys.WebForms.Res.PRM_MissingPanel,g.id)),e.executor,e);return}i._updatePanel(o,g.content)}for(d=0,h=e.scriptDisposeNodes.length;d<h;d++){g=e.scriptDisposeNodes[d];i._registerDisposeScript(g.id,g.content)}for(d=0,h=i._transientFields.length;d<h;d++){var l=document.getElementById(i._transientFields[d]);if(l){var p=l._isContained?l.parentNode:l;p.parentNode.removeChild(p)}}for(d=0,h=e.hiddenFieldNodes.length;d<h;d++){g=e.hiddenFieldNodes[d];i._createHiddenField(g.id,g.content)}if(e.scriptsFailed)throw Sys._ScriptLoader._errorScriptLoadFailed(e.scriptsFailed.src,e.scriptsFailed.multipleCallbacks);i._queueScripts(j,e.scriptBlockNodes,b,c);var n=f;for(d=0,h=e.arrayDeclarationNodes.length;d<h;d++){g=e.arrayDeclarationNodes[d];n+="Sys.WebForms.PageRequestManager._addArrayElement('"+g.id+"', "+g.content+");\r\n"}var m=f;for(d=0,h=e.expandoNodes.length;d<h;d++){g=e.expandoNodes[d];m+=g.id+" = "+g.content+"\r\n"}n.length&&j.queueScriptBlock(n);m.length&&j.queueScriptBlock(m);i._queueScripts(j,e.scriptStartupNodes,c,c);var k=f;for(d=0,h=e.onSubmitNodes.length;d<h;d++){if(d===0)k="Array.add(Sys.WebForms.PageRequestManager.getInstance()._onSubmitStatements, function() {\r\n";k+=e.onSubmitNodes[d].content+"\r\n"}if(k.length){k+="\r\nreturn true;\r\n});\r\n";j.queueScriptBlock(k)}j.loadScripts(0,Function.createDelegate(i,Function.createCallback(i._scriptsLoadComplete,e)),a,a)},_scriptIncludesLoadFailed:function(d,c,b,a){a.scriptsFailed={src:c.src,multipleCallbacks:b};this._scriptIncludesLoadComplete(d,a)},_scriptsLoadComplete:function(k,h){var c=this,j=h.executor;if(window.__theFormPostData)window.__theFormPostData=f;if(window.__theFormPostCollection)window.__theFormPostCollection=[];window.WebForm_InitCallback&&window.WebForm_InitCallback();if(c._scrollPosition){window.scrollTo&&window.scrollTo(c._scrollPosition.x,c._scrollPosition.y);c._scrollPosition=a}Sys.Application.endCreateComponents();c._pageLoaded(b,h);c._endPostBack(a,j,h);if(c._controlIDToFocus){var d,i;if(Sys.Browser.agent===Sys.Browser.InternetExplorer){var e=$get(c._controlIDToFocus);d=e;if(e&&!WebForm_CanFocus(e))d=WebForm_FindFirstFocusableChild(e);if(d&&typeof d.contentEditable!==g){i=d.contentEditable;d.contentEditable=b}else d=a}WebForm_AutoFocus(c._controlIDToFocus);if(d)d.contentEditable=i;c._controlIDToFocus=a}},_splitNodeIntoArray:function(b){var a=b.content,c=a.length?a.split(","):[];return c},_uniqueIDToClientID:function(a){return a.replace(/\$/g,"_")},_updateControls:function(d,a,c,b,e){this._commitControls(this._processUpdatePanelArrays(d,a,c,e),b)},_updatePanel:function(b,g){var a=this;for(var d in a._scriptDisposes)if(a._elementContains(b,document.getElementById(d))){for(var f=a._scriptDisposes[d],e=0,h=f.length;e<h;e++)window.eval(f[e]);delete a._scriptDisposes[d]}Sys.Application.disposeElement(b,c);b.innerHTML=g},_validPosition:function(b){return typeof b!==g&&b!==a&&b!==0}};e.getInstance=function(){var a=Sys.WebForms.PageRequestManager._instance;if(!a)a=Sys.WebForms.PageRequestManager._instance=new Sys.WebForms.PageRequestManager;return a};e._addArrayElement=function(a){if(!window[a])window[a]=[];for(var b=1,c=arguments.length;b<c;b++)Array.add(window[a],arguments[b])};e._initialize=function(){var a=Sys.WebForms.PageRequestManager.getInstance();a._initializeInternal.apply(a,arguments)};e.registerClass("Sys.WebForms.PageRequestManager");e=Sys.UI._UpdateProgress=function(d){var b=this;Sys.UI._UpdateProgress.initializeBase(b,[d]);b._displayAfter=500;b._dynamicLayout=c;b._associatedUpdatePanelId=a;b._beginRequestHandlerDelegate=a;b._startDelegate=a;b._endRequestHandlerDelegate=a;b._pageRequestManager=a;b._timerCookie=a};e.prototype={get_displayAfter:function(){return this._displayAfter},set_displayAfter:function(a){this._displayAfter=a},get_dynamicLayout:function(){return this._dynamicLayout},set_dynamicLayout:function(a){this._dynamicLayout=a},get_associatedUpdatePanelId:function(){return this._associatedUpdatePanelId},set_associatedUpdatePanelId:function(a){this._associatedUpdatePanelId=a},get_role:function(){return k},_clearTimeout:function(){if(this._timerCookie){window.clearTimeout(this._timerCookie);this._timerCookie=a}},_getUniqueID:function(c){var b=Array.indexOf(this._pageRequestManager._updatePanelClientIDs,c);return b===d?a:this._pageRequestManager._updatePanelIDs[b]},_handleBeginRequest:function(i,h){var a=this,e=h.get_postBackElement(),d=c,g=a._associatedUpdatePanelId;if(a._associatedUpdatePanelId){var f=h.get_updatePanelsToUpdate();if(f&&f.length)d=Array.contains(f,g)||Array.contains(f,a._getUniqueID(g));else d=b}while(!d&&e){if(e.id&&a._associatedUpdatePanelId===e.id)d=c;e=e.parentNode}if(d)a._timerCookie=window.setTimeout(a._startDelegate,a._displayAfter)},_startRequest:function(){var b=this;if(b._pageRequestManager.get_isInAsyncPostBack()){var c=b.get_element();if(b._dynamicLayout)c.style.display="block";else c.style.visibility="visible";b.get_role()===k&&c.setAttribute(s,"false")}b._timerCookie=a},_handleEndRequest:function(){var a=this,b=a.get_element();if(a._dynamicLayout)b.style.display="none";else b.style.visibility="hidden";a.get_role()===k&&b.setAttribute(s,"true");a._clearTimeout()},dispose:function(){var b=this;if(b._beginRequestHandlerDelegate!==a){b._pageRequestManager.remove_beginRequest(b._beginRequestHandlerDelegate);b._pageRequestManager.remove_endRequest(b._endRequestHandlerDelegate);b._beginRequestHandlerDelegate=a;b._endRequestHandlerDelegate=a}b._clearTimeout();Sys.UI._UpdateProgress.callBaseMethod(b,"dispose")},initialize:function(){var b=this;Sys.UI._UpdateProgress.callBaseMethod(b,"initialize");b.get_role()===k&&b.get_element().setAttribute(s,"true");b._beginRequestHandlerDelegate=Function.createDelegate(b,b._handleBeginRequest);b._endRequestHandlerDelegate=Function.createDelegate(b,b._handleEndRequest);b._startDelegate=Function.createDelegate(b,b._startRequest);if(Sys.WebForms&&Sys.WebForms.PageRequestManager)b._pageRequestManager=Sys.WebForms.PageRequestManager.getInstance();if(b._pageRequestManager!==a){b._pageRequestManager.add_beginRequest(b._beginRequestHandlerDelegate);b._pageRequestManager.add_endRequest(b._endRequestHandlerDelegate)}}};e.registerClass("Sys.UI._UpdateProgress",Sys.UI.Control)}if(window.Sys&&Sys.loader)Sys.loader.registerScript("WebForms",["ComponentModel","Serialization","Network"],a);else a()})();Type.registerNamespace("Sys.WebForms");Sys.WebForms.Res={PRM_CannotRegisterTwice:"The PageRequestManager cannot be initialized more than once.",PRM_MissingPanel:"Could not find UpdatePanel with ID '{0}'. If it is being updated dynamically then it must be inside another UpdatePanel.",PRM_ParserError:"The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.\r\nDetails: {0}",PRM_ParserErrorDetails:"Error parsing near '{0}'.",PRM_ServerError:"An unknown error occurred while processing the request on the server. The status code returned from the server was: {0}",PRM_TimeoutError:"The server request timed out.",PRM_UnknownToken:"Unknown token: '{0}'."};
// (c) 2010 CodePlex Foundation
(function(){var a=null;function b(){var i="Sys.Services.RoleService.load",h="Sys.Services.AuthenticationService.logout",j="undefined",e="Sys.Services.AuthenticationService.login",g="Sys.Services.ProfileService.save",f="Sys.Services.ProfileService.load",d=true,b=false;Type._registerScript("MicrosoftAjaxApplicationServices.js",["MicrosoftAjaxWebServices.js"]);var c,k;Type.registerNamespace("Sys.Services");Sys._defaultPath=Sys.Services._ProfileService.DefaultWebServicePath;c=Sys.Services._ProfileService=function(){Sys.Services._ProfileService.initializeBase(this);this.properties={}};c.DefaultWebServicePath=Sys._defaultPath||"";delete Sys._defaultPath;c.prototype={_defaultLoadCompletedCallback:a,_defaultSaveCompletedCallback:a,_path:"",_timeout:0,get_defaultLoadCompletedCallback:function(){return this._defaultLoadCompletedCallback},set_defaultLoadCompletedCallback:function(a){this._defaultLoadCompletedCallback=a},get_defaultSaveCompletedCallback:function(){return this._defaultSaveCompletedCallback},set_defaultSaveCompletedCallback:function(a){this._defaultSaveCompletedCallback=a},get_path:function(){return this._path||""},load:function(e,f,g,h){var a=this,d,c;if(!e){c="GetAllPropertiesForCurrentUser";d={authenticatedUserOnly:b}}else{c="GetPropertiesForCurrentUser";d={properties:a._clonePropertyNames(e),authenticatedUserOnly:b}}a._invoke(a._get_path(),c,b,d,Function.createDelegate(a,a._onLoadComplete),Function.createDelegate(a,a._onLoadFailed),[f,g,h])},save:function(f,d,e,g){var a=this,c=a._flattenProperties(f,a.properties);a._invoke(a._get_path(),"SetPropertiesForCurrentUser",b,{values:c.value,authenticatedUserOnly:b},Function.createDelegate(a,a._onSaveComplete),Function.createDelegate(a,a._onSaveFailed),[d,e,g,c.count])},_clonePropertyNames:function(f){for(var c=[],e={},b=0;b<f.length;b++){var a=f[b];if(!e[a]){Array.add(c,a);e[a]=d}}return c},_flattenProperties:function(a,h,i){var b={},d,c,f=0;if(a&&a.length===0)return{value:b,count:0};for(var e in h){d=h[e];c=i?i+"."+e:e;if(Sys.Services.ProfileGroup.isInstanceOfType(d)){var k=this._flattenProperties(a,d,c),g=k.value;f+=k.count;for(var j in g){var l=g[j];b[j]=l}}else if(!a||Array.indexOf(a,c)!==-1){b[c]=d;f++}}return{value:b,count:f}},_get_path:function(){var a=this.get_path();if(!a.length)a=Sys.Services._ProfileService.DefaultWebServicePath;if(!a||!a.length)throw Error.invalidOperation(Sys.Res.servicePathNotSet);return a},_onLoadComplete:function(b,e,i){var a=this;if(typeof b!=="object")throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,i,"Object"));var c=a._unflattenProperties(b);for(var g in c)a.properties[g]=c[g];var d=e[0]||a.get_defaultLoadCompletedCallback()||a.get_defaultSucceededCallback();if(d){var h=e[2]||a.get_defaultUserContext();d(b.length,h,f)}},_onLoadFailed:function(d,b){var a=b[1]||this.get_defaultFailedCallback();if(a){var c=b[2]||this.get_defaultUserContext();a(d,c,f)}},_onSaveComplete:function(b,c,h){var d=c[3];if(b!==a)if(b instanceof Array)d-=b.length;else if(typeof b==="number")d=b;else throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,h,"Array"));var e=c[0]||this.get_defaultSaveCompletedCallback()||this.get_defaultSucceededCallback();if(e){var f=c[2]||this.get_defaultUserContext();e(d,f,g)}},_onSaveFailed:function(d,b){var a=b[1]||this.get_defaultFailedCallback();if(a){var c=b[2]||this.get_defaultUserContext();a(d,c,g)}},_unflattenProperties:function(e){var c={},d,f,h=0;for(var a in e){h++;f=e[a];d=a.indexOf(".");if(d!==-1){var g=a.substr(0,d);a=a.substr(d+1);var b=c[g];if(!b||!Sys.Services.ProfileGroup.isInstanceOfType(b)){b=new Sys.Services.ProfileGroup;c[g]=b}b[a]=f}else c[a]=f}e.length=h;return c}};c.registerClass("Sys.Services._ProfileService",Sys.Net.WebServiceProxy);c=Sys.Services.ProfileGroup=function(a){if(a)for(var b in a)this[b]=a[b]};c.registerClass("Sys.Services.ProfileGroup");Sys._path=Sys.Services.ProfileService._path;Sys._properties=Sys.Services.ProfileService.properties;c=Sys.Services.ProfileService=new Sys.Services._ProfileService;if(Sys._path){c.set_path(Sys._path);delete Sys._path}if(Sys._properties){c.properties=Sys._properties;(function(b){for(var c in b){var a=b[c];if(a&&a._propertygroup)Sys.Services.ProfileService.properties[c]=new Sys.Services.ProfileGroup(a._propertygroup)}})(Sys._properties);delete Sys._properties}Sys._defaultPath=Sys.Services._AuthenticationService.DefaultWebServicePath;c=Sys.Services._AuthenticationService=function(){Sys.Services._AuthenticationService.initializeBase(this)};c.DefaultWebServicePath=Sys._defaultPath||"";delete Sys._defaultPath;c.prototype={_defaultLoginCompletedCallback:a,_defaultLogoutCompletedCallback:a,_path:"",_timeout:0,_authenticated:b,get_defaultLoginCompletedCallback:function(){return this._defaultLoginCompletedCallback},set_defaultLoginCompletedCallback:function(a){this._defaultLoginCompletedCallback=a},get_defaultLogoutCompletedCallback:function(){return this._defaultLogoutCompletedCallback},set_defaultLogoutCompletedCallback:function(a){this._defaultLogoutCompletedCallback=a},get_isLoggedIn:function(){return this._authenticated},get_path:function(){return this._path||""},login:function(e,d,c,j,h,f,g,i){var a=this;a._invoke(a._get_path(),"Login",b,{userName:e,password:d,createPersistentCookie:c},Function.createDelegate(a,a._onLoginComplete),Function.createDelegate(a,a._onLoginFailed),[e,d,c,j,h,f,g,i])},logout:function(e,c,d,f){var a=this;a._invoke(a._get_path(),"Logout",b,{},Function.createDelegate(a,a._onLogoutComplete),Function.createDelegate(a,a._onLogoutFailed),[e,c,d,f])},_get_path:function(){var a=this.get_path();if(!a.length)a=Sys.Services._AuthenticationService.DefaultWebServicePath;if(!a||!a.length)throw Error.invalidOperation(Sys.Res.servicePathNotSet);return a},_onLoginComplete:function(k,h,l){var f=this;if(typeof k!=="boolean")throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,l,"Boolean"));var g=h[4],i=h[7]||f.get_defaultUserContext(),c=h[5]||f.get_defaultLoginCompletedCallback()||f.get_defaultSucceededCallback();if(k){f._authenticated=d;c&&c(d,i,e);if(typeof g!==j&&g!==a)window.location.href=g}else c&&c(b,i,e)},_onLoginFailed:function(d,b){var a=b[6]||this.get_defaultFailedCallback();if(a){var c=b[7]||this.get_defaultUserContext();a(d,c,e)}},_onLogoutComplete:function(j,d,i){var c=this;if(j!==a)throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,i,"null"));var e=d[0],g=d[3]||c.get_defaultUserContext(),f=d[1]||c.get_defaultLogoutCompletedCallback()||c.get_defaultSucceededCallback();c._authenticated=b;f&&f(a,g,h);if(!e)window.location.reload();else window.location.href=e},_onLogoutFailed:function(c,b){var a=b[2]||this.get_defaultFailedCallback();a&&a(c,b[3],h)},_setAuthenticated:function(a){this._authenticated=a}};c.registerClass("Sys.Services._AuthenticationService",Sys.Net.WebServiceProxy);Sys._path=Sys.Services.AuthenticationService._path;Sys._auth=Sys.Services.AuthenticationService._auth;c=Sys.Services.AuthenticationService=new Sys.Services._AuthenticationService;if(Sys._path){c.set_path(Sys._path);delete Sys._path}if(typeof Sys._auth!==j){c._authenticated=Sys._auth;delete Sys._auth}Sys._defaultPath=Sys.Services._RoleService.DefaultWebServicePath;c=Sys.Services._RoleService=function(){Sys.Services._RoleService.initializeBase(this);this._roles=[]};c.DefaultWebServicePath=Sys._defaultPath||"";delete Sys._defaultPath;c.prototype={_defaultLoadCompletedCallback:a,_rolesIndex:a,_timeout:0,_path:"",get_defaultLoadCompletedCallback:function(){return this._defaultLoadCompletedCallback},set_defaultLoadCompletedCallback:function(a){this._defaultLoadCompletedCallback=a},get_path:function(){return this._path||""},get_roles:function(){return Array.clone(this._roles)},isUserInRole:function(a){var b=this._get_rolesIndex()[a.trim().toLowerCase()];return!!b},load:function(c,d,e){var a=this;Sys.Net.WebServiceProxy.invoke(a._get_path(),"GetRolesForCurrentUser",b,{},Function.createDelegate(a,a._onLoadComplete),Function.createDelegate(a,a._onLoadFailed),[c,d,e],a.get_timeout())},_get_path:function(){var a=this.get_path();if(!a||!a.length)a=Sys.Services._RoleService.DefaultWebServicePath;if(!a||!a.length)throw Error.invalidOperation(Sys.Res.servicePathNotSet);return a},_get_rolesIndex:function(){var a=this;if(!a._rolesIndex){for(var c={},b=0;b<a._roles.length;b++)c[a._roles[b].toLowerCase()]=d;a._rolesIndex=c}return a._rolesIndex},_onLoadComplete:function(c,e,h){var b=this;if(c&&!(c instanceof Array))throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,h,"Array"));b._roles=c;b._rolesIndex=a;var d=e[0]||b.get_defaultLoadCompletedCallback()||b.get_defaultSucceededCallback();if(d){var g=e[2]||b.get_defaultUserContext(),f=Array.clone(c);d(f,g,i)}},_onLoadFailed:function(d,b){var a=b[1]||this.get_defaultFailedCallback();if(a){var c=b[2]||this.get_defaultUserContext();a(d,c,i)}}};c.registerClass("Sys.Services._RoleService",Sys.Net.WebServiceProxy);Sys._path=Sys.Services.RoleService._path;Sys._roles=Sys.Services.RoleService._roles;c=Sys.Services.RoleService=new Sys.Services._RoleService;if(Sys._path){c.set_path(Sys._path);delete Sys._path}if(Sys._roles){c._roles=Sys._roles;delete Sys._roles}}if(window.Sys&&Sys.loader)Sys.loader.registerScript("ApplicationServices",a,b);else b()})();
//START Common.Common.js
// (c) 2010 CodePlex Foundation
(function () { var b = "ExtendedCommon"; function a() { var p = "WatermarkChanged", l = "hiddenInputToUpdateATBuffer_CommonToolkitScripts", g = "HTMLEvents", r = "mousemove", k = "MouseEvents", m = "UIEvents", o = "display", q = "DXImageTransform.Microsoft.Alpha", i = "value", h = "hidden", n = "none", f = "px", e = "element", d = "undefined", c = null, a = false, j = "Sys.Extended.UI.BoxSide", b = true, s = Sys.version; if (!s && !Sys._versionChecked) { Sys._versionChecked = b; throw new Error("AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll."); } Type.registerNamespace("Sys.Extended.UI"); Sys.Extended.UI.BoxSide = function () { }; Sys.Extended.UI.BoxSide.prototype = { Top: 0, Right: 1, Bottom: 2, Left: 3 }; Sys.Extended.UI.BoxSide.registerEnum(j, a); Sys.Extended.UI._CommonToolkitScripts = function () { }; Sys.Extended.UI._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, f) { var a = c; if (b) { if (b.currentStyle) a = b.currentStyle[e]; else if (document.defaultView && document.defaultView.getComputedStyle) { var g = document.defaultView.getComputedStyle(b, c); if (g) a = g[e] } if (!a && b.style.getPropertyValue) a = b.style.getPropertyValue(e); else if (!a && b.style.getAttribute) a = b.style.getAttribute(e) } if (!a || a == "" || typeof a === d) if (typeof f != d) a = f; else a = c; return a }, getInheritedBackgroundColor: function (d) { var c = "backgroundColor", a = "#FFFFFF"; if (!d) return a; var b = this.getCurrentStyle(d, c); try { while (!b || b == "" || b == "transparent" || b == "rgba(0, 0, 0, 0)") { d = d.parentNode; if (!d) b = a; else b = this.getCurrentStyle(d, c) } } catch (e) { b = a } return b }, getLocation: function (a) { return Sys.UI.DomElement.getLocation(a) }, setLocation: function (b, a) { Sys.UI.DomElement.setLocation(b, a.x, a.y) }, getContentSize: function (a) { if (!a) throw Error.argumentNull(e); var d = this.getSize(a), c = this.getBorderBox(a), b = this.getPaddingBox(a); return { width: d.width - c.horizontal - b.horizontal, height: d.height - c.vertical - b.vertical } }, getSize: function (a) { if (!a) throw Error.argumentNull(e); return { width: a.offsetWidth, height: a.offsetHeight } }, setContentSize: function (a, c) { var b = "border-box", d = this; if (!a) throw Error.argumentNull(e); if (!c) throw Error.argumentNull("size"); if (d.getCurrentStyle(a, "MozBoxSizing") == b || d.getCurrentStyle(a, "BoxSizing") == b) { var h = d.getBorderBox(a), g = d.getPaddingBox(a); c = { width: c.width + h.horizontal + g.horizontal, height: c.height + h.vertical + g.vertical } } a.style.width = c.width.toString() + f; a.style.height = c.height.toString() + f }, setSize: function (a, b) { if (!a) throw Error.argumentNull(e); if (!b) throw Error.argumentNull("size"); var d = this.getBorderBox(a), c = this.getPaddingBox(a), f = { width: b.width - d.horizontal - c.horizontal, height: b.height - d.vertical - c.vertical }; this.setContentSize(a, f) }, getBounds: function (a) { return Sys.UI.DomElement.getBounds(a) }, setBounds: function (a, b) { if (!a) throw Error.argumentNull(e); if (!b) throw Error.argumentNull("bounds"); this.setSize(a, b); $common.setLocation(a, b) }, getClientBounds: function () { var b, a; if (document.compatMode == "CSS1Compat") { b = document.documentElement.clientWidth; a = document.documentElement.clientHeight } else { b = document.body.clientWidth; a = document.body.clientHeight } return new Sys.UI.Bounds(0, 0, b, a) }, getMarginBox: function (b) { var c = this; if (!b) throw Error.argumentNull(e); var a = { top: c.getMargin(b, Sys.Extended.UI.BoxSide.Top), right: c.getMargin(b, Sys.Extended.UI.BoxSide.Right), bottom: c.getMargin(b, Sys.Extended.UI.BoxSide.Bottom), left: c.getMargin(b, Sys.Extended.UI.BoxSide.Left) }; a.horizontal = a.left + a.right; a.vertical = a.top + a.bottom; return a }, getBorderBox: function (b) { var c = this; if (!b) throw Error.argumentNull(e); var a = { top: c.getBorderWidth(b, Sys.Extended.UI.BoxSide.Top), right: c.getBorderWidth(b, Sys.Extended.UI.BoxSide.Right), bottom: c.getBorderWidth(b, Sys.Extended.UI.BoxSide.Bottom), left: c.getBorderWidth(b, Sys.Extended.UI.BoxSide.Left) }; a.horizontal = a.left + a.right; a.vertical = a.top + a.bottom; return a }, getPaddingBox: function (b) { var c = this; if (!b) throw Error.argumentNull(e); var a = { top: c.getPadding(b, Sys.Extended.UI.BoxSide.Top), right: c.getPadding(b, Sys.Extended.UI.BoxSide.Right), bottom: c.getPadding(b, Sys.Extended.UI.BoxSide.Bottom), left: c.getPadding(b, Sys.Extended.UI.BoxSide.Left) }; a.horizontal = a.left + a.right; a.vertical = a.top + a.bottom; return a }, isBorderVisible: function (b, a) { if (!b) throw Error.argumentNull(e); if (a < Sys.Extended.UI.BoxSide.Top || a > Sys.Extended.UI.BoxSide.Left) throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue, a, j)); var d = this._borderStyleNames[a], c = this.getCurrentStyle(b, d); return c != n }, getMargin: function (b, a) { if (!b) throw Error.argumentNull(e); if (a < Sys.Extended.UI.BoxSide.Top || a > Sys.Extended.UI.BoxSide.Left) throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue, a, j)); var d = this._marginWidthNames[a], c = this.getCurrentStyle(b, d); try { return this.parsePadding(c) } catch (f) { return 0 } }, getBorderWidth: function (c, a) { var b = this; if (!c) throw Error.argumentNull(e); if (a < Sys.Extended.UI.BoxSide.Top || a > Sys.Extended.UI.BoxSide.Left) throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue, a, j)); if (!b.isBorderVisible(c, a)) return 0; var f = b._borderWidthNames[a], d = b.getCurrentStyle(c, f); return b.parseBorderWidth(d) }, getPadding: function (b, a) { if (!b) throw Error.argumentNull(e); if (a < Sys.Extended.UI.BoxSide.Top || a > Sys.Extended.UI.BoxSide.Left) throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue, a, j)); var d = this._paddingWidthNames[a], c = this.getCurrentStyle(b, d); return this.parsePadding(c) }, parseBorderWidth: function (d) { var e = this; if (!e._borderThicknesses) { var c = {}, a = document.createElement("div"); a.style.visibility = h; a.style.position = "absolute"; a.style.fontSize = "1px"; document.body.appendChild(a); var b = document.createElement("div"); b.style.height = "0px"; b.style.overflow = h; a.appendChild(b); var g = a.offsetHeight; b.style.borderTop = "solid black"; b.style.borderTopWidth = "thin"; c.thin = a.offsetHeight - g; b.style.borderTopWidth = "medium"; c.medium = a.offsetHeight - g; b.style.borderTopWidth = "thick"; c.thick = a.offsetHeight - g; a.removeChild(b); document.body.removeChild(a); e._borderThicknesses = c } if (d) { switch (d) { case "thin": case "medium": case "thick": return e._borderThicknesses[d]; case "inherit": return 0 } var i = e.parseUnit(d); Sys.Debug.assert(i.type == f, String.format(Sys.Extended.UI.Resources.Common_InvalidBorderWidthUnit, i.type)); return i.size } return 0 }, parsePadding: function (a) { if (a) { if (a == "inherit") return 0; var b = this.parseUnit(a); b.type !== f && Sys.Debug.fail(String.format(Sys.Extended.UI.Resources.Common_InvalidPaddingUnit, b.type)); return b.size } return 0 }, parseUnit: function (a) { if (!a) throw Error.argumentNull(i); a = a.trim().toLowerCase(); for (var h = a.length, c = -1, g = 0; g < h; g++) { var b = a.substr(g, 1); if ((b < "0" || b > "9") && b != "-" && b != "." && b != ",") break; c = g } if (c == -1) throw Error.create(Sys.Extended.UI.Resources.Common_UnitHasNoDigits); var e, d; if (c < h - 1) e = a.substring(c + 1).trim(); else e = f; d = parseFloat(a.substr(0, c + 1)); if (e == f) d = Math.floor(d); return { size: d, type: e } }, getElementOpacity: function (c) { if (!c) throw Error.argumentNull(e); var d = a, f; if (c.filters) { var h = c.filters; if (h.length !== 0) { var g = h[q]; if (g) { f = g.opacity / 100; d = b } } } else { f = this.getCurrentStyle(c, "opacity", 1); d = b } return d === a ? 1 : parseFloat(f) }, setElementOpacity: function (c, d) { if (!c) throw Error.argumentNull(e); if (c.filters) { var h = c.filters, f = b; if (h.length !== 0) { var g = h[q]; if (g) { f = a; g.opacity = d * 100 } } if (f) c.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + d * 100 + ")" } else c.style.opacity = d }, getVisible: function (a) { return a && n != $common.getCurrentStyle(a, o) && h != $common.getCurrentStyle(a, "visibility") }, setVisible: function (a, b) { if (a && b != $common.getVisible(a)) { if (b) if (a.style.removeAttribute) a.style.removeAttribute(o); else a.style.removeProperty(o); else a.style.display = n; a.style.visibility = b ? "visible" : h } }, resolveFunction: function (a) { if (a) if (a instanceof Function) return a; else if (String.isInstanceOfType(a) && a.length > 0) { var b; if ((b = window[a]) instanceof Function) return b; else if ((b = eval(a)) instanceof Function) return b } return c }, addCssClasses: function (c, b) { for (var a = 0; a < b.length; a++) Sys.UI.DomElement.addCssClass(c, b[a]) }, removeCssClasses: function (c, b) { for (var a = 0; a < b.length; a++) Sys.UI.DomElement.removeCssClass(c, b[a]) }, setStyle: function (a, b) { $common.applyProperties(a.style, b) }, removeHandlers: function (c, a) { for (var b in a) $removeHandler(c, b, a[b]) }, overlaps: function (a, b) { return a.x < b.x + b.width && b.x < a.x + a.width && a.y < b.y + b.height && b.y < a.y + a.height }, containsPoint: function (a, b, c) { return b >= a.x && b < a.x + a.width && c >= a.y && c < a.y + a.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, c, e, b) { return $common._pad(d, c || 2, e || " ", "l", b || a) }, padRight: function (d, c, e, b) { return $common._pad(d, c || 2, e || " ", "r", b || a) }, _pad: function (c, b, h, e, g) { c = c.toString(); var f = c.length, d = new Sys.StringBuilder; e == "r" && d.append(c); while (f < b) { d.append(h); f++ } e == "l" && d.append(c); var a = d.toString(); if (g && a.length > b) if (e == "l") a = a.substr(a.length - b, b); else a = a.substr(0, b); return a }, __DOMEvents: { focusin: { eventGroup: m, init: function (c) { c.initUIEvent("focusin", b, a, window, 1) } }, focusout: { eventGroup: m, init: function (c) { c.initUIEvent("focusout", b, a, window, 1) } }, activate: { eventGroup: m, init: function (a) { a.initUIEvent("activate", b, b, window, 1) } }, focus: { eventGroup: m, init: function (b) { b.initUIEvent("focus", a, a, window, 1) } }, blur: { eventGroup: m, init: function (b) { b.initUIEvent("blur", a, a, window, 1) } }, click: { eventGroup: k, init: function (e, d) { e.initMouseEvent("click", b, b, window, 1, d.screenX || 0, d.screenY || 0, d.clientX || 0, d.clientY || 0, d.ctrlKey || a, d.altKey || a, d.shiftKey || a, d.metaKey || a, d.button || 0, d.relatedTarget || c) } }, dblclick: { eventGroup: k, init: function (e, d) { e.initMouseEvent("click", b, b, window, 2, d.screenX || 0, d.screenY || 0, d.clientX || 0, d.clientY || 0, d.ctrlKey || a, d.altKey || a, d.shiftKey || a, d.metaKey || a, d.button || 0, d.relatedTarget || c) } }, mousedown: { eventGroup: k, init: function (e, d) { e.initMouseEvent("mousedown", b, b, window, 1, d.screenX || 0, d.screenY || 0, d.clientX || 0, d.clientY || 0, d.ctrlKey || a, d.altKey || a, d.shiftKey || a, d.metaKey || a, d.button || 0, d.relatedTarget || c) } }, mouseup: { eventGroup: k, init: function (e, d) { e.initMouseEvent("mouseup", b, b, window, 1, d.screenX || 0, d.screenY || 0, d.clientX || 0, d.clientY || 0, d.ctrlKey || a, d.altKey || a, d.shiftKey || a, d.metaKey || a, d.button || 0, d.relatedTarget || c) } }, mouseover: { eventGroup: k, init: function (e, d) { e.initMouseEvent("mouseover", b, b, window, 1, d.screenX || 0, d.screenY || 0, d.clientX || 0, d.clientY || 0, d.ctrlKey || a, d.altKey || a, d.shiftKey || a, d.metaKey || a, d.button || 0, d.relatedTarget || c) } }, mousemove: { eventGroup: k, init: function (e, d) { e.initMouseEvent(r, b, b, window, 1, d.screenX || 0, d.screenY || 0, d.clientX || 0, d.clientY || 0, d.ctrlKey || a, d.altKey || a, d.shiftKey || a, d.metaKey || a, d.button || 0, d.relatedTarget || c) } }, mouseout: { eventGroup: k, init: function (e, d) { e.initMouseEvent(r, b, b, window, 1, d.screenX || 0, d.screenY || 0, d.clientX || 0, d.clientY || 0, d.ctrlKey || a, d.altKey || a, d.shiftKey || a, d.metaKey || a, d.button || 0, d.relatedTarget || c) } }, load: { eventGroup: g, init: function (b) { b.initEvent("load", a, a) } }, unload: { eventGroup: g, init: function (b) { b.initEvent("unload", a, a) } }, select: { eventGroup: g, init: function (c) { c.initEvent("select", b, a) } }, change: { eventGroup: g, init: function (c) { c.initEvent("change", b, a) } }, submit: { eventGroup: g, init: function (a) { a.initEvent("submit", b, b) } }, reset: { eventGroup: g, init: function (c) { c.initEvent("reset", b, a) } }, resize: { eventGroup: g, init: function (c) { c.initEvent("resize", b, a) } }, scroll: { eventGroup: g, init: function (c) { c.initEvent("scroll", b, a) } } }, tryFireRawEvent: function (c, d) { try { if (c.fireEvent) { c.fireEvent("on" + d.type, d); return b } else if (c.dispatchEvent) { c.dispatchEvent(d); return b } } catch (e) { } return a }, tryFireEvent: function (g, f, e) { try { if (document.createEventObject) { var c = document.createEventObject(); $common.applyProperties(c, e || {}); g.fireEvent("on" + f, c); return b } else if (document.createEvent) { var d = $common.__DOMEvents[f]; if (d) { var c = document.createEvent(d.eventGroup); d.init(c, e || {}); g.dispatchEvent(c); return b } } } catch (c) { } return a }, wrapElement: function (a, b, c) { var d = a.parentNode; d.replaceChild(b, a); (c || b).appendChild(a) }, unwrapElement: function (b, a) { var d = a.parentNode; if (d != c) { $common.removeElement(b); d.replaceChild(b, a) } }, removeElement: function (a) { var b = a.parentNode; b != c && b.removeChild(a) }, applyProperties: function (e, d) { for (var b in d) { var a = d[b]; if (a != c && Object.getType(a) === Object) { var f = e[b]; $common.applyProperties(f, a) } else e[b] = a } }, createElementFromTemplate: function (a, j, e) { if (typeof a.nameTable != d) { var g = a.nameTable; if (String.isInstanceOfType(g)) g = e[g]; if (g != c) e = g } var l = c; if (typeof a.name !== d) l = a.name; var b = document.createElement(a.nodeName); if (typeof a.name !== d && e) e[a.name] = b; if (typeof a.parent !== d && j == c) { var h = a.parent; if (String.isInstanceOfType(h)) h = e[h]; if (h != c) j = h } typeof a.properties !== d && a.properties != c && $common.applyProperties(b, a.properties); typeof a.cssClasses !== d && a.cssClasses != c && $common.addCssClasses(b, a.cssClasses); typeof a.events !== d && a.events != c && $addHandlers(b, a.events); typeof a.visible !== d && a.visible != c && this.setVisible(b, a.visible); j && j.appendChild(b); typeof a.opacity !== d && a.opacity != c && $common.setElementOpacity(b, a.opacity); if (typeof a.children !== d && a.children != c) for (var k = 0; k < a.children.length; k++) { var m = a.children[k]; $common.createElementFromTemplate(m, b, e) } var i = b; if (typeof a.contentPresenter !== d && a.contentPresenter != c) i = e[i]; if (typeof a.content !== d && a.content != c) { var f = a.content; if (String.isInstanceOfType(f)) f = e[f]; if (f.parentNode) $common.wrapElement(f, b, i); else i.appendChild(f) } return b }, prepareHiddenElementForATDeviceUpdate: function () { var a = document.getElementById(l); if (!a) { var a = document.createElement("input"); a.setAttribute("type", h); a.setAttribute(i, "1"); a.setAttribute("id", l); a.setAttribute("name", l); document.forms[0] && document.forms[0].appendChild(a) } }, updateFormToRefreshATDeviceBuffer: function () { var a = document.getElementById(l); if (a) if (a.getAttribute(i) == "1") a.setAttribute(i, "0"); else a.setAttribute(i, "1") }, appendElementToFormOrBody: function (a) { if (document.forms && document.forms[0]) document.forms[0].appendChild(a); else document.body.appendChild(a) }, setText: function (a, b) { if (document.all) a.innerText = b; else a.textContent = b } }; CommonToolkitScripts = Sys.Extended.UI.CommonToolkitScripts = new Sys.Extended.UI._CommonToolkitScripts; $common = CommonToolkitScripts; Sys.UI.DomElement.getVisible = $common.getVisible; Sys.UI.DomElement.setVisible = $common.setVisible; Sys.UI.Control.overlaps = $common.overlaps; Sys.Extended.UI._DomUtility = function () { }; Sys.Extended.UI._DomUtility.prototype = { isDescendant: function (f, e) { for (var d = e.parentNode; d != c; d = d.parentNode) if (d == f) return b; return a }, isDescendantOrSelf: function (c, a) { return c === a ? b : Sys.Extended.UI.DomUtility.isDescendant(c, a) }, isAncestor: function (a, b) { return Sys.Extended.UI.DomUtility.isDescendant(b, a) }, isAncestorOrSelf: function (a, c) { return a === c ? b : Sys.Extended.UI.DomUtility.isDescendant(c, a) }, isSibling: function (f, e) { for (var d = f.parentNode, c = 0; c < d.childNodes.length; c++) if (d.childNodes[c] == e) return b; return a } }; Sys.Extended.UI._DomUtility.registerClass("Sys.Extended.UI._DomUtility"); Sys.Extended.UI.DomUtility = new Sys.Extended.UI._DomUtility; Sys.Extended.UI.TextBoxWrapper = function (d) { var b = this; Sys.Extended.UI.TextBoxWrapper.initializeBase(b, [d]); b._current = d.value; b._watermark = c; b._isWatermarked = a }; Sys.Extended.UI.TextBoxWrapper.prototype = { dispose: function () { this.get_element().TextBoxWrapper = c; Sys.Extended.UI.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 () { return this.get_IsWatermarked() ? "" : this.get_Current() }, set_Value: function (e) { var d = this; d.set_Current(e); if (!e || 0 == e.length) c != d._watermark && d.set_IsWatermarked(b); else d.set_IsWatermarked(a) }, get_Watermark: function () { return this._watermark }, set_Watermark: function (a) { this._watermark = a; this._updateElement() }, get_IsWatermarked: function () { return this._isWatermarked }, set_IsWatermarked: function (b) { var a = this; if (a._isWatermarked != b) { a._isWatermarked = b; a._updateElement(); a._raiseWatermarkChanged() } }, _updateElement: function () { var a = this, b = a.get_element(); if (a._isWatermarked) { if (b.value != a._watermark) b.value = a._watermark } else if (b.value != a._current) b.value = a._current }, add_WatermarkChanged: function (a) { this.get_events().addHandler(p, a) }, remove_WatermarkChanged: function (a) { this.get_events().removeHandler(p, a) }, _raiseWatermarkChanged: function () { var a = this.get_events().getHandler(p); a && a(this, Sys.EventArgs.Empty) } }; Sys.Extended.UI.TextBoxWrapper.get_Wrapper = function (a) { if (c == a.TextBoxWrapper) a.TextBoxWrapper = new Sys.Extended.UI.TextBoxWrapper(a); return a.TextBoxWrapper }; Sys.Extended.UI.TextBoxWrapper.registerClass("Sys.Extended.UI.TextBoxWrapper", Sys.UI.Behavior); Sys.Extended.UI.TextBoxWrapper.validatorGetValue = function (b) { var a = $get(b); return a && a.TextBoxWrapper ? a.TextBoxWrapper.get_Value() : Sys.Extended.UI.TextBoxWrapper._originalValidatorGetValue(b) }; if (typeof ValidatorGetValue == "function") { Sys.Extended.UI.TextBoxWrapper._originalValidatorGetValue = ValidatorGetValue; ValidatorGetValue = Sys.Extended.UI.TextBoxWrapper.validatorGetValue } if (Sys.CultureInfo && Sys.CultureInfo.prototype._getAbbrMonthIndex) { Sys.CultureInfo.prototype._getAbbrMonthIndex = function (b) { var a = this; if (!a._upperAbbrMonths) a._upperAbbrMonths = a._toUpperArray(a.dateTimeFormat.AbbreviatedMonthNames); return Array.indexOf(a._upperAbbrMonths, a._toUpper(b)) }; Sys.CultureInfo.CurrentCulture._getAbbrMonthIndex = Sys.CultureInfo.prototype._getAbbrMonthIndex; Sys.CultureInfo.InvariantCulture._getAbbrMonthIndex = Sys.CultureInfo.prototype._getAbbrMonthIndex } Sys.Extended.UI.ScrollBars = function () { throw Error.invalidOperation(); }; Sys.Extended.UI.ScrollBars.prototype = { None: 0, Horizontal: 1, Vertical: 2, Both: 3, Auto: 4 }; Sys.Extended.UI.ScrollBars.registerEnum("Sys.Extended.UI.ScrollBars", a) } if (window.Sys && Sys.loader) Sys.loader.registerScript(b, ["ComponentModel"], a); else a() })(); var $common, CommonToolkitScripts;
//END Common.Common.js
//START ExtenderBase.BaseScripts.js
// (c) 2010 CodePlex Foundation
(function () { var b = "ExtendedBase"; function a() { var b = "undefined", f = "populating", e = "populated", d = "dispose", c = "initialize", a = null, g = this, h = Sys.version; if (!h && !Sys._versionChecked) { Sys._versionChecked = true; throw new Error("AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll."); } Type.registerNamespace("Sys.Extended.UI"); Sys.Extended.UI.BehaviorBase = function (c) { var b = this; Sys.Extended.UI.BehaviorBase.initializeBase(b, [c]); b._clientStateFieldID = a; b._pageRequestManager = a; b._partialUpdateBeginRequestHandler = a; b._partialUpdateEndRequestHandler = a }; Sys.Extended.UI.BehaviorBase.prototype = { initialize: function () { Sys.Extended.UI.BehaviorBase.callBaseMethod(this, c) }, dispose: function () { var b = this; Sys.Extended.UI.BehaviorBase.callBaseMethod(b, d); if (b._pageRequestManager) { if (b._partialUpdateBeginRequestHandler) { b._pageRequestManager.remove_beginRequest(b._partialUpdateBeginRequestHandler); b._partialUpdateBeginRequestHandler = a } if (b._partialUpdateEndRequestHandler) { b._pageRequestManager.remove_endRequest(b._partialUpdateEndRequestHandler); b._partialUpdateEndRequestHandler = a } b._pageRequestManager = a } }, 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 b = document.getElementById(this._clientStateFieldID); if (b) return b.value } return a }, set_ClientState: function (b) { if (this._clientStateFieldID) { var a = document.getElementById(this._clientStateFieldID); if (a) a.value = b } }, registerPartialUpdateEvents: function () { var a = this; if (Sys && Sys.WebForms && Sys.WebForms.PageRequestManager) { a._pageRequestManager = Sys.WebForms.PageRequestManager.getInstance(); if (a._pageRequestManager) { a._partialUpdateBeginRequestHandler = Function.createDelegate(a, a._partialUpdateBeginRequest); a._pageRequestManager.add_beginRequest(a._partialUpdateBeginRequestHandler); a._partialUpdateEndRequestHandler = Function.createDelegate(a, a._partialUpdateEndRequest); a._pageRequestManager.add_endRequest(a._partialUpdateEndRequestHandler) } } }, _partialUpdateBeginRequest: function () { }, _partialUpdateEndRequest: function () { } }; Sys.Extended.UI.BehaviorBase.registerClass("Sys.Extended.UI.BehaviorBase", Sys.UI.Behavior); Sys.Extended.UI.DynamicPopulateBehaviorBase = function (c) { var b = this; Sys.Extended.UI.DynamicPopulateBehaviorBase.initializeBase(b, [c]); b._DynamicControlID = a; b._DynamicContextKey = a; b._DynamicServicePath = a; b._DynamicServiceMethod = a; b._cacheDynamicResults = false; b._dynamicPopulateBehavior = a; b._populatingHandler = a; b._populatedHandler = a }; Sys.Extended.UI.DynamicPopulateBehaviorBase.prototype = { initialize: function () { var a = this; Sys.Extended.UI.DynamicPopulateBehaviorBase.callBaseMethod(a, c); a._populatingHandler = Function.createDelegate(a, a._onPopulating); a._populatedHandler = Function.createDelegate(a, a._onPopulated) }, dispose: function () { var b = this; if (b._populatedHandler) { b._dynamicPopulateBehavior && b._dynamicPopulateBehavior.remove_populated(b._populatedHandler); b._populatedHandler = a } if (b._populatingHandler) { b._dynamicPopulateBehavior && b._dynamicPopulateBehavior.remove_populating(b._populatingHandler); b._populatingHandler = a } if (b._dynamicPopulateBehavior) { b._dynamicPopulateBehavior.dispose(); b._dynamicPopulateBehavior = a } Sys.Extended.UI.DynamicPopulateBehaviorBase.callBaseMethod(b, d) }, populate: function (c) { var b = this; if (b._dynamicPopulateBehavior && b._dynamicPopulateBehavior.get_element() != $get(b._DynamicControlID)) { b._dynamicPopulateBehavior.dispose(); b._dynamicPopulateBehavior = a } if (!b._dynamicPopulateBehavior && b._DynamicControlID && b._DynamicServiceMethod) { b._dynamicPopulateBehavior = $create(Sys.Extended.UI.DynamicPopulateBehavior, { id: b.get_id() + "_DynamicPopulateBehavior", ContextKey: b._DynamicContextKey, ServicePath: b._DynamicServicePath, ServiceMethod: b._DynamicServiceMethod, cacheDynamicResults: b._cacheDynamicResults }, a, a, $get(b._DynamicControlID)); b._dynamicPopulateBehavior.add_populating(b._populatingHandler); b._dynamicPopulateBehavior.add_populated(b._populatedHandler) } b._dynamicPopulateBehavior && b._dynamicPopulateBehavior.populate(c ? c : b._DynamicContextKey) }, _onPopulating: function (b, a) { this.raisePopulating(a) }, _onPopulated: function (b, a) { this.raisePopulated(a) }, get_dynamicControlID: function () { return this._DynamicControlID }, get_DynamicControlID: g.get_dynamicControlID, set_dynamicControlID: function (b) { var a = this; if (a._DynamicControlID != b) { a._DynamicControlID = b; a.raisePropertyChanged("dynamicControlID"); a.raisePropertyChanged("DynamicControlID") } }, set_DynamicControlID: g.set_dynamicControlID, get_dynamicContextKey: function () { return this._DynamicContextKey }, get_DynamicContextKey: g.get_dynamicContextKey, set_dynamicContextKey: function (b) { var a = this; if (a._DynamicContextKey != b) { a._DynamicContextKey = b; a.raisePropertyChanged("dynamicContextKey"); a.raisePropertyChanged("DynamicContextKey") } }, set_DynamicContextKey: g.set_dynamicContextKey, get_dynamicServicePath: function () { return this._DynamicServicePath }, get_DynamicServicePath: g.get_dynamicServicePath, set_dynamicServicePath: function (b) { var a = this; if (a._DynamicServicePath != b) { a._DynamicServicePath = b; a.raisePropertyChanged("dynamicServicePath"); a.raisePropertyChanged("DynamicServicePath") } }, set_DynamicServicePath: g.set_dynamicServicePath, get_dynamicServiceMethod: function () { return this._DynamicServiceMethod }, get_DynamicServiceMethod: g.get_dynamicServiceMethod, set_dynamicServiceMethod: function (b) { var a = this; if (a._DynamicServiceMethod != b) { a._DynamicServiceMethod = b; a.raisePropertyChanged("dynamicServiceMethod"); a.raisePropertyChanged("DynamicServiceMethod") } }, set_DynamicServiceMethod: g.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(e, a) }, remove_populated: function (a) { this.get_events().removeHandler(e, a) }, raisePopulated: function (b) { var a = this.get_events().getHandler(e); a && a(this, b) }, add_populating: function (a) { this.get_events().addHandler(f, a) }, remove_populating: function (a) { this.get_events().removeHandler(f, a) }, raisePopulating: function (b) { var a = this.get_events().getHandler(f); a && a(this, b) } }; Sys.Extended.UI.DynamicPopulateBehaviorBase.registerClass("Sys.Extended.UI.DynamicPopulateBehaviorBase", Sys.Extended.UI.BehaviorBase); Sys.Extended.UI.ControlBase = function (c) { var b = this; Sys.Extended.UI.ControlBase.initializeBase(b, [c]); b._clientStateField = a; b._callbackTarget = a; b._onsubmit$delegate = Function.createDelegate(b, b._onsubmit); b._oncomplete$delegate = Function.createDelegate(b, b._oncomplete); b._onerror$delegate = Function.createDelegate(b, b._onerror) }; Sys.Extended.UI.ControlBase.__doPostBack = function (c, b) { if (!Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack()) for (var a = 0; a < Sys.Extended.UI.ControlBase.onsubmitCollection.length; a++) Sys.Extended.UI.ControlBase.onsubmitCollection[a](); Function.createDelegate(window, Sys.Extended.UI.ControlBase.__doPostBackSaved)(c, b) }; Sys.Extended.UI.ControlBase.prototype = { initialize: function () { var d = this; Sys.Extended.UI.ControlBase.callBaseMethod(d, c); d._clientStateField && d.loadClientState(d._clientStateField.value); if (typeof Sys.WebForms !== b && typeof Sys.WebForms.PageRequestManager !== b) { Array.add(Sys.WebForms.PageRequestManager.getInstance()._onSubmitStatements, d._onsubmit$delegate); if (Sys.Extended.UI.ControlBase.__doPostBackSaved == a || typeof Sys.Extended.UI.ControlBase.__doPostBackSaved == b) { Sys.Extended.UI.ControlBase.__doPostBackSaved = window.__doPostBack; window.__doPostBack = Sys.Extended.UI.ControlBase.__doPostBack; Sys.Extended.UI.ControlBase.onsubmitCollection = [] } Array.add(Sys.Extended.UI.ControlBase.onsubmitCollection, d._onsubmit$delegate) } else $addHandler(document.forms[0], "submit", d._onsubmit$delegate) }, dispose: function () { var a = this; if (typeof Sys.WebForms !== b && typeof Sys.WebForms.PageRequestManager !== b) { Array.remove(Sys.Extended.UI.ControlBase.onsubmitCollection, a._onsubmit$delegate); Array.remove(Sys.WebForms.PageRequestManager.getInstance()._onSubmitStatements, a._onsubmit$delegate) } else $removeHandler(document.forms[0], "submit", a._onsubmit$delegate); Sys.Extended.UI.ControlBase.callBaseMethod(a, d) }, findElement: function (a) { return $get(this.get_id() + "_" + a.split(":").join("_")) }, get_clientStateField: function () { return this._clientStateField }, set_clientStateField: function (b) { var a = this; if (a.get_isInitialized()) throw Error.invalidOperation(Sys.Extended.UI.Resources.ExtenderBase_CannotSetClientStateField); if (a._clientStateField != b) { a._clientStateField = b; a.raisePropertyChanged("clientStateField") } }, loadClientState: function () { }, saveClientState: function () { return a }, _invoke: function (i, f, j) { var c = this; if (!c._callbackTarget) throw Error.invalidOperation(Sys.Extended.UI.Resources.ExtenderBase_ControlNotRegisteredForCallbacks); if (typeof WebForm_DoCallback === b) throw Error.invalidOperation(Sys.Extended.UI.Resources.ExtenderBase_PageNotRegisteredForCallbacks); for (var g = [], d = 0; d < f.length; d++) g[d] = f[d]; var e = c.saveClientState(); if (e != a && !String.isInstanceOfType(e)) throw Error.invalidOperation(Sys.Extended.UI.Resources.ExtenderBase_InvalidClientStateType); var h = Sys.Serialization.JavaScriptSerializer.serialize({ name: i, args: g, state: c.saveClientState() }); WebForm_DoCallback(c._callbackTarget, h, c._oncomplete$delegate, j, c._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 (a) { throw Error.create(a); }, _onsubmit: function () { if (this._clientStateField) this._clientStateField.value = this.saveClientState(); return true } }; Sys.Extended.UI.ControlBase.registerClass("Sys.Extended.UI.ControlBase", Sys.UI.Control) } if (window.Sys && Sys.loader) Sys.loader.registerScript(b, ["ComponentModel", "Serialization"], a); else a() })();
Sys.Extended.UI.Resources = {
    "AjaxFileUpload_FileInQueue": "{0} file(s) in queue.", "AjaxFileUpload_AllFilesUploaded": "All Files Uploaded.", "AjaxFileUpload_FileList": "List of Uploaded files:", "PasswordStrength_InvalidWeightingRatios": "Strength Weighting ratios must have 4 elements", "HTMLEditor_toolbar_button_FontSize_defaultValue": "default", "AjaxFileUpload_SelectFileToUpload": "Please select file(s) to upload.", "HTMLEditor_toolbar_button_DesignMode_title": "Design mode", "Animation_ChildrenNotAllowed": "Sys.Extended.UI.Animation.createAnimation cannot add child animations to type \"{0}\" that does not derive from Sys.Extended.UI.Animation.ParentAnimation", "PasswordStrength_RemainingSymbols": "{0} symbol characters", "HTMLEditor_toolbar_button_FixedForeColor_title": "Foreground color", "HTMLEditor_toolbar_popup_LinkProperties_field_URL": "URL", "ExtenderBase_CannotSetClientStateField": "clientStateField can only be set before initialization", "HTMLEditor_toolbar_button_Bold_title": "Bold", "RTE_PreviewHTML": "Preview HTML", "HTMLEditor_toolbar_popup_LinkProperties_button_OK": "OK", "HTMLEditor_toolbar_button_JustifyRight_title": "Justify Right", "RTE_JustifyCenter": "Justify Center", "PasswordStrength_RemainingUpperCase": "{0} more upper case characters", "HTMLEditor_toolbar_popup_LinkProperties_button_Cancel": "Cancel", "Animation_TargetNotFound": "Sys.Extended.UI.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}\"", "AsyncFileUpload_UnhandledException": "Unhandled Exception", "RTE_FontColor": "Font Color", "RTE_LabelColor": "Label Color", "Common_InvalidBorderWidthUnit": "A unit type of \"{0}\"\u0027 is invalid for parseBorderWidth", "HTMLEditor_toolbar_button_JustifyFull_title": "Justify", "RTE_Heading": "Heading", "AsyncFileUpload_ConfirmToSeeErrorPage": "Do you want to see the response page?", "Tabs_PropertySetBeforeInitialization": "{0} cannot be changed before initialization", "HTMLEditor_toolbar_button_StrikeThrough_title": "Strike through", "RTE_OrderedList": "Ordered List", "HTMLEditor_toolbar_button_OnPastePlainText": "Plain text pasting is switched on. Just now: {0}", "HTMLEditor_toolbar_button_RemoveLink_title": "Remove Link", "HTMLEditor_toolbar_button_FontName_defaultValue": "default", "HTMLEditor_toolbar_button_FontName_label": "Font", "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", "HTMLEditor_toolbar_button_InsertLink_title": "Insert/Edit URL link", "Animation_NoDynamicPropertyFound": "Sys.Extended.UI.Animation.createAnimation found no property corresponding to \"{0}\" or \"{1}\"", "AjaxFileUpload_WrongFileType": "Can\u0027t add file \u0027{0}\u0027 to upload list. File with type \u0027{1}\u0027 is not allowed", "Animation_InvalidBaseType": "Sys.Extended.UI.Animation.registerAnimation can only register types that inherit from Sys.Extended.UI.Animation.Animation", "RTE_UnorderedList": "Unordered List", "AsyncFileUpload_UnknownServerError": "Unknown Server error", "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", "HTMLEditor_toolbar_button_HtmlMode_title": "HTML text", "RTE_Italic": "Italic", "CascadingDropDown_NoParentElement": "Failed to find parent element \"{0}\"", "ValidatorCallout_DefaultErrorMessage": "This control is invalid", "HTMLEditor_toolbar_button_DecreaseIndent_title": "Decrease Indent", "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", "HTMLEditor_toolbar_popup_LinkProperties_field_Target": "Target", "HTMLEditor_toolbar_button_PreviewMode_title": "Preview", "RTE_Border": "Border", "RTE_Create": "Create", "RTE_BackgroundColor": "Background Color", "RTE_Cancel": "Cancel", "HTMLEditor_toolbar_button_PasteText_title": "Paste Plain Text", "RTE_JustifyFull": "Justify Full", "RTE_JustifyLeft": "Justify Left", "RTE_Cut": "Cut", "AsyncFileUpload_UploadingProblem": "The requested file uploading problem.", "AjaxFileUpload_Cancelling": "Cancelling...", "ResizableControlBehavior_CannotChangeProperty": "Changes to {0} not supported", "AjaxFileUpload_MaxNumberOfFilesExceeded": "Maximum number of files exceeded", "AjaxFileUpload_UploadError": "An Error occured during file upload.", "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", "HTMLEditor_toolbar_button_Copy_title": "Copy", "ListSearch_DefaultPrompt": "Type to search", "CollapsiblePanel_NoControlID": "Failed to find element \"{0}\"", "RTE_ViewEditor": "View Editor", "HTMLEditor_toolbar_popup_LinkProperties_field_Target_Current": "Current window", "RTE_BarColor": "Bar Color", "AjaxFileUpload_CancellingUpload": "Cancelling upload...", "AsyncFileUpload_InternalErrorMessage": "The AsyncFileUpload control has encountered an error with the uploader in this page. Please refresh the page and try again.", "HTMLEditor_toolbar_button_Underline_title": "Underline", "PasswordStrength_DefaultStrengthDescriptions": "NonExistent;Very Weak;Weak;Poor;Almost OK;Barely Acceptable;Average;Good;Strong;Excellent;Unbreakable!", "HTMLEditor_toolbar_button_SuperScript_title": "Super script", "AjaxFileUpload_UploadingInputFile": "Uploading file: {0}.", "HTMLEditor_toolbar_button_Ltr_title": "Left to right direction", "HTMLEditor_toolbar_button_RemoveAlignment_title": "Remove Alignment", "HTMLEditor_toolbar_button_OrderedList_title": "Ordered List", "HTMLEditor_toolbar_popup_LinkProperties_field_Target_New": "New window", "HTMLEditor_toolbar_popup_LinkProperties_field_Target_Top": "Top window", "HTMLEditor_toolbar_button_JustifyCenter_title": "Justify Center", "AjaxFileUpload_Cancel": "Cancel", "RTE_Inserttexthere": "Insert text here", "Animation_UknownAnimationName": "Sys.Extended.UI.Animation.createAnimation could not find an Animation corresponding to the name \"{0}\"", "ExtenderBase_InvalidClientStateType": "saveClientState must return a value of type String", "HTMLEditor_toolbar_button_JustifyLeft_title": "Justify Left", "Rating_CallbackError": "An unhandled exception has occurred:\\r\\n{0}", "HTMLEditor_toolbar_button_Undo_title": "Undo", "HTMLEditor_toolbar_button_Redo_title": "Redo", "Tabs_OwnerExpected": "owner must be set before initialize", "DynamicPopulate_WebServiceTimeout": "Web service call timed out", "PasswordStrength_RemainingLowerCase": "{0} more lower case characters", "AjaxFileUpload_Canceled": "cancelled", "AjaxFileUpload_UploadCanceled": "File upload cancelled.", "AjaxFileUpload_Upload": "Upload", "HTMLEditor_toolbar_button_BulletedList_title": "Bulleted List", "HTMLEditor_toolbar_button_Paste_title": "Paste", "Animation_MissingAnimationName": "Sys.Extended.UI.Animation.createAnimation requires an object with an AnimationName property", "HTMLEditor_toolbar_button_PasteWord_title": "Paste from MS Word (with cleanup)", "HTMLEditor_toolbar_button_Italic_title": "Italic", "RTE_JustifyRight": "Justify Right", "Tabs_ActiveTabArgumentOutOfRange": "Argument is not a member of the tabs collection", "RTE_CellPadding": "Cell Padding", "HTMLEditor_toolbar_button_ForeColorClear_title": "Clear foreground color", "RTE_ClearFormatting": "Clear Formatting", "AlwaysVisible_ElementRequired": "Sys.Extended.UI.AlwaysVisibleControlBehavior must have an element", "AjaxFileUpload_Remove": "Remove", "HTMLEditor_toolbar_button_SubScript_title": "Sub script", "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: ", "AjaxFileUpload_Uploading": "Uploading", "HTMLEditor_toolbar_button_Rtl_title": "Right to left direction", "PasswordStrength_RemainingCharacters": "{0} more characters", "HTMLEditor_toolbar_button_BackColorClear_title": "Clear background color", "PasswordStrength_Satisfied": "Nothing more required", "AjaxFileUpload_DefaultError": "File upload error.", "AjaxFileUpload_DropFiles": "Drop files here", "AjaxFileUpload_UploadingHtml5File": "Uploading file: {0} of size {1} bytes.", "RTE_Hyperlink": "Hyperlink", "Animation_NoPropertyFound": "Sys.Extended.UI.Animation.createAnimation found no property corresponding to \"{0}\"", "PasswordStrength_InvalidStrengthDescriptionStyles": "Text Strength description style classes must match the number of text descriptions.", "HTMLEditor_toolbar_button_Use_verb": "Use {0}", "HTMLEditor_toolbar_popup_LinkProperties_field_Target_Parent": "Parent window", "PasswordStrength_GetHelpRequirements": "Get help on password requirements", "AjaxFileUpload_error": "error", "HTMLEditor_toolbar_button_FixedBackColor_title": "Background color", "PasswordStrength_InvalidStrengthDescriptions": "Invalid number of text strength descriptions specified", "AjaxFileUpload_Pending": "pending", "RTE_Underline": "Underline", "HTMLEditor_toolbar_button_IncreaseIndent_title": "Increase Indent", "AsyncFileUpload_ServerResponseError": "Server Response Error", "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", "HTMLEditor_toolbar_button_FontSize_label": "Size", "HTMLEditor_toolbar_button_Cut_title": "Cut", "CascadingDropDown_MethodError": "[Method error {0}]", "HTMLEditor_toolbar_button_InsertLink_message_EmptyURL": "URL can not be empty", "AjaxFileUpload_SelectFile": "Select File", "RTE_BorderColor": "Border Color", "HTMLEditor_toolbar_button_RemoveStyles_title": "Remove styles", "RTE_Paragraph": "Paragraph", "RTE_InsertHorizontalRule": "Insert Horizontal Rule", "AjaxFileUpload_UploadedPercentage": "uploaded {0} %", "HTMLEditor_toolbar_button_Paragraph_title": "Make Paragraph", "AjaxFileUpload_Uploaded": "Uploaded", "Common_UnitHasNoDigits": "No digits", "RTE_Outdent": "Outdent", "Common_DateTime_InvalidTimeSpan": "\"{0}\" is not a valid TimeSpan format", "Animation_CannotNestSequence": "Sys.Extended.UI.Animation.SequenceAnimation cannot be nested inside Sys.Extended.UI.Animation.ParallelAnimation", "HTMLEditor_toolbar_button_InsertHR_title": "Insert horizontal rule", "HTMLEditor_toolbar_button_OnPasteFromMSWord": "Pasting from MS Word is switched on. Just now: {0}", "Shared_BrowserSecurityPreventsPaste": "Your browser security settings don\u0027t permit the automatic execution of paste operations. Please use the keyboard shortcut Ctrl+V instead."
};
//END ExtenderBase.BaseScripts.js
//START RoundedCorners.RoundedCornersBehavior.js
// (c) 2010 CodePlex Foundation
(function () { var b = "ExtendedRoundedCorners"; function a() { var b = null, a = true; Type.registerNamespace("Sys.Extended.UI"); Sys.Extended.UI.BoxCorners = function () { throw Error.invalidOperation(); }; Sys.Extended.UI.BoxCorners.prototype = { None: 0, TopLeft: 1, TopRight: 2, BottomRight: 4, BottomLeft: 8, Top: 1 | 2, Right: 2 | 4, Bottom: 4 | 8, Left: 8 | 1, All: 1 | 2 | 4 | 8 }; Sys.Extended.UI.BoxCorners.registerEnum("Sys.Extended.UI.BoxCorners", a); Sys.Extended.UI.RoundedCornersBehavior = function (d) { var c = this; Sys.Extended.UI.RoundedCornersBehavior.initializeBase(c, [d]); c._corners = Sys.Extended.UI.BoxCorners.All; c._radius = 5; c._color = b; c._parentDiv = b; c._originalStyle = b; c._borderColor = b; c._isDirty = a }; Sys.Extended.UI.RoundedCornersBehavior.prototype = { initialize: function () { Sys.Extended.UI.RoundedCornersBehavior.callBaseMethod(this, "initialize"); this.update() }, dispose: function () { this.disposeParentDiv(); Sys.Extended.UI.RoundedCornersBehavior.callBaseMethod(this, "dispose") }, update: function () { var e = "0px", j = "none", f = "1px", i = "solid", h = "px", d = this, c = d.get_element(); if (!c || !d._isDirty || d.get_isUpdating()) return; d.disposeParentDiv(); if (c.style.borderRadius != undefined) { c.style.borderRadius = d._radius + h; if (d._borderColor) { c.style.border = i; c.style.borderWidth = f; c.style.borderColor = d._borderColor } else { c.style.border = j; c.style.borderWidth = e } if (!d.isCornerSet(Sys.Extended.UI.BoxCorners.TopLeft)) c.style.borderTopLeftRadius = e; if (!d.isCornerSet(Sys.Extended.UI.BoxCorners.BottomLeft)) c.style.borderBottomLeftRadius = e; if (!d.isCornerSet(Sys.Extended.UI.BoxCorners.TopRight)) c.style.borderTopRightRadius = e; if (!d.isCornerSet(Sys.Extended.UI.BoxCorners.BottomRight)) c.style.borderBottomRightRadius = e } else if (c.style.MozBorderRadius != undefined) { c.style.MozBorderRadius = d._radius + h; if (d._borderColor) { c.style.border = i; c.style.borderWidth = f; c.style.borderColor = d._borderColor } else { c.style.border = j; c.style.borderWidth = e } if (!d.isCornerSet(Sys.Extended.UI.BoxCorners.TopLeft)) c.style.MozBorderRadiusTopleft = e; if (!d.isCornerSet(Sys.Extended.UI.BoxCorners.BottomLeft)) c.style.MozBorderRadiusBottomleft = e; if (!d.isCornerSet(Sys.Extended.UI.BoxCorners.TopRight)) c.style.MozBorderRadiusTopright = e; if (!d.isCornerSet(Sys.Extended.UI.BoxCorners.BottomRight)) c.style.MozBorderRadiusBottomright = e } else if (c.style.WebkitBorderRadius != undefined) { c.style.WebkitBorderRadius = d._radius + h; if (d._borderColor) { c.style.border = i; c.style.borderWidth = f; c.style.borderColor = d._borderColor } else { c.style.border = j; c.style.borderWidth = e } if (!d.isCornerSet(Sys.Extended.UI.BoxCorners.TopLeft)) c.style.WebkitBorderRadiusTopLeft = e; if (!d.isCornerSet(Sys.Extended.UI.BoxCorners.BottomLeft)) c.style.WebkitBorderRadiusBottomLeft = e; if (!d.isCornerSet(Sys.Extended.UI.BoxCorners.TopRight)) c.style.WebkitBorderRadiusTopRight = e; if (!d.isCornerSet(Sys.Extended.UI.BoxCorners.BottomRight)) c.style.WebkitBorderRadiusBottomRight = e } else { var w = d.getBackgroundColor(), r = c.offsetWidth, g = c.cloneNode(false); d.moveChildren(c, g); d._originalStyle = c.style.cssText; c.style.backgroundColor = "transparent"; c.style.verticalAlign = "top"; c.style.padding = "0"; c.style.overflow = ""; c.style.className = ""; if (c.style.height && c.style.height != "auto") c.style.height = parseInt($common.getCurrentStyle(c, "height")) + d._radius * 2 + h; else if (!c.style.width && 0 < r) c.style.width = r + h; g.style.position = ""; g.style.border = ""; g.style.margin = ""; g.style.width = "100%"; if (g.style.overflow == "" && $common.getCurrentStyle(c, "overflow") == "visible") g.style.overflow = "auto"; g.id = ""; g.removeAttribute("control"); if (d._borderColor) { g.style.borderTopStyle = j; g.style.borderBottomStyle = j; g.style.borderLeftStyle = i; g.style.borderRightStyle = i; g.style.borderLeftColor = d._borderColor; g.style.borderRightColor = d._borderColor; g.style.borderLeftWidth = f; g.style.borderRightWidth = f; if (d._radius == 0) { g.style.borderTopStyle = i; g.style.borderBottomStyle = i; g.style.borderTopColor = d._borderColor; g.style.borderBottomColor = d._borderColor; g.style.borderTopWidth = f; g.style.borderBottomWidth = f } } else { g.style.borderTopStyle = j; g.style.borderBottomStyle = j; g.style.borderLeftStyle = j; g.style.borderRightStyle = j } for (var n = b, q = d._radius, u = d._radius, s = 0, p = u; p > 0; p--) { var v = Math.acos(p / q), o = q - Math.round(Math.sin(v) * q), k = document.createElement("DIV"); k.__roundedDiv = a; k.style.backgroundColor = w; k.style.marginLeft = o + h; k.style.marginRight = o - (d._borderColor ? 2 : 0) + h; k.style.height = f; k.style.fontSize = f; k.style.overflow = "hidden"; if (d._borderColor) { k.style.borderLeftStyle = i; k.style.borderRightStyle = i; k.style.borderLeftColor = d._borderColor; k.style.borderRightColor = d._borderColor; var t = Math.max(0, s - o - 1); k.style.borderLeftWidth = t + 1 + h; k.style.borderRightWidth = t + 1 + h; if (p == u) { k.__roundedDivNoBorder = a; k.style.backgroundColor = d._borderColor } } c.insertBefore(k, n); var m = k; k = k.cloneNode(a); k.__roundedDiv = a; c.insertBefore(k, n); var l = k; n = k; s = o; if (!d.isCornerSet(Sys.Extended.UI.BoxCorners.TopLeft)) { m.style.marginLeft = "0"; if (d._borderColor) m.style.borderLeftWidth = f } if (!d.isCornerSet(Sys.Extended.UI.BoxCorners.TopRight)) { m.style.marginRight = "0"; if (d._borderColor) { m.style.borderRightWidth = f; m.style.marginRight = "-2px" } } if (!d.isCornerSet(Sys.Extended.UI.BoxCorners.BottomLeft)) { l.style.marginLeft = "0"; if (d._borderColor) l.style.borderLeftWidth = f } if (!d.isCornerSet(Sys.Extended.UI.BoxCorners.BottomRight)) { l.style.marginRight = "0"; if (d._borderColor) { l.style.borderRightWidth = f; l.style.marginRight = "-2px" } } } c.insertBefore(g, n); d._parentDiv = g; d._isDirty = false } }, disposeParentDiv: function () { var a = this; if (a._parentDiv) { for (var d = a.get_element(), f = d.childNodes, e = f.length - 1; e >= 0; e--) { var c = f[e]; if (c) { c == a._parentDiv && a.moveChildren(c, d); try { d.removeChild(c) } catch (d) { } } } if (a._originalStyle) { d.style.cssText = a._originalStyle; a._originalStyle = b } a._parentDiv = b } }, getBackgroundColor: function () { return this._color ? this._color : $common.getCurrentStyle(this.get_element(), "backgroundColor") }, moveChildren: function (b, d) { var c = 0; while (b.hasChildNodes()) { var a = b.childNodes[0]; a = b.removeChild(a); d.appendChild(a); c++ } return c }, isCornerSet: function (a) { return (this._corners & a) != Sys.Extended.UI.BoxCorners.None }, setCorner: function (b, c) { var a = this; if (c) a.set_Corners(a._corners | b); else a.set_Corners(a._corners & ~b) }, get_Color: function () { return this._color }, set_Color: function (c) { var b = this; if (c != b._color) { b._color = c; b._isDirty = a; b.update(); b.raisePropertyChanged("Color") } }, get_Radius: function () { return this._radius }, set_Radius: function (c) { var b = this; if (c != b._radius) { b._radius = c; b._isDirty = a; b.update(); b.raisePropertyChanged("Radius") } }, get_Corners: function () { return this._corners }, set_Corners: function (c) { var b = this; if (c != b._corners) { b._corners = c; b._isDirty = a; b.update(); b.raisePropertyChanged("Corners") } }, get_BorderColor: function () { return this._borderColor }, set_BorderColor: function (c) { var b = this; if (c != b._borderColor) { b._borderColor = c; b._isDirty = a; b.update(); b.raisePropertyChanged("BorderColor") } } }; Sys.Extended.UI.RoundedCornersBehavior.registerClass("Sys.Extended.UI.RoundedCornersBehavior", Sys.Extended.UI.BehaviorBase); Sys.registerComponent(Sys.Extended.UI.RoundedCornersBehavior, { name: "rounded" }) } if (window.Sys && Sys.loader) Sys.loader.registerScript(b, ["ExtendedBase", "ExtendedCommon"], a); else a() })();
//END RoundedCorners.RoundedCornersBehavior.js
//START Compat.Timer.Timer.js
// (c) 2010 CodePlex Foundation
(function () { var b = "ExtendedTimer"; function a() { var a = "tick", b = "interval", c = Sys.version; if (!c && !Sys._versionChecked) { Sys._versionChecked = true; throw new Error("AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll."); } Sys.Timer = function () { var a = this; Sys.Timer.initializeBase(a); a._interval = 1e3; a._enabled = false; a._timer = null }; Sys.Timer.prototype = { get_interval: function () { return this._interval }, set_interval: function (c) { var a = this; if (a._interval !== c) { a._interval = c; a.raisePropertyChanged(b); if (!a.get_isUpdating() && a._timer !== null) { a._stopTimer(); a._startTimer() } } }, get_enabled: function () { return this._enabled }, set_enabled: function (b) { var a = this; if (b !== a.get_enabled()) { a._enabled = b; a.raisePropertyChanged("enabled"); if (!a.get_isUpdating()) if (b) a._startTimer(); else a._stopTimer() } }, add_tick: function (b) { this.get_events().addHandler(a, b) }, remove_tick: function (b) { this.get_events().removeHandler(a, b) }, dispose: function () { this.set_enabled(false); this._stopTimer(); Sys.Timer.callBaseMethod(this, "dispose") }, updated: function () { var a = this; Sys.Timer.callBaseMethod(a, "updated"); if (a._enabled) { a._stopTimer(); a._startTimer() } }, _timerCallback: function () { var b = this.get_events().getHandler(a); b && b(this, Sys.EventArgs.Empty) }, _startTimer: function () { var a = this; a._timer = window.setInterval(Function.createDelegate(a, a._timerCallback), a._interval) }, _stopTimer: function () { window.clearInterval(this._timer); this._timer = null } }; Sys.Timer.descriptor = { properties: [{ name: b, type: Number }, { name: "enabled", type: Boolean }], events: [{ name: a }] }; Sys.Timer.registerClass("Sys.Timer", Sys.Component) } if (window.Sys && Sys.loader) Sys.loader.registerScript(b, ["ComponentModel"], a); else a() })();
//END Compat.Timer.Timer.js
//START DropShadow.DropShadowBehavior.js
// (c) 2010 CodePlex Foundation
(function () { var a = null, d = "ExtendedDropShadow", b = a; function c() { var c = "absolute"; Type.registerNamespace("Sys.Extended.UI"); Sys.Extended.UI.DropShadowBehavior = function (c) { var b = this; Sys.Extended.UI.DropShadowBehavior.initializeBase(b, [c]); b._opacity = 1; b._width = 5; b._shadowDiv = a; b._trackPosition = a; b._trackPositionDelay = 50; b._timer = a; b._tickHandler = a; b._roundedBehavior = a; b._shadowRoundedBehavior = a; b._rounded = false; b._radius = 5; b._lastX = a; b._lastY = a; b._lastW = a; b._lastH = a }; Sys.Extended.UI.DropShadowBehavior.prototype = { initialize: function () { var a = this; Sys.Extended.UI.DropShadowBehavior.callBaseMethod(a, "initialize"); b = a.get_element(); if ($common.getCurrentStyle(b, "position", b.style.position) != c) b.style.position = "relative"; a._rounded && a.setupRounded(); a._trackPosition && a.startTimer(); a.setShadow() }, dispose: function () { this.stopTimer(); this.disposeShadowDiv(); Sys.Extended.UI.DropShadowBehavior.callBaseMethod(this, "dispose") }, buildShadowDiv: function () { var d = this; b = d.get_element(); if (!d.get_isInitialized() || !b || !d._width) return; if (b.style.boxShadow == undefined && b.style.MozBoxShadow == undefined && b.style.WebkitBoxShadow == undefined) { var e = document.createElement("DIV"); e.style.backgroundColor = "black"; e.style.position = c; if (b.id) e.id = b.id + "_DropShadow"; d._shadowDiv = e; b.parentNode.appendChild(e); if (d._rounded) { d._shadowDiv.style.height = Math.max(0, b.offsetHeight - 2 * d._radius) + "px"; if (!d._shadowRoundedBehavior) d._shadowRoundedBehavior = $create(Sys.Extended.UI.RoundedCornersBehavior, { Radius: d._radius }, a, a, d._shadowDiv); else d._shadowRoundedBehavior.set_Radius(d._radius) } else d._shadowRoundedBehavior && d._shadowRoundedBehavior.set_Radius(0); d._opacity != 1 && d.setupOpacity(); d.setShadow(false, true); d.updateZIndex() } }, disposeShadowDiv: function () { var b = this; if (b._shadowDiv) { b._shadowDiv.parentNode && b._shadowDiv.parentNode.removeChild(b._shadowDiv); b._shadowDiv = a } if (b._shadowRoundedBehavior) { b._shadowRoundedBehavior.dispose(); b._shadowRoundedBehavior = a } }, onTimerTick: function () { this.setShadow() }, startTimer: function () { var a = this; if (!a._timer) { if (!a._tickHandler) a._tickHandler = Function.createDelegate(a, a.onTimerTick); a._timer = new Sys.Timer; a._timer.set_interval(a._trackPositionDelay); a._timer.add_tick(a._tickHandler); a._timer.set_enabled(true) } }, stopTimer: function () { var b = this; if (b._timer) { b._timer.remove_tick(b._tickHandler); b._timer.set_enabled(false); b._timer.dispose(); b._timer = a } }, setShadow: function (h, j) { var c = "px ", a = this; b = a.get_element(); if (!a.get_isInitialized() || !b || !a._width && !h) return; if (b.style.boxShadow == undefined && b.style.MozBoxShadow == undefined && b.style.WebkitBoxShadow == undefined) { var g = a._shadowDiv; !g && a.buildShadowDiv(); var e = { x: b.offsetLeft, y: b.offsetTop }; if (h || a._lastX != e.x || a._lastY != e.y || !g) { a._lastX = e.x; a._lastY = e.y; var f = a.get_Width(); e.x += f; e.y += f; $common.setLocation(a._shadowDiv, e) } var i = b.offsetHeight, f = b.offsetWidth; if (h || i != a._lastH || f != a._lastW || !g) { a._lastW = f; a._lastH = i; if (!a._rounded || !g || j) { a._shadowDiv.style.width = f + "px"; a._shadowDiv.style.height = i + "px" } else { a.disposeShadowDiv(); a.setShadow() } } if (a._shadowDiv) a._shadowDiv.style.visibility = $common.getCurrentStyle(b, "visibility") } else { var d; if (a._opacity == ".25") d = a._width + c + a._width + c + a._width + c + "#D3D3D3"; else if (a._opacity == ".5") d = a._width + c + a._width + c + a._width + c + "#778899"; else if (a._opacity == ".75") d = a._width + c + a._width + c + a._width + c + "#808080"; else d = a._width + c + a._width + c + a._width + c + "#000"; if (b.style.boxShadow != undefined) b.style.boxShadow = d; else if (b.style.MozBoxShadow != undefined) b.style.MozBoxShadow = d; else if (b.style.WebkitBoxShadow != undefined) b.style.WebkitBoxShadow = d } }, setupOpacity: function () { var a = this; a.get_isInitialized() && a._shadowDiv && $common.setElementOpacity(a._shadowDiv, a._opacity) }, setupRounded: function () { var b = this; if (!b._roundedBehavior && b._rounded) b._roundedBehavior = $create(Sys.Extended.UI.RoundedCornersBehavior, a, a, a, b.get_element()); b._roundedBehavior && b._roundedBehavior.set_Radius(b._rounded ? b._radius : 0) }, updateZIndex: function () { var c = this; if (!c._shadowDiv) return; var d = c.get_element(), a = d.style.zIndex, b = c._shadowDiv.style.zIndex; if (b && a && a > b) return; else { a = Math.max(2, a); b = a - 1 } d.style.zIndex = a; c._shadowDiv.style.zIndex = b }, updateRoundedCorners: function () { var a = this; if (a.get_isInitialized()) { a.setupRounded(); a.disposeShadowDiv(); a.setShadow() } }, get_Opacity: function () { return this._opacity }, set_Opacity: function (b) { var a = this; if (a._opacity != b) { a._opacity = b; a.setShadow(); a.setupOpacity(); a.raisePropertyChanged("Opacity") } }, get_Rounded: function () { return this._rounded }, set_Rounded: function (b) { var a = this; if (b != a._rounded) { a._rounded = b; a.updateRoundedCorners(); a.raisePropertyChanged("Rounded") } }, get_Radius: function () { return this._radius }, set_Radius: function (b) { var a = this; if (b != a._radius) { a._radius = b; a.updateRoundedCorners(); a.raisePropertyChanged("Radius") } }, get_Width: function () { return this._width }, set_Width: function (b) { var a = this; if (b != a._width) { a._width = b; a._shadowDiv && $common.setVisible(a._shadowDiv, b > 0); a.setShadow(true); a.raisePropertyChanged("Width") } }, get_TrackPositionDelay: function () { return this._trackPositionDelay }, set_TrackPositionDelay: function (c) { var a = this; if (c != a._trackPositionDelay) { a._trackPositionDelay = c; if (!b) b = a.get_element(); if (b.style.boxShadow == undefined && b.style.MozBoxShadow == undefined && b.style.WebkitBoxShadow == undefined) { if (a._trackPosition) { a.stopTimer(); a.startTimer() } a.raisePropertyChanged("TrackPositionDelay") } } }, get_TrackPosition: function () { return this._trackPosition }, set_TrackPosition: function (c) { var a = this; if (c != a._trackPosition) { a._trackPosition = c; if (!b) b = a.get_element(); if (b.style.boxShadow == undefined && b.style.MozBoxShadow == undefined && b.style.WebkitBoxShadow == undefined) { if (a.get_element()) if (c) a.startTimer(); else a.stopTimer(); a.raisePropertyChanged("TrackPosition") } } } }; Sys.Extended.UI.DropShadowBehavior.registerClass("Sys.Extended.UI.DropShadowBehavior", Sys.Extended.UI.BehaviorBase); Sys.registerComponent(Sys.Extended.UI.DropShadowBehavior, { name: "dropShadow" }) } if (window.Sys && Sys.loader) Sys.loader.registerScript(d, ["ExtendedBase", "ExtendedCommon", "ExtendedTimer", "ExtendedRoundedCorners"], c); else c() })();
//END DropShadow.DropShadowBehavior.js
//START DynamicPopulate.DynamicPopulateBehavior.js
// (c) 2010 CodePlex Foundation
(function () { var b = "ExtendedDynamicPopulate"; function a() { var d = "populated", c = "populating", b = false, a = null; Type.registerNamespace("Sys.Extended.UI"); Sys.Extended.UI.DynamicPopulateBehavior = function (d) { var c = this; Sys.Extended.UI.DynamicPopulateBehavior.initializeBase(c, [d]); c._servicePath = location.pathname; c._serviceMethod = a; c._contextKey = a; c._cacheDynamicResults = b; c._populateTriggerID = a; c._setUpdatingCssClass = a; c._clearDuringUpdate = true; c._customScript = a; c._clickHandler = a; c._callID = 0; c._currentCallID = -1; c._populated = b }; Sys.Extended.UI.DynamicPopulateBehavior.prototype = { initialize: function () { var a = this; Sys.Extended.UI.DynamicPopulateBehavior.callBaseMethod(a, "initialize"); $common.prepareHiddenElementForATDeviceUpdate(); if (a._populateTriggerID) { var b = $get(a._populateTriggerID); if (b) { a._clickHandler = Function.createDelegate(a, a._onPopulateTriggerClick); $addHandler(b, "click", a._clickHandler) } } }, dispose: function () { var b = this; if (b._populateTriggerID && b._clickHandler) { var c = $get(b._populateTriggerID); c && $removeHandler(c, "click", b._clickHandler); b._populateTriggerID = a; b._clickHandler = a } Sys.Extended.UI.DynamicPopulateBehavior.callBaseMethod(b, "dispose") }, populate: function (c) { var a = this; if (a._populated && a._cacheDynamicResults) return; if (a._currentCallID == -1) { var d = new Sys.CancelEventArgs; a.raisePopulating(d); if (d.get_cancel()) return; a._setUpdating(true) } if (a._customScript) { var e = eval(a._customScript); a._setTargetHtml(e); a._setUpdating(b) } else { a._currentCallID = ++a._callID; if (a._servicePath && a._serviceMethod) { Sys.Net.WebServiceProxy.invoke(a._servicePath, a._serviceMethod, b, { contextKey: c ? c : a._contextKey }, Function.createDelegate(a, a._onMethodComplete), Function.createDelegate(a, a._onMethodError), a._currentCallID); $common.updateFormToRefreshATDeviceBuffer() } } }, _onMethodComplete: function (c, a) { if (a != this._currentCallID) return; this._setTargetHtml(c); this._setUpdating(b) }, _onMethodError: function (c, d) { var a = this; if (d != a._currentCallID) return; if (c.get_timedOut()) a._setTargetHtml(Sys.Extended.UI.Resources.DynamicPopulate_WebServiceTimeout); else a._setTargetHtml(String.format(Sys.Extended.UI.Resources.DynamicPopulate_WebServiceError, c.get_statusCode())); a._setUpdating(b) }, _onPopulateTriggerClick: function () { this.populate(this._contextKey) }, _setUpdating: function (b) { var a = this; a.setStyle(b); if (!b) { a._currentCallID = -1; a._populated = true; a.raisePopulated(a, Sys.EventArgs.Empty) } }, _setTargetHtml: function (b) { var a = this.get_element(); if (a) if (a.tagName == "INPUT") a.value = b; else a.innerHTML = b }, setStyle: function (d) { var b = this, c = b.get_element(); if (b._setUpdatingCssClass) if (!d) { c.className = b._oldCss; b._oldCss = a } else { b._oldCss = c.className; c.className = b._setUpdatingCssClass } d && b._clearDuringUpdate && b._setTargetHtml("") }, get_ClearContentsDuringUpdate: function () { return this._clearDuringUpdate }, set_ClearContentsDuringUpdate: function (a) { if (this._clearDuringUpdate != a) { this._clearDuringUpdate = a; this.raisePropertyChanged("ClearContentsDuringUpdate") } }, get_ContextKey: function () { return this._contextKey }, set_ContextKey: function (a) { if (this._contextKey != a) { this._contextKey = a; this.raisePropertyChanged("ContextKey") } }, get_PopulateTriggerID: function () { return this._populateTriggerID }, set_PopulateTriggerID: function (a) { if (this._populateTriggerID != a) { this._populateTriggerID = a; this.raisePropertyChanged("PopulateTriggerID") } }, get_ServicePath: function () { return this._servicePath }, set_ServicePath: function (a) { if (this._servicePath != a) { this._servicePath = a; this.raisePropertyChanged("ServicePath") } }, get_ServiceMethod: function () { return this._serviceMethod }, set_ServiceMethod: function (a) { if (this._serviceMethod != a) { this._serviceMethod = a; this.raisePropertyChanged("ServiceMethod") } }, get_cacheDynamicResults: function () { return this._cacheDynamicResults }, set_cacheDynamicResults: function (a) { if (this._cacheDynamicResults != a) { this._cacheDynamicResults = a; this.raisePropertyChanged("cacheDynamicResults") } }, get_UpdatingCssClass: function () { return this._setUpdatingCssClass }, set_UpdatingCssClass: function (a) { if (this._setUpdatingCssClass != a) { this._setUpdatingCssClass = a; this.raisePropertyChanged("UpdatingCssClass") } }, get_CustomScript: function () { return this._customScript }, set_CustomScript: function (a) { if (this._customScript != a) { this._customScript = a; this.raisePropertyChanged("CustomScript") } }, add_populating: function (a) { this.get_events().addHandler(c, a) }, remove_populating: function (a) { this.get_events().removeHandler(c, a) }, raisePopulating: function (b) { var a = this.get_events().getHandler(c); a && a(this, b) }, add_populated: function (a) { this.get_events().addHandler(d, a) }, remove_populated: function (a) { this.get_events().removeHandler(d, a) }, raisePopulated: function (b) { var a = this.get_events().getHandler(d); a && a(this, b) } }; Sys.Extended.UI.DynamicPopulateBehavior.registerClass("Sys.Extended.UI.DynamicPopulateBehavior", Sys.Extended.UI.BehaviorBase); Sys.registerComponent(Sys.Extended.UI.DynamicPopulateBehavior, { name: "dynamicPopulate" }) } if (window.Sys && Sys.loader) Sys.loader.registerScript(b, ["ExtendedBase", "ExtendedCommon", "Network"], a); else a() })();
//END DynamicPopulate.DynamicPopulateBehavior.js
//START Compat.DragDrop.DragDropScripts.js
// (c) 2010 CodePlex Foundation
(function () { var b = "ExtendedDragDrop"; function a() { var m = "keypress", l = "dragleave", k = "dragenter", j = "dragstart", h = "dragover", g = "mousemove", f = "mouseup", i = "initialize", e = false, b = true, d = "dragStop", c = "dragStart", a = null; Type.registerNamespace("Sys.Extended.UI"); Sys.Extended.UI.IDragSource = function () { }; Sys.Extended.UI.IDragSource.prototype = { get_dragDataType: function () { throw Error.notImplemented(); }, getDragData: function () { throw Error.notImplemented(); }, get_dragMode: function () { throw Error.notImplemented(); }, onDragStart: function () { throw Error.notImplemented(); }, onDrag: function () { throw Error.notImplemented(); }, onDragEnd: function () { throw Error.notImplemented(); } }; Sys.Extended.UI.IDragSource.registerInterface("Sys.Extended.UI.IDragSource"); Sys.Extended.UI.IDropTarget = function () { }; Sys.Extended.UI.IDropTarget.prototype = { get_dropTargetElement: function () { throw Error.notImplemented(); }, canDrop: function () { throw Error.notImplemented(); }, drop: function () { throw Error.notImplemented(); }, onDragEnterTarget: function () { throw Error.notImplemented(); }, onDragLeaveTarget: function () { throw Error.notImplemented(); }, onDragInTarget: function () { throw Error.notImplemented(); } }; Sys.Extended.UI.IDropTarget.registerInterface("Sys.Extended.UI.IDropTarget"); Sys.Extended.UI.DragMode = function () { throw Error.invalidOperation(); }; Sys.Extended.UI.DragMode.prototype = { Copy: 0, Move: 1 }; Sys.Extended.UI.DragMode.registerEnum("Sys.Extended.UI.DragMode"); Sys.Extended.UI.DragDropEventArgs = function (c, a, b) { this._dragMode = c; this._dataType = a; this._data = b }; Sys.Extended.UI.DragDropEventArgs.prototype = { get_dragMode: function () { return this._dragMode || a }, get_dragDataType: function () { return this._dataType || a }, get_dragData: function () { return this._data || a } }; Sys.Extended.UI.DragDropEventArgs.registerClass("Sys.Extended.UI.DragDropEventArgs"); Sys.Extended.UI._DragDropManager = function () { this._instance = a; this._events = a }; Sys.Extended.UI._DragDropManager.prototype = { add_dragStart: function (a) { this.get_events().addHandler(c, a) }, remove_dragStart: function (a) { this.get_events().removeHandler(c, a) }, get_events: function () { if (!this._events) this._events = new Sys.EventHandlerList; return this._events }, add_dragStop: function (a) { this.get_events().addHandler(d, a) }, remove_dragStop: function (a) { this.get_events().removeHandler(d, a) }, _getInstance: function () { var a = this; if (!a._instance) { if (Sys.Browser.agent === Sys.Browser.InternetExplorer) a._instance = new Sys.Extended.UI.IEDragDropManager; else a._instance = new Sys.Extended.UI.GenericDragDropManager; a._instance.initialize(); a._instance.add_dragStart(Function.createDelegate(a, a._raiseDragStart)); a._instance.add_dragStop(Function.createDelegate(a, a._raiseDragStop)) } return a._instance }, startDragDrop: function (b, c, d, a) { this._getInstance().startDragDrop(b, c, d, a) }, registerDropTarget: function (a) { this._getInstance().registerDropTarget(a) }, unregisterDropTarget: function (a) { this._getInstance().unregisterDropTarget(a) }, dispose: function () { delete this._events; Sys.Application.unregisterDisposableObject(this); Sys.Application.removeComponent(this) }, _raiseDragStart: function (d, b) { var a = this.get_events().getHandler(c); a && a(this, b) }, _raiseDragStop: function (c, b) { var a = this.get_events().getHandler(d); a && a(this, b) } }; Sys.Extended.UI._DragDropManager.registerClass("Sys.Extended.UI._DragDropManager"); Sys.Extended.UI.DragDropManager = new Sys.Extended.UI._DragDropManager; Sys.Extended.UI.IEDragDropManager = function () { var c = this; Sys.Extended.UI.IEDragDropManager.initializeBase(c); c._dropTargets = a; c._radius = 10; c._useBuiltInDragAndDropFunctions = b; c._activeDragVisual = a; c._activeContext = a; c._activeDragSource = a; c._underlyingTarget = a; c._oldOffset = a; c._potentialTarget = a; c._isDragging = e; c._mouseUpHandler = a; c._documentMouseMoveHandler = a; c._documentDragOverHandler = a; c._dragStartHandler = a; c._mouseMoveHandler = a; c._dragEnterHandler = a; c._dragLeaveHandler = a; c._dragOverHandler = a; c._dropHandler = a }; Sys.Extended.UI.IEDragDropManager.prototype = { add_dragStart: function (a) { this.get_events().addHandler(c, a) }, remove_dragStart: function (a) { this.get_events().removeHandler(c, a) }, add_dragStop: function (a) { this.get_events().addHandler(d, a) }, remove_dragStop: function (a) { this.get_events().removeHandler(d, a) }, initialize: function () { var a = this; Sys.Extended.UI.IEDragDropManager.callBaseMethod(a, i); a._mouseUpHandler = Function.createDelegate(a, a._onMouseUp); a._documentMouseMoveHandler = Function.createDelegate(a, a._onDocumentMouseMove); a._documentDragOverHandler = Function.createDelegate(a, a._onDocumentDragOver); a._dragStartHandler = Function.createDelegate(a, a._onDragStart); a._mouseMoveHandler = Function.createDelegate(a, a._onMouseMove); a._dragEnterHandler = Function.createDelegate(a, a._onDragEnter); a._dragLeaveHandler = Function.createDelegate(a, a._onDragLeave); a._dragOverHandler = Function.createDelegate(a, a._onDragOver); a._dropHandler = Function.createDelegate(a, a._onDrop) }, dispose: function () { var b = this; if (b._dropTargets) { for (var c = 0; c < b._dropTargets; c++) b.unregisterDropTarget(b._dropTargets[c]); b._dropTargets = a } Sys.Extended.UI.IEDragDropManager.callBaseMethod(b, "dispose") }, startDragDrop: function (f, e, k, i) { var d = this, m = window._event; if (d._isDragging) return; d._underlyingTarget = a; d._activeDragSource = f; d._activeDragVisual = e; d._activeContext = k; d._useBuiltInDragAndDropFunctions = typeof i != "undefined" ? i : b; var j = { x: m.clientX, y: m.clientY }; e.originalPosition = e.style.position; e.style.position = "absolute"; document._lastPosition = j; e.startingPoint = j; var n = d.getScrollOffset(e, b); e.startingPoint = d.addPoints(e.startingPoint, n); var g = parseInt(e.style.left), h = parseInt(e.style.top); if (isNaN(g)) g = "0"; if (isNaN(h)) h = "0"; e.startingPoint = d.subtractPoints(e.startingPoint, { x: g, y: h }); d._prepareForDomChanges(); f.onDragStart(); var o = new Sys.Extended.UI.DragDropEventArgs(f.get_dragMode(), f.get_dragDataType(), f.getDragData(k)), l = d.get_events().getHandler(c); l && l(d, o); d._recoverFromDomChanges(); d._wireEvents(); d._drag(b) }, _stopDragDrop: function (c) { var b = this, g = window._event; if (b._activeDragSource != a) { b._unwireEvents(); if (!c) c = b._underlyingTarget == a; !c && b._underlyingTarget != a && b._underlyingTarget.drop(b._activeDragSource.get_dragMode(), b._activeDragSource.get_dragDataType(), b._activeDragSource.getDragData(b._activeContext)); b._activeDragSource.onDragEnd(c); var f = b.get_events().getHandler(d); f && f(b, Sys.EventArgs.Empty); b._activeDragVisual.style.position = b._activeDragVisual.originalPosition; b._activeDragSource = a; b._activeContext = a; b._activeDragVisual = a; b._isDragging = e; b._potentialTarget = a; g.preventDefault() } }, _drag: function (h) { var c = this, g = window._event, f = { x: g.clientX, y: g.clientY }; document._lastPosition = f; var i = c.getScrollOffset(c._activeDragVisual, b), d = c.addPoints(c.subtractPoints(f, c._activeDragVisual.startingPoint), i); if (!h && parseInt(c._activeDragVisual.style.left) == d.x && parseInt(c._activeDragVisual.style.top) == d.y) return; $common.setLocation(c._activeDragVisual, d); c._prepareForDomChanges(); c._activeDragSource.onDrag(); c._recoverFromDomChanges(); c._potentialTarget = c._findPotentialTarget(c._activeDragSource, c._activeDragVisual); var e = c._potentialTarget != c._underlyingTarget || c._potentialTarget == a; e && c._underlyingTarget != a && c._leaveTarget(c._activeDragSource, c._underlyingTarget); if (c._potentialTarget != a) if (e) { c._underlyingTarget = c._potentialTarget; c._enterTarget(c._activeDragSource, c._underlyingTarget) } else c._moveInTarget(c._activeDragSource, c._underlyingTarget); else c._underlyingTarget = a }, _wireEvents: function () { var a = this; if (a._useBuiltInDragAndDropFunctions) { $addHandler(document, f, a._mouseUpHandler); $addHandler(document, g, a._documentMouseMoveHandler); $addHandler(document.body, h, a._documentDragOverHandler); $addHandler(a._activeDragVisual, j, a._dragStartHandler); $addHandler(a._activeDragVisual, "dragend", a._mouseUpHandler); $addHandler(a._activeDragVisual, "drag", a._mouseMoveHandler) } else { $addHandler(document, f, a._mouseUpHandler); $addHandler(document, g, a._mouseMoveHandler) } }, _unwireEvents: function () { var a = this; if (a._useBuiltInDragAndDropFunctions) { $removeHandler(a._activeDragVisual, "drag", a._mouseMoveHandler); $removeHandler(a._activeDragVisual, "dragend", a._mouseUpHandler); $removeHandler(a._activeDragVisual, j, a._dragStartHandler); $removeHandler(document.body, h, a._documentDragOverHandler); $removeHandler(document, g, a._documentMouseMoveHandler); $removeHandler(document, f, a._mouseUpHandler) } else { $removeHandler(document, g, a._mouseMoveHandler); $removeHandler(document, f, a._mouseUpHandler) } }, registerDropTarget: function (c) { var b = this; if (b._dropTargets == a) b._dropTargets = []; Array.add(b._dropTargets, c); b._wireDropTargetEvents(c) }, unregisterDropTarget: function (a) { this._unwireDropTargetEvents(a); this._dropTargets && Array.remove(this._dropTargets, a) }, _wireDropTargetEvents: function (c) { var b = this, a = c.get_dropTargetElement(); a._dropTarget = c; $addHandler(a, k, b._dragEnterHandler); $addHandler(a, l, b._dragLeaveHandler); $addHandler(a, h, b._dragOverHandler); $addHandler(a, "drop", b._dropHandler) }, _unwireDropTargetEvents: function (d) { var c = this, b = d.get_dropTargetElement(); if (b._dropTarget) { b._dropTarget = a; $removeHandler(b, k, c._dragEnterHandler); $removeHandler(b, l, c._dragLeaveHandler); $removeHandler(b, h, c._dragOverHandler); $removeHandler(b, "drop", c._dropHandler) } }, _onDragStart: function (e) { window._event = e; document.selection.empty(); var d = e.dataTransfer; if (!d && e.rawEvent) d = e.rawEvent.dataTransfer; var c = this._activeDragSource.get_dragDataType().toLowerCase(), b = this._activeDragSource.getDragData(this._activeContext); if (b) { if (c != "text" && c != "url") { c = "text"; if (b.innerHTML != a) b = b.innerHTML } d.effectAllowed = "move"; d.setData(c, b.toString()) } }, _onMouseUp: function (a) { window._event = a; this._stopDragDrop(e) }, _onDocumentMouseMove: function (a) { window._event = a; this._dragDrop() }, _onDocumentDragOver: function (a) { window._event = a; this._potentialTarget && a.preventDefault() }, _onMouseMove: function (a) { window._event = a; this._drag() }, _onDragEnter: function (c) { window._event = c; if (this._isDragging) c.preventDefault(); else for (var b = Sys.Extended.UI.IEDragDropManager._getDataObjectsForDropTarget(this._getDropTarget(c.target)), a = 0; a < b.length; a++) this._dropTarget.onDragEnterTarget(Sys.Extended.UI.DragMode.Copy, b[a].type, b[a].value) }, _onDragLeave: function (c) { window._event = c; if (this._isDragging) c.preventDefault(); else for (var b = Sys.Extended.UI.IEDragDropManager._getDataObjectsForDropTarget(this._getDropTarget(c.target)), a = 0; a < b.length; a++) this._dropTarget.onDragLeaveTarget(Sys.Extended.UI.DragMode.Copy, b[a].type, b[a].value) }, _onDragOver: function (c) { window._event = c; if (this._isDragging) c.preventDefault(); else for (var b = Sys.Extended.UI.IEDragDropManager._getDataObjectsForDropTarget(this._getDropTarget(c.target)), a = 0; a < b.length; a++) this._dropTarget.onDragInTarget(Sys.Extended.UI.DragMode.Copy, b[a].type, b[a].value) }, _onDrop: function (c) { window._event = c; if (!this._isDragging) for (var b = Sys.Extended.UI.IEDragDropManager._getDataObjectsForDropTarget(this._getDropTarget(c.target)), a = 0; a < b.length; a++) this._dropTarget.drop(Sys.Extended.UI.DragMode.Copy, b[a].type, b[a].value); c.preventDefault() }, _getDropTarget: function (b) { while (b) { if (b._dropTarget != a) return b._dropTarget; b = b.parentNode } return a }, _dragDrop: function () { if (this._isDragging) return; this._isDragging = b; this._activeDragVisual.dragDrop(); document.selection.empty() }, _moveInTarget: function (a, b) { this._prepareForDomChanges(); b.onDragInTarget(a.get_dragMode(), a.get_dragDataType(), a.getDragData(this._activeContext)); this._recoverFromDomChanges() }, _enterTarget: function (a, b) { this._prepareForDomChanges(); b.onDragEnterTarget(a.get_dragMode(), a.get_dragDataType(), a.getDragData(this._activeContext)); this._recoverFromDomChanges() }, _leaveTarget: function (a, b) { this._prepareForDomChanges(); b.onDragLeaveTarget(a.get_dragMode(), a.get_dragDataType(), a.getDragData(this._activeContext)); this._recoverFromDomChanges() }, _findPotentialTarget: function (e) { var c = this, h = window._event; if (c._dropTargets == a) return a; for (var l = e.get_dragDataType(), k = e.get_dragMode(), j = e.getDragData(c._activeContext), f = c.getScrollOffset(document.body, b), m = h.clientX + f.x, n = h.clientY + f.y, i = { x: m - c._radius, y: n - c._radius, width: c._radius * 2, height: c._radius * 2 }, g, d = 0; d < c._dropTargets.length; d++) { g = $common.getBounds(c._dropTargets[d].get_dropTargetElement()); if ($common.overlaps(i, g) && c._dropTargets[d].canDrop(k, l, j)) return c._dropTargets[d] } return a }, _prepareForDomChanges: function () { this._oldOffset = $common.getLocation(this._activeDragVisual) }, _recoverFromDomChanges: function () { var a = this, c = $common.getLocation(a._activeDragVisual); if (a._oldOffset.x != c.x || a._oldOffset.y != c.y) { a._activeDragVisual.startingPoint = a.subtractPoints(a._activeDragVisual.startingPoint, a.subtractPoints(a._oldOffset, c)); scrollOffset = a.getScrollOffset(a._activeDragVisual, b); var d = a.addPoints(a.subtractPoints(document._lastPosition, a._activeDragVisual.startingPoint), scrollOffset); $common.setLocation(a._activeDragVisual, d) } }, addPoints: function (a, b) { return { x: a.x + b.x, y: a.y + b.y } }, subtractPoints: function (a, b) { return { x: a.x - b.x, y: a.y - b.y } }, getScrollOffset: function (c, f) { var d = c.scrollLeft, e = c.scrollTop; if (f) { var b = c.parentNode; while (b != a && b.scrollLeft != a) { d += b.scrollLeft; e += b.scrollTop; if (b == document.body && (d != 0 && e != 0)) break; b = b.parentNode } } return { x: d, y: e } }, getBrowserRectangle: function () { var c = window.innerWidth, b = window.innerHeight; if (c == a) c = document.documentElement.clientWidth; if (b == a) b = document.documentElement.clientHeight; return { x: 0, y: 0, width: c, height: b } }, getNextSibling: function (b) { for (b = b.nextSibling; b != a; b = b.nextSibling) if (b.innerHTML != a) return b; return a }, hasParent: function (b) { return b.parentNode != a && b.parentNode.tagName != a } }; Sys.Extended.UI.IEDragDropManager.registerClass("Sys.Extended.UI.IEDragDropManager", Sys.Component); Sys.Extended.UI.IEDragDropManager._getDataObjectsForDropTarget = function (h) { if (h == a) return []; for (var f = window._event, g = [], c = ["URL", "Text"], d, b = 0; b < c.length; b++) { var e = f.dataTransfer; if (!e && f.rawEvent) e = f.rawEvent.dataTransfer; d = e.getData(c[b]); if (h.canDrop(Sys.Extended.UI.DragMode.Copy, c[b], d)) d && Array.add(g, { type: c[b], value: d }) } return g }; Sys.Extended.UI.GenericDragDropManager = function () { var b = this; Sys.Extended.UI.GenericDragDropManager.initializeBase(b); b._dropTargets = a; b._scrollEdgeConst = 40; b._scrollByConst = 10; b._scroller = a; b._scrollDeltaX = 0; b._scrollDeltaY = 0; b._activeDragVisual = a; b._activeContext = a; b._activeDragSource = a; b._oldOffset = a; b._potentialTarget = a; b._mouseUpHandler = a; b._mouseMoveHandler = a; b._keyPressHandler = a; b._scrollerTickHandler = a }; Sys.Extended.UI.GenericDragDropManager.prototype = { initialize: function () { var a = this; Sys.Extended.UI.GenericDragDropManager.callBaseMethod(a, i); a._mouseUpHandler = Function.createDelegate(a, a._onMouseUp); a._mouseMoveHandler = Function.createDelegate(a, a._onMouseMove); a._keyPressHandler = Function.createDelegate(a, a._onKeyPress); a._scrollerTickHandler = Function.createDelegate(a, a._onScrollerTick); a._scroller = new Sys.Timer; a._scroller.set_interval(10); a._scroller.add_tick(a._scrollerTickHandler) }, startDragDrop: function (b, c, d) { var a = this; a._activeDragSource = b; a._activeDragVisual = c; a._activeContext = d; Sys.Extended.UI.GenericDragDropManager.callBaseMethod(a, "startDragDrop", [b, c, d]) }, _stopDragDrop: function (a) { this._scroller.set_enabled(e); Sys.Extended.UI.GenericDragDropManager.callBaseMethod(this, "_stopDragDrop", [a]) }, _drag: function (a) { Sys.Extended.UI.GenericDragDropManager.callBaseMethod(this, "_drag", [a]); this._autoScroll() }, _wireEvents: function () { $addHandler(document, f, this._mouseUpHandler); $addHandler(document, g, this._mouseMoveHandler); $addHandler(document, m, this._keyPressHandler) }, _unwireEvents: function () { $removeHandler(document, m, this._keyPressHandler); $removeHandler(document, g, this._mouseMoveHandler); $removeHandler(document, f, this._mouseUpHandler) }, _wireDropTargetEvents: function () { }, _unwireDropTargetEvents: function () { }, _onMouseUp: function (a) { window._event = a; this._stopDragDrop(e) }, _onMouseMove: function (a) { window._event = a; this._drag() }, _onKeyPress: function (a) { window._event = a; var c = a.keyCode ? a.keyCode : a.rawEvent.keyCode; c == 27 && this._stopDragDrop(b) }, _autoScroll: function () { var a = this, d = window._event, c = a.getBrowserRectangle(); if (c.width > 0) { a._scrollDeltaX = a._scrollDeltaY = 0; if (d.clientX < c.x + a._scrollEdgeConst) a._scrollDeltaX = -a._scrollByConst; else if (d.clientX > c.width - a._scrollEdgeConst) a._scrollDeltaX = a._scrollByConst; if (d.clientY < c.y + a._scrollEdgeConst) a._scrollDeltaY = -a._scrollByConst; else if (d.clientY > c.height - a._scrollEdgeConst) a._scrollDeltaY = a._scrollByConst; if (a._scrollDeltaX != 0 || a._scrollDeltaY != 0) a._scroller.set_enabled(b); else a._scroller.set_enabled(e) } }, _onScrollerTick: function () { var d = document.body.scrollLeft, f = document.body.scrollTop; window.scrollBy(this._scrollDeltaX, this._scrollDeltaY); var c = document.body.scrollLeft, e = document.body.scrollTop, a = this._activeDragVisual, b = { x: parseInt(a.style.left) + (c - d), y: parseInt(a.style.top) + (e - f) }; $common.setLocation(a, b) } }; Sys.Extended.UI.GenericDragDropManager.registerClass("Sys.Extended.UI.GenericDragDropManager", Sys.Extended.UI.IEDragDropManager) } if (window.Sys && Sys.loader) Sys.loader.registerScript(b, ["ExtendedTimer", "ExtendedCommon"], a); else a() })();
//END Compat.DragDrop.DragDropScripts.js
//START DragPanel.FloatingBehavior.js
// (c) 2010 CodePlex Foundation
(function () { var b = "ExtendedFloating"; function a() { Sys.Extended.UI.FloatingBehavior = function (n) { var f = "_floatingObject", e = "location", d = "mousedown", b = null, c = "move", a = this; Sys.Extended.UI.FloatingBehavior.initializeBase(a, [n]); var h, g, j, l, k, i = Function.createDelegate(a, m); a.add_move = function (a) { this.get_events().addHandler(c, a) }; a.remove_move = function (a) { this.get_events().removeHandler(c, a) }; a.get_handle = function () { return h }; a.set_handle = function (a) { h != b && $removeHandler(h, d, i); h = a; $addHandler(h, d, i) }; a.get_profileProperty = function () { return l }; a.set_profileProperty = function (a) { l = a }; a.get_profileComponent = function () { return k }; a.set_profileComponent = function (a) { k = a }; a.get_location = function () { return g }; a.set_location = function (a) { if (g != a) { g = a; this.get_isInitialized() && $common.setLocation(this.get_element(), g); this.raisePropertyChanged(e) } }; a.initialize = function () { Sys.Extended.UI.FloatingBehavior.callBaseMethod(this, "initialize"); Sys.Extended.UI.DragDropManager.registerDropTarget(this); var a = this.get_element(); if (!g) g = $common.getLocation(a); a.style.position = "fixed"; $common.setLocation(a, g) }; a.dispose = function () { Sys.Extended.UI.DragDropManager.unregisterDropTarget(this); h && i && $removeHandler(h, d, i); i = b; Sys.Extended.UI.FloatingBehavior.callBaseMethod(this, "dispose") }; a.checkCanDrag = function (a) { var d = ["input", "button", "select", "textarea", "label"], c = a.tagName; return c.toLowerCase() == "a" && a.href != b && a.href.length > 0 ? false : Array.indexOf(d, c.toLowerCase()) > -1 ? false : true }; function m(a) { window._event = a; var b = this.get_element(); if (this.checkCanDrag(a.target)) { j = $common.getLocation(b); a.preventDefault(); this.startDragDrop(b) } } a.get_dragDataType = function () { return f }; a.getDragData = function () { return b }; a.get_dragMode = function () { return Sys.Extended.UI.DragMode.Move }; a.onDragStart = function () { }; a.onDrag = function () { }; a.onDragEnd = function (b) { var a = this; if (!b) { var f = a.get_events().getHandler(c); if (f) { var d = new Sys.CancelEventArgs; f(a, d); b = d.get_cancel() } } var h = a.get_element(); if (b) $common.setLocation(h, j); else { g = $common.getLocation(h); a.raisePropertyChanged(e) } }; a.startDragDrop = function (a) { Sys.Extended.UI.DragDropManager.startDragDrop(this, a, b) }; a.get_dropTargetElement = function () { return document.body }; a.canDrop = function (b, a) { return a == f }; a.drop = function () { }; a.onDragEnterTarget = function () { }; a.onDragLeaveTarget = function () { }; a.onDragInTarget = function () { } }; Sys.Extended.UI.FloatingBehavior.registerClass("Sys.Extended.UI.FloatingBehavior", Sys.Extended.UI.BehaviorBase, Sys.Extended.UI.IDragSource, Sys.Extended.UI.IDropTarget, Sys.IDisposable); Sys.registerComponent(Sys.Extended.UI.FloatingBehavior, { name: "draggable" }) } if (window.Sys && Sys.loader) Sys.loader.registerScript(b, ["ExtendedBase", "ExtendedCommon", "ExtendedDragDrop"], a); else a() })();
//END DragPanel.FloatingBehavior.js
//START Animation.Animations.js
// (c) 2010 CodePlex Foundation
(function () { var b = "ExtendedAnimations"; function a() { var k = "unit", x = "endValue", w = "startValue", h = "style", y = "property", v = "forceLayoutInIE", u = "maximumOpacity", t = "minimumOpacity", j = "px", q = "height", p = "width", g = "onEnd", d = "onStart", i = "animations", o = "step", n = "ended", m = "started", s = "percentComplete", r = "isActive", f = "isPlaying", e = 100, b = false, c = true, l = "dispose", a = null; Type.registerNamespace("Sys.Extended.UI.Animation"); $AA = Sys.Extended.UI.Animation; $AA.registerAnimation = function (c, b) { if (b && (b === $AA.Animation || b.inheritsFrom && b.inheritsFrom($AA.Animation))) { if (!$AA.__animations) $AA.__animations = {}; $AA.__animations[c.toLowerCase()] = b; b.play = function () { var c = new b; b.apply(c, arguments); c.initialize(); var d = Function.createDelegate(c, function () { c.remove_ended(d); d = a; c.dispose() }); c.add_ended(d); c.play() } } else throw Error.argumentType("type", b, $AA.Animation, Sys.Extended.UI.Resources.Animation_InvalidBaseType); }; $AA.buildAnimation = function (b, d) { if (!b || b === "") return a; var c; b = "(" + b + ")"; if (!Sys.Debug.isDebug) try { c = Sys.Serialization.JavaScriptSerializer.deserialize(b) } catch (e) { } else c = Sys.Serialization.JavaScriptSerializer.deserialize(b); return $AA.createAnimation(c, d) }; $AA.createAnimation = function (d, l) { var a = "obj"; if (!d || !d.AnimationName) throw Error.argument(a, Sys.Extended.UI.Resources.Animation_MissingAnimationName); var c = $AA.__animations[d.AnimationName.toLowerCase()]; if (!c) throw Error.argument("type", String.format(Sys.Extended.UI.Resources.Animation_UknownAnimationName, d.AnimationName)); var e = new c; l && e.set_target(l); if (d.AnimationChildren && d.AnimationChildren.length) if ($AA.ParentAnimation.isInstanceOfType(e)) for (var k = 0; k < d.AnimationChildren.length; k++) { var m = $AA.createAnimation(d.AnimationChildren[k]); m && e.add(m) } else throw Error.argument(a, String.format(Sys.Extended.UI.Resources.Animation_ChildrenNotAllowed, c.getName())); var h = c.__animationProperties; if (!h) { c.__animationProperties = {}; c.resolveInheritance(); for (var j in c.prototype) if (j.startsWith("set_")) c.__animationProperties[j.substr(4).toLowerCase()] = j; delete c.__animationProperties.id; h = c.__animationProperties } for (var f in d) { var g = f.toLowerCase(); if (g == "animationname" || g == "animationchildren") continue; var i = d[f], b = h[g]; if (b && String.isInstanceOfType(b) && e[b]) if (!Sys.Debug.isDebug) try { e[b](i) } catch (n) { } else e[b](i); else if (g.endsWith("script")) { b = h[g.substr(0, f.length - 6)]; if (b && String.isInstanceOfType(b) && e[b]) e.DynamicProperties[b] = i; else if (Sys.Debug.isDebug) throw Error.argument(a, String.format(Sys.Extended.UI.Resources.Animation_NoDynamicPropertyFound, f, f.substr(0, f.length - 5))); } else if (Sys.Debug.isDebug) throw Error.argument(a, String.format(Sys.Extended.UI.Resources.Animation_NoPropertyFound, f)); } return e }; $AA.Animation = function (d, c, e) { var b = this; $AA.Animation.initializeBase(b); b._duration = 1; b._fps = 25; b._target = a; b._tickHandler = a; b._timer = a; b._percentComplete = 0; b._percentDelta = a; b._owner = a; b._parentAnimation = a; b.DynamicProperties = {}; d && b.set_target(d); c && b.set_duration(c); e && b.set_fps(e) }; $AA.Animation.prototype = { dispose: function () { var b = this; if (b._timer) { b._timer.dispose(); b._timer = a } b._tickHandler = a; b._target = a; $AA.Animation.callBaseMethod(b, l) }, play: function () { var a = this; if (!a._owner) { var d = c; if (!a._timer) { d = b; if (!a._tickHandler) a._tickHandler = Function.createDelegate(a, a._onTimerTick); a._timer = new Sys.Timer; a._timer.add_tick(a._tickHandler); a.onStart(); a._timer.set_interval(1e3 / a._fps); a._percentDelta = e / (a._duration * a._fps); a._updatePercentComplete(0, c) } a._timer.set_enabled(c); a.raisePropertyChanged(f); !d && a.raisePropertyChanged(r) } }, pause: function () { var a = this; if (!a._owner) if (a._timer) { a._timer.set_enabled(b); a.raisePropertyChanged(f) } }, stop: function (c) { var b = this; if (!b._owner) { var d = b._timer; b._timer = a; if (d) { d.dispose(); if (b._percentComplete !== e) { b._percentComplete = e; b.raisePropertyChanged(s); if (c || c === undefined) b.onStep(e) } b.onEnd(); b.raisePropertyChanged(f); b.raisePropertyChanged(r) } } }, onStart: function () { var a = this; a.raiseStarted(); for (var b in a.DynamicProperties) try { a[b](eval(a.DynamicProperties[b])) } catch (c) { if (Sys.Debug.isDebug) throw c; } }, onStep: function (a) { this.setValue(this.getAnimatedValue(a)); this.raiseStep() }, onEnd: function () { this.raiseEnded() }, getAnimatedValue: function () { throw Error.notImplemented(); }, setValue: function () { throw Error.notImplemented(); }, interpolate: function (a, c, b) { return a + (c - a) * (b / e) }, _onTimerTick: function () { this._updatePercentComplete(this._percentComplete + this._percentDelta, c) }, _updatePercentComplete: function (a, d) { var c = this; if (a > e) a = e; c._percentComplete = a; c.raisePropertyChanged(s); if (d) c.onStep(a); a === e && c.stop(b) }, setOwner: function (a) { this._owner = a }, raiseStarted: function () { var a = this.get_events().getHandler(m); a && a(this, Sys.EventArgs.Empty) }, add_started: function (a) { this.get_events().addHandler(m, a) }, remove_started: function (a) { this.get_events().removeHandler(m, a) }, raiseEnded: function () { var a = this.get_events().getHandler(n); a && a(this, Sys.EventArgs.Empty) }, add_ended: function (a) { this.get_events().addHandler(n, a) }, remove_ended: function (a) { this.get_events().removeHandler(n, a) }, raiseStep: function () { var a = this.get_events().getHandler(o); a && a(this, Sys.EventArgs.Empty) }, add_step: function (a) { this.get_events().addHandler(o, a) }, remove_step: function (a) { this.get_events().removeHandler(o, a) }, get_target: function () { var a = this; return !a._target && a._parentAnimation ? a._parentAnimation.get_target() : a._target }, set_target: function (a) { if (this._target != a) { this._target = a; this.raisePropertyChanged("target") } }, set_animationTarget: function (d) { var c = a, b = $get(d); if (b) c = b; else { var e = $find(d); if (e) { b = e.get_element(); if (b) c = b } } if (c) this.set_target(c); else throw Error.argument("id", String.format(Sys.Extended.UI.Resources.Animation_TargetNotFound, d)); }, get_duration: function () { return this._duration }, set_duration: function (b) { var a = this; b = a._getFloat(b); if (a._duration != b) { a._duration = b; a.raisePropertyChanged("duration") } }, get_fps: function () { return this._fps }, set_fps: function (b) { var a = this; b = a._getInteger(b); if (a.fps != b) { a._fps = b; a.raisePropertyChanged("fps") } }, get_isActive: function () { return this._timer !== a }, get_isPlaying: function () { return this._timer !== a && this._timer.get_enabled() }, get_percentComplete: function () { return this._percentComplete }, _getBoolean: function (a) { return String.isInstanceOfType(a) ? Boolean.parse(a) : a }, _getInteger: function (a) { return String.isInstanceOfType(a) ? parseInt(a) : a }, _getFloat: function (a) { return String.isInstanceOfType(a) ? parseFloat(a) : a }, _getEnum: function (a, b) { return String.isInstanceOfType(a) && b && b.parse ? b.parse(a) : a } }; $AA.Animation.registerClass("Sys.Extended.UI.Animation.Animation", Sys.Component); $AA.registerAnimation("animation", $AA.Animation); $AA.ParentAnimation = function (d, c, e, a) { $AA.ParentAnimation.initializeBase(this, [d, c, e]); this._animations = []; if (a && a.length) for (var b = 0; b < a.length; b++) this.add(a[b]) }; $AA.ParentAnimation.prototype = { initialize: function () { var a = this; $AA.ParentAnimation.callBaseMethod(a, "initialize"); if (a._animations) for (var c = 0; c < a._animations.length; c++) { var b = a._animations[c]; b && !b.get_isInitialized && b.initialize() } }, dispose: function () { this.clear(); this._animations = a; $AA.ParentAnimation.callBaseMethod(this, l) }, get_animations: function () { return this._animations }, add: function (b) { var a = this; if (a._animations) { if (b) b._parentAnimation = a; Array.add(a._animations, b); a.raisePropertyChanged(i) } }, remove: function (a) { if (this._animations) { a && a.dispose(); Array.remove(this._animations, a); this.raisePropertyChanged(i) } }, removeAt: function (c) { var a = this; if (a._animations) { var b = a._animations[c]; b && b.dispose(); Array.removeAt(a._animations, c); a.raisePropertyChanged(i) } }, clear: function () { var b = this; if (b._animations) { for (var c = b._animations.length - 1; c >= 0; c--) { b._animations[c].dispose(); b._animations[c] = a } Array.clear(b._animations); b._animations = []; b.raisePropertyChanged(i) } } }; $AA.ParentAnimation.registerClass("Sys.Extended.UI.Animation.ParentAnimation", $AA.Animation); $AA.registerAnimation("parent", $AA.ParentAnimation); $AA.ParallelAnimation = function (c, b, d, a) { $AA.ParallelAnimation.initializeBase(this, [c, b, d, a]) }; $AA.ParallelAnimation.prototype = { add: function (a) { $AA.ParallelAnimation.callBaseMethod(this, "add", [a]); a.setOwner(this) }, onStart: function () { $AA.ParallelAnimation.callBaseMethod(this, d); for (var b = this.get_animations(), a = 0; a < b.length; a++) b[a].onStart() }, onStep: function (c) { for (var b = this.get_animations(), a = 0; a < b.length; a++) b[a].onStep(c) }, onEnd: function () { for (var b = this.get_animations(), a = 0; a < b.length; a++) b[a].onEnd(); $AA.ParallelAnimation.callBaseMethod(this, g) } }; $AA.ParallelAnimation.registerClass("Sys.Extended.UI.Animation.ParallelAnimation", $AA.ParentAnimation); $AA.registerAnimation("parallel", $AA.ParallelAnimation); $AA.SequenceAnimation = function (g, f, h, e, d) { var c = this; $AA.SequenceAnimation.initializeBase(c, [g, f, h, e]); c._handler = a; c._paused = b; c._playing = b; c._index = 0; c._remainingIterations = 0; c._iterations = d !== undefined ? d : 1 }; $AA.SequenceAnimation.prototype = { dispose: function () { this._handler = a; $AA.SequenceAnimation.callBaseMethod(this, l) }, stop: function () { var a = this; if (a._playing) { var c = a.get_animations(); if (a._index < c.length) { c[a._index].remove_ended(a._handler); for (var d = a._index; d < c.length; d++) c[d].stop() } a._playing = b; a._paused = b; a.raisePropertyChanged(f); a.onEnd() } }, pause: function () { var b = this; if (b.get_isPlaying()) { var d = b.get_animations()[b._index]; d != a && d.pause(); b._paused = c; b.raisePropertyChanged(f) } }, play: function () { var d = this, g = d.get_animations(); if (!d._playing) { d._playing = c; if (d._paused) { d._paused = b; var h = g[d._index]; if (h != a) { h.play(); d.raisePropertyChanged(f) } } else { d.onStart(); d._index = 0; var e = g[d._index]; if (e) { e.add_ended(d._handler); e.play(); d.raisePropertyChanged(f) } else d.stop() } } }, onStart: function () { var a = this; $AA.SequenceAnimation.callBaseMethod(a, d); a._remainingIterations = a._iterations - 1; if (!a._handler) a._handler = Function.createDelegate(a, a._onEndAnimation) }, _onEndAnimation: function () { var a = this, b = a.get_animations(), c = b[a._index++]; c && c.remove_ended(a._handler); if (a._index < b.length) { var e = b[a._index]; e.add_ended(a._handler); e.play() } else if (a._remainingIterations >= 1 || a._iterations <= 0) { a._remainingIterations--; a._index = 0; var d = b[0]; d.add_ended(a._handler); d.play() } else a.stop() }, onStep: function () { throw Error.invalidOperation(Sys.Extended.UI.Resources.Animation_CannotNestSequence); }, onEnd: function () { this._remainingIterations = 0; $AA.SequenceAnimation.callBaseMethod(this, g) }, get_isActive: function () { return c }, get_isPlaying: function () { return this._playing && !this._paused }, get_iterations: function () { return this._iterations }, set_iterations: function (b) { var a = this; b = a._getInteger(b); if (a._iterations != b) { a._iterations = b; a.raisePropertyChanged("iterations") } }, get_isInfinite: function () { return this._iterations <= 0 } }; $AA.SequenceAnimation.registerClass("Sys.Extended.UI.Animation.SequenceAnimation", $AA.ParentAnimation); $AA.registerAnimation("sequence", $AA.SequenceAnimation); $AA.SelectionAnimation = function (d, c, e, b) { $AA.SelectionAnimation.initializeBase(this, [d, c, e, b]); this._selectedIndex = -1; this._selected = a }; $AA.SelectionAnimation.prototype = { getSelectedIndex: function () { throw Error.notImplemented(); }, onStart: function () { var a = this; $AA.SelectionAnimation.callBaseMethod(a, d); var b = a.get_animations(); a._selectedIndex = a.getSelectedIndex(); if (a._selectedIndex >= 0 && a._selectedIndex < b.length) { a._selected = b[a._selectedIndex]; if (a._selected) { a._selected.setOwner(a); a._selected.onStart() } } }, onStep: function (a) { if (this._selected) this._selected.onStep(a) }, onEnd: function () { var b = this; if (b._selected) { b._selected.onEnd(); b._selected.setOwner(a) } b._selected = a; b._selectedIndex = a; $AA.SelectionAnimation.callBaseMethod(b, g) } }; $AA.SelectionAnimation.registerClass("Sys.Extended.UI.Animation.SelectionAnimation", $AA.ParentAnimation); $AA.registerAnimation("selection", $AA.SelectionAnimation); $AA.ConditionAnimation = function (d, c, e, b, a) { $AA.ConditionAnimation.initializeBase(this, [d, c, e, b]); this._conditionScript = a }; $AA.ConditionAnimation.prototype = { getSelectedIndex: function () { var a = -1; if (this._conditionScript && this._conditionScript.length > 0) try { a = eval(this._conditionScript) ? 0 : 1 } catch (b) { } return a }, get_conditionScript: function () { return this._conditionScript }, set_conditionScript: function (a) { if (this._conditionScript != a) { this._conditionScript = a; this.raisePropertyChanged("conditionScript") } } }; $AA.ConditionAnimation.registerClass("Sys.Extended.UI.Animation.ConditionAnimation", $AA.SelectionAnimation); $AA.registerAnimation("condition", $AA.ConditionAnimation); $AA.CaseAnimation = function (d, c, e, b, a) { $AA.CaseAnimation.initializeBase(this, [d, c, e, b]); this._selectScript = a }; $AA.CaseAnimation.prototype = { getSelectedIndex: function () { var a = -1; if (this._selectScript && this._selectScript.length > 0) try { var b = eval(this._selectScript); if (b !== undefined) a = b } catch (c) { } return a }, get_selectScript: function () { return this._selectScript }, set_selectScript: function (a) { if (this._selectScript != a) { this._selectScript = a; this.raisePropertyChanged("selectScript") } } }; $AA.CaseAnimation.registerClass("Sys.Extended.UI.Animation.CaseAnimation", $AA.SelectionAnimation); $AA.registerAnimation("case", $AA.CaseAnimation); $AA.FadeEffect = function () { throw Error.invalidOperation(); }; $AA.FadeEffect.prototype = { FadeIn: 0, FadeOut: 1 }; $AA.FadeEffect.registerEnum("Sys.Extended.UI.Animation.FadeEffect", b); $AA.FadeAnimation = function (j, i, k, h, g, f, e) { var d = this; $AA.FadeAnimation.initializeBase(d, [j, i, k]); d._effect = h !== undefined ? h : $AA.FadeEffect.FadeIn; d._max = f !== undefined ? f : 1; d._min = g !== undefined ? g : 0; d._start = d._min; d._end = d._max; d._layoutCreated = b; d._forceLayoutInIE = e === undefined || e === a ? c : e; d._currentTarget = a; d._resetOpacities() }; $AA.FadeAnimation.prototype = { _resetOpacities: function () { var a = this; if (a._effect == $AA.FadeEffect.FadeIn) { a._start = a._min; a._end = a._max } else { a._start = a._max; a._end = a._min } }, _createLayout: function () { var a = this, b = a._currentTarget; if (b) { a._originalWidth = $common.getCurrentStyle(b, p); var d = $common.getCurrentStyle(b, q); a._originalBackColor = $common.getCurrentStyle(b, "backgroundColor"); if ((!a._originalWidth || a._originalWidth == "" || a._originalWidth == "auto") && (!d || d == "" || d == "auto")) b.style.width = b.offsetWidth + j; if (!a._originalBackColor || a._originalBackColor == "" || a._originalBackColor == "transparent" || a._originalBackColor == "rgba(0, 0, 0, 0)") b.style.backgroundColor = $common.getInheritedBackgroundColor(b); a._layoutCreated = c } }, onStart: function () { var a = this; $AA.FadeAnimation.callBaseMethod(a, d); a._currentTarget = a.get_target(); a.setValue(a._start); a._forceLayoutInIE && !a._layoutCreated && Sys.Browser.agent == Sys.Browser.InternetExplorer && a._createLayout() }, getAnimatedValue: function (a) { return this.interpolate(this._start, this._end, a) }, setValue: function (a) { this._currentTarget && $common.setElementOpacity(this._currentTarget, a) }, get_effect: function () { return this._effect }, set_effect: function (b) { var a = this; b = a._getEnum(b, $AA.FadeEffect); if (a._effect != b) { a._effect = b; a._resetOpacities(); a.raisePropertyChanged("effect") } }, get_minimumOpacity: function () { return this._min }, set_minimumOpacity: function (b) { var a = this; b = a._getFloat(b); if (a._min != b) { a._min = b; a._resetOpacities(); a.raisePropertyChanged(t) } }, get_maximumOpacity: function () { return this._max }, set_maximumOpacity: function (b) { var a = this; b = a._getFloat(b); if (a._max != b) { a._max = b; a._resetOpacities(); a.raisePropertyChanged(u) } }, get_forceLayoutInIE: function () { return this._forceLayoutInIE }, set_forceLayoutInIE: function (b) { var a = this; b = a._getBoolean(b); if (a._forceLayoutInIE != b) { a._forceLayoutInIE = b; a.raisePropertyChanged(v) } }, set_startValue: function (a) { a = this._getFloat(a); this._start = a } }; $AA.FadeAnimation.registerClass("Sys.Extended.UI.Animation.FadeAnimation", $AA.Animation); $AA.registerAnimation("fade", $AA.FadeAnimation); $AA.FadeInAnimation = function (e, d, f, c, b, a) { $AA.FadeInAnimation.initializeBase(this, [e, d, f, $AA.FadeEffect.FadeIn, c, b, a]) }; $AA.FadeInAnimation.prototype = { onStart: function () { var a = this; $AA.FadeInAnimation.callBaseMethod(a, d); a._currentTarget && a.set_startValue($common.getElementOpacity(a._currentTarget)) } }; $AA.FadeInAnimation.registerClass("Sys.Extended.UI.Animation.FadeInAnimation", $AA.FadeAnimation); $AA.registerAnimation("fadeIn", $AA.FadeInAnimation); $AA.FadeOutAnimation = function (e, d, f, c, b, a) { $AA.FadeOutAnimation.initializeBase(this, [e, d, f, $AA.FadeEffect.FadeOut, c, b, a]) }; $AA.FadeOutAnimation.prototype = { onStart: function () { var a = this; $AA.FadeOutAnimation.callBaseMethod(a, d); a._currentTarget && a.set_startValue($common.getElementOpacity(a._currentTarget)) } }; $AA.FadeOutAnimation.registerClass("Sys.Extended.UI.Animation.FadeOutAnimation", $AA.FadeAnimation); $AA.registerAnimation("fadeOut", $AA.FadeOutAnimation); $AA.PulseAnimation = function (d, c, e, i, h, g, f) { var b = this; $AA.PulseAnimation.initializeBase(b, [d, c, e, a, i !== undefined ? i : 3]); b._out = new $AA.FadeOutAnimation(d, c, e, h, g, f); b.add(b._out); b._in = new $AA.FadeInAnimation(d, c, e, h, g, f); b.add(b._in) }; $AA.PulseAnimation.prototype = { get_minimumOpacity: function () { return this._out.get_minimumOpacity() }, set_minimumOpacity: function (b) { var a = this; b = a._getFloat(b); a._out.set_minimumOpacity(b); a._in.set_minimumOpacity(b); a.raisePropertyChanged(t) }, get_maximumOpacity: function () { return this._out.get_maximumOpacity() }, set_maximumOpacity: function (b) { var a = this; b = a._getFloat(b); a._out.set_maximumOpacity(b); a._in.set_maximumOpacity(b); a.raisePropertyChanged(u) }, get_forceLayoutInIE: function () { return this._out.get_forceLayoutInIE() }, set_forceLayoutInIE: function (b) { var a = this; b = a._getBoolean(b); a._out.set_forceLayoutInIE(b); a._in.set_forceLayoutInIE(b); a.raisePropertyChanged(v) }, set_duration: function (a) { var b = this; a = b._getFloat(a); $AA.PulseAnimation.callBaseMethod(b, "set_duration", [a]); b._in.set_duration(a); b._out.set_duration(a) }, set_fps: function (a) { var b = this; a = b._getInteger(a); $AA.PulseAnimation.callBaseMethod(b, "set_fps", [a]); b._in.set_fps(a); b._out.set_fps(a) } }; $AA.PulseAnimation.registerClass("Sys.Extended.UI.Animation.PulseAnimation", $AA.SequenceAnimation); $AA.registerAnimation("pulse", $AA.PulseAnimation); $AA.PropertyAnimation = function (f, d, g, e, c) { var b = this; $AA.PropertyAnimation.initializeBase(b, [f, d, g]); b._property = e; b._propertyKey = c; b._currentTarget = a }; $AA.PropertyAnimation.prototype = { onStart: function () { $AA.PropertyAnimation.callBaseMethod(this, d); this._currentTarget = this.get_target() }, setValue: function (c) { var a = this, b = a._currentTarget; if (b && a._property && a._property.length > 0) if (a._propertyKey && a._propertyKey.length > 0 && b[a._property]) b[a._property][a._propertyKey] = c; else b[a._property] = c }, getValue: function () { var b = this, d = b.get_target(); if (d && b._property && b._property.length > 0) { var c = d[b._property]; if (c) return b._propertyKey && b._propertyKey.length > 0 ? c[b._propertyKey] : c } return a }, get_property: function () { return this._property }, set_property: function (a) { if (this._property != a) { this._property = a; this.raisePropertyChanged(y) } }, get_propertyKey: function () { return this._propertyKey }, set_propertyKey: function (a) { if (this._propertyKey != a) { this._propertyKey = a; this.raisePropertyChanged("propertyKey") } } }; $AA.PropertyAnimation.registerClass("Sys.Extended.UI.Animation.PropertyAnimation", $AA.Animation); $AA.registerAnimation(y, $AA.PropertyAnimation); $AA.DiscreteAnimation = function (e, c, f, d, b, a) { $AA.DiscreteAnimation.initializeBase(this, [e, c, f, d, b]); this._values = a && a.length ? a : [] }; $AA.DiscreteAnimation.prototype = { getAnimatedValue: function (a) { var b = Math.floor(this.interpolate(0, this._values.length - 1, a)); return this._values[b] }, get_values: function () { return this._values }, set_values: function (a) { if (this._values != a) { this._values = a; this.raisePropertyChanged("values") } } }; $AA.DiscreteAnimation.registerClass("Sys.Extended.UI.Animation.DiscreteAnimation", $AA.PropertyAnimation); $AA.registerAnimation("discrete", $AA.DiscreteAnimation); $AA.InterpolatedAnimation = function (f, d, g, a, b, c, e) { $AA.InterpolatedAnimation.initializeBase(this, [f, d, g, a !== undefined ? a : h, b]); this._startValue = c; this._endValue = e }; $AA.InterpolatedAnimation.prototype = { get_startValue: function () { return this._startValue }, set_startValue: function (b) { var a = this; b = a._getFloat(b); if (a._startValue != b) { a._startValue = b; a.raisePropertyChanged(w) } }, get_endValue: function () { return this._endValue }, set_endValue: function (b) { var a = this; b = a._getFloat(b); if (a._endValue != b) { a._endValue = b; a.raisePropertyChanged(x) } } }; $AA.InterpolatedAnimation.registerClass("Sys.Extended.UI.Animation.InterpolatedAnimation", $AA.PropertyAnimation); $AA.registerAnimation("interpolated", $AA.InterpolatedAnimation); $AA.ColorAnimation = function (i, f, j, h, d, e, g) { var c = this; $AA.ColorAnimation.initializeBase(c, [i, f, j, h, d, e, g]); c._start = a; c._end = a; c._interpolateRed = b; c._interpolateGreen = b; c._interpolateBlue = b }; $AA.ColorAnimation.prototype = { onStart: function () { var a = this; $AA.ColorAnimation.callBaseMethod(a, d); a._start = $AA.ColorAnimation.getRGB(a.get_startValue()); a._end = $AA.ColorAnimation.getRGB(a.get_endValue()); a._interpolateRed = a._start.Red != a._end.Red; a._interpolateGreen = a._start.Green != a._end.Green; a._interpolateBlue = a._start.Blue != a._end.Blue }, getAnimatedValue: function (b) { var a = this, e = a._start.Red, d = a._start.Green, c = a._start.Blue; if (a._interpolateRed) e = Math.round(a.interpolate(e, a._end.Red, b)); if (a._interpolateGreen) d = Math.round(a.interpolate(d, a._end.Green, b)); if (a._interpolateBlue) c = Math.round(a.interpolate(c, a._end.Blue, b)); return $AA.ColorAnimation.toColor(e, d, c) }, set_startValue: function (a) { if (this._startValue != a) { this._startValue = a; this.raisePropertyChanged(w) } }, set_endValue: function (a) { if (this._endValue != a) { this._endValue = a; this.raisePropertyChanged(x) } } }; $AA.ColorAnimation.getRGB = function (a) { if (!a || a.length != 7) throw String.format(Sys.Extended.UI.Resources.Animation_InvalidColor, a); return { Red: parseInt(a.substr(1, 2), 16), Green: parseInt(a.substr(3, 2), 16), Blue: parseInt(a.substr(5, 2), 16) } }; $AA.ColorAnimation.toColor = function (f, d, e) { var c = f.toString(16), b = d.toString(16), a = e.toString(16); if (c.length == 1) c = "0" + c; if (b.length == 1) b = "0" + b; if (a.length == 1) a = "0" + a; return "#" + c + b + a }; $AA.ColorAnimation.registerClass("Sys.Extended.UI.Animation.ColorAnimation", $AA.InterpolatedAnimation); $AA.registerAnimation("color", $AA.ColorAnimation); $AA.LengthAnimation = function (h, e, i, g, c, d, f, b) { $AA.LengthAnimation.initializeBase(this, [h, e, i, g, c, d, f]); this._unit = b != a ? b : j }; $AA.LengthAnimation.prototype = { getAnimatedValue: function (b) { var a = this, c = a.interpolate(a.get_startValue(), a.get_endValue(), b); return Math.round(c) + a._unit }, get_unit: function () { return this._unit }, set_unit: function (a) { if (this._unit != a) { this._unit = a; this.raisePropertyChanged(k) } } }; $AA.LengthAnimation.registerClass("Sys.Extended.UI.Animation.LengthAnimation", $AA.InterpolatedAnimation); $AA.registerAnimation("length", $AA.LengthAnimation); $AA.MoveAnimation = function (e, d, f, g, j, i, k) { var b = this; $AA.MoveAnimation.initializeBase(b, [e, d, f, a]); b._horizontal = g ? g : 0; b._vertical = j ? j : 0; b._relative = i === undefined ? c : i; b._horizontalAnimation = new $AA.LengthAnimation(e, d, f, h, "left", a, a, k); b._verticalAnimation = new $AA.LengthAnimation(e, d, f, h, "top", a, a, k); b.add(b._verticalAnimation); b.add(b._horizontalAnimation) }; $AA.MoveAnimation.prototype = { onStart: function () { var a = this; $AA.MoveAnimation.callBaseMethod(a, d); var b = a.get_target(); a._horizontalAnimation.set_startValue(b.offsetLeft); a._horizontalAnimation.set_endValue(a._relative ? b.offsetLeft + a._horizontal : a._horizontal); a._verticalAnimation.set_startValue(b.offsetTop); a._verticalAnimation.set_endValue(a._relative ? b.offsetTop + a._vertical : a._vertical) }, get_horizontal: function () { return this._horizontal }, set_horizontal: function (b) { var a = this; b = a._getFloat(b); if (a._horizontal != b) { a._horizontal = b; a.raisePropertyChanged("horizontal") } }, get_vertical: function () { return this._vertical }, set_vertical: function (b) { var a = this; b = a._getFloat(b); if (a._vertical != b) { a._vertical = b; a.raisePropertyChanged("vertical") } }, get_relative: function () { return this._relative }, set_relative: function (b) { var a = this; b = a._getBoolean(b); if (a._relative != b) { a._relative = b; a.raisePropertyChanged("relative") } }, get_unit: function () { this._horizontalAnimation.get_unit() }, set_unit: function (b) { var a = this, c = a._horizontalAnimation.get_unit(); if (c != b) { a._horizontalAnimation.set_unit(b); a._verticalAnimation.set_unit(b); a.raisePropertyChanged(k) } } }; $AA.MoveAnimation.registerClass("Sys.Extended.UI.Animation.MoveAnimation", $AA.ParallelAnimation); $AA.registerAnimation("move", $AA.MoveAnimation); $AA.ResizeAnimation = function (d, c, e, i, g, f) { var b = this; $AA.ResizeAnimation.initializeBase(b, [d, c, e, a]); b._width = i; b._height = g; b._horizontalAnimation = new $AA.LengthAnimation(d, c, e, h, p, a, a, f); b._verticalAnimation = new $AA.LengthAnimation(d, c, e, h, q, a, a, f); b.add(b._horizontalAnimation); b.add(b._verticalAnimation) }; $AA.ResizeAnimation.prototype = { onStart: function () { var b = this; $AA.ResizeAnimation.callBaseMethod(b, d); var c = b.get_target(); b._horizontalAnimation.set_startValue(c.offsetWidth); b._verticalAnimation.set_startValue(c.offsetHeight); b._horizontalAnimation.set_endValue(b._width !== a && b._width !== undefined ? b._width : c.offsetWidth); b._verticalAnimation.set_endValue(b._height !== a && b._height !== undefined ? b._height : c.offsetHeight) }, get_width: function () { return this._width }, set_width: function (b) { var a = this; b = a._getFloat(b); if (a._width != b) { a._width = b; a.raisePropertyChanged(p) } }, get_height: function () { return this._height }, set_height: function (b) { var a = this; b = a._getFloat(b); if (a._height != b) { a._height = b; a.raisePropertyChanged(q) } }, get_unit: function () { this._horizontalAnimation.get_unit() }, set_unit: function (b) { var a = this, c = a._horizontalAnimation.get_unit(); if (c != b) { a._horizontalAnimation.set_unit(b); a._verticalAnimation.set_unit(b); a.raisePropertyChanged(k) } } }; $AA.ResizeAnimation.registerClass("Sys.Extended.UI.Animation.ResizeAnimation", $AA.ParallelAnimation); $AA.registerAnimation("resize", $AA.ResizeAnimation); $AA.ScaleAnimation = function (i, g, k, c, e, h, f, d) { var b = this; $AA.ScaleAnimation.initializeBase(b, [i, g, k]); b._scaleFactor = c !== undefined ? c : 1; b._unit = e !== undefined ? e : j; b._center = h; b._scaleFont = f; b._fontUnit = d !== undefined ? d : "pt"; b._element = a; b._initialHeight = a; b._initialWidth = a; b._initialTop = a; b._initialLeft = a; b._initialFontSize = a }; $AA.ScaleAnimation.prototype = { getAnimatedValue: function (a) { return this.interpolate(1, this._scaleFactor, a) }, onStart: function () { var a = this; $AA.ScaleAnimation.callBaseMethod(a, d); a._element = a.get_target(); if (a._element) { a._initialHeight = a._element.offsetHeight; a._initialWidth = a._element.offsetWidth; if (a._center) { a._initialTop = a._element.offsetTop; a._initialLeft = a._element.offsetLeft } if (a._scaleFont) a._initialFontSize = parseFloat($common.getCurrentStyle(a._element, "fontSize")) } }, setValue: function (b) { var a = this; if (a._element) { var e = Math.round(a._initialWidth * b), d = Math.round(a._initialHeight * b); a._element.style.width = e + a._unit; a._element.style.height = d + a._unit; if (a._center) { a._element.style.top = a._initialTop + Math.round((a._initialHeight - d) / 2) + a._unit; a._element.style.left = a._initialLeft + Math.round((a._initialWidth - e) / 2) + a._unit } if (a._scaleFont) { var c = a._initialFontSize * b; if (a._fontUnit == j || a._fontUnit == "pt") c = Math.round(c); a._element.style.fontSize = c + a._fontUnit } } }, onEnd: function () { var b = this; b._element = a; b._initialHeight = a; b._initialWidth = a; b._initialTop = a; b._initialLeft = a; b._initialFontSize = a; $AA.ScaleAnimation.callBaseMethod(b, g) }, get_scaleFactor: function () { return this._scaleFactor }, set_scaleFactor: function (b) { var a = this; b = a._getFloat(b); if (a._scaleFactor != b) { a._scaleFactor = b; a.raisePropertyChanged("scaleFactor") } }, get_unit: function () { return this._unit }, set_unit: function (a) { if (this._unit != a) { this._unit = a; this.raisePropertyChanged(k) } }, get_center: function () { return this._center }, set_center: function (b) { var a = this; b = a._getBoolean(b); if (a._center != b) { a._center = b; a.raisePropertyChanged("center") } }, get_scaleFont: function () { return this._scaleFont }, set_scaleFont: function (b) { var a = this; b = a._getBoolean(b); if (a._scaleFont != b) { a._scaleFont = b; a.raisePropertyChanged("scaleFont") } }, get_fontUnit: function () { return this._fontUnit }, set_fontUnit: function (a) { if (this._fontUnit != a) { this._fontUnit = a; this.raisePropertyChanged("fontUnit") } } }; $AA.ScaleAnimation.registerClass("Sys.Extended.UI.Animation.ScaleAnimation", $AA.Animation); $AA.registerAnimation("scale", $AA.ScaleAnimation); $AA.Action = function (b, a, c) { $AA.Action.initializeBase(this, [b, a, c]); a === undefined && this.set_duration(0) }; $AA.Action.prototype = { onEnd: function () { this.doAction(); $AA.Action.callBaseMethod(this, g) }, doAction: function () { throw Error.notImplemented(); }, getAnimatedValue: function () { }, setValue: function () { } }; $AA.Action.registerClass("Sys.Extended.UI.Animation.Action", $AA.Animation); $AA.registerAnimation("action", $AA.Action); $AA.EnableAction = function (d, b, e, a) { $AA.EnableAction.initializeBase(this, [d, b, e]); this._enabled = a !== undefined ? a : c }; $AA.EnableAction.prototype = { doAction: function () { var a = this.get_target(); if (a) a.disabled = !this._enabled }, get_enabled: function () { return this._enabled }, set_enabled: function (b) { var a = this; b = a._getBoolean(b); if (a._enabled != b) { a._enabled = b; a.raisePropertyChanged("enabled") } } }; $AA.EnableAction.registerClass("Sys.Extended.UI.Animation.EnableAction", $AA.Action); $AA.registerAnimation("enableAction", $AA.EnableAction); $AA.HideAction = function (c, a, d, b) { $AA.HideAction.initializeBase(this, [c, a, d]); this._visible = b }; $AA.HideAction.prototype = { doAction: function () { var a = this.get_target(); a && $common.setVisible(a, this._visible) }, get_visible: function () { return this._visible }, set_visible: function (a) { if (this._visible != a) { this._visible = a; this.raisePropertyChanged("visible") } } }; $AA.HideAction.registerClass("Sys.Extended.UI.Animation.HideAction", $AA.Action); $AA.registerAnimation("hideAction", $AA.HideAction); $AA.StyleAction = function (c, b, e, a, d) { $AA.StyleAction.initializeBase(this, [c, b, e]); this._attribute = a; this._value = d }; $AA.StyleAction.prototype = { doAction: function () { var a = this.get_target(); if (a) a.style[this._attribute] = this._value }, get_attribute: function () { return this._attribute }, set_attribute: function (a) { if (this._attribute != a) { this._attribute = a; this.raisePropertyChanged("attribute") } }, get_value: function () { return this._value }, set_value: function (a) { if (this._value != a) { this._value = a; this.raisePropertyChanged("value") } } }; $AA.StyleAction.registerClass("Sys.Extended.UI.Animation.StyleAction", $AA.Action); $AA.registerAnimation("styleAction", $AA.StyleAction); $AA.OpacityAction = function (c, a, d, b) { $AA.OpacityAction.initializeBase(this, [c, a, d]); this._opacity = b }; $AA.OpacityAction.prototype = { doAction: function () { var a = this.get_target(); a && $common.setElementOpacity(a, this._opacity) }, get_opacity: function () { return this._opacity }, set_opacity: function (b) { var a = this; b = a._getFloat(b); if (a._opacity != b) { a._opacity = b; a.raisePropertyChanged("opacity") } } }; $AA.OpacityAction.registerClass("Sys.Extended.UI.Animation.OpacityAction", $AA.Action); $AA.registerAnimation("opacityAction", $AA.OpacityAction); $AA.ScriptAction = function (c, a, d, b) { $AA.ScriptAction.initializeBase(this, [c, a, d]); this._script = b }; $AA.ScriptAction.prototype = { doAction: function () { try { eval(this._script) } catch (a) { } }, get_script: function () { return this._script }, set_script: function (a) { if (this._script != a) { this._script = a; this.raisePropertyChanged("script") } } }; $AA.ScriptAction.registerClass("Sys.Extended.UI.Animation.ScriptAction", $AA.Action); $AA.registerAnimation("scriptAction", $AA.ScriptAction) } if (window.Sys && Sys.loader) Sys.loader.registerScript(b, ["ExtendedCommon", "ExtendedTimer"], a); else a() })(); var $AA;
//END Animation.Animations.js
//START Animation.AnimationBehavior.js
// (c) 2010 CodePlex Foundation
(function () { var b = "ExtendedAnimationBehavior"; function a() { var c = "mouseout", b = "mouseover", a = null; Type.registerNamespace("Sys.Extended.UI.Animation"); Sys.Extended.UI.Animation.AnimationBehavior = function (c) { var b = this; Sys.Extended.UI.Animation.AnimationBehavior.initializeBase(b, [c]); b._onLoad = a; b._onClick = a; b._onMouseOver = a; b._onMouseOut = a; b._onHoverOver = a; b._onHoverOut = a; b._onClickHandler = a; b._onMouseOverHandler = a; b._onMouseOutHandler = a }; Sys.Extended.UI.Animation.AnimationBehavior.prototype = { initialize: function () { var a = this; Sys.Extended.UI.Animation.AnimationBehavior.callBaseMethod(a, "initialize"); var d = a.get_element(); if (d) { a._onClickHandler = Function.createDelegate(a, a.OnClick); $addHandler(d, "click", a._onClickHandler); a._onMouseOverHandler = Function.createDelegate(a, a.OnMouseOver); $addHandler(d, b, a._onMouseOverHandler); a._onMouseOutHandler = Function.createDelegate(a, a.OnMouseOut); $addHandler(d, c, a._onMouseOutHandler) } }, dispose: function () { var d = this, e = d.get_element(); if (e) { if (d._onClickHandler) { $removeHandler(e, "click", d._onClickHandler); d._onClickHandler = a } if (d._onMouseOverHandler) { $removeHandler(e, b, d._onMouseOverHandler); d._onMouseOverHandler = a } if (d._onMouseOutHandler) { $removeHandler(e, c, d._onMouseOutHandler); d._onMouseOutHandler = a } } d._onLoad = a; d._onClick = a; d._onMouseOver = a; d._onMouseOut = a; d._onHoverOver = a; d._onHoverOut = a; Sys.Extended.UI.Animation.AnimationBehavior.callBaseMethod(d, "dispose") }, get_OnLoad: function () { return this._onLoad ? this._onLoad.get_json() : a }, set_OnLoad: function (b) { var a = this; if (!a._onLoad) { a._onLoad = new Sys.Extended.UI.Animation.GenericAnimationBehavior(a.get_element()); a._onLoad.initialize() } a._onLoad.set_json(b); a.raisePropertyChanged("OnLoad"); a._onLoad.play() }, get_OnLoadBehavior: function () { return this._onLoad }, get_OnClick: function () { return this._onClick ? this._onClick.get_json() : a }, set_OnClick: function (b) { var a = this; if (!a._onClick) { a._onClick = new Sys.Extended.UI.Animation.GenericAnimationBehavior(a.get_element()); a._onClick.initialize() } a._onClick.set_json(b); a.raisePropertyChanged("OnClick") }, get_OnClickBehavior: function () { return this._onClick }, OnClick: function () { this._onClick && this._onClick.play() }, get_OnMouseOver: function () { return this._onMouseOver ? this._onMouseOver.get_json() : a }, set_OnMouseOver: function (b) { var a = this; if (!a._onMouseOver) { a._onMouseOver = new Sys.Extended.UI.Animation.GenericAnimationBehavior(a.get_element()); a._onMouseOver.initialize() } a._onMouseOver.set_json(b); a.raisePropertyChanged("OnMouseOver") }, get_OnMouseOverBehavior: function () { return this._onMouseOver }, OnMouseOver: function () { var a = this; if (a._mouseHasEntered) return; a._onMouseOver && a._onMouseOver.play(); if (a._onHoverOver) { a._onHoverOut && a._onHoverOut.quit(); a._onHoverOver.play() } a._mouseHasEntered = true }, get_OnMouseOut: function () { return this._onMouseOut ? this._onMouseOut.get_json() : a }, set_OnMouseOut: function (b) { var a = this; if (!a._onMouseOut) { a._onMouseOut = new Sys.Extended.UI.Animation.GenericAnimationBehavior(a.get_element()); a._onMouseOut.initialize() } a._onMouseOut.set_json(b); a.raisePropertyChanged("OnMouseOut") }, get_OnMouseOutBehavior: function () { return this._onMouseOut }, OnMouseOut: function (e) { var a = this, d = e.rawEvent, b = a.get_element(), f = e.target; if (f.nodeName !== b.nodeName) return; var c = d.relatedTarget || d.toElement; if (b != c && !a._isChild(b, c)) { a._mouseHasEntered = false; a._onMouseOut && a._onMouseOut.play(); if (a._onHoverOut) { a._onHoverOver && a._onHoverOver.quit(); a._onHoverOut.play() } } }, _isChild: function (b, a) { var c = document.body; while (a && b != a && c != a) try { a = a.parentNode } catch (d) { return false } return b == a }, get_OnHoverOver: function () { return this._onHoverOver ? this._onHoverOver.get_json() : a }, set_OnHoverOver: function (b) { var a = this; if (!a._onHoverOver) { a._onHoverOver = new Sys.Extended.UI.Animation.GenericAnimationBehavior(a.get_element()); a._onHoverOver.initialize() } a._onHoverOver.set_json(b); a.raisePropertyChanged("OnHoverOver") }, get_OnHoverOverBehavior: function () { return this._onHoverOver }, get_OnHoverOut: function () { return this._onHoverOut ? this._onHoverOut.get_json() : a }, set_OnHoverOut: function (b) { var a = this; if (!a._onHoverOut) { a._onHoverOut = new Sys.Extended.UI.Animation.GenericAnimationBehavior(a.get_element()); a._onHoverOut.initialize() } a._onHoverOut.set_json(b); a.raisePropertyChanged("OnHoverOut") }, get_OnHoverOutBehavior: function () { return this._onHoverOut } }; Sys.Extended.UI.Animation.AnimationBehavior.registerClass("Sys.Extended.UI.Animation.AnimationBehavior", Sys.Extended.UI.BehaviorBase); Sys.Extended.UI.Animation.GenericAnimationBehavior = function (b) { Sys.Extended.UI.Animation.GenericAnimationBehavior.initializeBase(this, [b]); this._json = a; this._animation = a }; Sys.Extended.UI.Animation.GenericAnimationBehavior.prototype = { dispose: function () { this.disposeAnimation(); Sys.Extended.UI.Animation.GenericAnimationBehavior.callBaseMethod(this, "dispose") }, disposeAnimation: function () { this._animation && this._animation.dispose(); this._animation = a }, play: function () { var a = this; if (a._animation && !a._animation.get_isPlaying()) { a.stop(); a._animation.play() } }, stop: function () { if (this._animation) this._animation.get_isPlaying() && this._animation.stop(true) }, quit: function () { if (this._animation) this._animation.get_isPlaying() && this._animation.stop(false) }, get_json: function () { return this._json }, set_json: function (c) { var a = this; if (a._json != c) { a._json = c; a.raisePropertyChanged("json"); a.disposeAnimation(); var b = a.get_element(); if (b) { a._animation = Sys.Extended.UI.Animation.buildAnimation(a._json, b); a._animation && a._animation.initialize(); a.raisePropertyChanged("animation") } } }, get_animation: function () { return this._animation } }; Sys.Extended.UI.Animation.GenericAnimationBehavior.registerClass("Sys.Extended.UI.Animation.GenericAnimationBehavior", Sys.Extended.UI.BehaviorBase) } if (window.Sys && Sys.loader) Sys.loader.registerScript(b, ["ExtendedAnimations", "ExtendedBase"], a); else a() })();
//END Animation.AnimationBehavior.js
//START ModalPopup.ModalPopupBehavior.js
// (c) 2010 CodePlex Foundation
Type.registerNamespace("Sys.Extended.UI"); Sys.Extended.UI.ModalPopupRepositionMode = function () { throw Error.invalidOperation(); }; Sys.Extended.UI.ModalPopupRepositionMode.prototype = { None: 0, RepositionOnWindowResize: 1, RepositionOnWindowScroll: 2, RepositionOnWindowResizeAndScroll: 3 }; Sys.Extended.UI.ModalPopupRepositionMode.registerEnum("Sys.Extended.UI.ModalPopupRepositionMode"); Sys.Extended.UI.ModalPopupBehavior = function (d) { var c = false, b = null, a = this; Sys.Extended.UI.ModalPopupBehavior.initializeBase(a, [d]); a._PopupControlID = b; a._PopupDragHandleControlID = b; a._BackgroundCssClass = b; a._DropShadow = c; a._Drag = c; a._OkControlID = b; a._CancelControlID = b; a._OnOkScript = b; a._OnCancelScript = b; a._xCoordinate = -1; a._yCoordinate = -1; a._repositionMode = Sys.Extended.UI.ModalPopupRepositionMode.RepositionOnWindowResizeAndScroll; a._onShown = new Sys.Extended.UI.Animation.GenericAnimationBehavior(d); a._onHidden = new Sys.Extended.UI.Animation.GenericAnimationBehavior(d); a._onShowing = new Sys.Extended.UI.Animation.GenericAnimationBehavior(d); a._onHiding = new Sys.Extended.UI.Animation.GenericAnimationBehavior(d); a._backgroundElement = b; a._foregroundElement = b; a._relativeOrAbsoluteParentElement = b; a._popupElement = b; a._dragHandleElement = b; a._showHandler = b; a._okHandler = b; a._cancelHandler = b; a._scrollHandler = b; a._resizeHandler = b; a._windowHandlersAttached = c; a._dropShadowBehavior = b; a._dragBehavior = b; a._isIE6 = c; a._saveTabIndexes = []; a._saveDesableSelect = []; a._tagWithTabIndex = ["A", "AREA", "BUTTON", "INPUT", "OBJECT", "SELECT", "TEXTAREA", "IFRAME"]; a._isAnimationJustEnded = c; a._hidingAnimationEndedHandler = b; a._showingAnimationEndedHandler = b }; Sys.Extended.UI.ModalPopupBehavior.prototype = { initialize: function () { var b = "click", a = this; Sys.Extended.UI.ModalPopupBehavior.callBaseMethod(a, "initialize"); a._isIE6 = Sys.Browser.agent == Sys.Browser.InternetExplorer && Sys.Browser.version < 7; if (a._PopupDragHandleControlID) a._dragHandleElement = $get(a._PopupDragHandleControlID); a._popupElement = $get(a._PopupControlID); if (a._DropShadow) { a._foregroundElement = document.createElement("div"); a._foregroundElement.id = a.get_id() + "_foregroundElement"; a._popupElement.parentNode.appendChild(a._foregroundElement); a._foregroundElement.appendChild(a._popupElement) } else a._foregroundElement = a._popupElement; a._backgroundElement = document.createElement("div"); a._backgroundElement.id = a.get_id() + "_backgroundElement"; a._backgroundElement.style.display = "none"; a._backgroundElement.style.position = "fixed"; a._backgroundElement.style.left = "0px"; a._backgroundElement.style.top = "0px"; a._backgroundElement.style.zIndex = 1e4; if (a._BackgroundCssClass) a._backgroundElement.className = a._BackgroundCssClass; a._foregroundElement.parentNode.appendChild(a._backgroundElement); a._foregroundElement.style.display = "none"; a._foregroundElement.style.position = "fixed"; a._foregroundElement.style.zIndex = $common.getCurrentStyle(a._backgroundElement, "zIndex", a._backgroundElement.style.zIndex) + 1; a._showHandler = Function.createDelegate(a, a._onShow); $addHandler(a.get_element(), b, a._showHandler); if (a._OkControlID) { a._okHandler = Function.createDelegate(a, a._onOk); $addHandler($get(a._OkControlID), b, a._okHandler) } if (a._CancelControlID) { a._cancelHandler = Function.createDelegate(a, a._onCancel); $addHandler($get(a._CancelControlID), b, a._cancelHandler) } a._scrollHandler = Function.createDelegate(a, a._onLayout); a._resizeHandler = Function.createDelegate(a, a._onLayout); a.registerPartialUpdateEvents(); a._resetAnimationsTarget(); if (a._onHiding.get_animation()) { a._hidingAnimationEndedHandler = Function.createDelegate(a, function () { this._isAnimationJustEnded = true; this.hide() }); a._onHiding.get_animation().add_ended(a._hidingAnimationEndedHandler) } if (a._onShowing.get_animation()) { a._showingAnimationEndedHandler = Function.createDelegate(a, function () { this._isAnimationJustEnded = true; this.show() }); a._onShowing.get_animation().add_ended(a._showingAnimationEndedHandler) } }, dispose: function () { var c = "click", b = null, a = this; a._hideImplementation(); if (a._foregroundElement && a._foregroundElement.parentNode) { a._foregroundElement.parentNode.removeChild(a._backgroundElement); if (a._DropShadow) { a._foregroundElement.parentNode.appendChild(a._popupElement); a._foregroundElement.parentNode.removeChild(a._foregroundElement) } } a._scrollHandler = b; a._resizeHandler = b; if (a._cancelHandler && $get(a._CancelControlID)) { $removeHandler($get(a._CancelControlID), c, a._cancelHandler); a._cancelHandler = b } if (a._okHandler && $get(a._OkControlID)) { $removeHandler($get(a._OkControlID), c, a._okHandler); a._okHandler = b } if (a._showHandler) { $removeHandler(a.get_element(), c, a._showHandler); a._showHandler = b } a._hidingAnimationEndedHandler && a._onHiding.get_animation().remove_ended(a._hidingAnimationEndedHandler); a._showingAnimationEndedHandler && a._onShowing.get_animation().remove_ended(a._showingAnimationEndedHandler); Sys.Extended.UI.ModalPopupBehavior.callBaseMethod(a, "dispose") }, _attachPopup: function () { var b = null, a = this; if (a._DropShadow && !a._dropShadowBehavior) a._dropShadowBehavior = $create(Sys.Extended.UI.DropShadowBehavior, {}, b, b, a._popupElement); if (a._dragHandleElement && !a._dragBehavior) a._dragBehavior = $create(Sys.Extended.UI.FloatingBehavior, { handle: a._dragHandleElement }, b, b, a._foregroundElement); $addHandler(window, "resize", a._resizeHandler); $addHandler(window, "scroll", a._scrollHandler); a._windowHandlersAttached = true }, _detachPopup: function () { var a = this; if (a._windowHandlersAttached) { a._scrollHandler && $removeHandler(window, "scroll", a._scrollHandler); a._resizeHandler && $removeHandler(window, "resize", a._resizeHandler); a._windowHandlersAttached = false } if (a._dragBehavior) { a._dragBehavior.dispose(); a._dragBehavior = null } if (a._dropShadowBehavior) { a._dropShadowBehavior.dispose(); a._dropShadowBehavior = null } }, _onShow: function (a) { if (!this.get_element().disabled) { this.show(); a.preventDefault(); return false } }, _onOk: function (c) { var a = this, b = $get(a._OkControlID); if (b && !b.disabled) { a.hide() && a._OnOkScript && window.setTimeout(a._OnOkScript, 0); c.preventDefault(); return false } }, _onCancel: function (c) { var a = this, b = $get(a._CancelControlID); if (b && !b.disabled) { a.hide() && a._OnCancelScript && window.setTimeout(a._OnCancelScript, 0); c.preventDefault(); return false } }, _onLayout: function (c) { var b = this, a = b.get_repositionMode(); if ((a === Sys.Extended.UI.ModalPopupRepositionMode.RepositionOnWindowScroll || a === Sys.Extended.UI.ModalPopupRepositionMode.RepositionOnWindowResizeAndScroll) && c.type === "scroll") b._layout(); else if ((a === Sys.Extended.UI.ModalPopupRepositionMode.RepositionOnWindowResize || a === Sys.Extended.UI.ModalPopupRepositionMode.RepositionOnWindowResizeAndScroll) && c.type === "resize") b._layout(); else b._layoutBackgroundElement() }, show: function () { var c = "absolute", a = this; if (!a._isAnimationJustEnded) { var d = new Sys.CancelEventArgs; a.raiseShowing(d); if (d.get_cancel()) return; else if (a._onShowing.get_animation()) { a._onShowing.play(); return } } else a._isAnimationJustEnded = false; a.populate(); a._attachPopup(); a._backgroundElement.style.display = ""; a._foregroundElement.style.display = ""; a._popupElement.style.display = ""; if (a._isIE6) { a._foregroundElement.style.position = c; a._backgroundElement.style.position = c; var b = a._foregroundElement.parentNode; while (b && b != document.documentElement) if (b.style.position != "relative" && b.style.position != c) b = b.parentNode; else { a._relativeOrAbsoluteParentElement = b; break } } a.disableTab(); a._layout(); a._layout(); a.raiseShown(Sys.EventArgs.Empty); a._onShown.play() }, disableTab: function () { var c = this, d = 0, a, f = []; Array.clear(c._saveTabIndexes); for (var e = 0; e < c._tagWithTabIndex.length; e++) { a = c._foregroundElement.getElementsByTagName(c._tagWithTabIndex[e]); for (var b = 0; b < a.length; b++) { f[d] = a[b]; d++ } } d = 0; for (var e = 0; e < c._tagWithTabIndex.length; e++) { a = document.getElementsByTagName(c._tagWithTabIndex[e]); for (var b = 0; b < a.length; b++) if (Array.indexOf(f, a[b]) == -1) { c._saveTabIndexes[d] = { tag: a[b], index: a[b].tabIndex }; a[b].tabIndex = "-1"; d++ } } d = 0; if (Sys.Browser.agent === Sys.Browser.InternetExplorer && Sys.Browser.version < 7) { for (var g = [], e = 0; e < c._tagWithTabIndex.length; e++) { a = c._foregroundElement.getElementsByTagName("SELECT"); for (var b = 0; b < a.length; b++) { g[d] = a[b]; d++ } } d = 0; Array.clear(c._saveDesableSelect); a = document.getElementsByTagName("SELECT"); for (var b = 0; b < a.length; b++) if (Array.indexOf(g, a[b]) == -1) { c._saveDesableSelect[d] = { tag: a[b], visib: $common.getCurrentStyle(a[b], "visibility") }; a[b].style.visibility = "hidden"; d++ } } }, restoreTab: function () { var a = this; for (var b = 0; b < a._saveTabIndexes.length; b++) a._saveTabIndexes[b].tag.tabIndex = a._saveTabIndexes[b].index; Array.clear(a._saveTabIndexes); if (Sys.Browser.agent === Sys.Browser.InternetExplorer && Sys.Browser.version < 7) { for (var c = 0; c < a._saveDesableSelect.length; c++) a._saveDesableSelect[c].tag.style.visibility = a._saveDesableSelect[c].visib; Array.clear(a._saveDesableSelect) } }, hide: function () { var a = this; if (!a._isAnimationJustEnded) { var b = new Sys.CancelEventArgs; a.raiseHiding(b); if (b.get_cancel()) return false; else if (a._onHiding.get_animation()) { a._onHiding.play(); return true } } else a._isAnimationJustEnded = false; a._hideImplementation(); a.raiseHidden(Sys.EventArgs.Empty); a._onHidden.play(); return true }, _hideImplementation: function () { var a = this; a._backgroundElement.style.display = "none"; a._foregroundElement.style.display = "none"; a.restoreTab(); a._detachPopup() }, _layout: function () { var b = "px", g = "absolute", a = this, e = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft, f = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop, h = $common.getClientBounds(), l = h.width, k = h.height; a._layoutBackgroundElement(); var c = 0, d = 0; if (a._xCoordinate < 0) { var j = a._foregroundElement.offsetWidth ? a._foregroundElement.offsetWidth : a._foregroundElement.scrollWidth; c = (l - j) / 2; if (a._foregroundElement.style.position == g) c += e; a._foregroundElement.style.left = c + b } else if (a._isIE6) { a._foregroundElement.style.left = a._xCoordinate + e + b; c = a._xCoordinate + e } else { a._foregroundElement.style.left = a._xCoordinate + b; c = a._xCoordinate } if (a._yCoordinate < 0) { var i = a._foregroundElement.offsetHeight ? a._foregroundElement.offsetHeight : a._foregroundElement.scrollHeight; d = (k - i) / 2; if (a._foregroundElement.style.position == g) d += f; a._foregroundElement.style.top = d + b } else if (a._isIE6) { a._foregroundElement.style.top = a._yCoordinate + f + b; d = a._yCoordinate + f } else { a._foregroundElement.style.top = a._yCoordinate + b; d = a._yCoordinate } a._layoutForegroundElement(c, d); if (a._dropShadowBehavior) { a._dropShadowBehavior.setShadow(); window.setTimeout(Function.createDelegate(a, a._fixupDropShadowBehavior), 0) } a._layoutBackgroundElement() }, _layoutForegroundElement: function (d, e) { var a = this; if (a._isIE6 && a._relativeOrAbsoluteParentElement) { var c = $common.getLocation(a._foregroundElement), b = $common.getLocation(a._relativeOrAbsoluteParentElement), f = c.x; if (f != d) a._foregroundElement.style.left = d - b.x + "px"; var g = c.y; if (g != e) a._foregroundElement.style.top = e - b.y + "px" } }, _layoutBackgroundElement: function () { var b = "px", a = this; if (a._isIE6) { var c = $common.getLocation(a._backgroundElement), d = c.x; if (d != 0) a._backgroundElement.style.left = -d + b; var e = c.y; if (e != 0) a._backgroundElement.style.top = -e + b } var f = $common.getClientBounds(), h = f.width, g = f.height; a._backgroundElement.style.width = Math.max(Math.max(document.documentElement.scrollWidth, document.body.scrollWidth), h) + b; a._backgroundElement.style.height = Math.max(Math.max(document.documentElement.scrollHeight, document.body.scrollHeight), g) + b }, _fixupDropShadowBehavior: function () { this._dropShadowBehavior && this._dropShadowBehavior.setShadow() }, _partialUpdateEndRequest: function (d, b) { var a = this; Sys.Extended.UI.ModalPopupBehavior.callBaseMethod(a, "_partialUpdateEndRequest", [d, b]); if (a.get_element()) { var c = b.get_dataItems()[a.get_element().id]; if ("show" == c) a.show(); else "hide" == c && a.hide() } a._layout() }, _onPopulated: function (b, a) { Sys.Extended.UI.ModalPopupBehavior.callBaseMethod(this, "_onPopulated", [b, a]); this._layout() }, _replaceAnimationTarget: function (a, c) { var b = this, d = b[a].get_json(); b[a] = new Sys.Extended.UI.Animation.GenericAnimationBehavior(c); b[a].set_json(d); b[a].initialize() }, _resetAnimationsTarget: function () { var a = this, b = $get(a.get_PopupControlID()); a._replaceAnimationTarget("_onShowing", b); a._replaceAnimationTarget("_onShown", b); a._replaceAnimationTarget("_onHiding", b); a._replaceAnimationTarget("_onHidden", b) }, get_PopupControlID: function () { return this._PopupControlID }, set_PopupControlID: function (a) { if (this._PopupControlID != a) { this._PopupControlID = a; this.raisePropertyChanged("PopupControlID") } }, get_X: function () { return this._xCoordinate }, set_X: function (a) { if (this._xCoordinate != a) { this._xCoordinate = a; this.raisePropertyChanged("X") } }, get_Y: function () { return this._yCoordinate }, set_Y: function (a) { if (this._yCoordinate != a) { this._yCoordinate = a; this.raisePropertyChanged("Y") } }, get_PopupDragHandleControlID: function () { return this._PopupDragHandleControlID }, set_PopupDragHandleControlID: function (a) { if (this._PopupDragHandleControlID != a) { this._PopupDragHandleControlID = a; this.raisePropertyChanged("PopupDragHandleControlID") } }, get_BackgroundCssClass: function () { return this._BackgroundCssClass }, set_BackgroundCssClass: function (a) { if (this._BackgroundCssClass != a) { this._BackgroundCssClass = a; this.raisePropertyChanged("BackgroundCssClass") } }, get_DropShadow: function () { return this._DropShadow }, set_DropShadow: function (a) { if (this._DropShadow != a) { this._DropShadow = a; this.raisePropertyChanged("DropShadow") } }, get_Drag: function () { return this._Drag }, set_Drag: function (a) { if (this._Drag != a) { this._Drag = a; this.raisePropertyChanged("Drag") } }, get_OkControlID: function () { return this._OkControlID }, set_OkControlID: function (a) { if (this._OkControlID != a) { this._OkControlID = a; this.raisePropertyChanged("OkControlID") } }, get_CancelControlID: function () { return this._CancelControlID }, set_CancelControlID: function (a) { if (this._CancelControlID != a) { this._CancelControlID = a; this.raisePropertyChanged("CancelControlID") } }, get_OnOkScript: function () { return this._OnOkScript }, set_OnOkScript: function (a) { if (this._OnOkScript != a) { this._OnOkScript = a; this.raisePropertyChanged("OnOkScript") } }, get_OnCancelScript: function () { return this._OnCancelScript }, set_OnCancelScript: function (a) { if (this._OnCancelScript != a) { this._OnCancelScript = a; this.raisePropertyChanged("OnCancelScript") } }, get_repositionMode: function () { return this._repositionMode }, set_repositionMode: function (a) { if (this._repositionMode !== a) { this._repositionMode = a; this.raisePropertyChanged("RepositionMode") } }, get_OnShowing: function () { return this._onShowing.get_json() }, set_OnShowing: function (a) { this._onShowing.set_json(a); this.raisePropertyChanged("OnShowing") }, get_OnShown: function () { return this._onShown.get_json() }, set_OnShown: function (a) { this._onShown.set_json(a); this.raisePropertyChanged("OnShown") }, get_OnHiding: function () { return this._onHiding.get_json() }, set_OnHiding: function (a) { this._onHiding.set_json(a); this.raisePropertyChanged("OnHiding") }, get_OnHidden: function () { return this._onHidden.get_json() }, set_OnHidden: function (a) { this._onHidden.set_json(a); this.raisePropertyChanged("OnHidden") }, add_showing: function (a) { this.get_events().addHandler("showing", a) }, remove_showing: function (a) { this.get_events().removeHandler("showing", a) }, raiseShowing: function (b) { var a = this.get_events().getHandler("showing"); a && a(this, b) }, add_shown: function (a) { this.get_events().addHandler("shown", a) }, remove_shown: function (a) { this.get_events().removeHandler("shown", a) }, raiseShown: function (b) { var a = this.get_events().getHandler("shown"); a && a(this, b) }, add_hiding: function (a) { this.get_events().addHandler("hiding", a) }, remove_hiding: function (a) { this.get_events().removeHandler("hiding", a) }, raiseHiding: function (b) { var a = this.get_events().getHandler("hiding"); a && a(this, b) }, add_hidden: function (a) { this.get_events().addHandler("hidden", a) }, remove_hidden: function (a) { this.get_events().removeHandler("hidden", a) }, raiseHidden: function (b) { var a = this.get_events().getHandler("hidden"); a && a(this, b) } }; Sys.Extended.UI.ModalPopupBehavior.registerClass("Sys.Extended.UI.ModalPopupBehavior", Sys.Extended.UI.DynamicPopulateBehaviorBase); Sys.Extended.UI.ModalPopupBehavior.invokeViaServer = function (b, c) { var a = $find(b); if (a) if (c) a.show(); else a.hide() };
//END ModalPopup.ModalPopupBehavior.js
//START AlwaysVisibleControl.AlwaysVisibleControlBehavior.js
// (c) 2010 CodePlex Foundation
(function () { var b = "ExtendedAlwaysVisible"; function a() { var d = "repositioned", c = "repositioning", a = null, b = false; Type.registerNamespace("Sys.Extended.UI"); Sys.Extended.UI.HorizontalSide = function () { throw Error.invalidOperation(); }; Sys.Extended.UI.HorizontalSide.prototype = { Left: 0, Center: 1, Right: 2 }; Sys.Extended.UI.HorizontalSide.registerEnum("Sys.Extended.UI.HorizontalSide", b); Sys.Extended.UI.VerticalSide = function () { throw Error.invalidOperation(); }; Sys.Extended.UI.VerticalSide.prototype = { Top: 0, Middle: 1, Bottom: 2 }; Sys.Extended.UI.VerticalSide.registerEnum("Sys.Extended.UI.VerticalSide", b); Sys.Extended.UI.AlwaysVisibleControlBehavior = function (d) { var c = this; Sys.Extended.UI.AlwaysVisibleControlBehavior.initializeBase(c, [d]); c._horizontalOffset = 0; c._horizontalSide = Sys.Extended.UI.HorizontalSide.Left; c._verticalOffset = 0; c._verticalSide = Sys.Extended.UI.VerticalSide.Top; c._scrollEffectDuration = .1; c._repositionHandler = a; c._animate = b; c._animation = a }; Sys.Extended.UI.AlwaysVisibleControlBehavior.prototype = { initialize: function () { var a = this; Sys.Extended.UI.AlwaysVisibleControlBehavior.callBaseMethod(a, "initialize"); var c = a.get_element(); if (!c) throw Error.invalidOperation(Sys.Extended.UI.Resources.AlwaysVisible_ElementRequired); a._repositionHandler = Function.createDelegate(a, a._reposition); if (Sys.Browser.agent == Sys.Browser.InternetExplorer && Sys.Browser.version < 7) a._animate = true; if (a._animate) { a._animation = new Sys.Extended.UI.Animation.MoveAnimation(c, a._scrollEffectDuration, 25, 0, 0, b, "px"); c.style.position = "absolute" } else c.style.position = "fixed"; $addHandler(window, "resize", a._repositionHandler); a._animate && $addHandler(window, "scroll", a._repositionHandler); a._reposition() }, dispose: function () { var b = this; if (b._repositionHandler) { b._animate && $removeHandler(window, "scroll", b._repositionHandler); $removeHandler(window, "resize", b._repositionHandler); b._repositionHandler = a } if (b._animation) { b._animation.dispose(); b._animation = a } Sys.Extended.UI.AlwaysVisibleControlBehavior.callBaseMethod(b, "dispose") }, _reposition: function () { var a = this, d = a.get_element(); if (!d) return; a.raiseRepositioning(Sys.EventArgs.Empty); var b = 0, c = 0; if (a._animate) if (document.documentElement && document.documentElement.scrollTop) { b = document.documentElement.scrollLeft; c = document.documentElement.scrollTop } else { b = document.body.scrollLeft; c = document.body.scrollTop } var e = $common.getClientBounds(), g = e.width, f = e.height; switch (a._horizontalSide) { case Sys.Extended.UI.HorizontalSide.Center: b = Math.max(0, Math.floor(b + g / 2 - d.offsetWidth / 2 - a._horizontalOffset)); break; case Sys.Extended.UI.HorizontalSide.Right: b = Math.max(0, b + g - d.offsetWidth - a._horizontalOffset); break; case Sys.Extended.UI.HorizontalSide.Left: default: b += a._horizontalOffset } switch (a._verticalSide) { case Sys.Extended.UI.VerticalSide.Middle: c = Math.max(0, Math.floor(c + f / 2 - d.offsetHeight / 2 - a._verticalOffset)); break; case Sys.Extended.UI.VerticalSide.Bottom: c = Math.max(0, c + f - d.offsetHeight - a._verticalOffset); break; case Sys.Extended.UI.VerticalSide.Top: default: c += a._verticalOffset } if (a._animate && a._animation) { a._animation.stop(); a._animation.set_horizontal(b); a._animation.set_vertical(c); a._animation.play() } else { d.style.left = b + "px"; d.style.top = c + "px" } a.raiseRepositioned(Sys.EventArgs.Empty) }, get_HorizontalOffset: function () { return this._horizontalOffset }, set_HorizontalOffset: function (b) { var a = this; if (a._horizontalOffset != b) { a._horizontalOffset = b; a._reposition(); a.raisePropertyChanged("HorizontalOffset") } }, get_HorizontalSide: function () { return this._horizontalSide }, set_HorizontalSide: function (b) { var a = this; if (a._horizontalSide != b) { a._horizontalSide = b; a._reposition(); a.raisePropertyChanged("HorizontalSide") } }, get_VerticalOffset: function () { return this._verticalOffset }, set_VerticalOffset: function (b) { var a = this; if (a._verticalOffset != b) { a._verticalOffset = b; a._reposition(); a.raisePropertyChanged("VerticalOffset") } }, get_VerticalSide: function () { return this._verticalSide }, set_VerticalSide: function (b) { var a = this; if (a._verticalSide != b) { a._verticalSide = b; a._reposition(); a.raisePropertyChanged("VerticalSide") } }, get_ScrollEffectDuration: function () { return this._scrollEffectDuration }, set_ScrollEffectDuration: function (b) { var a = this; if (a._scrollEffectDuration != b) { a._scrollEffectDuration = b; a._animation && a._animation.set_duration(b); a.raisePropertyChanged("ScrollEffectDuration") } }, get_useAnimation: function () { return this._animate }, set_useAnimation: function (a) { a |= Sys.Browser.agent == Sys.Browser.InternetExplorer && Sys.Browser.version < 7; if (this._animate != a) { this._animate = a; this.raisePropertyChanged("useAnimation") } }, add_repositioning: function (a) { this.get_events().addHandler(c, a) }, remove_repositioning: function (a) { this.get_events().removeHandler(c, a) }, raiseRepositioning: function (b) { var a = this.get_events().getHandler(c); a && a(this, b) }, add_repositioned: function (a) { this.get_events().addHandler(d, a) }, remove_repositioned: function (a) { this.get_events().removeHandler(d, a) }, raiseRepositioned: function (b) { var a = this.get_events().getHandler(d); a && a(this, b) } }; Sys.Extended.UI.AlwaysVisibleControlBehavior.registerClass("Sys.Extended.UI.AlwaysVisibleControlBehavior", Sys.Extended.UI.BehaviorBase); Sys.registerComponent(Sys.Extended.UI.AlwaysVisibleControlBehavior, { name: "alwaysVisible" }) } if (window.Sys && Sys.loader) Sys.loader.registerScript(b, ["ExtendedAnimations", "ExtendedBase"], a); else a() })();
//END AlwaysVisibleControl.AlwaysVisibleControlBehavior.js
//START PopupExtender.PopupBehavior.js
// (c) 2010 CodePlex Foundation
(function () { var b = "ExtendedPopup"; function a() { var g = "hidden", f = "hiding", e = "shown", d = "showing", h = "absolute", b = false, c = true, a = null; Type.registerNamespace("Sys.Extended.UI"); Sys.Extended.UI.PopupBehavior = function (e) { var d = this; Sys.Extended.UI.PopupBehavior.initializeBase(d, [e]); d._x = 0; d._y = 0; d._positioningMode = Sys.Extended.UI.PositioningMode.Absolute; d._parentElement = a; d._parentElementID = a; d._moveHandler = a; d._firstPopup = c; d._originalParent = a; d._visible = b; d._onShow = a; d._onHide = a; d._onShowEndedHandler = Function.createDelegate(d, d._onShowEnded); d._onHideEndedHandler = Function.createDelegate(d, d._onHideEnded) }; Sys.Extended.UI.PopupBehavior.prototype = { initialize: function () { Sys.Extended.UI.PopupBehavior.callBaseMethod(this, "initialize"); this._hidePopup(); this.get_element().style.position = h }, dispose: function () { var b = this, c = b.get_element(); if (c) { b._visible && b.hide(); if (b._originalParent) { c.parentNode.removeChild(c); b._originalParent.appendChild(c); b._originalParent = a } c._hideWindowedElementsIFrame = a } b._parentElement = a; b._onShow && b._onShow.get_animation() && b._onShow.get_animation().remove_ended(b._onShowEndedHandler); b._onShow = a; b._onHide && b._onHide.get_animation() && b._onHide.get_animation().remove_ended(b._onHideEndedHandler); b._onHide = a; Sys.Extended.UI.PopupBehavior.callBaseMethod(b, "dispose") }, show: function () { var a = this; if (a._visible) return; var d = new Sys.CancelEventArgs; a.raiseShowing(d); if (d.get_cancel()) return; a._visible = c; var e = a.get_element(); $common.setVisible(e, c); a.setupPopup(); if (a._onShow) { $common.setVisible(e, b); a.onShow() } else a.raiseShown(Sys.EventArgs.Empty) }, hide: function () { var a = this; if (!a._visible) return; var c = new Sys.CancelEventArgs; a.raiseHiding(c); if (c.get_cancel()) return; a._visible = b; if (a._onHide) a.onHide(); else { a._hidePopup(); a._hideCleanup() } }, getBounds: function () { var e = this, d = e.get_element(), k = d.offsetParent || document.documentElement, h, a; if (e.get_parentElement()) { a = $common.getBounds(e.get_parentElement()); var j = $common.getLocation(k); h = { x: a.x - j.x, y: a.y - j.y } } else { a = $common.getBounds(k); h = { x: 0, y: 0 } } var f = d.offsetWidth - (d.clientLeft ? d.clientLeft * 2 : 0), g = d.offsetHeight - (d.clientTop ? d.clientTop * 2 : 0); if (e._firstpopup) { d.style.width = f + "px"; e._firstpopup = b } var i, c; switch (e._positioningMode) { case Sys.Extended.UI.PositioningMode.Center: c = { x: Math.round(a.width / 2 - f / 2), y: Math.round(a.height / 2 - g / 2), altX: Math.round(a.width / 2 - f / 2), altY: Math.round(a.height / 2 - g / 2) }; break; case Sys.Extended.UI.PositioningMode.BottomLeft: c = { x: 0, y: a.height, altX: a.width - f, altY: 0 - g }; break; case Sys.Extended.UI.PositioningMode.BottomRight: c = { x: a.width - f, y: a.height, altX: 0, altY: 0 - g }; break; case Sys.Extended.UI.PositioningMode.TopLeft: c = { x: 0, y: -d.offsetHeight, altX: a.width - f, altY: a.height }; break; case Sys.Extended.UI.PositioningMode.TopRight: c = { x: a.width - f, y: -d.offsetHeight, altX: 0, altY: a.height }; break; case Sys.Extended.UI.PositioningMode.Right: c = { x: a.width, y: 0, altX: -d.offsetWidth, altY: a.height - g }; break; case Sys.Extended.UI.PositioningMode.Left: c = { x: -d.offsetWidth, y: 0, altX: a.width, altY: a.height - g }; break; default: c = { x: 0, y: 0, altX: 0, altY: 0 } } c.x += e._x + h.x; c.altX += e._x + h.x; c.y += e._y + h.y; c.altY += e._y + h.y; i = e._verifyPosition(c, f, g, a); return new Sys.UI.Bounds(i.x, i.y, f, g) }, _verifyPosition: function (a, f, e) { var c = 0, d = 0, b = this._getWindowBounds(); if (!(a.x + f > b.x + b.width || a.x < b.x)) c = a.x; else { c = a.altX; if (a.altX < b.x) { if (a.x > a.altX) c = a.x } else if (b.width + b.x - a.altX < f) { var g = a.x > a.altX ? Math.abs(b.x - a.x) : b.x - a.x; if (g < f - b.width - b.x + a.altX) c = a.x } } if (!(a.y + e > b.y + b.height || a.y < b.y)) d = a.y; else { d = a.altY; if (a.altY < b.y) { if (b.y - a.altY > e - b.height - b.y + a.y) d = a.y } else if (b.height + b.y - a.altY < e) if (b.y - a.y < e - b.height - b.y + a.altY) d = a.y } return { x: c, y: d } }, _getWindowBounds: function () { var a = this; return { x: a._getWindowScrollLeft(), y: a._getWindowScrollTop(), width: a._getWindowWidth(), height: a._getWindowHeight() } }, _getWindowHeight: function () { var a = 0; if (document.documentElement && document.documentElement.clientHeight) a = document.documentElement.clientHeight; else if (document.body && document.body.clientHeight) a = document.body.clientHeight; return a }, _getWindowWidth: function () { var a = 0; if (document.documentElement && document.documentElement.clientWidth) a = document.documentElement.clientWidth; else if (document.body && document.body.clientWidth) a = document.body.clientWidth; return a }, _getWindowScrollTop: function () { var a = 0; if (typeof window.pageYOffset == "number") a = window.pageYOffset; if (document.body && document.body.scrollTop) a = document.body.scrollTop; else if (document.documentElement && document.documentElement.scrollTop) a = document.documentElement.scrollTop; return a }, _getWindowScrollLeft: function () { var a = 0; if (typeof window.pageXOffset == "number") a = window.pageXOffset; else if (document.body && document.body.scrollLeft) a = document.body.scrollLeft; else if (document.documentElement && document.documentElement.scrollLeft) a = document.documentElement.scrollLeft; return a }, adjustPopupPosition: function (a) { var f = this.get_element(); if (!a) a = this.getBounds(); var d = $common.getBounds(f), e = b; if (d.x < 0) { a.x -= d.x; e = c } if (d.y < 0) { a.y -= d.y; e = c } e && $common.setLocation(f, a) }, addBackgroundIFrame: function () { var c = this, b = c.get_element(); if (Sys.Browser.agent === Sys.Browser.InternetExplorer && Sys.Browser.version < 7) { var a = b._hideWindowedElementsIFrame; if (!a) { a = document.createElement("iframe"); a.src = "javascript:'<html></html>';"; a.style.position = h; a.style.display = "none"; a.scrolling = "no"; a.frameBorder = "0"; a.tabIndex = "-1"; a.style.filter = "progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)"; b.parentNode.insertBefore(a, b); b._hideWindowedElementsIFrame = a; c._moveHandler = Function.createDelegate(c, c._onMove); Sys.UI.DomEvent.addHandler(b, "move", c._moveHandler) } $common.setBounds(a, $common.getBounds(b)); a.style.left = b.style.left; a.style.top = b.style.top; a.style.display = b.style.display; if (b.currentStyle && b.currentStyle.zIndex) a.style.zIndex = b.currentStyle.zIndex; else if (b.style.zIndex) a.style.zIndex = b.style.zIndex } }, setupPopup: function () { var a = this, b = a.get_element(), c = a.getBounds(); $common.setLocation(b, c); a.adjustPopupPosition(c); b.style.zIndex = 1e3; a.addBackgroundIFrame() }, _hidePopup: function () { var c = this.get_element(); $common.setVisible(c, b); if (c.originalWidth) { c.style.width = c.originalWidth + "px"; c.originalWidth = a } }, _hideCleanup: function () { var b = this, d = b.get_element(); if (b._moveHandler) { Sys.UI.DomEvent.removeHandler(d, "move", b._moveHandler); b._moveHandler = a } if (Sys.Browser.agent === Sys.Browser.InternetExplorer) { var c = d._hideWindowedElementsIFrame; if (c) c.style.display = "none" } b.raiseHidden(Sys.EventArgs.Empty) }, _onMove: function () { var a = this.get_element(); if (a._hideWindowedElementsIFrame) { a.parentNode.insertBefore(a._hideWindowedElementsIFrame, a); a._hideWindowedElementsIFrame.style.top = a.style.top; a._hideWindowedElementsIFrame.style.left = a.style.left } }, get_onShow: function () { return this._onShow ? this._onShow.get_json() : a }, set_onShow: function (c) { var a = this; if (!a._onShow) { a._onShow = new Sys.Extended.UI.Animation.GenericAnimationBehavior(a.get_element()); a._onShow.initialize() } a._onShow.set_json(c); var b = a._onShow.get_animation(); b && b.add_ended(a._onShowEndedHandler); a.raisePropertyChanged("onShow") }, get_onShowBehavior: function () { return this._onShow }, onShow: function () { var a = this; if (a._onShow) { a._onHide && a._onHide.quit(); a._onShow.play() } }, _onShowEnded: function () { this.adjustPopupPosition(); this.addBackgroundIFrame(); this.raiseShown(Sys.EventArgs.Empty) }, get_onHide: function () { return this._onHide ? this._onHide.get_json() : a }, set_onHide: function (c) { var a = this; if (!a._onHide) { a._onHide = new Sys.Extended.UI.Animation.GenericAnimationBehavior(a.get_element()); a._onHide.initialize() } a._onHide.set_json(c); var b = a._onHide.get_animation(); b && b.add_ended(a._onHideEndedHandler); a.raisePropertyChanged("onHide") }, get_onHideBehavior: function () { return this._onHide }, onHide: function () { var a = this; if (a._onHide) { a._onShow && a._onShow.quit(); a._onHide.play() } }, _onHideEnded: function () { this._hideCleanup() }, get_parentElement: function () { var a = this; !a._parentElement && a._parentElementID && a.set_parentElement($get(a._parentElementID)); return a._parentElement }, set_parentElement: function (a) { this._parentElement = a; this.raisePropertyChanged("parentElement") }, get_parentElementID: function () { return this._parentElement ? this._parentElement.id : this._parentElementID }, set_parentElementID: function (a) { this._parentElementID = a; this.get_isInitialized() && this.set_parentElement($get(a)) }, get_positioningMode: function () { return this._positioningMode }, set_positioningMode: function (a) { this._positioningMode = a; this.raisePropertyChanged("positioningMode") }, get_x: function () { return this._x }, set_x: function (b) { var a = this; if (b != a._x) { a._x = b; a._visible && a.setupPopup(); a.raisePropertyChanged("x") } }, get_y: function () { return this._y }, set_y: function (b) { var a = this; if (b != a._y) { a._y = b; a._visible && a.setupPopup(); a.raisePropertyChanged("y") } }, get_visible: function () { return this._visible }, add_showing: function (a) { this.get_events().addHandler(d, a) }, remove_showing: function (a) { this.get_events().removeHandler(d, a) }, raiseShowing: function (b) { var a = this.get_events().getHandler(d); a && a(this, b) }, add_shown: function (a) { this.get_events().addHandler(e, a) }, remove_shown: function (a) { this.get_events().removeHandler(e, a) }, raiseShown: function (b) { var a = this.get_events().getHandler(e); a && a(this, b) }, add_hiding: function (a) { this.get_events().addHandler(f, a) }, remove_hiding: function (a) { this.get_events().removeHandler(f, a) }, raiseHiding: function (b) { var a = this.get_events().getHandler(f); a && a(this, b) }, add_hidden: function (a) { this.get_events().addHandler(g, a) }, remove_hidden: function (a) { this.get_events().removeHandler(g, a) }, raiseHidden: function (b) { var a = this.get_events().getHandler(g); a && a(this, b) } }; Sys.Extended.UI.PopupBehavior.registerClass("Sys.Extended.UI.PopupBehavior", Sys.Extended.UI.BehaviorBase); Sys.registerComponent(Sys.Extended.UI.PopupBehavior, { name: "popup" }); Sys.Extended.UI.PositioningMode = function () { throw Error.invalidOperation(); }; Sys.Extended.UI.PositioningMode.prototype = { Absolute: 0, Center: 1, BottomLeft: 2, BottomRight: 3, TopLeft: 4, TopRight: 5, Right: 6, Left: 7 }; Sys.Extended.UI.PositioningMode.registerEnum("Sys.Extended.UI.PositioningMode") } if (window.Sys && Sys.loader) Sys.loader.registerScript(b, ["ExtendedAnimations", "ExtendedAnimationBehavior"], a); else a() })();
//END PopupExtender.PopupBehavior.js
//START PopupControl.PopupControlBehavior.js
// (c) 2010 CodePlex Foundation
(function () { var b = "ExtendedPopupBehavior"; function a() { var b = "click", c = false, a = null; Type.registerNamespace("Sys.Extended.UI"); Sys.Extended.UI.PopupControlBehavior = function (d) { var b = this; Sys.Extended.UI.PopupControlBehavior.initializeBase(b, [d]); b._popupControlID = a; b._commitProperty = a; b._commitScript = a; b._position = a; b._offsetX = 0; b._offsetY = 0; b._extenderControlID = a; b._popupElement = a; b._popupBehavior = a; b._popupVisible = c; b._focusHandler = a; b._popupKeyDownHandler = a; b._popupClickHandler = a; b._bodyClickHandler = a; b._onShowJson = a; b._onHideJson = a }; Sys.Extended.UI.PopupControlBehavior.prototype = { initialize: function () { var c = this; Sys.Extended.UI.PopupControlBehavior.callBaseMethod(c, "initialize"); var d = c.get_element(); c._popupElement = $get(c._popupControlID); c._popupBehavior = $create(Sys.Extended.UI.PopupBehavior, { id: c.get_id() + "PopupBehavior", parentElement: d }, a, a, c._popupElement); c._onShowJson && c._popupBehavior.set_onShow(c._onShowJson); c._onHideJson && c._popupBehavior.set_onHide(c._onHideJson); c._focusHandler = Function.createDelegate(c, c._onFocus); c._popupClickHandler = Function.createDelegate(c, c._onPopupClick); c._bodyClickHandler = Function.createDelegate(c, c._onBodyClick); c._popupKeyDownHandler = Function.createDelegate(c, c._onPopupKeyDown); $addHandler(d, "focus", c._focusHandler); $addHandler(d, b, c._focusHandler); $addHandler(document.body, b, c._bodyClickHandler); $addHandler(c._popupElement, b, c._popupClickHandler); $addHandler(c._popupElement, "keydown", c._popupKeyDownHandler); c.registerPartialUpdateEvents(); Sys.Extended.UI.PopupControlBehavior.__VisiblePopup && c.get_id() == Sys.Extended.UI.PopupControlBehavior.__VisiblePopup.get_id() && c._onFocus(a) }, dispose: function () { var c = this, d = c.get_element(); c._onShowJson = a; c._onHideJson = a; if (c._popupBehavior) { c._popupBehavior.dispose(); c._popupBehavior = a } if (c._focusHandler) { $removeHandler(d, "focus", c._focusHandler); $removeHandler(d, b, c._focusHandler); c._focusHandler = a } if (c._bodyClickHandler) { $removeHandler(document.body, b, c._bodyClickHandler); c._bodyClickHandler = a } if (c._popupClickHandler) { $removeHandler(c._popupElement, b, c._popupClickHandler); c._popupClickHandler = a } if (c._popupKeyDownHandler) { $removeHandler(c._popupElement, "keydown", c._popupKeyDownHandler); c._popupKeyDownHandler = a } Sys.Extended.UI.PopupControlBehavior.callBaseMethod(c, "dispose") }, showPopup: function () { var a = this, b = Sys.Extended.UI.PopupControlBehavior.__VisiblePopup; b && b._popupBehavior && b.hidePopup(); Sys.Extended.UI.PopupControlBehavior.callBaseMethod(a, "populate"); a._popupBehavior.set_x(a._getLeftOffset()); a._popupBehavior.set_y(a._getTopOffset()); a._popupBehavior.show(); a._popupVisible = true; Sys.Extended.UI.PopupControlBehavior.__VisiblePopup = a }, hidePopup: function () { this._popupBehavior.hide(); this._popupVisible = c; Sys.Extended.UI.PopupControlBehavior.__VisiblePopup = a }, _onFocus: function (a) { !this._popupVisible && this.showPopup(); a && a.stopPropagation() }, _onPopupKeyDown: function (a) { this._popupVisible && a.keyCode == 27 && this.get_element().focus() }, _onPopupClick: function (a) { a.stopPropagation() }, _onBodyClick: function () { this._popupVisible && this.hidePopup() }, _close: function (e) { var b = this, d = b.get_element(); if (a != e) { if ("$$CANCEL$$" != e) { if (b._commitProperty) d[b._commitProperty] = e; else if ("text" == d.type) d.value = e; else Sys.Debug.assert(c, String.format(Sys.Extended.UI.Resources.PopupControl_NoDefaultProperty, d.id, d.type)); if (b._commitScript) eval(b._commitScript) } b.hidePopup() } }, _partialUpdateEndRequest: function (d, c) { var a = this; Sys.Extended.UI.PopupControlBehavior.callBaseMethod(a, "_partialUpdateEndRequest", [d, c]); if (a.get_element()) { var b = c.get_dataItems()[a.get_element().id]; if (undefined === b && Sys.Extended.UI.PopupControlBehavior.__VisiblePopup && a.get_id() == Sys.Extended.UI.PopupControlBehavior.__VisiblePopup.get_id()) b = c.get_dataItems()._PopupControl_Proxy_ID_; undefined !== b && a._close(b) } }, _onPopulated: function (b, a) { Sys.Extended.UI.PopupControlBehavior.callBaseMethod(this, "_onPopulated", [b, a]); this._popupVisible && this._popupBehavior.show() }, _getLeftOffset: function () { var a = this; return Sys.Extended.UI.PopupControlPopupPosition.Left == a._position ? -1 * a.get_element().offsetWidth + a._offsetX : Sys.Extended.UI.PopupControlPopupPosition.Right == a._position ? a.get_element().offsetWidth + a._offsetX : a._offsetX }, _getTopOffset: function () { var a = this, b; if (Sys.Extended.UI.PopupControlPopupPosition.Top == a._position) b = -1 * a.get_element().offsetHeight + a._offsetY; else if (Sys.Extended.UI.PopupControlPopupPosition.Bottom == a._position) b = a.get_element().offsetHeight + a._offsetY; else b = a._offsetY; return b }, get_onShow: function () { return this._popupBehavior ? this._popupBehavior.get_onShow() : this._onShowJson }, set_onShow: function (b) { var a = this; if (a._popupBehavior) a._popupBehavior.set_onShow(b); else a._onShowJson = b; a.raisePropertyChanged("onShow") }, get_onShowBehavior: function () { return this._popupBehavior ? this._popupBehavior.get_onShowBehavior() : a }, onShow: function () { this._popupBehavior && this._popupBehavior.onShow() }, get_onHide: function () { return this._popupBehavior ? this._popupBehavior.get_onHide() : this._onHideJson }, set_onHide: function (b) { var a = this; if (a._popupBehavior) a._popupBehavior.set_onHide(b); else a._onHideJson = b; a.raisePropertyChanged("onHide") }, get_onHideBehavior: function () { return this._popupBehavior ? this._popupBehavior.get_onHideBehavior() : a }, onHide: function () { this._popupBehavior && this._popupBehavior.onHide() }, get_PopupControlID: function () { return this._popupControlID }, set_PopupControlID: function (a) { if (this._popupControlID != a) { this._popupControlID = a; this.raisePropertyChanged("PopupControlID") } }, get_CommitProperty: function () { return this._commitProperty }, set_CommitProperty: function (a) { if (this._commitProperty != a) { this._commitProperty = a; this.raisePropertyChanged("CommitProperty") } }, get_CommitScript: function () { return this._commitScript }, set_CommitScript: function (a) { if (this._commitScript != a) { this._commitScript = a; this.raisePropertyChanged("CommitScript") } }, get_Position: function () { return this._position }, set_Position: function (a) { if (this._position != a) { this._position = a; this.raisePropertyChanged("Position") } }, get_ExtenderControlID: function () { return this._extenderControlID }, set_ExtenderControlID: function (a) { if (this._extenderControlID != a) { this._extenderControlID = a; this.raisePropertyChanged("ExtenderControlID") } }, get_OffsetX: function () { return this._offsetX }, set_OffsetX: function (a) { if (this._offsetX != a) { this._offsetX = a; this.raisePropertyChanged("OffsetX") } }, get_OffsetY: function () { return this._offsetY }, set_OffsetY: function (a) { if (this._offsetY != a) { this._offsetY = a; this.raisePropertyChanged("OffsetY") } }, get_PopupVisible: function () { return this._popupVisible }, add_showing: function (a) { this._popupBehavior && this._popupBehavior.add_showing(a) }, remove_showing: function (a) { this._popupBehavior && this._popupBehavior.remove_showing(a) }, raiseShowing: function (a) { this._popupBehavior && this._popupBehavior.raiseShowing(a) }, add_shown: function (a) { this._popupBehavior && this._popupBehavior.add_shown(a) }, remove_shown: function (a) { this._popupBehavior && this._popupBehavior.remove_shown(a) }, raiseShown: function (a) { this._popupBehavior && this._popupBehavior.raiseShown(a) }, add_hiding: function (a) { this._popupBehavior && this._popupBehavior.add_hiding(a) }, remove_hiding: function (a) { this._popupBehavior && this._popupBehavior.remove_hiding(a) }, raiseHiding: function (a) { this._popupBehavior && this._popupBehavior.raiseHiding(a) }, add_hidden: function (a) { this._popupBehavior && this._popupBehavior.add_hidden(a) }, remove_hidden: function (a) { this._popupBehavior && this._popupBehavior.remove_hidden(a) }, raiseHidden: function (a) { this._popupBehavior && this._popupBehavior.raiseHidden(a) } }; Sys.Extended.UI.PopupControlBehavior.registerClass("Sys.Extended.UI.PopupControlBehavior", Sys.Extended.UI.DynamicPopulateBehaviorBase); Sys.registerComponent(Sys.Extended.UI.PopupControlBehavior, { name: "popupBehavior" }); Sys.Extended.UI.PopupControlBehavior.__VisiblePopup = a; Sys.Extended.UI.PopupControlPopupPosition = function () { throw Error.invalidOperation(); }; Sys.Extended.UI.PopupControlPopupPosition.prototype = { Center: 0, Top: 1, Left: 2, Bottom: 3, Right: 4 }; Sys.Extended.UI.PopupControlPopupPosition.registerEnum("Sys.Extended.UI.PopupControlPopupPosition", c) } if (window.Sys && Sys.loader) Sys.loader.registerScript(b, ["ExtendedDynamicPopulate", "ExtendedPopup", "ExtendedAnimationBehavior"], a); else a() })();
//END PopupControl.PopupControlBehavior.js
//START Common.DateTime.js
// (c) 2010 CodePlex Foundation
(function () { var b = "ExtendedDateTime"; function a() { Type.registerNamespace("Sys.Extended.UI"); Sys.Extended.UI.TimeSpan = function () { var a = this; if (arguments.length == 0) a._ctor$0.apply(a, arguments); else if (arguments.length == 1) a._ctor$1.apply(a, arguments); else if (arguments.length == 3) a._ctor$2.apply(a, arguments); else if (arguments.length == 4) a._ctor$3.apply(a, arguments); else if (arguments.length == 5) a._ctor$4.apply(a, arguments); else throw Error.parameterCount(); }; Sys.Extended.UI.TimeSpan.prototype = { _ctor$0: function () { this._ticks = 0 }, _ctor$1: function (a) { this._ctor$0(); this._ticks = a }, _ctor$2: function (c, a, b) { this._ctor$0(); this._ticks = c * Sys.Extended.UI.TimeSpan.TicksPerHour + a * Sys.Extended.UI.TimeSpan.TicksPerMinute + b * Sys.Extended.UI.TimeSpan.TicksPerSecond }, _ctor$3: function (d, c, a, b) { this._ctor$0(); this._ticks = d * Sys.Extended.UI.TimeSpan.TicksPerDay + c * Sys.Extended.UI.TimeSpan.TicksPerHour + a * Sys.Extended.UI.TimeSpan.TicksPerMinute + b * Sys.Extended.UI.TimeSpan.TicksPerSecond }, _ctor$4: function (e, d, b, c, a) { this._ctor$0(); this._ticks = e * Sys.Extended.UI.TimeSpan.TicksPerDay + d * Sys.Extended.UI.TimeSpan.TicksPerHour + b * Sys.Extended.UI.TimeSpan.TicksPerMinute + c * Sys.Extended.UI.TimeSpan.TicksPerSecond + a * Sys.Extended.UI.TimeSpan.TicksPerMillisecond }, getDays: function () { return Math.floor(this._ticks / Sys.Extended.UI.TimeSpan.TicksPerDay) }, getHours: function () { return Math.floor(this._ticks / Sys.Extended.UI.TimeSpan.TicksPerHour) % 24 }, getMinutes: function () { return Math.floor(this._ticks / Sys.Extended.UI.TimeSpan.TicksPerMinute) % 60 }, getSeconds: function () { return Math.floor(this._ticks / Sys.Extended.UI.TimeSpan.TicksPerSecond) % 60 }, getMilliseconds: function () { return Math.floor(this._ticks / Sys.Extended.UI.TimeSpan.TicksPerMillisecond) % 1e3 }, getDuration: function () { return new Sys.Extended.UI.TimeSpan(Math.abs(this._ticks)) }, getTicks: function () { return this._ticks }, getTotalDays: function () { Math.floor(this._ticks / Sys.Extended.UI.TimeSpan.TicksPerDay) }, getTotalHours: function () { return Math.floor(this._ticks / Sys.Extended.UI.TimeSpan.TicksPerHour) }, getTotalMinutes: function () { return Math.floor(this._ticks / Sys.Extended.UI.TimeSpan.TicksPerMinute) }, getTotalSeconds: function () { return Math.floor(this._ticks / Sys.Extended.UI.TimeSpan.TicksPerSecond) }, getTotalMilliseconds: function () { return Math.floor(this._ticks / Sys.Extended.UI.TimeSpan.TicksPerMillisecond) }, add: function (a) { return new Sys.Extended.UI.TimeSpan(this._ticks + a.getTicks()) }, subtract: function (a) { return new Sys.Extended.UI.TimeSpan(this._ticks - a.getTicks()) }, negate: function () { return new Sys.Extended.UI.TimeSpan(-this._ticks) }, equals: function (a) { return this._ticks == a.getTicks() }, compareTo: function (a) { return this._ticks > a.getTicks() ? 1 : this._ticks < a.getTicks() ? -1 : 0 }, toString: function () { return this.format("F") }, format: function (a) { if (!a) a = "F"; if (a.length == 1) switch (a) { case "t": a = Sys.Extended.UI.TimeSpan.ShortTimeSpanPattern; break; case "T": a = Sys.Extended.UI.TimeSpan.LongTimeSpanPattern; break; case "F": a = Sys.Extended.UI.TimeSpan.FullTimeSpanPattern; break; default: throw Error.createError(String.format(Sys.Extended.UI.Resources.Common_DateTime_InvalidTimeSpan, a)); } var e = /dd|d|hh|h|mm|m|ss|s|nnnn|nnn|nn|n/g, c = new Sys.StringBuilder, d = this._ticks; if (d < 0) { c.append("-"); d = -d } for (; true;) { var f = e.lastIndex, b = e.exec(a); c.append(a.slice(f, b ? b.index : a.length)); if (!b) break; switch (b[0]) { case "dd": case "d": c.append($common.padLeft(Math.floor(d / Sys.Extended.UI.TimeSpan.TicksPerDay, b[0].length, "0"))); break; case "hh": case "h": c.append($common.padLeft(Math.floor(d / Sys.Extended.UI.TimeSpan.TicksPerHour) % 24, b[0].length, "0")); break; case "mm": case "m": c.append($common.padLeft(Math.floor(d / Sys.Extended.UI.TimeSpan.TicksPerMinute) % 60, b[0].length, "0")); break; case "ss": case "s": c.append($common.padLeft(Math.floor(d / Sys.Extended.UI.TimeSpan.TicksPerSecond) % 60, b[0].length, "0")); break; case "nnnn": case "nnn": case "nn": case "n": c.append($common.padRight(Math.floor(d / Sys.Extended.UI.TimeSpan.TicksPerMillisecond) % 1e3, b[0].length, "0", true)); break; default: Sys.Debug.assert(false) } } return c.toString() } }; Sys.Extended.UI.TimeSpan.parse = function (j) { var a = ".", b = j.split(":"), i = 0, f = 0, g = 0, d = 0, h = 0, e = 0; switch (b.length) { case 1: if (b[0].indexOf(a) != -1) { var c = b[0].split(a); d = parseInt(c[0]); h = parseInt(c[1]) } else e = parseInt(b[0]); break; case 2: f = parseInt(b[0]); g = parseInt(b[1]); break; case 3: f = parseInt(b[0]); g = parseInt(b[1]); if (b[2].indexOf(a) != -1) { var c = b[2].split(a); d = parseInt(c[0]); h = parseInt(c[1]) } else d = parseInt(b[2]); break; case 4: i = parseInt(b[0]); f = parseInt(b[1]); g = parseInt(b[2]); if (b[3].indexOf(a) != -1) { var c = b[3].split(a); d = parseInt(c[0]); h = parseInt(c[1]) } else d = parseInt(b[3]) } e += i * Sys.Extended.UI.TimeSpan.TicksPerDay + f * Sys.Extended.UI.TimeSpan.TicksPerHour + g * Sys.Extended.UI.TimeSpan.TicksPerMinute + d * Sys.Extended.UI.TimeSpan.TicksPerSecond + h * Sys.Extended.UI.TimeSpan.TicksPerMillisecond; if (!isNaN(e)) return new Sys.Extended.UI.TimeSpan(e); throw Error.create(Sys.Extended.UI.Resources.Common_DateTime_InvalidFormat); }; Sys.Extended.UI.TimeSpan.fromTicks = function (a) { return new Sys.Extended.UI.TimeSpan(a) }; Sys.Extended.UI.TimeSpan.fromDays = function (a) { return new Sys.Extended.UI.TimeSpan(a * Sys.Extended.UI.TimeSpan.TicksPerDay) }; Sys.Extended.UI.TimeSpan.fromHours = function (a) { return new Sys.Extended.UI.TimeSpan(a * Sys.Extended.UI.TimeSpan.TicksPerHour) }; Sys.Extended.UI.TimeSpan.fromMinutes = function (a) { return new Sys.Extended.UI.TimeSpan(a * Sys.Extended.UI.TimeSpan.TicksPerMinute) }; Sys.Extended.UI.TimeSpan.fromSeconds = function () { return new Sys.Extended.UI.TimeSpan(minutes * Sys.Extended.UI.TimeSpan.TicksPerSecond) }; Sys.Extended.UI.TimeSpan.fromMilliseconds = function () { return new Sys.Extended.UI.TimeSpan(minutes * Sys.Extended.UI.TimeSpan.TicksPerMillisecond) }; Sys.Extended.UI.TimeSpan.TicksPerDay = 8.64e11; Sys.Extended.UI.TimeSpan.TicksPerHour = 3.6e10; Sys.Extended.UI.TimeSpan.TicksPerMinute = 6e8; Sys.Extended.UI.TimeSpan.TicksPerSecond = 1e7; Sys.Extended.UI.TimeSpan.TicksPerMillisecond = 1e4; Sys.Extended.UI.TimeSpan.FullTimeSpanPattern = "dd:hh:mm:ss.nnnn"; Sys.Extended.UI.TimeSpan.ShortTimeSpanPattern = "hh:mm"; Sys.Extended.UI.TimeSpan.LongTimeSpanPattern = "hh:mm:ss"; Date.prototype.getTimeOfDay = function () { var a = this; return new Sys.Extended.UI.TimeSpan(0, a.getHours(), a.getMinutes(), a.getSeconds(), a.getMilliseconds()) }; Date.prototype.getDateOnly = function () { var a = this, b = new Date(a.getFullYear(), a.getMonth(), a.getDate()); !(a.getMonth() === b.getMonth() && a.getDate() === b.getDate()) && b.setMinutes(120); return b }; Date.prototype.add = function (a) { return new Date(this.getTime() + a.getTotalMilliseconds()) }; Date.prototype.subtract = function (a) { return this.add(a.negate()) }; Date.prototype.getTicks = function () { return this.getTime() * Sys.Extended.UI.TimeSpan.TicksPerMillisecond }; Sys.Extended.UI.FirstDayOfWeek = function () { }; Sys.Extended.UI.FirstDayOfWeek.prototype = { Sunday: 0, Monday: 1, Tuesday: 2, Wednesday: 3, Thursday: 4, Friday: 5, Saturday: 6, Default: 7 }; Sys.Extended.UI.FirstDayOfWeek.registerEnum("Sys.Extended.UI.FirstDayOfWeek") } if (window.Sys && Sys.loader) Sys.loader.registerScript(b, ["ExtendedCommon"], a); else a() })();
//END Common.DateTime.js
//START Common.Threading.js
// (c) 2010 CodePlex Foundation
(function () { var b = "ExtendedThreading"; function a() { var c = false, a = null, b = true, d = Sys.version; if (!d && !Sys._versionChecked) { Sys._versionChecked = b; throw new Error("AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll."); } Type.registerNamespace("Sys.Extended.UI"); Sys.Extended.UI.DeferredOperation = function (g, f, e) { var d = this; d._delay = g; d._context = f; d._callback = e; d._completeCallback = a; d._errorCallback = a; d._timer = a; d._callArgs = a; d._isComplete = c; d._completedSynchronously = c; d._asyncResult = a; d._exception = a; d._throwExceptions = b; d._oncomplete$delegate = Function.createDelegate(d, d._oncomplete); d.post = Function.createDelegate(d, d.post) }; Sys.Extended.UI.DeferredOperation.prototype = { get_isPending: function () { return this._timer != a }, get_isComplete: function () { return this._isComplete }, get_completedSynchronously: function () { return this._completedSynchronously }, get_exception: function () { return this._exception }, get_throwExceptions: function () { return this._throwExceptions }, set_throwExceptions: function (a) { this._throwExceptions = a }, get_delay: function () { return this._delay }, set_delay: function (a) { this._delay = a }, post: function () { for (var c = [], b = 0; b < arguments.length; b++) c[b] = arguments[b]; this.beginPost(c, a, a) }, beginPost: function (e, c, d) { var a = this; a.cancel(); a._callArgs = Array.clone(e || []); a._completeCallback = c; a._errorCallback = d; if (a._delay == -1) try { a._oncomplete() } finally { a._completedSynchronously = b } else a._timer = setTimeout(a._oncomplete$delegate, a._delay) }, cancel: function () { var b = this; if (b._timer) { clearTimeout(b._timer); b._timer = a } b._callArgs = a; b._isComplete = c; b._asyncResult = a; b._completeCallback = a; b._errorCallback = a; b._exception = a; b._completedSynchronously = c }, call: function () { var c = this; for (var e = [], d = 0; d < arguments.length; d++) e[d] = arguments[d]; c.cancel(); c._callArgs = e; c._completeCallback = a; c._errorCallback = a; try { c._oncomplete() } finally { c._completedSynchronously = b } if (c._exception) throw c._exception; return c._asyncResult }, complete: function () { var a = this; if (a._timer) { try { a._oncomplete() } finally { a._completedSynchronously = b } return a._asyncResult } else if (a._isComplete) return a._asyncResult }, _oncomplete: function () { var a = this, f = a._callArgs, d = a._completeCallback, e = a._errorCallback; a.cancel(); try { if (f) a._asyncResult = a._callback.apply(a._context, f); else a._asyncResult = a._callback.call(a._context); a._isComplete = b; a._completedSynchronously = c; d && d(a) } catch (g) { a._isComplete = b; a._completedSynchronously = c; a._exception = g; if (e) if (e(a)) return; if (a._throwExceptions) throw g; } } }; Sys.Extended.UI.DeferredOperation.registerClass("Sys.Extended.UI.DeferredOperation") } if (window.Sys && Sys.loader) Sys.loader.registerScript(b, ["Core"], a); else a() })();
//END Common.Threading.js
//START Calendar.CalendarBehavior.js
// (c) 2010 CodePlex Foundation
(function () { var b = "ExtendedCalendar"; function a() { var p = "ajax__calendar_hover", e = "ajax__calendar_invalid", g = "ajax__calendar_active", f = "ajax__calendar_other", j = "y", l = "M", y = "tbody", o = "td", n = "tr", x = "auto", w = "table", v = "ajax__calendar_today", d = "div", m = "years", i = "months", u = "dateSelectionChanged", t = "hidden", s = "hiding", r = "shown", q = "showing", k = "days", b = false, a = null, c = true, h = "d"; Type.registerNamespace("Sys.Extended.UI"); Sys.Extended.UI.CalendarBehavior = function (e) { var d = this; Sys.Extended.UI.CalendarBehavior.initializeBase(d, [e]); d._textbox = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e); d._format = h; d._todaysDateFormat = "MMMM d, yyyy"; d._daysModeTitleFormat = "MMMM, yyyy"; d._cssClass = "ajax__calendar"; d._enabled = c; d._animated = c; d._buttonID = a; d._layoutRequested = 0; d._layoutSuspended = b; d._button = a; d._popupMouseDown = b; d._selectedDate = a; d._startDate = a; d._endDate = a; d._visibleDate = a; d._todaysDate = a; d._firstDayOfWeek = Sys.Extended.UI.FirstDayOfWeek.Default; d._firstPopUp = c; d._container = a; d._popupDiv = a; d._header = a; d._prevArrow = a; d._nextArrow = a; d._title = a; d._body = a; d._today = a; d._days = a; d._daysTable = a; d._daysTableHeader = a; d._daysTableHeaderRow = a; d._daysBody = a; d._months = a; d._monthsTable = a; d._monthsBody = a; d._years = a; d._yearsTable = a; d._yearsBody = a; d._popupPosition = Sys.Extended.UI.CalendarPosition.BottomLeft; d._defaultView = Sys.Extended.UI.CalendarDefaultView.Days; d._popupBehavior = a; d._modeChangeAnimation = a; d._modeChangeMoveTopOrLeftAnimation = a; d._modeChangeMoveBottomOrRightAnimation = a; d._mode = k; d._selectedDateChanging = b; d._isOpen = b; d._isAnimating = b; d._clearTime = b; d._width = 170; d._height = 139; d._modes = { days: a, months: a, years: a }; d._modeOrder = { days: 0, months: 1, years: 2 }; d._blur = new Sys.Extended.UI.DeferredOperation(1, d, d.blur); d._button$delegates = { click: Function.createDelegate(d, d._button_onclick), keypress: Function.createDelegate(d, d._button_onkeypress), blur: Function.createDelegate(d, d._button_onblur) }; d._element$delegates = { change: Function.createDelegate(d, d._element_onchange), keypress: Function.createDelegate(d, d._element_onkeypress), click: Function.createDelegate(d, d._element_onclick), focus: Function.createDelegate(d, d._element_onfocus), blur: Function.createDelegate(d, d._element_onblur) }; d._popup$delegates = { mousedown: Function.createDelegate(d, d._popup_onmousedown), mouseup: Function.createDelegate(d, d._popup_onmouseup), drag: Function.createDelegate(d, d._popup_onevent), dragstart: Function.createDelegate(d, d._popup_onevent) }; d._cell$delegates = { mouseover: Function.createDelegate(d, d._cell_onmouseover), mouseout: Function.createDelegate(d, d._cell_onmouseout), click: Function.createDelegate(d, d._cell_onclick) } }; Sys.Extended.UI.CalendarBehavior.prototype = { get_clearTime: function () { return this._clearTime }, set_clearTime: function (a) { if (this._clearTime != a) { this._clearTime = a; this.raisePropertyChanged("_clearTime") } }, get_animated: function () { return this._animated }, set_animated: function (a) { if (this._animated != a) { this._animated = a; this.raisePropertyChanged("animated") } }, get_enabled: function () { return this._enabled }, set_enabled: function (a) { if (this._enabled != a) { this._enabled = a; this.raisePropertyChanged("enabled") } }, get_button: function () { return this._button }, set_button: function (b) { var a = this; if (a._button != b) { a._button && a.get_isInitialized() && $common.removeHandlers(a._button, a._button$delegates); a._button = b; a._button && a.get_isInitialized() && $addHandlers(a._button, a._button$delegates); a.raisePropertyChanged("button") } }, get_popupPosition: function () { return this._popupPosition }, set_popupPosition: function (a) { if (this._popupPosition != a) { this._popupPosition = a; this.raisePropertyChanged("popupPosition") } }, set_startDate: function (a) { if (this._startDate != a) { this._startDate = new Date(a); this.raisePropertyChanged("startDate") } }, get_startDate: function () { return this._startDate }, set_endDate: function (a) { if (this._endDate != a) { this._endDate = new Date(a); this.raisePropertyChanged("_endDate") } }, get_endDate: function () { return this._endDate }, get_format: function () { return this._format }, set_format: function (a) { if (this._format != a) { this._format = a; this.raisePropertyChanged("format") } }, get_todaysDateFormat: function () { return this._todaysDateFormat }, set_todaysDateFormat: function (a) { if (this._todaysDateFormat != a) { this._todaysDateFormat = a; this.raisePropertyChanged("todaysDateFormat") } }, get_daysModeTitleFormat: function () { return this._daysModeTitleFormat }, set_daysModeTitleFormat: function (a) { if (this._daysModeTitleFormat != a) { this._daysModeTitleFormat = a; this.raisePropertyChanged("daysModeTitleFormat") } }, get_selectedDate: function () { var b = this; if (b._selectedDate == a) { var c = b._textbox.get_Value(); if (c) { c = b._parseTextValue(c); if (c) b._selectedDate = c } } return b._selectedDate }, set_selectedDate: function (d) { var a = this; if (d && String.isInstanceOfType(d) && d.length != 0) d = new Date(d); if (a._selectedDate != d) { a._selectedDate = d; a._selectedDateChanging = c; var f = ""; if (d) { f = a._convertToLocal(d).localeFormat(a._format); if (!a._clearTime) { var e = a._textbox.get_Value(); if (e) e = a._parseTextValue(e); if (e) if (d != e.getDateOnly()) { d.setUTCHours(e.getUTCHours()); d.setUTCMinutes(e.getUTCMinutes()); d.setUTCMilliseconds(e.getUTCMilliseconds()); f = a._convertToLocal(d).localeFormat(a._format) } } } if (f != a._textbox.get_Value()) { a._textbox.set_Value(f); a._fireChanged() } a._selectedDateChanging = b; a.invalidate(); a.raisePropertyChanged("selectedDate") } }, get_defaultView: function () { return this._defaultView }, set_defaultView: function (a) { if (this._defaultView != a) { this._defaultView = a; this.raisePropertyChanged("defaultView") } }, get_visibleDate: function () { return this._visibleDate }, set_visibleDate: function (a) { var b = this; if (a && String.isInstanceOfType(a) && a.length != 0) a = new Date(a); if (b._visibleDate != a) { b._switchMonth(a, !b._isOpen); b.raisePropertyChanged("visibleDate") } }, get_isOpen: function () { return this._isOpen }, get_todaysDate: function () { return this._todaysDate != a ? this._todaysDate : new Date }, set_todaysDate: function (b) { var a = this; if (a._todaysDate != b) { a._todaysDate = b; a.invalidate(); a.raisePropertyChanged("todaysDate") } }, get_firstDayOfWeek: function () { return this._firstDayOfWeek }, set_firstDayOfWeek: function (b) { var a = this; if (a._firstDayOfWeek != b) { a._firstDayOfWeek = b; a.invalidate(); a.raisePropertyChanged("firstDayOfWeek") } }, get_cssClass: function () { return this._cssClass }, set_cssClass: function (b) { var a = this; if (a._cssClass != b) { a._cssClass && a.get_isInitialized() && Sys.UI.DomElement.removeCssClass(a._container, a._cssClass); a._cssClass = b; a._cssClass && a.get_isInitialized() && Sys.UI.DomElement.addCssClass(a._container, a._cssClass); a.raisePropertyChanged("cssClass") } }, get_todayButton: function () { return this._today }, get_dayCell: function (c, b) { return this._daysBody ? this._daysBody.rows[c].cells[b].firstChild : a }, add_showing: function (a) { this.get_events().addHandler(q, a) }, remove_showing: function (a) { this.get_events().removeHandler(q, a) }, raiseShowing: function (b) { var a = this.get_events().getHandler(q); a && a(this, b) }, add_shown: function (a) { this.get_events().addHandler(r, a) }, remove_shown: function (a) { this.get_events().removeHandler(r, a) }, raiseShown: function () { var a = this.get_events().getHandler(r); a && a(this, Sys.EventArgs.Empty) }, add_hiding: function (a) { this.get_events().addHandler(s, a) }, remove_hiding: function (a) { this.get_events().removeHandler(s, a) }, raiseHiding: function (b) { var a = this.get_events().getHandler(s); a && a(this, b) }, add_hidden: function (a) { this.get_events().addHandler(t, a) }, remove_hidden: function (a) { this.get_events().removeHandler(t, a) }, raiseHidden: function () { var a = this.get_events().getHandler(t); a && a(this, Sys.EventArgs.Empty) }, add_dateSelectionChanged: function (a) { this.get_events().addHandler(u, a) }, remove_dateSelectionChanged: function (a) { this.get_events().removeHandler(u, a) }, raiseDateSelectionChanged: function () { var a = this.get_events().getHandler(u); a && a(this, Sys.EventArgs.Empty) }, initialize: function () { var b = this; Sys.Extended.UI.CalendarBehavior.callBaseMethod(b, "initialize"); var d = b.get_element(); $addHandlers(d, b._element$delegates); b._button && $addHandlers(b._button, b._button$delegates); b._modeChangeMoveTopOrLeftAnimation = new Sys.Extended.UI.Animation.LengthAnimation(a, a, a, "style", a, 0, 0, "px"); b._modeChangeMoveBottomOrRightAnimation = new Sys.Extended.UI.Animation.LengthAnimation(a, a, a, "style", a, 0, 0, "px"); b._modeChangeAnimation = new Sys.Extended.UI.Animation.ParallelAnimation(a, .25, a, [b._modeChangeMoveTopOrLeftAnimation, b._modeChangeMoveBottomOrRightAnimation]); var c = b.get_selectedDate(); c && b.set_selectedDate(c) }, dispose: function () { var b = this; if (b._popupBehavior) { b._popupBehavior.dispose(); b._popupBehavior = a } b._modes = a; b._modeOrder = a; if (b._modeChangeMoveTopOrLeftAnimation) { b._modeChangeMoveTopOrLeftAnimation.dispose(); b._modeChangeMoveTopOrLeftAnimation = a } if (b._modeChangeMoveBottomOrRightAnimation) { b._modeChangeMoveBottomOrRightAnimation.dispose(); b._modeChangeMoveBottomOrRightAnimation = a } if (b._modeChangeAnimation) { b._modeChangeAnimation.dispose(); b._modeChangeAnimation = a } if (b._container) { b._container.parentNode && b._container.parentNode.removeChild(b._container); b._container = a } if (b._popupDiv) { $common.removeHandlers(b._popupDiv, b._popup$delegates); b._popupDiv = a } if (b._prevArrow) { $common.removeHandlers(b._prevArrow, b._cell$delegates); b._prevArrow = a } if (b._nextArrow) { $common.removeHandlers(b._nextArrow, b._cell$delegates); b._nextArrow = a } if (b._title) { $common.removeHandlers(b._title, b._cell$delegates); b._title = a } if (b._today) { $common.removeHandlers(b._today, b._cell$delegates); b._today = a } if (b._button) { $common.removeHandlers(b._button, b._button$delegates); b._button = a } if (b._daysBody) { for (var c = 0; c < b._daysBody.rows.length; c++) for (var e = b._daysBody.rows[c], d = 0; d < e.cells.length; d++) $common.removeHandlers(e.cells[d].firstChild, b._cell$delegates); b._daysBody = a } if (b._monthsBody) { for (var c = 0; c < b._monthsBody.rows.length; c++) for (var e = b._monthsBody.rows[c], d = 0; d < e.cells.length; d++) $common.removeHandlers(e.cells[d].firstChild, b._cell$delegates); b._monthsBody = a } if (b._yearsBody) { for (var c = 0; c < b._yearsBody.rows.length; c++) for (var e = b._yearsBody.rows[c], d = 0; d < e.cells.length; d++) $common.removeHandlers(e.cells[d].firstChild, b._cell$delegates); b._yearsBody = a } var f = b.get_element(); $common.removeHandlers(f, b._element$delegates); Sys.Extended.UI.CalendarBehavior.callBaseMethod(b, "dispose") }, show: function () { var d = this; d._ensureCalendar(); if (!d._isOpen) { var e = new Sys.CancelEventArgs; d.raiseShowing(e); if (e.get_cancel()) return; d._isOpen = c; d._popupBehavior.show(); if (d._firstPopUp) { d._switchMonth(a, c); switch (d._defaultView) { case Sys.Extended.UI.CalendarDefaultView.Months: d._switchMode(i, c); break; case Sys.Extended.UI.CalendarDefaultView.Years: d._switchMode(m, c) } d._firstPopUp = b } d.raiseShown() } }, hide: function () { var a = this; if (a._isOpen) { var c = new Sys.CancelEventArgs; a.raiseHiding(c); if (c.get_cancel()) return; a._container && a._popupBehavior.hide(); a._isOpen = b; a.raiseHidden(); a._popupMouseDown = b } }, focus: function () { if (this._button) this._button.focus(); else this.get_element().focus() }, blur: function (d) { var a = this; if (!d && Sys.Browser.agent === Sys.Browser.Opera) a._blur.post(c); else { !a._popupMouseDown && a.hide(); a._popupMouseDown = b } }, suspendLayout: function () { this._layoutSuspended++ }, resumeLayout: function () { var a = this; a._layoutSuspended--; if (a._layoutSuspended <= 0) { a._layoutSuspended = 0; a._layoutRequested && a._performLayout() } }, invalidate: function () { if (this._layoutSuspended > 0) this._layoutRequested = c; else this._performLayout() }, _buildCalendar: function () { var a = this, e = a.get_element(), c = a.get_id(); a._container = $common.createElementFromTemplate({ nodeName: d, properties: { id: c + "_container" }, cssClasses: [a._cssClass], visible: b }, e.parentNode); a._popupDiv = $common.createElementFromTemplate({ nodeName: d, events: a._popup$delegates, properties: { id: c + "_popupDiv" }, cssClasses: ["ajax__calendar_container"] }, a._container) }, _buildHeader: function () { var a = this, b = a.get_id(); a._header = $common.createElementFromTemplate({ nodeName: d, properties: { id: b + "_header" }, cssClasses: ["ajax__calendar_header"] }, a._popupDiv); var e = $common.createElementFromTemplate({ nodeName: d }, a._header); a._prevArrow = $common.createElementFromTemplate({ nodeName: d, properties: { id: b + "_prevArrow", mode: "prev" }, events: a._cell$delegates, cssClasses: ["ajax__calendar_prev"] }, e); var c = $common.createElementFromTemplate({ nodeName: d }, a._header); a._nextArrow = $common.createElementFromTemplate({ nodeName: d, properties: { id: b + "_nextArrow", mode: "next" }, events: a._cell$delegates, cssClasses: ["ajax__calendar_next"] }, c); var f = $common.createElementFromTemplate({ nodeName: d }, a._header); a._title = $common.createElementFromTemplate({ nodeName: d, properties: { id: b + "_title", mode: "title" }, events: a._cell$delegates, cssClasses: ["ajax__calendar_title"] }, f) }, _buildBody: function () { var a = this; a._body = $common.createElementFromTemplate({ nodeName: d, properties: { id: a.get_id() + "_body" }, cssClasses: ["ajax__calendar_body"] }, a._popupDiv); a._buildDays(); a._buildMonths(); a._buildYears() }, _buildFooter: function () { var a = this, b = $common.createElementFromTemplate({ nodeName: d }, a._popupDiv); a._today = $common.createElementFromTemplate({ nodeName: d, properties: { id: a.get_id() + "_today", mode: "today" }, events: a._cell$delegates, cssClasses: ["ajax__calendar_footer", v] }, b) }, _buildDays: function () { var a = this, i = Sys.CultureInfo.CurrentCulture.dateTimeFormat, b = a.get_id(); a._days = $common.createElementFromTemplate({ nodeName: d, properties: { id: b + "_days" }, cssClasses: ["ajax__calendar_days"] }, a._body); a._modes.days = a._days; a._daysTable = $common.createElementFromTemplate({ nodeName: w, properties: { id: b + "_daysTable", cellPadding: 0, cellSpacing: 0, border: 0, style: { margin: x } } }, a._days); a._daysTableHeader = $common.createElementFromTemplate({ nodeName: "thead", properties: { id: b + "_daysTableHeader" } }, a._daysTable); a._daysTableHeaderRow = $common.createElementFromTemplate({ nodeName: n, properties: { id: b + "_daysTableHeaderRow" } }, a._daysTableHeader); for (var c = 0; c < 7; c++) var f = $common.createElementFromTemplate({ nodeName: o }, a._daysTableHeaderRow), h = $common.createElementFromTemplate({ nodeName: d, cssClasses: ["ajax__calendar_dayname"] }, f); a._daysBody = $common.createElementFromTemplate({ nodeName: y, properties: { id: b + "_daysBody" } }, a._daysTable); for (var c = 0; c < 6; c++) for (var g = $common.createElementFromTemplate({ nodeName: n }, a._daysBody), e = 0; e < 7; e++) var f = $common.createElementFromTemplate({ nodeName: o }, g), h = $common.createElementFromTemplate({ nodeName: d, properties: { mode: "day", id: b + "_day_" + c + "_" + e, innerHTML: "&nbsp;" }, events: a._cell$delegates, cssClasses: ["ajax__calendar_day"] }, f) }, _buildMonths: function () { var a = this, i = Sys.CultureInfo.CurrentCulture.dateTimeFormat, f = a.get_id(); a._months = $common.createElementFromTemplate({ nodeName: d, properties: { id: f + "_months" }, cssClasses: ["ajax__calendar_months"], visible: b }, a._body); a._modes.months = a._months; a._monthsTable = $common.createElementFromTemplate({ nodeName: w, properties: { id: f + "_monthsTable", cellPadding: 0, cellSpacing: 0, border: 0, style: { margin: x } } }, a._months); a._monthsBody = $common.createElementFromTemplate({ nodeName: y, properties: { id: f + "_monthsBody" } }, a._monthsTable); for (var c = 0; c < 3; c++) for (var h = $common.createElementFromTemplate({ nodeName: n }, a._monthsBody), e = 0; e < 4; e++) var g = $common.createElementFromTemplate({ nodeName: o }, h), j = $common.createElementFromTemplate({ nodeName: d, properties: { id: f + "_month_" + c + "_" + e, mode: "month", month: c * 4 + e, innerHTML: "<br />" + i.AbbreviatedMonthNames[c * 4 + e] }, events: a._cell$delegates, cssClasses: ["ajax__calendar_month"] }, g) }, _buildYears: function () { var a = this, c = a.get_id(); a._years = $common.createElementFromTemplate({ nodeName: d, properties: { id: c + "_years" }, cssClasses: ["ajax__calendar_years"], visible: b }, a._body); a._modes.years = a._years; a._yearsTable = $common.createElementFromTemplate({ nodeName: w, properties: { id: c + "_yearsTable", cellPadding: 0, cellSpacing: 0, border: 0, style: { margin: x } } }, a._years); a._yearsBody = $common.createElementFromTemplate({ nodeName: y, properties: { id: c + "_yearsBody" } }, a._yearsTable); for (var e = 0; e < 3; e++) for (var h = $common.createElementFromTemplate({ nodeName: n }, a._yearsBody), f = 0; f < 4; f++) var g = $common.createElementFromTemplate({ nodeName: o }, h), i = $common.createElementFromTemplate({ nodeName: d, properties: { id: c + "_year_" + e + "_" + f, mode: "year", year: e * 4 + f - 1 }, events: a._cell$delegates, cssClasses: ["ajax__calendar_year"] }, g) }, _isInDateRange: function (d, e) { var a = this; switch (e) { case h: if (a._startDate && a._getDateOnly(d) < a._getDateOnly(a._startDate)) return b; if (a._endDate && a._getDateOnly(d) > a._getDateOnly(a._endDate)) return b; break; case l: if (a._startDate && a._getMonthOnly(d) < a._getMonthOnly(a._startDate)) return b; if (a._endDate && a._getMonthOnly(d) > a._getMonthOnly(a._endDate)) return b; break; case j: if (a._startDate && d.getUTCFullYear() < a._startDate.getUTCFullYear()) return b; if (a._endDate && d.getUTCFullYear() > a._endDate.getUTCFullYear()) return b } return c }, _getDateOnly: function (a) { return new Date(Date.UTC(a.getUTCFullYear(), a.getUTCMonth(), a.getUTCDate())) }, _getMonthOnly: function (a) { return new Date(Date.UTC(a.getUTCFullYear(), a.getUTCMonth(), 1)) }, _convertToUTC: function (a) { if (a) a = new Date(Date.UTC(a.getFullYear(), a.getMonth(), a.getDate(), a.getHours(), a.getMinutes(), a.getSeconds(), a.getMilliseconds())); return a }, _convertToLocal: function (a) { var b = new Date(a.getUTCFullYear(), a.getUTCMonth(), a.getUTCDate(), a.getUTCHours(), a.getUTCMinutes(), a.getUTCSeconds(), a.getUTCMilliseconds()); if (b.getDate() != a.getUTCDate()) b = new Date(a.getUTCFullYear(), a.getUTCMonth(), a.getUTCDate(), a.getUTCHours() + 1, a.getUTCMinutes(), a.getUTCSeconds(), a.getUTCMilliseconds()); return b }, _performLayout: function () { var a = this, B = a.get_element(); if (!B) return; if (!a.get_isInitialized()) return; if (!a._isOpen) return; var A = Sys.CultureInfo.CurrentCulture.dateTimeFormat, C = a.get_selectedDate(), d = a._getEffectiveVisibleDate(), t = a.get_todaysDate(); switch (a._mode) { case k: var y = a._getFirstDayOfWeek(), s = d.getUTCDay() - y; if (s <= 0) s += 7; var w = new Date(d); w.setUTCDate(w.getUTCDate() - s); for (var o = new Date(w), n = 0; n < 7; n++) { var c = a._daysTableHeaderRow.cells[n].firstChild; c.firstChild && c.removeChild(c.firstChild); c.appendChild(document.createTextNode(A.ShortestDayNames[(n + y) % 7])) } for (var x = 0; x < 6; x++) for (var z = a._daysBody.rows[x], u = 0; u < 7; u++) { var c = z.cells[u].firstChild; c.firstChild && c.removeChild(c.firstChild); c.appendChild(document.createTextNode(o.getUTCDate())); c.title = a._convertToLocal(o).localeFormat("D"); c.date = o; $common.removeCssClasses(c.parentNode, [f, g, v]); if (!a._isInDateRange(o, h)) { $common.removeCssClasses(c.parentNode, [f, g]); Sys.UI.DomElement.addCssClass(c.parentNode, e) } else { $common.removeCssClasses(c.parentNode, [e, f, g, ""]); Sys.UI.DomElement.addCssClass(c.parentNode, a._getCssClass(c.date, h)) } o = new Date(o); o.setUTCDate(o.getUTCDate() + 1) } a._prevArrow.date = new Date(Date.UTC(d.getUTCFullYear(), d.getUTCMonth() - 1, 1)); a._nextArrow.date = new Date(Date.UTC(d.getUTCFullYear(), d.getUTCMonth() + 1, 1)); a._title.firstChild && a._title.removeChild(a._title.firstChild); a._title.appendChild(document.createTextNode(a._convertToLocal(d).localeFormat(a.get_daysModeTitleFormat()))); a._title.date = d; break; case i: for (var n = 0; n < a._monthsBody.rows.length; n++) for (var r = a._monthsBody.rows[n], q = 0; q < r.cells.length; q++) { var b = r.cells[q].firstChild; b.date = new Date(Date.UTC(d.getUTCFullYear(), b.month, 1)); b.title = a._convertToLocal(b.date).localeFormat("Y"); if (!a._isInDateRange(b.date, l)) { $common.removeCssClasses(b.parentNode, [f, g]); Sys.UI.DomElement.addCssClass(b.parentNode, e) } else { $common.removeCssClasses(b.parentNode, [e, f, g]); Sys.UI.DomElement.addCssClass(b.parentNode, a._getCssClass(b.date, l)) } } a._title.firstChild && a._title.removeChild(a._title.firstChild); a._title.appendChild(document.createTextNode(a._convertToLocal(d).localeFormat("yyyy"))); a._title.date = d; a._prevArrow.date = new Date(Date.UTC(d.getUTCFullYear() - 1, 0, 1)); a._nextArrow.date = new Date(Date.UTC(d.getUTCFullYear() + 1, 0, 1)); break; case m: for (var p = Math.floor(d.getUTCFullYear() / 10) * 10, n = 0; n < a._yearsBody.rows.length; n++) for (var r = a._yearsBody.rows[n], q = 0; q < r.cells.length; q++) { var b = r.cells[q].firstChild; b.date = new Date(Date.UTC(p + b.year, 0, 1)); if (b.firstChild) b.removeChild(b.lastChild); else b.appendChild(document.createElement("br")); b.appendChild(document.createTextNode(p + b.year)); if (!a._isInDateRange(b.date, j)) { $common.removeCssClasses(b.parentNode, [f, g]); Sys.UI.DomElement.addCssClass(b.parentNode, e) } else { $common.removeCssClasses(b.parentNode, [e, f, g]); Sys.UI.DomElement.addCssClass(b.parentNode, a._getCssClass(b.date, j)) } } a._title.firstChild && a._title.removeChild(a._title.firstChild); a._title.appendChild(document.createTextNode(p.toString() + "-" + (p + 9).toString())); a._title.date = d; a._prevArrow.date = new Date(Date.UTC(p - 10, 0, 1)); a._nextArrow.date = new Date(Date.UTC(p + 10, 0, 1)) } a._today.firstChild && a._today.removeChild(a._today.firstChild); $common.removeCssClasses(a._today.parentNode, [e]); a._today.appendChild(document.createTextNode(String.format(Sys.Extended.UI.Resources.Calendar_Today, t.localeFormat(a.get_todaysDateFormat())))); !a._isInDateRange(t, h) && Sys.UI.DomElement.addCssClass(a._today.parentNode, e); a._today.date = a._convertToUTC(t) }, _ensureCalendar: function () { var a = this; if (!a._container) { var b = a.get_element(); a._buildCalendar(); a._buildHeader(); a._buildBody(); a._buildFooter(); a._popupBehavior = new $create(Sys.Extended.UI.PopupBehavior, { parentElement: b }, {}, {}, a._container); if (a._popupPosition == Sys.Extended.UI.CalendarPosition.TopLeft) a._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.TopLeft); else if (a._popupPosition == Sys.Extended.UI.CalendarPosition.TopRight) a._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.TopRight); else if (a._popupPosition == Sys.Extended.UI.CalendarPosition.BottomRight) a._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.BottomRight); else if (a._popupPosition == Sys.Extended.UI.CalendarPosition.Right) a._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.Right); else if (a._popupPosition == Sys.Extended.UI.CalendarPosition.Left) a._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.Left); else a._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.BottomLeft) } }, _fireChanged: function () { var a = this.get_element(); if (document.createEventObject) a.fireEvent("onchange"); else if (document.createEvent) { var b = document.createEvent("HTMLEvents"); b.initEvent("change", c, c); a.dispatchEvent(b) } }, _switchMonth: function (g, j) { var e = "left", d = this; if (d._isAnimating) return; if (g && !d._canSwitchMonth(g)) return; var i = d._getEffectiveVisibleDate(); if (g && g.getFullYear() == i.getFullYear() && g.getMonth() == i.getMonth()) j = c; if (d._animated && !j) { d._isAnimating = c; var h = d._modes[d._mode], f = h.cloneNode(c); d._body.appendChild(f); if (i > g) { $common.setLocation(h, { x: -162, y: 0 }); $common.setVisible(h, c); d._modeChangeMoveTopOrLeftAnimation.set_propertyKey(e); d._modeChangeMoveTopOrLeftAnimation.set_target(h); d._modeChangeMoveTopOrLeftAnimation.set_startValue(-d._width); d._modeChangeMoveTopOrLeftAnimation.set_endValue(0); $common.setLocation(f, { x: 0, y: 0 }); $common.setVisible(f, c); d._modeChangeMoveBottomOrRightAnimation.set_propertyKey(e); d._modeChangeMoveBottomOrRightAnimation.set_target(f); d._modeChangeMoveBottomOrRightAnimation.set_startValue(0); d._modeChangeMoveBottomOrRightAnimation.set_endValue(d._width) } else { $common.setLocation(f, { x: 0, y: 0 }); $common.setVisible(f, c); d._modeChangeMoveTopOrLeftAnimation.set_propertyKey(e); d._modeChangeMoveTopOrLeftAnimation.set_target(f); d._modeChangeMoveTopOrLeftAnimation.set_endValue(-d._width); d._modeChangeMoveTopOrLeftAnimation.set_startValue(0); $common.setLocation(h, { x: 162, y: 0 }); $common.setVisible(h, c); d._modeChangeMoveBottomOrRightAnimation.set_propertyKey(e); d._modeChangeMoveBottomOrRightAnimation.set_target(h); d._modeChangeMoveBottomOrRightAnimation.set_endValue(0); d._modeChangeMoveBottomOrRightAnimation.set_startValue(d._width) } d._visibleDate = g; d.invalidate(); var k = Function.createDelegate(d, function () { this._body.removeChild(f); f = a; this._isAnimating = b; this._modeChangeAnimation.remove_ended(k) }); d._modeChangeAnimation.add_ended(k); d._modeChangeAnimation.play() } else { d._visibleDate = g; d.invalidate() } }, _canSwitchMonth: function (d) { var a = this; switch (a._mode) { case k: if (!a._isInDateRange(d, l)) return b; break; case i: if (!a._isInDateRange(d, j)) return b; break; case m: if (!a._isInDateRange(d, j)) return b } return c }, _switchMode: function (g, i) { var d = "top", a = this; if (a._isAnimating || a._mode == g) return; var j = a._modeOrder[a._mode] < a._modeOrder[g], f = a._modes[a._mode], e = a._modes[g]; a._mode = g; if (a._animated && !i) { a._isAnimating = c; a.invalidate(); if (j) { $common.setLocation(e, { x: 0, y: -a._height }); $common.setVisible(e, c); a._modeChangeMoveTopOrLeftAnimation.set_propertyKey(d); a._modeChangeMoveTopOrLeftAnimation.set_target(e); a._modeChangeMoveTopOrLeftAnimation.set_startValue(-a._height); a._modeChangeMoveTopOrLeftAnimation.set_endValue(0); $common.setLocation(f, { x: 0, y: 0 }); $common.setVisible(f, c); a._modeChangeMoveBottomOrRightAnimation.set_propertyKey(d); a._modeChangeMoveBottomOrRightAnimation.set_target(f); a._modeChangeMoveBottomOrRightAnimation.set_startValue(0); a._modeChangeMoveBottomOrRightAnimation.set_endValue(a._height) } else { $common.setLocation(f, { x: 0, y: 0 }); $common.setVisible(f, c); a._modeChangeMoveTopOrLeftAnimation.set_propertyKey(d); a._modeChangeMoveTopOrLeftAnimation.set_target(f); a._modeChangeMoveTopOrLeftAnimation.set_endValue(-a._height); a._modeChangeMoveTopOrLeftAnimation.set_startValue(0); $common.setLocation(e, { x: 0, y: 139 }); $common.setVisible(e, c); a._modeChangeMoveBottomOrRightAnimation.set_propertyKey(d); a._modeChangeMoveBottomOrRightAnimation.set_target(e); a._modeChangeMoveBottomOrRightAnimation.set_endValue(0); a._modeChangeMoveBottomOrRightAnimation.set_startValue(a._height) } var h = Function.createDelegate(a, function () { this._isAnimating = b; this._modeChangeAnimation.remove_ended(h) }); a._modeChangeAnimation.add_ended(h); a._modeChangeAnimation.play() } else { a._mode = g; $common.setVisible(f, b); a.invalidate(); $common.setVisible(e, c); $common.setLocation(e, { x: 0, y: 0 }) } }, _isSelected: function (d, e) { var a = this.get_selectedDate(); if (!a) return b; switch (e) { case h: if (d.getUTCDate() != a.getUTCDate()) return b; case l: if (d.getUTCMonth() != a.getUTCMonth()) return b; case j: if (d.getUTCFullYear() != a.getUTCFullYear()) return b } return c }, _isOther: function (a, e) { var c = this._getEffectiveVisibleDate(); switch (e) { case h: return a.getUTCFullYear() != c.getUTCFullYear() || a.getUTCMonth() != c.getUTCMonth(); case l: return b; case j: var d = Math.floor(c.getUTCFullYear() / 10) * 10; return a.getUTCFullYear() < d || d + 10 <= a.getUTCFullYear() } return b }, _isTodaysDate: function (b) { var a = this; return a._getDateOnly(a._convertToUTC(a.get_todaysDate())).valueOf() === a._getDateOnly(b).valueOf() }, _getCssClass: function (a, b) { return this._isSelected(a, b) ? g : this._isOther(a, b) ? f : this._isTodaysDate(a) ? v : "" }, _getEffectiveVisibleDate: function () { var c = this, b = c.get_visibleDate(); if (b == a) b = c.get_selectedDate(); if (b == a) b = c.get_todaysDate(); b = new Date(b); b.setUTCDate(1); return c._getDateOnly(b) }, _getFirstDayOfWeek: function () { return this.get_firstDayOfWeek() != Sys.Extended.UI.FirstDayOfWeek.Default ? this.get_firstDayOfWeek() : Sys.CultureInfo.CurrentCulture.dateTimeFormat.FirstDayOfWeek }, _parseTextValue: function (c) { var b = a; if (c) b = this._convertToUTC(Date.parseLocale(c, this.get_format())); if (isNaN(b)) b = a; return b }, _element_onfocus: function () { var a = this; if (!a._enabled) return; if (!a._button) { a.show(); a._popupMouseDown = b } }, _element_onblur: function () { if (!this._enabled) return; !this._button && this.blur() }, _element_onchange: function () { var b = this; if (!b._selectedDateChanging) { var c = b._parseTextValue(b._textbox.get_Value()); b._selectedDate = c; b._isOpen && b._switchMonth(b._selectedDate, b._selectedDate == a) } }, _element_onkeypress: function (a) { if (!this._enabled) return; if (!this._button && a.charCode == Sys.UI.Key.esc) { a.stopPropagation(); a.preventDefault(); this.hide() } }, _element_onclick: function () { var a = this; if (!a._enabled) return; if (!a._button) { a.show(); a._popupMouseDown = b } }, _popup_onevent: function (a) { a.stopPropagation(); a.preventDefault() }, _popup_onmousedown: function () { this._popupMouseDown = c }, _popup_onmouseup: function () { var a = this; Sys.Browser.agent === Sys.Browser.Opera && a._blur.get_isPending() && a._blur.cancel(); a._popupMouseDown = b; a.focus() }, _cell_onmouseover: function (d) { d.stopPropagation(); if (Sys.Browser.agent === Sys.Browser.Safari) for (var a = 0; a < this._daysBody.rows.length; a++) for (var c = this._daysBody.rows[a], b = 0; b < c.cells.length; b++) Sys.UI.DomElement.removeCssClass(c.cells[b].firstChild.parentNode, p); var e = d.target; Sys.UI.DomElement.addCssClass(e.parentNode, p) }, _cell_onmouseout: function (a) { a.stopPropagation(); var b = a.target; Sys.UI.DomElement.removeCssClass(b.parentNode, p) }, _cell_onclick: function (d) { var a = this; d.stopPropagation(); d.preventDefault(); if (!a._enabled) return; var b = d.target; if (b.parentNode.className.indexOf(e) != -1) return; var f = a._getEffectiveVisibleDate(); Sys.UI.DomElement.removeCssClass(b.parentNode, p); switch (b.mode) { case "prev": case "next": a._switchMonth(b.date); break; case "title": switch (a._mode) { case k: a._switchMode(i); break; case i: a._switchMode(m) } break; case "month": if (b.month == f.getUTCMonth()) a._switchMode(k); else { a._visibleDate = b.date; a._switchMode(k) } break; case "year": if (b.date.getFullYear() == f.getFullYear()) a._switchMode(i); else { a._visibleDate = b.date; a._switchMode(i) } break; case "day": a.set_selectedDate(b.date); a._switchMonth(b.date); a._blur.post(c); a.raiseDateSelectionChanged(); break; case "today": a.set_selectedDate(b.date); a._switchMonth(b.date); a._blur.post(c); a.raiseDateSelectionChanged() } }, _button_onclick: function (c) { var a = this; c.preventDefault(); c.stopPropagation(); if (!a._enabled) return; if (c.clientX == 0) return; if (!a._isOpen) a.show(); else a.hide(); a.focus(); a._popupMouseDown = b; if (a._visibleDate != a._selectedDate) { a._visibleDate = a._selectedDate; a.invalidate() } }, _button_onblur: function () { var a = this; if (!a._enabled) return; !a._popupMouseDown && a.hide(); a._popupMouseDown = b }, _button_onkeypress: function (a) { if (!this._enabled) return; if (a.charCode == Sys.UI.Key.esc) { a.stopPropagation(); a.preventDefault(); this.hide() } this._popupMouseDown = b } }; Sys.Extended.UI.CalendarBehavior.registerClass("Sys.Extended.UI.CalendarBehavior", Sys.Extended.UI.BehaviorBase); Sys.registerComponent(Sys.Extended.UI.CalendarBehavior, { name: "calendar" }); Sys.Extended.UI.CalendarPosition = function () { throw Error.invalidOperation(); }; Sys.Extended.UI.CalendarPosition.prototype = { BottomLeft: 0, BottomRight: 1, TopLeft: 2, TopRight: 3, Right: 4, Left: 5 }; Sys.Extended.UI.CalendarPosition.registerEnum("Sys.Extended.UI.CalendarPosition"); Sys.Extended.UI.CalendarDefaultView = function () { throw Error.invalidOperation(); }; Sys.Extended.UI.CalendarDefaultView.prototype = { Days: 0, Months: 1, Years: 2 }; Sys.Extended.UI.CalendarDefaultView.registerEnum("Sys.Extended.UI.CalendarDefaultView") } if (window.Sys && Sys.loader) Sys.loader.registerScript(b, ["Globalization", "ExtendedBase", "ExtendedDateTime", "ExtendedThreading", "ExtendedAnimationBehavior", "ExtendedPopup"], a); else a() })();
//END Calendar.CalendarBehavior.js
//START MaskedEdit.MaskedEditValidator.js
// (c) 2010 CodePlex Foundation
function MaskedEditSetMessage(a, b, c) { a.errormessage = b; if (c == "") a.text = b; else a.text = c; a.innerHTML = a.text } function MaskedEditMessageShow(a, b) { if (typeof a.display == "string") { if (a.display == "None") return; if (a.display == "Dynamic") { a.style.display = b ? "none" : "inline"; return } } a.style.visibility = b ? "hidden" : "visible" } function MaskedEditSetCssClass(b, c) { var a = $get(b.TargetValidator); Sys.UI.DomElement.removeCssClass(a, b.InvalidValueCssClass); Sys.UI.DomElement.removeCssClass(a, b.CssBlurNegative); Sys.UI.DomElement.removeCssClass(a, b.CssFocus); Sys.UI.DomElement.removeCssClass(a, b.CssFocusNegative); c != "" && Sys.UI.DomElement.addCssClass(a, c) } function MaskedEditValidatorDateTime(a) { var f = false, d = true, b = ""; MaskedEditSetMessage(a, b, b); MaskedEditSetCssClass(a, b); MaskedEditMessageShow(a, d); if (a.IsMaskedEdit == "false") return d; var e = $get(a.TargetValidator); if (a.ValidEmpty == "false") if (Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e).get_Value() == a.InitialValue) { MaskedEditSetMessage(a, a.EmptyValueMessage, a.EmptyValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass); MaskedEditMessageShow(a, f); return f } if (Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e).get_Value() == b) return d; var c = d, g = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e).get_Value(); if (a.ValidationExpression != b) { var p = new RegExp(a.ValidationExpression), h = p.exec(g); c = h != null && g == h[0]; if (!c) { MaskedEditSetMessage(a, a.InvalidValueMessage, a.InvalidValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass); MaskedEditMessageShow(a, f); return f } } var m = e.MaskedEditBehavior.AutoFormatDate(), n = e.MaskedEditBehavior.AutoFormatTime(), k = b, l = b; if (a.MinimumValue != b) { k = a.MinimumValue.split(" ")[0]; l = a.MinimumValue.split(" ")[1] } var i = b, j = b; if (a.MaximumValue != b) { i = a.MaximumValue.split(" ")[0]; j = a.MaximumValue.split(" ")[1] } c = MaskedEditValidatorPartDate(a, m, k, i); if (c) c = MaskedEditValidatorPartTime(a, n, l, j); if (c && a.ClientValidationFunction != b) { var o = { Value: g, IsValid: d }; eval(a.ClientValidationFunction + "(value, args);"); c = o.IsValid; if (!c) { MaskedEditSetMessage(a, a.InvalidValueMessage, a.InvalidValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass) } } !c && MaskedEditMessageShow(a, c); return c } function MaskedEditValidatorPartTime(b, n, h, g) { var a = 10, e = -1, x = "([0-5][0-9])\\s(", w = "([0-5][0-9])", k = true, j = b.TimeSeparator, y = b.AmPmSymbol, v = y.split(";"), z = y.replace(";", "|"), A = "^(^([0][0-9]|[1][0-2])" + j + w + j + x + z + ")$)|(^([0][0-9]|[1][0-2])" + j + x + z + ")$)$", B = "^(^([0-1][0-9]|[2][0-3])" + j + w + j + "([0-5][0-9])$)|(^([0-1][0-9]|[2][0-3])" + j + "([0-5][0-9])$)$", f = e, p = e, s = e, r = "", q = n.split(j), t = new RegExp(A), l = t.exec(n), u = new RegExp(B), m = u.exec(n); if (l && l[0] == n) { r = n.substring(n.length - 2).substring(0, 1); f = parseInt(q[0], a); if (r.toUpperCase() == v[1].substring(0, 1).toUpperCase()) { f += 12; if (f == 24) f = 12 } p = parseInt(q[1], a); s = b.length > 9 ? parseInt(q[2].substring(0, 2), a) : 0 } else if (m && m[0] == n) { f = parseInt(q[0], a); p = parseInt(q[1], a); s = n.length > 5 ? parseInt(q[2], a) : 0 } if (f == e || p == e || s == e) k = false; if (!k) { MaskedEditSetMessage(b, b.InvalidValueMessage, b.InvalidValueText); MaskedEditSetCssClass(b, b.InvalidValueCssClass) } if (k && (g != "" || h != "")) { var c, i, o, d; if (h != "") { c = e; i = e; o = e; d = h.split(j); l = t.exec(h); m = u.exec(h); if (l && l[0] == h) { r = h.substring(h.length - 2).substring(0, 1); c = parseInt(d[0], a); if (r.toUpperCase() == v[1].substring(0, 1).toUpperCase()) { c += 12; if (c == 24) c = 0 } i = parseInt(d[1], a); o = h.length > 9 ? parseInt(d[2].substring(0, 2), a) : 0 } else if (m && m[0] == h) { c = parseInt(d[0], a); i = parseInt(d[1], a); o = h.length > 5 ? parseInt(d[2], a) : 0 } k = f > c || f == c && p > i || f == c && p == i && s >= o; if (!k) { MaskedEditSetMessage(b, b.MinimumValueMessage, b.MinimumValueText); MaskedEditSetCssClass(b, b.InvalidValueCssClass) } } if (g != "" && k) { c = e; i = e; o = e; d = g.split(j); l = t.exec(g); m = u.exec(g); if (l && l[0] == g) { r = g.substring(g.length - 2).substring(0, 1); c = parseInt(d[0], a); if (r.toUpperCase() == v[1].substring(0, 1).toUpperCase()) { c += 12; if (c == 24) c = 0 } i = parseInt(d[1], a); o = g.length > 9 ? parseInt(d[2].substring(0, 2), a) : 0 } else if (m && m[0] == g) { c = parseInt(d[0], a); i = parseInt(d[1], a); o = g.length > 5 ? parseInt(d[2], a) : 0 } k = f < c || f == c && p < i || f == c && p == i && s <= o; if (!k) { MaskedEditSetMessage(b, b.MaximumValueMessage, b.MaximumValueText); MaskedEditSetCssClass(b, b.InvalidValueCssClass) } } } return k } function MaskedEditValidatorPartDate(a, p, o, n) { var e = 10, c = true, b = "MDY"; switch (a.DateFormat) { case "DayMonthYear": b = "DMY"; break; case "DayYearMonth": b = "DYM"; break; case "MonthDayYear": b = "MDY"; break; case "MonthYearDay": b = "MYD"; break; case "YearDayMonth": b = "YDM"; break; case "YearMonthDay": b = "YMD" } var m = a.DateSeparator, l = p.split(m); if (parseInt(l.length, e) != 3) { MaskedEditSetMessage(a, a.InvalidValueMessage, a.InvalidValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass); c = false } if (b.indexOf("D") == -1 || b.indexOf("M") == -1 || b.indexOf("Y") == -1) { MaskedEditSetMessage(a, a.InvalidValueMessage, a.InvalidValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass); c = false } var k = -1, i = -1, d = -1; if (c) { k = parseInt(l[b.indexOf("D")], e); i = parseInt(l[b.indexOf("M")], e); d = parseInt(l[b.indexOf("Y")], e); c = k > 0 && i > 0 && d > 0 && (k <= ([, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31])[i] || k == 29 && i == 2 && d % 4 == 0 && (d % 100 > 0 || d % 400 == 0)) } if (!c) { MaskedEditSetMessage(a, a.InvalidValueMessage, a.InvalidValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass) } if (c && (n != "" || o != "")) { var g, j = -1, h = -1, f = -1; if (o != "") { g = o.split(m); j = parseInt(g[b.indexOf("D")], e); h = parseInt(g[b.indexOf("M")], e); f = parseInt(g[b.indexOf("Y")], e); c = j > 0 && h > 0 && f > 0 && d > f || d == f && i > h || d == f && i == h && k >= j; if (!c) { MaskedEditSetMessage(a, a.MinimumValueMessage, a.MinimumValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass) } } if (c && n != "") { g = n.split(m); j = parseInt(g[b.indexOf("D")], e); h = parseInt(g[b.indexOf("M")], e); f = parseInt(g[b.indexOf("Y")], e); c = j > 0 && h > 0 && f > 0 && d < f || d == f && i < h || d == f && i == h && k <= j; if (!c) { MaskedEditSetMessage(a, a.MaximumValueMessage, a.MaximumValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass) } } } return c } function MaskedEditValidatorDate(a) { var d = false, c = true; MaskedEditSetMessage(a, "", ""); MaskedEditSetCssClass(a, ""); MaskedEditMessageShow(a, c); if (a.IsMaskedEdit == "false") return c; var f = $get(a.TargetValidator); if (a.ValidEmpty == "false") if (Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f).get_Value() == a.InitialValue) { MaskedEditSetMessage(a, a.EmptyValueMessage, a.EmptyValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass); MaskedEditMessageShow(a, d); return d } if (Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f).get_Value() == "") return c; var b = c, e = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f).get_Value(); if (a.ValidationExpression != "") { var i = new RegExp(a.ValidationExpression), g = i.exec(e); b = g != null && e == g[0]; if (!b) { MaskedEditSetMessage(a, a.InvalidValueMessage, a.InvalidValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass); MaskedEditMessageShow(a, d); return d } } b = MaskedEditValidatorPartDate(a, e, a.MinimumValue, a.MaximumValue); if (b && a.ClientValidationFunction != "") { var h = { Value: e, IsValid: c }; eval(a.ClientValidationFunction + "(value, args);"); b = h.IsValid; if (!b) { MaskedEditSetMessage(a, a.InvalidValueMessage, a.InvalidValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass) } } !b && MaskedEditMessageShow(a, b); return b } function MaskedEditValidatorTime(a) { var d = false, c = true; MaskedEditSetMessage(a, "", ""); MaskedEditSetCssClass(a, ""); MaskedEditMessageShow(a, c); if (a.IsMaskedEdit == "false") return c; var f = $get(a.TargetValidator); if (a.ValidEmpty == "false") if (Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f).get_Value() == a.InitialValue) { MaskedEditSetMessage(a, a.EmptyValueMessage, a.EmptyValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass); MaskedEditMessageShow(a, d); return d } if (Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f).get_Value() == "") return c; var b = c, e = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f).get_Value(); if (a.ValidationExpression != "") { var i = new RegExp(a.ValidationExpression), g = i.exec(e); b = g != null && e == g[0]; if (!b) { MaskedEditSetMessage(a, a.InvalidValueMessage, a.InvalidValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass); MaskedEditMessageShow(a, d); return d } } b = MaskedEditValidatorPartTime(a, e, a.MinimumValue, a.MaximumValue); if (b && a.ClientValidationFunction != "") { var h = { Value: e, IsValid: c }; eval(a.ClientValidationFunction + "(value, args);"); b = h.IsValid; if (!b) { MaskedEditSetMessage(a, a.InvalidValueMessage, a.InvalidValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass) } } !b && MaskedEditMessageShow(a, b); return b } function MaskedEditValidatorNumber(a) { var d = null, i = false, j = true, e = ""; MaskedEditSetMessage(a, e, e); MaskedEditSetCssClass(a, e); MaskedEditMessageShow(a, j); if (a.IsMaskedEdit == "false") return j; var p = $get(a.TargetValidator), o = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(p).get_Value().replace(new RegExp("([w_.,s$ ])", "g"), e); if (a.ValidEmpty == "false") if (o == a.InitialValue) { MaskedEditSetMessage(a, a.EmptyValueMessage, a.EmptyValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass); MaskedEditMessageShow(a, i); return i } if (o == e) return j; var c = j, r = a.Thousands, q = a.Decimal, m = a.Money, u = a.LastMaskPosition + m.length + 1, g = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(p).get_Value(); if (a.ValidationExpression != e) { var t = new RegExp(a.ValidationExpression), n = t.exec(g); c = n != d && g == n[0]; if (!c) { MaskedEditSetMessage(a, a.InvalidValueMessage, a.InvalidValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass); MaskedEditMessageShow(a, i); return i } } c = i; var k = d, l = d, f = d, h = d, b = d; g = g.replace(new RegExp("(\\" + r + ")", "g"), e); g = g.replace(new RegExp("(\\" + m + ")", "g"), e); f = g.match(/^\s*(\S+(\s+\S+)*)\s*$/); if (f != d) g = f[1]; l = /^\s*[-\+]?\d+\s*$/; if (g.match(l) != d) { h = parseInt(g, 10); c = h == (isNaN(h) ? d : h) } if (c) { if (a.MaximumValue != e) { b = parseInt(a.MaximumValue, 10); if (b == (isNaN(b) ? d : b)) if (h > b) { c = i; MaskedEditSetMessage(a, a.MaximumValueMessage, a.MaximumValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass) } } if (c && a.MinimumValue != e) { b = parseInt(a.MinimumValue, 10); if (b == (isNaN(b) ? d : b)) if (h < b) { c = i; MaskedEditSetMessage(a, a.MinimumValueMessage, a.MinimumValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass) } } } else { l = new RegExp("^\\s*([-\\+])?(\\d+)?(\\" + q + "(\\d+))?\\s*$"); f = g.match(l); if (f != d) { k = d; if (typeof f[1] != "undefined") k = f[1] + (f[2].length > 0 ? f[2] : "0") + "." + f[4]; else k = (f[2].length > 0 ? f[2] : "0") + "." + f[4]; h = parseFloat(k); c = h == (isNaN(h) ? d : h) } if (!c) { MaskedEditSetMessage(a, a.InvalidValueMessage, a.InvalidValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass) } if (c) { if (a.MaximumValue != e) { b = parseFloat(a.MaximumValue); if (b == (isNaN(b) ? d : b)) if (h > b) { c = i; MaskedEditSetMessage(a, a.MaximumValueMessage, a.MaximumValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass) } } if (c && a.MinimumValue != e) { b = parseFloat(a.MinimumValue); if (b == (isNaN(b) ? d : b)) if (h < b) { c = i; MaskedEditSetMessage(a, a.MinimumValueMessage, a.MinimumValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass) } } } } if (c && a.ClientValidationFunction != e) { var s = { Value: g, IsValid: j }; eval(a.ClientValidationFunction + "(value, args);"); c = s.IsValid; if (!c) { MaskedEditSetMessage(a, a.InvalidValueMessage, a.InvalidValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass) } } !c && MaskedEditMessageShow(a, c); return c } function MaskedEditValidatorNone(a) { var e = null, d = false, f = true; MaskedEditSetMessage(a, "", ""); MaskedEditSetCssClass(a, ""); MaskedEditMessageShow(a, f); if (a.IsMaskedEdit == "false") return f; var h = $get(a.TargetValidator); if (a.ValidEmpty == "false") if (Sys.Extended.UI.TextBoxWrapper.get_Wrapper(h).get_Value() == a.InitialValue) { MaskedEditSetMessage(a, a.EmptyValueMessage, a.EmptyValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass); MaskedEditMessageShow(a, d); return d } if (Sys.Extended.UI.TextBoxWrapper.get_Wrapper(h).get_Value() == "") return f; var b = f, g = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(h).get_Value(); if (a.ValidationExpression != "") { var l = new RegExp(a.ValidationExpression), i = l.exec(g); b = i != e && g == i[0]; if (!b) { MaskedEditSetMessage(a, a.InvalidValueMessage, a.InvalidValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass); MaskedEditMessageShow(a, d); return d } } var j = /^\d+\s*$/, c = e; if (a.MaximumValue != "") if (a.MaximumValue.match(j) != e) { c = parseInt(a.MaximumValue, 10); if (c == (isNaN(c) ? e : c)) if (g.length > c) { b = d; MaskedEditSetMessage(a, a.MaximumValueMessage, a.MaximumValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass) } } if (b && a.MinimumValue != "") if (a.MinimumValue.match(j) != e) { c = parseInt(a.MinimumValue, 10); if (c == (isNaN(c) ? e : c)) if (g.length < c) { b = d; MaskedEditSetMessage(a, a.MinimumValueMessage, a.MinimumValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass) } } if (b && a.ClientValidationFunction != "") { var k = { Value: g, IsValid: f }; eval(a.ClientValidationFunction + "(value, args);"); b = k.IsValid; if (!b) { MaskedEditSetMessage(a, a.InvalidValueMessage, a.InvalidValueText); MaskedEditSetCssClass(a, a.InvalidValueCssClass) } } !b && MaskedEditMessageShow(a, b); return b };
//END MaskedEdit.MaskedEditValidator.js
//START MaskedEdit.MaskedEditBehavior.js
// (c) 2010 CodePlex Foundation
(function () { var b = "ExtendedMaskedEdit"; function a() { var v = "string", o = "undefined", A = "YDM", z = "YMD", y = "MYD", x = "DYM", n = "Y", m = "D", w = "DMY", E = "9999", l = "M", e = " ", f = 10, k = "g", i = ")", j = "(\\", B = "px", u = "DivMaskedEditTip_", h = "0", s = "+-", q = "-", D = "change", C = "focus", p = "keypress", r = "keydown", H = "mouseover", G = "mousemove", F = "mouseout", g = null, c = -1, t = "MDY", b = false, d = true, a = ""; Type.registerNamespace("Sys.Extended.UI"); Sys.Extended.UI.MaskedEditBehavior = function (h) { var e = this; Sys.Extended.UI.MaskedEditBehavior.initializeBase(e, [h]); e._Mask = a; e._MaskType = Sys.Extended.UI.MaskedEditType.None; e._Filtered = a; e._PromptChar = "_"; e._InputDirection = Sys.Extended.UI.MaskedEditInputDirections.LeftToRight; e._MessageValidatorTip = d; e._ShowMessageErrorFloat = b; e._CssMessageErrorFloat = a; e._AutoComplete = d; e._AutoCompleteValue = a; e._ClearTextOnInvalid = b; e._ClearMaskOnLostfocus = d; e._AcceptAmPm = Sys.Extended.UI.MaskedEditShowSymbol.None; e._AcceptNegative = Sys.Extended.UI.MaskedEditShowSymbol.None; e._DisplayMoney = Sys.Extended.UI.MaskedEditShowSymbol.None; e._OnFocusCssClass = "MaskedEditFocus"; e._OnInvalidCssClass = "MaskedEditError"; e._OnFocusCssNegative = "MaskedEditFocusNegative"; e._OnBlurCssNegative = "MaskedEditBlurNegative"; e._CultureName = Sys.CultureInfo.CurrentCulture.name; e._UserDateFormat = Sys.Extended.UI.MaskedEditUserDateFormat.None; e._UserTimeFormat = Sys.Extended.UI.MaskedEditUserTimeFormat.None; e._CultureDatePlaceholder = Sys.CultureInfo.CurrentCulture.dateTimeFormat.DateSeparator; e._CultureTimePlaceholder = Sys.CultureInfo.CurrentCulture.dateTimeFormat.TimeSeparator; e._CultureDecimalPlaceholder = Sys.CultureInfo.CurrentCulture.numberFormat.NumberDecimalSeparator; e._CultureThousandsPlaceholder = Sys.CultureInfo.CurrentCulture.numberFormat.NumberGroupSeparator; e._CultureDateFormat = t; var f = Sys.CultureInfo.CurrentCulture.dateTimeFormat.ShortDatePattern.split(e._CultureDatePlaceholder); if (f.length >= 3) e._CultureDateFormat = f[0].substr(0, 1).toUpperCase() + f[1].substr(0, 1).toUpperCase() + f[2].substr(0, 1).toUpperCase(); e._CultureCurrencySymbolPlaceholder = Sys.CultureInfo.CurrentCulture.numberFormat.CurrencySymbol; e._CultureAMPMPlaceholder = Sys.CultureInfo.CurrentCulture.dateTimeFormat.PMDesignator + ";" + Sys.CultureInfo.CurrentCulture.dateTimeFormat.PMDesignator; e._AMPMPlaceholderSeparator = ";"; e._Century = 1900; e._AllowCopyPaste = d; e._ClipboardText = Sys.Extended.UI.Resources && Sys.Extended.UI.Resources.Shared_BrowserSecurityPreventsPaste || "Your browser security settings don't permit the automatic execution of paste operations. Please use the keyboard shortcut Ctrl+V instead."; e._CharsEditMask = "9L$CAN?"; e._CharsSpecialMask = "/:.,"; e._MaskConv = a; e._EmptyMask = a; e._maskvalid = a; e._DirectSelText = a; e._initialvalue = a; e._LogicSymbol = a; e._LogicTextMask = a; e._LogicMask = a; e._LogicMaskConv = a; e._LogicPrompt = String.fromCharCode(1); e._LogicEscape = String.fromCharCode(2); e._LogicFirstPos = c; e._LogicLastPos = c; e._LogicLastInt = c; e._LogicDateTimeSepPos = c; e._QtdValidInput = 0; e._InLostfocus = b; e._ExternalMessageError = a; e._CurrentMessageError = a; e._FiringOnChange = b; e._ErroOnEnter = b; e._beforeClearMaskText = a; e._charLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; e._charNumbers = "0123456789"; e._charEscape = "\\"; e._DelimitStartDup = "{"; e._DelimitEndDup = "}"; e._focusHandler = g; e._keypressdown = g; e._keypressHandler = g; e._blurHandler = g; e._mouseOutHandler = g; e._mouseOutHandler = g; e._mouseMoveHandler = g; e._mouseEnterHandler = g; e._changeHandler = g; e._timer = g; e._timerHandler = g; e._SaveSymb = a; e._SaveText = a; e._SavePosi = c; e._SaveMask = a; e._SaveKeyDown = 0 }; Sys.Extended.UI.MaskedEditBehavior.prototype = { initialize: function () { var e = this, f = e.get_element(); e._InLostfocus = d; Sys.Extended.UI.MaskedEditBehavior.callBaseMethod(e, "initialize"); e._createMask(); var h = b, i = e.get_ClientState(); if (i != g && i != a) { h = i == "Focused"; e.set_ClientState(g) } try { if (f === document.activeElement) h = d } catch (l) { } if (e._ShowMessageErrorFloat) { e._mouseOutHandler = Function.createDelegate(e, e._onMouseOut); $addHandler(f, F, e._mouseOutHandler); e._mouseMoveHandler = Function.createDelegate(e, e._onMouseMove); $addHandler(f, G, e._mouseMoveHandler); e._mouseEnterHandler = Function.createDelegate(e, e._onMouseover); $addHandler(f, H, e._mouseEnterHandler) } if (!f.readOnly) { e._keypressdown = Function.createDelegate(e, e._onKeyPressdown); $addHandler(f, r, e._keypressdown); e._keypressHandler = Function.createDelegate(e, e._onKeyPress); $addHandler(f, p, e._keypressHandler) } e._focusHandler = Function.createDelegate(e, e._onFocus); $addHandler(f, C, e._focusHandler); e._blurHandler = Function.createDelegate(e, e._onBlur); $addHandler(f, "blur", e._blurHandler); e._changeHandler = Function.createDelegate(e, e._onChange); $addHandler(f, D, e._changeHandler); if (Sys.Browser.agent == Sys.Browser.Opera) { e._timerHandler = Function.createDelegate(e, e._OnTimerTicket); e._timer = new Sys.Timer; e._timer.set_enabled(b); e._timer.set_interval(100); e._timer.add_tick(e._timerHandler); e._SaveText = a; e._SavePosi = c; e._timer.set_enabled(d) } var j = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f); e._InitValue(j.get_Value(), d); if (h) e._onFocus(); else { e._ClearMaskOnLostfocus && j.set_Value(e._getClearMask(j.get_Value())); var k = e._CaptureServerValidators(); if (!k) e._OnInvalidCssClass != a && e.AddCssClassMaskedEdit(e._OnInvalidCssClass) } }, dispose: function () { var a = this, c = a.get_element(); if (a._mouseOutHandler) { $removeHandler(c, F, a._mouseOutHandler); a._mouseOutHandler = g } if (a._mouseMoveHandler) { $removeHandler(c, G, a._mouseMoveHandler); a._mouseMoveHandler = g } if (a._mouseEnterHandler) { $removeHandler(c, H, a._mouseEnterHandler); a._mouseEnterHandler = g } if (a._focusHandler) { $removeHandler(c, C, a._focusHandler); a._focusHandler = g } if (a._focusHandler) { $removeHandler(c, C, a._focusHandler); a._focusHandler = g } if (a._blurHandler) { $removeHandler(c, "blur", a._blurHandler); a._blurHandler = g } if (a._changeHandler) { $removeHandler(c, D, a._changeHandler); a._changeHandler = g } if (a._keypressdown) { $removeHandler(c, r, a._keypressdown); a._keypressdown = g } if (a._keypressHandler) { $removeHandler(c, p, a._keypressHandler); a._keypressHandler = g } if (a._timerHandler) { a._timer.set_enabled(b); a._timerHandler = g; a._timer.dispose(); a._timer = g } Sys.Extended.UI.MaskedEditBehavior.callBaseMethod(a, "dispose") }, _OnTimerTicket: function () { var e = this; e._SaveSymb = a; if (e._InLostfocus) return; e._timer.set_enabled(b); var f = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e.get_element()); if (e._SaveText != a) { f.set_Value(e._SaveText); e.setSelectionRange(e._SavePosi, e._SavePosi); e._SaveText = a; e._SavePosi = c; e._SaveMask = f.get_Value() } else { f.get_Value().length != e._EmptyMask.length && f.set_Value(e._SaveMask); e._timer.get_interval() != 100 && e._timer.set_interval(100) } e._timer.set_enabled(d) }, _onChange: function () { !this._FiringOnChange && this._onFocus() }, _onFocus: function () { var e = this, f = e.get_element(); if (f.readOnly || f.disabled) return; if (!e._keypressdown) { e._keypressdown = Function.createDelegate(e, e._onKeyPressdown); $addHandler(f, r, e._keypressdown) } if (!e._keypressHandler) { e._keypressHandler = Function.createDelegate(e, e._onKeyPress); $addHandler(f, p, e._keypressHandler) } e._InLostfocus = b; e._RemoveDivToolTip(); e._OnFocusCssClass != a && e.AddCssClassMaskedEdit(e._OnFocusCssClass); var h = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f); e._initialvalue = h.get_Value(); e._InitValue(h.get_Value(), b); var g = e._getClearMask(), i = b; if (e._MessageValidatorTip && g == a) i = d; if ((e._MaskType == Sys.Extended.UI.MaskedEditType.Time || e._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) && e.get_CultureAMPMPlaceholder() != a && g == a) e._AcceptAmPm && e.InsertAMPM(e.get_CultureAMPMPlaceholder().substring(0, 1)); else if (e._MaskType == Sys.Extended.UI.MaskedEditType.Number && g != a) e._LogicSymbol == q && e._OnFocusCssNegative != a && e.AddCssClassMaskedEdit(e._OnFocusCssNegative); if (e._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.RightToLeft) if (e._LogicLastInt != c) e.setSelectionRange(e._LogicLastInt, e._LogicLastInt); else e.setSelectionRange(e._LogicLastPos + 1, e._LogicLastPos + 1); else if (e._MaskType == Sys.Extended.UI.MaskedEditType.Number && g != a) { var j = e._getLastEmptyPosition() + 1; e.setSelectionRange(j, j) } else e.setSelectionRange(e._LogicFirstPos, e._LogicFirstPos); e.ShowTooltipMessage(b); i && e.ShowTooltipMessage(d) }, _PeforformValidLostFocus: function (g) { var c = this, e = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(c.get_element()), d = c._getClearMask(e.get_Value()); d == a && c._MaskType == Sys.Extended.UI.MaskedEditType.Number && c._LogicSymbol == q && c.InsertSignal("+"); if (d != a && c._AutoComplete && c._MaskType == Sys.Extended.UI.MaskedEditType.Date) c.AutoFormatDate(); else if (d != a && c._AutoComplete && c._MaskType == Sys.Extended.UI.MaskedEditType.Time) c.AutoFormatTime(); else if (d != a && c._AutoComplete && c._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) c.AutoFormatDateTime(); else d != a && c._AutoComplete && c._MaskType == Sys.Extended.UI.MaskedEditType.Number && c.AutoFormatNumber(); if (d != a || g) { c._beforeClearMaskText = e.get_Value(); e.set_Value(c._getClearMask(e.get_Value())) } c.AddCssClassMaskedEdit(a); c._MaskType == Sys.Extended.UI.MaskedEditType.Number && c._LogicSymbol == q && c._OnBlurCssNegative != a && c.AddCssClassMaskedEdit(c._OnBlurCssNegative); c.ShowTooltipMessage(b); c._RemoveDivToolTip(); var f = c._CaptureClientsValidators(); if (!f) { c._OnInvalidCssClass != a && c.AddCssClassMaskedEdit(c._OnInvalidCssClass); if (c._ClearTextOnInvalid) { c._createMask(); e.set_Value(c._EmptyMask) } } return f }, _onBlur: function (f) { var b = this; b._InLostfocus = d; var e = b._PeforformValidLostFocus(d), c = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(b.get_element()); if (e) !b.get_element().readOnly && b._initialvalue != c.get_Value() && f && b._fireChanged(); b._beforeClearMaskText != a && c.set_Value(b._beforeClearMaskText) }, _fireChanged: function () { this._FiringOnChange = d; var a = this.get_element(); if (document.createEventObject) a.fireEvent("onchange"); else if (document.createEvent) { var c = document.createEvent("HTMLEvents"); c.initEvent(D, d, d); a.dispatchEvent(c) } this._FiringOnChange = b }, _onKeyPress: function (l) { var e = this, j = e._KeyCode(l); if (j == 9) return d; if (j == 13) { var m = e._PeforformValidLostFocus(b); e._ErroOnEnter = b; if (!m) e._ErroOnEnter = d; if (Sys.Browser.agent == Sys.Browser.Opera) { var n = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e.get_element()); e._SaveText = n.get_Value(); e._SavePosi = e._getCurrentPosition(); e._timer.set_enabled(b); e._timer.set_interval(1); e._timer.set_enabled(d) } return m } e._OnFocusCssClass != a && e._ErroOnEnter && e.AddCssClassMaskedEdit(e._OnFocusCssClass); e._ErroOnEnter = b; if (!e._isNormalChar(l, j)) { e._ExecuteNav(l, j); return b } var f = e._deleteTextSelection(); if (f == c) f = e._getCurrentPosition(); var g = String.fromCharCode(j); if (e._MaskType == Sys.Extended.UI.MaskedEditType.Date && g == e.get_CultureDatePlaceholder()) e._AdjustElementDate(); else if (e._MaskType == Sys.Extended.UI.MaskedEditType.Time && g == e.get_CultureTimePlaceholder()) e._AdjustElementTime(); else if (e._MaskType == Sys.Extended.UI.MaskedEditType.DateTime && (g == e.get_CultureTimePlaceholder() || g == e.get_CultureDatePlaceholder())) e._AdjustElementDateTime(g); else if (e._MaskType == Sys.Extended.UI.MaskedEditType.Number && e._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.LeftToRight && g == e.get_CultureDecimalPlaceholder() && f == e._LogicLastInt) e._AdjustElementDecimalLTR(); else if (e._MaskType == Sys.Extended.UI.MaskedEditType.Number && e._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.RightToLeft && g == e.get_CultureDecimalPlaceholder() && f == e._LogicLastInt) e._AdjustElementDecimalRTL(); else if (e._MaskType == Sys.Extended.UI.MaskedEditType.Number && g == e.get_CultureDecimalPlaceholder() && f != e._LogicLastInt) e._MoveDecimalPos(); else if (e._MaskType == Sys.Extended.UI.MaskedEditType.Number && e._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.LeftToRight && g == e.get_CultureThousandsPlaceholder()) e._MoveThousandLTR(); else if (e._MaskType == Sys.Extended.UI.MaskedEditType.Number && e._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.RightToLeft && g == e.get_CultureThousandsPlaceholder()) e._MoveThousandRTL(); else if ((e._MaskType == Sys.Extended.UI.MaskedEditType.Time || e._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) && e.get_CultureFirstLettersAMPM().toUpperCase().indexOf(g.toUpperCase()) != c) { if (e._AcceptAmPm) { e.InsertAMPM(g); e.setSelectionRange(f, f) } } else if (e._MaskType == Sys.Extended.UI.MaskedEditType.Number && e._AcceptNegative != Sys.Extended.UI.MaskedEditShowSymbol.None && s.indexOf(g) != c) if (Sys.Browser.agent != Sys.Browser.Opera) { e.InsertSignal(g); e.setSelectionRange(f, f) } else if (e._SaveSymb == a) { e.InsertSignal(g); e.setSelectionRange(f, f); e._SaveSymb = g; e._timer.set_enabled(b); e._timer.set_interval(1); e._timer.set_enabled(d) } else e._SaveSymb = a; else { var p = f; f = e._getNextPosition(f); var i = f; if (e._LogicLastInt != c && e._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.RightToLeft) { if (p == e._LogicLastInt) i = e._getLastEmptyPosition() } else if (f >= e._LogicLastPos + 1 && e._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.RightToLeft) i = e._getLastEmptyPosition(); if (e._processKey(i, g)) { e._MessageValidatorTip && e.ShowTooltipMessage(b); if (e._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.LeftToRight) { e._insertContent(g, i); f = e._getNextPosition(i + 1) } else if (e._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.RightToLeft) if (e._LogicLastInt == c) if (f < e._LogicLastPos + 1) { e._insertContent(g, i); f = e._getNextPosition(i + 1) } else { e._insertContentRight(g); f = e._LogicLastPos + 1 } else if (p != e._LogicLastInt) { e._insertContent(g, i); f = e._getNextPosition(i + 1) } else { var n = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e.get_element()), k = e._getClearMask(n.get_Value()); if (k != a) { var q = k.indexOf(e.get_CultureDecimalPlaceholder()); if (q != c) { var o = k.substring(0, q); if (o == h || o == "-0") { e.setSelectionRange(e._LogicLastInt - 1, e._LogicLastInt); e._deleteTextSelection(); f = e._LogicLastInt; e.setSelectionRange(f, f) } } } if (k == a && g == h) f = e._LogicLastInt; else { e._insertContentRight(g); f = e._LogicLastInt } } e.setSelectionRange(f, f) } } e._SetCancelEvent(l); return b }, _onKeyPressdown: function (c) { var a = this; a._InLostfocus && a._onFocus(c); var e = a._KeyCode(c); if (e == 9) return d; if (e == 13) return d; if (!a._isNormalChar(c, e)) a._ExecuteNav(c, e); else if (Sys.Browser.agent == Sys.Browser.Opera) if (c.rawEvent.shiftKey && !c.rawEvent.ctrlKey && !c.rawEvent.altKey && c.rawEvent.keyCode == 45) { var f = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(a.get_element()); a._SaveText = f.get_Value(); a._SavePosi = a._getCurrentPosition(); a._timer.set_enabled(b); a._timer.set_interval(1); a._timer.set_enabled(d) } }, _onMouseOut: function () { this._RemoveDivToolTip() }, _onMouseMove: function (c) { var b = this; (b._InLostfocus || b._ErroOnEnter) && b._ExternalMessageError != a && b._ShowDivToolTip(c) }, _onMouseover: function (c) { var b = this; !$get(u + b.get_element().id) && b._CaptureServerValidators(); (b._InLostfocus || b._ErroOnEnter) && b._ExternalMessageError != a && b._createDivToolTip(c, b._ExternalMessageError) }, _ShowDivToolTip: function (d) { var a = this, b = $get(u + a.get_element().id); if (!b) { a._createDivToolTip(d, a._ExternalMessageError); b = $get(u + a.get_element().id) } var c = a._GetMousePos(d); b.style.left = c.x + 1 + B; b.style.top = c.y + 1 + B }, _GetMousePos: function (b) { var a = "number", c = 0, d = 0; if (typeof window.pageYOffset == a) { d = window.pageYOffset; c = window.pageXOffset } else if (document.body && (document.body.scrollLeft || document.body.scrollTop)) { d = document.body.scrollTop; c = document.body.scrollLeft } else if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) { d = document.documentElement.scrollTop; c = document.documentElement.scrollLeft } var e = 0, f = 0; if (typeof b.pageX == a) { e = b.pageX; f = b.pageY } else if (typeof b.clientX == a) { e = b.clientX; f = b.clientY } return { x: e + c, y: f + d } }, _RemoveDivToolTip: function () { var a = $get(u + this.get_element().id); a && document.body.removeChild(a) }, _createDivToolTip: function (e, f) { var c = this, g = $get(u + c.get_element().id); if (!g) { var b, d = c._GetMousePos(e); b = document.createElement("div"); b.id = u + c.get_element().id; b.style.position = "absolute"; b.style.left = d.x + 2 + B; b.style.top = d.y + 2 + B; b.style.zIndex = 99999; if (c._CssMessageErrorFloat == a) { b.style.padding = "3px 3px 3px 3px"; b.style.border = "Solid 1px #000000"; b.style.backgroundColor = "#FFFFEA"; b.style.fontWeight = "normal"; b.style.fontSize = "12px"; b.style.fontFamily = "Arial" } else b.className = c._CssMessageErrorFloat; b.innerHTML = f; b = document.body.insertBefore(b, document.body.firstChild) } }, _ExecuteNav: function (g, h) { var e = this; if (g.type == r) if (Sys.Browser.agent == Sys.Browser.InternetExplorer) { if ((h == 86 || h == 118) && !g.shiftKey && g.ctrlKey && !g.altKey) { e._SetCancelEvent(g); e._PasteFromClipBoard(); return } if (g.shiftKey && !g.ctrlKey && !g.altKey && g.keyCode == 45) { e._SetCancelEvent(g); e._PasteFromClipBoard(); return } } if (Sys.Browser.agent != Sys.Browser.InternetExplorer || g.type == p) { if (g.rawEvent.shiftKey && !g.rawEvent.ctrlKey && !g.rawEvent.altKey && g.rawEvent.keyCode == 45) { e._SetCancelEvent(g); e._PasteFromClipBoard(); return } if (g.type == p && (h == 86 || h == 118) && !g.shiftKey && g.ctrlKey && !g.altKey) { e._SetCancelEvent(g); e._PasteFromClipBoard(); return } } var f; if (Sys.Browser.agent == Sys.Browser.InternetExplorer || g.type == p || Sys.Browser.agent != Sys.Browser.Firefox && g.type == r) if (h == 8) { e._SetCancelEvent(g); f = e._deleteTextSelection(); if (f != c) e.setSelectionRange(f, f); else { f = e._getCurrentPosition(); e._backspace(f); f = e._getPreviousPosition(f - 1); e.setSelectionRange(f, f) } var n = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e.get_element()); e._MessageValidatorTip && n.get_Value() == e._EmptyMask && e.ShowTooltipMessage(d); if (Sys.Browser.agent == Sys.Browser.Opera) { e._SaveText = n.get_Value(); e._SavePosi = f; e._timer.set_enabled(b); e._timer.set_interval(1); e._timer.set_enabled(d) } } else if (h == 46 || h == 127) { e._SetCancelEvent(g); var n = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e.get_element()); f = e._deleteTextSelection(); if (f == c) { f = e._getCurrentPosition(); if (!e._isValidMaskedEditPosition(f)) if (f != e._LogicLastInt && e._InputDirection != Sys.Extended.UI.MaskedEditInputDirections.RightToLeft) f = e._getNextPosition(f); e._deleteAtPosition(f, b) } else if (e._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.RightToLeft) { var l = e._getClearMask(n.get_Value()); if (l != a) { l = l.replace(new RegExp(j + e.get_CultureThousandsPlaceholder() + i, k), a) + a; if (l.substring(l.length - 1, l.length) == e.get_CultureDecimalPlaceholder()) { l = l.substring(0, l.length - 1); e.loadValue(l, e._LogicLastInt) } else e.loadValue(l, e._LogicLastPos) } } e.setSelectionRange(f, f); e._MessageValidatorTip && n.get_Value() == e._EmptyMask && e.ShowTooltipMessage(d); if (Sys.Browser.agent == Sys.Browser.Opera) { e._SaveText = n.get_Value(); e._SavePosi = f; e._timer.set_enabled(b); e._timer.set_interval(1); e._timer.set_enabled(d) } } else if (g.ctrlKey) { if (h == 39 || h == 35 || h == 34) { e._DirectSelText = "R"; if (Sys.Browser.agent == Sys.Browser.Opera) return; e._SetCancelEvent(g); f = e._getCurrentPosition(); e.setSelectionRange(f, e._LogicLastPos + 1) } else if (h == 37 || h == 36 || h == 33) { e._DirectSelText = "L"; if (Sys.Browser.agent == Sys.Browser.Opera) return; e._SetCancelEvent(g); f = e._getCurrentPosition(); e.setSelectionRange(e._LogicFirstPos, f) } } else if (h == 35 || h == 34) { e._DirectSelText = "R"; if (Sys.Browser.agent == Sys.Browser.Opera) return; e._SetCancelEvent(g); if (g.shiftKey) { f = e._getCurrentPosition(); e.setSelectionRange(f, e._LogicLastPos + 1) } else e.setSelectionRange(e._LogicLastPos + 1, e._LogicLastPos + 1) } else if (h == 36 || h == 33) { e._DirectSelText = "L"; if (Sys.Browser.agent == Sys.Browser.Opera) return; e._SetCancelEvent(g); if (g.shiftKey) { f = e._getCurrentPosition(); e.setSelectionRange(e._LogicFirstPos, f) } else e.setSelectionRange(e._LogicFirstPos, e._LogicFirstPos) } else if (h == 37) { e._DirectSelText = "L"; if (Sys.Browser.agent == Sys.Browser.Opera) return; e._SetCancelEvent(g); if (g.shiftKey) { var m = e._GetBoundSelection(); if (m) { if (m.left > e._LogicFirstPos) m.left--; e.setSelectionRange(m.left, m.right) } else { var o = e._getCurrentPosition(); o > e._LogicFirstPos && e.setSelectionRange(o - 1, o) } } else { f = e._getCurrentPosition() - 1; if (f < e._LogicFirstPos) f = e._LogicFirstPos; e.setSelectionRange(f, f) } if (Sys.Browser.agent == Sys.Browser.Opera) { var n = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e.get_element()); e._SaveText = n.get_Value(); e._SavePosi = f; e._timer.set_enabled(b); e._timer.set_interval(1); e._timer.set_enabled(d) } } else if (h == 39) { e._DirectSelText = "R"; if (Sys.Browser.agent == Sys.Browser.Opera) return; e._SetCancelEvent(g); if (g.shiftKey) { var m = e._GetBoundSelection(); if (m) { if (m.right < e._LogicLastPos + 1) m.right++; e.setSelectionRange(m.left, m.right) } else { o = e._getCurrentPosition(); o < e._LogicLastPos + 1 && e.setSelectionRange(o, o + 1) } } else { f = e._getCurrentPosition() + 1; if (f > e._LogicLastPos + 1) f = e._LogicLastPos + 1; e.setSelectionRange(f, f) } if (Sys.Browser.agent == Sys.Browser.Opera) { var n = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e.get_element()); e._SaveText = n.get_Value(); e._SavePosi = f; e._timer.set_enabled(b); e._timer.set_interval(1); e._timer.set_enabled(d) } } else if (h == 27) { e._SetCancelEvent(g); var n = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e.get_element()); if (e._EmptyMask == e._initialvalue) n.set_Value(a); else n.set_Value(e._initialvalue); e._onFocus() } e._SetCancelEvent(g) }, _backspace: function (a) { var c = this, e = b; if (a > c._LogicFirstPos) { var f = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(c.get_element()), g = f.get_Value(); a = c._getPreviousPosition(a - 1); c._deleteAtPosition(a, d); e = d } return e }, _deleteAtPosition: function (p, D) { var g = this, y = b, x = g._LogicLastPos + 1; if (g._LogicLastInt != c && g._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.RightToLeft) x = g._LogicLastInt; var t = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(g.get_element()); if (D == b && g._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.RightToLeft && p == x) { var l = g._getClearMask(t.get_Value()); if (l != a) { y = d; l = l.replace(new RegExp(j + g.get_CultureThousandsPlaceholder() + i, k), a) + a; if (l.substring(l.length - 1, l.length) == g.get_CultureDecimalPlaceholder()) l = l.substring(0, l.length - 1); var r = l.split(g.get_CultureDecimalPlaceholder()); if (g._LogicLastInt != c && r[0] != a) { r[0] = r[0].substring(0, r[0].length - 1); l = r[0]; if (r.length = 2) l += g.get_CultureDecimalPlaceholder() + r[1] } else l = l.substring(0, l.length - 1); l += g._LogicSymbol; g.loadValue(l, x) } } else { var h = t.get_Value().substring(g._LogicFirstPos, g._LogicLastPos + 1), m = g._LogicTextMask.substring(g._LogicFirstPos, g._LogicLastPos + 1), q = 0, u = p - g._LogicFirstPos; if (g._isValidMaskedEditPosition(p)) { y = d; if (g._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) { var o = g._SplitDateTime(h), B = p - g._LogicFirstPos; if (B > o[0].length) { h = o[1]; q = o[0].length + 1; m = m.substring(q); u -= q } else { h = o[0]; m = m.substring(0, o[0].length) } } var v = h.substring(u + 1), w = m.substring(u + 1); h = h.substring(0, u) + g._PromptChar; m = m.substring(0, u) + g._LogicPrompt; for (var n = 0; n < parseInt(v.length, f) ; n++) if (g._isValidMaskedEditPosition(p + 1 + n)) { h += g._PromptChar; m += g._LogicPrompt } else { h += v.substring(n, n + 1); m += w.substring(n, n + 1) } var s = g._getNextPosition(p); for (n = 0; n < parseInt(v.length, f) ; n++) if (g._isValidMaskedEditPosition(p + 1 + n) && w.substring(n, n + 1) != g._LogicPrompt) { h = h.substring(0, s - g._LogicFirstPos - q) + v.substring(n, n + 1) + h.substring(s + 1 - g._LogicFirstPos - q); m = m.substring(0, s - g._LogicFirstPos - q) + w.substring(n, n + 1) + m.substring(s + 1 - g._LogicFirstPos - q); s = g._getNextPosition(s + 1) } if (g._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) { var C = t.get_Value().substring(g._LogicFirstPos, g._LogicLastPos + 1), A = g._LogicTextMask.substring(g._LogicFirstPos, g._LogicLastPos + 1), o = g._SplitDateTime(C), B = p - g._LogicFirstPos; if (B > o[0].length) { h = o[0] + e + h; m = A.substring(0, q) + m } else { h = h + e + o[1]; m = m + A.substring(o[0].length) } } var z = t.get_Value(); h = z.substring(0, g._LogicFirstPos) + h + z.substring(g._LogicLastPos + 1); g._LogicTextMask = g._LogicTextMask.substring(0, g._LogicFirstPos) + m + g._LogicTextMask.substring(g._LogicLastPos + 1); t.set_Value(h) } } return y }, _SplitDateTime: function (a) { var b = this, c = []; if (a.charAt(b._LogicDateTimeSepPos) == e) { c[0] = a.substring(b._LogicFirstPos, b._LogicDateTimeSepPos); c[1] = a.substring(b._LogicDateTimeSepPos + 1) } else c[0] = a; return c }, _ShowModalClipBoardInput: function () { return prompt(this._ClipboardText, a) }, _PasteFromClipBoard: function () { var e = this, j = g, f, v = c, u = c; if (Sys.Browser.agent == Sys.Browser.InternetExplorer) j = window.clipboardData.getData("Text"); else { var n = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e.get_element()), p = n.get_Value(), k = e._GetBoundSelection(), f = e._getCurrentPosition(), q = e._AutoComplete, t = e._ClearTextOnInvalid, r = e._ClearMaskOnLostfocus, w = e._DirectSelText; e._AutoComplete = b; e._ClearTextOnInvalid = b; e._ClearMaskOnLostfocus = b; j = e._ShowModalClipBoardInput(); e._AutoComplete = q; e._ClearTextOnInvalid = t; e._ClearMaskOnLostfocus = r; n.set_Value(p); if (k) e.setSelectionRange(k.left, k.right); else e.setSelectionRange(f, f) } if (j == g || j == a) return; if (j.length > e._maskvalid.length) j = j.substring(0, e._maskvalid.length); f = e._deleteTextSelection(); if (f == c) { f = e._getCurrentPosition(); if (k) f = k.left } e.setSelectionRange(f, f); var m = b; if (e._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.RightToLeft && e._LogicLastInt != c) m = d; for (var l = 0, l = 0; l < j.length; l++) { var i = j.substring(l, l + 1), h = f; if (m) h = e._getLastEmptyPosition(); if ((e._MaskType == Sys.Extended.UI.MaskedEditType.Time || e._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) && e.get_CultureFirstLettersAMPM().toUpperCase().indexOf(i.toUpperCase()) != c) { if (e._AcceptAmPm) { e.InsertAMPM(i); e.setSelectionRange(f, f) } } else if (e._MaskType == Sys.Extended.UI.MaskedEditType.Number && e._AcceptNegative != Sys.Extended.UI.MaskedEditShowSymbol.None && s.indexOf(i) != c) { e.InsertSignal(i); e.setSelectionRange(f, f) } else { var o = f; f = e._getNextPosition(f); var h = f; if (e._LogicLastInt != c && e._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.RightToLeft) { if (o == e._LogicLastInt) h = e._getLastEmptyPosition() } else if (f >= e._LogicLastPos + 1 && e._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.RightToLeft) h = e._getLastEmptyPosition(); if (e._processKey(h, i)) { e._MessageValidatorTip && e.ShowTooltipMessage(b); if (e._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.LeftToRight) { e._insertContent(i, h); f = e._getNextPosition(h + 1) } else if (e._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.RightToLeft) if (e._LogicLastInt == c) if (f < e._LogicLastPos + 1) { e._insertContent(i, h); f = e._getNextPosition(h + 1) } else { e._insertContentRight(i); f = e._LogicLastPos + 1 } else if (o != e._LogicLastInt) { e._insertContent(i, h); f = e._getNextPosition(h + 1) } else { e._insertContentRight(i); f = e._LogicLastInt } e.setSelectionRange(f, f) } } } m && e.setSelectionRange(e._LogicLastInt, e._LogicLastInt) }, _MoveDecimalPos: function () { var b = this, g = b.get_element(), e = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(g), a = b._LogicFirstPos, f = b._LogicLastPos, d = c; while (a < f) { if (e.get_Value().substring(a, a + 1) == b.get_CultureDecimalPlaceholder()) { d = a; break } a++ } if (d == c) return; b.setSelectionRange(d, d) }, _MoveThousandLTR: function () { var b = this, h = b.get_element(), f = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(h), g = b._getCurrentPosition(), e = b._LogicLastPos, a = g + 1, d = c; while (a < e) { if (f.get_Value().substring(a, a + 1) == b.get_CultureThousandsPlaceholder()) { d = a; break } a++ } if (d == c) { var a = 0; e = g; while (a < e) { if (f.get_Value().substring(a, a + 1) == b.get_CultureThousandsPlaceholder()) { d = a; break } a++ } if (d == c) return } b.setSelectionRange(d, d) }, _MoveThousandRTL: function () { var b = this, h = b.get_element(), f = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(h), g = b._getCurrentPosition(), e = b._LogicFirstPos, a = g - 1, d = c; while (a > e) { if (f.get_Value().substring(a, a + 1) == b.get_CultureThousandsPlaceholder()) { d = a; break } a-- } if (d == c) { a = b._LogicLastPos; e = g; while (a > e) { if (f.get_Value().substring(a, a + 1) == b.get_CultureThousandsPlaceholder()) { d = a; break } a-- } if (d == c) return } b.setSelectionRange(d, d) }, _AdjustElementDecimalLTR: function () { var b = this, p = b.get_element(), g = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(p), m = b._getCurrentPosition(); if (g.get_Value().substring(m).indexOf(b.get_CultureDecimalPlaceholder()) == c) return; var l = g.get_Value().substring(b._LogicFirstPos, b._LogicLastPos + 1), e = l.indexOf(b.get_CultureDecimalPlaceholder()); if (e == c) return; var d, f = b._getClearMask(g.get_Value()); if (f != a) { f = f.replace(new RegExp(j + b.get_CultureThousandsPlaceholder() + i, k), a) + a; d = f.split(b.get_CultureDecimalPlaceholder()) } else d = b.get_CultureDecimalPlaceholder().split(b.get_CultureDecimalPlaceholder()); if (d[0] == a) d[0] = h; var o = l.length - e - 1; while (d[1].length < o) d[1] += h; var n = b._InputDirection; b._InputDirection = Sys.Extended.UI.MaskedEditInputDirections.RightToLeft; b.loadValue(d[0] + b.get_CultureDecimalPlaceholder() + d[1], b._LogicLastPos); b._InputDirection = n; e += b._LogicFirstPos + 1; b.setSelectionRange(e, e) }, _AdjustElementDecimalRTL: function () { var b = this, g = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(b.get_element()), l = g.get_Value().substring(b._LogicFirstPos, b._LogicLastPos + 1), e = l.indexOf(b.get_CultureDecimalPlaceholder()); if (e == c) return; var m = b._getCurrentPosition(); if (e + b._LogicFirstPos >= m) { b._AdjustElementDecimalLTR(); return } var d, f = b._getClearMask(g.get_Value()); if (f != a) { f = f.replace(new RegExp(j + b.get_CultureThousandsPlaceholder() + i, k), a) + a; d = f.split(b.get_CultureDecimalPlaceholder()) } else d = b.get_CultureDecimalPlaceholder().split(b.get_CultureDecimalPlaceholder()); if (d[0] == a) d[0] = h; var o = l.length - e - 1; while (d[1].length < o) d[1] += h; var n = b._InputDirection; b._InputDirection = Sys.Extended.UI.MaskedEditInputDirections.RightToLeft; b.loadValue(d[0] + b.get_CultureDecimalPlaceholder() + d[1], b._LogicLastPos); b._InputDirection = n; e += b._LogicFirstPos + 1; b.setSelectionRange(e, e) }, _AdjustTime: function (c, l) { for (var g = d, e = 0; e < parseInt(c.length, f) ; e++) if (c.substring(e, e + 1) != this._PromptChar) g = b; if (g) return l; var m = c.length; c = c.replace(new RegExp(j + this._PromptChar + i, k), a) + a; while (c.length < m) c = h + c; return c }, _AdjustElementTime: function () { var b = this, o = b.get_element(), n = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(o), g = a, i = b._getCurrentPosition() - b._LogicFirstPos, j = b._maskvalid, c = i + b._LogicFirstPos, d = 0; if (b._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) { d = j.split(e)[0].length + 1; if (i < d) { c = d + b._LogicFirstPos; b.setSelectionRange(c, c); return } j = j.split(e)[1]; i -= d } j = j.split(":"); if (i <= 1) { g = "H"; c = 3 + b._LogicFirstPos + d } else if (i >= 2 && i <= 4 && j.length == 2) { g = l; c = d + b._LogicFirstPos } else if (i >= 2 && i <= 4 && j.length == 3) { g = l; c = 6 + b._LogicFirstPos + d } else if (j.length == 3) { g = "S"; c = d + b._LogicFirstPos } if (g == a) return; var k = n.get_Value().substring(b._LogicFirstPos, b._LogicLastPos + 1); if (b._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) k = b._SplitDateTime(k)[1]; var h = k.split(b.get_CultureTimePlaceholder()), m = b._GetTimeElementText(g), f; if (g == "H") { f = m + b.get_CultureTimePlaceholder() + h[1]; if (h.length == 3) f += b.get_CultureTimePlaceholder() + h[2] } else if (g == l) { f = h[0] + b.get_CultureTimePlaceholder() + m; if (h.length == 3) f += b.get_CultureTimePlaceholder() + h[2] } else if (g == "S") { f = h[0] + b.get_CultureTimePlaceholder() + h[1]; f += b.get_CultureTimePlaceholder() + m } if (b._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) f = n.get_Value().substring(b._LogicFirstPos, d) + f; b.loadMaskValue(f, b._LogicFirstPos, b._LogicSymbol); b.setSelectionRange(c, c) }, _GetTimeElementText: function (g) { var d = this, b, f = d._LogicTextMask.substring(d._LogicFirstPos, d._LogicLastPos + 1); if (d._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) f = f.substring(d._maskvalid.split(e)[0].length + 1); var c = f.split(d.get_CultureTimePlaceholder()); c[0] = c[0].replace(new RegExp(j + d._LogicPrompt + i, k), d._PromptChar) + a; b = c[0].replace(new RegExp(j + d._PromptChar + i, k), a) + a; if (b != a && b.length < 2) { b = h + b; c[0] = b } c[1] = c[1].replace(new RegExp(j + d._LogicPrompt + i, k), d._PromptChar) + a; b = c[1].replace(new RegExp(j + d._PromptChar + i, k), a) + a; if (b != a && b.length < 2) { b = h + b; c[1] = b } if (c.length == 3) { c[2] = c[2].replace(new RegExp(j + d._LogicPrompt + i, k), d._PromptChar) + a; b = c[2].replace(new RegExp(j + d._PromptChar + i, k), a) + a; if (b != a && b.length < 2) { b = h + b; c[2] = b } } return g == "H" ? c[0] : g == l ? c[1] : c[2] }, _AdjustElementDateTime: function (b) { var a = this; b == a.get_CultureDatePlaceholder() && a._AdjustElementDate(); b == a.get_CultureTimePlaceholder() && a._AdjustElementTime() }, _AdjustElementDate: function () { var b = this, u = b.get_element(), p = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(u), k = p.get_Value().substring(b._LogicFirstPos, b._LogicLastPos + 1); if (b._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) k = b._SplitDateTime(k)[0]; var i = k.split(b.get_CultureDatePlaceholder()), g = a, d = b._getCurrentPosition() - b._LogicFirstPos, f = d + b._LogicFirstPos, h = b._maskvalid.indexOf(E) != c ? 2 : 0; if (b.get_CultureDateFormat() == w) if (d <= 1) { g = m; f = 3 + b._LogicFirstPos } else if (d >= 2 && d <= 4) { g = l; f = 6 + b._LogicFirstPos } else { if (d > 8 + h && b._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) { b.setSelectionRange(b._LogicFirstPos, b._LogicFirstPos); return } g = n; f = b._LogicFirstPos } else if (b.get_CultureDateFormat() == t) if (d <= 1) { g = l; f = 3 + b._LogicFirstPos } else if (d >= 2 && d <= 4) { g = m; f = 6 + b._LogicFirstPos } else { if (d > 8 + h && b._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) { b.setSelectionRange(b._LogicFirstPos, b._LogicFirstPos); return } g = n; f = b._LogicFirstPos } else if (b.get_CultureDateFormat() == x) if (d <= 1) { g = m; f = 3 + b._LogicFirstPos } else if (d >= 2 && d <= 4 + h) { g = n; f = 6 + h + b._LogicFirstPos } else { g = l; f = b._LogicFirstPos } else if (b.get_CultureDateFormat() == y) if (d <= 1) { g = l; f = 3 + b._LogicFirstPos } else if (d >= 2 && d <= 4 + h) { g = n; f = 6 + h + b._LogicFirstPos } else { g = m; f = b._LogicFirstPos } else if (b.get_CultureDateFormat() == z) if (d <= 1 + h) { g = n; f = 3 + h + b._LogicFirstPos } else if (d >= 2 + h && d <= 4 + h) { g = l; f = 6 + h + b._LogicFirstPos } else { g = m; f = b._LogicFirstPos } else if (b.get_CultureDateFormat() == A) if (d <= 1 + h) { g = n; f = 3 + h + b._LogicFirstPos } else if (d >= 2 + h && d <= 4 + h) { g = m; f = 6 + h + b._LogicFirstPos } else { g = l; f = b._LogicFirstPos } var r = b._GetDateElementText(g); i[b.get_CultureDateFormat().indexOf(g)] = r; var o = i[0] + b.get_CultureDatePlaceholder() + i[1] + b._CultureDatePlaceholder + i[2]; if (b._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) { var s = p.get_Value().substring(b._LogicFirstPos, b._LogicLastPos + 1), q = b._SplitDateTime(s), j = q[1].split(e); if (j.length == 2) o += e + j[0] + e + j[1]; else o += e + q[1] } b.loadMaskValue(o, b._LogicFirstPos, b._LogicSymbol); b.setSelectionRange(f, f) }, _GetDateElementText: function (p) { var e = this, f, g; if (e._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) { var o = e._SplitDateTime(e._LogicTextMask.substring(e._LogicFirstPos, e._LogicLastPos + 1))[0]; g = o.split(e.get_CultureDatePlaceholder()) } else g = e._LogicTextMask.substring(e._LogicFirstPos, e._LogicLastPos + 1).split(e.get_CultureDatePlaceholder()); g[e.get_CultureDateFormat().indexOf(m)] = g[e.get_CultureDateFormat().indexOf(m)].replace(new RegExp(j + e._LogicPrompt + i, k), e._PromptChar) + a; f = g[e.get_CultureDateFormat().indexOf(m)].replace(new RegExp(j + e._PromptChar + i, k), a) + a; if (f != a && f.length < 2) { f = h + f; g[e.get_CultureDateFormat().indexOf(m)] = f } g[e.get_CultureDateFormat().indexOf(l)] = g[e.get_CultureDateFormat().indexOf(l)].replace(new RegExp(j + e._LogicPrompt + i, k), e._PromptChar) + a; f = g[e.get_CultureDateFormat().indexOf(l)].replace(new RegExp(j + e._PromptChar + i, k), a) + a; if (f != a && f.length < 2) { f = h + f; g[e.get_CultureDateFormat().indexOf(l)] = f } var q = e._maskvalid.indexOf(E) != c ? d : b; g[e.get_CultureDateFormat().indexOf(n)] = g[e.get_CultureDateFormat().indexOf(n)].replace(new RegExp(j + e._LogicPrompt + i, k), e._PromptChar) + a; f = g[e.get_CultureDateFormat().indexOf(n)].replace(new RegExp(j + e._PromptChar + i, k), a) + a; if (q) { if (f != a && f.length < 4) { f = e._Century.toString().substr(0, f.length) + f; g[e.get_CultureDateFormat().indexOf(n)] = f } } else if (f != a && f.length < 2) { f = h + f; g[e.get_CultureDateFormat().indexOf(n)] = f } return g[e.get_CultureDateFormat().indexOf(p)] }, _GetBoundSelection: function () { var d = g, b = this.get_element(); if (b.setSelectionRange) { if (b.selectionStart != b.selectionEnd) d = { left: parseInt(b.selectionStart, f), right: parseInt(b.selectionEnd, f) } } else if (document.selection) { var c = document.selection.createRange(); if (c.text != a) { var j = parseInt(c.text.length, f); c.text = String.fromCharCode(3) + c.text; var e = b.createTextRange(); e.findText(String.fromCharCode(3)); e.select(); var i = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(b), h = parseInt(i.get_Value().indexOf(String.fromCharCode(3)), f); document.selection.clear(); d = { left: h, right: h + j } } } return d }, _deleteTextSelection: function () { var g = this, e = g.get_element(), m = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e), j = m.get_Value(), k = c, h = c, n = b; if (e.setSelectionRange) { if (e.selectionStart != e.selectionEnd) { var r = parseInt(e.selectionStart, f), q = parseInt(e.selectionEnd, f); n = d; k = q - r; h = e.selectionStart; e.selectionEnd = e.selectionStart } } else if (document.selection) { var o = document.selection.createRange(); if (o.text != a) { n = d; var l = o.text + String.fromCharCode(3); o.text = l; var p = e.createTextRange(); p.findText(l); p.select(); h = m.get_Value().indexOf(l); document.selection.clear(); k = parseInt(l.length, f) - 1 } } if (n) { for (var i = 0; i < k; i++) if (g._isValidMaskedEditPosition(h + i)) { j = j.substring(0, h + i) + g._PromptChar + j.substring(h + i + 1); g._LogicTextMask = g._LogicTextMask.substring(0, h + i) + g._LogicPrompt + g._LogicTextMask.substring(h + i + 1) } m.set_Value(j); if (g._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.RightToLeft) h += k } g._DirectSelText = a; return h }, _isNormalChar: function (a, f) { var e = this, c = d; if (Sys.Browser.agent == Sys.Browser.Opera && a.type == r) e._SaveKeyDown = f; if (f < 32) c = b; else if (Sys.Browser.agent != Sys.Browser.InternetExplorer || a.type == r) switch (f) { case 33: if (typeof a.rawEvent.which != o && a.rawEvent.which != g) if (a.rawEvent.which == 0) c = b; break; case 34: if (typeof a.rawEvent.which != o && a.rawEvent.which != g) if (a.rawEvent.which == 0) c = b; break; case 35: if (Sys.Browser.agent == Sys.Browser.Opera && a.type == p) { if (e._SaveKeyDown == 35) c = b } else c = b; break; case 36: if (Sys.Browser.agent == Sys.Browser.Opera && a.type == p) { if (e._SaveKeyDown == 36) c = b } else c = b; break; case 37: if (typeof a.rawEvent.which != o && a.rawEvent.which != g) if (a.rawEvent.which == 0) c = b; break; case 38: if (typeof a.rawEvent.which != o && a.rawEvent.which != g) if (a.rawEvent.which == 0) c = b; break; case 39: if (typeof a.rawEvent.which != o && a.rawEvent.which != g) if (a.rawEvent.which == 0) c = b; break; case 40: if (typeof a.rawEvent.which != o && a.rawEvent.which != g) if (a.rawEvent.which == 0) c = b; break; case 45: if (typeof a.rawEvent.which != o && a.rawEvent.which != g && Sys.Browser.agent != Sys.Browser.Opera) { if (a.rawEvent.which == 0) c = b } else if (Sys.Browser.agent == Sys.Browser.Opera) c = d; else c = b; break; case 86: case 118: if (!a.rawEvent.shiftKey && a.rawEvent.ctrlKey && !a.rawEvent.altKey) c = b; break; case 46: if (typeof a.rawEvent.which != o && a.rawEvent.which != g && Sys.Browser.agent != Sys.Browser.Opera) { if (a.rawEvent.which == 0) c = b } else if (Sys.Browser.agent == Sys.Browser.Opera && a.type == p) { if (e._SaveKeyDown == 127) c = b } else c = b; break; case 127: c = b } return c }, _KeyCode: function (b) { var a = 0; if (b.keyIdentifier) if (b.charCode == 63272) a = 46; else if (b.charCode == 63302) a = 45; else if (b.charCode == 63233) a = 40; else if (b.charCode == 63235) a = 39; else if (b.charCode == 63232) a = 38; else if (b.charCode == 63234) a = 37; else if (b.charCode == 63273) a = 36; else if (b.charCode == 63275) a = 35; else if (b.charCode == 63277) a = 34; else if (b.charCode == 63276) a = 33; else if (b.charCode == 3) a = 13; if (a == 0) if (b.charCode) a = b.charCode; if (a == 0) a = b.keyCode; return a }, _InitValue: function (c, d) { var b = this; b._LogicSymbol = a; var f = b.get_element(), e = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f); e.set_Value(b._EmptyMask); if (c == b._EmptyMask || c == a) b.loadValue(a, b._LogicFirstPos); else if (b._MaskType == Sys.Extended.UI.MaskedEditType.Date && c != a) c = b.ConvFmtDate(c, d); else if (b._MaskType == Sys.Extended.UI.MaskedEditType.Time && c != a) c = b.ConvFmtTime(c, d); else if (b._MaskType == Sys.Extended.UI.MaskedEditType.DateTime && c != a) c = b.ConvFmtDateTime(c, d); else if (b._MaskType == Sys.Extended.UI.MaskedEditType.Number && c != a) c = b.ConvFmtNumber(c, d); if (b._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.LeftToRight && c != a) if (b._MaskType == Sys.Extended.UI.MaskedEditType.Number) { b._InputDirection = Sys.Extended.UI.MaskedEditInputDirections.RightToLeft; b.loadValue(c, b._LogicLastPos); b._InputDirection = Sys.Extended.UI.MaskedEditInputDirections.LeftToRight } else b.loadValue(c, b._LogicFirstPos); else b._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.RightToLeft && c != a && b.loadValue(c, b._LogicLastPos); if (b._MaskType == Sys.Extended.UI.MaskedEditType.Number) b._InLostfocus && b._LogicSymbol == q && b._OnBlurCssNegative != a && b.AddCssClassMaskedEdit(b._OnBlurCssNegative) }, loadMaskValue: function (g, d, e) { var a = this; a._createMask(); var i = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(a.get_element()); i.set_Value(a._EmptyMask); if ((a._MaskType == Sys.Extended.UI.MaskedEditType.Time || a._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) && a.get_CultureFirstLettersAMPM().toUpperCase().indexOf(e.toUpperCase().substring(0, 1)) != c) a._AcceptAmPm && a.InsertAMPM(e.toUpperCase().substring(0, 1)); else a._MaskType == Sys.Extended.UI.MaskedEditType.Number && a._AcceptNegative != Sys.Extended.UI.MaskedEditShowSymbol.None && s.indexOf(e) != c && a.InsertSignal(e); for (var b = 0, b = 0; b < parseInt(g.length, f) ; b++) { var h = g.substring(b + d, b + d + 1); a._processKey(d + b, h) && a._insertContent(h, d + b) } }, loadValue: function (i, b) { var a = this, d; a._createMask(); var j = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(a.get_element()); j.set_Value(a._EmptyMask); if (a._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.LeftToRight) for (d = 0; d < parseInt(i.length, f) ; d++) { var g = i.substring(d, d + 1); if ((a._MaskType == Sys.Extended.UI.MaskedEditType.Time || a._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) && a.get_CultureFirstLettersAMPM().toUpperCase().indexOf(g.toUpperCase()) != c) a._AcceptAmPm && a.InsertAMPM(g); else a._MaskType == Sys.Extended.UI.MaskedEditType.Number && a._AcceptNegative != Sys.Extended.UI.MaskedEditShowSymbol.None && s.indexOf(g) != c && a.InsertSignal(g); if (a._processKey(b, g)) { a._insertContent(g, b); b = a._getNextPosition(b + 1) } } else if (a._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.RightToLeft) if (b == a._LogicLastInt) { b = a._getPreviousPosition(b); var h = i.split(a.get_CultureDecimalPlaceholder()); for (d = parseInt(h[0].length, f) ; d > 0; d--) { var g = h[0].substring(d - 1, d); a._MaskType == Sys.Extended.UI.MaskedEditType.Number && a._AcceptNegative != Sys.Extended.UI.MaskedEditShowSymbol.None && s.indexOf(g) != c && a.InsertSignal(g); if (a._processKey(b, g)) { a._insertContent(g, b); b = a._getPreviousPosition(b - 1) } } if (h.length > 1) { b = a._getNextPosition(a._LogicLastInt); for (d = 0; d < parseInt(h[1].length, f) ; d++) { var g = h[1].substring(d, d + 1); a._MaskType == Sys.Extended.UI.MaskedEditType.Number && a._AcceptNegative != Sys.Extended.UI.MaskedEditShowSymbol.None && s.indexOf(g) != c && a.InsertSignal(g); if (a._processKey(b, g)) { a._insertContent(g, b); b = a._getNextPosition(b + 1) } } } } else for (d = parseInt(i.length, f) ; d > 0; d--) { var g = i.substring(d - 1, d); if (a._MaskType == Sys.Extended.UI.MaskedEditType.Number && a._AcceptNegative != Sys.Extended.UI.MaskedEditShowSymbol.None && s.indexOf(g) != c) { if (a._LogicSymbol == q) a._LogicSymbol = e; a.InsertSignal(g) } if (a._processKey(b, g)) { a._insertContent(g, b); b = a._getPreviousPosition(b - 1) } } }, AutoFormatNumber: function () { var f = this, e, j = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(f.get_element()); ValueText = j.get_Value(); var i = f._AutoCompleteValue, k = b; for (e = f._LogicFirstPos; e <= f._LogicLastPos; e++) if (f._LogicTextMask.substring(e, e + 1) == f._LogicPrompt) { var g = h; if (i != a) g = i.substring(e - f._LogicFirstPos, e + 1 - f._LogicFirstPos); if (k) { f._LogicTextMask = f._LogicTextMask.substring(0, e) + g + f._LogicTextMask.substring(e + 1); ValueText = ValueText.substring(0, e) + g + ValueText.substring(e + 1) } } else if (f._LogicMask.substring(e, e + 1) == f._LogicPrompt && "123456789".indexOf(f._LogicTextMask.substring(e, e + 1)) != c) k = d; j.set_Value(ValueText); return ValueText }, AutoFormatTime: function () { var g = this, B = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(g.get_element()); ValueText = B.get_Value(); var i = g._AutoCompleteValue; if (i.indexOf(g.get_CultureTimePlaceholder()) == c) i = a; if (g._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) { var C = g._SplitDateTime(ValueText), r = C[1].split(e); if (r.length == 2) ValueText = r[0] + e + r[1]; else ValueText = r[0]; if (i != a) { if (i.indexOf(g.get_CultureDatePlaceholder()) == c) i = e + i; var x = g._SplitDateTime(i), u = x[1].split(e); if (u.length == 2) i = u[0] + e + u[1]; else i = x[0] } } var y = new Date, j = y.getHours().toString(); if (j.length < 2) j = h + j; if (i != a) j = i.substring(0, 2); var s = b, q = b, t = a, k = a, p = a; if (g.get_CultureAMPMPlaceholder() != a) { var z = g.get_CultureAMPMPlaceholder().split(g._AMPMPlaceholderSeparator); t = z[0]; k = z[1]; if (i == a) { var p = t; if (j > 12) { j = (parseInt(j, f) - 12).toString(); if (j.length < 2) j = h + j; p = k } } else { p = t; if (i.indexOf(k) != c) p = k } s = d; if (ValueText.indexOf(k) != c && k != a) q = d; if (!g._AcceptAmPm) { p = a; q = b; s = b } else { var A = d; if (ValueText.substring(0, 1) != g._PromptChar || ValueText.substring(1, 2) != g._PromptChar) A = b; if (A && p != a) { s = d; q = b; if (k == p) q = d } } } var o = y.getMinutes().toString(); if (o.length < 2) o = h + o; if (i != a) o = i.substring(3, 5); var w = "00", l, m; if (g._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) { l = ValueText.substring(0, 2); l = g._AdjustTime(l, j); m = ValueText.substring(3, 5); m = g._AdjustTime(m, o) } else { l = ValueText.substring(g._LogicFirstPos, g._LogicFirstPos + 2); l = g._AdjustTime(l, j); m = ValueText.substring(g._LogicFirstPos + 3, g._LogicFirstPos + 5); m = g._AdjustTime(m, o) } var v = g._maskvalid; if (g._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) v = v.split(e)[1]; if (v == "99:99:99") { if (i != a) w = i.substring(6); var n; if (g._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) { n = ValueText.substring(6, 8); n = g._AdjustTime(n, w) } else { n = ValueText.substring(g._LogicFirstPos + 6, g._LogicFirstPos + 8); n = g._AdjustTime(n, w) } ValueText = l + g.get_CultureTimePlaceholder() + m + g.get_CultureTimePlaceholder() + n } else ValueText = l + g.get_CultureTimePlaceholder() + m; if (q) ValueText += e + k; else if (s) ValueText += e + t; g._MaskType != Sys.Extended.UI.MaskedEditType.DateTime && g.loadValue(ValueText, g._LogicFirstPos); return ValueText }, AutoFormatDateTime: function () { var a = this, b = a.AutoFormatDate(), c = a.AutoFormatTime(); a.loadValue(b + e + c, a._LogicFirstPos); return b + e + c }, AutoFormatDate: function () { var f = this, u = f._GetDateElementText(m).replace(new RegExp(j + f._PromptChar + i, k), a) + a, v = f._GetDateElementText(l).replace(new RegExp(j + f._PromptChar + i, k), a) + a, B = f._GetDateElementText(n).replace(new RegExp(j + f._PromptChar + i, k), a) + a, D = f._maskvalid.indexOf(E) != c ? d : b, r = f._AutoCompleteValue; if (r.indexOf(f.get_CultureDatePlaceholder()) == c) r = a; var p, q, o; if (r == a) { var C = new Date; p = C.getUTCDate().toString(); if (p.length < 2) p = h + p; q = (C.getUTCMonth() + 1).toString(); if (q.length < 2) q = h + q; o = C.getUTCFullYear().toString(); if (!D) o = C.getUTCFullYear().toString().substring(2) } else { var g; if (f._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) { if (r.indexOf(f.get_CultureTimePlaceholder()) == c) r = r + e; var F = f._SplitDateTime(r)[0]; g = F.split(f.get_CultureDatePlaceholder()) } else g = r.split(f.get_CultureDatePlaceholder()); if (f.get_CultureDateFormat() == w) { p = g[0]; q = g[1]; o = g[2] } else if (f.get_CultureDateFormat() == t) { p = g[1]; q = g[0]; o = g[2] } else if (f.get_CultureDateFormat() == x) { p = g[0]; q = g[2]; o = g[1] } else if (f.get_CultureDateFormat() == y) { p = g[2]; q = g[0]; o = g[1] } else if (f.get_CultureDateFormat() == z) { p = g[2]; q = g[1]; o = g[0] } else if (f.get_CultureDateFormat() == A) { p = g[1]; q = g[2]; o = g[0] } if (p.length < 2) p = h + p; if (q.length < 2) q = h + q; if (D) while (o.length < 4) o = h + o; else while (o.length < 2) o = h + o } if (u == a) u = p; if (v == a) v = q; if (B == a) B = o; var s; if (f.get_CultureDateFormat() == w) s = u + f.get_CultureDatePlaceholder() + v + f._CultureDatePlaceholder + B; else if (f.get_CultureDateFormat() == t) s = v + f.get_CultureDatePlaceholder() + u + f._CultureDatePlaceholder + B; else if (f.get_CultureDateFormat() == x) s = u + f.get_CultureDatePlaceholder() + B + f._CultureDatePlaceholder + v; else if (f.get_CultureDateFormat() == y) s = v + f.get_CultureDatePlaceholder() + B + f._CultureDatePlaceholder + u; else if (f.get_CultureDateFormat() == z) s = B + f.get_CultureDatePlaceholder() + v + f._CultureDatePlaceholder + u; else if (f.get_CultureDateFormat() == A) s = B + f.get_CultureDatePlaceholder() + u + f._CultureDatePlaceholder + v; f._MaskType != Sys.Extended.UI.MaskedEditType.DateTime && f.loadValue(s, f._LogicFirstPos); return s }, ConvFmtNumber: function (a) { if (this._maskvalid.split(this.get_CultureDecimalPlaceholder()).length == 2) if (a.substring(a.length - 1, a.length) == this.get_CultureDecimalPlaceholder()) a = a.substring(0, a.length - 1); return a }, ConvFmtTime: function (m, z) { var g = this, y = 0, w = b, x = b, p = a, q = a; if (g.get_CultureAMPMPlaceholder() != a) { p = g.get_CultureAMPMPlaceholder().split(g._AMPMPlaceholderSeparator)[0]; q = g.get_CultureAMPMPlaceholder().split(g._AMPMPlaceholderSeparator)[1] } if (z) { var v = a, u = a; if (g._CultureAMPMPlaceholder != a) { v = g._CultureAMPMPlaceholder.split(g._AMPMPlaceholderSeparator)[0]; u = g._CultureAMPMPlaceholder.split(g._AMPMPlaceholderSeparator)[1] } if (g.get_UserTimeFormat() == Sys.Extended.UI.MaskedEditUserTimeFormat.TwentyFourHour) { m = m.replace(new RegExp(j + v + i, k), a); if (m.indexOf(u) != c) y = 12; m = m.replace(new RegExp(j + u + i, k), a) } } if (m.indexOf(p) != c && p != a) w = d; else if (m.indexOf(q) != c && q != a) x = d; if (p != a) m = m.replace(new RegExp(j + p + i, k), a); if (q != a) m = m.replace(new RegExp(j + q + i, k), a); m = m.replace(new RegExp(j + e + i, k), a); var l = m.split(g.get_CultureTimePlaceholder()), n = g._maskvalid; if (g._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) n = n.split(e)[1]; n = n.split(":"); if (parseInt(l.length, f) < 2 || parseInt(l.length, f) > 3) return a; var o = parseInt(l[0], f) + y; o = o.toString(); if (o.length < n[0].length) while (o.length < n[0].length) o = h + o; l[0] = o; var s = parseInt(l[1], f) + a; if (s.length < n[1].length) while (s.length < n[1].length) s = h + s; l[1] = s; var r = a; if (parseInt(l.length, f) == 3) { var t = parseInt(l[2], f) + a; if (t.length < n[2].length) while (t.length < n[2].length) t = h + t; l[2] = t; r = l[0] + g.get_CultureTimePlaceholder() + l[1] + g.get_CultureTimePlaceholder() + l[2] } else r = l[0] + g.get_CultureTimePlaceholder() + l[1]; if (w) r += e + p; else if (x) r += e + q; return r }, ConvFmtDateTime: function (f, c) { var d = this._SplitDateTime(f), b = d[0], a = d[1]; if (a.split(e).length == 2) a += e + a.split(e)[1]; b = this.ConvFmtDate(b, c); a = this.ConvFmtTime(a, c); return b + e + a }, ConvFmtDate: function (o, p) { var b = this, j, c; if (p) { j = o.split(b.get_CultureDatePlaceholder()); c = o.split(b.get_CultureDatePlaceholder()); if (b.get_UserDateFormat() != Sys.Extended.UI.MaskedEditUserDateFormat.None) { if (b.get_UserDateFormat() == Sys.Extended.UI.MaskedEditUserDateFormat.DayMonthYear) b._CultureDateFormat = w; if (b.get_UserDateFormat() == Sys.Extended.UI.MaskedEditUserDateFormat.DayYearMonth) b._CultureDateFormat = x; if (b.get_UserDateFormat() == Sys.Extended.UI.MaskedEditUserDateFormat.MonthDayYear) b._CultureDateFormat = t; if (b.get_UserDateFormat() == Sys.Extended.UI.MaskedEditUserDateFormat.MonthYearDay) b._CultureDateFormat = y; if (b.get_UserDateFormat() == Sys.Extended.UI.MaskedEditUserDateFormat.YearDayMonth) b._CultureDateFormat = A; if (b.get_UserDateFormat() == Sys.Extended.UI.MaskedEditUserDateFormat.YearMonthDay) b._CultureDateFormat = z; c[b.get_CultureDateFormat().indexOf(m)] = j[b._CultureDateFormat.indexOf(m)]; c[b.get_CultureDateFormat().indexOf(l)] = j[b._CultureDateFormat.indexOf(l)]; c[b.get_CultureDateFormat().indexOf(n)] = j[b._CultureDateFormat.indexOf(n)] } } else c = o.split(b.get_CultureDatePlaceholder()); var d = b._maskvalid; if (b._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) d = d.split(e)[0]; d = d.split("/"); if (parseInt(c.length, f) != 3) return a; var g = parseInt(c[b.get_CultureDateFormat().indexOf(m)], f) + a; if (g.length < d[b.get_CultureDateFormat().indexOf(m)].length) while (g.length < d[b.get_CultureDateFormat().indexOf(m)].length) g = h + g; c[b.get_CultureDateFormat().indexOf(m)] = g; var i = parseInt(c[b.get_CultureDateFormat().indexOf(l)], f) + a; if (i.length < d[b.get_CultureDateFormat().indexOf(l)].length) while (i.length < d[b.get_CultureDateFormat().indexOf(l)].length) i = h + i; c[b.get_CultureDateFormat().indexOf(l)] = i; var k = parseInt(c[b.get_CultureDateFormat().indexOf(n)], f) + a; while (k.length < d[b.get_CultureDateFormat().indexOf(n)].length) k = h + k; c[b.get_CultureDateFormat().indexOf(n)] = k; return c[0] + b.get_CultureDatePlaceholder() + c[1] + b._CultureDatePlaceholder + c[2] }, AddCssClassMaskedEdit: function (d) { var b = this, c = b.get_element(); Sys.UI.DomElement.removeCssClass(c, b._OnBlurCssNegative); Sys.UI.DomElement.removeCssClass(c, b._OnFocusCssClass); Sys.UI.DomElement.removeCssClass(c, b._OnFocusCssNegative); Sys.UI.DomElement.removeCssClass(c, b._OnInvalidCssClass); d != a && Sys.UI.DomElement.addCssClass(c, d) }, _SetCancelEvent: function (a) { if (typeof a.returnValue !== o) a.returnValue = b; if (typeof a.cancelBubble !== o) a.cancelBubble = d; typeof a.preventDefault !== o && a.preventDefault(); typeof a.stopPropagation !== o && a.stopPropagation() }, _CaptureServerValidators: function () { var i = d, e = this._ExternalMessageError; if (typeof Page_Validators != o) for (var c = g, h = d, f = 0; f < Page_Validators.length; f++) { c = Page_Validators[f]; if (typeof c.enabled == o || c.enabled != b) if (c.TargetValidator == this.get_element().id) if (!c.isvalid) { if (h) { h = b; e = a } if (typeof c.errormessage == v) { if (e != a) e += ", "; e += c.errormessage } i = b } } this._ExternalMessageError = e; return i }, _CaptureClientsValidators: function () { var f = d, e = a; this._ExternalMessageError = e; if (typeof Page_Validators != o) for (var c = g, h = 0; h < Page_Validators.length; h++) { c = Page_Validators[h]; if (typeof c.enabled == o || c.enabled != b) if (c.TargetValidator == this.get_element().id) if (typeof c.evaluationfunction == "function") { var j = c.evaluationfunction(c); if (!j) { f = b; if (typeof c.errormessage == v) { if (e != a) e += ", "; e += c.errormessage } } } else if (typeof c.evaluationfunction == v) { var j; eval("crtret = " + c.evaluationfunction + "(" + c.id + i); if (!j) { f = b; if (typeof c.errormessage == v) { if (e != a) e += ", "; e += c.errormessage } } } } this._ExternalMessageError = e; return f }, ShowTooltipMessage: function (e) { var c = this; if (typeof Page_Validators == o) return; var f = a; if (!e) { f = c._CurrentMessageError; c._CurrentMessageError = a } for (var d = 0, b = g, d = 0; d < Page_Validators.length; d++) { b = Page_Validators[d]; if (b.TargetValidator == c.get_element().id && b.IsMaskedEdit == "true") { if (!e) { b.innerHTML = f; if (typeof b.display == v) { if (b.display == "None") return; if (b.display == "Dynamic") { b.style.display = b.isvalid ? "none" : "inline"; return } } return } c._CurrentMessageError = b.innerHTML; b.innerHTML = b.TooltipMessage; if (typeof b.display == v) { if (b.display == "None") return; if (b.display == "Dynamic") { b.style.display = "inline"; return } } b.style.visibility = "visible"; return } } }, _insertContent: function (e, b) { var c = this, d = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(c.get_element()), a = d.get_Value(); a = a.substring(0, b) + e + a.substring(b + 1); c._LogicTextMask = c._LogicTextMask.substring(0, b) + e + c._LogicTextMask.substring(b + 1); d.set_Value(a) }, _insertContentRight: function (n) { var a = this, m = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(a.get_element()), d = m.get_Value(), g = a._getLastEmptyPosition(); if (g < 0) return; var b, i = d.substring(g + 1), k = a._LogicTextMask.substring(g + 1); d = d.substring(0, g) + a._PromptChar; a._LogicTextMask = a._LogicTextMask.substring(0, g) + a._LogicPrompt; var e; if (a._LogicLastInt != c && a._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.RightToLeft) { var h = i.split(a.get_CultureDecimalPlaceholder()), l = k.split(a.get_CultureDecimalPlaceholder()); for (b = 0; b < parseInt(h[0].length, f) ; b++) if (a._isValidMaskedEditPosition(g + 1 + b)) { d += a._PromptChar; a._LogicTextMask += a._LogicPrompt } else { d += h[0].substring(b, b + 1); a._LogicTextMask += l[0].substring(b, b + 1) } if (h.length = 2) { d += a.get_CultureDecimalPlaceholder() + h[1]; a._LogicTextMask += a.get_CultureDecimalPlaceholder() + l[1] } e = a._getNextPosition(g); for (b = 0; b < parseInt(h[0].length, f) ; b++) if (a._isValidMaskedEditPosition(g + 1 + b) && l[0].substring(b, b + 1) != a._LogicPrompt) { d = d.substring(0, e) + h[0].substring(b, b + 1) + d.substring(e + 1); a._LogicTextMask = a._LogicTextMask.substring(0, e) + l[0].substring(b, b + 1) + a._LogicTextMask.substring(e + 1); e = a._getNextPosition(e + 1) } } else { for (b = 0; b < parseInt(i.length, f) ; b++) if (a._isValidMaskedEditPosition(g + 1 + b)) { d += a._PromptChar; a._LogicTextMask += a._LogicPrompt } else { d += i.substring(b, b + 1); a._LogicTextMask += k.substring(b, b + 1) } e = a._getNextPosition(g); for (b = 0; b < parseInt(i.length, f) ; b++) if (a._isValidMaskedEditPosition(g + 1 + b) && k.substring(b, b + 1) != a._LogicPrompt) { d = d.substring(0, e) + i.substring(b, b + 1) + d.substring(e + 1); a._LogicTextMask = a._LogicTextMask.substring(0, e) + k.substring(b, b + 1) + a._LogicTextMask.substring(e + 1); e = a._getNextPosition(e + 1) } } var j = 0; if (a._LogicLastInt != c && a._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.RightToLeft) j = a._LogicLastPos - a._LogicLastInt + 1; d = d.substring(0, a._LogicLastPos - j) + n + d.substring(a._LogicLastPos - j + 1); a._LogicTextMask = a._LogicTextMask.substring(0, a._LogicLastPos - j) + n + a._LogicTextMask.substring(a._LogicLastPos - j + 1); m.set_Value(d) }, InsertAMPM: function (g) { var b = this, f = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(b.get_element()), d = f.get_Value(), e = b.get_CultureAMPMPlaceholder().split(b._AMPMPlaceholderSeparator), c = a; if (e.length == 2) { if (g.toUpperCase() == b.get_CultureFirstLetterAM().toUpperCase()) c = e[0]; else if (g.toUpperCase() == b.get_CultureFirstLetterPM().toUpperCase()) c = e[1]; b._LogicSymbol = c } d = d.substring(0, b._LogicLastPos + 2) + c + d.substring(b._LogicLastPos + 2 + c.length); f.set_Value(d) }, InsertSignal: function (d) { var b = this, f = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(b.get_element()), c = f.get_Value(); if (d == q && b._LogicSymbol == q) d = "+"; if (d == "+") { d = e; b._LogicSymbol = a; if (!b._InLostfocus && b._OnFocusCssClass != a) b.AddCssClassMaskedEdit(b._OnFocusCssClass); else !b._InLostfocus && b.AddCssClassMaskedEdit(a) } else { b._LogicSymbol = q; !b._InLostfocus && b._OnFocusCssNegative != a && b.AddCssClassMaskedEdit(b._OnFocusCssNegative) } if (b._AcceptNegative == Sys.Extended.UI.MaskedEditShowSymbol.Left) c = c.substring(0, b._LogicFirstPos - 1) + d + c.substring(b._LogicFirstPos); else if (b._AcceptNegative == Sys.Extended.UI.MaskedEditShowSymbol.Right) c = c.substring(0, b._LogicLastPos + 1) + d + c.substring(b._LogicLastPos + 2); f.set_Value(c) }, setSelectionRange: function (e, f) { var a = "character", b = this.get_element(); if (b.setSelectionRange) b.setSelectionRange(e, f); else if (b.createTextRange) { var c = b.createTextRange(); c.collapse(d); c.moveEnd(a, f); c.moveStart(a, e); c.select() } }, _getLastEmptyPosition: function () { var a = this, b = a._LogicLastPos; if (a._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.RightToLeft && a._LogicLastInt != c) { var d = a._getCurrentPosition(); if (d <= a._LogicLastInt) b = a._LogicLastInt } while (b >= 0 && a._LogicTextMask.substring(b, b + 1) != a._LogicPrompt) b--; return b }, _isValidMaskedEditPosition: function (a) { return this._LogicMask.substring(a, a + 1) == this._LogicPrompt }, _getNextPosition: function (a) { var b = this; while (!b._isValidMaskedEditPosition(a) && a < b._LogicLastPos + 1) a++; if (a > b._LogicLastPos + 1) a = b._LogicLastPos + 1; return a }, _getPreviousPosition: function (a) { var b = this; while (!b._isValidMaskedEditPosition(a) && a > b._LogicFirstPos) a--; if (a < b._LogicFirstPos) a = b._LogicFirstPos; return a }, _getCurrentPosition: function () { var b = this, c = 0, e = b.get_element(); if (e.setSelectionRange) c = parseInt(e.selectionStart, f); else if (document.selection) { var d = document.selection.createRange(); if (d.text != a) { var g = a; if (b._DirectSelText == "R") g = d.text + String.fromCharCode(3); else if (b._DirectSelText == "L") g = String.fromCharCode(3) + d.text; d.text = g; b._DirectSelText == a } else { d.text = String.fromCharCode(3); b._DirectSelText == a } var h = e.createTextRange(); h.findText(String.fromCharCode(3)); h.select(); var i = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e); c = i.get_Value().indexOf(String.fromCharCode(3)); document.selection.clear() } if (c > b._LogicLastPos + 1) c = b._LogicLastPos + 1; if (c < b._LogicFirstPos) c = b._LogicFirstPos; return c }, _processKey: function (f, j) { var g = this, i = g._LogicMaskConv, h; if (i.substring(f, f + 1) == "9") h = g._charNumbers; else if (i.substring(f, f + 1).toUpperCase() == "L") h = g._charLetters + g._charLetters.toLowerCase(); else if (i.substring(f, f + 1) == "$") h = g._charLetters + g._charLetters.toLowerCase() + e; else if (i.substring(f, f + 1).toUpperCase() == "C") h = g._Filtered; else if (i.substring(f, f + 1).toUpperCase() == "A") h = g._charLetters + g._charLetters.toLowerCase() + g._Filtered; else if (i.substring(f, f + 1).toUpperCase() == "N") h = g._charNumbers + g._Filtered; else if (i.substring(f, f + 1) == "?") h = a; else return b; return h == a ? d : !h || h.length == 0 || h.indexOf(j) != c }, _createMask: function () { var g = this; g._MaskConv == a && g._Mask != a && g._convertMask(); var i = g._MaskConv, h = 0, j = a, k = a, l = b; g._LogicTextMask = a; g._QtdValidInput = 0; while (h < parseInt(i.length, f)) { if (i.substring(h, h + 1) == g._charEscape && l == b) l = d; else if (g._CharsEditMask.indexOf(i.substring(h, h + 1)) == c) if (l == d) { l = b; j += i.substring(h, h + 1); k += i.substring(h, h + 1); g._LogicTextMask += g._LogicEscape } else if (g._CharsSpecialMask.indexOf(i.substring(h, h + 1)) != c) { g._QtdValidInput++; if (i.substring(h, h + 1) == "/") { j += g.get_CultureDatePlaceholder(); k += "/"; g._LogicTextMask += g.get_CultureDatePlaceholder() } else if (i.substring(h, h + 1) == ":") { j += g.get_CultureTimePlaceholder(); k += ":"; g._LogicTextMask += g.get_CultureTimePlaceholder() } else if (i.substring(h, h + 1) == ",") { j += g.get_CultureThousandsPlaceholder(); k += "."; g._LogicTextMask += g.get_CultureThousandsPlaceholder() } else if (i.substring(h, h + 1) == ".") { j += g.get_CultureDecimalPlaceholder(); k += ","; g._LogicTextMask += g.get_CultureDecimalPlaceholder() } } else { j += i.substring(h, h + 1); k += i.substring(h, h + 1); g._LogicTextMask += i.substring(h, h + 1) } else if (l == d) { l = b; j += i.substring(h, h + 1); k += i.substring(h, h + 1); g._LogicTextMask += g._LogicEscape } else { g._QtdValidInput++; j += g._PromptChar; k += i.substring(h, h + 1); g._LogicTextMask += g._LogicPrompt } h++ } g._LogicFirstPos = c; g._LogicLastPos = c; g._LogicLastInt = c; g._LogicMask = g._LogicTextMask; for (h = 0; h < parseInt(g._LogicMask.length, f) ; h++) { if (g._LogicFirstPos == c && g._LogicMask.substring(h, h + 1) == g._LogicPrompt) g._LogicFirstPos = h; if (g._LogicMask.substring(h, h + g.get_CultureDatePlaceholder().length) == g.get_CultureDatePlaceholder()) continue; else if (g._LogicMask.substring(h, h + 1) == e) g._LogicDateTimeSepPos = h; if (g._LogicMask.substring(h, h + 1) == g._LogicPrompt) g._LogicLastPos = h; if (g._MaskType == Sys.Extended.UI.MaskedEditType.Number && g._InputDirection == Sys.Extended.UI.MaskedEditInputDirections.RightToLeft) if (g._LogicMask.substring(h, h + 1) == g.get_CultureDecimalPlaceholder()) g._LogicLastInt = h } g._maskvalid = k.substring(g._LogicFirstPos, g._LogicLastPos + 1); g._EmptyMask = j }, _getClearMask: function () { var c = this, g = 0, i = a, k = 0, j = b; while (g < parseInt(c._LogicTextMask.length, f)) { if (k < c._QtdValidInput) if (c._isValidMaskedEditPosition(g) && c._LogicTextMask.substring(g, g + 1) != c._LogicPrompt) { if (i == a && j) { i += h + c.get_CultureDecimalPlaceholder(); j = b } i += c._LogicTextMask.substring(g, g + 1); k++ } else if (c._LogicTextMask.substring(g, g + 1) != c._LogicPrompt && c._LogicTextMask.substring(g, g + 1) != c._LogicEscape) if (c._LogicTextMask.substring(g, g + c.get_CultureDatePlaceholder().length) == c.get_CultureDatePlaceholder() && (c._MaskType == Sys.Extended.UI.MaskedEditType.Date || c._MaskType == Sys.Extended.UI.MaskedEditType.DateTime)) { i += i == a ? a : c.get_CultureDatePlaceholder(); g += c.get_CultureDatePlaceholder().length - 1 } else if (c._LogicTextMask.substring(g, g + 1) == c.get_CultureTimePlaceholder() && (c._MaskType == Sys.Extended.UI.MaskedEditType.Time || c._MaskType == Sys.Extended.UI.MaskedEditType.DateTime)) i += i == a ? a : c.get_CultureTimePlaceholder(); else if (c._LogicTextMask.substring(g, g + 1) == e && c._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) i += i == a ? a : e; else if (c._LogicTextMask.substring(g, g + 1) == c.get_CultureThousandsPlaceholder() && c._MaskType == Sys.Extended.UI.MaskedEditType.Number) i += i == a ? a : c.get_CultureThousandsPlaceholder(); else if (c._LogicTextMask.substring(g, g + 1) == c.get_CultureDecimalPlaceholder() && c._MaskType == Sys.Extended.UI.MaskedEditType.Number) { i += i == a ? a : c.get_CultureDecimalPlaceholder(); if (i == a) j = d } g++ } if (c._LogicSymbol != a && i != a) if (c._MaskType == Sys.Extended.UI.MaskedEditType.Time || c._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) i += e + c._LogicSymbol; else if (c._MaskType == Sys.Extended.UI.MaskedEditType.Number) i = c._LogicSymbol + i; return i }, _convertMask: function () { var g = this; g._MaskConv = a; for (var j = a, o = a, i = 0; i < parseInt(g._Mask.length, f) ; i++) if (g._CharsEditMask.indexOf(g._Mask.substring(i, i + 1)) != c) { if (j.length == 0) { g._MaskConv += g._Mask.substring(i, i + 1); j = a; o = g._Mask.substring(i, i + 1) } else if (g._Mask.substring(i, i + 1) == "9") j += "9"; else if (g._Mask.substring(i, i + 1) == h) j += h } else if (g._CharsEditMask.indexOf(g._Mask.substring(i, i + 1)) == c && g._Mask.substring(i, i + 1) != g._DelimitStartDup && g._Mask.substring(i, i + 1) != g._DelimitEndDup) { if (j.length == 0) { g._MaskConv += g._Mask.substring(i, i + 1); j = a; o = a } else if (g._charNumbers.indexOf(g._Mask.substring(i, i + 1)) != c) j += g._Mask.substring(i, i + 1) } else if (g._Mask.substring(i, i + 1) == g._DelimitStartDup && j == a) j = h; else if (g._Mask.substring(i, i + 1) == g._DelimitEndDup && j != a) { var q = parseInt(j, f) - 1; if (q > 0) for (var r = 0; r < q; r++) g._MaskConv += o; j = a; o = a } var m = c, l = c, n = b; for (i = 0; i < parseInt(g._MaskConv.length, f) ; i++) if (g._MaskConv.substring(i, i + 1) == g._charEscape && !n) n = d; else if (g._CharsEditMask.indexOf(g._MaskConv.substring(i, i + 1)) != c && !n) { if (m == c) m = i; l = i } else if (n) n = b; if ((g._MaskType == Sys.Extended.UI.MaskedEditType.Time || g._MaskType == Sys.Extended.UI.MaskedEditType.DateTime) && g._AcceptAmPm) { var p = g.get_CultureAMPMPlaceholder().split(g._AMPMPlaceholderSeparator), k = a; if (p.length == 2) { k = g._charEscape + e; for (i = 0; i < parseInt(p[0].length, f) ; i++) k += g._charEscape + e } g._MaskConv = g._MaskConv.substring(0, l + 1) + k + g._MaskConv.substring(l + 1) } else if (g._MaskType == Sys.Extended.UI.MaskedEditType.Number && g._DisplayMoney == Sys.Extended.UI.MaskedEditShowSymbol.Left) { var k = a; for (i = 0; i < parseInt(g.get_CultureCurrencySymbolPlaceholder().length, f) ; i++) if (g._CharsEditMask.indexOf(g.get_CultureCurrencySymbolPlaceholder().substring(i, i + 1)) == c) k += g.get_CultureCurrencySymbolPlaceholder().substring(i, i + 1); else k += g._charEscape + g.get_CultureCurrencySymbolPlaceholder().substring(i, i + 1); k += g._charEscape + e; g._MaskConv = g._MaskConv.substring(0, m) + k + g._MaskConv.substring(m); m += k.length; l += k.length } else if (g._MaskType == Sys.Extended.UI.MaskedEditType.Number && g._DisplayMoney == Sys.Extended.UI.MaskedEditShowSymbol.Right) { var k = g._charEscape + e; for (i = 0; i < parseInt(g.get_CultureCurrencySymbolPlaceholder().length, f) ; i++) if (g._CharsEditMask.indexOf(g.get_CultureCurrencySymbolPlaceholder().substring(i, i + 1)) == c) k += g.get_CultureCurrencySymbolPlaceholder().substring(i, i + 1); else k += g._charEscape + g.get_CultureCurrencySymbolPlaceholder().substring(i, i + 1); g._MaskConv = g._MaskConv.substring(0, l + 1) + k + g._MaskConv.substring(l + 1) } if (g._MaskType == Sys.Extended.UI.MaskedEditType.Number && g._AcceptNegative == Sys.Extended.UI.MaskedEditShowSymbol.Right) g._MaskConv = g._MaskConv.substring(0, l + 1) + g._charEscape + e + g._MaskConv.substring(l + 1); else if (g._MaskType == Sys.Extended.UI.MaskedEditType.Number && g._AcceptNegative == Sys.Extended.UI.MaskedEditShowSymbol.Left) g._MaskConv = g._MaskConv.substring(0, m) + g._charEscape + e + g._MaskConv.substring(m); g._convertMaskNotEscape() }, _convertMaskNotEscape: function () { var c = this; c._LogicMaskConv = a; for (var h = c._MaskConv.replace(/(\/)/g, c.get_CultureDatePlaceholder()), g = b, e = 0; e < parseInt(h.length, f) ; e++) if (h.substring(e, e + 1) == c._charEscape) g = d; else if (!g) c._LogicMaskConv += h.substring(e, e + 1); else { c._LogicMaskConv += c._LogicEscape; g = b } }, get_Mask: function () { var b = this; b._MaskConv == a && b._Mask != a && b._convertMask(); return b._MaskConv }, set_Mask: function (a) { this._Mask = a; this.raisePropertyChanged("Mask") }, get_Filtered: function () { return this._Filtered }, set_Filtered: function (a) { this._Filtered = a; this.raisePropertyChanged("Filtered") }, get_InputDirection: function () { return this._InputDirection }, set_InputDirection: function (a) { this._InputDirection = a; this.raisePropertyChanged("InputDirection") }, get_PromptCharacter: function () { return this._PromptChar }, set_PromptCharacter: function (a) { this._PromptChar = a; this.raisePropertyChanged("PromptChar") }, get_OnFocusCssClass: function () { return this._OnFocusCssClass }, set_OnFocusCssClass: function (a) { this._OnFocusCssClass = a; this.raisePropertyChanged("OnFocusCssClass") }, get_OnInvalidCssClass: function () { return this._OnInvalidCssClass }, set_OnInvalidCssClass: function (a) { this._OnInvalidCssClass = a; this.raisePropertyChanged("OnInvalidCssClass") }, get_CultureName: function () { return this._CultureName }, set_CultureName: function (a) { this._CultureName = a; this.raisePropertyChanged("Culture") }, get_CultureDatePlaceholder: function () { return this._CultureDatePlaceholder }, set_CultureDatePlaceholder: function (a) { this._CultureDatePlaceholder = a; this.raisePropertyChanged("CultureDatePlaceholder") }, get_CultureTimePlaceholder: function () { return this._CultureTimePlaceholder }, set_CultureTimePlaceholder: function (a) { this._CultureTimePlaceholder = a; this.raisePropertyChanged("CultureTimePlaceholder") }, get_CultureDecimalPlaceholder: function () { return this._CultureDecimalPlaceholder }, set_CultureDecimalPlaceholder: function (a) { this._CultureDecimalPlaceholder = a; this.raisePropertyChanged("CultureDecimalPlaceholder") }, get_CultureThousandsPlaceholder: function () { return this._CultureThousandsPlaceholder }, set_CultureThousandsPlaceholder: function (a) { this._CultureThousandsPlaceholder = a; this.raisePropertyChanged("CultureThousandsPlaceholder") }, get_CultureDateFormat: function () { var a = this._CultureDateFormat; switch (this.get_UserDateFormat()) { case Sys.Extended.UI.MaskedEditUserDateFormat.DayMonthYear: a = w; break; case Sys.Extended.UI.MaskedEditUserDateFormat.DayYearMonth: a = x; break; case Sys.Extended.UI.MaskedEditUserDateFormat.MonthDayYear: a = t; break; case Sys.Extended.UI.MaskedEditUserDateFormat.MonthYearDay: a = y; break; case Sys.Extended.UI.MaskedEditUserDateFormat.YearDayMonth: a = A; break; case Sys.Extended.UI.MaskedEditUserDateFormat.YearMonthDay: a = z } return a }, set_CultureDateFormat: function (a) { this._CultureDateFormat = a; this.raisePropertyChanged("CultureDateFormat") }, get_CultureCurrencySymbolPlaceholder: function () { return this._CultureCurrencySymbolPlaceholder }, set_CultureCurrencySymbolPlaceholder: function (a) { this._CultureCurrencySymbolPlaceholder = a; this.raisePropertyChanged("CultureCurrencySymbolPlaceholder") }, get_CultureAMPMPlaceholder: function () { var c = this, b = c._CultureAMPMPlaceholder; if (b.split(c._AMPMPlaceholderSeparator).length != 2 || b == c._AMPMPlaceholderSeparator) b = a; if (c.get_UserTimeFormat() == Sys.Extended.UI.MaskedEditUserTimeFormat.TwentyFourHour) b = a; return b }, set_CultureAMPMPlaceholder: function (a) { this._CultureAMPMPlaceholder = a; this.raisePropertyChanged("CultureAMPMPlaceholder") }, get_CultureFirstLettersAMPM: function () { if (this.get_CultureAMPMPlaceholder() != a) { var b = this.get_CultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator); return b[0].substring(0, 1) + b[1].substring(0, 1) } return a }, get_CultureFirstLetterAM: function () { if (this.get_CultureAMPMPlaceholder() != a) { var b = this.get_CultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator); return b[0].substring(0, 1) } return a }, get_CultureFirstLetterPM: function () { if (this.get_CultureAMPMPlaceholder() != a) { var b = this.get_CultureAMPMPlaceholder().split(this._AMPMPlaceholderSeparator); return b[1].substring(0, 1) } return a }, get_ClearMaskOnLostFocus: function () { return this._ClearMaskOnLostfocus }, set_ClearMaskOnLostFocus: function (a) { this._ClearMaskOnLostfocus = a; this.raisePropertyChanged("ClearMaskOnLostfocus") }, get_MessageValidatorTip: function () { return this._MessageValidatorTip }, set_MessageValidatorTip: function (a) { this._MessageValidatorTip = a; this.raisePropertyChanged("MessageValidatorTip") }, get_AcceptAMPM: function () { return this._AcceptAmPm }, set_AcceptAMPM: function (a) { this._AcceptAmPm = a; this.raisePropertyChanged("AcceptAmPm") }, get_AcceptNegative: function () { return this._AcceptNegative }, set_AcceptNegative: function (a) { this._AcceptNegative = a; this.raisePropertyChanged("AcceptNegative") }, get_DisplayMoney: function () { return this._DisplayMoney }, set_DisplayMoney: function (a) { this._DisplayMoney = a; this.raisePropertyChanged("DisplayMoney") }, get_OnFocusCssNegative: function () { return this._OnFocusCssNegative }, set_OnFocusCssNegative: function (a) { this._OnFocusCssNegative = a; this.raisePropertyChanged("OnFocusCssNegative") }, get_OnBlurCssNegative: function () { return this._OnBlurCssNegative }, set_OnBlurCssNegative: function (a) { this._OnBlurCssNegative = a; this.raisePropertyChanged("OnBlurCssNegative") }, get_Century: function () { return this._Century }, set_Century: function (a) { this._Century = a; this.raisePropertyChanged("Century") }, get_AutoComplete: function () { return this._AutoComplete }, set_AutoComplete: function (a) { this._AutoComplete = a; this.raisePropertyChanged("AutoComplete") }, get_AutoCompleteValue: function () { return this._AutoCompleteValue }, set_AutoCompleteValue: function (a) { this._AutoCompleteValue = a; this.raisePropertyChanged("AutoCompleteValue") }, get_MaskType: function () { return this._MaskType }, set_MaskType: function (a) { this._MaskType = a; this.raisePropertyChanged("MaskType") }, get_ClearTextOnInvalid: function () { return this._ClearTextOnInvalid }, set_ClearTextOnInvalid: function (a) { if (this._ClearTextOnInvalid !== a) { this._ClearTextOnInvalid = a; this.raisePropertyChanged("ClearTextOnInvalid") } }, get_ClipboardText: function () { return this._ClipboardText }, set_ClipboardText: function (a) { this._ClipboardText = a; this.raisePropertyChanged("ClipboardText") }, get_ClipboardEnabled: function () { return this._AllowCopyPaste }, set_ClipboardEnabled: function (a) { this._AllowCopyPaste = a; this.raisePropertyChanged("ClipboardEnabled") }, get_ErrorTooltipEnabled: function () { return this._ShowMessageErrorFloat }, set_ErrorTooltipEnabled: function (a) { this._ShowMessageErrorFloat = a; this.raisePropertyChanged("ErrorTooltipEnabled") }, get_ErrorTooltipCssClass: function () { return this._CssMessageErrorFloat }, set_ErrorTooltipCssClass: function (a) { this._CssMessageErrorFloat = a; this.raisePropertyChanged("ErrorTooltipCssClass") }, get_UserDateFormat: function () { return this._UserDateFormat }, set_UserDateFormat: function (a) { this._UserDateFormat = a; this.raisePropertyChanged("UserDateFormat") }, get_UserTimeFormat: function () { return this._UserTimeFormat }, set_UserTimeFormat: function (a) { this._UserTimeFormat = a; this.raisePropertyChanged("UserTimeFormat") } }; Sys.Extended.UI.MaskedEditBehavior.registerClass("Sys.Extended.UI.MaskedEditBehavior", Sys.Extended.UI.DynamicPopulateBehaviorBase); Sys.registerComponent(Sys.Extended.UI.MaskedEditBehavior, { name: "maskedEdit" }); Sys.Extended.UI.MaskedEditType = function () { throw Error.invalidOperation(); }; Sys.Extended.UI.MaskedEditInputDirections = function () { throw Error.invalidOperation(); }; Sys.Extended.UI.MaskedEditShowSymbol = function () { throw Error.invalidOperation(); }; Sys.Extended.UI.MaskedEditUserDateFormat = function () { throw Error.invalidOperation(); }; Sys.Extended.UI.MaskedEditUserTimeFormat = function () { throw Error.invalidOperation(); }; Sys.Extended.UI.MaskedEditType.prototype = { None: 0, Date: 1, Number: 2, Time: 3, DateTime: 4 }; Sys.Extended.UI.MaskedEditInputDirections.prototype = { LeftToRight: 0, RightToLeft: 1 }; Sys.Extended.UI.MaskedEditShowSymbol.prototype = { None: 0, Left: 1, Right: 2 }; Sys.Extended.UI.MaskedEditUserDateFormat.prototype = { None: 0, DayMonthYear: 1, DayYearMonth: 2, MonthDayYear: 3, MonthYearDay: 4, YearDayMonth: 5, YearMonthDay: 6 }; Sys.Extended.UI.MaskedEditUserTimeFormat.prototype = { None: 0, TwentyFourHour: 1 }; Sys.Extended.UI.MaskedEditType.registerEnum("Sys.Extended.UI.MaskedEditType"); Sys.Extended.UI.MaskedEditInputDirections.registerEnum("Sys.Extended.UI.MaskedEditInputDirections"); Sys.Extended.UI.MaskedEditShowSymbol.registerEnum("Sys.Extended.UI.MaskedEditShowSymbol"); Sys.Extended.UI.MaskedEditUserDateFormat.registerEnum("Sys.Extended.UI.MaskedEditUserDateFormat"); Sys.Extended.UI.MaskedEditUserTimeFormat.registerEnum("Sys.Extended.UI.MaskedEditUserTimeFormat") } if (window.Sys && Sys.loader) Sys.loader.registerScript(b, ["Globalization", "ExtendedBase", "ExtendedTimer", "ExtendedCommon"], a); else a() })();
//END MaskedEdit.MaskedEditBehavior.js
//START AutoComplete.AutoCompleteBehavior.js
// (c) 2010 CodePlex Foundation
(function () { var b = "ExtendedAutoComplete"; function a() { var o = "itemOut", n = "itemOver", m = "itemSelected", l = "hiding", k = "shown", j = "showing", i = "populated", h = "populating", z = "showOnlyCurrentWordInCompletionListItem", y = "completionListElementID", x = "enableCaching", w = "servicePath", v = "serviceMethod", u = "minimumPrefixLength", t = "completionSetCount", s = "completionList", r = "completionInterval", g = "black", f = "white", e = "hidden", q = "mouseover", p = "mousedown", d = "blur", c = true, b = false, a = null; Type.registerNamespace("Sys.Extended.UI"); Sys.Extended.UI.AutoCompleteBehavior = function (e) { var d = this; Sys.Extended.UI.AutoCompleteBehavior.initializeBase(d, [e]); d._servicePath = a; d._serviceMethod = a; d._contextKey = a; d._useContextKey = b; d._minimumPrefixLength = 3; d._completionSetCount = 10; d._completionInterval = 1e3; d._completionListElementID = a; d._completionListElement = a; d._textColor = "windowtext"; d._textBackground = "window"; d._popupBehavior = a; d._popupBehaviorHiddenHandler = a; d._onShowJson = a; d._onHideJson = a; d._timer = a; d._cache = a; d._currentPrefix = a; d._selectIndex = -1; d._focusHandler = a; d._blurHandler = a; d._bodyClickHandler = a; d._completionListBlurHandler = a; d._keyDownHandler = a; d._mouseDownHandler = a; d._mouseUpHandler = a; d._mouseOverHandler = a; d._tickHandler = a; d._enableCaching = c; d._flyoutHasFocus = b; d._textBoxHasFocus = b; d._completionListCssClass = a; d._completionListItemCssClass = a; d._highlightedItemCssClass = a; d._delimiterCharacters = a; d._firstRowSelected = b; d._showOnlyCurrentWordInCompletionListItem = b; d._webRequest = a }; Sys.Extended.UI.AutoCompleteBehavior.prototype = { initialize: function () { var b = this; Sys.Extended.UI.AutoCompleteBehavior.callBaseMethod(b, "initialize"); $common.prepareHiddenElementForATDeviceUpdate(); b._popupBehaviorHiddenHandler = Function.createDelegate(b, b._popupHidden); b._tickHandler = Function.createDelegate(b, b._onTimerTick); b._focusHandler = Function.createDelegate(b, b._onGotFocus); b._blurHandler = Function.createDelegate(b, b._onLostFocus); b._keyDownHandler = Function.createDelegate(b, b._onKeyDown); b._mouseDownHandler = Function.createDelegate(b, b._onListMouseDown); b._mouseUpHandler = Function.createDelegate(b, b._onListMouseUp); b._mouseOverHandler = Function.createDelegate(b, b._onListMouseOver); b._completionListBlurHandler = Function.createDelegate(b, b._onCompletionListBlur); b._bodyClickHandler = Function.createDelegate(b, b._onCompletionListBlur); b._timer = new Sys.Timer; b.initializeTimer(b._timer); var c = b.get_element(); b.initializeTextBox(c); if (b._completionListElementID !== a) b._completionListElement = $get(b._completionListElementID); if (b._completionListElement == a) { b._completionListElement = document.createElement("ul"); b._completionListElement.id = b.get_id() + "_completionListElem"; if (Sys.Browser.agent === Sys.Browser.Safari) document.body.appendChild(b._completionListElement); else c.parentNode.insertBefore(b._completionListElement, c.nextSibling) } b.initializeCompletionList(b._completionListElement); b._popupBehavior = $create(Sys.Extended.UI.PopupBehavior, { id: b.get_id() + "PopupBehavior", parentElement: c, positioningMode: Sys.Extended.UI.PositioningMode.BottomLeft }, a, a, b._completionListElement); b._popupBehavior.add_hidden(b._popupBehaviorHiddenHandler); b._onShowJson && b._popupBehavior.set_onShow(b._onShowJson); b._onHideJson && b._popupBehavior.set_onHide(b._onHideJson) }, dispose: function () { var b = this; b._onShowJson = a; b._onHideJson = a; if (b._popupBehavior) { b._popupBehaviorHiddenHandler && b._popupBehavior.remove_hidden(b._popupBehaviorHiddenHandler); b._popupBehavior.dispose(); b._popupBehavior = a } if (b._timer) { b._timer.dispose(); b._timer = a } var c = b.get_element(); if (c) { $removeHandler(c, "focus", b._focusHandler); $removeHandler(c, d, b._blurHandler); $removeHandler(c, "keydown", b._keyDownHandler); $removeHandler(b._completionListElement, d, b._completionListBlurHandler); $removeHandler(b._completionListElement, p, b._mouseDownHandler); $removeHandler(b._completionListElement, "mouseup", b._mouseUpHandler); $removeHandler(b._completionListElement, q, b._mouseOverHandler) } if (b._bodyClickHandler) { $removeHandler(document.body, "click", b._bodyClickHandler); b._bodyClickHandler = a } b._popupBehaviorHiddenHandler = a; b._tickHandler = a; b._focusHandler = a; b._blurHandler = a; b._keyDownHandler = a; b._completionListBlurHandler = a; b._mouseDownHandler = a; b._mouseUpHandler = a; b._mouseOverHandler = a; Sys.Extended.UI.AutoCompleteBehavior.callBaseMethod(b, "dispose") }, initializeTimer: function (a) { a.set_interval(this._completionInterval); a.add_tick(this._tickHandler) }, initializeTextBox: function (a) { a.autocomplete = "off"; $addHandler(a, "focus", this._focusHandler); $addHandler(a, d, this._blurHandler); $addHandler(a, "keydown", this._keyDownHandler) }, initializeCompletionList: function (c) { var b = this; if (b._completionListCssClass) Sys.UI.DomElement.addCssClass(c, b._completionListCssClass); else { var a = c.style; a.textAlign = "left"; a.visibility = e; a.cursor = "default"; a.listStyle = "none"; a.padding = "0px"; a.margin = "0px! important"; if (Sys.Browser.agent === Sys.Browser.Safari) { a.border = "solid 1px gray"; a.backgroundColor = f; a.color = g } else { a.border = "solid 1px buttonshadow"; a.backgroundColor = b._textBackground; a.color = b._textColor } } $addHandler(c, p, b._mouseDownHandler); $addHandler(c, "mouseup", b._mouseUpHandler); $addHandler(c, q, b._mouseOverHandler); $addHandler(c, d, b._completionListBlurHandler); $addHandler(document.body, "click", b._bodyClickHandler) }, _currentCompletionWord: function () { var b = this, f = b.get_element(), c = f.value, d = c; if (b.get_isMultiWord()) { var a = b._getCurrentWordStartIndex(), e = b._getCurrentWordEndIndex(a); if (e <= a) d = c.substring(a); else d = c.substring(a, e) } return d }, _getCursorIndex: function () { return this.get_element().selectionStart }, _getCurrentWordStartIndex: function () { var a = this; for (var g = a.get_element(), f = g.value.substring(0, a._getCursorIndex()), b = 0, c = -1, d = 0; d < a._delimiterCharacters.length; ++d) { var e = f.lastIndexOf(a._delimiterCharacters.charAt(d)); if (e > c) c = e } b = c; if (b >= a._getCursorIndex()) b = 0; return b < 0 ? 0 : b + 1 }, _getCurrentWordEndIndex: function (d) { for (var e = this.get_element(), f = e.value.substring(d), a = 0, c = 0; c < this._delimiterCharacters.length; ++c) { var b = f.indexOf(this._delimiterCharacters.charAt(c)); if (b > 0 && (b < a || a == 0)) a = b } return a <= 0 ? e.value.length : a + d }, get_isMultiWord: function () { return this._delimiterCharacters != a && this._delimiterCharacters != "" }, _getTextWithInsertedWord: function (d) { var b = this, h = d, j = 0, i = b.get_element(), c = i.value; if (b.get_isMultiWord()) { var a = b._getCurrentWordStartIndex(), e = b._getCurrentWordEndIndex(a), f = "", g = ""; if (a > 0) f = c.substring(0, a); if (e > a) g = c.substring(e); h = f + d + g } return h }, _hideCompletionList: function () { var a = new Sys.CancelEventArgs; this.raiseHiding(a); if (a.get_cancel()) return; this.hidePopup() }, showPopup: function () { this._popupBehavior.show(); this.raiseShown(Sys.EventArgs.Empty) }, hidePopup: function () { if (this._popupBehavior) this._popupBehavior.hide(); else this._popupHidden() }, _popupHidden: function () { var a = this; a._completionListElement.innerHTML = ""; a._selectIndex = -1; a._flyoutHasFocus = b; a.raiseHidden(Sys.EventArgs.Empty) }, _highlightItem: function (d) { var a = this; for (var h = a._completionListElement.childNodes, e = 0; e < h.length; e++) { var b = h[e]; if (b._highlighted) { if (a._completionListItemCssClass) { Sys.UI.DomElement.removeCssClass(b, a._highlightedItemCssClass); Sys.UI.DomElement.addCssClass(b, a._completionListItemCssClass) } else if (Sys.Browser.agent === Sys.Browser.Safari) { b.style.backgroundColor = f; b.style.color = g } else { b.style.backgroundColor = a._textBackground; b.style.color = a._textColor } a.raiseItemOut(new Sys.Extended.UI.AutoCompleteItemEventArgs(b, b.firstChild.nodeValue, b._value)) } } if (a._highlightedItemCssClass) { Sys.UI.DomElement.removeCssClass(d, a._completionListItemCssClass); Sys.UI.DomElement.addCssClass(d, a._highlightedItemCssClass) } else if (Sys.Browser.agent === Sys.Browser.Safari) d.style.backgroundColor = "lemonchiffon"; else { d.style.backgroundColor = "highlight"; d.style.color = "highlighttext" } d._highlighted = c; a.raiseItemOver(new Sys.Extended.UI.AutoCompleteItemEventArgs(d, d.firstChild.nodeValue, d._value)) }, _onCompletionListBlur: function () { this._hideCompletionList() }, _onListMouseDown: function (d) { var a = this; if (d.target !== a._completionListElement) { a._setText(d.target); a._flyoutHasFocus = b } else a._flyoutHasFocus = c }, _onListMouseUp: function () { try { this.get_element().focus() } catch (b) { } }, _onListMouseOver: function (e) { var a = this, c = e.target; if (c !== a._completionListElement) for (var d = a._completionListElement.childNodes, b = 0; b < d.length; ++b) if (c === d[b]) { a._highlightItem(c); a._selectIndex = b; break } }, _onGotFocus: function () { var a = this; a._textBoxHasFocus = c; a._flyoutHasFocus && a._hideCompletionList(); a._minimumPrefixLength == 0 && !a.get_element().value && a._timer.set_enabled(c) }, _onKeyDown: function (d) { var a = this; a._textBoxHasFocus = c; a._timer.set_enabled(b); var e = d.keyCode ? d.keyCode : d.rawEvent.keyCode; if (e === Sys.UI.Key.esc) { a._hideCompletionList(); d.preventDefault() } else if (e === Sys.UI.Key.up) { if (a._selectIndex > 0) { a._selectIndex--; a._handleScroll(a._completionListElement.childNodes[a._selectIndex], a._selectIndex); a._highlightItem(a._completionListElement.childNodes[a._selectIndex]); d.stopPropagation(); d.preventDefault() } } else if (e === Sys.UI.Key.down) { if (a._selectIndex < a._completionListElement.childNodes.length - 1) { a._selectIndex++; a._handleScroll(a._completionListElement.childNodes[a._selectIndex], a._selectIndex); a._highlightItem(a._completionListElement.childNodes[a._selectIndex]); d.stopPropagation(); d.preventDefault() } } else if (e === Sys.UI.Key.enter) if (a._selectIndex !== -1) { a._setText(a._completionListElement.childNodes[a._selectIndex]); d.preventDefault() } else a.hidePopup(); else if (e === Sys.UI.Key.tab) a._selectIndex !== -1 && a._setText(a._completionListElement.childNodes[a._selectIndex]); else a._timer.set_enabled(c) }, _handleScroll: function (e, c) { var a = this._completionListElement, b = $common.getBounds(e), d = this._completionListElement.childNodes.length; if (b.height * c - (a.clientHeight + a.scrollTop) >= 0) a.scrollTop += b.height * c - (a.clientHeight + a.scrollTop) + b.height; if (b.height * (d - (c + 1)) - (a.scrollHeight - a.scrollTop) >= 0) a.scrollTop -= b.height * (d - (c + 1)) - (a.scrollHeight - a.scrollTop) + b.height; if (a.scrollTop % b.height !== 0) if (b.height * (c + 1) - (a.clientHeight + a.scrollTop) >= 0) a.scrollTop -= a.scrollTop % b.height; else a.scrollTop += b.height - a.scrollTop % b.height }, _handleFlyoutFocus: function () { var b = this; if (!b._textBoxHasFocus) if (!b._flyoutHasFocus) { if (b._webRequest) { b._webRequest.get_executor().abort(); b._webRequest = a } b._hideCompletionList() } }, _onLostFocus: function () { var a = this; a._textBoxHasFocus = b; a._timer.set_enabled(b); window.setTimeout(Function.createDelegate(a, a._handleFlyoutFocus), 500) }, _onMethodComplete: function (d, b) { this._webRequest = a; this._update(b, d, c) }, _onMethodFailed: function () { this._webRequest = a }, _onTimerTick: function (g, e) { var c = this; c._timer.set_enabled(b); if (c._servicePath && c._serviceMethod) { var d = c._currentCompletionWord(); if (d.trim().length < c._minimumPrefixLength) { c._currentPrefix = a; c._update("", a, b); return } if (c._currentPrefix !== d || d == "" && c._minimumPrefixLength == 0) { c._currentPrefix = d; if (d != "" && c._cache && c._cache[d]) { c._update(d, c._cache[d], b); return } var e = new Sys.CancelEventArgs; c.raisePopulating(e); if (e.get_cancel()) return; var f = { prefixText: c._currentPrefix, count: c._completionSetCount }; if (c._useContextKey) f.contextKey = c._contextKey; if (c._webRequest) { c._webRequest.get_executor().abort(); c._webRequest = a } c._webRequest = Sys.Net.WebServiceProxy.invoke(c.get_servicePath(), c.get_serviceMethod(), b, f, Function.createDelegate(c, c._onMethodComplete), Function.createDelegate(c, c._onMethodFailed), d); $common.updateFormToRefreshATDeviceBuffer() } } }, _setText: function (d) { var c = this, g = d && d.firstChild ? d.firstChild.nodeValue : a; c._timer.set_enabled(b); var f = c.get_element(), e = f.control, h = c._showOnlyCurrentWordInCompletionListItem ? c._getTextWithInsertedWord(g) : g; if (e && e.set_text) e.set_text(h); else f.value = h; $common.tryFireEvent(f, "change"); c.raiseItemSelected(new Sys.Extended.UI.AutoCompleteItemEventArgs(d, g, d ? d._value : a)); c._currentPrefix = c._currentCompletionWord(); c._hideCompletionList() }, _update: function (m, d, p) { var b = this; if (p && b.get_enableCaching()) { if (!b._cache) b._cache = {}; b._cache[m] = d } if (!b._textBoxHasFocus || m != b._currentCompletionWord()) { b._hideCompletionList(); return } if (d && d.length) { b._completionListElement.innerHTML = ""; b._selectIndex = -1; for (var j = a, h = a, k = a, i = 0; i < d.length; i++) { var c = a; if (b._completionListElementID) c = document.createElement("div"); else c = document.createElement("li"); if (j == a) j = c; try { var l = Sys.Serialization.JavaScriptSerializer.deserialize("(" + d[i] + ")"); if (l && l.First) { h = l.First; k = l.Second } else { h = d[i]; k = h } } catch (r) { h = d[i]; k = d[i] } var q = b._showOnlyCurrentWordInCompletionListItem ? h : b._getTextWithInsertedWord(h); c.appendChild(document.createTextNode(q)); c._value = k; c.__item = ""; if (b._completionListItemCssClass) Sys.UI.DomElement.addCssClass(c, b._completionListItemCssClass); else { var e = c.style; e.padding = "0px"; e.textAlign = "left"; e.textOverflow = "ellipsis"; if (Sys.Browser.agent === Sys.Browser.Safari) { e.backgroundColor = f; e.color = g } else { e.backgroundColor = b._textBackground; e.color = b._textColor } } b._completionListElement.appendChild(c) } var o = $common.getBounds(b.get_element()); b._completionListElement.style.width = Math.max(1, o.width - 2) + "px"; b._completionListElement.scrollTop = 0; b.raisePopulated(Sys.EventArgs.Empty); var n = new Sys.CancelEventArgs; b.raiseShowing(n); if (!n.get_cancel()) { b.showPopup(); if (b._firstRowSelected && j != a) { b._highlightItem(j); b._selectIndex = 0 } } } else b._hideCompletionList() }, get_onShow: function () { return this._popupBehavior ? this._popupBehavior.get_onShow() : this._onShowJson }, set_onShow: function (b) { var a = this; if (a._popupBehavior) a._popupBehavior.set_onShow(b); else a._onShowJson = b; a.raisePropertyChanged("onShow") }, get_onShowBehavior: function () { return this._popupBehavior ? this._popupBehavior.get_onShowBehavior() : a }, onShow: function () { this._popupBehavior && this._popupBehavior.onShow() }, get_onHide: function () { return this._popupBehavior ? this._popupBehavior.get_onHide() : this._onHideJson }, set_onHide: function (b) { var a = this; if (a._popupBehavior) a._popupBehavior.set_onHide(b); else a._onHideJson = b; a.raisePropertyChanged("onHide") }, get_onHideBehavior: function () { return this._popupBehavior ? this._popupBehavior.get_onHideBehavior() : a }, onHide: function () { this._popupBehavior && this._popupBehavior.onHide() }, get_completionInterval: function () { return this._completionInterval }, set_completionInterval: function (a) { if (this._completionInterval != a) { this._completionInterval = a; this.raisePropertyChanged(r) } }, get_completionList: function () { return this._completionListElement }, set_completionList: function (a) { if (this._completionListElement != a) { this._completionListElement = a; this.raisePropertyChanged(s) } }, get_completionSetCount: function () { return this._completionSetCount }, set_completionSetCount: function (a) { if (this._completionSetCount != a) { this._completionSetCount = a; this.raisePropertyChanged(t) } }, get_minimumPrefixLength: function () { return this._minimumPrefixLength }, set_minimumPrefixLength: function (a) { if (this._minimumPrefixLength != a) { this._minimumPrefixLength = a; this.raisePropertyChanged(u) } }, get_serviceMethod: function () { return this._serviceMethod }, set_serviceMethod: function (a) { if (this._serviceMethod != a) { this._serviceMethod = a; this.raisePropertyChanged(v) } }, get_servicePath: function () { return this._servicePath }, set_servicePath: function (a) { if (this._servicePath != a) { this._servicePath = a; this.raisePropertyChanged(w) } }, get_contextKey: function () { return this._contextKey }, set_contextKey: function (b) { var a = this; if (a._contextKey != b) { a._contextKey = b; a.set_useContextKey(c); a.raisePropertyChanged("contextKey") } }, get_useContextKey: function () { return this._useContextKey }, set_useContextKey: function (a) { if (this._useContextKey != a) { this._useContextKey = a; this.raisePropertyChanged("useContextKey") } }, get_enableCaching: function () { return this._enableCaching }, set_enableCaching: function (a) { if (this._enableCaching != a) { this._enableCaching = a; this.raisePropertyChanged(x) } }, get_completionListElementID: function () { return this._completionListElementID }, set_completionListElementID: function (a) { if (this._completionListElementID != a) { this._completionListElementID = a; this.raisePropertyChanged(y) } }, get_completionListCssClass: function () { return this._completionListCssClass }, set_completionListCssClass: function (a) { if (this._completionListCssClass != a) { this._completionListCssClass = a; this.raisePropertyChanged("completionListCssClass") } }, get_completionListItemCssClass: function () { return this._completionListItemCssClass }, set_completionListItemCssClass: function (a) { if (this._completionListItemCssClass != a) { this._completionListItemCssClass = a; this.raisePropertyChanged("completionListItemCssClass") } }, get_highlightedItemCssClass: function () { return this._highlightedItemCssClass }, set_highlightedItemCssClass: function (a) { if (this._highlightedItemCssClass != a) { this._highlightedItemCssClass = a; this.raisePropertyChanged("highlightedItemCssClass") } }, get_delimiterCharacters: function () { return this._delimiterCharacters }, set_delimiterCharacters: function (a) { if (this._delimiterCharacters != a) { this._delimiterCharacters = a; this.raisePropertyChanged("delimiterCharacters") } }, get_firstRowSelected: function () { return this._firstRowSelected }, set_firstRowSelected: function (a) { if (this._firstRowSelected != a) { this._firstRowSelected = a; this.raisePropertyChanged("firstRowSelected") } }, get_showOnlyCurrentWordInCompletionListItem: function () { return this._showOnlyCurrentWordInCompletionListItem }, set_showOnlyCurrentWordInCompletionListItem: function (a) { if (this._showOnlyCurrentWordInCompletionListItem != a) { this._showOnlyCurrentWordInCompletionListItem = a; this.raisePropertyChanged(z) } }, add_populating: function (a) { this.get_events().addHandler(h, a) }, remove_populating: function (a) { this.get_events().removeHandler(h, a) }, raisePopulating: function (b) { var a = this.get_events().getHandler(h); a && a(this, b) }, add_populated: function (a) { this.get_events().addHandler(i, a) }, remove_populated: function (a) { this.get_events().removeHandler(i, a) }, raisePopulated: function (b) { var a = this.get_events().getHandler(i); a && a(this, b) }, add_showing: function (a) { this.get_events().addHandler(j, a) }, remove_showing: function (a) { this.get_events().removeHandler(j, a) }, raiseShowing: function (b) { var a = this.get_events().getHandler(j); a && a(this, b) }, add_shown: function (a) { this.get_events().addHandler(k, a) }, remove_shown: function (a) { this.get_events().removeHandler(k, a) }, raiseShown: function (b) { var a = this.get_events().getHandler(k); a && a(this, b) }, add_hiding: function (a) { this.get_events().addHandler(l, a) }, remove_hiding: function (a) { this.get_events().removeHandler(l, a) }, raiseHiding: function (b) { var a = this.get_events().getHandler(l); a && a(this, b) }, add_hidden: function (a) { this.get_events().addHandler(e, a) }, remove_hidden: function (a) { this.get_events().removeHandler(e, a) }, raiseHidden: function (b) { var a = this.get_events().getHandler(e); a && a(this, b) }, add_itemSelected: function (a) { this.get_events().addHandler(m, a) }, remove_itemSelected: function (a) { this.get_events().removeHandler(m, a) }, raiseItemSelected: function (b) { var a = this.get_events().getHandler(m); a && a(this, b) }, add_itemOver: function (a) { this.get_events().addHandler(n, a) }, remove_itemOver: function (a) { this.get_events().removeHandler(n, a) }, raiseItemOver: function (b) { var a = this.get_events().getHandler(n); a && a(this, b) }, add_itemOut: function (a) { this.get_events().addHandler(o, a) }, remove_itemOut: function (a) { this.get_events().removeHandler(o, a) }, raiseItemOut: function (b) { var a = this.get_events().getHandler(o); a && a(this, b) } }; Sys.Extended.UI.AutoCompleteBehavior.registerClass("Sys.Extended.UI.AutoCompleteBehavior", Sys.Extended.UI.BehaviorBase); Sys.registerComponent(Sys.Extended.UI.AutoCompleteBehavior, { name: "autoComplete" }); Sys.Extended.UI.AutoCompleteBehavior.descriptor = { properties: [{ name: r, type: Number }, { name: s, isDomElement: c }, { name: y, type: String }, { name: t, type: Number }, { name: u, type: Number }, { name: v, type: String }, { name: w, type: String }, { name: x, type: Boolean }, { name: z, type: Boolean }] }; Sys.Extended.UI.AutoCompleteItemEventArgs = function (d, e, c) { var b = this; Sys.Extended.UI.AutoCompleteItemEventArgs.initializeBase(b); b._item = d; b._text = e; b._value = c !== undefined ? c : a }; Sys.Extended.UI.AutoCompleteItemEventArgs.prototype = { get_item: function () { return this._item }, set_item: function (a) { this._item = a }, get_text: function () { return this._text }, set_text: function (a) { this._text = a }, get_value: function () { return this._value }, set_value: function (a) { this._value = a } }; Sys.Extended.UI.AutoCompleteItemEventArgs.registerClass("Sys.Extended.UI.AutoCompleteItemEventArgs", Sys.EventArgs) } if (window.Sys && Sys.loader) Sys.loader.registerScript(b, ["ExtendedTimer", "ExtendedAnimationBehavior", "ExtendedPopup"], a); else a() })();
//END AutoComplete.AutoCompleteBehavior.js
//START Tabs.Tabs.js
// (c) 2010 CodePlex Foundation
(function () { var b = "ExtendedTabs"; function a() { var o = "ajax__tab_hover", n = "ajax__tab_active", j = "ajax__tab_disabled", k = "owner", q = "headerTab", i = "populated", h = "populating", g = "click", r = "Sys.Extended.UI.TabContainer", m = "initialize", l = "scrollBars", p = "activeTabIndex", e = "value", f = "activeTabChanged", b = false, a = null, c = -1, d = true; Type.registerNamespace("Sys.Extended.UI"); Sys.Extended.UI.TabStripPlacement = function () { }; Sys.Extended.UI.TabStripPlacement.prototype = { Top: 0, Bottom: 1, TopRight: 2, BottomRight: 3 }; Sys.Extended.UI.TabStripPlacement.registerEnum("Sys.Extended.UI.TabStripPlacement", d); Sys.Extended.UI.UseVerticalStripPlacement = function () { }; Sys.Extended.UI.OnDemand = function () { }; Sys.Extended.UI.OnDemandMode = function () { }; Sys.Extended.UI.OnDemandMode.prototype = { None: 0, Always: 1, Once: 2 }; Sys.Extended.UI.OnDemandMode.registerEnum("Sys.Extended.UI.OnDemandMode", d); Sys.Extended.UI.TabContainer = function (e) { var d = this; Sys.Extended.UI.TabContainer.initializeBase(d, [e]); d._cachedActiveTabIndex = c; d._activeTabIndex = c; d._scrollBars = Sys.Extended.UI.ScrollBars.None; d._tabs = a; d._header = a; d._body = a; d._loaded = b; d._autoPostBackId = a; d._useVerticalStripPlacement = b; d._onDemand = b; d._pageRequestManager = a; d._tabStripPlacement = Sys.Extended.UI.TabStripPlacement.Top; d._app_onload$delegate = Function.createDelegate(d, d._app_onload) }; Sys.Extended.UI.TabContainer.prototype = { add_activeTabChanged: function (a) { this.get_events().addHandler(f, a) }, remove_activeTabChanged: function (a) { this.get_events().removeHandler(f, a) }, raiseActiveTabChanged: function () { var a = this, b = a.get_events().getHandler(f); b && b(a, Sys.EventArgs.Empty); a._autoPostBackId && __doPostBack(a._autoPostBackId, "activeTabChanged:" + a.get_activeTabIndex()) }, get_activeTabIndex: function () { return this._cachedActiveTabIndex > c ? this._cachedActiveTabIndex : this._activeTabIndex }, set_activeTabIndex: function (i) { var f = this, g = i; if (!f.get_isInitialized()) f._cachedActiveTabIndex = g; else { if (g < c) throw Error.argumentOutOfRange(e); if (g >= f.get_tabs().length) g = f.get_tabs().length - 1; if (g != f._activeTabIndex) { if (f._activeTabIndex != c) { var k = f.get_tabs()[f._activeTabIndex]; k._set_active(b) } var j = f._activeTabIndex != g; f._activeTabIndex = g; f._activeTabIndex != c && f.get_tabs()[f._activeTabIndex]._set_active(d); if (f._loaded && j) { if (f._onDemand) { var h = f.get_tabs()[f._activeTabIndex]; if (h._onDemandMode != Sys.Extended.UI.OnDemandMode.None) if (h._onDemandMode == Sys.Extended.UI.OnDemandMode.Once && h._wasLoadedOnce == b || h._onDemandMode == Sys.Extended.UI.OnDemandMode.Always) { f._pageRequestManager.beginAsyncPostBack([h._updatePanelID], a, a, b, a); h.set_wasLoadedOnce(d) } } f.raiseActiveTabChanged() } f.raisePropertyChanged(p) } } }, get_tabs: function () { if (this._tabs == a) this._tabs = []; return this._tabs }, get_activeTab: function () { return this._activeTabIndex > c ? this.get_tabs()[this._activeTabIndex] : a }, set_activeTab: function (b) { var a = Array.indexOf(this.get_tabs(), b); if (a == c) throw Error.argument(e, Sys.Extended.UI.Resources.Tabs_ActiveTabArgumentOutOfRange); this.set_activeTabIndex(a) }, get_autoPostBackId: function () { return this._autoPostBackId }, set_autoPostBackId: function (a) { this._autoPostBackId = a }, get_scrollBars: function () { return this._scrollBars }, set_scrollBars: function (b) { var a = this; if (a._scrollBars != b) { a._scrollBars = b; a._invalidate(); a.raisePropertyChanged(l) } }, get_tabStripPlacement: function () { return this._tabStripPlacement }, set_tabStripPlacement: function (b) { var a = this; if (a._tabStripPlacement != b) { a._tabStripPlacement = b; a._invalidate(); a.raisePropertyChanged("tabStripPlacement") } }, get_useVerticalStripPlacement: function () { return this._useVerticalStripPlacement }, set_useVerticalStripPlacement: function (b) { var a = this; if (a._useVerticalStripPlacement != b) { a._useVerticalStripPlacement = b; a._invalidate(); a.raisePropertyChanged("useVerticalStripPlacement") } }, get_onDemand: function () { return this._onDemand }, set_onDemand: function (b) { var a = this; if (a._onDemand != b) { a._onDemand = b; a._invalidate(); a.raisePropertyChanged("onDemand") } }, initialize: function () { var a = this; Sys.Extended.UI.TabContainer.callBaseMethod(a, m); var b = a.get_element(); a._header = $get(a.get_id() + "_header"); a._body = $get(a.get_id() + "_body"); $common.addCssClasses(b, ["ajax__tab_container", "ajax__tab_default"]); a._invalidate(); if (a._onDemand) a._pageRequestManager = Sys.WebForms.PageRequestManager.getInstance(); Sys.Application.add_load(a._app_onload$delegate) }, dispose: function () { $clearHandlers(this.get_element()); Sys.Application.remove_load(this._app_onload$delegate); Sys.Extended.UI.TabContainer.callBaseMethod(this, "dispose") }, getFirstTab: function (d) { for (var c = this.get_tabs(), b = 0; b < c.length; b++) if (d || c[b].get_enabled()) return c[b]; return a }, getLastTab: function (d) { for (var c = this.get_tabs(), b = c.length - 1; b >= 0; b--) if (d || c[b].get_enabled()) return c[b]; return a }, getNextTab: function (e) { for (var b = this.get_tabs(), g = this.get_activeTabIndex(), c = 1; c < b.length; c++) { var f = (g + c) % b.length, d = b[f]; if (e || d.get_enabled()) return d } return a }, getPreviousTab: function (e) { for (var b = this.get_tabs(), g = this.get_activeTabIndex(), c = 1; c < b.length; c++) { var f = (b.length + (g - c)) % b.length, d = b[f]; if (e || d.get_enabled()) return d } return a }, getNearestTab: function (e) { var b = this, d = b.getPreviousTab(e), c = b.getNextTab(e); return d && d.get_tabIndex() < b._activeTabIndex ? d : c && c.get_tabIndex() > b._activeTabIndex ? c : a }, saveClientState: function () { for (var b = this.get_tabs(), d = [], c = [], a = 0; a < b.length; a++) { Array.add(d, b[a].get_enabled()); Array.add(c, b[a].get_wasLoadedOnce()) } var e = { ActiveTabIndex: this._activeTabIndex, TabEnabledState: d, TabWasLoadedOnceState: c }; return Sys.Serialization.JavaScriptSerializer.serialize(e) }, _invalidate: function () { var g = "ajax__scroll_none", f = "ajax__scroll_auto", e = "ajax__scroll_both", d = "ajax__scroll_vert", c = "ajax__scroll_horiz", a = this; if (a.get_isInitialized()) { $common.removeCssClasses(a._body, [c, d, e, f, g]); switch (a._scrollBars) { case Sys.Extended.UI.ScrollBars.Horizontal: Sys.UI.DomElement.addCssClass(a._body, c); break; case Sys.Extended.UI.ScrollBars.Vertical: Sys.UI.DomElement.addCssClass(a._body, d); break; case Sys.Extended.UI.ScrollBars.Both: Sys.UI.DomElement.addCssClass(a._body, e); break; case Sys.Extended.UI.ScrollBars.Auto: Sys.UI.DomElement.addCssClass(a._body, f); break; case Sys.Extended.UI.ScrollBars.None: Sys.UI.DomElement.addCssClass(a._body, g) } if (a._useVerticalStripPlacement) { var b = $common.getBounds(a._header), h = $common.getBounds(a._body), j = h.height - b.height - 1 + "px"; $get(a.get_id() + "_headerSpannerHeight").style.height = j; if (Sys.Browser.agent == Sys.Browser.InternetExplorer && Sys.Browser.version < 7) if (a._tabStripPlacement == Sys.Extended.UI.TabStripPlacement.Top || a._tabStripPlacement == Sys.Extended.UI.TabStripPlacement.Bottom) { var i = { x: b.x + b.width, y: b.y, width: h.width, height: h.height }; $common.setBounds(a._body, i) } else { var i = { x: h.x + h.width, y: b.y, width: b.width, height: b.height }; $common.setBounds(a._header, i); $common.setBounds(a._body, h) } } } }, _app_onload: function () { var a = this; if (a._cachedActiveTabIndex != c) { a.set_activeTabIndex(a._cachedActiveTabIndex); a._cachedActiveTabIndex = c; var b = a.get_tabs()[a._activeTabIndex]; if (b) { b.set_wasLoadedOnce(d); b._setFocus(b) } } a._loaded = d } }; Sys.Extended.UI.TabContainer.registerClass(r, Sys.Extended.UI.ControlBase); Sys.registerComponent(Sys.Extended.UI.TabContainer, { name: "tabContainer", parameters: [{ name: p, type: "Number" }] }); Sys.Extended.UI.TabPanel = function (f) { var e = this; Sys.Extended.UI.TabPanel.initializeBase(e, [f]); e._active = b; e._tab = a; e._headerOuter = a; e._headerInner = a; e._header = a; e._owner = a; e._ownerID = a; e._enabled = d; e._tabIndex = c; e._dynamicContextKey = a; e._dynamicServicePath = a; e._dynamicServiceMethod = a; e._dynamicPopulateBehavior = a; e._scrollBars = Sys.Extended.UI.ScrollBars.None; e._onDemandMode = Sys.Extended.UI.OnDemandMode.Always; e._wasLoadedOnce = b; e._updatePanelID = ""; e.isAttachedDisabledEvents = b; e.isAttachedEnabledEvents = b; e._header_onclick$delegate = Function.createDelegate(e, e._header_onclick); e._header_onmouseover$delegate = Function.createDelegate(e, e._header_onmouseover); e._header_onmouseout$delegate = Function.createDelegate(e, e._header_onmouseout); e._header_onmousedown$delegate = Function.createDelegate(e, e._header_onmousedown); e._dynamicPopulate_onpopulated$delegate = Function.createDelegate(e, e._dynamicPopulate_onpopulated); e._oncancel$delegate = Function.createDelegate(e, e._oncancel); e._onkeydown$delegate = Function.createDelegate(e, e._onkeydown); e._disabled_onclick$delegate = Function.createDelegate(e, e._disabled_onclick) }; Sys.Extended.UI.TabPanel.prototype = { add_click: function (a) { this.get_events().addHandler(g, a) }, remove_click: function (a) { this.get_events().removeHandler(g, a) }, raiseClick: function () { var a = this.get_events().getHandler(g); a && a(this, Sys.EventArgs.Empty) }, add_populating: function (a) { this.get_events().addHandler(h, a) }, remove_populating: function (a) { this.get_events().removeHandler(h, a) }, raisePopulating: function () { var a = this.get_events().getHandler(h); a && a(this, Sys.EventArgs.Empty) }, add_populated: function (a) { this.get_events().addHandler(i, a) }, remove_populated: function (a) { this.get_events().removeHandler(i, a) }, raisePopulated: function () { var a = this.get_events().getHandler(i); a && a(this, Sys.EventArgs.Empty) }, get_headerText: function () { return this.get_isInitialized() ? this._header.innerHTML : "" }, set_headerText: function (c) { var a = "headerText", b = this; if (!b.get_isInitialized()) throw Error.invalidOperation(String.format(Sys.Extended.UI.Resources.Tabs_PropertySetBeforeInitialization, a)); if (b.get_headerText() != c) { b._header.innerHTML = c; b.raisePropertyChanged(a) } }, get_headerTab: function () { return this._header }, set_headerTab: function (a) { var b = this; if (typeof a === "string") { a = Sys.get(a); if (!a) throw new Error.argumentNull(e); } if (b._header != a) { if (b.get_isInitialized()) throw Error.invalidOperation(String.format(Sys.Extended.UI.Resources.Tabs_PropertySetAfterInitialization, q)); b._header = a; b.raisePropertyChanged(e) } }, get_enabled: function () { return this._enabled }, set_enabled: function (b) { var a = this; if (b != a._enabled) { a._enabled = b; a.get_isInitialized() && a._makeEnabled(a._enabled); a.raisePropertyChanged("enabled") } }, get_owner: function () { return this._owner }, set_owner: function (a) { var b = this; if (a instanceof Sys.ComponentSet) a = a.get(0); if (b._owner != a) { if (b.get_isInitialized()) throw Error.invalidOperation(String.format(Sys.Extended.UI.Resources.Tabs_PropertySetAfterInitialization, k)); b._owner = a; b.raisePropertyChanged(k) } }, get_ownerID: function () { return this._ownerID }, set_ownerID: function (a) { this._ownerID = a }, get_scrollBars: function () { return this._scrollBars }, set_scrollBars: function (a) { if (this._scrollBars != a) { this._scrollBars = a; this.raisePropertyChanged(l) } }, get_onDemandMode: function () { return this._onDemandMode }, set_onDemandMode: function (a) { if (this._onDemandMode != a) { this._onDemandMode = a; this.raisePropertyChanged("onDemandMode") } }, get_tabIndex: function () { return this._tabIndex }, get_dynamicContextKey: function () { return this._dynamicContextKey }, set_dynamicContextKey: function (a) { if (this._dynamicContextKey != a) { this._dynamicContextKey = a; this.raisePropertyChanged("dynamicContextKey") } }, get_dynamicServicePath: function () { return this._dynamicServicePath }, set_dynamicServicePath: function (a) { if (this._dynamicServicePath != a) { this._dynamicServicePath = a; this.raisePropertyChanged("dynamicServicePath") } }, get_dynamicServiceMethod: function () { return this._dynamicServiceMethod }, set_dynamicServiceMethod: function (a) { if (this._dynamicServiceMethod != a) { this._dynamicServiceMethod = a; this.raisePropertyChanged("dynamicServiceMethod") } }, _get_active: function () { return this._active }, _set_active: function (a) { this._active = a; if (a) this._activate(); else this._deactivate() }, get_updatePanelID: function () { return this._updatePanelID }, set_updatePanelID: function (a) { if (this._updatePanelID != a) { this._updatePanelID = a; this.raisePropertyChanged("updatePanelID") } }, get_wasLoadedOnce: function () { return this._wasLoadedOnce }, set_wasLoadedOnce: function (a) { if (a != this._wasLoadedOnce) { this._wasLoadedOnce = a; this.raisePropertyChanged("wasLoadedOnce") } }, initialize: function () { var c = "span", b = this, d = b.get_owner(); if (!d) { d = $find(b.get_ownerID()); if (d) { d.initialize(); b.set_owner(d) } } Sys.Extended.UI.TabPanel.callBaseMethod(b, m); if (!d) throw Error.invalidOperation(Sys.Extended.UI.Resources.Tabs_OwnerExpected); b._tabIndex = d.get_tabs().length; Array.add(d.get_tabs(), b); var f = b.get_id() + "_tab"; b._tab = document.getElementById(f); var e = b._tab != a; if (!e) { b._headerOuterWrapper = document.createElement(c); b._headerInnerWrapper = document.createElement(c); b._tab = document.createElement(c); b._tab.id = f; b._header.parentNode.replaceChild(b._tab, b._header); b._tab.appendChild(b._headerOuterWrapper); b._headerOuterWrapper.appendChild(b._headerInnerWrapper); b._headerInnerWrapper.appendChild(b._header) } $addHandlers(b._header, { mousedown: b._header_onmousedown$delegate, dragstart: b._oncancel$delegate, selectstart: b._oncancel$delegate, select: b._oncancel$delegate }); if (b._enabled) b._addHandlersOnEnabled(); else Sys.UI.DomElement.addCssClass(b._tab, j); if (!e) { Sys.UI.DomElement.addCssClass(b._headerOuterWrapper, "ajax__tab_outer"); Sys.UI.DomElement.addCssClass(b._headerInnerWrapper, "ajax__tab_inner"); Sys.UI.DomElement.addCssClass(b._header, "ajax__tab_tab"); Sys.UI.DomElement.addCssClass(b.get_element(), "ajax__tab_panel") } }, dispose: function () { var b = this; if (b._dynamicPopulateBehavior) { b._dynamicPopulateBehavior.dispose(); b._dynamicPopulateBehavior = a } $common.removeHandlers(b._header, { mousedown: b._header_onmousedown$delegate, dragstart: b._oncancel$delegate, selectstart: b._oncancel$delegate, select: b._oncancel$delegate }); if (b._enabled) b._isAttachedEnabledEvents && b._removeHandlersOnEnabled(); else b._isAttachedDisabledEvents && $common.removeHandlers(b._header, { click: b._disabled_onclick }); Sys.Extended.UI.TabPanel.callBaseMethod(b, "dispose") }, _addHandlersOnEnabled: function () { var a = this; $addHandlers(a._header, { click: a._header_onclick$delegate, mouseover: a._header_onmouseover$delegate, mouseout: a._header_onmouseout$delegate, keydown: a._onkeydown$delegate }) }, _removeHandlersOnEnabled: function () { var a = this; $common.removeHandlers(a._header, { click: a._header_onclick$delegate, mouseover: a._header_onmouseover$delegate, mouseout: a._header_onmouseout$delegate, keydown: a._onkeydown$delegate }) }, populate: function (c) { var b = this; if (b._dynamicPopulateBehavior && b._dynamicPopulateBehavior.get_element() != b.get_element()) { b._dynamicPopulateBehavior.dispose(); b._dynamicPopulateBehavior = a } if (!b._dynamicPopulateBehavior && b._dynamicServiceMethod) b._dynamicPopulateBehavior = $create(Sys.Extended.UI.DynamicPopulateBehavior, { ContextKey: b._dynamicContextKey, ServicePath: b._dynamicServicePath, ServiceMethod: b._dynamicServiceMethod }, { populated: b._dynamicPopulate_onpopulated$delegate }, a, b.get_element()); if (b._dynamicPopulateBehavior) { b.raisePopulating(); b._dynamicPopulateBehavior.populate(c ? c : b._dynamicContextKey) } }, _activate: function () { var a = this; if (a._enabled) { var e = a.get_element(); $common.setVisible(e, d); Sys.UI.DomElement.addCssClass(a._tab, n); a.populate() } else if (a._get_active()) { var c = a._owner.getNearestTab(b); !!c && a._owner.set_activeTab(c) } a._owner.get_element().style.visibility = "visible" }, _deactivate: function () { var a = this.get_element(); $common.setVisible(a, b); Sys.UI.DomElement.removeCssClass(this._tab, n) }, _show: function () { this._tab.style.display = "" }, _hide: function () { var a = this; a._tab.style.display = "none"; if (a._get_active()) { var c = a._owner.getNearestTab(b); !!c && a._owner.set_activeTab(c) } a._deactivate() }, _makeEnabled: function (f) { var a = this, c = "__tab_" + a.get_element().id; if (f) { if (a.isAttachedDisabledEvents) { $common.removeHandlers(a._header, { click: a._disabled_onclick }); a._isAttachedDisabledEvents = b } a._addHandlersOnEnabled(); a._isAttachedEnabledEvents = d; Sys.UI.DomElement.removeCssClass($get(c), j) } else { if (a._isAttachedEnabledEvents) { a._removeHandlersOnEnabled(); a._isAttachedEnabledEvents = b } $addHandlers(a._header, { click: a._disabled_onclick }); a.isAttachedDisabledEvents = d; if (a._get_active()) { var e = a._owner.getNearestTab(b); !!e && a._owner.set_activeTab(e) } a._deactivate(); Sys.UI.DomElement.addCssClass($get(c), j) } }, _setFocus: function (a) { $get("__tab_" + a.get_element().id).focus() }, _header_onclick: function (b) { var a = this; b.preventDefault(); a.raiseClick(); a.get_owner().set_activeTab(a); a._setFocus(a) }, _header_onmouseover: function () { Sys.UI.DomElement.addCssClass(this._tab, o) }, _header_onmouseout: function () { Sys.UI.DomElement.removeCssClass(this._tab, o) }, _header_onmousedown: function (a) { a.preventDefault() }, _oncancel: function (a) { a.stopPropagation(); a.preventDefault() }, _onkeydown: function (d) { var a = this, e = "which" in d ? d.which : d.keyCode; if (e == "39" && !a._owner._useVerticalStripPlacement || e == "40" && a._owner._useVerticalStripPlacement) { d.preventDefault(); var c = a._owner.getNextTab(b); if (c) { a._owner.set_activeTab(c); a._setFocus(c) } } else if (e == "37" && !a._owner._useVerticalStripPlacement || e == "38" && a._owner._useVerticalStripPlacement) { d.preventDefault(); var c = a._owner.getPreviousTab(b); if (c) { a._owner.set_activeTab(c); a._setFocus(c) } } else if (e == "35") { d.preventDefault(); var c = a._owner.getLastTab(b); if (c) { a._owner.set_activeTab(c); a._setFocus(c) } } else if (e == "36") { d.preventDefault(); var c = a._owner.getFirstTab(b); if (c) { a._owner.set_activeTab(c); a._setFocus(c) } } }, _dynamicPopulate_onpopulated: function () { this.raisePopulated() }, _disabled_onclick: function (a) { a.preventDefault() } }; Sys.Extended.UI.TabPanel.registerClass("Sys.Extended.UI.TabPanel", Sys.UI.Control); Sys.registerComponent(Sys.Extended.UI.TabPanel, { name: "tabPanel", parameters: [{ name: k, type: r }, { name: q, type: "String" }] }) } if (window.Sys && Sys.loader) Sys.loader.registerScript(b, ["ExtendedDynamicPopulate"], a); else a() })();
//END Tabs.Tabs.js
//START ColorPicker.ColorPickerBehavior.js
// (c) 2010 CodePlex Foundation
(function () { var b = "ExtendedColorPicker"; function a() { var h = "hidden", g = "hiding", f = "shown", e = "showing", d = "colorSelectionChanged", b = false, c = true, a = null; Type.registerNamespace("Sys.Extended.UI"); Sys.Extended.UI.ColorPickerBehavior = function (e) { var d = this; Sys.Extended.UI.ColorPickerBehavior.initializeBase(d, [e]); d._textbox = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e); d._button = a; d._sample = a; d._cssClass = "ajax__colorPicker"; d._popupPosition = Sys.Extended.UI.PositioningMode.BottomLeft; d._selectedColor = a; d._enabled = c; d._selectedColorChanging = b; d._popupMouseDown = b; d._isOpen = b; d._blur = new Sys.Extended.UI.DeferredOperation(1, d, d._doBlur); d._popupBehavior = a; d._container = a; d._popupDiv = a; d._colorsTable = a; d._colorsBody = a; d._button$delegates = { click: Function.createDelegate(d, d._button_onclick), keypress: Function.createDelegate(d, d._button_onkeypress), blur: Function.createDelegate(d, d._button_onblur) }; d._element$delegates = { change: Function.createDelegate(d, d._element_onchange), keypress: Function.createDelegate(d, d._element_onkeypress), click: Function.createDelegate(d, d._element_onclick), focus: Function.createDelegate(d, d._element_onfocus), blur: Function.createDelegate(d, d._element_onblur) }; d._popup$delegates = { mousedown: Function.createDelegate(d, d._popup_onmousedown), mouseup: Function.createDelegate(d, d._popup_onmouseup), drag: Function.createDelegate(d, d._popup_onevent), dragstart: Function.createDelegate(d, d._popup_onevent), select: Function.createDelegate(d, d._popup_onevent) }; d._cell$delegates = { mouseover: Function.createDelegate(d, d._cell_onmouseover), mouseout: Function.createDelegate(d, d._cell_onmouseout), click: Function.createDelegate(d, d._cell_onclick) } }; Sys.Extended.UI.ColorPickerBehavior.prototype = { initialize: function () { var a = this; Sys.Extended.UI.ColorPickerBehavior.callBaseMethod(a, "initialize"); if (!Sys.Extended.UI.ColorPickerBehavior._colorRegex) Sys.Extended.UI.ColorPickerBehavior._colorRegex = new RegExp("^[A-Fa-f0-9]{6}$"); var c = a.get_element(); $addHandlers(c, a._element$delegates); a._button && $addHandlers(a._button, a._button$delegates); var b = a.get_selectedColor(); b && a.set_selectedColor(b); a._restoreSample() }, dispose: function () { var b = this; b._sample = a; if (b._button) { $clearHandlers(b._button); b._button = a } if (b._popupBehavior) { b._popupBehavior.dispose(); b._popupBehavior = a } if (b._container) { b._container.parentNode && b._container.parentNode.removeChild(b._container); b._container = a } if (b._popupDiv) { $clearHandlers(b._popupDiv); b._popupDiv = a } if (b._colorsBody) { for (var c = 0; c < b._colorsBody.rows.length; c++) for (var f = b._colorsBody.rows[c], d = 0; d < f.cells.length; d++) $clearHandlers(f.cells[d].firstChild); b._colorsBody = a } b._colorsTable = a; var e = b.get_element(); e && $clearHandlers(e); Sys.Extended.UI.ColorPickerBehavior.callBaseMethod(b, "dispose") }, get_button: function () { return this._button }, set_button: function (b) { var a = this; if (a._button !== b) { a._button && a.get_isInitialized() && $common.removeHandlers(a._button, a._button$delegates); a._button = b; a._button && a.get_isInitialized() && $addHandlers(a._button, a._button$delegates); a.raisePropertyChanged("button") } }, get_sample: function () { return this._sample }, set_sample: function (a) { if (this._sample !== a) { this._sample = a; this.raisePropertyChanged("sample") } }, get_selectedColor: function () { var b = this; if (b._selectedColor === a) { var c = b._textbox.get_Value(); if (b._validate(c)) b._selectedColor = c } return b._selectedColor }, set_selectedColor: function (d) { var a = this; if (a._selectedColor !== d && a._validate(d)) { a._selectedColor = d; a._selectedColorChanging = c; d !== a._textbox.get_Value() && a._textbox.set_Value(d); a._showSample(d); a._selectedColorChanging = b; a.raisePropertyChanged("selectedColor") } }, get_enabled: function () { return this._enabled }, set_enabled: function (a) { if (this._enabled !== a) { this._enabled = a; this.raisePropertyChanged("enabled") } }, get_popupPosition: function () { return this._popupPosition }, set_popupPosition: function (a) { if (this._popupPosition !== a) { this._popupPosition = a; this.raisePropertyChanged("popupPosition") } }, add_colorSelectionChanged: function (a) { this.get_events().addHandler(d, a) }, remove_colorSelectionChanged: function (a) { this.get_events().removeHandler(d, a) }, raiseColorSelectionChanged: function () { var a = this.get_events().getHandler(d); a && a(this, Sys.EventArgs.Empty) }, add_showing: function (a) { this.get_events().addHandler(e, a) }, remove_showing: function (a) { this.get_events().removeHandler(e, a) }, raiseShowing: function (b) { var a = this.get_events().getHandler(e); a && a(this, b) }, add_shown: function (a) { this.get_events().addHandler(f, a) }, remove_shown: function (a) { this.get_events().removeHandler(f, a) }, raiseShown: function () { var a = this.get_events().getHandler(f); a && a(this, Sys.EventArgs.Empty) }, add_hiding: function (a) { this.get_events().addHandler(g, a) }, remove_hiding: function (a) { this.get_events().removeHandler(g, a) }, raiseHiding: function (b) { var a = this.get_events().getHandler(g); a && a(this, b) }, add_hidden: function (a) { this.get_events().addHandler(h, a) }, remove_hidden: function (a) { this.get_events().removeHandler(h, a) }, raiseHidden: function () { var a = this.get_events().getHandler(h); a && a(this, Sys.EventArgs.Empty) }, show: function () { var a = this; a._ensureColorPicker(); if (!a._isOpen) { var b = new Sys.CancelEventArgs; a.raiseShowing(b); if (b.get_cancel()) return; a._isOpen = c; a._popupBehavior.show(); a.raiseShown() } }, hide: function () { var a = this; if (a._isOpen) { var c = new Sys.CancelEventArgs; a.raiseHiding(c); if (c.get_cancel()) return; a._container && a._popupBehavior.hide(); a._isOpen = b; a.raiseHidden(); a._popupMouseDown = b } }, _focus: function () { if (this._button) this._button.focus(); else this.get_element().focus() }, _doBlur: function (d) { var a = this; if (!d && Sys.Browser.agent === Sys.Browser.Opera) a._blur.post(c); else { !a._popupMouseDown && a.hide(); a._popupMouseDown = b } }, _buildColorPicker: function () { var a = this, d = a.get_element(), c = a.get_id(); a._container = $common.createElementFromTemplate({ nodeName: "div", properties: { id: c + "_container" }, cssClasses: [a._cssClass] }, d.parentNode); a._popupDiv = $common.createElementFromTemplate({ nodeName: "div", events: a._popup$delegates, properties: { id: c + "_popupDiv" }, cssClasses: ["ajax__colorPicker_container"], visible: b }, a._container) }, _buildColors: function () { var a = this, f = a.get_id(); a._colorsTable = $common.createElementFromTemplate({ nodeName: "table", properties: { id: f + "_colorsTable", cellPadding: 0, cellSpacing: 1, border: 0, style: { margin: "auto" } } }, a._popupDiv); a._colorsBody = $common.createElementFromTemplate({ nodeName: "tbody", properties: { id: f + "_colorsBody" } }, a._colorsTable); for (var c = ["00", "99", "33", "66", "FF", "CC"], b, e, h = c.length, i = 0; i < h; i++) for (var j = $common.createElementFromTemplate({ nodeName: "tr" }, a._colorsBody), d = 0; d < h; d++) { if (d === 3) j = $common.createElementFromTemplate({ nodeName: "tr" }, a._colorsBody); for (var g = 0; g < h; g++) { b = c[i] + c[d] + c[g]; e = "#" + b; var k = $common.createElementFromTemplate({ nodeName: "td" }, j), l = $common.createElementFromTemplate({ nodeName: "div", properties: { id: f + "_color_" + b, color: b, title: e, style: { backgroundColor: e }, innerHTML: "&nbsp;" }, events: a._cell$delegates }, k) } } }, _ensureColorPicker: function () { var a = this; if (!a._container) { var b = a.get_element(); a._buildColorPicker(); a._buildColors(); a._popupBehavior = new $create(Sys.Extended.UI.PopupBehavior, { parentElement: b }, {}, {}, a._popupDiv); a._popupBehavior.set_positioningMode(a._popupPosition) } }, _showSample: function (b) { if (this._sample) { var a = ""; if (b) a = "#" + b; this._sample.style.backgroundColor = a } }, _restoreSample: function () { this._showSample(this._selectedColor) }, _validate: function (a) { return a && Sys.Extended.UI.ColorPickerBehavior._colorRegex.test(a) }, _element_onfocus: function () { var a = this; if (!a._enabled) return; if (!a._button) { a.show(); a._popupMouseDown = b } }, _element_onblur: function () { if (!this._enabled) return; !this._button && this._doBlur() }, _element_onchange: function () { var a = this; if (!a._selectedColorChanging) { var b = a._textbox.get_Value(); if (a._validate(b) || b === "") { a._selectedColor = b; a._restoreSample() } } }, _element_onkeypress: function (a) { if (!this._enabled) return; if (!this._button && a.charCode === Sys.UI.Key.esc) { a.stopPropagation(); a.preventDefault(); this.hide() } }, _element_onclick: function () { var a = this; if (!a._enabled) return; if (!a._button) { a.show(); a._popupMouseDown = b } }, _popup_onevent: function (a) { a.stopPropagation(); a.preventDefault() }, _popup_onmousedown: function () { this._popupMouseDown = c }, _popup_onmouseup: function () { var a = this; Sys.Browser.agent === Sys.Browser.Opera && a._blur.get_isPending() && a._blur.cancel(); a._popupMouseDown = b; a._focus() }, _cell_onmouseover: function (a) { a.stopPropagation(); var b = a.target; this._showSample(b.color) }, _cell_onmouseout: function (a) { a.stopPropagation(); this._restoreSample() }, _cell_onclick: function (b) { var a = this; b.stopPropagation(); b.preventDefault(); if (!a._enabled) return; var d = b.target; a.set_selectedColor(d.color); a._blur.post(c); a.raiseColorSelectionChanged() }, _button_onclick: function (c) { var a = this; c.preventDefault(); c.stopPropagation(); if (!a._enabled) return; if (!a._isOpen) a.show(); else a.hide(); a._focus(); a._popupMouseDown = b }, _button_onblur: function () { var a = this; if (!a._enabled) return; !a._popupMouseDown && a.hide(); a._popupMouseDown = b }, _button_onkeypress: function (a) { if (!this._enabled) return; if (a.charCode === Sys.UI.Key.esc) { a.stopPropagation(); a.preventDefault(); this.hide() } this._popupMouseDown = b } }; Sys.Extended.UI.ColorPickerBehavior.registerClass("Sys.Extended.UI.ColorPickerBehavior", Sys.Extended.UI.BehaviorBase); Sys.registerComponent(Sys.Extended.UI.ColorPickerBehavior, { name: "colorPicker" }) } if (window.Sys && Sys.loader) Sys.loader.registerScript(b, ["ExtendedBase", "ExtendedCommon", "ExtendedThreading", "ExtendedPopup"], a); else a() })();
//END ColorPicker.ColorPickerBehavior.js
//START HtmlEditorExtender.HtmlEditorExtenderBehavior.js
// (c) 2010 CodePlex Foundation
(function () { var b = "HtmlEditorExtenderBehavior"; function a() { var z = "ToolbarButtons", q = "change", y = "BackColor", t = "block", w = "ForeColor", m = "blur", j = "click", f = "on", d = "", s = "select", e = "px", l = "button", k = "input", v = "_ExtenderSourceView", p = "ajax__html_editor_extender_texteditor", c = true, n = "both", o = "auto", u = "_ExtenderContentEditable", h = "unselectable", g = "div", r = "content", b = false, a = null; Type.registerNamespace("Sys.Extended.UI"); Sys.Extended.UI.HtmlEditorExtenderBehavior = function (j) { var f = "ajax__html_editor_extender_button", d = this; Sys.Extended.UI.HtmlEditorExtenderBehavior.initializeBase(d, [j]); d._textbox = Sys.Extended.UI.TextBoxWrapper.get_Wrapper(j); var i = d.get_id(); d._backColor = a; d._foreColor = a; d._commandName = a; d._savedRange = a; d._isInFocus = a; d._oldContents = a; d._newContents = a; d._isDirty = b; d._viewMode = r; d._displaySourceTab = b; d._ButtonWidth = 23; d._ButtonHeight = 21; d._containerTemplate = { nodeName: g, properties: { id: i + "_ExtenderContainer" }, cssClasses: [h, "ajax__html_editor_extender_container"] }; d._editableTemplate = { nodeName: g, properties: { id: i + u, style: { overflow: o, clear: n }, contentEditable: c }, cssClasses: [p] }; d._sourceViewTemplate = { nodeName: g, properties: { id: i + v, style: { height: "90%", overflow: o, clear: n }, contentEditable: c }, cssClasses: [p] }; d._buttonTemplate = { nodeName: k, properties: { type: l, style: { width: d._ButtonWidth + e, height: d._ButtonHeight + e } }, cssClasses: [f] }; d._buttonContentTemplate = { nodeName: k, properties: { type: l, style: { width: d._ButtonWidth + e, height: d._ButtonHeight + e } }, cssClasses: ["ajax__html_editor_extender_button ajax__html_editor_extender_content"] }; d._buttonSourceTemplate = { nodeName: k, properties: { type: l, style: { width: d._ButtonWidth + e, height: d._ButtonHeight + e } }, cssClasses: ["ajax__html_editor_extender_button ajax__html_editor_extender_source"] }; d._textboxTemplate = { nodeName: k, properties: { type: "text" } }; d._dropDownTemplate = { nodeName: s, properties: { style: { width: d._ButtonWidth + e, height: d._ButtonHeight + e } }, cssClasses: [f] }; d._topButtonContainerTemplate = { nodeName: g, properties: { id: i + "_ExtenderButtonContainer" }, cssClasses: ["ajax__html_editor_extender_buttoncontainer"] }; d._topButtonContainerTemplate2 = { nodeName: g, properties: { id: i + "_ExtenderButtonContainer2", style: { clear: n } }, cssClasses: ["ajax__html_editor_extender_buttoncontainer2"] }; d._container = a; d._toolbarButtons = a; d._editableDiv = a; d._sourceViewDiv = a; d._topButtonContainer = a; d._topButtonContainer2 = a; d._buttons = []; d._btnClickHandler = a; d._requested_buttons = []; d._colorPicker = a; d._txtBoxForColor = a; d._contentViewButton = a; d._sourceViewButton = a; d._popupDiv = a; d._btnDone = a; d._btnCancel = a; d._isFocusInEditableDiv; d._textBoxOnBlurDelegate = a; d._editableDivOnBlurDelegate = a; d._editableDivOnFocusDelegate = a; d._btnClickDelegate = a; d._contentViewClickDelegate = a; d._sourceViewClickDelegate = a; d._sourceViewDivOnBlurDelegate = a; d._imageCancelClickDelegate = a; if (typeof WebForm_OnSubmit == "function" && !Sys.Extended.UI.HtmlEditorExtenderBehavior._originalWebForm_OnSubmit) { Sys.Extended.UI.HtmlEditorExtenderBehavior._originalWebForm_OnSubmit = WebForm_OnSubmit; WebForm_OnSubmit = Sys.Extended.UI.HtmlEditorExtenderBehavior.WebForm_OnSubmit } }; Sys.Extended.UI.HtmlEditorExtenderBehavior.prototype = { initialize: function () { var h = "_popupDiv", e = this; Sys.Extended.UI.HtmlEditorExtenderBehavior.callBaseMethod(e, "initialize"); A[A.length] = e; e._button_list = []; e._createContainer(); e._createTopButtonContainer(); e._createButton(); e._createEditableDiv(); if (e.get_displaySourceTab()) { e._createSourceViewDiv(); e._createTopButtonContainer2() } var i = e._textbox._element.parentNode; while (i != a && i.nodeName != "FORM") i = i.parentNode; if (i == a) throw "Missing Form tag"; var g = e.get_id(); e._popupDiv = $get(g + h); if (e._popupDiv == a) { if (g.indexOf("_") != -1) g = g.substring(g.lastIndexOf("_") + 1); else g = d; e._popupDiv = $get(g + h) } if (e._popupDiv != a) { e._popupBehavior = $create(Sys.Extended.UI.PopupBehavior, { id: g + "_ImagePopupBehavior", parentElement: e.get_element(), unselectable: f }, a, a, e._popupDiv); e._btnCancel = $get(g + "_btnCancel"); e._imageCancelClickDelegate = Function.createDelegate(e, e._btnCancel_click); $addHandler(e._btnCancel, j, e._imageCancelClickDelegate, c); e._elementVisible(e._popupDiv, b) } e._textBoxOnBlurDelegate = Function.createDelegate(e, e._textBox_onblur); e._editableDivOnBlurDelegate = Function.createDelegate(e, e._editableDiv_onblur); e._editableDivOnFocusDelegate = Function.createDelegate(e, e._editableDiv_onfocus); e._btnClickDelegate = Function.createDelegate(e, e._executeCommand); if (e.get_displaySourceTab()) { e._contentViewClickDelegate = Function.createDelegate(e, e._contentView_click); e._sourceViewClickDelegate = Function.createDelegate(e, e._sourceView_click); e._sourceViewDivOnBlurDelegate = Function.createDelegate(e, e._sourceViewDiv_onblur) } $addHandler(e._textbox._element, m, e._textBoxOnBlurDelegate, c); $addHandler(e._editableDiv, m, e._editableDivOnBlurDelegate, c); $addHandler(e._editableDiv, "focus", e._editableDivOnFocusDelegate, c); $addHandler(e._topButtonContainer, j, e._btnClickDelegate, c); if (e.get_displaySourceTab()) { $addHandler(e._contentViewButton, j, e._contentViewClickDelegate, c); $addHandler(e._sourceViewButton, j, e._sourceViewClickDelegate, c); $addHandler(e._sourceViewDiv, m, e._sourceViewDivOnBlurDelegate, c) } }, _dispose: function () { var b = this; $removeHandler(b._textbox._element, m, b._textBoxOnBlurDelegate); $removeHandler(b._editableDiv, m, b._editableDivOnBlurDelegate); $removeHandler(b._editableDiv, "focus", b._editableDivOnFocusDelegate); $removeHandler(b._topButtonContainer, j, b._btnClickDelegate); if (b.get_displaySourceTab()) { $removeHandler(b._contentViewButton, j, b._contentViewClickDelegate); $removeHandler(b._sourceViewButton, j, b._sourceViewClickDelegate); $removeHandler(b._sourceViewDiv, m, b._sourceViewDivOnBlurDelegate) } b._popupDiv != a && $removeHandler(b._btnCancel, j, b._imageCancelClickDelegate); Sys.Extended.UI.HtmlEditorExtenderBehavior.callBaseMethod(b, "dispose") }, _createContainer: function () { var a = this, e = a.get_element(); a._container = $common.createElementFromTemplate(a._containerTemplate, e.parentNode); a._elementVisible(a._textbox._element, c); var d = $common.getBounds(a._textbox._element); $common.setSize(a._container, { width: d.width, height: d.height }); a._elementVisible(a._textbox._element, b); $common.wrapElement(a._textbox._element, a._container, a._container) }, _createTopButtonContainer: function () { this._topButtonContainer = $common.createElementFromTemplate(this._topButtonContainerTemplate, this._container) }, _createButton: function () { var p = "ajax__html_editor_extender_button ajax__html_editor_extender_", o = "21px", j = "transparent", r = "solid 1px #c2c2c2", n = "Arial", m = "11px", d = "left", e = "span", c = this, v = Sys.Browser.agent == Sys.Browser.InternetExplorer; for (i = 0; i < c._toolbarButtons.length; i++) { var g; if (c._toolbarButtons[i].CommandName == "HorizontalSeparator") g = $common.createElementFromTemplate({ nodeName: e, cssClasses: ["ajax__html_editor_extender_separator"] }, c._topButtonContainer); else if (c._toolbarButtons[i].CommandName == "FontName") { g = $common.createElementFromTemplate({ nodeName: "nobr", properties: { style: { "float": d, cssFloat: d, fontSize: m } }, cssClasses: ["fontnameclass"], children: [{ nodeName: e, properties: { textContent: "Font ", innerText: "Font ", style: { paddingLeft: "5px", fontWeight: "bold" } } }] }, c._topButtonContainer); _select = $common.createElementFromTemplate({ nodeName: s, properties: { style: { fontSize: "9px", fontFamily: n, height: "20px", width: "90px" } }, events: { change: function () { var a = this.options[this.selectedIndex].value; setTimeout(function () { document.execCommand("fontname", b, a) }, 200) } } }, g); var u = [{ Text: n, Value: "arial,helvetica,sans-serif" }, { Text: "Courier New", Value: "courier new,courier,monospace" }, { Text: "Georgia", Value: "georgia,times new roman,times,serif" }, { Text: "Tahoma", Value: "tahoma,arial,helvetica,sans-serif" }, { Text: "Times New Roman", Value: "times new roman,times,serif" }, { Text: "Verdana", Value: "verdana,arial,helvetica,sans-serif" }, { Text: "Impact", Value: "impact" }, { Text: "WingDings", Value: "wingdings" }]; for (x in u) { var q = document.createElement("option"); q.text = u[x].Text; q.value = u[x].Value; try { _select.add(q, a) } catch (A) { _select.add(q) } } _select.setAttribute("id", c._id + c._toolbarButtons[i].CommandName); _select.setAttribute("name", c._toolbarButtons[i].CommandName); _select.setAttribute("title", c._toolbarButtons[i].Tooltip); _select.setAttribute(h, f) } else if (c._toolbarButtons[i].CommandName == "FontSize") { g = $common.createElementFromTemplate({ nodeName: "nobr", properties: { style: { "float": d, cssFloat: d, fontSize: m } }, cssClasses: ["fontsizeclass"], children: [{ nodeName: e, properties: { textContent: "Size ", innerText: "Size ", style: { paddingLeft: "5px", fontWeight: "bold" } } }] }, c._topButtonContainer); _select = $common.createElementFromTemplate({ nodeName: s, properties: { style: { fontSize: m, fontFamily: n, height: "20px", width: v ? "30px" : "50px" } }, events: { change: function () { var a = this.options[this.selectedIndex].value; setTimeout(function () { document.execCommand("fontsize", b, a) }, 200) } } }, g); var u = [{ Text: "1", Value: "1" }, { Text: "2", Value: "2" }, { Text: "3", Value: "3" }, { Text: "4", Value: "4" }, { Text: "5", Value: "5" }, { Text: "6", Value: "6" }, { Text: "7", Value: "7" }]; for (x in u) { var q = document.createElement("option"); q.text = u[x].Text; q.value = u[x].Value; try { _select.add(q, a) } catch (A) { _select.add(q) } } _select.setAttribute("id", c._id + c._toolbarButtons[i].CommandName); _select.setAttribute("name", c._toolbarButtons[i].CommandName); _select.setAttribute("title", c._toolbarButtons[i].Tooltip); _select.setAttribute(h, f) } else if (c._toolbarButtons[i].CommandName == w) { g = $common.createElementFromTemplate({ nodeName: e, properties: { style: { backgroundColor: "#ff0000", border: r, display: t, "float": d, cssFloat: d } }, cssClasses: ["forecolorclass"] }, c._topButtonContainer); g.setAttribute(h, f); c._foreColor = $common.createElementFromTemplate({ nodeName: k, properties: { type: l, id: c._id + c._toolbarButtons[i].CommandName, name: c._toolbarButtons[i].CommandName, title: c._toolbarButtons[i].Tooltip, style: { backgroundColor: j, width: o, height: "19px", color: j } }, cssClasses: [p + c._toolbarButtons[i].CommandName] }, g); c._foreColor.setAttribute(h, f) } else if (c._toolbarButtons[i].CommandName == y) { g = $common.createElementFromTemplate({ nodeName: e, properties: { style: { backgroundColor: "#ff0000", border: r, display: t, "float": d, cssFloat: d } }, cssClasses: ["backcolorclass"] }, c._topButtonContainer); g.setAttribute(h, f); c._backColor = $common.createElementFromTemplate({ nodeName: k, properties: { type: l, id: c._id + c._toolbarButtons[i].CommandName, name: c._toolbarButtons[i].CommandName, title: c._toolbarButtons[i].Tooltip, style: { backgroundColor: j, width: o, height: "19px", color: j } }, cssClasses: [p + c._toolbarButtons[i].CommandName] }, g); c._backColor.setAttribute(h, f) } else { var z = { Copy: 1, Cut: 1, Paste: 1 }; if (!(Sys.Browser.agent != Sys.Browser.InternetExplorer && z[c._toolbarButtons[i].CommandName])) { g = $common.createElementFromTemplate({ nodeName: k, properties: { type: l, id: c._id + c._toolbarButtons[i].CommandName, name: c._toolbarButtons[i].CommandName, title: c._toolbarButtons[i].Tooltip, style: { width: "23px", height: o } }, cssClasses: [p + c._toolbarButtons[i].CommandName] }, c._topButtonContainer); g.setAttribute(h, f) } Array.add(c._buttons, g) } } }, _createEditableDiv: function () { var a = this, f = a.get_id(), d; a._elementVisible(a._container, c); if (a.get_displaySourceTab()) d = a._container.clientHeight - (a._topButtonContainer.clientHeight + 25); else d = a._container.clientHeight - a._topButtonContainer.clientHeight; a._elementVisible(a._container, b); a._editableDiv = $common.createElementFromTemplate({ nodeName: g, properties: { id: f + u, style: { height: d + e, overflow: o, clear: n }, contentEditable: c }, cssClasses: [p] }, a._container); a._editableDiv.innerHTML = a._textbox._element.value; a._oldContents = a._editableDiv.innerHTML; $common.setVisible(a._textbox._element, b) }, _createTopButtonContainer2: function () { var a = this; a._topButtonContainer2 = $common.createElementFromTemplate(a._topButtonContainerTemplate2, a._container); a._contentViewButton = $common.createElementFromTemplate(a._buttonContentTemplate, a._topButtonContainer2); a._sourceViewButton = $common.createElementFromTemplate(a._buttonSourceTemplate, a._topButtonContainer2) }, _createSourceViewDiv: function () { var a = this, f = a.get_id(), d = a._container.clientHeight - 25; a._sourceViewDiv = $common.createElementFromTemplate({ nodeName: g, properties: { id: f + v, style: { height: d + e, overflow: o, clear: n }, contentEditable: c }, cssClasses: [p] }, a._container); $common.setVisible(a._sourceViewDiv, b) }, _editableDiv_onblur: function () { var a = this; a._textbox._element.value = a._encodeHtml(); a._isFocusInEditableDiv = b; if (a._oldContents != a._editableDiv.innerHTML) { a._isDirty = c; a._oldContents = a._editableDiv.innerHTML; a._raiseEvent(q) } }, _editableDiv_onfocus: function () { this._isFocusInEditableDiv = b }, _sourceViewDiv_onblur: function () { var a = this; if (a._oldContents != (a._sourceViewDiv.innerText || a._sourceViewDiv.textContent)) { a._isDirty = c; if (a._sourceViewDiv.textContent != undefined) a._editableDiv.innerHTML = a._sourceViewDiv.textContent; else a._editableDiv.innerHTML = a._sourceViewDiv.innerText; a._oldContents = a._editableDiv.innerHTML; a._raiseEvent(q) } }, _textBox_onblur: function () { this._editableDiv.innerHTML = this._textbox._element.value }, _contentView_click: function () { var a = this; if (a._viewMode != r) { $common.setVisible(a._topButtonContainer, c); $common.setVisible(a._editableDiv, c); if (a._sourceViewDiv.textContent != undefined) a._editableDiv.innerHTML = a._sourceViewDiv.textContent; else a._editableDiv.innerHTML = a._sourceViewDiv.innerText; a._oldContents = a._editableDiv.innerHTML; $common.setVisible(a._sourceViewDiv, b); a._viewMode = r } }, _sourceView_click: function () { var a = this; if (a._viewMode != "source") { $common.setVisible(a._sourceViewDiv, c); if (a._sourceViewDiv.textContent != undefined) a._sourceViewDiv.textContent = a._editableDiv.innerHTML; else a._sourceViewDiv.innerText = a._editableDiv.innerHTML; a._oldContents = a._editableDiv.innerHTML; $common.setVisible(a._editableDiv, b); $common.setVisible(a._topButtonContainer, b); a._viewMode = "source" } }, _btnCancel_click: function () { this._popupBehavior.hide() }, _attributes: { style: "st_yle_", size: "si_ze_", color: "co_lor_", face: "fa_ce_", align: "al_ign_" }, _rgbToHex: function (b) { var a = /rgb\s?\(\s?(\d+)\s?,\s?(\d+)\s?,\s?(\d+)\s?\)/.exec(b); return "#" + (parseInt(a[3], 10) | parseInt(a[2], 10) << 8 | parseInt(a[1], 10) << 16).toString(16) }, _encodeHtml: function () { for (var e = Sys.Browser.agent == Sys.Browser.InternetExplorer, g = this._editableDiv.getElementsByTagName("*"), b, f = 0; b = g[f]; f++) { try { b.className = d; b.removeAttribute("class") } catch (j) { } try { b.id = d; b.removeAttribute("id") } catch (j) { } try { b.removeAttribute("width") } catch (j) { } e } var a = this._editableDiv.innerHTML; if (e) { var h = /\<[^\>]+\>/g; a = a.replace(h, function (a) { var c = d, b = d; if (a.toLowerCase().substring(0, 2) != "<a") { c = /\=\'([^\'])*\'/g; b = /\=([^\"][^\s\/\>]*)/g; return a.replace(c, '="$1"').replace(b, '="$1"') } else return a }) } var i = this._rgbToHex, c = function () { a = a.replace(/(\<[^\>]+)(rgb\s?\(\d{1,3}\s?\,\s?\d{1,3}\s?\,\s?\d{1,3}\s?\))([^\>]*\>)/gi, function (e, b, a, c) { return (b || d) + (a && i(a) || d) + (c || d) }) }; c(); c(); a = a.replace(/\sclass\=\"\"/gi, d).replace(/\sid\=\"\"/gi, d); a = a.replace(/\<(\/?)strong\>/gi, "<$1b>").replace(/\<(\/?)em\>/gi, "<$1i>"); a = a.replace(/&/ig, "&amp;").replace(/\xA0/ig, "&nbsp;"); a = a.replace(/</ig, "&lt;").replace(/>/ig, "&gt;").replace(/\'/ig, "&apos;").replace(/\"/ig, "&quot;"); return a }, _editableDiv_submit: function () { var c = 3, b = a; setTimeout(function () { this._editableDiv != a && this._editableDiv.focus() }, 0); if (Sys.Browser.agent != Sys.Browser.Firefox) if (document.selection) { b = document.selection.createRange(); b.moveStart("character", c); b.select() } else { b = window.getSelection(); b.collapse(this._editableDiv.firstChild, c) } this._textbox._element.value = this._encodeHtml() }, _executeCommand: function (h) { var j = "createLink", e = this; if (h.target.name == undefined) return; var q = Sys.Browser.agent == Sys.Browser.Firefox, m = Function.createDelegate(e, e._colorPicker_onchange); q && document.execCommand("styleWithCSS", b, b); var t = { JustifyRight: 1, JustifyLeft: 1, JustifyCenter: 1, JustifyFull: 1, Indent: 1, Outdent: 1 }; if (t[h.target.name]) try { document.execCommand(h.target.name, b, a) } catch (v) { if (v && v.result == 2147500037) { var r = window.getSelection().getRangeAt(0), k = document.createElement(g), n = b; k.style.height = "1px;"; if (r.startContainer.contentEditable == "true") { window.getSelection().collapseToEnd(); n = c } var i = window.getSelection().getRangeAt(0).startContainer; while (i && i.contentEditable != "true") i = i.parentNode; if (!i) throw "Selected node is not editable!"; i.insertBefore(k, i.childNodes[0]); document.execCommand(h.target.name, b, a); k.parentNode.removeChild(k); n && window.getSelection().addRange(r) } else window.console && window.console.log && window.console.log(v) } else if (h.target.name == j) { var s = prompt("Please insert  URL", d); s && document.execCommand(j, b, s) } else if (h.target.name == w) { e._commandName = h.target.name; e.saveSelection(); if (!e._foreColorPicker) { e._foreColorPicker = $create(Sys.Extended.UI.ColorPickerBehavior, { unselectable: f }, {}, {}, e._foreColor); e._foreColorPicker.set_sample(e._foreColor.parentNode); e._foreColorPicker.add_colorSelectionChanged(m) } e._foreColorPicker.show() } else if (h.target.name == y) { e._commandName = h.target.name; e.saveSelection(); if (!e._backColorPicker) { e._backColorPicker = $create(Sys.Extended.UI.ColorPickerBehavior, { unselectable: f }, {}, {}, e._backColor); e._backColorPicker.set_sample(e._backColor.parentNode); e._backColorPicker.add_colorSelectionChanged(m) } e._backColorPicker.show() } else if (h.target.name == "UnSelect") if (q) { e._editableDiv.focus(); var u = window.getSelection(); u.collapse(e._editableDiv.firstChild, 0) } else document.execCommand(h.target.name, b, a); else if (h.target.name == "InsertImage") { !e._isFocusInEditableDiv && e._editableDiv.focus(); e.saveSelection(); for (var o = Sys.Application.getComponents(), l = 0; l < o.length; l++) { var p = o[l]; if (Sys.Extended.UI.HtmlEditorExtenderBehavior.isInstanceOfType(p)) if (p._popupBehavior._visible) return } e._elementVisible(e._popupDiv, c); e._popupBehavior.show(); $common.setStyle(e._popupDiv, { position: "fixed", top: d, left: d, opacity: "1" }) } else document.execCommand(h.target.name, b, a) }, _colorPicker_onchange: function (d) { var a = "stylewithcss"; this.restoreSelection(); if (/backcolor/i.test(this._commandName)) { var e = Sys.Browser.agent == Sys.Browser.Firefox; if (e) { document.execCommand(a, b, c); document.execCommand("hilitecolor", b, "#" + d._selectedColor); document.execCommand(a, b, b) } else document.execCommand("backcolor", b, "#" + d._selectedColor) } else document.execCommand(this._commandName, b, "#" + d._selectedColor) }, saveSelection: function () { if (window.getSelection) this._savedRange = window.getSelection().getRangeAt(0); else if (document.selection) this._savedRange = document.selection.createRange() }, restoreSelection: function () { var b = this; b._isInFocus = c; if (b._savedRange != a) if (window.getSelection) { var d = window.getSelection(); d.rangeCount > 0 && d.removeAllRanges(); d.addRange(b._savedRange) } else if (document.createRange) window.getSelection().addRange(b._savedRange); else document.selection && b._savedRange.select() }, _elementVisible: function (a, f) { var e = "visibleChanged", d = "displayChanged"; if (a.tagName == "FORM") return; if (f) { if (a.style.display == "none") { a.style.display = t; a.setAttribute(d, c) } if (a.style.visibility == "hidden") { a.style.visibility = "visible"; a.setAttribute(e, c) } this._elementVisible(a.parentNode, c) } else { if (a.getAttribute(d)) { a.style.display = "none"; a.removeAttribute(d) } a.getAttribute(e) && a.removeAttribute(e); this._elementVisible(a.parentNode, b) } }, _raiseEvent: function (c, a) { var b = this.get_events().getHandler(c); if (b) { if (!a) a = Sys.EventArgs.Empty; b(this, a) } }, get_ButtonWidth: function () { return this._ButtonWidth }, set_ButtonWidth: function (a) { if (this._ButtonWidth != a) { this._ButtonWidth = a; this.raisePropertyChanged("ButtonWidth") } }, get_ButtonHeight: function () { return this._ButtonHeight }, set_ButtonHeight: function (a) { if (this._ButtonHeight != a) { this._ButtonHeight = a; this.raisePropertyChanged("ButtonHeight") } }, get_ToolbarButtons: function () { return this._toolbarButtons }, set_ToolbarButtons: function (a) { if (this._toolbarButtons != a) { this._toolbarButtons = a; this.raisePropertyChanged(z) } }, get_displaySourceTab: function () { return this._displaySourceTab }, set_displaySourceTab: function (a) { if (this._displaySourceTab != a) { this._displaySourceTab = a; this.raisePropertyChanged("DisplaySourceTab") } }, add_change: function (a) { this.get_events().addHandler(q, a) }, remove_change: function (a) { this.get_events().removeHandler(q, a) }, get_isDirty: function () { return this._isDirty } }; Sys.Extended.UI.HtmlEditorExtenderBehavior.registerClass("Sys.Extended.UI.HtmlEditorExtenderBehavior", Sys.Extended.UI.BehaviorBase); Sys.registerComponent(Sys.Extended.UI.HtmlEditorExtenderBehavior, { name: "HtmlEditorExtender", parameters: [{ name: z, type: "HtmlEditorExtenderButton[]" }] }); var A = []; Sys.Extended.UI.HtmlEditorExtenderBehavior.WebForm_OnSubmit = function () { var d = Sys.Extended.UI.HtmlEditorExtenderBehavior._originalWebForm_OnSubmit(); if (d) for (var b = Sys.Application.getComponents(), a = 0; a < b.length; a++) { var c = b[a]; Sys.Extended.UI.HtmlEditorExtenderBehavior.isInstanceOfType(c) && c._editableDiv_submit() } return d }, Sys.Extended.UI.HtmlEditorExtenderBehavior.IsDirty = function () { for (var d = Sys.Application.getComponents(), a = 0; a < d.length; a++) { var e = d[a]; if (Sys.Extended.UI.HtmlEditorExtenderBehavior.isInstanceOfType(e)) if (e._isDirty) return c } return b }, ajaxClientUploadComplete = function (b, i) { for (var c = a, h = Sys.Application.getComponents(), f = 0; f < h.length; f++) { var d = h[f]; if (Sys.Extended.UI.HtmlEditorExtenderBehavior.isInstanceOfType(d)) if (d._popupBehavior._visible) { c = d; f = d.length } } var g = i.get_postedUrl().replace("&amp;", "&"); if (c != a) { c.restoreSelection(); if (document.selection && document.selection.createRange) try { c._savedRange.pasteHTML("<img src='" + g + "' />") } catch (j) { var e = document.createElement("img"); e.src = g; c._savedRange.insertNode(e) } else { var e = document.createElement("img"); e.src = g; c._savedRange.insertNode(e) } if (b._filesInQueue.length == b._currentQueueIndex + 1) { while (b._filesInQueue.length >= 1) { b._filesInQueue[0].removeNodeFrom(b._queueContainer); Array.removeAt(b._filesInQueue, 0) } b._showFilesCount(); b._reset(); c._popupBehavior.hide() } } } } if (window.Sys && Sys.loader) Sys.loader.registerScript(b, ["ExtendedBase", "ExtendedCommon"], a); else a() })();
//END HtmlEditorExtender.HtmlEditorExtenderBehavior.js
if (typeof (Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();
//(function () { var fn = function () { $get("ctl00_sm_HiddenField").value += ';;AjaxControlToolkit, Version=4.1.7.429, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e:en-US:88c49a6a-0d1d-47b4-940b-08a788536015:de1feab2:f9cec9bc:ab09e3fe:f2c8e708:87104b7c:a67c2700:8613aea7:3202a5a2:720a52bf:589eaa30:be6fb298:1a2a8638:698129cf:59fb9c6f:fcf0e993:fb9b4c57:ccb96cf9:987bb99b:a4b66312:7a92f56c:a0b0f951'; Sys.Application.remove_load(fn); }; Sys.Application.add_load(fn); })();

;Type.registerNamespace("Web");Web||(Web={});Web.DataViewResources={};Web.DataViewResources.Common={WaitHtml:'<div class="Wait"></div>'};Web.DataViewResources.Pager={ItemsPerPage:"Items per page: ",PageSizes:[10,15,20,25],ShowingItems:"Showing \u003cb\u003e{0}\u003c/b\u003e-\u003cb\u003e{1}\u003c/b\u003e of \u003cb\u003e{2}\u003c/b\u003e items",SelectionInfo:" (<b>{0}</b> selected)",Refresh:"Refresh",Next:"Next »",Previous:"« Previous",Page:"Page",PageButtonCount:10};Web.DataViewResources.ActionBar={View:"View"};Web.DataViewResources.ModalPopup={Close:"Close",MaxWidth:800,MaxHeight:600,OkButton:"OK",CancelButton:"Cancel",SaveButton:"Save",SaveAndNewButton:"Save and New"};Web.DataViewResources.Menu={SiteActions:"Site Actions",SeeAlso:"See Also",Summary:"Summary",Tasks:"Tasks",About:"About"};Web.DataViewResources.HeaderFilter={GenericSortAscending:"Smallest on Top",GenericSortDescending:"Largest on Top",StringSortAscending:"Ascending",StringSortDescending:"Descending",DateSortAscending:"Earliest on Top",DateSortDescending:"Latest on Top",EmptyValue:"(Empty)",BlankValue:"(Blank)",Loading:"Loading...",ClearFilter:"Clear Filter from {0}",SortBy:"Sort by {0}",MaxSampleTextLen:80,CustomFilterOption:"Filter..."};Web.DataViewResources.InfoBar={FilterApplied:"A filter has been applied.",ValueIs:' <span class="Highlight">{0}</span> ',Or:" or ",And:" and ",EqualTo:"is equal to ",LessThan:"is less than ",LessThanOrEqual:"is less than or equal to ",GreaterThan:"is greater than ",GreaterThanOrEqual:"is greater than or equal to ",Like:"is like ",StartsWith:"starts with ",Empty:"empty",QuickFind:" Any field contains "};Web.DataViewResources.Lookup={SelectToolTip:"Select {0}",ClearToolTip:"Clear {0}",NewToolTip:"New {0}",SelectLink:"(select)",ShowActionBar:!0,DetailsToolTip:"View details for {0}",ShowDetailsInPopup:!0,GenericNewToolTip:"Create New"};Web.DataViewResources.Validator={Required:"Required",RequiredField:"This field is required.",EnforceRequiredFieldsWithDefaultValue:!1,NumberIsExpected:"A number is expected.",BooleanIsExpected:"A logical value is expected.",DateIsExpected:"A date is expected."};var _mn=Sys.CultureInfo.CurrentCulture.dateTimeFormat.MonthNames;Web.DataViewResources.Data={ConnectionLost:"The network connection has been lost. Try again?",NullValue:'<span class="NA">n/a</span>',NullValueInForms:"N/A",BooleanDefaultStyle:"DropDownList",BooleanOptionalDefaultItems:[[null,"N/A"],[!1,"No"],[!0,"Yes"]],BooleanDefaultItems:[[!1,"No"],[!0,"Yes"]],MaxReadOnlyStringLen:600,NoRecords:"No records found.",BlobHandler:"Blob.ashx",BlobDownloadLink:"download",BlobDownloadLinkReadOnly:'<span style="color:gray;">download</span>',BlobDownloadHint:"Click here to download the original file.",BatchUpdate:"update",NoteEditLabel:"edit",NoteDeleteLabel:"delete",NoteDeleteConfirm:"Delete?",UseLEV:'Paste \"{0}\"',Import:{UploadInstruction:"Please select the file to upload. The file must be in \u003cb\u003eCSV\u003c/b\u003e, \u003cb\u003eXLS\u003c/b\u003e, or \u003cb\u003eXLSX\u003c/b\u003e format.",DownloadTemplate:"Download import file template.",Uploading:"Your file is being uploaded to the server. Please wait...",MappingInstruction:"There are \u003cb\u003e{0}\u003c/b\u003e record(s) in the file \u003cb\u003e{1}\u003c/b\u003e ready to be processed.\u003cbr/\u003ePlease map the import fields from data file to the application fields and click \u003ci\u003eImport\u003c/i\u003e to start processing.",StartButton:"Import",AutoDetect:"(auto detect)",Processing:"Import file processing has been initiated. The imported data records will become available upon successful processing. You may need to refresh the relevant views/pages to see the imported records.",Email:"Send the import log to the following email addresses (optional)",EmailNotSpecified:"Recipient of the import log has not been specified. Proceed anyway?"},Filters:{Labels:{And:"and",Or:"or",Equals:"equals",Clear:"Clear",SelectAll:"(Select All)",Includes:"includes",FilterToolTip:"Change"},Number:{Text:"Number Filters",List:[{Function:"=",Text:"Equals",Prompt:!0},{Function:"<>",Text:"Does Not Equal",Prompt:!0},{Function:"<=",Text:"Less Than",Prompt:!0},{Function:">=",Text:"Greater Than",Prompt:!0},{Function:"$between",Text:"Between",Prompt:!0},{Function:"$in",Text:"Includes",Prompt:!0,Hidden:!0},{Function:"$notin",Text:"Does Not Include",Prompt:!0,Hidden:!0}]},Text:{Text:"Text Filters",List:[{Function:"=",Text:"Equals",Prompt:!0},{Function:"<>",Text:"Does Not Equal",Prompt:!0},{Function:"$beginswith",Text:"Begins With",Prompt:!0},{Function:"$doesnotbeginwith",Text:"Does Not Begin With",Prompt:!0},{Function:"$contains",Text:"Contains",Prompt:!0},{Function:"$doesnotcontain",Text:"Does Not Contain",Prompt:!0},{Function:"$endswith",Text:"Ends With",Prompt:!0},{Function:"$doesnotendwith",Text:"Does Not End With",Prompt:!0},{Function:"$in",Text:"Includes",Prompt:!0,Hidden:!0},{Function:"$notin",Text:"Does Not Include",Prompt:!0,Hidden:!0}]},Boolean:{Text:"Logical Filters",List:[{Function:"$true",Text:"Yes"},{Function:"$false",Text:"No"}]},Date:{Text:"Date Filters",List:[{Function:"=",Text:"Equals",Prompt:!0},{Function:"<>",Text:"Does Not Equal",Prompt:!0},{Function:"<",Text:"Before",Prompt:!0},{Function:">",Text:"After",Prompt:!0},{Function:"$between",Text:"Between",Prompt:!0},{Function:"$in",Text:"Includes",Prompt:!0,Hidden:!0},{Function:"$notin",Text:"Does Not Include",Prompt:!0,Hidden:!0},null,{Function:"$tomorrow",Text:"Tomorrow"},{Function:"$today",Text:"Today"},{Function:"$yesterday",Text:"Yesterday"},null,{Function:"$nextweek",Text:"Next Week"},{Function:"$thisweek",Text:"This Week"},{Function:"$lastweek",Text:"Last Week"},null,{Function:"$nextmonth",Text:"Next Month"},{Function:"$thismonth",Text:"This Month"},{Function:"$lastmonth",Text:"Last Month"},null,{Function:"$nextquarter",Text:"Next Quarter"},{Function:"$thisquarter",Text:"This Quarter"},{Function:"$lastquarter",Text:"Last Quarter"},null,{Function:"$nextyear",Text:"Next Year"},{Function:"$thisyear",Text:"This Year"},{Function:"$yeartodate",Text:"Year to Date"},{Function:"$lastyear",Text:"Last Year"},null,{Function:"$past",Text:"Past"},{Function:"$future",Text:"Future"},null,{Text:"All Dates in Period",List:[{Function:"$quarter1",Text:"Quarter 1"},{Function:"$quarter2",Text:"Quarter 2"},{Function:"$quarter3",Text:"Quarter 3"},{Function:"$quarter4",Text:"Quarter 4"},null,{Function:"$month1",Text:_mn[0]},{Function:"$month2",Text:_mn[1]},{Function:"$month3",Text:_mn[2]},{Function:"$month4",Text:_mn[3]},{Function:"$month5",Text:_mn[4]},{Function:"$month6",Text:_mn[5]},{Function:"$month7",Text:_mn[6]},{Function:"$month8",Text:_mn[7]},{Function:"$month9",Text:_mn[8]},{Function:"$month10",Text:_mn[9]},{Function:"$month11",Text:_mn[10]},{Function:"$month12",Text:_mn[11]}]}]}}};Web.DataViewResources.Form={ShowActionBar:!0,ShowCalendarButton:!0,RequiredFieldMarker:'<span class="Required">*</span>',RequiredFiledMarkerFootnote:"* - indicates a required field",SingleButtonRowFieldLimit:7,GeneralTabText:"General",Minimize:"Collapse",Maximize:"Expand"};Web.DataViewResources.Grid={InPlaceEditContextMenuEnabled:!0,QuickFindText:"Quick Find",QuickFindToolTip:"Type to search the records and press Enter",ShowAdvancedSearch:"Show Advanced Search",VisibleSearchBarFields:3,DeleteSearchBarField:"(delete)",HideAdvancedSearch:"Hide Advanced Search",PerformAdvancedSearch:"Search",ResetAdvancedSearch:"Reset",NewRowLink:"Click here to create a new record.",RootNodeText:"Top Level",FlatTreeToggle:"Switch to Hierarchy",HierarchyTreeModeToggle:"Switch to Flat List",AddConditionText:"Add search condition",AddCondition:"Add Condition",RemoveCondition:"Remove Condition",ActionColumnHeaderText:"Actions",Aggregates:{None:{FmtStr:"",ToolTip:""},Sum:{FmtStr:"Sum: {0}",ToolTip:"Sum of {0}"},Count:{FmtStr:"Count: {0}",ToolTip:"Count of {0}"},Avg:{FmtStr:"Avg: {0}",ToolTip:"Average of {0}"},Max:{FmtStr:"Max: {0}",ToolTip:"Maximum of {0}"},Min:{FmtStr:"Min: {0}",ToolTip:"Minimum of {0}"}},Freeze:"Freeze",Unfreeze:"Unfreeze"};Web.DataViewResources.Views={DefaultDescriptions:{$DefaultGridViewDescription:"This is a list of {0}.",$DefaultEditViewDescription:"Please review {0} information below. Click Edit to change this record, click Delete to delete the record, or click Cancel/Close to return back.",$DefaultCreateViewDescription:"Please fill this form and click OK button to create a new {0} record. Click Cancel to return to the previous screen."},DefaultCategoryDescriptions:{$DefaultEditDescription:"These are the fields of the {0} record that can be edited.",$DefaultNewDescription:"Complete the form. Make sure to enter all required fields.",$DefaultReferenceDescription:"Additional details about {0} are provided in the reference information section."}};Web.DataViewResources.Actions={Scopes:{Grid:{Select:{HeaderText:"Select"},Edit:{HeaderText:"Edit"},Delete:{HeaderText:"Delete",Confirmation:"Delete?"},Select:{HeaderText:"Select"},Duplicate:{HeaderText:"Duplicate"},New:{HeaderText:"New"},BatchEdit:{HeaderText:"Batch Edit",CommandArgument:{editForm1:{HeaderText:"Batch Edit (Form)"}}},Open:{HeaderText:"Open"}},Form:{Edit:{HeaderText:"Edit"},Delete:{HeaderText:"Delete",Confirmation:"Delete?"},Cancel:{HeaderText:"Close",WhenLastCommandName:{Duplicate:{HeaderText:"Cancel"},Edit:{HeaderText:"Cancel"},New:{HeaderText:"Cancel"}}},Update:{HeaderText:"OK",WhenLastCommandName:{BatchEdit:{HeaderText:"Update Selection",Confirmation:"Update?"}}},Insert:{HeaderText:"OK"},Confirm:{HeaderText:"OK"}},ActionBar:{_Self:{Actions:{HeaderText:"Actions"},Report:{HeaderText:"Report"},Record:{HeaderText:"Record"}},New:{HeaderText:"New {0}",Description:"Create a new {0} record.",HeaderText2:"New",VarMaxLen:15},Edit:{HeaderText:"Edit"},Delete:{HeaderText:"Delete",Confirmation:"Delete?"},ExportCsv:{HeaderText:"Download",Description:"Download items in CSV format."},ExportRowset:{HeaderText:"Export to Spreadsheet",Description:"Analyze items with spreadsheet\u003cbr/\u003eapplication."},ExportRss:{HeaderText:"View RSS Feed",Description:"Syndicate items with an RSS reader."},Import:{HeaderText:"Import From File",Description:"Upload a CSV, XLS, or XLSX file\u003cbr/\u003eto import records."},Update:{HeaderText:"Save",Description:"Save changes to the database."},Insert:{HeaderText:"Save",Description:"Save new record to the database."},Cancel:{HeaderText:"Cancel",WhenLastCommandName:{Edit:{HeaderText:"Cancel",Description:"Cancel all record changes."},New:{HeaderText:"Cancel",Description:"Cancel new record."}}},Report:{HeaderText:"Report",Description:"Render a report in PDF format"},ReportAsPdf:{HeaderText:"PDF Document",Description:"View items as Adobe PDF document.\u003cbr/\u003eRequires a compatible reader."},ReportAsImage:{HeaderText:"Multipage Image",Description:"View items as a multipage TIFF image."},ReportAsExcel:{HeaderText:"Spreadsheet",Description:"View items in a formatted\u003cbr/\u003eMicrosoft Excel spreadsheet."},ReportAsWord:{HeaderText:"Microsoft Word",Description:"View items in a formatted\u003cbr/\u003eMicrosoft Word document."},DataSheet:{HeaderText:"Show in Data Sheet",Description:"Display items using a data sheet\u003cbr/\u003eformat."},Grid:{HeaderText:"Show in Standard View",Description:"Display items in the standard\u003cbr/\u003elist format."},Tree:{HeaderText:"Show Hierarchy",Description:"Display hierarchical relationships."},Search:{HeaderText:"Search",Description:"Search {0}"}},Row:{Update:{HeaderText:"Save",WhenLastCommandName:{BatchEdit:{HeaderText:"Update Selection",Confirmation:"Update?"}}},Insert:{HeaderText:"Insert"},Cancel:{HeaderText:"Cancel"}},ActionColumn:{Edit:{HeaderText:"Edit"},Delete:{HeaderText:"Delete",Confirmation:"Delete?"}}}};Web.DataViewResources.Editor={Undo:"Undo",Redo:"Redo",Bold:"Bold",Italic:"Italic",Underline:"Underline",Strikethrough:"Strike Through",Subscript:"Sub Script",Superscript:"Super Script",JustifyLeft:"Justify Left",JustifyCenter:"Justify Center",JustifyRight:"Justify Right",JustifyFull:"Justify Full",InsertOrderedList:"Insert Ordered List",InsertUnorderedList:"Insert Unordered List",CreateLink:"Create Link",UnLink:"Unlink",RemoveFormat:"Remove Format",SelectAll:"Select All",UnSelect:"UnSelect",Delete:"Delete",Cut:"Cut",Copy:"Copy",Paste:"Paste",BackColor:"Back Color",ForeColor:"Fore Color",FontName:"Font Name",FontSize:"Font Size",Indent:"Indent",Outdent:"Outdent",InsertHorizontalRule:"Insert Horizontal Rule",HorizontalSeparator:"Separator"};Web.DataViewResources.Mobile={UpOneLevel:"Up One Level",Back:"Back",Sort:"Sort",SortByField:"Select a field to change the sort order of \u003cb\u003e{0}\u003c/b\u003e.",SortByOptions:"Select the sort order of \u003cb\u003e{0}\u003c/b\u003e by the field \u003cb\u003e{1}\u003c/b\u003e in the list of options below.",DefaultOption:"Default",Filter:"Filter",List:"List (One Column)",Cards:"List",Grid:"Grid",Map:"Map",Calendar:"Calendar",ZoomIn:"Zoom in",ZoomOut:"Zoom out",Directions:"Directions",AlternativeView:"Select an alternative view of data.",PresentationStyle:"Select a data presentation style.",LookupViewAction:"View",LookupSelectAction:"Select",LookupClearAction:"Clear",LookupNewAction:"New",LookupInstruction:"Please select \u003cb\u003e{0}\u003c/b\u003e in the list. ",LookupOriginalSelection:'The original selection is \u003cb\u003e\"{0}\"\u003c/b\u003e. ',EmptyContext:"Actions are not available.",Favorites:"Favorites",History:"History",FilterSiteMap:"Filter site map...",ResumeLookup:"Resume Lookup",ResumeEntering:"Resume Entering",ResumeEditing:"Resume Editing",ResumeBrowsing:"Resume Browsing",ResumeViewing:"Resume Viewing",Menu:"Menu",Home:"Home",Settings:"Settings",Sidebar:"Sidebar",ClearText:"Clear Text",SeeAll:"See All",More:"More",TouchUINotSupported:"Touch UI is not supported in this browser.",ShowingItemsInfo:"Showing {0} items.",DisplayDensity:{Label:"Display Density",List:{Condensed:"Condensed",Compact:"Compact",Comfortable:"Comfortable"}},Themes:{Label:"Theme",List:{Light:"Light",Dark:"Dark",Aquarium:"Aquarium",Azure:"Azure",Belltown:"Belltown",Berry:"Berry",Bittersweet:"Bittersweet",Cay:"Cay",Citrus:"Citrus",Classic:"Classic",Construct:"Construct",Convention:"Convention",DarkKnight:"Dark Knight",Felt:"Felt",Graham:"Graham",Granite:"Granite",Grapello:"Grapello",Gravity:"Gravity",Lacquer:"Lacquer",Laminate:"Laminate",Lichen:"Lichen",Mission:"Mission",Modern:"Modern",ModernRose:"Modern Rose",Municipal:"Municipal",Petal:"Petal",Pinnate:"Pinnate",Plastic:"Plastic",Ricasso:"Ricasso",Simple:"Simple",Social:"Social",Summer:"Summer",Vantage:"Vantage",Verdant:"Verdant",Viewpoint:"Viewpoint",WhiteSmoke:"White Smoke",Yoshi:"Yoshi"}},Transitions:{Label:"Transitions",List:{none:"None",slide:"Slide",fade:"Fade",pop:"Pop",flip:"Flip",turn:"Turn",flow:"Flow",slideup:"Slide Up",slidedown:"Slide Down"}},LabelsInList:{Label:"Labels In List",List:{DisplayedAbove:"Displayed Above",DisplayedBelow:"Displayed Below"}},LabelsInForm:{Label:"Labels In Form",List:{AlignedLeft:"Aligned Left",AlignedRight:"Aligned Right"}}};typeof Sys!="undefined"&&Sys.Application.notifyScriptLoaded()
;function $closeHovers(){var n=Web.HoverMonitor._instance;n&&n.close()}function $hoverOver(n,t){while(t-->0)n=n.parentNode;n.focus();$skipUnhover()}function $skipUnhover(){Web.HoverMonitor._instance._skipUnhover=!0}function $nextTabIndex(){var n=Web.HoverMonitor._instance;return n?n.nextTabIndex():-1}function $showHover(n,t,i,r){Web.HoverMonitor._instance.hover(n,t,i,r)}function $hideHover(){__ie6&&event.fromElement&&event.fromElement.tagName=="A"&&event.fromElement.parentNode.tagName=="DIV"||Web.HoverMonitor._instance.unhover()}function $selectItem(n,t){Web.HoverMonitor._instance.select(n,t)}function $toggleHover(){Web.HoverMonitor._instance.toggle()}function $preventToggleHover(){Web.HoverMonitor._preventToggleHover=!0}function $refreshHoverMenu(n){Web.HoverMonitor._instance.refresh(n)}function $activateItem(n,t,i){Web.HoverMonitor._instance.activate(n,t,i)}function $deactivateItem(n,t){Web.HoverMonitor._instance.deactivate(n,t)}function $registerItems(n,t,i,r,u){i==null&&(i=Web.HoverStyle.Auto);r==null&&(r=Web.PopupPosition.Left);u==null&&(u=Web.ItemDescriptionStyle.Inline);$unregisterItems(n);Web.HoverMonitor.Families[n]={items:t,style:i,position:r,itemDescriptionStyle:u}}function $unregisterItems(n){var t=Web.HoverMonitor.Families[n],i;if(t&&t.items){for(i=0;i<t.items.length;i++)t.items[i].dispose();Array.clear(t.items)}delete Web.HoverMonitor.Families[n]}Type.registerNamespace("Web");Web.Item=function(n,t,i){this._family=n;this._text=t;this._description=i;this._depth=0};Web.Item.prototype={get_family:function(){return this._family},get_text:function(){return this._text},set_text:function(n){this._text=n},get_description:function(){return this._description},set_description:function(n){this._description=n},get_url:function(){return this._url},set_url:function(n){this._url=n},context:function(n){if(arguments.length==0)return this._context;this._context=n},get_script:function(){return this._script},set_script:function(n,t){this._script=t==null?n:String._toFormattedString(!1,arguments)},get_cssClass:function(){return this._cssClass},set_cssClass:function(n){this._cssClass=n},get_disabled:function(){return this._disabled},set_disabled:function(n){this._disabled=n},get_group:function(){return this._group},set_group:function(n){this._group=n},get_selected:function(){return this._selected},set_selected:function(n){this._selected=n},get_children:function(){return this._children},get_confirmation:function(){return this._confirmation},set_confirmation:function(n){this._confirmation=n},get_dynamic:function(){return this._dynamic},set_dynamic:function(n){this._dynamic=n;this._cssClass=n?"Dynamic":"";this._disabled=n},get_depth:function(){return this._depth},get_parent:function(){return this._parent},get_path:function(){if(!this._path){var n=this._parent?this._parent.get_path()+"/":"";n+=this._parent?Array.indexOf(this._parent.get_children(),this):Array.indexOf(Web.HoverMonitor.Families[this._family].items,this);this._path=n}return this._path},get_id:function(){return this._id||(this._id=String.format("HoverMonitor${0}$Item${1}",this._family,this.get_path().replace(/\//g,"_"))),this._id},get_children:function(){return this._children},addChild:function(n){n._parent=this;this._children||(this._children=[],this._cssClass="Parent");n._depth=this._depth+1;Array.add(this._children,n)},dispose:function(){if(this._parent=null,this._children){for(var n=0;n<this._children;n++)this._children[n].dispose();Array.clear(this._children);this._children=null}},findChild:function(n){return Web.Item.find(this._family,n,this._children)}};Web.Item.find=function(n,t,i){var u,r,f,e;if(String.isNullOrEmpty(t))return null;if(!i){if(u=Web.HoverMonitor.Families[n],!u)return null;i=u.items}return(r=t.match(/^(\d+)(\/(.+?)$|$)/),!r)?null:(f=parseInt(r[1]),!i||f>=i.length)?null:(e=i[f],r[3]&&r[3].length>0?e.findChild(r[3]):e)};Web.Menu=function(n){Web.Menu.initializeBase(this,[n]);this.set_orientation(Web.MenuOrientation.Horizontal);this.set_cssClass("Menu");this.set_hoverStyle(Web.HoverStyle.Auto);this.set_itemDescriptionStyle(Web.ItemDescriptionStyle.ToolTip);this.set_popupPosition(Web.PopupPosition.Left)};Web.Menu.prototype={initialize:function(){Web.Menu.callBaseMethod(this,"initialize")},dispose:function(){for(var i,t=this.get_nodes(),n=0;n<t.length;n++)i=t[n],i.children&&$unregisterItems(this.get_id()+"_"+n);Web.Menu.callBaseMethod(this,"dispose")},updated:function(){var r,y,p,o,n,t,e,u,c,w,s,i,h,l,f,a,b,v,k;if(Web.Menu.callBaseMethod(this,"updated"),Web.Menu.MainMenuId||(Web.Menu.MainMenuId=this.get_id(),Web.Menu.MainMenuElemId=this._element.id),r=this.get_nodes(),y=Web.DataViewResources.Menu,r){if(p=this.get_presentationStyle(),p>0&&(typeof __tf=="undefined"||!(__tf!=4))){Sys.UI.DomElement.addCssClass(this._element,"menu "+(p==1?"two-level":"nav-button"));this._createMenu(r,this._element,1);return}for(o=null,n=0;n<r.length;n++)if(t=r[n],this._currentNode=t,t.children){for(e=this.get_id()+"_"+n,u=[],c=0;c<t.children.length;c++)Array.add(u,this._createItem(e,t.children[c]));this.set_items(u);$registerItems(e,u,this.get_hoverStyle(),this.get_popupPosition(),this.get_itemDescriptionStyle());t.selected&&(o=t)}if(this._render(r),this.get_showSiteActions()){if(e=this.get_id()+"_SiteActions",u=[],this._selectedItem)for(w=this._selectedItem.get_parent()?this._selectedItem.get_parent().get_children():Web.HoverMonitor.Families[this._selectedItem.get_family()].items,n=0;n<w.length;n++)s=w[n],String.isNullOrEmpty(s.get_url())||s==this._selectedItem||(i=new Web.Item(e,s.get_text(),s.get_description()),i.set_url(s.get_url()),i.set_cssClass(s.get_cssClass()),Array.add(u,i));if(u.length==0)for(!o||!o.children||o.children.length==1&&o.children[0].selected||(r=o.children),n=0;n<r.length;n++)t=r[n],String.isNullOrEmpty(t.url)||t.selected&&r.length!=1||(i=new Web.Item(e,t.title,t.description),i.set_url(t.url),i.set_cssClass(t.cssClass),Array.add(u,i));if($registerItems(e,u,Web.HoverStyle.ClickAndStay,Web.PopupPosition.Right,Web.ItemDescriptionStyle.Inline),Web.Menu._siteActionsFamily=e,h=$getSideBar(),h&&u.length>0){for(n=0;n<h.childNodes.length;n++)if(l=h.childNodes[n],l.className&&Sys.UI.DomElement.containsCssClass(l,"About")){l.getElementsByTagName("div")[1].innerHTML=y.About;break}for(f=new Sys.StringBuilder,f.append('<div class="Inner">'),f.appendFormat('<div class="Header">{0}<\/div>',y.SeeAlso),n=0;n<u.length;n++)if(i=u[n],String.isNullOrEmpty(i.get_url())||f.appendFormat('<div class="Item"><a href="{0}" title="{2}">{1}<\/a><\/div>',i.get_url(),String.trimLongWords(i.get_text()),String.trimLongWords(i.get_description())),n>5)break;f.append("<\/div>");a=document.createElement("div");a.className="TaskBox SeeAlso";a.innerHTML=f.toString();f.clear();h.insertBefore(a,h.childNodes[h.childNodes.length-1])}if(b=$get("TableOfContents"),b){for(f.append('<div class="TableOfContents">'),n=0;n<r.length;n++)t=r[n],f.appendFormat('<div class="Header">',t.get_text());f.append("<\/div>")}}else v=Web.PageState.read(this.get_id()),v!=null&&(k=this._element.getElementsByTagName("td"),this.select(v,k[v]))}},get_presentationStyle:function(){return this._presentationStyle},set_presentationStyle:function(n){this._presentationStyle=n},_createNewColumn:function(n,t,i){return n.cssClass&&n.cssClass.match(/(^|\s*)menu-new-column(\s*|$)/)?$("<div>").addClass("column "+i).appendTo(t):null},_createNavButton:function(n){var u=null,i=null,a=!1,v=!1,f=null,t,o,y,s,b,h,c,k,l,d;$("div.PageMenuBar").hide();t=$("<ul>").attr("id",this._id).addClass("root-level");o=$("<div>").addClass("menu-button-container").css({position:"absolute",height:"1px",left:"0px",top:"0px"});o.appendTo(document.body);t.appendTo(o);y=function(n,t){for(var r=0;r<n.length;r++){var i=n[r],u=$("<li>").appendTo(t),e=$("<a>").attr({href:i.url,title:i.description}).text(i.title).appendTo(u);i.selected&&!i.children&&(e.addClass("selected"),f=e);i.children&&i.children.length>0&&y(i.children,$("<ul>").addClass("menu-level").appendTo(u))}};y(n,t);var e=0,g=$("#"+this._id+" > li > a").each(function(){var n=$(this).outerWidth();n>e&&(e=n)}),r=$("#PageHeaderBar").addClass("menu-button-bar").contents().wrap('<span class="menu-button"><\/span>').parent().button({icons:{secondary:"ui-icon-triangle-1-s"}}),p=r.width()-4,w=t.find("ul").addClass("sub-level");for(s=w.length-1;s>=0;s--)b=$(w[s]),h=0,b.find("> li > a").each(function(){var n=$(this).outerWidth();n>h&&(h=n)}).width(h+25);t.find("ul").each(function(){$(this).find("ul").length==0&&$(this).addClass("last-level")});e+=25;p>e?t.width(p):t.width(e);c=function(){i||(i=setTimeout(function(){v||(t.hide(),r.removeClass("menu-button-active"));i=null},200))};k=function(){i&&(clearTimeout(i),i=null)};o.find("ul").hover(function(){v=!0},function(n){$(n.toElement).find("li:parent ul.menu-level:parent").length==0&&(v=!1,c())});t.menu({position:{of:"ul:has(a.ui-state-focus):last"},select:function(){},blur:function(){a||c()},focus:function(){i&&(clearTimeout(i),i=null);t.show()}});l=t.outerHeight();t.find("ul").show().each(function(){var n=$(this).outerHeight();n>l&&(l=n)}).andSelf().height(l).hide();t.hide();d=0;r.hover(function(){a=!0;k();u=setTimeout(function(){var i,n,e;if(r.addClass("menu-button-active"),t.show().position({my:"left top",at:"left bottom",of:r}),u=null,f){for(f.parentsUntil("div.menu-button-container","li").find("a:first").not("a.selected").addClass("ui-state-active"),t.show().position({my:"left top",at:"left bottom",of:r}),i=f.parentsUntil("div.menu-button-container","ul").show(),n=i.length-2;n>=0;n--)e=$(i[n]),e.position({my:"left top",at:"right top",of:$(i[n+1])});f=null}},500)},function(){a=!1;u&&(clearTimeout(u),u=null);c()})},_createMenu:function(n,t,i){var p=this._presentationStyle==2,h,e,o,f,r,v,c,l,u,s,a,w,b,k,y;if(i==1&&p){this._createNavButton(n);return}if(h=null,e="level"+i,i>1&&(t=$("<div>").addClass("children "+e).appendTo(t.first())),o=null,i==2)for(f=0;f<n.length;f++)if(r=n[f],o=this._createNewColumn(r,t,e),o){o.addClass("first");break}for(v=$("<ul>").addClass(e).appendTo(o?o:t),c=!0,f=0;f<n.length;f++)r=n[f],o&&f>0&&(l=this._createNewColumn(r,t,e),l&&(o=l,v=$("<ul>").addClass(e).appendTo(l),c=!0)),u=$("<li>").addClass(e).appendTo(v),r.selected&&(u.addClass("current"),h=r),f==0&&u.addClass("first"),f==n.length-1&&u.addClass("last"),s=r.url,String.isNullOrEmpty(s)&&i==1&&(s="javascript:void(0)"),String.isNullOrEmpty(s)?(b=$("<span>").addClass("text "+e).text(r.title).appendTo(u),c&&(c=!1,b.addClass("first"))):(a=$("<a>").attr({href:s,"class":e,tabIndex:$nextTabIndex()}).appendTo(u),s.match(Web.Menu.UrlRegex.match)&&(a.attr("menuItemUrl",s),a.click(function(n){n.preventDefault();Web.Menu.navigate(this.getAttribute("menuItemUrl"))})),w=$("<span>").addClass("outer").appendTo(a),$("<span>").addClass("inner").appendTo(w).text(r.title).attr("title",r.description)),i==1&&(p?u.hover(function(){var r=$(this).addClass("hover"),n;if(r.siblings("li").addClass("unhover"),n=$("div.level2:first",this),n.size()==1){var t=$(this).parents("div.nav-button.menu:first"),i=t.offset(),u=t.outerWidth(),f=t.outerHeight();i.left+=u;n.removeAttr("style").offset({left:0,top:0}).css("width","auto");n.removeAttr("style").offset(i)}},function(){var n=$(this).removeClass("hover").siblings("li").removeClass("unhover");$("div.level2:first",this).hide()}):u.hover(function(){var i=$(this).addClass("hover"),t,n,r;if(i.siblings("li").addClass("unhover"),$closeHovers(),t=$("div.level2:first",this),t.size()==1){n=i.offset();n.top+=i.outerHeight();var f=i.outerWidth(),u=$(window).width(),e=$(window).height();t.removeAttr("style").offset({left:0,top:0});r=t.outerWidth();n.left+r>u&&(n.left=u-r-10);n.left<0&&(n.left=0);t.hide().removeAttr("style").offset(n)}},function(){var n=$(this).removeClass("hover").siblings("li").removeClass("unhover");$("div.level2:first",this).hide()})),k=r.children&&r.children.length>0,k?(y=this._createMenu(r.children,u,i+1),y&&(h=y,u.addClass("selected")),u.addClass("parent"),i==1&&r.cssClass&&$("div.children:first",u).addClass(r.cssClass)):u.addClass("terminal"),i==2&&t.hide();return h},get_nodes:function(){return this._nodes||(this._nodes=Web.Menu.Nodes[this.get_id()]),this._nodes},set_nodes:function(n){this._nodes=n},get_orientation:function(){return this._orientation},set_orientation:function(n){this._orientation=n},get_cssClass:function(){return this._cssClass},set_cssClass:function(n){this._cssClass=n},get_hoverStyle:function(){return this._hoverStyle},set_hoverStyle:function(n){this._hoverStyle=n},get_itemDescriptionStyle:function(){return this._itemDescriptionStyle},set_itemDescriptionStyle:function(n){this._itemDescriptionStyle=n},get_popupPosition:function(){return this._popupPosition},set_popupPosition:function(n){this._popupPosition=n},get_showSiteActions:function(){return this._showSiteActions},set_showSiteActions:function(n){this._showSiteActions=n},get_items:function(){return this._items},set_items:function(n){this._items=n},_createItem:function(n,t,i){var r=new Web.Item(n,t.title,t.description),u;if(r.set_url(t.url),t.selected&&(r.set_selected(t.selected),this._currentNode.selected=!0,this._selectedItem=r),i&&i.addChild(r),t.children)for(u=0;u<t.children.length;u++)this._createItem(n,t.children[u],r);return r},_render:function(n){var t,r,i,u;for($("td.Item",this._element).unbind("mouseover mouseout click"),$("td.Item a.Link",this._element).unbind("click focus blur"),t=new Sys.StringBuilder,t.appendFormat('<table class="{0}" cellpadding="0" cellspacing="0" style="float:left">',this.get_cssClass()),this.get_orientation()==Web.MenuOrientation.Horizontal&&t.append("<tr>"),r=0;r<n.length;r++)i=n[r],this.get_orientation()==Web.MenuOrientation.Vertical&&t.append("<tr>"),t.appendFormat('<td class="Item{3}" onmouseover2="$showHover(this,&quot;{0}_{1}&quot;,&quot;{4}&quot;)" onmouseout2="$hideHover(this)" onclick2="if(this._skip)this._skip=false;else $find(&quot;{0}&quot).select({1},this);"{7}><span class="Outer"><span class="Inner"><span class="Link"><a href="javascript:" class="Link" onclick2="this.parentNode.parentNode.parentNode.parentNode._skip=true;$hoverOver(this, 4);$find(&quot;{0}&quot).select({1},this);return false;" onfocus2="$showHover(this,&quot;{0}_{1}&quot;,&quot;{4}&quot;, 4)" onblur2="$hideHover(this)" tabIndex="{6}" {5}>{2}<\/a><\/span><\/span><\/span><\/td>',this.get_id(),r,$appfactory.htmlEncode(i.title),(i.children?" Parent":"")+(i.selected?" Selected":""),this.get_cssClass(),String.isNullOrEmpty(i.description)||this.get_itemDescriptionStyle()==Web.ItemDescriptionStyle.None?"":String.format(' title="{0}"',$appfactory.htmlAttributeEncode(i.description)),$nextTabIndex(),i.hidden=="true"?' style="display:none"':""),this.get_orientation()==Web.MenuOrientation.Vertical&&t.append("<\/tr>");this.get_orientation()==Web.MenuOrientation.Horizontal&&t.append("<\/tr>");t.append("<\/table>");this.get_showSiteActions()&&(t.appendFormat('<table class="Menu SiteActions" cellpadding="0" cellspacing="0" style="float:right"><tr><td class="Item Parent" onmouseover2="$showHover(this,&quot;{0}_SiteActions&quot;,&quot;SiteActions&quot;)" onmouseout2="$hideHover(this)" onclick2="if(this._skip)this._skip=false;else $toggleHover()"><span class="Outer"><span class="Inner"><span class="Link"><a href="javascript:" class="Link" onclick2="this.parentNode.parentNode.parentNode.parentNode._skip=true;$toggleHover();$hoverOver(this, 4);return false" onfocus2="$showHover(this,&quot;{0}_SiteActions&quot;,&quot;SiteActions&quot;, 4)" onblur2="$hideHover(this)" tabIndex="{1}">{2}<\/a><\/span><\/span><\/span><\/td><\/tr><\/table>',this.get_id(),$nextTabIndex(),Web.DataViewResources.Menu.SiteActions),u=document.createElement("div"),this._element.parentNode.appendChild(u));this._element.innerHTML=t.toString();$("td.Item",this._element).mouseover(function(){return __evalEvent.call(this,"mouseover")}).mouseout(function(){return __evalEvent.call(this,"mouseout")}).click(function(n){return n.preventDefault(),__evalEvent.call(this,"click")});$("td.Item a.Link",this._element).click(function(n){return n.preventDefault(),__evalEvent.call(this,"click")}).focus(function(){return __evalEvent.call(this,"focus")}).blur(function(){return __evalEvent.call(this,"blur")});t.clear()},select:function(n,t){var r,u,i;if(_body_createPageContext(),r=this.get_nodes()[n],String.isNullOrEmpty(r.elementId))Web.Menu.navigate(r.url);else{for(Web.PageState.write(this.get_id(),n),u=$get(r.elementId),i=0;i<this.get_nodes().length;i++)r=this.get_nodes()[i],String.isNullOrEmpty(r.elementId)||Sys.UI.DomElement.setVisible($get(r.elementId),!1);for(Sys.UI.DomElement.setVisible(u,!0);!Sys.UI.DomElement.containsCssClass(t,"Item");)t=t.parentNode;for(i=0;i<t.parentNode.childNodes.length;i++)Sys.UI.DomElement.removeCssClass(t.parentNode.childNodes[i],"Selected");Sys.UI.DomElement.addCssClass(t,"Selected");_body_performResize();try{t.focus()}catch(f){}}}};Web.Menu.Nodes=[];Web.Menu.findNode=function(n,t){var r,i,u;for(t||(t=this.Nodes[this.MainMenuId]),r=0;r<t.length;r++){if(i=t[r],i.url.match(n))return i;if(i.children&&(u=Web.Menu.findNode(n,i.children),u))return u}return null};Web.Menu.get_siteActionsFamily=function(){return Web.Menu._siteActionsFamily};Web.Menu.get_siteActions=function(){return Web.HoverMonitor.Families[this._siteActionsFamily].items};Web.Menu.set_siteActions=function(n){Web.HoverMonitor.Families[this._siteActionsFamily].items=n};Web.Menu.UrlRegex=/^(_.+?):(.+?)$/;Web.Menu.navigate=function(n){if(!String.isNullOrEmpty(n)){var t=n.match(Web.Menu.UrlRegex);t?window.open(t[2],t[1]):($appfactory._navigated=!0,location.href=n)}};Web.Menu.registerClass("Web.Menu",Sys.UI.Behavior);Web.HoverStyle={None:0,Auto:1,Click:2,ClickAndStay:3};Web.PopupPosition={Left:0,Right:1};Web.MenuOrientation={Horizontal:0,Vertical:1};Web.ItemDescriptionStyle={None:0,Inline:1,ToolTip:2};Web.HoverMonitor=function(){Web.HoverMonitor.initializeBase(this);this._popups=[]};Web.HoverMonitor.prototype={initialize:function(){Web.HoverMonitor.callBaseMethod(this,"initialize");this._hoverArrowHandlers={click:this._hoverArrow_click,mouseover:this._hoverArrow_mouseover,mouseout:this._hoverArrow_mouseout};this._hoverMenuHandlers={mouseover:this._hoverMenu_mouseover,mouseout:this._hoverMenu_mouseout};this._documentKeydownHandler=Function.createDelegate(this,this._document_keydown);this._documentClickHandler=Function.createDelegate(this,this._document_click);$addHandler(document,"keydown",this._documentKeydownHandler);$addHandler(document,"click",this._documentClickHandler);this._tabIndex=1},dispose:function(){delete this._factory;for(var n=0;n<Web.HoverMonitor.Families.length;n++)$unregisterItems(Web.HoverMonitor.Families[n].family);for($removeHandler(document,"click",this._documentClickHandler),$removeHandler(document,"keydown",this._documentKeydownHanlder),this.stopClose(),this.stopCloseItem(),this.stopOpen(),n=0;n<this._popups.length;n++)this._destroyPopup(n);this._destroyFrame(this._hoverFrame);this._destroyFrame(this._openFrame);Web.HoverMonitor.callBaseMethod(this,"dispose")},nextTabIndex:function(){return this._tabIndex++},_createPopup:function(n){var t,i,r;return this._popups[n]||(t=document.createElement("div"),document.body.appendChild(t),t.className="HoverMenu",Sys.UI.DomElement.setVisible(t,!1),i=$create(AjaxControlToolkit.PopupBehavior,{id:"HoverMonitorPopup"+n},null,null,t),r={behavior:i,container:t},this._popups[n]=r,$addHandlers(t,this._hoverMenuHandlers,this)),this._popups[n]},_destroyPopup:function(n){var t=this._popups[n];t&&(t.behavior.dispose(),$clearHandlers(t.container),t.container.parentNode.removeChild(t.container),delete t.container,delete this._popups[n])},_renderPopup:function(n,t,i,r){var u=new Sys.StringBuilder,l,e,o,h,s,a,f,v;n.container.style.width="";n.container.style.height="";n.container.style.overflow="";n.container.className=String.format("HoverMenu {0}_HoverMenu",r);var y=!1,c=this.get_itemDescriptionStyle(t),p=Web.HoverMonitor.Families[t];if(p){for(l=i?i.get_children():p.items,e=null,o=0;o<l.length;o++)i=l[o],i.get_group()!=e&&(e!=null&&u.append("<\/div>"),e=i.get_group(),e!=null&&u.append('<div class="Group">')),i.get_text()?(h=i.get_selected(),u.append('<a href="javascript:" class="Item'),i.get_cssClass()&&u.append(" "+i.get_cssClass()),h&&u.append(" Selected"),i.get_disabled()&&u.appendFormat(" {0}Disabled Disabled",i.get_cssClass()),u.append('"'),i.get_disabled()?u.append(' onclick2="return false"'):(path=i.get_path(),u.appendFormat(' onclick2="$selectItem(&quot;{0}&quot;,&quot;{1}&quot);return false"',t,path),u.appendFormat(' onmouseover2="$activateItem(&quot;{0}&quot;,&quot;{1}&quot;)" onmouseout2="$deactivateItem(&quot;{0}&quot;,&quot;{1}&quot;)"',t,path)),s=c==Web.ItemDescriptionStyle.None?null:i.get_description(),i.get_children()||s==null||c!=Web.ItemDescriptionStyle.ToolTip||u.appendFormat(' title="{0}"',$appfactory.htmlAttributeEncode(s)),u.appendFormat(' id="{0}"',i.get_id()),u.append(">"),h&&i.get_children()&&u.append('<div class="Parent">'),a=String.htmlEncode(i.get_text()),String.isNullOrEmpty(s)||c!=Web.ItemDescriptionStyle.Inline?u.appendFormat('<span class="Outer"><span class="Inner"><span class="Self">{0}<\/span><\/span><\/span>',a):(y=!0,u.appendFormat('<span class="Outer"><span class="Inner"><span class="Self"><span class="Text">{0}<\/span><span class="Description">{1}<\/span><\/span><\/span><\/span>',a,s)),h&&i.get_children()&&u.append("<\/div>"),u.append("<\/a>"),i.get_dynamic()&&window.setTimeout(i.get_script(),50)):u.append('<div class="Break"><\/div>');e!=null&&u.append("<\/div>")}else return null;for(f=this._factory,f||(f=this._factory=document.createElement("div")),$("a.Item",n.container).unbind("click mouseover mouseout"),f.innerHTML=u.toString(),n.container.innerHTML="",o=0;f.childNodes.length>0;)v=f.childNodes[0],f.removeChild(v),n.container.appendChild(v);return u.clear(),y&&(n.container.className=n.container.className+" "+n.container.className.replace(/(\w+)/g,"$1Ex")),$("a.Item",n.container).mouseover(function(){return __evalEvent.call(this,"mouseover")}).mouseout(function(){return __evalEvent.call(this,"mouseout")}).click(function(){return __evalEvent.call(this,"click")}),n},_createFrame:function(n){var t={top:document.createElement("div"),right:document.createElement("div"),bottom:document.createElement("div"),left:document.createElement("div"),arrow:document.createElement("div")};return t.top.style.position="absolute",t.top.style.display="none",t.top.style.zIndex=n,t.top.className="HoverMonitor_TopLine",document.body.appendChild(t.top),t.right.style.position="absolute",t.right.style.display="none",t.right.style.zIndex=n,t.right.className="HoverMonitor_RightLine",document.body.appendChild(t.right),t.bottom.style.position="absolute",t.bottom.style.display="none",t.bottom.style.zIndex=n,t.bottom.className="HoverMonitor_BottomLine",document.body.appendChild(t.bottom),t.left.style.position="absolute",t.left.style.display="none",t.left.style.zIndex=n,t.left.className="HoverMonitor_LeftLine",document.body.appendChild(t.left),t.arrow.style.position="absolute",t.arrow.style.display="none",t.arrow.style.zIndex=n,t.arrow.className="HoverMonitor_Arrow",document.body.appendChild(t.arrow),t.arrow.innerHTML=String.format('<div style="z-index:{0}"><\/div>',n+1),t},_destroyFrame:function(n){n&&(document.body.removeChild(n.top),delete n.top,document.body.removeChild(n.right),delete n.right,document.body.removeChild(n.bottom),delete n.bottom,document.body.removeChild(n.left),delete n.left,$clearHandlers(n.arrow),document.body.removeChild(n.arrow),delete n.arrow,delete n.element)},get_hoverFrame:function(){return this._hoverFrame||(this._hoverFrame=this._createFrame(Web.HoverMonitor.HoverFrameZIndex),$addHandlers(this._hoverFrame.arrow,this._hoverArrowHandlers,this)),this._hoverFrame},get_openFrame:function(){return this._openFrame||(this._openFrame=this._createFrame(Web.HoverMonitor.OpenFrameZIndex)),this._openFrame},get_hoverItems:function(n){var t=Web.HoverMonitor.Families[n.family];return t?t.items:null},get_hoverStyle:function(n){var t=Web.HoverMonitor.Families[n.family];return t?t.style:Web.HoverStyle.None},get_PopupPosition:function(n){var t=Web.HoverMonitor.Families[n.family];return t?t.position:Web.HoverStyle.Left},get_itemDescriptionStyle:function(n){var t=Web.HoverMonitor.Families[n];return t?t.itemDescriptionStyle:Web.HoverStyle.Inline},get_hoverBounds:function(n){return $appfactory.bounds(n.element)},deactivate:function(n,t){var i=Web.Item.find(n,t),r;i&&(r=$get(i.get_id()),Sys.UI.DomElement.removeCssClass(r,"Active"))},get_activeFamily:function(){return this._activeFamily},get_activePath:function(){return this._activePath},get_activeItem:function(){return Web.Item.find(this.get_activeFamily(),this.get_activePath())},get_hoverFamily:function(){var n=this.get_hoverFrame().family;return Web.HoverMonitor.Families[n]},get_openFamily:function(){var n=this.get_openFrame().family;return Web.HoverMonitor.Families[n]},get_isVisible:function(){return this.get_hoverFrame().visible},get_isOpen:function(){return this.get_openFrame()._open},showFrame:function(n,t,i,r){var u,o,e,f,s;r.cssClass=i;r.family=t;r.element=n;Sys.UI.DomElement.addCssClass(n,r.cssClass+"_Hover");u=this.get_hoverBounds(r);Sys.UI.DomElement.setVisible(r.top,!0);r.top.style.width=u.width+"px";r.top.style.left=u.x+"px";r.top.style.top=u.y+"px";r.top.className="HoverMonitor_TopLine "+i+"_TopLine";Sys.UI.DomElement.setVisible(r.right,!0);r.right.style.left=u.x+u.width-1+"px";r.right.style.top=u.y+"px";r.right.style.height=u.height+"px";r.right.className="HoverMonitor_RightLine "+i+"_RightLine";Sys.UI.DomElement.setVisible(r.bottom,!0);r.bottom.style.left=u.x+"px";r.bottom.style.top=u.y+u.height-1+"px";r.bottom.style.width=u.width+"px";r.bottom.className="HoverMonitor_BottomLine "+i+"_BottomLine";Sys.UI.DomElement.setVisible(r.left,!0);r.left.style.left=u.x+"px";r.left.style.top=u.y+"px";r.left.style.height=u.height+"px";r.left.className="HoverMonitor_LeftLine "+i+"_LeftLine";o=Web.HoverMonitor.Families[r.family];o&&(Sys.UI.DomElement.setVisible(r.arrow,!0),r.arrow.className="HoverMonitor_Arrow "+i+"_Arrow",e=Sys.UI.DomElement.getVisible(r.arrow),e||Sys.UI.DomElement.setVisible(r.arrow,!0),f=$appfactory.borderBox(r.arrow),u.width-=f.horizontal,u.height-=f.vertical,s=r.arrow.offsetWidth-f.horizontal,r.arrow.style.top=u.y+1+"px",r.arrow.style.left=u.x+u.width-1-s+"px",r.arrow.style.height=u.height-2+"px",e||Sys.UI.DomElement.setVisible(r.arrow,!1));r.visible=!0},hideFrame:function(n){n.element&&(n.top.className="HoverMonitor_TopLine",Sys.UI.DomElement.setVisible(n.top,!1),n.right.className="HoverMonitor_RightLine",Sys.UI.DomElement.setVisible(n.right,!1),n.bottom.className="HoverMonitor_BottomLine",Sys.UI.DomElement.setVisible(n.bottom,!1),n.left.className="HoverMonitor_LeftLine",Sys.UI.DomElement.setVisible(n.left,!1),n.arrow.className="HoverMonitor_Arrow",n.arrow.style.width="",Sys.UI.DomElement.setVisible(n.arrow,!1),Sys.UI.DomElement.removeCssClass(n.element,n.cssClass+"_Hover"),n.visible=!1)},hidePopups:function(n){var i,r,t;for(n==null&&(n=0),i=n;i<this._popups.length;i++)r=this._popups[i],r&&r.behavior.hide();n==0&&(t=this.get_openFrame(),t._open=!1,t.family=null,t.cssClass=null,delete t.element,this._activeFamily=null,this._activePath=null)},showPopup:function(n,t){var l,c,u,i,y,h,p,nt,b,w,e,a,it,v;this.stopOpen();l=t?t.get_depth()+1:0;this.hidePopups(l);var o=$appfactory.clientBounds(),f=$appfactory.scrolling(),r=this._renderPopup(this._createPopup(l),n.family,t,n.cssClass);if(r){if(c=t?$get(t.get_id()):null,u=c?$appfactory.bounds(c):this.get_hoverBounds(n),t&&(u.x=u.x+u.width+2,u.y=u.y-(u.height-2)),r.behavior.set_x(u.x),r.behavior.set_y(u.y+u.height),r.behavior.show(),c){if(i=$appfactory.bounds(r.container),y=f.x+o.width<i.x+i.width,!y)for(h=l-2;h>=0;h--)if(p=$appfactory.bounds(this._popups[h].container),nt=p.x<i.x&&p.x+p.width>i.x,nt){y=!0;break}u=$appfactory.bounds(c);y&&(u.x=u.x-i.width,u.x>=0&&(r.container.style.left=u.x+"px"))}if(l==0&&Web.PopupPosition.Right==this.get_PopupPosition(n)&&(r.container.style.left=u.x+u.width-$(r.container).outerWidth()+"px"),i=$appfactory.bounds(r.container),i.x+i.width>=f.x+o.width?r.container.style.left=f.x+o.width-i.width+"px":i.x<f.x&&(r.container.style.left=f.x+"px"),i.y+i.height>=f.y+o.height){for(b=!0,w=r.container.getElementsByTagName("div"),h=0;h<w.length;h++)if(e=w[h],e.className=="Group"){var rt=Math.ceil((f.y+o.height-u.y)/5*4),s=$appfactory.bounds(e),tt=s.height<100?s.height:100;if(s.height=rt-(s.y-i.y),s.height<tt?s.height=tt:b=!1,e.offsetHeight>s.height&&(e._autoScrolling=!0,e.style.height=s.height+"px",e.style.overflow="auto",e.style.overflowX="hidden",e.offsetWidth<s.width&&window.external)){var k=e.childNodes[e.childNodes.length-1],d=$appfactory.paddingBox(k),g=$appfactory.borderBox(k);k.style.width=s.width-d.horizontal-g.horizontal+"px"}i=$appfactory.bounds(r.container);break}w=null;b&&(a=u.y+u.height-i.height,a<f.y&&(a=f.y),r.container.style.top=a+"px",a+i.height>f.y+o.height&&(r.container.style.top=f.y+o.height-i.height-2+"px",i=$appfactory.bounds(r.container),i.y<f.y&&(r.container.style.top=f.y+"px",i.height>o.height&&(g=$appfactory.borderBox(r.container),d=$appfactory.paddingBox(r.container),r.container.style.height=o.height-g.vertical-d.vertical+"px",r.container.style.overflow="auto",r.container.style.overflowX="hidden"))),c||(i=$appfactory.bounds(r.container),i.y=u.y-i.height,i.y<f.y&&(it=f.x+o.width-(u.x+u.width),it>=i.width?r.container.style.left=u.x+u.width+"px":(i.x=u.x-i.width,i.x<0&&(i.x=0),r.container.style.left=i.x+"px"),i.y=f.y),r.container.style.top=i.y+"px"))}r.container.style.zIndex=Web.HoverMonitor.HoverMenuZIndex;v=this.get_openFrame();v.family=n.family;v.cssClass=n.cssClass;v.element=n.element;v._open=!0}},hover:function(n,t,i,r){var f,e,u,o;for(r==null&&(r=0),this.stopOpen(),this.stopClose();r-->0&&n;)n=n.parentNode;if(f=this.get_hoverFrame(),f.arrow.className="HoverMonitor_Arrow",e=this.get_hoverStyle(this.get_openFrame()),this.hideFrame(this.get_openFrame()),this.showFrame(n,t,i,f),u=this.get_isOpen(),u&&(this.get_hoverFrame().element!=this.get_openFrame().element&&e==Web.HoverStyle.Auto||e==Web.HoverStyle.ClickAndStay)&&this.hidePopups(),this._skipOpen){this._skipOpen=!1;return}o=this.get_hoverStyle(this.get_hoverFrame());o==Web.HoverStyle.Auto||u&&o==Web.HoverStyle.ClickAndStay?this.showPopup(this.get_hoverFrame()):u&&this._showOpenFrame()},_showOpenFrame:function(){var n=this.get_openFrame();this.get_isOpen()&&(n.element||(n=this.get_hoverFrame()),this.showFrame(n.element,n.family,n.cssClass,n))},unhover:function(){this._skipUnhover?this._skipUnhover=!1:(this.hideFrame(this.get_hoverFrame()),this.get_isOpen()&&(this.startClose(),this.get_hoverStyle(this.get_openFrame())!=Web.HoverStyle.Click&&this._showOpenFrame()))},select:function(n,t){var u,i,r;try{u=new Sys.UI.DomEvent(window.event);u.stopPropagation();u.preventDefault()}catch(f){}(i=Web.Item.find(n,t),!i.get_confirmation()||confirm(i.get_confirmation()))&&(r=i.get_script(),r?(typeof r=="string"?eval(i.get_script()):r(i.context()),this.close()):String.isNullOrEmpty(i.get_url())||(Web.Menu.navigate(i.get_url()),this.close()))},stopClose:function(){this._closeInterval&&window.clearInterval(this._closeInterval);this._closeInterval=null},startClose:function(){this.stopClose();this._closeInterval=setInterval(function(){var n=Web.HoverMonitor._instance;n.stopClose();n.close()},1e3)},closeItem:function(n,t){this.stopCloseItem();var r=n!=null&&t!=null?Web.Item.find(n,t):this.get_activeItem(),i=this.get_activeItem();r&&i&&(r!=i||!i.get_children())&&this.hidePopups(i.get_depth()+1)},stopCloseItem:function(){this._closeItemInterval&&window.clearInterval(this._closeItemInterval);this._closeItemInterval=null},startCloseItem:function(n,t){this.stopCloseItem();this._closeItemInterval=setInterval(function(){Web.HoverMonitor._instance.closeItem(n,t)},1e3)},stopOpen:function(){this._openInterval&&window.clearInterval(this._openInterval);this._openInterval=null},startOpen:function(n,t){this.stopOpen();this.stopCloseItem();this.stopClose();this._skipStartOpen||(this._openInterval=setInterval(function(){Web.HoverMonitor._instance.open(n,t)},Web.HoverMonitor._instance._tempOpenDelay!=null?Web.HoverMonitor._instance._tempOpenDelay:500),Web.HoverMonitor._instance._tempOpenDelay=null);this._skipStartOpen=!1},open:function(n,t){this.stopOpen();var i=Web.Item.find(n,t);if(i){if(this.hidePopups(i.get_depth()+1),i==null||!i.get_children())return;this.showPopup(this.get_openFrame(),i)}},toggle:function(){if(Web.HoverMonitor._preventToggleHover){Web.HoverMonitor._preventToggleHover=!1;return}if(this.get_isOpen()&&this.get_hoverFrame().family==this.get_openFrame().family){this.hideFrame(this.get_openFrame());this.hidePopups();var n=this.get_hoverFrame();this.showFrame(n.element,n.family,n.cssClass,n)}else this.hideFrame(this.get_openFrame()),this.showPopup(this.get_hoverFrame());this.stopClose()},refresh:function(n){this.get_isOpen()&&this.get_openFrame().family==n&&(this.toggle(),this.toggle())},_hoverArrow_click:function(n){n.preventDefault();n.stopPropagation();this.toggle()},_hoverArrow_mouseover:function(){var n=this.get_hoverFrame();this.showFrame(n.element,n.family,n.cssClass,n)},_hoverArrow_mouseout:function(){this.hideFrame(this.get_hoverFrame());this._showOpenFrame()},close:function(){this.hideFrame(this.get_openFrame());this.hideFrame(this.get_hoverFrame());this.hidePopups()},activate:function(n,t,i){var u,c,r,f,e,o,s,h;for(this._activeFamily=n,this._activePath=t,u=Web.Item.find(n,t),!u||u.get_children()?this.startOpen(n,t):u&&(this.stopOpen(),this.startCloseItem(n,t)),c=!0;u;){if(r=$get(u.get_id()),c&&(c=!1,r)){for(f=r.parentNode,f.className=="Group"&&(f=f.parentNode),e=f.getElementsByTagName("a"),o=0;o<e.length;o++)Sys.UI.DomElement.removeCssClass(e[o],"Active");e=null}r&&Sys.UI.DomElement.addCssClass(r,"Active");i&&r.parentNode._autoScrolling&&(s=$appfactory.bounds(r.parentNode),h=$appfactory.bounds(r),(h.y<s.y||h.y+h.height>s.y+s.height-1)&&r.scrollIntoView(!(i=="down"||i=="end")),r.parentNode.scrollLeft=0);u=u.get_parent()}},_moveToItem:function(n,t){var f;if(n){var u=n.get_parent()?n.get_parent().get_children():Web.HoverMonitor.Families[n.get_family()].items,i=Array.indexOf(u,n),r=null;switch(t){case"down":i=i<u.length-1?i+1:0;break;case"up":i=i>0?i-1:u.length-1;break;case"home":i=0;break;case"end":i=u.length-1}if(r=u[i],r)for(f=i;String.isNullOrEmpty(r.get_text())||r.get_disabled();)if(i+=t=="down"||t=="home"?1:-1,i<0?i=u.length:i>u.length-1&&(i=0),i==f){r=null;break}else r=u[i];r&&($activateItem(r.get_family(),r.get_path(),t),r.get_children()||this.startCloseItem(r.get_family(),r.get_path()))}},_openItem:function(n){n&&n.get_children()&&(this.open(n.get_family(),n.get_path()),n=n.get_children()[0],$activateItem(n.get_family(),n.get_path()))},_openFirstItem:function(){var n=this.get_openFamily();n&&this._moveToItem(n.items[0],"home")},_document_keydown:function(n){var t,r,i,u;if(this.get_isOpen())if(this.stopOpen(),$appfactory._focusedItemIndex=null,t=this.get_activeItem(),t||n.keyCode!=Sys.UI.Key.down&&n.keyCode!=Sys.UI.Key.up){if(n.keyCode==Sys.UI.Key.tab&&!t){if(this.get_hoverStyle(this.get_hoverFrame())==Web.HoverStyle.Auto)return;n.preventDefault();this._openFirstItem()}switch(n.keyCode){case Sys.UI.Key.enter:t&&(String.isNullOrEmpty(t.get_url())&&t.get_children()?this._openItem(t):this.select(t.get_family(),t.get_path()));break;case Sys.UI.Key.esc:if(t&&t.get_parent())this.hidePopups(t.get_depth()),t=t.get_parent(),$activateItem(t.get_family(),t.get_path()),this.stopOpen();else{if(r=this.get_hoverFrame(),i=r.element,this.close(),i){i.tagName.toLowerCase()!="a"&&(u=i.getElementsByTagName("a"),u&&u.length>0&&(i=u[0]),delete u);try{i.focus()}catch(n){}}this._skipOpen=!0;$showHover(r.element,r.family,r.cssClass)}break;case Sys.UI.Key.down:this._moveToItem(t,"down");break;case Sys.UI.Key.up:this._moveToItem(t,"up");break;case Sys.UI.Key.tab:this._moveToItem(t,n.shiftKey?"up":"down");break;case Sys.UI.Key.home:this._moveToItem(t,"home");break;case Sys.UI.Key.end:this._moveToItem(t,"end");break;case Sys.UI.Key.right:case Sys.UI.Key.left:this._openItem(t);break;default:return}n.preventDefault();n.stopPropagation()}else n.preventDefault(),this._openFirstItem();else if(this.get_isVisible())switch(n.keyCode){case Sys.UI.Key.down:case Sys.UI.Key.up:this.get_hoverFamily()&&this.showPopup(this.get_hoverFrame());n.preventDefault()}},_document_click:function(n){if(this._openFrame&&this._openFrame._open){for(var t=n.target;t;){if(!String.isNullOrEmpty(t.className)&&t.className.match(/\s+\w+_Hover/))return;t=t.parentNode}this.close()}},_hoverMenu_mouseover:function(){this.stopClose();this.get_isOpen()&&this.get_hoverStyle(this.get_openFrame())==Web.HoverStyle.Click&&this._showOpenFrame()},_hoverMenu_mouseout:function(){this.startClose()}};Web.HoverMonitor.Families=[];Web.HoverMonitor.registerClass("Web.HoverMonitor",Sys.Component);$.mobile||(Web.HoverMonitor._instance=$create(Web.HoverMonitor,{id:"GlobalHoverMonitor"}));Web.HoverMonitor.OpenFrameZIndex=101001;Web.HoverMonitor.HoverFrameZIndex=101002;Web.HoverMonitor.HoverMenuZIndex=101003;var __ie6=Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<7;__ie6&&Sys.UI.DomElement.addCssClass(document.body,"IE6");typeof Sys!="undefined"&&Sys.Application.notifyScriptLoaded()
;function _body_hideLayoutContainers(){var n,t;if(Web.DataView._layoutContainers)for(n=0;n<Web.DataView._layoutContainers.length;n++)t=Web.DataView._layoutContainers[n],t.width!="100%"&&Sys.UI.DomElement.setVisible($get(t.id),!1)}function _body_resizeLayoutContainers(){var i=Web.DataView._layoutContainers,f,e,s,r,t,n;if(i&&i.length!=0&&(f=$get("PageContent"),f)){var o=$app.bounds(f),v=$app.paddingBox(f),y=$app.borderBox(f),p=$app.marginBox(f);for(o.width-=v.horizontal+y.horizontal+p.horizontal,e=i[i.length-1].rowIndex;e>=i[0].rowIndex;){for(s=0,r=0;r<i.length;r++)if(t=i[r],t.rowIndex==e&&!String.isNullOrEmpty(t.width)&&(n=$get(t.id),n)){var h=$app.paddingBox(n),c=$app.borderBox(n),l=$app.marginBox(n),a=t.width.match(/(\d+)(%|px|)/),u=a[2]!="%"?parseFloat(a[1]):Math.floor(o.width*parseFloat(a[1])/100);s+=u;u-=h.horizontal+c.horizontal+l.horizontal;t.width!="100%"?(n.style.width=u+"px",Sys.UI.DomElement.setVisible(n,!0)):$(n).removeClass("LayoutContainer").addClass("RowContainer")}if(s<o.width)for(r=0;r<i.length;r++)t=i[r],t.rowIndex==e&&String.isNullOrEmpty(t.width)&&(n=$get(t.id),n&&(h=$app.paddingBox(n),c=$app.borderBox(n),l=$app.marginBox(n),u=Math.floor((o.width-s)/t.peersWithoutWidth),u-=h.horizontal+c.horizontal+l.horizontal,u<1&&(u=1),n.style.width=u+"px",Sys.UI.DomElement.setVisible(n,!0)));e--}}}function _body_keydown(n){var t,i;if(n.keyCode==Sys.UI.Key.enter&&Web.DataView._focusedItemIndex!=null){if(t=$find(Web.DataView._focusedDataViewId),t&&t._get_focusedCell())return;i=$get(Web.DataView._focusedDataViewId+"_Item"+Web.DataView._focusedItemIndex);i&&i.tagName=="INPUT"&&i.type=="text"&&i==n.target&&(n.preventDefault(),n.stopPropagation(),t=$find(Web.DataView._focusedDataViewId),t&&t._valueChanged(Web.DataView._focusedItemIndex))}}function _body_resize(){Web.DataView._resizeInterval&&clearInterval(Web.DataView._resizeInterval);Web.DataView._resizing||Web.DataView._resized?$closeHovers():(Web.DataView._resizeInterval=setInterval(function(){_body_performResize()},10),_body_hideLayoutContainers(),_body_resizeLayoutContainers());Web.DataView._resized=!1}function _body_scroll(){var n=$getSideBar(),u,t,f;if(n){var i=$app.scrolling(),e=$common.getClientBounds(),r=$common.getBounds(n);n._originalTop==null&&(n._originalTop=r.y);u=n._originalTop;t=0;Web.DataView.MessageBar&&(f=$common.getBounds(Web.DataView.MessageBar._element),u+=t=f.height);i.y>n._originalTop&&r.height+4<=e.height&&i.x==0?(n.style.width=r.width+"px",Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<=6?(n.style.top=4+i.y+t+"px",n.style.position="absolute"):(n.style.top=4+t+"px",n.style.position="fixed")):(n.style.top="",n.style.width="",n.style.position="")}}function _body_createPageContext(n){var t=$get("PageContent");if(t){var r=$common.getBounds(t),u=$common.getPaddingBox(t),f=$common.getBorderBox(t),i={height:r.height-u.vertical-f.vertical,scrolling:$app.scrolling()};return n!=!1&&(Web.DataView._pageContext=i),i}}function _body_performResize(){var n,u,l,t,f,r,a,e,o,s,i,h;if(Web.DataView._resizeInterval&&clearInterval(Web.DataView._resizeInterval),Web.DataView._resizeInterval=null,$closeHovers(),n=$get("PageContent"),n&&!$app.mobile){if(u=$common.getClientBounds(),l=$common.getClientBounds(),Web.DataView.MessageBar&&(t=Web.DataView.MessageBar._element,$common.getVisible(t)&&(f=$common.getPaddingBox(t),t.style.width=l.width-f.horizontal+"px",r=t.childNodes[0],r.style.height="",a=$common.getBounds(r),e=Math.ceil(u.height*.15),a.height>e&&(r.style.height=e+"px",r.style.overflow="auto"),f=Sys.UI.DomElement.getBounds(t),o=Web.DataView.OriginalBodyTopOffset+f.height,document.body.style.paddingTop=o+"px",s=$get("Membership_Login"),s&&(s.style.marginTop=o+"px"))),Web.DataView._resizing=!0,i=Web.DataView._pageContext,i==null?i=_body_createPageContext(!1):Web.DataView._pageContext=null,h=$app.scrolling(),h.y==0&&(n.style.height="10px"),_body_resizeLayoutContainers(),typeof __cothost=="undefined"){var v=$app.bounds(n),y=$app.paddingBox(n),p=$app.borderBox(n),w=Web.Menu.MainMenuElemId?$get(Web.Menu.MainMenuElemId):null,b=w?$common.getBorderBox(w):null,k=$get("PageFooterContent"),d=$get("PageFooterBar"),c=h.y+u.height-v.y-(d?d.offsetHeight:0)-(k?k.offsetHeight:0)-p.vertical-y.vertical-(b?b.vertical:0);v.height<c&&Sys.Browser.agent==Sys.Browser.Opera&&(c+=p.vertical+y.vertical);i.scrolling.y==0||Web.DataView._numberOfContainers<2?n.style.height=document.body.offsetHeight>u.height?"":c+"px":(n.style.height=i.height+"px",scrollTo(0,i.scrolling.y))}_body_scroll();Web.DataView._resizing=!1;Web.DataView._resized=!0}}function $createDataView(n,t,i){var u={id:t+"Extender",controller:t,baseUrl:"./",servicePath:"Services/DataControllerService.asmx"},r;if(i)for(r=0;r<i.length;r++)u[i[r].name]=i[r].value;$create(Web.DataView,u,null,null,$get(n))}function updateACT(){Sys.Extended&&typeof AjaxControlToolkit=="undefined"&&(AjaxControlToolkit=Sys.Extended.UI);Web.AutoComplete.registerClass("Web.AutoComplete",AjaxControlToolkit.AutoCompleteBehavior);Sys.Browser.WebKit={};navigator.userAgent.indexOf("WebKit/")>-1&&(Sys.Browser.agent=Sys.Browser.WebKit,Sys.Browser.version=parseFloat(navigator.userAgent.match(/WebKit\/(\d+(\.\d+)?)/)[1]),Sys.Browser.name="WebKit");Sys.Browser.agent==Sys.Browser.InternetExplorer||Sys.Browser.agent==Sys.Browser.Firefox||Sys.Browser.agent==Sys.Browser.Opera||Sys.Extended||($common.old_getBounds=$common.getBounds,$common.getBounds=function(n){var i=$common.old_getBounds(n),t=$app.scrolling();return(t.y||t.x)&&(i.x+=t.x,i.y+=t.y),i});AjaxControlToolkit.CalendarBehavior&&!AjaxControlToolkit.CalendarBehavior.prototype.old_show&&(AjaxControlToolkit.CalendarBehavior.prototype.old_show=AjaxControlToolkit.CalendarBehavior.prototype.show,AjaxControlToolkit.CalendarBehavior.prototype.show=function(){function i(){r.position({my:"left "+(t?"bottom":"top"),at:"left "+(t?"top":"bottom"),of:n})}this.old_show();var r=$(this._container).zIndex(100100),n=$(this._element),t=n.parent().find(".Error:visible").length||n.closest("div.Item").find(".Error:visible").length;i();setTimeout(i,10)},AjaxControlToolkit.CalendarBehavior.prototype.old_raiseDateSelectionChanged=AjaxControlToolkit.CalendarBehavior.prototype.raiseDateSelectionChanged,AjaxControlToolkit.CalendarBehavior.prototype.raiseDateSelectionChanged=function(){this.old_raiseDateSelectionChanged();this._element.focus()});AjaxControlToolkit.TabContainer&&!AjaxControlToolkit.TabContainer.prototype.old_set_activeTabIndex&&(AjaxControlToolkit.TabContainer.prototype.old_set_activeTabIndex=AjaxControlToolkit.TabContainer.prototype.set_activeTabIndex,AjaxControlToolkit.TabContainer.prototype.set_activeTabIndex=function(n){var t=this.get_activeTabIndex();this._headerAssigned||(this._headerAssigned=!0,Sys.UI.DomElement.addCssClass(this._element.getElementsByTagName("div")[0],"tab-header"));this.old_set_activeTabIndex(n);n!=t&&_body_performResize()});AjaxControlToolkit.AutoCompleteBehavior&&!AjaxControlToolkit.AutoCompleteBehavior.prototype.old_dispose&&(AjaxControlToolkit.AutoCompleteBehavior.prototype.old_dispose=AjaxControlToolkit.AutoCompleteBehavior.prototype.dispose,AjaxControlToolkit.AutoCompleteBehavior.prototype.dispose=function(){this.old_dispose();this._completionListElement&&(this._completionListElement.parentNode.removeChild(this._completionListElement),delete this._completionListElement)},AjaxControlToolkit.AutoCompleteBehavior.prototype.old__handleFlyoutFocus=AjaxControlToolkit.AutoCompleteBehavior.prototype._handleFlyoutFocus,AjaxControlToolkit.AutoCompleteBehavior.prototype._handleFlyoutFocus=function(){this._completionListElement&&this.old__handleFlyoutFocus()},AjaxControlToolkit.AutoCompleteBehavior.prototype.old_showPopup=AjaxControlToolkit.AutoCompleteBehavior.prototype.showPopup,AjaxControlToolkit.AutoCompleteBehavior.prototype.showPopup=function(){var u,i,n,r,f,e;if(this.old_showPopup(),Sys.UI.DomElement.getVisible(this._completionListElement)){if(u=$app.scrolling(),this._completionListElement.style.height="",Sys.UI.DomElement.addCssClass(this._completionListElement,"CompletionList"),this._completionListElement.style.width="",this._completionListElement.style.zIndex=200100,i=$common.getClientBounds(),n=$common.getBounds(this._completionListElement),n.width>i.width/3&&(n.width=i.width/3),r=this._element,Sys.UI.DomElement.containsCssClass(r.parentNode,"Input"))while(!Sys.UI.DomElement.containsCssClass(r.parentNode,"AutoCompleteFrame"))r=r.parentNode;var t=$common.getBounds(r),o=$common.getBorderBox(this._completionListElement),s=$common.getPaddingBox(this._completionListElement);n.width<=t.width&&(this._completionListElement.style.width=t.width-o.horizontal-s.horizontal+"px");n=$common.getBounds(this._completionListElement);n.x!=t.x&&(n.x=t.x,this._completionListElement.style.left=n.x+"px");n.y!=t.y&&(n.y=t.y+t.height-1,this._completionListElement.style.top=n.y+"px");n.x+n.width>i.width&&(this._completionListElement.style.left=i.width-n.width+"px");bound=$common.getBounds(this._completionListElement);f=t.y-u.y;e=i.height-(t.y+t.height-u.y);bound.height<=e||e>=f?n.y+n.height-u.y>i.height&&(this._completionListElement.style.height=i.height-(n.y-u.y)-4+"px",this._completionListElement.style.overflow="auto"):f<n.height?(this._completionListElement.style.top=t.y-f+"px",this._completionListElement.style.height=f+"px",this._completionListElement.style.overflow="auto"):this._completionListElement.style.top=t.y-n.height+3+"px"}},AjaxControlToolkit.ModalPopupBehavior&&!AjaxControlToolkit.ModalPopupBehavior.prototype.old__attachPopup&&(AjaxControlToolkit.ModalPopupBehavior.prototype.old__attachPopup=AjaxControlToolkit.ModalPopupBehavior.prototype._attachPopup,AjaxControlToolkit.ModalPopupBehavior.prototype._attachPopup=function(){this.old__attachPopup();this._dropShadowBehavior&&(this._dropShadowBehavior.set_Width(4),(Sys.Browser.agent!=Sys.Browser.InternetExplorer||Sys.Browser.version>=9)&&this._dropShadowBehavior.set_Rounded(!0))}))}function $hoverTab(n,t){while(n&&n.tagName!="TD")n=n.parentNode;n&&(t?(Sys.UI.DomElement.addCssClass(n,"Active"),n.focus()):Sys.UI.DomElement.removeCssClass(n,"Active"))}function $getSideBar(){var t=$get("PageContentSideBar"),n,i;if(!t)return null;for(n=0;n<t.childNodes.length;n++)if(i=t.childNodes[n],i.className=="SideBarBody")return i;return null}function $dvget(n,t,i,r){for(var f,o,s,h=Sys.Application.getComponents(),c="_"+n,e=null,u=0;u<h.length;u++)if(f=h[u],f._id==n||Web.DataView.isInstanceOfType(f)&&(f._id.endsWith(c)||f._controller==n&&(!t||f.get_viewId()==t))){e=f;break}if(e){if(i){if(o=e.findField(i),o){if(r){if(element=$get(e._id+"_ItemContainer"+o.Index),element)for(u=0;u<element.childNodes.length;u++)if(s=element.childNodes[u],s.className=="Value")return s}else return $get(e._id+"_Item"+o.Index);return element}return null}return e}return null}function _field_prepareDataFormatString(n,t){if(t.DataFormatString&&t.DataFormatString.indexOf("{")==-1&&(t.DataFormatString="{0:"+t.DataFormatString+"}"),t.DataFormatString&&(t.DataFormatString=n.resolveClientUrl(t.DataFormatString)),t.Type.startsWith("DateTime"))if(t.DataFormatString){var u=t.DataFormatString.match(/{0:(g)}/i),i,r;u&&(i=Sys.CultureInfo.CurrentCulture.dateTimeFormat,t.DateFmtStr="{0:"+i.ShortDatePattern+"}",t.TimeFmtStr="{0:"+(u[1]=="g"?i.ShortTimePattern:i.LongTimePattern)+"}");r=Web.DataView.dateFormatStrings[t.DataFormatString];r&&(t.DataFormatString="{0:"+r+"}");t.DateFmtStr&&(t.DataFmtStr=t.DataFormatString)}else t.DataFormatString="{0:d}"}function _field_format(n){try{return n!=null&&this.Type=="TimeSpan"&&this.DataFormatString&&this.FormatOnClient&&typeof n=="string"&&(n=Date.tryParseFuzzyTime(n,!1)),n==null?"null":this.FormatOnClient&&!String.isNullOrEmpty(this.DataFormatString)?String.localeFormat(this.DataFormatString,n):n.toString()}catch(t){throw new Error(String.format("\nField: {0}\nData Format String: {1}\n{2}",this.Name,this.DataFormatString,t.message));}}function _field_isReadOnly(){return this.TextMode==4||this.ReadOnly}function _field_isNumber(){return Array.indexOf(["SByte","Byte","Int16","Int32","UInt32","Int64","Single","Double","Decimal","Currency"],this.Type)}function _field_htmlEncode(){return this.HtmlEncode&&this.TextMode!=3&&this.TextMode!=4}function _field_trim(n){var t=this,i=Web.DataViewResources.Data;return t.Type=="String"&&n!=null&&n.length>i.MaxReadOnlyStringLen&&!(t.TextMode==3||t.TextMode==2)&&(n=n.substring(0,i.MaxReadOnlyStringLen)+"..."),n&&t.TextMode==3&&(n=n.replace(/(\r?\n)/g,"<br/>")),n}function _field_text(n,t){var i=this,r,s=Web.DataViewResources.Data,e=i.DynamicItems?i.DynamicItems:i.Items,f,u,l;if(e.length==0)r=String.isBlank(n)?s.NullValueInForms:i.format(n);else if(i.ItemsStyle=="CheckBoxList"){var h=n?n.split(","):[],o=new Sys.StringBuilder,c=!0;for(f=0;f<e.length;f++)u=e[f],l=u[0]==null?"":u[0].toString(),Array.contains(h,l)&&(c?c=!1:o.append(", "),o.append(u[1]));r=o.toString();r=h.length==0?s.NullValueInForms:r}else u=i._dataView._findItemByValue(i,n),r=u[1];return i.TextMode==1&&(r="**********"),t!=!1&&(r=i.trim(r)),r}function __designer(){return typeof __designerMode!="undefined"}function __evalEvent(n){var t=this.getAttribute("on"+n+"2"),i;return String.isNullOrEmpty(t)?!0:(i=!0,t=t.replace(/(^|;)return /g,";returnResult="),eval(t),i)}Type.registerNamespace("Web");Web.DataViewMode={View:"View",Lookup:"Lookup"};Web.DynamicExpressionScope={Field:0,ViewRowStyle:1,CategoryVisibility:2,DataFieldVisibility:3,DefaultValues:4,ReadOnly:5,Rule:6};Web.AutoHideMode={Nothing:0,Self:1,Container:2};Web.DynamicExpressionType={RegularExpression:0,ClientScript:1,ServerExpression:2,CSharp:3,VisualBasic:4,Any:4};Web.DataViewAggregates=["None","Sum","Count","Avg","Max","Min"];Web.FieldSearchMode={Default:0,Required:1,Suggested:2,Allowed:3,Forbidden:4};Web.PageState={};Web.PageState._init=function(){if(!this._state){var n=$get("__COTSTATE");this._state=n==null||String.isNullOrEmpty(n.value)?{}:Sys.Serialization.JavaScriptSerializer.deserialize(n.value)}};Web.PageState._save=function(){var n=$get("__COTSTATE");n!=null&&(n.value=Sys.Serialization.JavaScriptSerializer.serialize(this._state))};Web.PageState.read=function(n){return this._init(),this._state[n]};Web.PageState.write=function(n,t){this._init();this._state[n]=t;this._save()};Sys.StringBuilder.prototype.appendFormat=function(){this.append(String._toFormattedString(!1,arguments))};String.isNullOrEmpty=function(n){return n==null||n.length==0};String.isBlank=function(n){return n==null||typeof n=="string"&&n.match(Web.DataView._blankRegex)!=null};String._wordTrimRegex=/(\S{16})\S+/g;String._tagRegex=/<\/?\w.*?>/g;String.trimLongWords=function(n,t){var r,e;if(n==null)return n;if(r=this._wordTrimRegex,t!=null&&(r=new RegExp(String.format("(\\S{{{0}}})\\S+",t),"g")),e=n.replace(r,"$1..."),n.match(String._tagRegex)){for(var u=new Sys.StringBuilder,o=String._tagRegex,i=o.exec(n),f=0;i;)tag=i[0],i.index>0&&u.append(n.substring(f,i.index).replace(r,"$1...")),f=i.index+tag.length,u.append(tag),i=o.exec(n);f<n.length&&u.append(n.substring(f));e=u.toString()}return e};String.htmlEncode=function(n){return typeof n=="string"&&n.match(Web.DataView._htmlTest)?n:Web.DataView.htmlEncode(n)};String.isJavaScriptNull=function(n){return n=="%js%null"||n=="null"};String.jsNull="%js%null";Web.DataView=function(n){Web.DataView.initializeBase(this,[n]);this._controller=null;this._viewId=null;this._servicePath=null;this._baseUrl=null;this._pageIndex=-1;this._pageSize=Web.DataViewResources.Pager.PageSizes[0];this._sortExpression=null;this._filter=[];this._externalFilter=[];this._categories=null;this._fields=null;this._allFields=null;this._rows=null;this._totalRowCount=0;this._firstPageButtonIndex=0;this._pageCount=0;this._views=[];this._actionGroups=[];this._selectedKey=[];this._selectedKeyFilter=[];this._lastCommandName=null;this._lastViewId=null;this._lookupField=null;this._filterFields=null;this._filterSource=null;this._mode=Web.DataViewMode.View;this._lookupPostBackExpression=null;this._domFilterSource=null;this._selectedKeyList=[];this._pageSizes=Web.DataViewResources.Pager.PageSizes};Web.DataView.htmlEncode=function(n){return n!=null&&typeof n!="string"&&(n=n.toString()),n?n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):n};Web.DataView.htmlAttributeEncode=function(n){return n!=null&&typeof n=="string"?n.replace(/\x27/g,"&#39;").replace(/\x22/g,"&quot;"):n};Web.DataView.isIE6=this._ie6=Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<7;Web.DataView.prototype={get_controller:function(){return this._controller},set_controller:function(n){this._controller=n},useCase:function(n){return this.get_useCase()==n},get_useCase:function(){return this._useCase},set_useCase:function(n){this._useCase=n},get_viewId:function(){!this._viewId&&this._views.length>0&&(this._viewId=this._views[0].Id);var n=this._viewId;return n||(n=""),n},set_viewId:function(n){this._viewId=n},get_newViewId:function(){return this._newViewId},set_newViewId:function(n){this._newViewId=n},get_servicePath:function(){return this._servicePath},set_servicePath:function(n){this._servicePath=this.resolveClientUrl(n);Web.DataView._servicePath||(Web.DataView._servicePath=n)},get_baseUrl:function(){return this._baseUrl},set_baseUrl:function(n){n=="~"&&(n="/");this._baseUrl=n;Web.DataView._baseUrl||(Web.DataView._baseUrl=n)},get_siteUrl:function(){var t=this.get_servicePath(),n=t.match(/(^.+?\/)\w+\/\w+\.asmx/);return n?n[1]:""},resolveClientUrl:function(n){return n?n.replace(/~\x2f/g,this.get_baseUrl()):null},get_hideExternalFilterFields:function(){return this._hideExternalFilterFields!=!1},set_hideExternalFilterFields:function(n){this._hideExternalFilterFields=n},get_backOnCancel:function(){return this._backOnCancel==!0},set_backOnCancel:function(n){this._backOnCancel=n},get_confirmContext:function(){return this._confirmContext},set_confirmContext:function(n){this._confirmContext=n},get_startCommandName:function(){return this._startCommandName},set_startCommandName:function(n){this._startCommandName=n},get_startCommandArgument:function(){return this._startCommandArgument},set_startCommandArgument:function(n){this._startCommandArgument=n},get_exitModalStateCommands:function(){return this._exitModalStateCommands},set_exitModalStateCommands:function(n){this._exitModalStateCommands=n},get_showActionBar:function(){var n=this.extension(),t;return n?(t=n.options(),t.actionBar==!0):this._showActionBar!=!1},set_showActionBar:function(n){this._showActionBar=n},get_showActionButtons:function(){var n=this._showActionButtons;return n==null&&(n="TopAndBottom",this._showActionButtons=n),n},set_showActionButtons:function(n){this._showActionButtons=n},get_showSearchBar:function(){return this._showSearchBar==!0&&!(__tf!=4)},set_showSearchBar:function(n){this._showSearchBar=n},get_searchOnStart:function(){return this._searchOnStart==!0},set_searchOnStart:function(n){this._searchOnStart=n;n&&this.set_searchBarIsVisible(!0)},get_searchBarIsVisible:function(){return this._searchBarIsVisible==!0},set_searchBarIsVisible:function(n){this._searchBarIsVisible=n},get_showModalForms:function(){return $app.mobile?!0:this._showModalForms==!0},set_showModalForms:function(n){this._showModalForms=n},get_showDescription:function(){var n=this.extension(),t;return n?(t=n.options(),t.description==!0):this._showDescription!=!1},set_showDescription:function(n){this._showDescription=n},get_showFirstLetters:function(){return this._showFirstLetters==!0},set_showFirstLetters:function(n){this._showFirstLetters=n},get_autoSelectFirstRow:function(){return this._autoSelectFirstRow==!0},set_autoSelectFirstRow:function(n){this._autoSelectFirstRow=n},get_autoHighlightFirstRow:function(){return this._autoHighlightFirstRow==!0},set_autoHighlightFirstRow:function(n){this._autoHighlightFirstRow=n},get_refreshInterval:function(){return this._refreshInterval},set_refreshInterval:function(n){this._refreshInterval=(__tf!=4)?0:n},get_showViewSelector:function(){return this._showViewSelector!=!1},set_showViewSelector:function(n){this._showViewSelector=n},get_showPager:function(){var n=this._showPager;return n==null||n==!0?(n="Bottom",this._showPager=n):n==!1&&(n="None"),n},set_showPager:function(n){this._showPager=n},get_showPageSize:function(){return this._showPageSize!=!1},set_showPageSize:function(n){this._showPageSize=n},get_selectionMode:function(){return this._selectionMode},set_selectionMode:function(n){this._selectionMode=n},multiSelect:function(){return this._selectionMode=="Multiple"},get_cookie:function(){return this._cookie},set_cookie:function(n){this._cookie=n},get_pagerButtonCount:function(n){if(!this._pagerButtonCount||n){var t=Web.DataViewResources.Pager.PageButtonCount;this.get_pageCount()>t&&(t=t-3,t<5&&(t=5));this._pagerButtonCount=t}return this._pagerButtonCount},get_pageIndex:function(){return this._pageIndex},set_pageIndex:function(n){if(this._pageIndex=n,n>=0){var t=this.get_pagerButtonCount();n>=this._firstPageButtonIndex+t?this._firstPageButtonIndex=n:n<this._firstPageButtonIndex&&(this._firstPageButtonIndex-=t,n<this._firstPageButtonIndex&&(this._firstPageButtonIndex=n));this._firstPageButtonIndex<0&&(this._firstPageButtonIndex=0);this.get_pageCount()-this._firstPageButtonIndex<t&&(this._firstPageButtonIndex=this.get_pageCount()-t);this._firstPageButtonIndex<0&&(this._firstPageButtonIndex=0)}n==-2&&(this._pageOffset=0)},get_pageOffset:function(){return this.get_isDataSheet()?this._pageOffset==null?0:this._pageOffset:0},set_pageOffset:function(n){this._pageOffset=n},get_categoryTabIndex:function(){return this._categoryTabIndex},set_categoryTabIndex:function(n){n!=this._categoryTabIndex&&(this._categoryTabIndex=n,this._updateTabbedCategoryVisibility(),n!=-1&&(this._modalPopup&&(this._resizeContainerBounds(),this._modalPopup.show()),_body_performResize(),this.get_isEditing()&&(this._focusedFieldName=null,this._focus())))},get_enabled:function(){return this._enabled==null?!0:this._enabled},set_enabled:function(n){this._enabled=n},get_showInSummary:function(){return this._showInSummary},set_showInSummary:function(n){this._showInSummary=n},get_summaryFieldCount:function(){return this._summaryFieldCount},set_summaryFieldCount:function(n){this._summaryFieldCount=n},get_showLEVs:function(){return this._showLEVs},set_showLEVs:function(n){this._showLEVs=n},get_tag:function(){return this._tag},set_tag:function(n){this._tag=n},get_pageSize:function(){return this._pageSize},set_pageSize:function(n){this._pageSize=n;this._pageOffset=0;delete this._viewColumnSettings;Array.indexOf(this._pageSizes,n)==-1&&(this._pageSizes=Array.clone(this._pageSizes),Array.insert(this._pageSizes,0,n));this._fields!=null&&this.refreshData()},get_sortExpression:function(){return this._sortExpression},set_sortExpression:function(n){if(n&&n.length!=0){var t=n.match(/^(\w+)\s*((asc|desc)|$)/i);this._sortExpression=t&&t[2].length==0?String.isNullOrEmpty(this._sortExpression)||this._sortExpression.match(/^(\w+)\s*/)[1]!=t[1]?n+" asc":this._sortExpression.endsWith(" asc")?n+" desc":n+" asc":n}else this._sortExpression=null},set_id:function(n){this._id||(this._id=n)},get_appId:function(){return this._id},set_appId:function(n){$app.mobile&&(this._id=n)},get_appFilterSource:function(){return this._filterSource},set_appFilterSource:function(n){$app.mobile&&(this._filterSource=n)},get_filterSource:function(){return this._filterSource},set_filterSource:function(n){this._filterSource||(this._filterSource=n)},get_filterFields:function(){return this._filterFields},set_filterFields:function(n){this._filterFields=n},get_visibleWhen:function(){return this._visibleWhen},set_visibleWhen:function(n){this._visibleWhen=n},get_showQuickFind:function(){return this._showQuickFind!=!1},get_quickFindText:function(){return String.isNullOrEmpty(this._quickFindText)?Web.DataViewResources.Grid.QuickFindText:this._quickFindText},set_quickFindText:function(n){this._quickFindText=n},get_quickFindElement:function(){return $get(this.get_id()+"_QuickFind")},set_showQuickFind:function(n){this._showQuickFind=n},get_showRowNumber:function(){return this._showRowNumber==!0},set_showRowNumber:function(n){this._showRowNumber=n},get_filter:function(){var r,f,t,i,u,n;if(this.get_lookupField()==null&&(this.get_pageIndex()==-1&&!this._allFields||this._externalFilter.length>0&&this._filter.length==0)){if(this.get_domFilterSource())for(this._externalFilter=[],r=this.get_filterFields().split(Web.DataView._simpleListRegex),f=this.get_domFilterSource().value.split(Web.DataView._simpleListRegex),t=0;t<r.length;t++)Array.add(this._externalFilter,{Name:r[t],Value:f[t]});else if(i=Web.DataView._commandLine.match(/\?([\s\S]+)/),i&&this.get_filterSource()!="None"&&this.get_filterSource()==null&&!this.get_useCase())for(this._externalFilter=[],u=/(\w+)=([\S\s]*?)(&|$)/g,n=u.exec(i[1]);n;)n[1]!="ReturnUrl"&&Array.add(this._externalFilter,{Name:n[1],Value:n[2].length==0?String.jsNull:decodeURIComponent(n[2])}),n=u.exec(i[1]);this.applyExternalFilter(this.get_isModal()||($app.mobile||this.useCase("$app"))&&this._filter)}else this.get_filterSource()=="Context"&&this._externalFilter.length>0&&this.applyExternalFilter(!0);return this._startupFilter&&(this.readContext("disableStartFilter")!=!0&&(Array.addRange(this._filter,this._startupFilter),this.writeContext("disableStartFilter",!0)),this._startupFilter=null),this._filter},set_filter:function(n){this._filter=n},get_startupFilter:function(){return this._startupFilter},set_startupFilter:function(n){this._startupFilter=n},get_externalFilter:function(){return this._externalFilter},set_externalFilter:function(n){this._externalFilter=n?n:[]},get_ditto:function(){return this._ditto},set_ditto:function(n){this._ditto=n},get_modalAnchor:function(){return this._modalAnchor},set_modalAnchor:function(n){this._modalAnchor=n},get_description:function(){return this._description},set_description:function(n){this._description=n},get_isModal:function(){return this._modalPopup!=null||this._isModal},get_categories:function(){return this._categories},get_fields:function(){return this._fields},get_rows:function(){return this._rows},get_selectedRow:function(){var n=this.extension();return n?this._selectedRow:this._rows?this._rows[this._selectedRowIndex!=null?this._selectedRowIndex:0]:[]},get_pageCount:function(){return this._pageCount},get_aggregates:function(){return this._aggregates},get_views:function(){return this._views},actionGroups:function(n){var s=[],h=this._actionGroups,i,r,u,t,e,f,o;for(typeof n=="string"&&(n=[n]),u=0;u<n.length;u++)for(o=n[u],i=0;i<h.length;i++)if(t=h[i],f=null,t.Scope==o||t.Id==o)for(r=0;r<t.Actions.length;r++)e=t.Actions[r],this._isActionAvailable(e)&&(f||s.push(f={Scope:t.Scope,HeaderText:t.HeaderText,Flat:t.Flat,Id:t.Id,Actions:[]}),f.Actions.push(e));return s},actions:function(n){var t=this.actionGroups(n);return t.length?t[0].Actions:null},get_actionGroups:function(n,t){for(var r,u,f,e=[],i=0;i<this._actionGroups.length;i++)if(this._actionGroups[i].Scope==n){if(r=this._actionGroups[i],u=t?r:null,!t)for(f=0;f<r.Actions.length;f++)if(this._isActionAvailable(r.Actions[f])){u=this._actionGroups[i];break}u&&Array.add(e,u)}return e},get_actions:function(n,t){for(var r,u=[],i=0;i<this._actionGroups.length;i++)if(this._actionGroups[i].Scope==n)if(r=this._actionGroups[i],t)Array.addRange(u,r.Actions);else return r.Actions;return u},get_action:function(n){for(var t,i,u,f=n.split(/\//),r=0;r<this._actionGroups.length;r++)if(t=this._actionGroups[r],t.Id==f[0])for(i=0;i<t.Actions.length;i++)if(u=t.Actions[i],u.Id==f[1])return u;return null},get_selectedKey:function(){return this._selectedKey},set_selectedKey:function(n){this._selectedKey=n},get_selectedKeyFilter:function(){return this._selectedKeyFilter},set_selectedKeyFilter:function(n){this._selectedKeyFilter=n},_get_selectedValueElement:function(){return $get(String.format("{0}_{1}_SelectedValue",this.get_id(),this.get_controller()))},get_selectedValue:function(){var t=this.readContext("SelectedValue"),n;return t?t:(n=this._get_selectedValueElement(),n?n.value:"")},set_selectedValue:function(n){if(!this._hasSearchAction){this.writeContext("SelectedValue",n.toString());var t=this._get_selectedValueElement();t&&(t.value=n!=null?n:"")}},get_keyRef:function(){var i=this.get_selectedKey(),t,n;if(!i)return null;for(t="",n=0;n<this._keyFields.length;n++)n>0&&(t+="&"),t=String.format("{0}{1}={2}",t,this._keyFields[n].Name,i[n]);return t},get_showIcons:function(){return this._icons!=null&&this._lookupField==null||this.get_showRowNumber()},get_showMultipleSelection:function(){return this.multiSelect()&&this._hasKey()},get_sysColCount:function(){var n=0;return this.get_showIcons()&&n++,this.get_showMultipleSelection()&&n++,this.get_isDataSheet()&&n++,n},_createRowKey:function(n){for(var r,u=this._rows[n],t="",i=0;i<this._keyFields.length;i++)r=this._keyFields[i],t.length>0&&(t+=","),t+=u[r.Index].toString();return t},toggleSelectedRow:function(n){for(var e,f,r,i,t,o,s=n!=null?n:0,h=n!=null?n:this._rows.length-1,c=$get(this.get_id()+"_ToggleButton"),u=s;u<=h;u++)if(e=this._createRowKey(u),f=Array.indexOf(this._selectedKeyList,e),f!=-1&&Array.removeAt(this._selectedKeyList,f),r=n==null?c.checked:f==-1,r&&Array.add(this._selectedKeyList,e),i=$get(this.get_id()+"_CheckBox"+u),i){for(i.checked=r,r?$(i).addClass("Selected"):$(i).removeClass("Selected"),t=i;t&&t.tagName!="TR";)t=t.parentNode;r?$(t).addClass("MultiSelectedRow"):$(t).removeClass("MultiSelectedRow")}this._skipCellFocus=this.get_isDataSheet();this.set_selectedValue(this._selectedKeyList.join(";"));o=$get(this.get_id()+"$SelectionInfo");o&&(o.innerHTML=this._selectedKeyList.length==0?"":String.format(Web.DataViewResources.Pager.SelectionInfo,this._selectedKeyList.length));n>=0?this.executeRowCommand(n,"Select"):this.delayedRefresh()},delayedRefresh:function(n,t){if(t||(t=1e3),n)delete this._delayedRefreshTimer,this._isBusy||Web.DataView._navigated||Sys.Application._disposing||this.refresh(!0);else{this._delayedRefreshTimer&&clearTimeout(this._delayedRefreshTimer);var i=this;this._delayedRefreshTimer=setTimeout(function(){i.delayedRefresh(!0)},t)}},get_view:function(n){if(n||(n=this.get_viewId()),!this._view||this._view.Id!=n)for(var t=0;t<this._views.length;t++)if(this._views[t].Id==n){this._view=this._views[t];break}return this._view},get_viewType:function(n){var t=this.get_view(n),i;return this._viewTypes&&(i=this._viewTypes[t?t.Id:n],i!=null)?i:t?t.Type:null},get_isGrid:function(n){var t=this.get_viewType(n);return t=="Grid"||t=="DataSheet"},get_isForm:function(n){var t=this.get_viewType(n);return t=="Form"},get_isDataSheet:function(n){var i=this.get_viewType(n),t;return __tf!=4?!1:(this._viewTypes&&(t=this._viewTypes[this.get_viewId()],t!=null&&(i=t)),i=="DataSheet")},get_isChart:function(){return this.get_viewType()=="Chart"},get_lastViewId:function(){return this._lastViewId},set_lastViewId:function(n){this._lastViewId=n},get_lastCommandName:function(){return this._lastCommandName},set_lastCommandName:function(n){this._lastCommandName=n;this._lastCommandArgument=null;$closeHovers()},get_lastCommandArgument:function(){return this._lastCommandArgument},set_lastCommandArgument:function(n){this._lastCommandArgument=n},get_isEditing:function(){var t=this,n=t._lastCommandName,i=t._editing;return(n=="New"||n=="Edit"||n=="BatchEdit"||n=="Duplicate")&&i==null||i==!0},get_isInserting:function(){return this._lastCommandName=="New"||this._lastCommandName=="Duplicate"},get_lookupField:function(){return this.get_mode()==Web.DataViewMode.View?this._lookupField:this._fields[0]},set_lookupField:function(n){this._lookupField=n},get_lookupContext:function(){var n=this.get_lookupField();return n?{FieldName:n.Name,Controller:n._dataView.get_controller(),View:n._dataView.get_viewId()}:null},get_mode:function(){return this._mode},set_mode:function(n){this._mode=n},get_lookupValue:function(){return this._lookupValue},set_lookupValue:function(n){this._lookupValue=n},get_lookupText:function(){return this._lookupText},set_lookupText:function(n){this._lookupText=n},get_lookupPostBackExpression:function(){return this._lookupPostBackExpression},set_lookupPostBackExpression:function(n){this._lookupPostBackExpression=n},get_domFilterSource:function(){return this._domFilterSource},set_domFilterSource:function(n){this._domFilterSource=n},get_showDetailsInListMode:function(){return this._showDetailsInListMode!=!1},set_showDetailsInListMode:function(n){this._showDetailsInListMode=n},get_autoHide:function(){return String.isNullOrEmpty(this.get_visibleWhen())?this._autoHide==null?Web.AutoHideMode.Nothing:this._autoHide:Web.AutoHideMode.Self},set_autoHide:function(n){this._autoHide=n},get_transaction:function(){return this._transaction},set_transaction:function(n){this._transaction=n},initialize:function(){Web.DataView.callBaseMethod(this,"initialize");this._bodyKeydownHandler=Function.createDelegate(this,this._bodyKeydown);this._filterSourceSelectedHandler=Function.createDelegate(this,this._filterSourceSelected);this._quickFindHandlers={focus:this._quickFind_focus,blur:this._quickFind_blur,keydown:this._quickFind_keydown};this._checkMaxLengthHandler=function(n){var t=parseInt(this.getAttribute("maxlength"));this.value.length>t&&(this.value=this.value.substr(0,t),n.preventDefault(),n.stopPropagation())}},dispose:function(){Sys.Application._disposing||($(this._element).find("iframe").remove(),this._detachBehaviors());var n=this.extension();n&&n.dispose&&n.dispose();this._wsRequest=null;this._stopInputListener();this._disposeModalPopup();this._disposeFieldFilter();this._disposeSearchBarExtenders();this._disposeImport();this._disposeFields();this._lookupField=null;this._parentDataView=null;this._bodyKeydownHandler=null;this._filterSourceSelectedHandler=null;this._restoreEmbeddedViews();delete this._container;Web.DataView.callBaseMethod(this,"dispose")},get_master:function(){var n=this.get_filterSource();return n?Web.DataView.find(n):null},tag:function(n){this._tag=(this._tag||"")+","+n},untag:function(n){if(this._tag){var t=this._tag.split(","),i=Array.indexOf(t,n);i>=0&&t.splice(i,1);this._tag=t.join()}},get_isTagged:function(n){return this._tag&&Array.contains(this._tag.split(Web.DataView._simpleListRegex),n)},updated:function(){var i,e,r,n,c,t,u,f,o,s,h;if(Web.DataView.callBaseMethod(this,"updated"),this._controller){if(this.get_servicePath().startsWith("http")&&this.set_baseUrl(this.get_siteUrl()),i=this.get_selectedValue(),i.length>0&&(this.set_autoHighlightFirstRow(!1),this.set_autoSelectFirstRow(!1),this.multiSelect()?this._selectedKeyList=i.split(";"):(this._selectedKey=i.split(","),this._pendingSelectedEvent=!0)),this._container==null&&(this.get_element().innerHTML="",this._container=document.createElement("div"),this.get_element().appendChild(this._container),$(this._container).addClass("DataViewContainer"),e=this._element.id,r=e.split(/_/),Sys.UI.DomElement.addCssClass(this._container,r?r[r.length-1]:e),this.get_showActionBar()||$(this._container).addClass("ActionBarHidden"),this.get_showDescription()||$(this._container).addClass("DescriptionHidden")),this.get_filterSource()&&this.get_filterSource()!="Context"?(n=this.get_master(),n?(this._hasParent=!0,n.add_selected(this._filterSourceSelectedHandler),this.get_transaction()=="Supported"&&(String.isNullOrEmpty(n.get_transaction())||(this.set_transaction(n.get_transaction()!="Supported"?n.get_transaction():null),this._forceVisible=this.get_transaction()&&n.get_isInserting())),n._pendingSelectedEvent&&!$app.mobile?(this._source=n,c=this,this._afterUpdateTimerId=setInterval(function(){c._afterUpdate()},250)):this._forceVisible||(this._hidden=!0)):(n=$get(this.get_filterSource()),n&&$addHandler(n,"change",this._filterSourceSelectedHandler),this.set_domFilterSource(n)),this._externalFilter.length==0&&this._createExternalFilter(),this._filter.length==0&&(this._source||this.applyExternalFilter())):(this._hidden=!this._evaluateVisibility(),this._hidden&&this._updateLayoutContainerVisibility(!1)),this.get_transaction()=="Supported"&&this.set_transaction(null),$app.mobile||!this.get_modalAnchor()||this.get_isModal()||this._initializeModalPopup(),n!=null&&this.get_autoHide()!=Web.AutoHideMode.Nothing&&this._updateLayoutContainerVisibility(!1),this.get_startCommandName()=="UseTransaction"&&(this._usesTransaction=!0,this.set_startCommandName(null)),this.get_startCommandName()=="DetectTransaction")if(this.get_transaction())this.set_startCommandName(null);else{n&&Web.DataView.isInstanceOfType(n)&&(n.remove_selected(this._filterSourceSelectedHandler),clearInterval(this._afterUpdateTimerId));return}(t=(Web.DataView.get_commandLine()||"").replace(/#.+?$/,""),u=t.match(/_commandName=(.+?)&_commandArgument=(.*?)(&|$)/),!u||!(String.isNullOrEmpty(this.get_startCommandName())||__designer())||this.get_filterSource()||this.get_isModal()||this.get_lookupField()||(f=t.match(/_controller=(\w+)/),o=t.match(/_view=(\w+)/),f&&f[1]!=this.get_controller()||o&&o[1]!=this.get_view()||(this._trySecondCommand=!String.isNullOrEmpty(f),this.set_startCommandName(u[1]),this.set_startCommandArgument(u[2]),String.isNullOrEmpty(this._viewId)||(this._replaceTriggerViewId=this._viewId),this._skipTriggeredView=!0,s=t.match(/\b_sync=(.+?)(&|$)/),s&&(this._syncKey=s[1].split(",")))),this.useCase("$app"))||(h=$app.mobile,this.get_startCommandName()?(this.set_searchOnStart(!1),this.set_lastCommandName(this.get_startCommandName()),this.set_lastCommandArgument(this.get_startCommandArgument()),this.get_startCommandName().match(/New|Edit|Select/)&&this.set_viewId(this.get_startCommandArgument()),this.set_startCommandName(null),this.set_startCommandArgument(null),this._rows=[],h||this._loadPage()):this.loadPage(),h&&this.mobileUpdated())}},_afterUpdate:function(){if((!this._delayedLoading||!this._source._pendingSelectedEvent)&&!this._source._isBusy){clearInterval(this._afterUpdateTimerId);var n=this._source;this._source=null;this._filterSourceSelected(n,Sys.EventArgs.Empty,!0)}},dataAttr:function(n,t,i){var r=$(n),u="data-"+t;if(i)r.attr(u,i);else return i=r.attr(u),i||(i=r.attr("factory:"+t)),i},_updateLayoutContainerVisibility:function(n){var t,r,u,f,i,e,o,h,a,c,l,s;if($app.mobile){this._hidden=!n;return}if(this._forceVisible&&(n=!0),t=this._element.parentNode,String.isNullOrEmpty(t.getAttribute("data-visibility-controller"))&&t.setAttribute("data-visibility-controller",this.get_id()),r=String.isNullOrEmpty(this.dataAttr(t,"activator"))?null:this.dataAttr(t,"activator").match(/^\s*(\w+)\s*\|\s*(.+?)\s*(\|\s*(.+)\s*)?$/),this.get_autoHide()==Web.AutoHideMode.Self){for(this._element.style.display=n?"":"none",n||(n=$(this._element).siblings().is(":visible")),u=t.parentNode.childNodes[0];u.tagName!="DIV";)u=u.nextSibling;if(r&&r[1]=="Tab"&&Sys.UI.DomElement.containsCssClass(u,"TabBar")){if(t.getAttribute("data-visibility-controller")==this.get_id()){for(f=-1,i=0;i<t.parentNode.childNodes.length;i++)if(e=t.parentNode.childNodes[i],e.className&&Sys.UI.DomElement.containsCssClass(e,"TabBody")&&f++,t==e)break;if(f!=-1&&(o=u.getElementsByTagName("td"),h=o[f],h.style.display=n?"":"none",!n&&Sys.UI.DomElement.containsCssClass(h,"Selected")))for(a=u.getElementsByTagName("a"),i=0;i<o.length;i++)if($common.getVisible(o[i])){$find(t.parentNode.id+"$ActivatorMenu").select(i,a[i]);break}}}else this.dataAttr(t,"hidden",!n)}else for(r&&r[1]=="SideBarTask"&&this.dataAttr(t,"hidden",!0);t;){if(!String.isNullOrEmpty(this.dataAttr(t,"flow"))){t.style.display=n?"":"none";break}t=t.parentNode}if(c=$get("PageContentSideBar"),c&&r)for(l=c.getElementsByTagName("a"),i=0;i<l.length;i++)if(s=l[i],Sys.UI.DomElement.containsCssClass(s.parentNode,"Task")&&s.innerHTML==r[2]){s.parentNode.style.display=n?"":"none";break}Web.DataView._loaded&&_body_performResize()},loadPage:function(){if(!$app.mobile){var n=this.get_isDisplayed();this._showWait(!n);this.get_mode()==Web.DataViewMode.View&&!this.get_lookupField()&&(this._delayedLoading=!n)?Array.contains($app._delayedLoadingViews,this)||(Array.add($app._delayedLoadingViews,this),$app._startDelayedLoading()):this._source||this._loadPage()}},get_isDisplayed:function(){if(this._hidden)return!1;var t=this.get_element(),n;if(!t)return!1;for(n=t&&t.parentNode;n!=null;){if(n.getAttribute&&n.tagName!="TABLE"&&this.dataAttr(n,"activator")&&!n._activated||n.style&&n.style.display=="none")return!1;n=n.parentNode}return!0},goToPage:function(n,t){this._isBusy||(t&&(this._pageOffset=0),this.set_pageIndex(n),this._loadPage())},sort:function(n){this._isBusy||(this._clearCache(),this.get_sortExpression()==n&&(n=""),this.set_sortExpression(n),this.get_selectedKey().length>0?(this._saveViewVitals(),this._sync()):(this.set_pageIndex(0),this._loadPage()))},applyFilterByIndex:function(n,t){if(t==-1)this.removeFromFilterByIndex(n);else{var i=this._allFields[n],r=this.findFieldUnderAlias(i);this.applyFilter(i,t>=0?"=":null,t>=0?r._listOfValues[t]:null)}},findFieldUnderAlias:function(n){if(n.Hidden)for(var t=0;t<this._allFields.length;t++)if(this._allFields[t].AliasIndex==n.Index)return this._allFields[t];return n},removeFromFilterByIndex:function(n){n==-1?this.removeQuickFind():(field=this._allFields[n],this.removeFromFilter(field));this.sync()},removeQuickFind:function(){var n=this;$(n._filter).each(function(t){this.match(/^_quickfind_\:\~/)&&n._filter.splice(t,1)})},removeFromFilter:function(n){for(var t=0;t<this._filter.length;t++)if(this._filter[t].match(/^(\w+):/)[1]==n.Name){Array.removeAt(this._filter,t);break}},clearFilter:function(){for(var n,r,i,t=0;t<this._allFields.length;t++)n=this._allFields[t],r=this.findFieldUnderAlias(n),this.filterOf(n)==null||this.filterIsExternal(n.Name)||this.removeFromFilter(n);i=this.get_quickFindElement();i!=null?(i.value="",this.quickFind()):(this.set_quickFindText(null),this._executeQuickFind(null))},beginFilter:function(){this._filtering=!0},endFilter:function(){this._filtering=!1;this.refreshData()},applyFilter:function(n,t,r){this._clearCache();this.removeFromFilter(n);t==":"?r&&this._filter.push(n.Name+":"+r):t&&this._filter.push((t=="~"?"_quickfind_":n.Name)+":"+t+this.convertFieldValueToString(n,r));var u=this._filter.length==1&&this._filter[0].match(/(\w+):/)[1]==n.Name;for(n=this.findFieldUnderAlias(n),i=0;i<this._allFields.length;i++)u&&this._allFields[i].Name==n.Name||(this._allFields[i]._listOfValues=null);this._filtering!=!0&&this._sync()},applyExternalFilter:function(n){var i,r,t;for(n&&this._filter||(this._filter=[]),this._selectedRowIndex=null,i=0;i<this._externalFilter.length;i++){if(r=this._externalFilter[i],n)for(t=0;t<this._filter.length;t++)if(this._filter[t].startsWith(r.Name+":=")){Array.removeAt(this._filter,t);break}Array.add(this._filter,r.Name+":="+r.Value)}},applyFieldFilter:function(n,t,i,r){var u,f,e;if(n==null&&(n=this._filterFieldIndex),t||(t=this._filterFieldFunc),u=this._allFields[n],this.removeFromFilter(u),$(this._allFields).each(function(){this._listOfValues=null}),f=String.format("{0}:",u.Name,u.Type),i&&i[0]==Web.DataViewResources.HeaderFilter.EmptyValue&&(i[0]=String.jsNull),i)if(t=="$between")f+="$between$"+this.convertFieldValueToString(u,i[0])+"$and$"+this.convertFieldValueToString(u,i[1])+'\0';else for(e=0;e<i.length;e++)f+=t+(t.startsWith("$")?"$":"")+this.convertFieldValueToString(u,i[e])+'\0';else f+=t+'$\0';f.indexOf('\0')>0&&Array.add(this._filter,f);r||this.refreshData();this._forgetSelectedRow(!0)},get_fieldFilter:function(n,t){for(var u,i,r=0;r<this._filter.length;r++)if(u=this._filter[r].match(/(\w+):(\*|\$\w+\$|=|~|>=?|<(=|>){0,1})([\s\S]*)/),u[1]==n.Name)return t?(i=u[2],i.startsWith("$")?i.substring(0,i.length-1):i):u[4];return null},_createFieldInputExtender:function(n,t,i,r){var u=null;return t.Type.startsWith("DateTime")?(u=$create(AjaxControlToolkit.CalendarBehavior,{id:String.format("{0}_{1}Calendar{2}_{3}",this.get_id(),n,t.Index,r),button:i.nextSibling},null,null,i),u.set_format(t.DataFormatString.match(/\{0:([\s\S]*?)\}/)[1])):t.AllowQBE&&t.Type=="String"&&t.AllowAutoComplete!=!1&&(u=$create(Web.AutoComplete,{completionInterval:500,contextKey:String.format("{0}:{1},{2}",n,this.get_id(),t.Name),delimiterCharacters:";",id:String.format("{0}_{1}AutoComplete{2}_{3}",this.get_id(),n,t.Index,r),minimumPrefixLength:t.AutoCompletePrefixLength==0?1:t.AutoCompletePrefixLength,serviceMethod:"GetListOfValues",servicePath:this.get_servicePath(),useContextKey:!0,enableCaching:n!="SearchBar",typeCssClass:n},null,null,i),u._updateClearButton()),u},showFieldFilter:function(n,t,i){var u,r,h,f,e,c,s,o,a,l;for(this._filterExtenders||(this._filterExtenders=[]),u=this._allFields[n],r=this.get_fieldFilter(u),r&&(h=r.match(/^([\s\S]*?)(\0|$)/),h&&(r=h[1])),r=r&&!String.isJavaScriptNull(r)?r.split(Web.DataView._listRegex):[""],this._filterFieldIndex=n,this._filterFieldFunc=t,f=this._filterElement=document.createElement("div"),f.id=this.get_id()+"$FieldFilter",f.className="FieldFilter",e=new Sys.StringBuilder,c=u.Type.startsWith("DateTime")?'<a class="Calendar" href="javascript:" onclick="return false">&nbsp;<\/a>':"",e.appendFormat('<div class="Field"><div class="Label"><span class="Name">{0}<\/span> <span class="Function">{1}<\/span><\/div><div class="Value"><input type="text" value="{2}"/>{3}<\/div><\/div>',u.HeaderText,i.toLowerCase(),Web.DataView.htmlAttributeEncode(u.format(this.convertStringToFieldValue(u,r[0]))),c),t=="$between"&&e.appendFormat('<div class="Field"><div class="Label"><span class="Function">{0}<\/span><\/div><div class="Value"><input type="text" value="{1}"/>{2}<\/div><\/div>',Web.DataViewResources.Data.Filters.Labels.And,Web.DataView.htmlAttributeEncode(r[1]?u.format(this.convertStringToFieldValue(u,r[1])):""),c),e.appendFormat('<div class="Buttons"><button onclick="$find(\'{0}\').closeFieldFilter(true);return false">{1}<\/button><button onclick="$find(\'{0}\').closeFieldFilter(false);return false">{2}<\/button><\/div>',this.get_id(),Web.DataViewResources.ModalPopup.OkButton,Web.DataViewResources.ModalPopup.CancelButton),f.innerHTML=e.toString(),this._appendModalPanel(f),this._filterPopup=$create(AjaxControlToolkit.ModalPopupBehavior,{id:this.get_id()+"$FilterPopup",PopupControlID:f.id,DropShadow:!0,BackgroundCssClass:"ModalBackground"},null,null,this._container.getElementsByTagName("a")[0]),s=f.getElementsByTagName("input"),o=0;o<s.length;o++)a=s[o],l=this._createFieldInputExtender("Filter",u,a,o),l&&Array.add(this._filterExtenders,l);this._saveTabIndexes();this._filterPopup.show();Sys.UI.DomElement.setFocus(s[0]);$(f).find("input:text").keydown(function(n){n.which==13&&(n.preventDefault(),$(f).find("button:first").click())})},closeFieldFilter:function(n){var e=this._filterElement.getElementsByTagName("input"),o=[],r,i,t,u,f;if(n)for(r=this._allFields[this._filterFieldIndex],i=0;i<e.length;i++){if(t=e[i],String.isBlank(t.value)){alert(Web.DataViewResources.Validator.RequiredField);Sys.UI.DomElement.setFocus(t);return}if(this._formatSearchField(t,this._filterFieldIndex),u={NewValue:t.value.trim()},f=this._validateFieldValueFormat(r,u),f){alert(f);Sys.UI.DomElement.setFocus(t);return}Array.add(o,r.Type.startsWith("DateTime")?t.value.trim():u.NewValue)}this._disposeFieldFilter();this._restoreTabIndexes();n&&this.applyFieldFilter(null,null,o)},_disposeSearchBarExtenders:function(){if(this._searchBarExtenders){for(var n=0;n<this._searchBarExtenders.length;n++)this._searchBarExtenders[n].dispose();Array.clear(this._searchBarExtenders)}},_disposeFieldFilter:function(){if(this._filterExtenders){for(var n=0;n<this._filterExtenders.length;n++)this._filterExtenders[n].dispose();Array.clear(this._filterExtenders)}this._filterElement&&(this._filterPopup.hide(),this._filterPopup.dispose(),this._filterPopup=null,this._filterElement.parentNode.removeChild(this._filterElement),delete this._filterElement)},_showSearchBarFilter:function(n,t){if(this._searchBarVisibleIndex=t,n==-1){var i=this._get("$SearchBarValue$",t);i.value="";this._searchBarFuncChanged(t);this._searchBarVisibleIndex=null}else this.showCustomFilter(n)},_appendModalPanel:function(n){this.get_element().appendChild(n)},showCustomFilter:function(n){var r=this._allFields[n],i=this._customFilterPanel=document.createElement("div"),t,u;this._appendModalPanel(i);i.className="CustomFilterDialog";i.id=this.get_id()+"_CustomFilterPanel";t=new Sys.StringBuilder;t.appendFormat('<div><span class="Highlight">{0}<\/span> {1}:<\/div>',Web.DataView.htmlEncode(r.Label),Web.DataViewResources.Data.Filters.Labels.Includes);t.append('<table cellpadding="0" cellspacing="0">');t.appendFormat('<tr><td colspan="2"><div id="{0}$CustomFilterItemList${1}" class="CustomFilterItems">{2}<\/div><\/td><\/tr>',this.get_id(),n,Web.DataViewResources.Common.WaitHtml);t.appendFormat('<tr><td><\/td><td align="right"><button id="{0}Ok">{1}<\/button> <button id="{0}Cancel">{2}<\/button><\/td><\/tr>',this.get_id(),Web.DataViewResources.ModalPopup.OkButton,Web.DataViewResources.ModalPopup.CancelButton);t.append("<\/table>");i.innerHTML=t.toString();t.clear();this._customFilterField=r;this._customFilterModalPopupBehavior=$create(AjaxControlToolkit.ModalPopupBehavior,{OkControlID:this.get_id()+"Ok",CancelControlID:this.get_id()+"Cancel",OnOkScript:String.format('$find("{0}").applyCustomFilter()',this.get_id()),OnCancelScript:String.format('$find("{0}").closeCustomFilter()',this.get_id()),PopupControlID:i.id,DropShadow:!0,BackgroundCssClass:"ModalBackground"},null,null,this._container.getElementsByTagName("a")[0]);this._customFilterModalPopupBehavior.show();$addHandler(document.body,"keydown",this._bodyKeydownHandler);u=this.findFieldUnderAlias(r);this._loadFilterListOfValues(r.Name)},_loadFilterListOfValues:function(n){this._busy(!0);var t=this.get_lookupContext();this._invoke("GetListOfValues",this._createArgsForListOfValues(n),Function.createDelegate(this,this._onGetFilterListOfValuesComplete),{fieldName:n})},_renderFilterOption:function(n,t,i,r,u){var f=this._findItemByValue(t,i);f&&(i=f[1]);n.appendFormat('<tr><td class="Input"><input type="checkbox" id="{0}$CustomFilterItem{1}${2}"{4}/><\/td><td class="Label"><label for="{0}$CustomFilterItem{1}${2}">{3}<\/label><\/td><\/tr>',this.get_id(),t.Index,r,i,u?' checked="checked"':"")},_onGetFilterListOfValuesComplete:function(n,t){var u,s,a,h,i,e,f,c,r,o,w,k;if(this._busy(!1),u=this.findField(t.fieldName),n[n.length-1]==null&&(Array.insert(n,0,n[n.length-1]),Array.removeAt(n,n.length-1)),s=this._get("$CustomFilterItemList$",u.Index),s){for(a=this._searchBarVisibleIndex!=null?this._createSearchBarFilter(!0):this._filter,h=null,this.findFieldUnderAlias(u)._listOfValues=n,i=0;i<a.length;i++)if(e=a[i].match(Web.DataView._fieldFilterRegex),e[1]==u.Name){h=e[2];break}if(f=null,c="$in$",h&&(e=h.match(Web.DataView._filterRegex),e))for(e[1].match(/\$(in|notin|between)\$/)?(c=e[1],f=e[3].split(Web.DataView._listRegex)):f=[e[3]],i=0;i<f.length;i++)r=f[i],String.isJavaScriptNull(r)?f[i]=Web.DataViewResources.HeaderFilter.EmptyValue:(r=this.convertStringToFieldValue(u,r),f[i]=u.format(r));o=new Sys.StringBuilder;o.appendFormat('<table class="FilterItems" cellpadding="0" cellspacing="0"><tr><td><input type="CheckBox" onclick="$find(\'{0}\')._selectAllFilterItems({1})" id="{0}$CustomFilterItemList$SelectAll"/><\/td><td><label for="{0}$CustomFilterItemList$SelectAll">{2}<\/label><\/td><\/tr>',this.get_id(),u.Index,Web.DataViewResources.Data.Filters.Labels.SelectAll);var v=[],l=[],b=[],y=[],p=this.findFieldUnderAlias(u);for(i=0;i<n.length;i++)r=n[i],w=r,r==null?r=Web.DataViewResources.HeaderFilter.EmptyValue:(r=Web.DataView.htmlEncode(u.format(r)),r==""&&(r=Web.DataViewResources.HeaderFilter.BlankValue)),k=f&&(c=="$in$"&&Array.contains(f,r)||c=="$notin$"&&!Array.contains(f,r)),k?(Array.add(l,r),Array.add(v,w)):(Array.add(y,r),Array.add(b,w));for(i=0;i<l.length;i++)this._renderFilterOption(o,u,l[i],i,!0);for(i=0;i<y.length;i++)this._renderFilterOption(o,u,y[i],i+l.length,!1);o.append("<\/table>");s.innerHTML=o.toString();Sys.UI.DomElement.setFocus(s.getElementsByTagName("input")[0]);v.length>0&&(p._listOfValues=[],Array.addRange(p._listOfValues,v),Array.addRange(p._listOfValues,b))}},_selectAllFilterItems:function(n){for(var r=this._get("$CustomFilterItemList$",n),t=r.getElementsByTagName("input"),i=1;i<t.length;i++)t[i].checked=t[0].checked},applyCustomFilter:function(){var r=this._customFilterField,u=this._searchBarVisibleIndex!=null?this._get("$SearchBarValue$",this._searchBarVisibleIndex):null,s=u?this._get("$SearchBarFunction$",this._searchBarVisibleIndex):null,t,o;this.removeFromFilter(r);var n=null,h=this._get("$CustomFilterItemList$",r.Index),i=h.getElementsByTagName("input"),e=this.findFieldUnderAlias(r),f=0;for(t=1;t<i.length;t++)i[t].checked&&(n?n+="$or$":n="",n+=this.convertFieldValueToString(r,e._listOfValues[t-1]),f++);if(n&&(f<=10||f!=i.length-1))if(f<=10||f<=(i.length-1)/2)u?s.value="$in,true":Array.add(this._filter,String.format('{0}:$in${1}\0',this._customFilterField.Name,n));else{for(n=null,t=1;t<i.length;t++)i[t].checked||(n?n+="$or$":n="",n+=this.convertFieldValueToString(r,e._listOfValues[t-1]));u?s.value="$notin,true":Array.add(this._filter,String.format('{0}:$notin${1}\0',this._customFilterField.Name,n))}else n=null;for(t=0;t<this._allFields.length;t++)o=this._allFields[t],o!=e&&(o._listOfValues=null);u?(u.value=n?n:"",this._searchBarFuncChanged(this._searchBarVisibleIndex)):(this._forceSync(),this.refreshData());this.closeCustomFilter()},closeCustomFilter:function(){this._customFilterModalPopupBehavior&&(this._customFilterModalPopupBehavior.dispose(),this._customFilterModalPopupBehavior=null,this._customFilterField=null);this._customFilterPanel&&(this._customFilterPanel.parentNode.removeChild(this._customFilterPanel),delete this._customFilterPanel);$removeHandler(document.body,"keydown",this._bodyKeydownHandler);this._customFilterField=null;this._searchBarVisibleIndex=null},convertFieldValueToString:function(n,t){return typeof t=="string"&&(t.match(Web.DataView._listRegex)||t.startsWith("%js%"))?t:(n.Type!="String"&&t!=null&&typeof t=="string"&&(t=this.convertStringToFieldValue2(n,t)),Date.isInstanceOfType(t)&&(t=new Date(t-t.getTimezoneOffset()*6e4)),String.format("%js%{0}",Sys.Serialization.JavaScriptSerializer.serialize(t)))},convertFieldValueToString2:function(n,t){return n.Type.startsWith("DateTime")&&!String.isNullOrEmpty(n.DataFormatString)?t==null?null:String.localeFormat(n.DataFormatString,t):n.Type=="Boolean"?t==null?null:t.toString():t.toString()},convertStringToFieldValue:function(n,t){return t!=null&&t.startsWith("%js%")?(t=Sys.Serialization.JavaScriptSerializer.deserialize(t.substring(4)),Date.isInstanceOfType(t)&&(t=new Date(t.getTime()+t.getTimezoneOffset()*6e4)),t):this.convertStringToFieldValue2(n,t)},convertStringToFieldValue2:function(n,t){var i,r;if(t==null)return t;switch(n.Type){case"DateTime":if(i=n.DataFormatString&&n.DataFormatString.length?Date.parseLocale(t,n.DataFormatString.match(/\{0:([\s\S]*?)\}/)[1]):Date.parse(t),!isNaN(i)&&i!=null)return i;break;case"SByte":case"Byte":case"Int16":case"Int32":case"UInt32":case"Int64":case"Single":case"Double":case"Decimal":case"Currency":if(r=Number.parseLocale(t),!isNaN(r))return r}return t},goToView:function(n){var o,s,r,t,u,f,e;if(!String.isNullOrEmpty(this._replaceTriggerViewId)&&this._replaceTriggerViewId==n){this._skipTriggeredView&&(this._skipTriggeredView=!1);location.replace(location.href);return}if(o=this._ditto&&this._ditto.slice(0),this._clearCache(!0),this._ditto=o,s=this.get_filter(),r=this.get_view().Group,n=="form")for(t=0;t<this.get_views().length;t++)if(this.get_views()[t].Type=="Form"){n=this.get_views()[t].Id;break}this._detachBehaviors();this.get_isForm()||(this._lastViewId=this.get_viewId(),this._selectedRowIndex=0);var c=this.get_view().Id,i=c!=n,h,l=this.extension();i&&(this._focusedFieldName=null,h=this.get_isForm(),this.get_isGrid()||this.writeContext("vitals",null));this.set_viewId(n);u=this.get_view();u.Type!="Form"&&(this._lastViewId=n,this._restorePosition(),i&&h&&$app.mobile&&l._dispose(!0));this.set_pageIndex(-1);f=u.Type=="Form"?this.get_selectedKeyFilter():!String.isNullOrEmpty(r)&&this.get_view().Group==r||!i?s:[];this._requestedFilter&&(f=this._requestedFilter,this._requestedFilter=null);e=i?null:this.get_sortExpression();this._requestedSortExpression&&(e=this._requestedSortExpression,this._requestedSortExpression=null);this.set_filter(f);this.set_sortExpression(e);this._loadPage();this._raiseSelectedDelayed=!0;i&&(this._scrollIntoView=!0,this._focusedCell=null)},filterOf:function(n){for(var i,r=(String.isNullOrEmpty(n.AliasName)?n.Name:n.AliasName)+":",t=0;t<this._filter.length;t++)if(i=this._filter[t],i.startsWith(r)&&!i.match(":~"))return this._filter[t].substr(r.length);return null},findField:function(n){for(var i,t=0;t<this._allFields.length;t++)if(i=this._allFields[t],i.Name==n)return i;return null},findCategory:function(n){for(var i,t=0;t<this._categories.length;t++)if(i=this._categories[t],i.Id==n)return i;return null},_isInInstantDetailsMode:function(){return location.href.match(Web.DataView.DetailsRegex)},_closeInstantDetails:function(){return this._isInInstantDetailsMode()&&Web.DataViewResources.Lookup.ShowDetailsInPopup?(close(),!0):!1},_confirm:function(n,t){var v=/(_(\w+))\s*=\s*(.+?)(\s*\r|;|\n|$)/gi,u=n.action.Confirmation,o=!0,s=v.exec(u),i,f,e,r,w,c,h;if(!s||__tf!=4)u=this._parseText(u,this.get_currentRow()),t?t(u):confirm(u)||(o=!1);else{for(var l=null,y="",a="New",p="";s;)i=s[2],f=s[3],i=="controller"&&(l=f),i=="view"&&(y=f),i=="commandName"&&(a=a),i=="commandArgument"&&(p=f),i=="width"&&(n.MaxWidth=f),i=="title"&&(n.WindowTitle=f),s=v.exec(u);if(e=this.get_isModal()?null:Web.DataView.find(l,"Controller"),e&&!e.get_isModal())r=e._collectFieldValues(),o=e._validateFieldValues(r,!0),o&&(this._convertValuesToParameters(r),this._paramValues=r);else{for(r=this._collectFieldValues(),w=n.Values=[],c=0;c<r.length;c++)h=r[c],Array.add(w,{Name:"Context_"+h.Name,Value:h.Modified?h.NewValue:h.OldValue});e=Web.DataView.showModal(this,l,y,a,p,this.get_baseUrl(),this.get_servicePath(),[],{confirmContext:n,showSearchBar:this.get_showSearchBar()});o=!1}}return o},executeAction:function(n,t,i,r,u,f){var s,e,o;if(!this._isBusy){if(Web.DataView.hideMessage(),!f){if(s=this.get_lookupField()!=null,e=s&&this._lookupActionProcessing()?null:n=="ActionBar"?this.get_actionGroups(n)[r].Actions:this.get_actions(n),t<0&&e){for(o=0;o<e.length;o++)if(this._isActionAvailable(e[o],i)){t=o;break}if(t<0)return}f=e?e[t]:null}if(!f||String.isNullOrEmpty(f.Confirmation)||(!this.get_isGrid()||this.get_isDataSheet()||this.get_lastCommandName()=="BatchEdit"||s||this.executeRowCommand(i,"Select"),u||this._confirm({action:f,scope:n,actionIndex:t,rowIndex:i,groupIndex:r}))){var h=f?f.CommandName:"Select",c=f?f.CommandArgument:null,l=f?f.CausesValidation:!0,a=f?f.Path:null;this.executeRowCommand(i,h,c,l,a)}}},executeRowCommand:function(n,t,i,r,u){var f=this.extension(),e,o;(n!=null&&n>=0&&(this._selectedRowIndex=n,this._raiseSelectedDelayed=!(t=="Select"&&String.isNullOrEmpty(i)),f&&(this._selectedRow=this._rows[n]),this._selectKeyByRowIndex(n)),e={commandName:t,commandArgument:i?i:"",path:u,causesValidation:r?!0:!1},!$app.mobile&&this.get_isDataSheet()&&t.match(/Select|New|Edit|Duplicate/)&&this._rows.length>0&&(f==null||Web.DataView.Extensions.active(f)?this._get_focusedCell()||this._startInputListenerOnCell(0,0):Web.DataView.Extensions.active(f,!0)),this.executeCommand(e))&&(t=="ClientScript"?this._raiseSelectedDelayed||(o=this,setTimeout(function(){o.refresh(!0)},10)):t!="Select"||i!=null||this.get_isGrid()||this._render())},rowCommand:function(n,t,i,r,u){var e,f,o;(this._raiseSelectedDelayed=!(t=="Select"&&String.isNullOrEmpty(i)),this._selectKeyByRow(n),e={commandName:t,commandArgument:i?i:"",path:u,causesValidation:r?!0:!1},this.get_isDataSheet()&&t.match(/Select|New|Edit|Duplicate/)&&(f=this.extension(),f==null||Web.DataView.Extensions.active(f)||Web.DataView.Extensions.active(f,!0)),this.executeCommand(e))&&(t=="ClientScript"?this._raiseSelectedDelayed||(o=this,setTimeout(function(){o.refresh(!0)},10)):t!="Select"||i!=null||this.get_isGrid()||this._render())},_get_dataRequestForm:function(){var n=$get("_dataRequest_form");return n||(n=document.createElement("form"),n.id="_dataRequest_form",n.method="post",n.innerHTML='<input type="hidden" name="q" id="q"/><input type="hidden" name="aa" id="aa"/><input type="hidden" name="c" id="c"/><input type="hidden" name="a" id="a"/>',document.body.appendChild(n)),n},_applySelectionFilter:function(n){this.multiSelect()&&this._selectedKeyList.length>0&&this._keyFields.length==1&&(n.Filter=Array.clone(n.Filter),Array.add(n.Filter,String.format("{0}:$in${1}",this._keyFields[0].Name,this._selectedKeyList.join("$or$"))))},get_appRootPath:function(){var n=this.get_servicePath();return typeof __cothost!="undefined"&&(__cothost=="DotNetNuke"&&n.match(/DesktopModules\//i)||__cothost=="SharePoint"&&n.match(/_layouts\//i))?n.replace(/Service\.asmx$/i,""):"~/"},executeReport:function(n){var t,i,u,o,f,e,c,s,r,h;if(this._cancelConfirmation(),t=this._createParams(!0),t.Controller=this.get_controller(),t.View=this.get_viewId(),i=this._get_dataRequestForm(),i.target="",i.action=this.resolveClientUrl(this.get_appRootPath()+"Report.ashx"),$get("c",i).value=n.commandName,u=n.commandArgument,String.isNullOrEmpty(u)||(u.startsWith("_")&&(i.target=u),o=u.split(Web.DataView._simpleListRegex),u=o[0],o.length==3&&(t.Controller=o[1],t.View=o[2])),$get("a",i).value=u,t.Filter.length>0&&this.get_viewType()!="Form"){if(f=new Sys.StringBuilder,this.useCase("$app"))f.append(this._filterDetailsText);else if(this._renderFilterDetails(f,t.Filter),e=this.get_master(),e)for(c=e.get_selectedRow(),s=0;s<e._allFields.length;s++)r=e._allFields[s],r.ShowInSummary&&!r.OnDemand&&(r=e._allFields[r.AliasIndex],f.isEmpty()||f.append(" "),f.appendFormat("{0} {1} {2}.",r.HeaderText,Web.DataViewResources.Data.Filters.Labels.Equals,r.format(c[r.Index])));t.FilterDetails=f.toString()}this._viewMessages&&(t.FilterDetails=String.format("{0} {1}",this._viewMessages[this.get_viewId()],t.FilterDetails));t.FilterDetails&&(t.FilterDetails=t.FilterDetails.replace(/(<b class=\"String\">([\s\S]*?)<\/b>)/g,'"$2"').replace(/(&amp;)/g,"&").replace(/(<.+?>)|&nbsp;/g,""));this._applySelectionFilter(t);$get("q",i).value=Sys.Serialization.JavaScriptSerializer.serialize(t);h=this._createArguments(n);this._validateFieldValues(h.Values,!0);h.ExternalFilter=t.ExternalFilter;$get("aa",i).value=Web.DataView.htmlEncode(Sys.Serialization.JavaScriptSerializer.serialize(h));this._showDownloadProgress();i.submit()},_showDownloadProgress:function(){var n,t,i;$app.isSaaS()||(this._busy(!0),n=this,t="APPFACTORYDOWNLOADTOKEN",document.cookie=String.format("{0}={1}; path=/",t,encodeURIComponent(this.get_id())),i=setInterval(function(){var u,r,f,e,o;if(!String.isNullOrEmpty(document.cookie))for(u=document.cookie.split(";"),r=0;r<u.length;r++)f=u[r].trim(),f.startsWith(t)&&(e=f.substring(t.length+1).split(","),e.length==2&&e[0]==n.get_id()&&(document.cookie=String.format("{0}=; expires={1}; path=/",t,new Date(0).toUTCString()),n._busy(!1),clearInterval(i),o=n._pendingExecuteComplete,n._pendingExecuteComplete&&(n._pendingExecuteComplete=null,n._onExecuteComplete(o.result,o.context))))},500))},executeExport:function(n){var t=this._get_dataRequestForm(),i;t.target=n.commandName=="ExportRss"?"_blank":"";t.action=this.resolveClientUrl(this.get_appRootPath()+"Export.ashx");i=this._createParams(!0);this._applySelectionFilter(i);n.Controller=this.get_controller();n.View=this.get_viewId();n.Filter=i.Filter;n.SortExpression=i.SortExpression;$get("c",t).value=n.commandName;$get("a",t).value=n.commandArgument;$get("q",t).value=Sys.Serialization.JavaScriptSerializer.serialize(n);t.submit()},_clearDynamicItems:function(){for(var t,n=0;n<this._allFields.length;n++)t=this._allFields[n],t.DynamicItems&&(t.DynamicItems=null)},_copyLookupValues:function(n,t,i,r){var o,f;if(!String.isNullOrEmpty(t.Copy)){for(var e=r?r:[],s=/(\w+)\s*=\s*(\w+)/g,u=s.exec(t.Copy);u;){if(t._dataView.findField(u[1]))if(u[2]=="null")Array.add(e,{name:u[1],value:null});else if(n)o=this.findField(u[2]),o&&Array.add(e,{name:u[1],value:n[o.Index]});else if(i)for(f=0;f<i.length;f++)if(i[f].Name==u[2]){Array.add(e,{name:u[1],value:i[f].NewValue});break}u=s.exec(t.Copy)}r||(t._dataView.refresh(!0,e),t._dataView._focus())}},_copyExternalLookupValues:function(){var n,r,u,t,i;if(this.get_filterSource()&&this.get_filterSource()!="Context"&&(n=this.get_master(),n)){for(r=[],u=this.get_externalFilter(),t=0;t<u.length;t++)i=this.findField(u[t].Name),i&&!String.isNullOrEmpty(i.Copy)&&n._copyLookupValues(n.get_currentRow(),i,null,r);this._ditto=r}},_processSelectedLookupValues:function(){var i=[],u=[],f=this.get_lookupField(),o=this.findField(f.ItemsDataValueField),e=this.findField(f.ItemsDataTextField),r=this.get_selectedRow(),n,t;if(o)Array.add(i,r[o.Index]);else for(n=0;n<this._allFields.length;n++)this._allFields[n].IsPrimaryKey&&Array.add(i,r[this._allFields[n].Index]);if(e)Array.add(u,e.format(r[e.Index]));else{for(n=0;n<this.get_fields().length;n++)if(t=this.get_fields()[n],!t.Hidden&&t.Type=="String"){Array.add(u,t.format(r[t.AliasIndex]));break}if(u.length==0)for(n=0;n<i.length;n++)if(t=this.get_fields()[n],!t.Hidden){Array.add(u,t.format(r[t.AliasIndex]));break}}this._copyLookupValues(r,f);f._dataView.changeLookupValue(f.Index,i.length==1?i[0]:i,u.join(";"))},_showModal:function(n){this.set_lastCommandName(null);this.set_lastCommandArgument(null);this._render();n.commandName=="Duplicate"&&(n.commandName="New");var t=Web.DataView.showModal(this,this.get_controller(),n.commandArgument,n.commandName,n.commandArgument,this.get_baseUrl(),this.get_servicePath(),this.get_hasParent()?this._externalFilter:null,{filter:this.get_selectedKeyFilter(),ditto:this.get_ditto(),lastViewId:this.get_lastViewId(),transaction:this.get_transaction(),filterSource:this.get_filterSource(),filterFields:this.get_filterFields(),showSearchBar:this.get_showSearchBar(),tag:this.get_tag(),showActionButtons:this.get_showActionButtons()});this.set_ditto(null);this._savePosition();t.get_isInserting()||(t._position=this._position);this._restorePosition()},_savePosition:function(){this.get_isForm()||this._selectedRowIndex==null||(this._position={index:this._pageSize*this._pageIndex+this._selectedRowIndex,count:this._totalRowCount,filter:this.get_filter(),sortExpression:this.get_sortExpression(),key:Array.clone(this._selectedKey),keyFilter:this._selectedKeyFilter,active:!1})},_restorePosition:function(){this._position&&(this._selectedKey=this._position.key,this._selectedKeyFilter=this._position.keyFilter,this._position=null)},_advance:function(n){this._isBusy||!this._position||n==-1&this._position.index==0||n==1&&this._position.index==this._position.count-1||(this._position.index+=n,this._position.changing=!0,this._position.changed=!0,this._loadPage(),this._position.changing=!1)},cancel:function(){if(!this._closeInstantDetails()){if(this.endModalState("Cancel"))return;this.get_backOnCancel()||!String.isNullOrEmpty(this._replaceTriggerViewId)?(this.goBack(!1),setTimeout(function(){location.replace(location.href)},500)):(this.set_lastCommandName("Cancel"),this._pendingSelectedEvent=!0,this.get_isForm()||this.get_isInserting()?(this._forceSync(),this.goToView(this._lastViewId)):this._totalRowCount<0?this.goToPage(-1):(this._clearDynamicItems(),this._render(),_body_performResize()))}},_convertValuesToParameters:function(n){for(var i=0,t;i<n.length;)t=n[i],t.ReadOnly=!0,t.Name.match("PrimaryKey")?Array.removeAt(n,i):(t.Name="Parameters_"+t.Name,i++)},_actionConfirmed:function(n){var r=this._createArguments(n),f=this._validateFieldValues(r.Values,n.causesValidation==null||n.causesValidation),t,i,u;f&&(t=this.get_confirmContext(),i=this.get_parentDataView(),t&&i&&(u=i._paramValues=r.Values,this._convertValuesToParameters(u),i._confirmDataViewId=this.get_id(),i._lookupActionProcessing(!1),i.executeAction(t.scope,t.actionIndex,t.rowIndex,t.groupIndex,!0,t.action),i._lookupActionProcessing(!0)))},executeCommand:function(n){var t,a,o,s,h,u,r,p,e,c,l;if(!this._isBusy){if(t=new Web.BusinessRules(this),a=$app.mobile,t.before(n),t.canceled())return t.dispose(),this._valid=n.commandName=="Calculate",this._valid;switch(n.commandName){case"Select":case"":this.set_lastCommandName(n.commandName);this.set_lastCommandArgument(n.commandArgument);this.get_lookupField()&&n.commandArgument==""?this._processSelectedLookupValues():(String.isBlank(n.commandArgument)?this._render():(this._savePosition(),this.get_showModalForms()&&this.get_isForm(n.commandArgument)?this._showModal(n):this.goToView(n.commandArgument)),__designer()&&__designer_notifySelected(this));break;case"Edit":case"BatchEdit":case"New":case"Duplicate":if(a||(this._allowModalAutoSize(),this._fixHeightOfRow(!1),n.commandName=="Edit"?this._savePosition():this._restorePosition()),n.commandName=="Duplicate"&&(o=this.get_selectedRow(),o)){for(s=[],i=0;i<this._allFields.length;i++)h=this._allFields[i],Array.add(s,{name:h.Name,value:o[h.Index]});this._ditto=s}u=this._get_focusedCell();r=this.extension();(n.commandName=="New"||n.commandName=="Duplicate")&&(String.isNullOrEmpty(n.commandArgument)&&(n.commandArgument=this.get_viewId()),r&&r.clearSelection?r.clearSelection(!0):this._forgetSelectedRow(!1,u),n.commandName=="New"&&this._copyExternalLookupValues());this.set_lastCommandName(n.commandName);this.set_lastCommandArgument(n.commandArgument);this._clearDynamicItems();String.isBlank(n.commandArgument)?r&&r.stateChanged?r.stateChanged():(this.get_isModal()&&(this._container.style.height=""),this.get_isDataSheet()&&!this._pendingChars&&this._startInputListenerOnCell(this._selectedRowIndex,u==null?0:u.colIndex),this._render()):this.get_showModalForms()&&this.get_isForm(n.commandArgument)&&!this.get_isModal()?this._showModal(n):this.goToView(n.commandArgument);__designer()&&__designer_notifySelected(this);break;case"Navigate":this.navigate(n.commandArgument);break;case"Cancel":this.cancel();break;case"Confirm":this._actionConfirmed(n);break;case"Back":history.go(String.isNullOrEmpty(n.commandArgument)?-1:parseInt(n.commandArgument));break;case"Report":case"ReportAsPdf":case"ReportAsImage":case"ReportAsExcel":case"ReportAsWord":this.executeReport(n);break;case"ExportCsv":case"ExportRowset":case"ExportRss":this.executeExport(n);break;case"_ViewDetails":this._viewDetails(n.commandArgument);break;case"ClientScript":Web.HoverMonitor._instance.close();eval(n.commandArgument);break;case"SelectModal":case"EditModal":this.set_lastCommandName(null);this.set_lastCommandArgument(null);this._render();var w=n.commandName.match(/^(\w+)Modal$/),f=n.commandArgument.split(","),b=f.length==1?this.get_controller():f[0],v=f.length==1?n.commandArgument:f[1],y=[];for(i=0;i<this.get_selectedKey().length;i++)Array.add(y,{Name:this._keyFields[i].Name,Value:this.get_selectedKey()[i]});p=Web.DataView.showModal(this,b,v,w[1],v,this.get_baseUrl(),this.get_servicePath(),y);p._parentDataViewId=this.get_id();break;case"Import":this._showImport(n.commandArgument);break;case"DataSheet":this.writeContext("GridType","DataSheet");this._forceFocusDataSheet=!0;this.changeViewType("DataSheet");this.refreshAndResize();break;case"Grid":this.writeContext("GridType","Grid");this.changeViewType("Grid");this.refreshAndResize();break;case"Status":this._changeStatus(n);break;case"Search":this._executeSearch(n.path);break;case"None":return!0;default:e=null;c=n.commandArgument.match(/^view:(.+)$/);n.commandName=="Insert"&&c&&(e=c[1],Array.clear(this._selectedKey),this.updateSummary(),this.set_lastCommandName("New"),this.set_lastCommandArgument(e));l=this._createArguments(n,e);this._valid=this._validateFieldValues(l.Values,n.causesValidation==null||n.causesValidation);this._valid&&this._execute(l)}return t.after(n),t.dispose(),!t.canceled()}},_forgetSelectedRow:function(n,t){t||(t=this._get_focusedCell());this.get_isDataSheet()&&t&&(t.colIndex=0);this._lastSelectedRowIndex=!this._ignoreSelectedKey&&this._selectedKey.length>0&&this._rowIsSelected(this._selectedRowIndex)?this._selectedRowIndex:-1;this._ignoreSelectedKey=!1;Array.clear(this._selectedKey);this.updateSummary();n&&this.raiseSelected()},_changeStatus:function(n){var r,i,t,u;(!n.causesValidation||(r=this._collectFieldValues(),n.values&&(r=Array.clone(n.values)),this._validateFieldValues(r,!0)))&&(i=this.findField("Status"),i)&&(this.get_isEditing()?(t=this._get("_Item",i.Index),t||(t=document.createElement("input"),t.type="hidden",t.id=String.format("{0}_Item{1}",this._id,i.Index),this._container.appendChild(t)),t.value=n.commandArgument):(u=this.get_selectedRow(),u[i.Index]=n.commandArgument),this._updateVisibility())},_notifyDesigner:function(n){if(__designer()&&n){var t=this._lastArgs;external.ExplorerNodeChanged(this.get_controller(),this.get_viewId(),t.CommandName,t.CommandArgument,Sys.Serialization.JavaScriptSerializer.serialize(t.Values))}},goBack:function(n){Web.DataView._navigated=!0;this._notifyDesigner(n);var t=location;t.href.match(/_explorerNode=/)?t.replace(t.href):history.go(-1)},_viewDetails:function(n){var t=this.findField(n),f,i,e,r,u,o;if(t){if(f=t.Name,t.ItemsDataController==this.get_controller())for(i=0;i<this._allFields.length;i++)if(this._allFields[i].IsPrimaryKey){f=this._allFields[i].Name;break}if(e=this.get_contextFilter(t),__designer()){for(r=String.format("{0}&{1}={2}",t.ItemsDataController,String.isNullOrEmpty(t.ItemsDataValueField)?f:t.ItemsDataValueField,this.get_selectedRow()[t.Index]),i=0;i<e.length;i++)u=e[i],r=String.format("{0}&{1}={2}",r,u.Name,u.Value);r=this.resolveClientUrl(String.format("~/Details.{0}?l={1}",__designer()?"htm":"aspx",encodeURIComponent(r)));location.href=r;Web.DataView._navigated=!1}else u=[{Name:String.isNullOrEmpty(t.ItemsDataValueField)?f:t.ItemsDataValueField,Value:this.fieldValue(t.Name)}],Array.addRange(u,e),o=$app.showModal(this,t.ItemsDataController,"editForm1","Select","editForm1",this.get_baseUrl(),this.get_servicePath(),u,{useCase:"ObjectRef"}),o.set_showSearchBar(this.get_showSearchBar()),o._parentDataViewId=this.get_id(),o._closeViewDetails=!0}},changeViewType:function(n){this.cancelDataSheet();this._viewTypes||(this._viewTypes=[]);this._viewTypes[this.get_viewId()]=n;this._clearCache()},_parseLocation:function(n,t,i){var e,o,c,s;if(t||(t=this.get_selectedRow()),!n)return null;n=this.resolveClientUrl(n);for(var h=/([\s\S]*?)\{(\w+)?\}/g,u="",f=-1,r=h.exec(n);r;){if(u+=r[1],i&&this._lastArgs){for(e=0;e<i.length;e++)if(o=i[e],o.Name==r[2]){u+=this._lastArgs.CommandName.match(/Insert/i)?o.NewValue:o.OldValue;break}}else c=r[2].match(/^\d+$/)?this.get_fields()[parseInt(r[2])]:this.findField(r[2]),c&&(s=t[c.Index],s!=null&&(u+=r.index==0?s:encodeURIComponent(s)));f=h.lastIndex;r=h.exec(n)}return f!=-1&&(n=u+(f<n.length?n.substr(f):"")),n.startsWith("?")&&(n=location.pathname+n),n},_parseText:function(n,t){var f,r;if(t||(t=this.get_selectedRow()),!n)return null;for(var e=/([\s\S]*?)\{(\w+)?\}/g,o="",u=-1,i=e.exec(n);i;)o+=i[1],f=i[2].match(/^\d+$/)?this.get_fields()[parseInt(i[2])]:this.findField(i[2]),f&&(r=t[f.Index],r!=null&&(r=f.format(r),o+=r)),u=e.lastIndex,i=e.exec(n);return u!=-1&&(n=o+(u<n.length?n.substr(u):"")),n},_showImport:function(n){n||(n=this.get_viewId());this._importView=n;this._importElement=document.createElement("div");this._importElement.id=this.get_id()+"$Import";this._importElement.className="Import";var t=new Sys.StringBuilder,i=String.format("<a href=\"javascript:\" onclick=\"$find('{0}')._downloadImportTemplate('{1}');return false;\">{2}<\/a>",this.get_id(),n,Web.DataViewResources.Data.Import.DownloadTemplate);t.appendFormat('<div id="{0}$ImportStatus" class="Status"><span>{1}<\/span> {2}<\/div>',this.get_id(),Web.DataViewResources.Data.Import.UploadInstruction,i);t.appendFormat('<div id="{0}$ImportMap" class="Map" style="display:none"><\/div>',this.get_id());t.appendFormat('<iframe src="{1}?parentId={0}&controller={2}&view={3}" frameborder="0" scrolling="no" id="{0}$ImportFrame" class="Import"><\/iframe>',this.get_id(),this.resolveClientUrl(this.get_appRootPath()+"Import.ashx"),this.get_controller(),n);t.appendFormat('<div class="Email">{1}:<br/><input type="text" id="{0}$ImportEmail"/><\/div>',this.get_id(),Web.DataViewResources.Data.Import.Email);t.appendFormat('<div class="Buttons"><button id="{0}$StartImport" onclick="$find(\'{0}\')._startImportProcessing();return false" style="display:none">{1}<\/button><button id="{0}$CancelImport" onclick="$find(\'{0}\')._closeImport();return false">{2}<\/button><\/div>',this.get_id(),Web.DataViewResources.Data.Import.StartButton,Web.DataViewResources.ModalPopup.CancelButton);this._importElement.innerHTML=t.toLocaleString();this._appendModalPanel(this._importElement);this._importPopup=$create(AjaxControlToolkit.ModalPopupBehavior,{id:this.get_id()+"$ImportPopup",PopupControlID:this._importElement.id,DropShadow:!0,BackgroundCssClass:"ModalBackground"},null,null,this._container.getElementsByTagName("a")[0]);this._saveTabIndexes();this._importPopup.show()},_closeImport:function(){this._disposeImport();this._restoreTabIndexes()},_disposeImport:function(){this._importElement&&(this._importPopup.hide(),this._importPopup.dispose(),this._importPopup=null,this._importElement.parentNode.removeChild(this._importElement),delete this._importElement)},_downloadImportTemplate:function(n){this.executeExport({commandName:"ExportTemplate",commandArgument:String.format("{0},{1}",this.get_controller(),n)})},_initImportUpload:function(n){var t=n.createElement("div");t.innerHTML=String.format('<form method="post" enctype="multipart/form-data"><input type="file" id="ImportFile" name="ImportFile" style="font-size:8.5pt;font-family:tahoma;padding:2px 0px 4px 0px;" onchange="parent.window.$find(\'{0}\')._startImportUpload(this.value);this.parentNode.submit()"/><\/form>',this.get_id());n.body.appendChild(t);Sys.UI.DomElement.setFocus(n.getElementById("ImportFile"))},_get_importStatus:function(){return $get(this.get_id()+"$ImportStatus")},_get_importFrame:function(){return $get(this.get_id()+"$ImportFrame")},_startImportUpload:function(n){var t=n.split(/\\/);this._importFileName=t[t.length-1];Sys.UI.DomElement.setVisible(this._get_importFrame(),!1);$(this._get_importStatus()).addClass("Wait");this._get_importStatus().innerHTML=Web.DataViewResources.Data.Import.Uploading},_finishImportUpload:function(n){var o,h,t,i,c,u,f,e,a,l;if(Sys.UI.DomElement.removeCssClass(this._get_importStatus(),"Wait"),Sys.UI.DomElement.addCssClass(this._get_importStatus(),"Ready"),o=n.getElementById("Errors"),o)this._get_importStatus().innerHTML=o.value;else{var y=n.getElementById("FileName"),v=n.getElementById("NumberOfRecords"),r=n.getElementById("AvailableImportFields").value.trim().split(/\r?\n/),s=n.getElementById("FieldMap").value.trim().split(/\r?\n/);for(this._get_importStatus().innerHTML=String.format(Web.DataViewResources.Data.Import.MappingInstruction,v.value,this._importFileName),this._importFileName=n.getElementById("FileName").value,h=$get(this.get_id()+"$StartImport"),Sys.UI.DomElement.setVisible(h,!0),Sys.UI.DomElement.setFocus(h),t=new Sys.StringBuilder,t.append("<table>"),i=0;i<s.length;i++){for(c=s[i].match(/^(.+?)=(.+?)?$/),t.appendFormat('<tr><td>{2}<\/td><td><select id="{0}$ImportField{1}"><option value="">{3}<\/option>',this.get_id(),i,Web.DataView.htmlEncode(c[1]),Web.DataViewResources.Data.Import.AutoDetect),u=0;u<r.length;u++)f=r[u].split("="),f[0]==c[2]&&(t.appendFormat('<option value="{0}"',f[0]),t.append(' selected="selected"'),t.appendFormat(">{0}<\/option>",Web.DataView.htmlEncode(f[1])));t.append("<\/select><\/td><\/tr>")}t.append("<\/table>");e=$get(this.get_id()+"$ImportMap");Sys.UI.DomElement.setVisible(e,!0);e.innerHTML=t.toString();a=$(e).find("select").change(function(){l()});l=function(){var i=Array.clone(s),t=[],n=0;a.each(function(){$(this).css("width","auto");this.value!=""&&Array.add(t,this.value)}).each(function(){var u=this,n,i;for($(u).find("option").filter(function(){return u.value!=this.value&&this.value!=""}).remove(),n=0;n<r.length;n++)i=r[n].split("="),Array.contains(t,i[0])||$(this).append($("<option>",{value:i[0]}).text(i[1]))}).each(function(){var t=$(this).outerWidth();t>n&&(n=t)}).css("width",n)};l()}this._importPopup.show();this._get_importFrame().parentNode.removeChild(this._get_importFrame())},_startImportProcessing:function(){var r=$get(this.get_id()+"$ImportEmail"),u=r.value.replace(/;/g,","),n,t,i;if(String.isBlank(u)&&!confirm(Web.DataViewResources.Data.Import.EmailNotSpecified)){Sys.UI.DomElement.setFocus(r);return}for(n=new Sys.StringBuilder,n.appendFormat("{0};{1};{2};{3};",this._importFileName,this.get_controller(),this._importView,u),t=0;;){if(i=$get(this.get_id()+"$ImportField"+t),!i)break;n.append(i.value);n.append(";");t++}this.executeCommand({commandName:"ProcessImportFile",commandArgument:n.toString()});this._closeImport();alert(Web.DataViewResources.Data.Import.Processing);this.refresh()},navigate:function(n,t){this.set_selectedValue(this.get_selectedKey());var r=null,u=Web.HoverMonitor._instance;for(u&&u.close(),n=this._parseLocation(n,null,t),i=0;i<this.get_views().length;i++)if(this.get_views()[i].Id==n){r=this.get_views()[i];break}r?this.goToView(n):this._navigate(n)},_navigate:function(n,t){Web.DataView._navigated=!0;var i=n.match(Web.DataView.LocationRegex);typeof __dauh!="undefined"?i?this.encodePermalink(i[2],i[1],t):this.encodePermalink(n):i?(Web.DataView._navigated=!1,open(i[2],i[1],t?t:"")):window.location.href=n},get_contextFilter:function(n,t){var f=[],e,u,i,h,o,l;if(!String.isNullOrEmpty(n.ContextFields))for(var s=t?t:this._collectFieldValues(!0),c=/(\w+)(\s*=\s*(.+?)){0,1}\s*(,|$)/g,r=c.exec(n.ContextFields);r;){if(e=String.isNullOrEmpty(r[3])?r[1]:r[3],u=e.match(/^\'(.+)\'$/),u||(u=e.match(/^(\d+)$/)),u){for(i=0;i<f.length;i++)if(f[i].Name==r[1]){f[i].Value+='\0='+u[1];u=null;break}u&&Array.add(f,{Name:r[1],Value:u[1]})}else if(h=this.findField(e),h)for(i=0;i<s.length;i++)if(s[i].Name==h.Name){o=s[i];l=o.Modified?o.NewValue:o.OldValue;Array.add(f,{Name:r[1],Value:l});break}r=c.exec(n.ContextFields)}return f},showLookup:function(n){var t,f,i,r,u;this.get_enabled()&&(t=this._allFields[n],t._lookupModalBehavior?t._lookupDataControllerBehavior._render():(f=$get(this.get_id()+"_Item"+t.Index+"_ShowLookupLink"),f&&(i=t._lookupModalPanel=document.createElement("div"),this._appendModalPanel(i),i.className="ModalPanel",i.id=this.get_id()+"_ItemLookupPanel"+t.Index,i.innerHTML=String.format('<table style="width:100%;height:100%"><tr><td valign="middle" align="center"><table cellpadding="0" cellspacing="0"><tr><td class="ModalTop"><div style="height:1px;font-size:1px"><\/div><\/td><td><div style="height:1px;font-size:1px"><\/div><\/td><\/tr><tr><td align="left" valign="top" id="{0}_ItemLookupPlaceholder{1}"  class="ModalPlaceholder"><\/td><td class="RightSideShadow"><\/td><\/tr><tr><td colspan="2"><div class="BottomShadow"><\/div><\/td><\/tr><\/table><\/td><\/tr><\/table>',this.get_id(),t.Index),t._lookupModalBehavior=$create(AjaxControlToolkit.ModalPopupBehavior,{id:this.get_id()+"_ItemLookup"+t.Index,PopupControlID:i.id,BackgroundCssClass:"ModalBackground"},null,null,f))),r=this.get_contextFilter(t),u=!0,t._lookupDataControllerBehavior?r.length>0&&(t._lookupDataControllerBehavior.set_externalFilter(r),t._lookupDataControllerBehavior.goToPage(-1),u=!0):(u=!1,t._lookupDataControllerBehavior=$create(Web.DataView,{id:this.get_id()+"_LookupView"+n,baseUrl:this.get_baseUrl(),pageSize:t.ItemsPageSize?t.ItemsPageSize:Web.DataViewResources.Pager.PageSizes[0],showFirstLetters:t.ItemsLetters,servicePath:this.get_servicePath(),controller:t.ItemsDataController,viewId:t.ItemsDataView,showActionBar:Web.DataViewResources.Lookup.ShowActionBar,lookupField:t,externalFilter:r,filterSource:r.length>0?"Context":null,showSearchBar:this.get_showSearchBar(),searchOnStart:this.get_showSearchBar()&&t.SearchOnStart,description:t.ItemsDescription},null,null,$get(this.get_id()+"_ItemLookupPlaceholder"+t.Index))),this._saveTabIndexes(),t._lookupModalBehavior.show(),u&&t._lookupDataControllerBehavior._focusQuickFind(!0),$addHandler(document.body,"keydown",t._lookupDataControllerBehavior._bodyKeydownHandler),t._lookupDataControllerBehavior._adjustLookupSize(),this._lookupIsActive=!0)},changeLookupValue:function(n,t,i){var u=this._allFields[n],r=this;setTimeout(function(){var f,o,e;r._restoreTabIndexes();f=r.get_id()+"_Item"+n;o=r.get_id()+"_Item"+u.AliasIndex;Sys.UI.DomElement.setVisible($get(f+"_ClearLookupLink"),!0);e=$get(f+"_ShowLookupLink");e.innerHTML=r.htmlEncode(u,i);Sys.UI.DomElement.setFocus(e);t&&(t=u.format(t));$get(f).value=t;f!=o&&($get(o).value=i);$(e).closest("table").css("width","");r._updateLookupInfo(t,i);r._valueChanged(n);r._adjustModalHeight()},0);r._closeLookup(u)},clearLookupValue:function(n){var t=this._allFields[n],i=this.get_id()+"_Item"+n,e=this.get_id()+"_Item"+t.AliasIndex;if(Sys.UI.DomElement.setVisible($get(i+"_ClearLookupLink"),!1),$get(i+"_ShowLookupLink").innerHTML=Web.DataViewResources.Lookup.SelectLink,$get(i).value="",$get(e).value="",!String.isNullOrEmpty(t.Copy)){for(var u=[],f=/(\w+)=(\w+)/g,r=f.exec(t.Copy);r;)r[2]=="null"&&Array.add(u,{name:r[1],value:null}),r=f.exec(t.Copy);u.length>0&&this.refresh(!0,u)}this._updateLookupInfo("",Web.DataViewResources.Lookup.SelectLink);$get(i+"_ShowLookupLink").focus();this._valueChanged(n);this._adjustModalHeight()},_updateLookupInfo:function(n,t){var i=$get(this.get_id()+"_Text0"),r,u;i&&(i.value=t,i.name=i.id,r=$get(this.get_id()+"_Item0"),r.value=n,r.name=r.id,this.get_lookupPostBackExpression()&&(u=Sys.WebForms.PageRequestManager.getInstance(),u?eval("Sys.WebForms.PageRequestManager.getInstance()._doPostBack"+this.get_lookupPostBackExpression().match(/\w+(.+)/)[1]):eval(this.get_lookupPostBackExpression())))},createNewLookupValue:function(n){var t=this._newLookupValueField=this._allFields[n],i=this._createNewView=Web.DataView.showModal(this,t.ItemsDataController,t.ItemsNewDataView,"New",t.ItemsNewDataView,this.get_baseUrl(),this.get_servicePath(),this.get_contextFilter(t));i._parentDataViewId=this.get_id();i.add_executed(Function.createDelegate(this,this._saveNewLookupValueCompleted));i.set_showSearchBar(this.get_showSearchBar());this._lookupIsActive=!0},_saveNewLookupValueCompleted:function(n,t){var r,o,f;if(!(t.result.Errors.length>0)){t.handled=!0;Web.DataView.hideMessage();var s=null,u=this._newLookupValueField,e=u.ItemsDataValueField;for(String.isNullOrEmpty(e)&&(e=n._keyFields[0].Name),t.result.Values.length==0&&(t.result.Values=n._lastArgs.Values),r=0;r<t.result.Values.length;r++)if(t.result.Values[r].Name==e){s=t.result.Values[r].NewValue;break}for(o=null,f=u.ItemsDataTextField,String.isNullOrEmpty(f)&&(f=n._fields[0].Name),i=0;i<n._lastArgs.Values.length;i++)if(n._lastArgs.Values[i].Name==f){o=n._lastArgs.Values[i].NewValue;break}this._createNewView.endModalState("Cancel");this._copyLookupValues(null,u,n._lastArgs.Values);this.changeLookupValue(u.Index,s,o);this._lookupIsActive=!1}},hideLookup:function(n){var i=n?this._allFields[n]:this.get_lookupField(),t=this.get_lookupField()._dataView;t._closeLookup(i);t._restoreTabIndexes();$get(t.get_id()+"_Item"+i.Index+"_ShowLookupLink").focus()},closeLookupAndCreateNew:function(){this.hideLookup();var n=this.get_lookupField();n._dataView.createNewLookupValue(n.Index)},htmlEncode:function(n,t){var i=this._allFields[n.AliasIndex];return i.HtmlEncode?i.Type=="String"?Web.DataView.htmlEncode(t):t:t},filterIsExternal:function(n){var t,r,u,i;if(this._externalFilter.length==0)return!1;for(t=0;t<this._filter.length;t++){if(r=this._filter[t].match(/(\w+):/)[1],u=!1,!n||n==r)for(i=0;i<this._externalFilter.length;i++)if(this._externalFilter[i].Name==r){u=!0;break}if(!u)return!1}return!0},updateSummary:function(){var n,u,t,l,r,s,h,f,e,c,o;if(this.get_showInSummary()&&(n=null,this._summaryId||(u=$getSideBar(),u?(this._summaryId="PageSummary_"+this.get_id(),n=$get("PageSummaryBox"),n||(n=document.createElement("div"),n.id="PageSummaryBox",n.className="TaskBox Summary",n.innerHTML=String.format('<div class="Inner"><div class="Summary">{0}<\/div><\/div>',Web.DataViewResources.Menu.Summary),u.insertBefore(n,u.childNodes[u._hasActivators?1:0]),n._numberOfVisibleSummaries=0),t=$get(this._summaryId),t||(t=document.createElement("div"),t.id=this._summaryId,n.childNodes[0].appendChild(t))):this._summaryId=""),this._summaryId.length>0)){if(n||(n=$get("PageSummaryBox")),!this._rows||this._rows.length==0){Sys.UI.DomElement.setVisible(n,!1);return}l=this.get_selectedRow();t=$get(this._summaryId);var i=new Sys.StringBuilder,a=this._lastCommandName,v=this.get_view().Type;if(this.get_view().Type="Grid",this._lastCommandName=null,r=!0,this._selectedKey.length>0)for(s=!0,h=0,f=0;f<this._allFields.length;f++)if(e=this._allFields[f],e.ShowInSummary&&(r=!1,i.append('<div class="Field">'),s?s=!1:i.append('<div class="Divider"><\/div>'),i.appendFormat('<div class="Label">{0}<\/div>',String.trimLongWords(this._allFields[e.AliasIndex].Label)),i.append('<div class="Value">'),this._renderItem(i,e,l,!1,!1,!1,!1,!0),i.append("<\/div><\/div>"),h++,this.get_summaryFieldCount()>0&&h>=this.get_summaryFieldCount()))break;Sys.UI.DomElement.setVisible(t,!r);r&&this._summaryIsVisible?n._numberOfVisibleSummaries--:(r||this._summaryIsVisible)&&(r||this._summaryIsVisible!=null)||n._numberOfVisibleSummaries++;this._summaryIsVisible=!r;Sys.UI.DomElement.setVisible(n,n._numberOfVisibleSummaries>0);c=i.toString();t.innerHTML=c;o=this._lastArgs!=this._lastClearArgs&&this._lastArgs.CommandName=="Delete";$app.mobile||r&&!o||this.get_filterSource()!=null||typeof Web.Membership=="undefined"||(o&&(this._lastClearArgs=this._lastArgs),Web.Membership._instance.addPermalink(String.format("{0}&_controller={1}&_commandName=Select&_commandArgument=editForm1",this.get_keyRef(),this.get_controller()),o?null:String.format('<div class="TaskBox" style="width:{2}px"><div class="Inner"><div class="Summary">{0}<\/div>{1}<\/div><\/div>',document.title,c,t.offsetWidth==0?135:t.offsetWidth)));i.clear();this._lastCommandName=a;this.get_view().Type=v}},get_hasDetails:function(){return this._hasDetails==!0},get_hasParent:function(){return this._hasParent==!0},get_usesTransaction:function(){return this._usesTransaction==!0},get_inTransaction:function(){return this.get_transaction()!=null},add_selected:function(n){this._hasDetails=!0;this.get_events().addHandler("selected",n)},remove_selected:function(n){this.get_events().removeHandler("selected",n)},raiseSelected:function(){if(!Web.DataView._navigated){var n=this.get_events().getHandler("selected");n&&n(this,Sys.EventArgs.Empty);this.multiSelect()||this.set_selectedValue(this.get_selectedKey())}},add_executed:function(n){this.get_events().addHandler("executed",n)},remove_executed:function(n){this.get_events().removeHandler("executed",n)},raiseExecuted:function(n){var t=this.get_events().getHandler("executed");t&&t(this,n)},_closeLookup:function(n){if($closeHovers(),n&&n._lookupModalBehavior&&(n._lookupModalBehavior.hide(),$removeHandler(document.body,"keydown",n._lookupDataControllerBehavior._bodyKeydownHandler)),this._lookupIsActive=!1,event){var t=new Sys.UI.DomEvent(event);t.stopPropagation();t.preventDefault()}},_collectFieldValues:function(n){var r,f,e,b,nt,u,o,c,a,k,p,d,v,l;n=!0;var s=[],y=this.get_selectedRow(),h=this.get_isInserting(),w=this.extension();if(w&&w.collect)s=w.collect();else{if(!y&&!h)return s;for(r=0;r<this._allFields.length;r++){var t=this._allFields[r],g=t.ItemsStyle=="RadioButtonList",i=this._get("_Item",r);if(t.ReadOnly&&!n)i=null;else if(g)for(f=0,e=$get(this.get_id()+"_Item"+r+"_"+f);e;){if(e.checked){i=e;break}else i=null;f++;e=$get(this.get_id()+"_Item"+r+"_"+f)}else if(t.ItemsStyle=="CheckBoxList"&&i&&(f=0,e=$get(this.get_id()+"_Item"+r+"_"+f),e))for(i.value="";e;)e.checked&&(i.value.length>0&&(i.value+=","),i.value+=e.value),f++,e=$get(this.get_id()+"_Item"+r+"_"+f);t.ClientEditor&&i?t.ClientEditor=="Web$DataView$RichText"&&(b=Web.DataView.EditorFactories[t.ClientEditor.replace(".","$")],b.persist&&b.persist(i)):t.Editor&&i&&(nt=$get(i.id+"$Frame"),nt&&(editor=Web.DataView.Editors[t.EditorId],editor&&(i.value=editor.GetValue())));u=i?i.value:null;u&&(t.Type.startsWith("Date")?(o=Date.tryParseFuzzyDate(u,t.DataFormatString),o!=null&&i.type=="text"&&(u=i.value=t.DateFmtStr?String.format(t.DateFmtStr,o):t.format(o))):!String.isBlank(t.DataFormatString)&&t.isNumber()&&(c=Number.tryParse(u),c!=null&&(t.DataFormatString.match(/\{0:p\}/i)&&c>1&&(c=c/100),u=i.value=t.format(c))));t.TimeFmtStr&&(a=this._get("_Item$Time",r),a&&(o=Date.tryParseFuzzyTime(a.value),o!=null&&(a.value=String.localeFormat(t.TimeFmtStr,o),u+=" "+a.value)));!t.OnDemand&&(i||t.IsPrimaryKey||!t.ReadOnly||n)&&(k=!0,p=!1,this._lastCommandName=="BatchEdit"&&(d=$get(String.format("{0}$BatchSelect{1}",this.get_id(),t.Index)),p=t.TextMode==4||t.Hidden||t.ReadOnly,k=t.IsPrimaryKey||p||d&&d.checked),k&&Array.add(s,{Name:t.Name,OldValue:h?null:y[t.Index],NewValue:i&&u!=null?t.Type=="Boolean"&&u.length>0?u=="true":u.length==0?null:u:!h&&(t.TextMode==4||t.Hidden||t.ReadOnly)?y[t.Index]:null,Modified:i!=null&&!(!h&&t.Type=="String"&&String.isNullOrEmpty(u)&&String.isNullOrEmpty(y[t.Index]))||g&&h&&!t.AllowNulls,ReadOnly:t.ReadOnly&&!(t.IsPrimaryKey&&h)||p}))}}for(r=0;r<this._externalFilter.length;r++)for(v=this._externalFilter[r],f=0;f<s.length;f++)if(l=s[f],l.Name.toLowerCase()==v.Name.toLowerCase()&&l.NewValue==null){l.NewValue=typeof v.Value=="string"?this.convertStringToFieldValue(this.findField(l.Name),v.Value):v.Value;l.Modified=!0;break}return s},_enumerateExpressions:function(n,t,i){var f=[],u,r;if(this._expressions)for(u=0;u<this._expressions.length;u++)r=this._expressions[u],r.Scope==t&&(n==Web.DynamicExpressionType.Any||r.Type==Web.DynamicExpressionType.RegularExpression)&&r.Target==i&&Array.add(f,r);return f},_prepareJavaScriptExpression:function(n){var t,f,r,e;if(!n._variables){for(var i=[],o=/\[(\w+)\]/g,u=o.exec(n.Test);u;){for(t=u[1],f=!1,r=0;r<i.length;r++)if(i[r].name==t){f=!0;break}f||(e=this.findField(t),e&&Array.add(i,{name:t,regex:new RegExp("\\["+t+"\\]","g"),replace:String.format("this._javaScriptRowValue({0})",e.Index)}));u=o.exec(n.Test)}n._variables=i;n.Test=n.Test.replace(/\[(\w+)\.(\w+)\]/gi,"this.fieldValue('$2','$1')")}},_javaScriptRowValue:function(n){return this._javaScriptRow[n]},_evaluateJavaScriptExpressions:function(n,t,i){for(var r,u,e,s,h,f=i?"":null,o=0;o<n.length;o++)if(r=n[o],r.Type==Web.DynamicExpressionType.ClientScript){if(this._prepareJavaScriptExpression(r),u=r._script,!u){for(u=r.Test,e=0;e<r._variables.length;e++)s=r._variables[e],u=u.replace(s.regex,s.replace);r._script=u}if(u){this._javaScriptRow=t;try{if(h=eval(u),i)h&&(f==null?f=r.Result:f+=" "+r.Result);else return r.Result==null?h:r.Result}catch(c){}finally{this._javaScriptRow=null}}}return f},_validateFieldValueFormat:function(n,t){var r=null,u=Web.DataViewResources.Validator,i;switch(n.Type){case"SByte":case"Byte":case"Int16":case"Int32":case"UInt32":case"Int64":case"Single":case"Double":case"Decimal":case"Currency":i=t.NewValue;typeof i!="number"&&(i=Number.tryParse(i));isNaN(i)||i==null?r=u.NumberIsExpected:t.NewValue=i;break;case"Boolean":try{t.NewValue=String.isInstanceOfType(t.NewValue)?Boolean.parse(t.NewValue):t.NewValue}catch(f){r=u.BooleanIsExpected}break;case"DateTime":typeof t.NewValue=="string"?(i=String.isNullOrEmpty(n.DataFormatString)?Date.parse(t.NewValue):Date.parseLocale(t.NewValue,n.DataFormatString.match(/\{0:([\s\S]*?)\}/)[1]),i?t.NewValue=i:r=u.DateIsExpected,r||t.NewValue==null||(t.NewValue=new Date(t.NewValue-t.NewValue.getTimezoneOffset()*6e4))):isNaN(t.NewValue.getTime())&&(r=u.DateIsExpected)}return r},validate:function(n){for(var t=0;t<n.length;t++)if(n[t].Error)return!1;return!0},_validateFieldValues:function(n,t,i){for(var r,u,f,k,y,c,s,p,w,b,o,h,l,e=!0,a=new Sys.StringBuilder,v=0;v<n.length;v++)if(r=n[v],u=this.findField(r.Name),u&&(!i||u.ColIndex==i.colIndex)){if(u.Type=="DateTime"&&r.OldValue!=null&&r.OldValue.getTimezoneOffset&&(r.OldValue=new Date(r.OldValue-r.OldValue.getTimezoneOffset()*6e4)),f=null,u.ReadOnly&&u.IsPrimaryKey)r.NewValue==null&&r.OldValue!=null&&(r.NewValue=r.OldValue);else if(r.Modified){if(u.AllowNulls||u.HasDefaultValue&&!Web.DataViewResources.Validator.EnforceRequiredFieldsWithDefaultValue||!String.isBlank(r.NewValue)||u.Hidden||u.isReadOnly()||(f=Web.DataViewResources.Validator.RequiredField),!f&&String.isBlank(r.NewValue)&&(r.NewValue=null),f||r.NewValue==null||u.IsMirror||u.Hidden&&!r.Modified||(k=this._validateFieldValueFormat(u,r),u.isReadOnly()||(f=k)),!f)for(y=this._enumerateExpressions(Web.DynamicExpressionType.RegularExpression,Web.DynamicExpressionScope.Field,r.Name),c=0;c<y.length;c++){s=y[c];p=r.NewValue?r.NewValue:"";try{w=new RegExp(s.Test);b=w.exec(p);s.Result.match(/\$(\d|\'\`)/)?b&&(r.NewValue=p.replace(w,s.Result)):b||(f=f?f+=s.Result:s.Result)}catch(d){}}r.Modified=u.Type.startsWith("DateTime")?(r.NewValue==null?null:r.NewValue.toString())!=(r.OldValue==null?null:r.OldValue.toString()):r.NewValue!=r.OldValue}if(r.Error=f,$app.mobile)f&&t&&(this._focus(u.Name,f),e=!1);else{if(o=$get(this.get_id()+"_Item"+u.Index+"_Error"),o&&t)for(Sys.UI.DomElement.setVisible(o,!1),o.innerHTML=f,f!=null&&e&&this._showFieldError(u,f),h=o.parentNode;h&&h.tagName!="BODY";){if(!$common.getVisible(h)){o=null;break}h=h.parentNode}f&&t&&(e&&(l=this._lastFocusedCell,l&&(this._focusCell(-1,-1,!1),this._focusCell(l.rowIndex,l.colIndex,!0),this._lastFocusedCell=null),this._focus(u.Name)),e=!1,o||a.append(Web.DataView.formatMessage("Attention",u.Label+": "+f)))}}return t||(e=!0),e||Web.DataView.showMessage(a.toString()),a.clear(),e},_fieldIsInExternalFilter:function(n){return this._findExternalFilterItem(n)!=null},_findExternalFilterItem:function(n){for(var i,t=0;t<this._externalFilter.length;t++)if(i=this._externalFilter[t],n.Name.toLowerCase()==i.Name.toLowerCase())return i;return null},_internalFocus:function(){var n=$get(this._focusId);if(n)try{n.value="";n.value=this._focusText;Sys.UI.DomElement.setCaretPosition(n,this._focusText.length)}catch(t){}},_showFieldError:function(n,t){var i=this._get("_Item",n.Index+"_Error"),u,s,r,e;if(i&&(Sys.UI.DomElement.setVisible(i,t!=null),t))if(this._skipErrorReset=!0,i.style.marginLeft="0px",i.style.marginTop="0px",i.innerHTML=String.format('{0} <a href="javascript:" onclick="Sys.UI.DomElement.setVisible(this.parentNode, false);$find(\'{2}\')._focus(\'{3}\');return false" class="Close" title="{1}"><span>&nbsp;<\/span><\/a>',t,Web.DataViewResources.ModalPopup.Close,this.get_id(),n.Name),this.get_isForm())u=$common.getPaddingBox(i.previousSibling?i.previousSibling:i),i.style.marginLeft=u.left+"px",i.style.marginTop="1px";else{var h=$app.scrolling(),c=$common.getClientBounds(),o=$common.getBounds(i),f=o.x+o.width-(h.x+c.width);for(f<0&&(f=0),s=$common.getBounds(i.parentNode),u=$common.getPaddingBox(i.parentNode),r=i.nextSibling;r&&r.nodeType!=1;)r=r.nextSibling;e=$common.getBounds(r?r:i);i.style.marginLeft=-(e.x-s.x+1+f)+"px";i.style.marginTop=e.height+u.bottom+"px"}},_focus:function(n,t){var i,u,r,c,o,f,l,e,v,a,h;if($app.mobile){$app.mobile.focus(n,t);return}if(t)for(i=0;i<this.get_fields().length;i++)this._showFieldError(this.get_fields()[i]);if(u=this._get_focusedCell(),u&&this.get_isEditing()&&this._id==Web.DataView._activeDataSheetId){if(!String.isNullOrEmpty(n)){for(r=null,c=!1,i=0;i<this._fields.length;i++)if(r=this._fields[i],r.Name==n){this._focusCell(u.rowIndex,u.colIndex,!1);c=u.colIndex!=i;u={rowIndex:this._selectedRowIndex,colIndex:i};this._continueAfterScript||(this._saveAndNew=!1);break}!String.isNullOrEmpty(t)&&r&&(c&&(this._focusCell(u.rowIndex,u.colIndex,!0),this.refresh(!0)),this._showFieldError(r,t))}if(o=this._focusCell(u.rowIndex,u.colIndex,!0),o){for(f=o.getElementsByTagName("input"),l=!1,i=0;i<f.length;i++)if(f[i].type!="hidden"){l=!0;break}for(l||(f=o.getElementsByTagName("textarea")),f.length==0&&(f=o.getElementsByTagName("select")),f.length==0&&(f=o.getElementsByTagName("a")),i=0;i<f.length;i++)if(e=f[i],e.tagName!="INPUT"||e.type!="hidden"){(e.tagName=="INPUT"||e.tagName=="TEXTAREA")&&this._pendingChars!=null?(this._focusText=this._pendingChars,this._focusId=e.id,v=this,setTimeout(function(){v._internalFocus()},50)):Sys.UI.DomElement.setFocus(e);break}}this._pendingChars=null;return}for(String.isNullOrEmpty(n)&&!String.isNullOrEmpty(this._focusedFieldName)&&(r=this.findField(this._focusedFieldName),r&&(n=r.Name)),this._focusedFieldName=n,i=0;i<this.get_fields().length;i++)if(r=this.get_fields()[i],a=r.ItemsStyle=="AutoComplete"&&(r.Name==n||r.AliasName==n||String.isNullOrEmpty(n)),!r.ReadOnly&&(n==null||r.Name==n||a)){h=this.get_id()+"_Item"+(a?r.AliasIndex:r.Index);switch(r.ItemsStyle){case"RadioButtonList":case"CheckBoxList":h+="_0";break;case"Lookup":h+="_ShowLookupLink"}var y=$get(h),p=$get(String.format("{0}_ItemContainer{1}",this.get_id(),r.Index)),w=this._categories[r.CategoryIndex],s=Array.indexOf(this._tabs,w.Tab);if(n&&s>=0&&this.set_categoryTabIndex(s),this._toggleCategoryVisibility(r.CategoryIndex,!0),y&&(!p||Sys.UI.DomElement.getVisible(p))&&(n||s==this.get_categoryTabIndex()||this._tabs.length==0)){s>=0&&this.set_categoryTabIndex(s);try{t&&this._showFieldError(r,t);Sys.UI.DomElement.setFocus(y)}catch(b){}break}}},_serverFocus:function(n,t){this._focus(n,t);this.get_isDataSheet()&&(this.refresh(!0),this._focus(n,t))},_saveTabIndexes:function(){var n,r,t,i;for(this._lastSavedTabIndexes=this._savedTabIndexes,this._savedTabIndexes=[],n=0;n<Web.DataView._tagsWithIndexes.length;n++)for(r=document.getElementsByTagName(Web.DataView._tagsWithIndexes[n]),t=0;t<r.length;t++)i=r[t],i&&Array.add(this._savedTabIndexes,{element:i,tabIndex:i.tabIndex})},_restoreTabIndexes:function(){if(this._savedTabIndexes){for(var n=0;n<this._savedTabIndexes.length;n++)this._savedTabIndexes[n].element.tabIndex=this._savedTabIndexes[n].tabIndex,delete this._savedTabIndexes[n].element;Array.clear(this._savedTabIndexes)}this._savedTabIndexes=this._lastSavedTabIndexes;this._lastSavedTabIndexes=null},_selectKeyByRowIndex:function(n){this._selectKeyByRow(this._rows[n])},_selectKeyByRow:function(n){var i,t,r;for(this._selectedRow=n,i=this._selectedKey,this._selectedKey=[],this._selectedKeyFilter=[],t=0;t<this._keyFields.length;t++)r=this._keyFields[t],Array.add(this._selectedKey,n[r.Index]),Array.add(this._selectedKeyFilter,r.Name+":="+this.convertFieldValueToString(r,n[r.Index])),i&&(i.length<t||i[t]!=this._selectedKey[t])&&(i=null);this.updateSummary();i||this._raiseSelectedDelayed||this.raiseSelected()},_showWait:function(n){var i,t,r;$app.mobile||(i=Web.DataViewResources.Common.WaitHtml,this.get_fields()==null||n?(this._container.innerHTML=this.get_isModal()||this.get_lookupField()?i:'<div class="dataview-busy-whitespace"><\/div>',$(this._container).find(".Wait").addClass("dataview")):(t=$get(this.get_id()+"_Wait"),t&&(this._oldWaitHTML=t.innerHTML,t.innerHTML=i)),r=this.extension(),r&&r.wait())},_hideWait:function(){if(this._oldWaitHTML!=null){var n=$get(this.get_id()+"_Wait");n&&(n.innerHTML=this._oldWaitHTML)}},_get_colSpan:function(){return this.get_isForm()?2:this.get_fields().length+(this.multiSelect()?1:0)+(this.get_showIcons()?1:0)+(this.get_isDataSheet()?1:0)+(this._actionColumn?1:0)},_renderCreateNewBegin:function(n,t){String.isNullOrEmpty(t.ItemsNewDataView)||n.append('<table cellpadding="0" cellspacing="0"><tr><td>')},_renderCreateNewEnd:function(n,t){String.isNullOrEmpty(t.ItemsNewDataView)||(n.append("<\/td><td>"),this.get_enabled()&&n.appendFormat('<a href="#" class="CreateNew" onclick="$find(\'{0}\').createNewLookupValue({1});return false" id="{0}_Item{1}_CreateNewLookupLink" title="{2}"{3}>&nbsp;<\/a>',this.get_id(),t.Index,String.format(Web.DataViewResources.Lookup.NewToolTip,t.Label),String.format(' tabindex="{0}"',$nextTabIndex())),n.append("<\/td><\/tr><\/table>"))},_raisePopulateDynamicLookups:function(){this._hasDynamicLookups&&this.get_isEditing()&&this._skipPopulateDynamicLookups!=!0&&this.executeCommand({commandName:"PopulateDynamicLookups",commandArgument:"",causesValidation:!1});this._skipPopulateDynamicLookups=!1},_raiseCalculate:function(n,t){this.executeCommand({commandName:"Calculate",commandArgument:n.Name,causesValidation:!1,trigger:t.Name})},get_currentRow:function(){return this.get_isInserting()?this._newRow?this._newRow:[]:this.get_selectedRow()},fieldValue:function(n,t){var i=!t||t.length==0?this:t.match(/^master$/i)?this.get_master():$find(t),u,r;return i?i._allFields?(u=i.findField(n),!u)?null:(r=i._clonedRow,r==null&&(r=i._cloneChangedRow()),r?r[u.Index]:null):null:null},_useLEVs:function(n){var r,t,e,u;if(n&&this._allowLEVs&&(r=this._get_LEVs(),r.length>0))for(i=0;i<r[0].length;i++)if(t=r[0][i],f=this.findField(t.Name),f&&f.AllowLEV){if(this._lastCommandName=="New"&&t.Modified&&t.NewValue!=null){for(e=!0,u=0;u<this._externalFilter.length;u++)if(this._externalFilter[u].Name.toLowerCase()==t.Name.toLowerCase()){e=!1;break}e&&(n[f.Index]=t.NewValue)}f._LEV=t.Modified?t.NewValue:null}},_configure:function(n){var r,t,u,i,f,e;if(this._requiresConfiguration&&(n||(n=this.get_currentRow()),n))for(r=0;r<this._allFields.length;r++)if(t=this._allFields[r],!String.isNullOrEmpty(t.Configuration))for(u=/\s*(\w+)=(\w+)\s*?($|\n)/g,i=u.exec(t.Configuration);i;)f=this.findField(i[2]),f&&(e=n[f.Index],e&&(t[i[1]]=e)),i=u.exec(t.Configuration)},_focusQuickFind:function(n){if(!this._quickFindFocused||n==!0){this._lostFocus=!0;try{Sys.UI.DomElement.setFocus(this.get_quickFindElement())}catch(t){}this._quickFindFocused=!0}},_restoreEmbeddedViews:function(){var t,n;if(this._embeddedViews){for(t=0;t<this._embeddedViews.length;t++)n=this._embeddedViews[t],n.parent.appendChild(n.view._element),delete n.parent,n.view=null;Array.clear(this._embeddedViews)}},_incorporateEmbeddedViews:function(){var n;if(this._embeddedViews)for(n=0;n<this._embeddedViews.length;n++){var t=this._embeddedViews[n],r=$get("v_"+t.view.get_cookie().replace(/-/g,"")),i=t.view._element;t.parent=i.parentNode;r.appendChild(i)}},_render:function(n){var i,r,t;$app.mobile?n&&this._refreshExtension():(this._restoreEmbeddedViews(),this._detachBehaviors(),this._disposeSearchBarExtenders(),this._useLEVs(),this._configure(),this._internalRender(),this._viewMessages&&this.showViewMessage(this._viewMessages[this.get_viewId()]),this._raisePopulateDynamicLookups(),!this.get_modalAnchor()&&this.get_lookupField()&&this._focusQuickFind(),this._raiseSelectedDelayed&&(this._raiseSelectedDelayed=!1,this.raiseSelected(),this._forceChanged=!1),this._scrollIntoView&&(this._scrollIntoView=!1,i=$common.getBounds(this._element),r=$app.scrolling(),i.y<r.y&&this._element.scrollIntoView(!0)),this._incorporateEmbeddedViews(),this.get_isModal()&&this._adjustModalPopupSize(),this.get_searchOnStart()&&this.get_isGrid()&&(this._focusSearchBar(),this.set_searchOnStart(!1)),this.get_isDataSheet()&&(t=this._get_focusedCell(),this.get_isInserting()&&!t?this._startInputListenerOnCell(0,0):t&&this._id==Web.DataView._activeDataSheetId&&(this._skipCellFocus=!0,this._focusCell(-1,-1,!0))),this.get_isGrid()&&this._synced&&(this._synced=!1,this._selectedRowIndex==null&&(this._forgetSelectedRow(!0),this.refresh(!0))),this._syncKeyFilter())},_syncKeyFilter:function(){var i=this.get_selectedKey(),n,t;if(i.length>0&&this._selectedKeyFilter.length==0)for(n=0;n<this._keyFields.length;n++)t=this._keyFields[n],Array.add(this._selectedKeyFilter,t.Name+":="+this.convertFieldValueToString(t,i[n]))},_mergeRowUpdates:function(n){var u,f,i,r,t;if(this._lastCommandName=="BatchEdit"&&(u=this._batchEdit=[],f=this._allFields,$(this._element).find(".BatchSelect input:checkbox:checked").each(function(){var n=this.id.match(/BatchSelect(\d+)$/),t;n&&(t=f[parseInt(n[1])],Array.add(u,t.Name))})),this._originalRow=null,this._useLEVs(n),this.get_isEditing()&&this._ditto){for(this._originalRow=Array.clone(n),i=0;i<this._ditto.length;i++)r=this._ditto[i],t=this.findField(r.name),!t||t.ReadOnly&&t.IsPrimaryKey||(n[t.Index]=r.value);delete this._ditto}this._configure(n);this._mergedRow=n},_removeRowUpdates:function(){var t=this._mergedRow,n;if(t){if(this._originalRow)for(n=0;n<this._originalRow.length;n++)t[n]=this._originalRow[n];this._mergedRow=null}},_internalRender:function(){var f,n,t,i,e,o,r,u,l;if(this._multipleSelection=null,this._dynamicActionButtons=!1,f=this.get_viewType(),n=new Sys.StringBuilder,this.get_mode()==Web.DataViewMode.Lookup)t=this._fields[0],i=this.get_lookupText(),i==null&&(i=Web.DataViewResources.Lookup.SelectLink),e=t.format(i),this._renderCreateNewBegin(n,t),n.appendFormat('<table cellpadding="0" cellspacing="0" class="DataViewLookup"><tr><td><a href="javascript:" onclick="$find(\'{0}\').showLookup({1});return false" class="Select" id="{0}_Item{1}_ShowLookupLink" title="{3}" tabindex="{7}"{8}>{2}<\/a><a href="#" class="Clear" onclick="$find(\'{0}\').clearLookupValue({1});return false" id="{0}_Item{1}_ClearLookupLink" title="{5}" tabindex="{7}">&nbsp;<\/a><\/td><\/tr><\/table><input type="hidden" id="{0}_Item{1}" value="{4}"/><input type="hidden" id="{0}_Text{1}" value="{6}"/>',this.get_id(),t.Index,this.htmlEncode(t,e),String.format(Web.DataViewResources.Lookup.SelectToolTip,t.Label),this.get_lookupValue(),String.format(Web.DataViewResources.Lookup.ClearToolTip,t.Label),Web.DataView.htmlAttributeEncode(e),$nextTabIndex(),this.get_enabled()?"":' disabled="true" class="Disabled"'),this._renderCreateNewEnd(n,t),this.get_element().appendChild(this._container),this._container.innerHTML=n.toString(),this.get_lookupValue()!=""&&this.get_enabled()||($get(this.get_id()+"_Item0_ClearLookupLink").style.display="none");else{if(o=f=="Form",n.appendFormat('<table class="DataView {1}_{2}{3}{4} {5}Type" cellpadding="0" cellspacing="0"{0}>',this.get_isModal()?String.format(' style="width:{0}px"',this._container.offsetWidth-20):"",this.get_controller(),this.get_viewId(),this._numberOfColumns>0?" MultiColumn":"",this._tabs.length>0?" Tabbed":"",f),o?this._renderFormView(n):this._renderGridView(n),n.append("<\/table>"),this._mergedRow){var s=this._get_focusedCell(),h=this.get_isInserting(),c=this.get_isDataSheet();for(r=0;r<this._allFields.length;r++)u=this._allFields[r],l=s&&r!=this._fields[s.colIndex].Index,(u.Hidden&&(!u.IsPrimaryKey||h)||l||!s&&h&&c)&&(i=this._mergedRow[r],(i!=null||c&&!h)&&n.appendFormat('<input id="{0}_Item{1}" type="hidden" value="{2}"/>',this.get_id(),r,Web.DataView.htmlAttributeEncode(i!=null?u.format(i):"")))}this._container.innerHTML=n.toString();this._multipleSelection!=null&&this._multipleSelection==!0&&($get(this.get_id()+"_ToggleButton").checked=!0);this._attachBehaviors();this._updateVisibility();this.get_isEditing()&&(this._lastCommandName=="BatchEdit"&&$(this._element).find("div.BatchSelect input:checkbox:checked").each(function(){Web.DataView._updateBatchSelectStatus(this,o)}),this._focus())}n.clear();this._updateChart();this._updateSearchBar();this._removeRowUpdates();this._fixWidthOfColumns();this._fixHeightOfRow(!0);this._refreshExtension()},_refreshExtension:function(){var n=this.extension(),t=this._lastExtension;n!=t&&(t&&t.hide(),n&&n.show(),this._lastExtension=n);n&&n.refresh()},_get_headerRowElement:function(){for(var t=this._container.childNodes[0].childNodes[0].childNodes,n=0;n<t.length;){if(Sys.UI.DomElement.containsCssClass(t[n],"HeaderRow"))return t[n];n++}return null},_fixWidthOfColumns:function(){var t,i,n,u,f,h,e;if((this.get_isDataSheet()||this.get_isGrid())&&!this.extension()&&(t=this._get_headerRowElement(),t)){if(this._viewColumnSettings||(this._viewColumnSettings=[]),i=this._viewColumnSettings[this.get_viewId()],!i){for(i=[],$(t).addClass("Fixed"),n=0;n<t.childNodes.length;n++){if(u=t.childNodes[n],f=$common.getBounds(u),f.width==0){Sys.UI.DomElement.removeCssClass(t,"Fixed");return}var o=$common.getPaddingBox(u),s=$common.getBorderBox(u),r={w:f.width-o.horizontal-s.horizontal,h:f.height-o.vertical-s.vertical};Array.add(i,r)}for(h=$common.getBounds(t),n=0;n<i.length;n++)i[n].h=h.height;this._viewColumnSettings[this.get_viewId()]=i;Sys.UI.DomElement.removeCssClass(t,"Fixed")}for(n=0;n<t.childNodes.length;n++)r=i[n],r&&(e=t.childNodes[n],e.style.height=r.h+"px",e.style.width=r.w+"px")}},_fixHeightOfRow:function(n){var i,e,f,r,t,u,o;if((this.get_isDataSheet()||this.get_isGrid())&&(!n||this.get_isEditing())){if(i=this._get_headerRowElement(),!i)return;if(e=this._get_focusedCell(),f=this.get_isGrid()?this._selectedRowIndex:e.rowIndex,f>=0){for(r=i.parentNode,t=0;t<r.childNodes.length;t++)if(r.childNodes[t]==i)break;u=r.childNodes[t+f+1];u&&(n?this._selectedRowHeight&&(u.style.height=this._selectedRowHeight+"px"):(o=$common.getBounds(u),this._selectedRowHeight=o.height))}}},_updateChart:function(){var t,i,n;if(this.get_isChart()){t=this._get("$Chart");i=t.offsetWidth;i<100&&(i=t.parentNode.offsetWidth);n=this._createParams();delete n.Transaction;delete n.LookupContextFieldName;delete n.LookupContextController;delete n.LookupContextView;delete n.LookupContext;delete n.LastCommandName;delete n.LastCommandArgument;delete n.Inserting;delete n.DoesNotRequireData;var u=Sys.Serialization.JavaScriptSerializer.serialize(n),f=$common.getBounds(t),r=this;r._chartHeight&&(t.style.height=r._chartHeight+"px");$(t).one("load",function(){try{r._chartHeight=$(this).height()}catch(n){}}).attr("src",String.format("{0}ChartHost.aspx?c={1}_{2}&w={3}&r={4}",this.get_baseUrl(),this.get_controller(),this.get_viewId(),i,encodeURIComponent(u)))}},_toggleCategoryVisibility:function(n,t){var r=$get(String.format("{0}$Category${1}",this.get_id(),n)),u,i;r&&(u=this.get_categories()[n],t||(t=!Sys.UI.DomElement.getVisible(r)),Sys.UI.DomElement.setVisible(r,t),i=$get(String.format("{0}$CategoryButton${1}",this.get_id(),n)),u.Collapsed=!t,t?(Sys.UI.DomElement.removeCssClass(i,"Maximize"),i.childNodes[0].title=Web.DataViewResources.Form.Minimize):($(i).addClass("Maximize"),i.childNodes[0].title=Web.DataViewResources.Form.Maximize),_body_performResize())},_processTemplatedText:function(n,t){var e,r,i,u,f,o,s;if(t||(t=""),e=/\{(\w+)\}/g,r=e.exec(t),!r)return t;for(i=new Sys.StringBuilder,u=0;r;)i.append(t.substring(u,r.index)),f=r[1],u=r.index+f.length+2,o=this.findField(f),o?(i.append('<span class="FieldPlaceholder">'),this._renderItem(i,o,n,!1,!1,!1,!1,!1,!0),i.append("<\/span>")):i.appendFormat("[{0}]",f),r=e.exec(t);return s=t.length-1,u<s&&i.append(t.substring(u,s)),i.toString().replace(/ (id|for)=\".+?\"/g,"")},_get_selectedTab:function(){return this._tabs.length>0?this._tabs[this.get_categoryTabIndex()]:null},_renderFormView:function(n){var g=this.get_isEditing(),r,e,a,d,v,h,y,l,t,s,w,b,u,k;if(this._renderStatusBar(n),this._renderViewDescription(n),Web.DataViewResources.Form.ShowActionBar&&this._renderActionBar(n),r=this.get_currentRow(),this._mergeRowUpdates(r),this._updateVisibility(r),this.get_isInserting()&&this._expressions)for(i=0;i<this._expressions.length;i++)e=this._expressions[i],e.Scope==Web.DynamicExpressionScope.DefaultValues&&e.Type==Web.DynamicExpressionType.ClientScript&&(f=this.findField(e.Target),f&&(String.isNullOrEmpty(e.Test)?r[f.Index]=e.Result:(a=eval(e.Test),a&&(r[f.Index]=String.isNullOrEmpty(e.Result)?a:e.Result))));for(d=0,i=0;i<this._allFields.length;i++)this._allFields[i].Hidden||d++;if(v=r!=null,v&&this._renderActionButtons(n,"Top","Form"),h=this._get_selectedTab(),this._tabs.length>0){for(n.appendFormat('<tr class="TabsRow"><td colspan="{0}" class="TabsBar{1}">',this._get_colSpan(),v?"":" WithMargin"),n.append('<table cellpadding="0" cellspacing="0" class="Tabs"><tr>'),i=0;i<this._tabs.length;i++)n.appendFormat('<td id="{2}_Tab{3}" class="Tab{1}" onmouseover="$hoverTab(this,true)" onmouseout="$hoverTab(this,false)"><span class="Outer"><span class="Inner"><span class="Tab"><a href="javascript:" onclick="$find(&quot;{2}&quot;).set_categoryTabIndex({3});return false;" onfocus="$hoverTab(this,true)" onblur="$hoverTab(this,false)" tabindex="{4}">{0}<\/a><\/span><\/span><\/span><\/td>',Web.DataView.htmlEncode(this._tabs[i]),i==this.get_categoryTabIndex()?" Selected":"",this.get_id(),i,$nextTabIndex());n.append("<\/tr><\/table><\/td><\/tr>")}if(r)if(y=this._get_template(),y)n.appendFormat('<tr class="CategoryRow"><td valign="top" class="Fields" colspan="{0}">',this._get_colSpan()),this._renderTemplate(y,n,r,!0,!1),n.append("<\/td><\/tr>");else{var c=this.get_categories(),o=this.get_fields(),p=this._numberOfColumns;if(p>0){for(n.appendFormat('<tr class="Categories"><td class="Categories" colspan="{0}"><table class="Categories"><tr class="CategoryRow">',this._get_colSpan()),l=0;l<p;l++){for(l>0&&n.append('<td class="CategorySeparator">&nbsp;<\/td>'),n.appendFormat('<td class="CategoryColumn" valign="top" style="width:{0}%">',100/p),i=0;i<c.length;i++)if(t=c[i],t.ColumnIndex==l||this._ignoreColumnIndex){for(this.get_isModal()&&(t.Collapsed=!1),n.appendFormat('<div id="{0}_Category{1}" class="Category {3}" style="display:{2}">',this.get_id(),i,!h||h==t.Tab?"block":"none",t.Id),s=this._processTemplatedText(r,t.Description),w=this._formatViewText(Web.DataViewResources.Views.DefaultCategoryDescriptions[s],!0,s),n.appendFormat('<table class="Category {8}" cellpadding="0" cellspacing="0"><tr><td class="HeaderText"><span class="Text">{0}<\/span><a href="javascript:" class="MinMax{6}" onclick="$find(\'{2}\')._toggleCategoryVisibility({3});return false;" id="{2}$CategoryButton${3}" style="{5}"><span title="{4}"><\/span><\/a><div style="clear:both;height:1px;margin-top:-1px;"><\/div><\/td><\/tr><tr><td class="Description" id="{2}$CategoryDescription${3}" style="display:{7}">{1}<\/td><\/tr><\/table>',t.HeaderText,w,this.get_id(),i,t.Collapsed?Web.DataViewResources.Form.Maximize:Web.DataViewResources.Form.Minimize,c.length>1&&!this.get_isModal()?"":"display:none",t.Collapsed?" Maximize":"",String.isNullOrEmpty(w)?"none":"block",t.Id),b=!0,j=0;j<o.length;j++)if(u=o[j],!u.Hidden&&u.CategoryIndex==t.Index){b=!1;break}if(!b){if(n.appendFormat('<table class="Fields" id="{0}$Category${1}" style="{2}"><tr class="FieldsRow"><td class="Fields" valign="top" width="100%">',this.get_id(),i,t.Collapsed?"display:none":""),String.isNullOrEmpty(t.Template))for(j=0;j<o.length;j++)u=o[j],u.Hidden||u.CategoryIndex!=t.Index||(k=u.Name.match(/^(_[A-Za-z_]+)\d/),n.appendFormat('<table cellpadding="0" cellspacing="0" class="FieldWrapper {0}"><tr class="FieldWrapper"><td class="Header" valign="top">',k?k[1]:u.Name),this._renderItem(n,u,r,!0,!1,!1,!0),n.appendFormat('<\/td><td class="Item{0}" valign="top">',g&&!u.isReadOnly()?"":" ReadOnly"),this._renderItem(n,u,r,!0),n.append("<\/td><\/tr><\/table>"));else this._renderTemplate(t.Template,n,r,!0,!1);n.append("<\/td><\/tr><\/table>")}n.append("<\/div>")}n.append("<\/td>")}n.append("<\/tr><\/table><\/td><\/tr>")}else for(i=0;i<c.length;i++){if(t=c[i],s=this._processTemplatedText(r,t.Description),n.appendFormat('<tr class="CategoryRow {5}" id="{2}_Category{3}" style="display:{4}"><td valign="top" class="Category {5}"><table class="Category {5}" cellpadding="0" cellspacing="0"><tr><td class="HeaderText">{0}<\/td><\/tr><tr><td class="Description" id="{2}$CategoryDescription${3}">{1}<\/td><\/tr><\/table><\/td><td valign="top" class="Fields {5}">',t.HeaderText,this._formatViewText(Web.DataViewResources.Views.DefaultCategoryDescriptions[s],!0,s),this.get_id(),i,!h||h==t.Tab?"block":"none",t.Id),String.isNullOrEmpty(t.Template))for(j=0;j<o.length;j++)u=o[j],u.Hidden||u.CategoryIndex!=t.Index||this._renderItem(n,u,r,!0);else this._renderTemplate(t.Template,n,r,!0,!1);n.append("<\/td><\/tr>")}}else this._renderNoRecordsWhenNeeded(n);r&&this._renderActionButtons(n,"Bottom","Form")},_updateTabbedCategoryVisibility:function(){var i,n,t,r;if(this._tabs&&this._tabs.length>0){for(i=this._tabs[this.get_categoryTabIndex()],n=0;n<this._tabs.length;n++)t=this._get("_Tab",n),t&&(n==this.get_categoryTabIndex()?$(t).addClass("Selected"):$(t).removeClass("Selected"));for(n=0;n<this._categories.length;n++)r=this._categories[n],t=this._get("_Category",n),t&&Sys.UI.DomElement.setVisible(t,r.Tab==i);this._updateVisibility()}this._adjustModalHeight()},_renderItem:function(n,t,i,r,u,f,e,o,s){var y=Web.DataViewResources.Data,a=this.get_isForm()||u,h=i[t.Index],ht,ot,st,gt,ct,yt,pt,lt,w,k,ft,d,g,nt,v,p,ii,bt,ri,c,ui,fi,at,kt,vt,dt,it;h!=null&&(h=h.toString());var b=null,rt=t.ItemsStyle=="CheckBoxList",tt=this.get_isEditing(),et=t.Index!=t.AliasIndex;if(tt&&t.ItemsStyle=="CheckBox"&&t.Items.length==2&&(ht=t.Items[0][0],ot=t.Items[1][0],ht=="true"&&(ht="false",ot="true"),h==null&&(h=t.Items[0][0]),b=String.format('<input type="checkbox" id="{0}_Item{1}"{2} tabindex="{3}" value="{4}" onclick="this.value=this.checked?\'{6}\':\'{5}\';$find(&quot;{0}&quot;)._valueChanged({1});" onfocus="$find(&quot;{0}&quot;)._valueFocused({1});" title="{7}"/>',this.get_id(),t.Index,ot&&(h=="true"||h==ot)?" checked":"",$nextTabIndex(),h,ht,ot,t.ToolTip)),st=t.isReadOnly(),a){if(gt=String.format('<div class="Error" id="{0}_Item{1}_Error" style="display:none"><\/div>',this.get_id(),t.Index),e||n.appendFormat('<div class="Item {2}" id="{0}_ItemContainer{1}">',this.get_id(),t.Index,t.Name),ct=this._allFields[t.AliasIndex].HeaderText,b&&e&&!(tt&&st)){n.append('<div class="Header">&nbsp;<\/div>');return}if(ct.length>0&&(s&&b&&this._numberOfColumns>0?n.append('<div class="Header">&nbsp;<\/div>'):n.appendFormat('<div class="Header {5}">{3}<label for="{0}_Item{1}">{2}{4}<\/label><\/div>',this.get_id(),t.Index,ct,this._numberOfColumns>0||s?"":b,tt&&!t.AllowNulls&&!b&&!st&&Web.DataViewResources.Form.RequiredFieldMarker?Web.DataViewResources.Form.RequiredFieldMarker:"",t.Name)),e)return;(b==null||this._numberOfColumns>0)&&n.append('<div class="Value">')}if(yt=!tt&&!String.isNullOrEmpty(t.ItemsDataController)&&!rt&&!f&&h&&this._disableObjectRef!=!0&&!t.tagged("lookup-details-hidden"),yt&&!a&&n.append('<table width="100%" cellpadding="0" cellspacing="0" class="ObjectRef"><tr><td>'),tt&&r&&!st){pt=t;t._LEV!=null&&n.append('<table cellpadding="0" cellspacing="0"><tr><td>');!a&&b&&n.append(b);var ni=!String.isNullOrEmpty(t.ItemsStyle),wt=t.ItemsStyle=="Lookup",ti=!String.isNullOrEmpty(t.ContextFields),ut=t.ItemsStyle=="AutoComplete",l=t.DynamicItems?t.DynamicItems:t.Items;if(!ni||wt||ut||l.length!=0||rt||!ti){if(t.DynamicItems&&!rt){for(lt=!1,w=0;w<l.length;w++)if(l[w][0]==h){lt=!0;break}lt||(h=null);!t.AllowNulls&&lt||String.isNullOrEmpty(l[0][0])||Array.insert(l,0,["",y.NullValueInForms])}}else l=[],(t.AllowNulls||ti)&&Array.add(l,["",y.NullValueInForms]),h!=null&&Array.add(l,[h,i[t.AliasIndex]]);if(b!=null)(this._numberOfColumns>0||s)&&(n.append(b),n.appendFormat('<label for="{0}_Item{1}" title="{3}">{2}<\/label>',this.get_id(),t.Index,ct,t.ToolTip));else if(l.length>0||rt||ni&&!wt&&!ut)if(t.ItemsStyle=="RadioButtonList"){for(n.appendFormat('<table cellpadding="0" cellspacing="0" class="RadioButtonList" title="{0}">',t.ToolTip),k=t.Columns==0?1:t.Columns,ft=Math.floor(l.length/k)+(l.length%k>0?1:0),d=0;d<ft;d++){for(n.append("<tr>"),g=0;g<k;g++)nt=g*ft+d,nt<l.length?(v=l[nt],p=v[0]==null?"":v[0].toString(),h==null&&(h=""),n.appendFormat('<td class="Button"><input type="radio" id="{0}_Item{1}_{2}" name="{0}_Item{1}" value="{3}"{4} tabindex="{6}" onclick="$find(&quot;{0}&quot;)._valueChanged({1})" onfocus="$find(&quot;{0}&quot;)._valueFocused({1});"/><\/td><td class="Option"><label for="{0}_Item{1}_{2}">{5}<label><\/td>',this.get_id(),t.Index,nt,p,p==h?" checked":"",this.htmlEncode(t,v[1]),$nextTabIndex())):n.append('<td class="Button">&nbsp;<\/td><td class="Option"><\/td>');n.append("<\/tr>")}n.append("<\/table>")}else if(rt)if(ii=h?h.split(","):[],bt=!String.isNullOrEmpty(t.ContextFields)&&!t.DynamicItems,n.appendFormat('<input type="hidden" id="{0}_Item{1}" name="{0}_Item{1}" value="{2}"/>',this.get_id(),t.Index,bt?h:""),bt)n.append(Web.DataViewResources.HeaderFilter.Loading);else{for(n.appendFormat('<table cellpadding="0" cellspacing="0" class="RadioButtonList" title="{0}">',t.ToolTip),k=t.Columns==0?1:t.Columns,ft=Math.floor(l.length/k)+(l.length%k>0?1:0),d=0;d<ft;d++){for(n.append("<tr>"),g=0;g<k;g++)nt=g*ft+d,nt<l.length?(v=l[nt],p=v[0]==null?"":v[0].toString(),h==null&&(h=""),n.appendFormat('<td class="Button"><input type="checkbox" id="{0}_Item{1}_{2}" name="{0}_Item{1}" value="{3}"{4} tabindex="{6}"  onclick="$find(&quot;{0}&quot;)._valueChanged({1})" onfocus="$find(&quot;{0}&quot;)._valueFocused({1});"/><\/td><td class="Option"><label for="{0}_Item{1}_{2}">{5}<label><\/td>',this.get_id(),t.Index,nt,p,Array.indexOf(ii,p)!=-1?" checked":"",this.htmlEncode(t,v[1]),$nextTabIndex())):n.append('<td class="Button">&nbsp;<\/td><td class="Option"><\/td>');n.append("<\/tr>")}n.append("<\/table>")}else{for(n.appendFormat('<select id="{0}_Item{1}" size="{2}" tabindex="{3}" onchange="$find(&quot;{0}&quot;)._valueChanged({1});" onfocus="$find(&quot;{0}&quot;)._valueFocused({1});" title="{4}">',this.get_id(),t.Index,t.ItemsStyle=="ListBox"?t.Rows==0?5:t.Rows:"1",$nextTabIndex(),t.ToolTip),h==null&&(h=""),h=h.toString(),w=0;w<l.length;w++)v=l[w],p=v[0],ri=p==null&&!t.AllowNulls?Web.DataViewResources.Lookup.SelectLink:v[1],p==null&&(p=""),p=p.toString(),n.appendFormat('<option value="{0}"{1}>{2}<\/option>',p,p==h?" selected":"",this.htmlEncode(t,ri));n.append("<\/select>")}else!String.isNullOrEmpty(t.ItemsDataController)&&wt?(h=i[t.AliasIndex],h==null&&(h=Web.DataViewResources.Lookup.SelectLink),c=this._allFields[t.AliasIndex].format(h),this._renderCreateNewBegin(n,t),n.appendFormat('<table cellpadding="0" cellspacing="0" class="Lookup"><tr><td><a href="#" onclick="$find(\'{0}\').showLookup({1});return false" id="{0}_Item{1}_ShowLookupLink" title="{3}" tabindex="{5}">{2}<\/a><a href="#" class="Clear" onclick="$find(\'{0}\').clearLookupValue({1});return false" id="{0}_Item{1}_ClearLookupLink" title="{7}" tabindex="{6}" style="display:{8}">&nbsp;<\/a><\/td><\/tr><\/table><input type="hidden" id="{0}_Item{1}" value="{4}"/><input type="hidden" id="{0}_Item{9}" value="{2}"/>',this.get_id(),t.Index,this.htmlEncode(t,c),String.isNullOrEmpty(t.ToolTip)?String.format(Web.DataViewResources.Lookup.SelectToolTip,t.Label):t.ToolTip,i[t.Index],$nextTabIndex(),$nextTabIndex(),String.format(Web.DataViewResources.Lookup.ClearToolTip,t.Label),i[t.Index]!=null?"display":"none",t.AliasIndex),this._renderCreateNewEnd(n,t)):t.OnDemand?this._renderOnDemandItem(n,t,i,r,a):t.Editor?(ui=t.Editor,n.appendFormat('<input type="hidden" id="{0}_Item{1}" value="{2}"/>',this.get_id(),t.Index,Web.DataView.htmlAttributeEncode(h)),n.appendFormat('<iframe src="{0}?id={1}_Item{2}&control={3}" frameborder="0" scrolling="no" id="{1}_Item{2}$Frame" class="FieldEditor {3}" tabindex="{4}"><\/iframe>',this.resolveClientUrl(this.get_appRootPath()+"ControlHost.aspx"),this.get_id(),t.Index,ui,$nextTabIndex())):t.Rows>1?(n.appendFormat('<textarea id="{0}_Item{1}" tabindex="{2}" onchange="$find(&quot;{0}&quot;)._valueChanged({1})" onfocus="$find(&quot;{0}&quot;)._valueFocused({1});" title="{3}" style="',this.get_id(),t.Index,$nextTabIndex(),t.ToolTip),t.TextMode!=3||String.isNullOrEmpty(h)||n.append("display:none;"),a?n.appendFormat('" cols="{0}"',t.Columns>0?t.Columns:50):n.append('display:block;width:100%;"'),n.appendFormat(' rows="{0}"',t.Rows),$app.supportsPlaceholder&&!String.isNullOrEmpty(t.Watermark)&&n.appendFormat(' placeholder="{0}"',Web.DataView.htmlAttributeEncode(t.Watermark)),n.append(">"),n.append(t.HtmlEncode?this.htmlEncode(t,h):h),n.append("<\/textarea>"),t.TextMode!=3||String.isNullOrEmpty(h)||n.appendFormat("<div>{2}<div><a href=\"javascript:\" onclick=\"var o=$get('{0}_Item{1}');o.style.display='block';o.focus();this.parentNode.parentNode.style.display='none';return false;\">{3}<\/a> | <a href=\"javascript:\" onclick=\"if(!confirm('{5}'))return;$get('{0}_Item{1}').value='';this.parentNode.parentNode.parentNode.parentNode.style.display='none';return false;\">{4}<\/a><\/div><\/div>",this.get_id(),t.Index,this.htmlEncode(t,h).replace(/((\r\n*)|\n)/g,"<br/>"),y.NoteEditLabel,y.NoteDeleteLabel,y.NoteDeleteConfirm)):(k=t.Columns>0?t.Columns:50,fi=t.ToolTip,ut&&(!et||tt)&&(h=i[t.Index],n.appendFormat('<input type="hidden" id="{0}_Item{1}" value="{2}"/>',this.get_id(),t.Index,Web.DataView.htmlAttributeEncode(h)),t=this._allFields[t.AliasIndex]),t.TimeFmtStr&&n.append('<table cellpadding="0" cellspacing="0" class="DateTime"><tr><td class="Date">'),n.appendFormat('<input type="{3}" id="{0}_Item{1}" tabindex="{2}" onchange="$find(&quot;{0}&quot;)._valueChanged({1})" onfocus="$find(&quot;{0}&quot;)._valueFocused({1});"',this.get_id(),t.Index,$nextTabIndex(),t.TextMode!=1?"text":"password"),a?n.appendFormat(' size="{0}"',k):n.append(' style="display:block;width:90%;"'),t.Len>0&&n.appendFormat(' maxlength="{0}"',t.Len),ut&&n.appendFormat(' title="{0}"',fi),h=i[t.Index],h==null?c=ut?y.NullValueInForms:"":et?c=h.toString():(t.DateFmtStr&&(typeof h=="string"&&(h=Date.parseLocale(h,t.DataFormatString.match(/\{0:([\s\S]*?)\}/)[1])),t.DataFormatString=t.DateFmtStr),c=t.format(h),t.DateFmtStr&&(t.DataFormatString=t.DataFmtStr)),n.appendFormat(' value="{0}" {1}',Web.DataView.htmlAttributeEncode(c),a?' class="TextInput"':String.format('class="TextInput {0}Type"',t.Type)),n.appendFormat(' title="{0}"',t.ToolTip),$app.supportsPlaceholder&&!String.isNullOrEmpty(t.Watermark)&&n.appendFormat(' placeholder="{0}"',Web.DataView.htmlAttributeEncode(t.Watermark)),n.append("/>"),t.Type.startsWith("DateTime")&&a&&Web.DataViewResources.Form.ShowCalendarButton&&!t.TimeFmtStr&&n.appendFormat('<a id="{0}_Item{1}_Button" href="#" onclick="return false" class="Calendar">&nbsp;<\/a>',this.get_id(),t.Index),t.TimeFmtStr&&(n.appendFormat('<\/td><td class="Time"><input type="text" id="{0}_Item$Time{1}" tabindex="{2}" onchange="$find(&quot;{0}&quot;)._valueChanged({1})" onfocus="$find(&quot;{0}&quot;)._valueFocused({1});"',this.get_id(),t.Index,$nextTabIndex()),a?n.appendFormat(' size="{0}"',k):n.append(' style="display:block;width:90%;"'),h==null?c=ut?y.NullValueInForms:"":et?c=h.toString():(t.DataFormatString=t.TimeFmtStr,c=t.format(h),t.DataFormatString=t.DataFmtStr),n.appendFormat(' value="{0}" {1}/><\/td><\/table>',Web.DataView.htmlAttributeEncode(c),a?"":'class="TimeType"')));t._LEV!=null&&(at=this._allFields[t.AliasIndex]._LEV,at==null&&(at=""),n.appendFormat('<\/td><td class="UseLEV"><a href="javascript:" onclick="$find(\'{0}\')._applyLEV({1});return false" tabindex="{2}" title="{3}">&nbsp;<\/a><\/td><\/tr><\/table>',this.get_id(),t.Index,$nextTabIndex(),Web.DataView.htmlAttributeEncode(String.format(y.UseLEV,this._allFields[t.AliasIndex].format(at)))));this._lastCommandName=="BatchEdit"&&n.appendFormat('<div class="BatchSelect"><table cellpadding="0" cellspacing="0"><tr><td><input type="checkbox" id="{0}$BatchSelect{1}" onclick="Web.DataView._updateBatchSelectStatus(this,{3})"{4}/><\/td><td><label for="{0}$BatchSelect{1}">{2}<\/a><\/td><\/tr><\/table><\/div>',this.get_id(),pt.Index,y.BatchUpdate,a==!0,this._batchEdit&&Array.contains(this._batchEdit,pt.Name)?' checked="checked"':"")}else if(t.OnDemand)this._renderOnDemandItem(n,t,i,r,a);else{if(h=this.htmlEncode(t,i[t.AliasIndex]),tt&&st&&r&&(kt=i[t.Index],n.appendFormat('<input type="hidden" id="{0}_Item{1}" value="{2}"/>',this.get_id(),t.Index,kt!=null?Web.DataView.htmlAttributeEncode(this._allFields[t.AliasIndex].format(kt)):"")),vt=t.DynamicItems?t.DynamicItems:t.Items,vt.length==0)t.Type=="String"&&h!=null&&h.length>y.MaxReadOnlyStringLen&&!(t.TextMode==3||t.TextMode==2)&&(h=h.substring(0,y.MaxReadOnlyStringLen)+"..."),h&&t.TextMode==3&&(h=h.replace(/((\r\n*)|\n)/g,"<br/>")),c=String.isBlank(h)?a?y.NullValueInForms:y.NullValue:this._allFields[t.AliasIndex].format(h);else if(rt){for(l=h?h.split(","):[],dt=!0,w=0;w<vt.length;w++)v=vt[w],p=v[0]==null?"":v[0].toString(),Array.contains(l,p)&&(dt?dt=!1:n.append(", "),n.append(Web.DataView.htmlEncode(v[1])));c=l.length==0?y.NullValueInForms:""}else et&&!r?c=h:(v=this._findItemByValue(t,et?i[t.Index]:h),c=v[1],a||c!=y.NullValueInForms||(c=y.NullValue));String.isNullOrEmpty(t.HyperlinkFormatString)||h==null||(it=this._parseLocation(t.HyperlinkFormatString,i),c=it&&it.match(/^mailto\:/)?String.format('<a href="{0}" title="{2}">{1}<\/a>',it,c,t.ToolTip):it.match(/^javascript\:/)?String.format('<a href="javascript:" onclick="{0};return false;" title="{2}">{1}<\/a>',it.substring(11),c,t.ToolTip):String.format('<a href="javascript:" onclick="$find(\'{2}\')._navigate(\'{0}\');" title="{3}">{1}<\/a>',it,c,this.get_id(),t.ToolTip));t.TextMode==1&&(c="**********");o==!0&&(c=String.trimLongWords(c));__designer()&&c&&(c=c.replace(/\^\w+\^/g,""));n.append(c)}yt&&(a||n.append('<\/td><td align="right">'),n.appendFormat('<span class="ObjectRef" title="{0}" onclick="$find(&quot;{1}&quot;).executeCommand({{commandName: &quot;_ViewDetails&quot;, commandArgument: &quot;{2}&quot;}})">&nbsp;<\/span>',String.format(Web.DataViewResources.Lookup.DetailsToolTip,Web.DataView.htmlAttributeEncode(this._allFields[t.AliasIndex].HeaderText)),this.get_id(),t.Name),a||n.append("<\/td><\/tr><\/table>"));a&&((b==null||this._numberOfColumns>0)&&n.append("<\/div>"),n.append(gt),String.isNullOrEmpty(t.FooterText)||n.appendFormat('<div class="Footer">{0}<\/div>',t.FooterText),n.append("<\/div>"))},_renderOnDemandItem:function(n,t,i,r,u){var f=Web.DataViewResources.Data,e=i[t.Index],h=e!=null?e.toString().match(/^null\|(.+)$/):null,o=h!=null||e==null,s;h&&(e=h[1]);o&&!r&&t.OnDemandStyle==1?n.append(u?f.NullValueInForms:f.NullValue):(s=this.resolveClientUrl(this.get_appRootPath()+f.BlobHandler),r&&!o&&n.appendFormat('<a href="{0}?{1}=o|{2}" title="{3}" onclick="$find(&quot;{4}&quot;)._showDownloadProgress();open(this.href, &quot;_blank&quot;,&quot;height={5},width={6},resizable=yes&quot;);return false">',s,t.OnDemandHandler,e,f.BlobDownloadHint,this.get_id(),$(window).height()/2,$(window).width()/2),t.OnDemandStyle==1?o?n.append(u?f.NullValueInForms:f.NullValue):n.append(r?f.BlobDownloadLink:f.BlobDownloadLinkReadOnly):o?n.append(u?f.NullValueInForms:f.NullValue):n.appendFormat('<img src="{0}?{1}=t|{2}" class="Thumbnail"/>',s,t.OnDemandHandler,e),r&&!o&&n.append("<\/a>"),!t.ReadOnly&&this.get_isEditing()&&r&&n.appendFormat('<iframe src="{0}?{1}=u|{2}&owner={3}&index={4}" frameborder="0" scrolling="no" id="{3}_Frame{4}" tabindex="{6}"><\/iframe><div style="display:none" id="{3}_ProgressBar{4}" class="UploadProgressBar">{5}<\/div>',s,t.OnDemandHandler,e,this.get_id(),t.Index,"Uploading...",$nextTabIndex()))},_showUploadProgress:function(n,t){var f=$get(String.format("{0}_Frame{1}",this.get_id(),n)),i=$get(String.format("{0}_ProgressBar{1}",this.get_id(),n)),e,u,c,r;if(f!=null&&i!=null){e=$(t).find("input:file");u=e.val().split(/(\\|\/)/);u=u.length>0?u[u.length-1]:null;var l=this.get_isInserting(),o=$(i).show().text(u).focus(),s=$common.getPaddingBox(i),h=$common.getBorderBox(i);i.style.width=f.offsetWidth-s.horizontal-h.horizontal+"px";i.style.height=f.offsetHeight-s.vertical-h.vertical+"px";c=$(f).hide();l?(r=this._pendingUploads,r||(r=this._pendingUploads=[]),r.push({form:t,progress:i}),o.find("a").button("destroy"),o.addClass("dataview-insert").append($(String.format("<a>{0}<\/a>",Web.DataViewResources.Data.Filters.Labels.Clear)).button({icons:{primary:"ui-icon-close"},text:!1}).click(function(){o.hide();c.show();for(var n=0;n<r.length;n++)if(r[n].form==t){Array.removeAt(r,n);break}e.replaceWith(e.clone(!0))}))):(this._showDownloadProgress(),t.submit())}},_internalRenderActionButtons:function(n,t,i,r){var u,f,e;for(r||(r=this._actionButtonsInScope(i)),this._clonedRow=this._cloneChangedRow(),u=0;u<r.length;u++)action=r[u],this._isActionAvailable(action)&&(f=String.isNullOrEmpty(action.CssClass)?"":action.CssClass,action.HeaderText&&action.HeaderText.length>10&&(f.length>0&&(f+=" "),f+="AutoWidth"),e=action.CommandName=="None",n.appendFormat('<button onclick="{6}$find(\'{0}\').executeAction(\'{5}\', {1},-1);return false" tabindex="{3}" class="{8}{4}"{7}>{2}<\/button>',this.get_id(),u,action.HeaderText,$nextTabIndex(),f,i,e?"return false;":"",e?' disabled="disabled"':"",action.CssClassEx)),action._whenClientScript!=null&&(this._dynamicActionButtons=!0);this._clonedRow=null},_actionButtonsInScope:function(n){var t=this.get_actions(n),r,i;if(t.length!=0){if(n=="Row"){for(r=!1,i=0;i<t.length;i++)if(this._isActionAvailable(t[i])){r=!0;break}if(!r)return null}return t}},_renderActionButtons:function(n,t,i){var e,o,s,h;if(this.get_showActionButtons().indexOf(t)!=-1&&(e=this._actionButtonsInScope(i),e)){if(o=this._get_colSpan(),s="",i=="Row"&&this._actionColumn&&(o--,s='<td class="ActionColumn">&nbsp;<\/td>'),n.appendFormat('<tr class="ActionButtonsRow {0}ButtonsRow {2}Scope">{3}<td colspan="{1}" class="ActionButtons {2}ActionButtons">',t,o,i,s),n.append('<table style="width:100%" cellpadding="0" cellspacing="0" class="ActionButtons"><tr>'),h=String.format(' id="{0}$ActionButtons${1}"',this.get_id(),t),i=="Form"){var r=this._position,c=r&&r.count>1&&!this.get_isInserting(),l=r&&r.index>0,a=r&&r.index<r.count-1,u=this._get_specialAction("Print"),f=this.get_isModal()?this._get_specialAction("Annotate"):null;n.appendFormat('<td class="Left"><table class="FormNav"><tr><td class="Previous{5}{7}"><a href="javascript:" onclick="$find(\'{2}\')._advance(-1);return false;" title="{3}"><span><\/span><\/a><\/td><td class="Next{6}{7}"><a href="javascript:" onclick="$find(\'{2}\')._advance(1);return false;" title="{4}"><span><\/span><\/a><\/td><td class="Print{9}"><a href="javascript:" onclick="{10};return false;" title="{8}"><span><\/span><\/a><\/td><td class="Annotate{12}"><a href="javascript:" onclick="{13};return false;" title="{11}"><span><\/span><\/a><\/td><td class="Instruction" id="{0}_Wait" align="left">{1}<\/td><\/tr><\/table><\/td><td class="Right" align="right"{14}>&nbsp;',t=="Bottom"?this.get_id():"",this.get_isEditing()&&Web.DataViewResources.Form.RequiredFieldMarker?Web.DataViewResources.Form.RequiredFiledMarkerFootnote:"",this.get_id(),Web.DataViewResources.Pager.Previous,Web.DataViewResources.Pager.Next,l?"":" Disabled",a?"":" Disabled",c?"":" Hidden",u?u.text:"",u?"":" Hidden",u?u.script:null,f?f.text:"",f?"":" Hidden",f?f.script:null,h)}else n.appendFormat("<td{0}>",h);this._internalRenderActionButtons(n,t,i,e);this._lastActionButtonsScope=i;n.append("<\/td><\/tr><\/table>");n.append("<\/td><\/tr>")}},_isActionMatched:function(n){n._csInitialized||(String.isNullOrEmpty(n.WhenClientScript)||(n._whenClientScript=this._prepareJavaScriptExpressionEx(n.WhenClientScript)),n._csInitialized=!0);return(n.WhenViewRegex==null||n.WhenViewRegex.exec(this.get_viewId())!=null==n.WhenViewRegexResult)&&(n.WhenTagRegex==null||n.WhenTagRegex.exec(this.get_tag())!=null==n.WhenTagRegexResult)&&(n.WhenHRefRegex==null||n.WhenHRefRegex.exec(location.pathname)!=null==n.WhenHRefRegexResult)&&(n._whenClientScript==null||eval(n._whenClientScript)==!0)},_isActionAvailable:function(n,t){var i=n.WhenLastCommandName?n.WhenLastCommandName:"",u,f,r,e;if(i=="Any"&&(i=this.get_lastCommandName()),u=n.WhenLastCommandArgument?n.WhenLastCommandArgument:"",f=i.length==0||i==this.get_lastCommandName()&&(u.length==0||u==this.get_lastCommandArgument()),f){if(r=this.get_isEditing(),n.CommandName=="DataSheet")return!r&&this.get_isGrid()&&this.get_viewType()!="DataSheet"&&this._isActionMatched(n);if(n.CommandName=="Grid")return!r&&this.get_isGrid()&&this.get_viewType()!="Grid"&&this._isActionMatched(n);if(r)return e=this._rowIsSelected(t==null?this._selectedRowIndex:t),e?(i=="New"||i=="Edit"||i=="BatchEdit"||i=="Duplicate")&&this._isActionMatched(n):e||t!=null||i!="New"&&i!="Duplicate"?i.length==0&&t!=null&&this._isActionMatched(n):this._isActionMatched(n)}return f&&(!n.WhenKeySelected||n.WhenKeySelected&&this._selectedKey&&this._selectedKey.length>0)&&this._isActionMatched(n)&&(n.CommandName!="New"||this._hasKey())},_hasKey:function(){return this._keyFields&&this._keyFields.length>0},_rowIsSelected:function(n){if(!this._hasKey())return this.get_isModal()&&this.get_isForm();var t=this._rows[n];return this.rowIsSelected(t)},rowIsSelected:function(n){var u=this._keyFields,f=this._selectedKey,t;if(n&&u.length==f.length&&u.length){if(n==this._mergedRow)return!0;for(t=0;t<u.length;t++){var e=u[t],i=f[t],r=n[e.Index];if(e.Type.startsWith("DateTime")){if(!(i||r))return!1;i=i.toString();r=r.toString()}if(i!=r&&!(r==null&&String.isNullOrEmpty(i)))return!1}return!0}return!1},_get_template:function(n){return this.get_isDataSheet()?null:$get(this.get_controller()+"_"+this.get_viewId()+(n?"_"+n:""))},_renderTemplate:function(n,t,i,r,u){for(var e=typeof n=="string"?n:n.innerHTML,c=/([\s\S]*?)\{([\w\d]+)(\:([\S\s]+?)){0,1}\}/g,h=0,f=c.exec(e),o,s;f;)h=f.index+f[0].length,t.append(f[1]),o=this.findField(f[2]),o?f[4]&&f[4].length>0?t.appendFormat("{0:"+f[4]+"}",i[o.Index]):this._renderItem(t,o,i,r,u,null,null,null,!0):(s=Web.DataView.find(f[2]),s&&(this._embeddedViews||(this._embeddedViews=[]),Array.add(this._embeddedViews,{view:s}),t.appendFormat('<div id="v_{0}" class="EmbeddedViewPlaceholder"><\/div>',s.get_cookie().replace(/-/g,"")))),f=c.exec(e);h<e.length&&t.append(e.substring(h))},_renderNewRow:function(n){var e,o,s,u,t;if(this.get_isInserting()){var r=this.get_isDataSheet(),l=this._actionColumn&&!r,f=this._get_focusedCell();if(f||(f={colIndex:0}),e=r?null:this._gridTemplates.New,n.appendFormat('<tr class="Row Selected{0}{1}">',e?" InlineFormRow":"",r?" Inserting":""),o=this.multiSelect(),o&&n.append('<td class="Cell Toggle First">&nbsp;<\/td>'),s=this.get_showIcons(),s&&n.appendFormat('<td class="Cell Icons{0}"><span>&nbsp;<\/span><\/td>',o?"":" First"),this.get_isDataSheet()&&n.appendFormat('<td class="Cell Gap"><div class="Icon"><\/div><\/td>',!o&&!s?" First":""),l&&n.append('<td class="Cell ActionColumn">&nbsp;<\/td>'),u=this._newRow?this._newRow:[],this._mergeRowUpdates(u),this._updateVisibility(u),e)n.appendFormat('<td class="Cell" colspan="{0}">',this.get_fields().length),this._renderTemplate(e,n,u,!0,!0),n.append("<\/td>");else for(t=0;t<this._fields.length;t++){var i=this._fields[t],h=this._allFields[i.AliasIndex],c="";r&&(this._editing=f&&f.colIndex==i.ColIndex,this._editing||(c=String.format(" onclick=\"$find('{0}')._dataSheetCellFocus(event,-1,{1})\"",this.get_id(),t)));n.appendFormat('<td class="Cell {0} {1}Type{2}{3}"{4}>',h.Name,h.Type,t==0?" FirstColumn":"",t==this._fields.length-1?" LastColumn":"",c);i.ReadOnly||n.appendFormat('<div class="Error" id="{0}_Item{1}_Error" style="display:none"><\/div>',this.get_id(),i.Index);this._renderItem(n,i,u,!i.OnDemand,null);this._editing=null;n.append("<\/td>")}n.append("<\/tr>");r||this._renderActionButtons(n,"Bottom","Row")}},_iconClicked:function(n){this.get_isDataSheet()||this.get_lookupField()!=null||this._icons&&this._icons[n]=="Attachment"&&(this._lastClickedIcon="Attachment",this.set_autoSelectFirstRow(!0),this._autoSelect(n))},_renderRows:function(n,t,i){var c=this.get_lookupField()!=null,l=this.get_isDataSheet(),nt=!c&&this._actionColumn&&!l,vt=nt?this.get_actionGroups("ActionColumn",!0):null,yt=this._enumerateExpressions(Web.DynamicExpressionType.Any,Web.DynamicExpressionScope.ViewRowStyle,this.get_viewId()),w,tt,b,r,u,a,o,k,ut,d,g,v,y,at;for(n.append('<tr class="HeaderRow">'),w=this.get_showIcons(),i&&(n.appendFormat('<th class="Toggle First"><input type="checkbox" onclick="$find(&quot;{0}&quot;).toggleSelectedRow()" id="{0}_ToggleButton"/><\/th>',this.get_id()),this._multipleSelection=!1),w&&n.appendFormat('<th class="Icons{0}">&nbsp;<\/th>',i?"":" First"),l&&n.appendFormat('<th class="Gap{0}">&nbsp;<\/th>',!i&&!w?" First":""),nt&&n.appendFormat('<th class="FieldHeaderSelector ActionColumn"><span>{0}<\/span><\/th>',this._actionColumn),tt=this.get_sortExpression(),b=tt?tt.match(/^\s*(\w+)((\s+(asc|desc))|(\s*(,|$)))/i):null,r=0;r<this._fields.length;r++)u=this._fields[r],a=u.Name,u=this._allFields[u.AliasIndex],u.Name==a&&(a=""),n.appendFormat('<th class="FieldHeaderSelector {4} {0} {1}Type{2}{3}"',u.Name,u.Items.length>0?"String":u.Type,r==0?" FirstColumn":"",r==this._fields.length-1?" LastColumn":"",a),(u.AllowSorting||u.AllowQBE)&&n.appendFormat(' onmouseover="$showHover(this,\'{0}$FieldHeaderSelector${1}\',\'FieldHeaderSelector\')" onmouseout="$hideHover(this)" onclick="$toggleHover()"',this.get_id(),r),n.append(">"),u.AllowSorting?(n.appendFormat('<a href="#" onclick="$find(\'{0}\').sort(\'{1}\');$preventToggleHover();return false" title="{3}" onfocus="$showHover(this,\'{0}$FieldHeaderSelector${4}\',\'FieldHeaderSelector\',1)" onblur="$hideHover(this)" tabindex="{5}">{2}<\/a>',this.get_id(),u.Name,u.HeaderText,String.format(Web.DataViewResources.HeaderFilter.SortBy,u.HeaderText),r,$nextTabIndex()),b&&b[1]==u.Name&&n.append(String.format('<span class="{0}">&nbsp;<\/span>',b[4]?b[4].toLowerCase()=="asc"?"SortUp":"SortDown":"SortUp")),this.filterOf(u)!=null&&n.append('<span class="Filter">&nbsp;<\/span>')):n.appendFormat("<span>{0}<\/span>",u.HeaderText),n.append("<\/th>");n.append("<\/tr>");var e=this._get_focusedCell(),s=this.get_isEditing(),ft=this.get_isInserting(),it=this._lastSelectedRowIndex;this._gridTemplates||(o={Default:this._get_template(),Edit:this._get_template("edit"),New:this._get_template("new")},o.Default&&(o.Default=o.Default.innerHTML),o.Edit=o.Edit?o.Edit.innerHTML:o.Default,o.New=o.New?o.New.innerHTML:o.Default,this._gridTemplates=o);var rt=l?null:this._gridTemplates.Edit,et=l?null:this._gridTemplates.Default,h=null;this._registerRowSelectorItems();var pt=this.get_showRowNumber(),ot=!1;for(r=0;r<this.get_rows().length;r++){var p=this.get_rows()[r],st=" "+this._evaluateJavaScriptExpressions(yt,p,!0),f=this._rowIsSelected(r);if(f&&(ot=!0),f&&(this._selectedRowIndex=r),k=null,ut="",i&&(d=Array.indexOf(this._selectedKeyList,this._createRowKey(r))!=-1,d&&(this._multipleSelection=!0),k=String.format('<td class="Cell Toggle First"><input type="checkbox" id="{0}_CheckBox{1}" onclick="$find(&quot;{0}&quot;).toggleSelectedRow({1})"{2} class="MultiSelect{3}"/><\/td>',this.get_id(),r,d?' checked="checked"':null,d?" Selected":""),d&&(ut=" MultiSelectedRow")),g=w?String.format('<td class="Cell Icons {0}{1}"><span onclick="$find(\'{3}\')._iconClicked({4});">{2}<\/span><\/td>',this._icons?this._icons[r]:"",i?"":" First",pt?this.get_pageSize()*this.get_pageIndex()+r+1+(this._pageOffset?this._pageOffset:0):"&nbsp;",this.get_id(),r):"",l&&(g+=String.format('<td class="Cell Gap{2}" onclick="$find(\'{0}\')._dataSheetCellFocus(event,{1},-1)"><div class="Icon"><\/div><\/td>',this.get_id(),r,!i&&!w?" First":"")),nt&&(g+=this._renderActionColumnCell(p,r,f,vt)),s&&f&&(this._mergeRowUpdates(p),this._updateVisibility(p)),f&&(s&&rt||et))n.appendFormat('<tr id="{0}_Row{1}" class="{2}Row{3} Selected{7}">{5}{6}<td class="Cell" colspan="{4}">',this.get_id(),r,r%2==0?"":"Alternating"," InlineFormRow",this.get_fields().length,k,g,s?" Editing":""),this._renderTemplate(s&&rt?rt:et,n,p,!0,!0),n.append("<\/td>");else for(n.appendFormat('<tr id="{0}_Row{1}" class="{2}Row{3}{4}{7}" {6}>',this.get_id(),r,r%2==0?"":"Alternating",f?" Selected"+st:st,ut,t?"":" ReadOnlyRow",l&&!c?"":"onmouseover=\"$(this).addClass('Highlight');\" onmouseout=\"$(this).removeClass('Highlight')\"",f&&s?" Editing":""),k&&n.append(k),n.append(g),j=0;j<this._fields.length;j++){u=this._fields[j];v=this._allFields[u.AliasIndex];a=u.Name==v.Name?"":u.Name;e&&(this._editing=s&&e.rowIndex==r&&e.colIndex==u.ColIndex);y=j==0&&t;y&&(h=Web.HoverMonitor.Families[String.format("{0}$RowSelector${1}",this.get_id(),r)],h&&h.items.length!=0||(y=!1));var ht=j==0?" FirstColumn":"",ct=String.format(" onclick=\"$find('{0}')._{3}CellFocus(event,{1},{2})\"",this.get_id(),r,j,l&&!c?"dataSheet":"gridView"),lt=j==this._fields.length-1?" LastColumn":"";y&&!c||f&&s||u.OnDemand&&f?n.appendFormat('<td class="Cell {5} {0} {1}Type{2}{4}"{3}>',v.Name,u.Items.length>0?"String":v.Type,ht,f&&s&&(!l||e&&e.colIndex==u.ColIndex)?"":ct,lt,a):n.appendFormat('<td class="Cell {7} {2} {3}Type{4}{6}" style="cursor:default;"{5}>',this.get_id(),r,v.Name,v.Type=="Byte[]"?"Binary":u.Items.length>0?"String":v.Type,ht,ct,lt,a);f&&s&&!u.ReadOnly&&n.appendFormat('<div class="Error" id="{0}_Item{1}_Error" style="display:none"><\/div>',this.get_id(),u.Index);y&&(!c&&h&&h.items.length>1&&n.appendFormat('<div id="{0}_RowSelector{1}" class="RowSelector" onmouseover="$showHover(this, \'{0}$RowSelector${1}\', \'RowSelector\')" onmouseout="$hideHover(this)" onclick="$toggleHover()">',this.get_id(),r),f&&s||(at=c||!h||h.items.length==1?"":String.format(" onfocus=\"$showHover(this, '{0}$RowSelector${1}', 'RowSelector', 1)\" onblur=\"$hideHover(this)\" ",this.get_id(),r),c?n.appendFormat('<a href="javascript:" onclick="return false" tabindex="{0}">',$nextTabIndex()):n.appendFormat('<a href="#" onclick="$hoverOver(this, 2);$find(\'{0}\').executeAction(\'Grid\',-1,{1});$preventToggleHover();return false" tabindex="{2}"{3}>',this.get_id(),r,$nextTabIndex(),at)));this._renderItem(n,u,p,f,null,y);y&&!s&&(f&&s||n.append("<\/a>"),!c&&h&&h.items.length>1&&n.append("<\/div>"));n.append("<\/td>");e&&(this._editing=null)}n.append("<\/tr>");f&&e==null&&this._renderActionButtons(n,"Bottom","Row");ft&&it==r&&(it=-2,this._renderNewRow(n));this._syncFocusedCell&&e&&f&&(e.rowIndex=r)}ft&&it!=-2&&this._renderNewRow(n);this._saveAndNew&&(this._saveAndNew=!1,this._syncFocusedCell?this.newDataSheetRow():(e=this._get_focusedCell(),e&&(e.colIndex=0,this._moveFocusToNextRow(e,this.get_pageSize()))));this._syncFocusedCell=!1;ot||(this._selectedRowIndex=null)},_renderActionColumnCell:function(n,t,i,r){var c,l,u,s,f,h,e,o,a;for(this._clonedRow=n,i||(c=this.get_lastCommandName(),l=this.get_lastCommandArgument(),this.set_lastCommandName("Select"),this.set_lastCommandArgument(null)),u=new Sys.StringBuilder,u.append('<td class="Cell ActionColumn">'),s=!0,f=0;f<r.length;f++)for(h=r[f],e=0;e<h.Actions.length;e++)o=h.Actions[e],this._isActionAvailable(o)&&(s?s=!1:u.append('<span class="Divider">&nbsp;<\/span>'),u.appendFormat('<a href="javascript:" onclick="var dv=$find(\'{0}\');dv.executeAction(\'ActionColumn\',{2},{4},{3});return false;" class="{6}"><span class="Outer"><span class="Inner"><span class="Self" title="{5}">{1}<\/span><\/span><\/span><\/a>',this.get_id(),Web.DataView.htmlEncode(o.HeaderText),e,f,t,Web.DataView.htmlEncode(o.Description),o.CssClass));return s&&u.append("&nbsp;"),u.append("<\/td>"),a=u.toString(),u.clear(),this._clonedRow=null,i||(this.set_lastCommandName(c),this.set_lastCommandArgument(l)),a},extension:function(){var n=null,r=Web.DataView.Extensions,t,i,u;return r&&(t=this.get_viewType(),i=this._extensions,i==null&&(i=this._extensions={}),n=i[t],n==null&&(u=r?r[t]:null,n=this._extensions[t]=u?new u(this):0,n&&n.initialize())),n},_renderGridView:function(n){var o,t,r,i,u,f,e;if(this._renderViewDescription(n),this._renderActionBar(n),this._renderSearchBar(n),o=this.get_showPager(),t=this.extension(),this._renderPager(n,"Top"),this.get_isChart()){for(this._renderInfoBar(n),this._sortingDisabled=!1,r=!1,i=0;i<this._fields.length;i++)u=this._fields[i],u.Aggregate!=0?this._sortingDisabled=!0:r||(r=!0,this.set_sortExpression(null),this.set_sortExpression(u.Name));t||n.appendFormat('<tr class="ChartRow"><td colspan="{1}" class="ChartCell"><img id="{0}$Chart" class="Chart" onload="if(this.readyState==\'complete\'){{this.style.height=\'\';_body_performResize()}}"/><\/td><\/tr>',this.get_id(),this._get_colSpan())}else f=this._hasKey(),e=this.multiSelect()&&f,this.get_searchOnStart()||(this._renderInfoBar(n),t||this._renderRows(n,f,e)),t||(this._renderAggregates(n,e),this._renderNoRecordsWhenNeeded(n));t||this._renderPager(n,"Bottom")},_renderAggregates:function(n,t){var e=this.get_aggregates(),f,i,r,u,o;if(this._totalRowCount!=0&&e!=null){for(n.append('<tr class="AggregateRow">'),t&&n.append('<td class="Aggregate">&nbsp;<\/td>'),this.get_showIcons()&&n.append('<td class="Aggregate">&nbsp;<\/td>'),this.get_isDataSheet()&&n.append('<td class="Aggregate">&nbsp;<\/td>'),this._actionColumn&&n.append('<td class="Aggregate">&nbsp;<\/td>'),f=0;f<this.get_fields().length;f++)i=this.get_fields()[f],i.Aggregate==0?n.append('<td class="None">&nbsp;<\/td>'):(r=e[i.Index],r=r==null?Web.DataViewResources.Data.NullValue:i.format(r),u=this._allFields[i.AliasIndex],u.IsMirror&&(r=e[i.AliasIndex]),o=Web.DataViewResources.Grid.Aggregates[Web.DataViewAggregates[i.Aggregate]],n.appendFormat('<td class="Aggregate {0} {1}Type" title="',u.Name,u.Type),n.appendFormat(o.ToolTip,u.HeaderText),n.append('">'),n.appendFormat(o.FmtStr,r),n.append("<\/td>"));n.append("<\/tr>")}},_renderSearchBar:function(n){this.get_showSearchBar()&&__tf==4&&(this._searchBarInitialized=!1,n.appendFormat('<tr class="SearchBarRow" id="{0}$SearchBar" style="{2}"><td colspan="{1}" class="SearchBarCell" id="{0}$SearchBarContent">Search bar goes here.<br/><br/><br/><br/><\/td><\/tr>',this.get_id(),this._get_colSpan(),this.get_searchBarIsVisible()?"":"display:none"))},_renderNoRecordsWhenNeeded:function(n){if(this._totalRowCount==0){var t=this.get_isDataSheet()&&this._keyFields.length>0&&this.executeActionInScope(["Row","ActionBar"],"New",null,null,!0)?String.format(' <a href="javascript:" class="NewRowLink" onclick="$find(\'{0}\').newDataSheetRow();return false;" title="{2}">{1}<\/a>',this.get_id(),Web.DataViewResources.Grid.NewRowLink,Web.DataViewResources.Lookup.GenericNewToolTip):"";n.appendFormat('<tr class="Row NoRecords"><td colspan="{0}" class="Cell">{1}{2}<\/td><\/tr>',this._get_colSpan(),Web.DataViewResources.Data.NoRecords,t)}},_attachBehaviors:function(){if(!$app.mobile){this._detachBehaviors();this._attachFieldBehaviors();var n=this.get_quickFindElement();n&&$addHandlers(n,this._quickFindHandlers,this)}},_get:function(n,t){return t==null?$get(this.get_id()+n):$get(this.get_id()+n+t)},_attachTimeOptions:function(n,t){var u=$create(Web.AutoComplete,{completionInterval:500,contextKey:"",delimiterCharacters:"",id:this.get_id()+"_AutoComplete$Time"+n.Index,minimumPrefixLength:n.AutoCompletePrefixLength,typeCssClass:"AutoComplete"},null,null,t),r,e;Sys.UI.DomElement.addCssClass(u._completionListElement,"Time");var o=Sys.CultureInfo.CurrentCulture.dateTimeFormat,i=null,f=n.DataFormatString&&n.DataFormatString.replace(/\W/g,"_")||"Default";if(n.Type=="TimeSpan"){if($app._timeSpanOptions||($app._timeSpanOptions={}),i=$app._timeSpanOptions[f],!i){for(i=[],r=new Date,e=n.DataFormatString||"{0:HH:mm}",r.setHours(0,0,0,0);i.length<96;)Array.add(i,String.localeFormat(e,r)),r.setMinutes(r.getMinutes()+15);$app._timeSpanOptions[f]=i}}else if(i=Web.DataView._timeOptions,!i){for(i=[],r=new Date,r.setHours(r.getHours(),0,0,0);i.length<48;)Array.add(i,String.localeFormat("{0:"+o.ShortTimePattern+"}",r)),r.setMinutes(r.getMinutes()+30);Web.DataView._timeOptions=i}return(u._cache=[])["%"]=i,u},_executeClientEditorFactories:function(n,t,i){var s=t==null?n.Editor:n.ClientEditor,f,u,o,h;if(!String.isNullOrEmpty(s))for(f=s.split(Web.DataView._simpleListRegex),u=0;u<f.length;u++){var c=f[u],e=c.replace(/\W/g,"$"),r=Web.DataView.EditorFactories[e];if(r==null){try{r=eval(String.format('typeof {0}!="undefined"?new {0}():""',e))}catch(l){r=""}Web.DataView.EditorFactories[e]=r}if(t==null)return r!="";if(r!=""){if(!i&&Web.DataView._customInputElements.indexOf(t.id)<0)return;if(o=this.get_viewType(),h=i?r.attach(t,o):r.detach(t,o),h)return i?Array.add(Web.DataView._customInputElements,t.id):Array.remove(Web.DataView._customInputElements,t.id),!0}}return!1},_attachFieldBehaviors:function(){var u,e,o;if(this.get_isEditing())for(u=0;u<this.get_fields().length;u++){var n=this.get_fields()[u],t=this._get("_Item",n.Index),i=null;if(t&&!n.ReadOnly&&!this._executeClientEditorFactories(n,t,!0)){if(t.tagName=="TEXTAREA"&&n.Len>0&&(t.setAttribute("maxlength",n.Len),$addHandler(t,"keyup",this._checkMaxLengthHandler),$addHandler(t,"blur",this._checkMaxLengthHandler)),!String.isNullOrEmpty(n.Mask)){var r=Sys.CultureInfo.CurrentCulture,f=r.dateTimeFormat.ShortDatePattern.toUpperCase().split(r.dateTimeFormat.DateSeparator),s=$create(AjaxControlToolkit.MaskedEditBehavior,{CultureAMPMPlaceholder:r.dateTimeFormat.AMDesignator+";"+r.dateTimeFormat.PMDesignator,CultureCurrencySymbolPlaceholder:r.numberFormat.CurrencySymbol,CultureDateFormat:f[0].substring(0,1)+f[1].substring(0,1)+f[2].substring(0,1),CultureDatePlaceholder:r.dateTimeFormat.DateSeparator,CultureDecimalPlaceholder:r.numberFormat.NumberDecimalSeparator,CultureName:r.name,CultureThousandsPlaceholder:r.numberFormat.NumberGroupSeparator,CultureTimePlaceholder:r.dateTimeFormat.TimeSeparator,DisplayMoney:n.DataFormatString=="{0:c}",Mask:n.Mask,MaskType:n.MaskType,ClearMaskOnLostFocus:n.MaskType>0,id:this.get_id()+"_MaskedEdit"+n.Index},null,null,t);n.MaskType==2&&s.set_InputDirection(1);Array.add(n.Behaviors,s)}n.Type.startsWith("Date")?(i=$create(AjaxControlToolkit.CalendarBehavior,{id:this._get("_Calendar",n.Index)},null,null,t),i.set_format((n.DateFmtStr?n.DateFmtStr:n.DataFormatString).match(/\{0:([\s\S]*?)\}/)[1]),e=$get(t.id+"_Button"),e&&i.set_button(e),n.TimeFmtStr&&(t=this._get("_Item$Time",n.Index),t&&(Array.add(n.Behaviors,i),i=this._attachTimeOptions(n,t)))):n.Type=="TimeSpan"?i=this._attachTimeOptions(n,t):t.type=="text"&&n.AutoCompletePrefixLength>0?i=$create(Web.AutoComplete,{completionInterval:500,contextKey:String.format("{0},{1},{2}",this.get_controller(),this.get_viewId(),n.Name),delimiterCharacters:",;",id:this.get_id()+"_AutoComplete"+n.Index,minimumPrefixLength:n.AutoCompletePrefixLength,serviceMethod:"GetCompletionList",servicePath:this.get_servicePath(),useContextKey:!0,typeCssClass:"AutoComplete"},null,null,t):n.ItemsStyle=="AutoComplete"&&(o=this._allFields[n.AliasIndex],t=this._get("_Item",o.Index),t&&t.type=="text"&&(i=$create(Web.AutoComplete,{completionInterval:500,contextKey:String.format("Field:{0},{1}",this.get_id(),o.Name),delimiterCharacters:"",id:this.get_id()+"_AutoComplete"+n.Index,minimumPrefixLength:n.AutoCompletePrefixLength==0?1:n.AutoCompletePrefixLength,serviceMethod:"GetPage",servicePath:this.get_servicePath(),useContextKey:!0,fieldName:n.Name,enableCaching:!1,typeCssClass:"Lookup"},null,null,t)));i&&Array.add(n.Behaviors,i)}}},_detachBehaviors:function(){var u,n,t,r;if(!$app.mobile&&(u=this.get_quickFindElement(),u&&$clearHandlers(u),this.get_fields()!=null))for(i=0;i<this.get_fields().length;i++)if(n=this.get_fields()[i],t=this._get("_Item",n.Index),!t||!this._executeClientEditorFactories(n,t,!1)){for(n.Len>0&&n.Rows>1&&t&&t.tagName=="TEXTAREA"&&t._events&&($removeHandler(t,"keyup",this._checkMaxLengthHandler),$removeHandler(t,"blur",this._checkMaxLengthHandler)),n._lookupModalBehavior!=null&&(n._lookupModalBehavior.dispose(),n._lookupModalPanel.parentNode.removeChild(n._lookupModalPanel),delete n._lookupModalPanel,n._lookupModalBehavior=null),n._lookupDataControllerBehavior!=null&&(n._lookupDataControllerBehavior.dispose(),n._lookupDataControllerBehavior=null),r=0;r<n.Behaviors.length;r++)n.Behaviors[r].dispose();Array.clear(n.Behaviors);n.Editor&&(Web.DataView.Editors[n.EditorId]=null)}},_registerDataTypeFilterItems:function(n,t,i,r,u){for(var f,o,e=null,s=0;s<i.length;s++)if(f=i[s],f){if(!f.Hidden&&(!u.SearchOptions||Array.indexOf(u.SearchOptions,f.Function)>=0)&&(e=new Web.Item(n,f.Prompt?f.Text+"...":f.Text),t.addChild(e),f.List?this._registerDataTypeFilterItems(n,e,f.List,r,u):f.Prompt?e.set_script('$find("{0}").showFieldFilter({1},"{2}","{3}")',this.get_id(),u.Index,f.Function,f.Text):e.set_script('$find("{0}").applyFieldFilter({1},"{2}")',this.get_id(),u.Index,f.Function),r&&f.Function==r))for(o=e;o;)o.set_selected(!0),o=o.get_parent()}else u.SearchOptions||(e=new Web.Item(n),t.addChild(e))},_registerFieldHeaderItems:function(n,t,i,r){var it=n==null?0:n,rt=n==null?this.get_fields().length-1:n,v=this.get_sortExpression(),y,p,w,k,d,u,b,g,c,nt;for(v&&(v=v.match(/^(\w+)\s+(asc|desc)/)),y=it;y<=rt;y++){var e=null,o=[],h=t?t:String.format("{0}$FieldHeaderSelector${1}",this.get_id(),y),l=this.get_fields()[y],f=this._allFields[l.AliasIndex];if(!r||f.Aggregate==0){if(f.AllowSorting||f.AllowQBE){p=Web.DataViewResources.HeaderFilter.GenericSortAscending;w=Web.DataViewResources.HeaderFilter.GenericSortDescending;switch(f.FilterType){case"Text":p=Web.DataViewResources.HeaderFilter.StringSortAscending;w=Web.DataViewResources.HeaderFilter.StringSortDescending;break;case"Date":p=Web.DataViewResources.HeaderFilter.DateSortAscending;w=Web.DataViewResources.HeaderFilter.DateSortDescending}if(k=f.AllowSorting&&!this._sortingDisabled,k&&(d=v&&v[1]==f.Name,u=new Web.Item(h,p),d&&v[2]=="asc"?u.set_selected(!0):u.set_cssClass("SortAscending"),u.set_script('$find("{0}").sort("{1} asc")',this.get_id(),f.Name),Array.add(o,u),u=new Web.Item(h,w),d&&v[2]=="desc"?u.set_selected(!0):u.set_cssClass("SortDescending"),u.set_script('$find("{0}").sort("{1} desc")',this.get_id(),f.Name),Array.add(o,u)),f.AllowQBE&&(e=this.filterOf(f),k&&Array.add(o,new Web.Item),u=new Web.Item(h,String.format(Web.DataViewResources.HeaderFilter.ClearFilter,f.HeaderText)),u.set_cssClass("FilterOff"),e||u.set_disabled(!0),u.set_script('$find("{0}").applyFilterByIndex({1},-1)',this.get_id(),l.AliasIndex),Array.add(o,u),b=null,__designer()||(g=Web.DataViewResources.Data.Filters[f.FilterType],f.Items.length==0&&(u=new Web.Item(h,g.Text),Array.add(o,u),b=this.get_fieldFilter(f,!0),this._registerDataTypeFilterItems(h,u,g.List,b,f)),f.FilterType!="Boolean"&&(!f.SearchOptions||Array.indexOf(f.SearchOptions,"$in")>=0)&&f.AllowMultipleValues!=!1&&(u=new Web.Item(h,Web.DataViewResources.HeaderFilter.CustomFilterOption),e&&e.match(/\$(in|out)\$/)?u.set_selected(!0):u.set_cssClass("CustomFilter"),u.set_script('$find("{0}").showCustomFilter({1})',this.get_id(),l.AliasIndex),Array.add(o,u))),l.AllowSamples!=!1))if(l._listOfValues)for(e&&e.startsWith("=")&&(e=e.substring(1),e.endsWith('\0')&&(e=e.substring(0,e.length-1))),c=0;c<l._listOfValues.length;c++){c==0&&Array.add(o,new Web.Item);var a=l._listOfValues[c],tt=!1,s=a;a==null?s=Web.DataViewResources.HeaderFilter.EmptyValue:f.Items.length>0?(u=this._findItemByValue(f,a),s=u[1]):f.Type=="String"&&a.length==0?s=Web.DataViewResources.HeaderFilter.BlankValue:String.isNullOrEmpty(f.DataFormatString)||(s=f.Type.startsWith("DateTime")?String.localeFormat("{0:d}",a):f.format(a));a=this.convertFieldValueToString(f,a);tt=b=="="&&e&&a==e;s.length>Web.DataViewResources.HeaderFilter.MaxSampleTextLen&&(s=s.substring(0,Web.DataViewResources.HeaderFilter.MaxSampleTextLen)+"...");typeof s!="string"&&(s=s.toString());u=new Web.Item(h,s);tt&&u.set_selected(!0);u.set_script("$find('{0}').applyFilterByIndex({1},{2});",this.get_id(),l.AliasIndex,c);u.set_group(1);Array.add(o,u)}else(!f.SearchOptions||Array.indexOf(f.SearchOptions,"=")>=0)&&(u=new Web.Item(h,Web.DataViewResources.HeaderFilter.Loading),u.set_dynamic(!0),u.set_script('$find("{0}")._loadListOfValues("{1}","{2}","{3}")',this.get_id(),h,l.Name,f.Name),Array.add(o,u))}if(t){for(u=new Web.Item(t,f.HeaderText),Array.add(i,u),c=0;c<o.length;c++)nt=o[c],u.addChild(nt);nt.get_selected()&&u.set_selected(!0);e&&u.set_selected(!0)}else $registerItems(h,o,Web.HoverStyle.Click,Web.PopupPosition.Right,Web.ItemDescriptionStyle.ToolTip)}}},_get_specialAction:function(n){if(!this._specialActions)return null;var i=this._specialActions[n+"Text"],t=this._specialActions[n+"Script"];return String.isNullOrEmpty(t)?null:{text:i,script:t}},_registerSpecialAction:function(n,t,i,r){if(!this._specialActions.PrintText&&n.CommandName.match(/^Report/)){if(r==null&&!this._isActionAvailable(n))return;this._specialActions.PrintText=n.HeaderText;this._specialActions.PrintScript=String.format("$find('{0}').executeAction('ActionBar',{1},-1,{2})",this.get_id(),i,t)}else if(n.CssClass=="AttachIcon"){if(r==null&&!this._isActionAvailable(n))return;this._specialActions.AnnotateText=n.HeaderText;this._specialActions.AnnotateScript=String.format("$find('{0}').executeAction('ActionBar',{1},0,{2})",this.get_id(),i,t)}},_registerActionBarItems:function(){var o=this.get_actionGroups("ActionBar"),s=this.get_isChart(),r,u,i,f,n,t,e;for(s&&!this.get_showViewSelector()&&(r=String.format("{0}${1}$ActionGroup$Chart",this.get_id(),this.get_viewId()),u=[],this._registerFieldHeaderItems(null,r,u,!0),$registerItems(r,u,Web.HoverStyle.ClickAndStay,Web.PopupPosition.Left,Web.ItemDescriptionStyle.None)),this._specialActions={PrintText:null,PrintScript:null,AnnotateText:null,AnnotateScript:null},i=0;i<o.length;i++)if(f=o[i],r=String.format("{0}${1}$ActionGroup${2}",this.get_id(),this.get_viewId(),i),f.Flat)for($unregisterItems(r),n=0;n<f.Actions.length;n++)this._registerSpecialAction(f.Actions[n],i,n);else{for(u=[],n=0;n<f.Actions.length;n++)t=f.Actions[n],this._isActionAvailable(t)&&(e=new Web.Item(r,t.HeaderText,t.Description),e.set_cssClass(t.CssClassEx+(String.isNullOrEmpty(t.CssClass)?t.CommandName+"LargeIcon":t.CssClass)),Array.add(u,e),e.set_script(String.format("$find('{0}').executeAction('ActionBar',{1},null,{2})",this.get_id(),n,i)),this._registerSpecialAction(t,i,n,!0));$registerItems(r,u,Web.HoverStyle.ClickAndStay,Web.PopupPosition.Left,Web.ItemDescriptionStyle.Inline)}Array.clear(o)},_registerViewSelectorItems:function(){for(var t,i,r=[],n=this,u=n.get_id()+"$ViewSelector",f=0;f<n.get_views().length;f++)t=n.get_views()[f],(t.Type!="Form"&&t.ShowInSelector||t.Id==n.get_viewId())&&(i=new Web.Item(u,t.Label),t.Id==this.get_viewId()&&i.set_selected(!0),i.set_script(function(t){n.executeCommand({commandName:"Select",commandArgument:t.Id})}),i.context(t),Array.add(r,i));n.get_isChart()&&(Array.add(r,new Web.Item),n._registerFieldHeaderItems(null,u,r,!0));$registerItems(u,r,Web.HoverStyle.ClickAndStay,Web.PopupPosition.Right,Web.ItemDescriptionStyle.None)},_registerRowSelectorItems:function(){var r=this.get_actions("Grid"),n,u,e,i,t,f;if(r&&r.length>0)for(n=0;n<this._rows.length;n++){for(u=[],e=String.format("{0}$RowSelector${1}",this.get_id(),n),i=0;i<r.length;i++)t=r[i],this._isActionAvailable(t,n)&&(f=new Web.Item(e,t.HeaderText,t.Description),f.set_cssClass(t.CssClassEx+(String.isNullOrEmpty(t.CssClass)?t.CommandName+"Icon":t.CssClass)+(u.length==0?" Default":"")),Array.add(u,f),f.set_script(String.format('$find("{0}").executeAction("Grid", {1},{2})',this.get_id(),i,n)));$registerItems(e,u,Web.HoverStyle.Click,Web.PopupPosition.Right,Web.ItemDescriptionStyle.ToolTip)}else for(n=0;n<this._rows.length;n++)$unregisterItems(String.format("{0}$RowSelector${1}",this.get_id(),n))},_get_searchBarSettings:function(){var f,t,c,n,g,u,nt,r,p,k,i,e,o,s,l,a,w,v,d;if(this._searchBarSettings||(this._searchBarSettings=[]),f=this._searchBarSettings[this.get_viewId()],!f){var b=[],h=[],y=this.get_filter();if(y.length>0&&!this.filterIsExternal())for(t=0;t<y.length;t++)(c=y[t].match(Web.DataView._fieldFilterRegex),n=this.findField(c[1]),n&&!this._fieldIsInExternalFilter(n))&&(g=this._allFields[n.AliasIndex],u=c[2].match(Web.DataView._filterRegex),c[2].startsWith("~")||(n._renderedOnSearchBar=!0,nt=this._findItemByValue(n,u[3]),r=u[3],r=="null"&&(r=""),p=r.match(/^([\s\S]+?)\0?$/),p&&(r=p[1]),k=n.Items.length==0?u[1]:"$in",i=this._findFilterDefByFunction(Web.DataViewResources.Data.Filters[n.FilterType].List,n.FilterType=="Boolean"&&u[3].length>1?u[3]=="%js%true"?"$true":"$false":k),i&&(e=r.match(/^(.+?)\$and\$(.+?)$/),Array.add(h,{Index:n.Index,Function:String.format("{0},{1}",i.Function,i.Prompt?"true":"false"),Value:e?e[1]:r,Value2:e?e[2]:""}))));for(o=!1,t=0;t<this._allFields.length;t++)if(n=this._allFields[t],o=n.Search==Web.FieldSearchMode.Required||n.Search==Web.FieldSearchMode.Suggested,o)break;for(t=0;t<this._allFields.length;t++)if(s=this._allFields[t],n=this._allFields[s.AliasIndex],n.AllowQBE&&n.Search!=Web.FieldSearchMode.Forbidden&&(!s.Hidden||n.Search!=Web.FieldSearchMode.Default)){if(l=!o&&h.length<Web.DataViewResources.Grid.VisibleSearchBarFields||o&&(s.Search==Web.FieldSearchMode.Required||s.Search==Web.FieldSearchMode.Suggested),!n._renderedOnSearchBar){for(a=n.Items.length==0||n.FilterType=="Boolean"?null:"$in",n.SearchOptions&&(a=n.SearchOptions[0]),w=Web.DataViewResources.Data.Filters[n.FilterType].List,v=0;v<w.length;v++)if(i=w[v],a==null||i.Function==a)break;d={Index:n.Index,Function:String.format("{0},{1}",i.Function,i.Prompt?"true":"false")};(l||this.findFieldUnderAlias(n)==n||n.VisibleOnSearchBar==null)&&Array.add(l?h:b,d);n.VisibleOnSearchBar=l}n._renderedOnSearchBar=!1}f={visibleFields:h,availableFields:b};this._searchBarSettings[this.get_viewId()]=f}return f},_lookupActionProcessing:function(n){return n!=null&&(this._standardActionProcessing=!n),this._standardActionProcessing!=!0},search:function(n){var t=this,r=[],i,f;if(n){if(n.sortExpression&&(t._sortExpression=n.sortExpression,i=t.readContext("vitals"),i&&(i.SortExpression=n.sortExpression)),n.filter){function u(n){return Date.isInstanceOfType(n)&&(n=new Date(n-n.getTimezoneOffset()*6e4)),String.format("%js%{0}",Sys.Serialization.JavaScriptSerializer.serialize(n))}$(n.filter).each(function(){var t=this,n=t.value||t.values,i=t.operator,f;i.match(/\w/)&&(i="$"+i+"$");Array.isInstanceOfType(n)?(f=new Sys.StringBuilder,$(n).each(function(n){n>0&&f.append(i=="$between$"?"$and$":"$or$");f.append(u(this))}),n=f.toString()):n=u(n);r.push(String.format("{0}:{1}{2}",t.name||t.field,i,n))});t._filter=r}n._init||t.sync()}else return t._lookupActionProcessing(!1),f=t._hasSearchAction&&t.executeActionInScope(["ActionBar","Form"],"Search",null,-1),t._lookupActionProcessing(!0),f},_toggleSearchBar:function(){this._hasSearchShortcut&&this.search()||(this.set_searchBarIsVisible(!this.get_searchBarIsVisible()),this._updateSearchBar(),this.get_searchBarIsVisible()&&(this.get_lookupField()&&this._adjustLookupSize(),this._focusSearchBar()),_body_performResize())},_renderSearchBarFieldNameOptions:function(n,t,i){var r,u,f;if(t.Search!=Web.FieldSearchMode.Required)for(r=0;r<i.availableFields.length;r++)u=i.availableFields[r],f=this._allFields[u.Index],n.appendFormat('<option value="{0}">{1}<\/option>',r,Web.DataView.htmlEncode(f.HeaderText))},_renderSearchBarFunctionOptions:function(n,t,i,r,u){for(var f,o,e=0;e<i.length;e++)if(f=i[e],f)if(f.List)this._renderSearchBarFunctionOptions(n,t,f.List,r);else if(u==null||f.Function==u){var s=String.format("{0},{1}",Web.DataView.htmlAttributeEncode(f.Function),f.Prompt?"true":"false"),c=s==r.Function?' selected="selected"':"",h=String.format('<option value="{0}"{1}>{2}{3}<\/option>',s,c,f.Prompt?"":Web.DataViewResources.Data.Filters.Labels.Equals+" ",f.Function.match(Web.DataView._keepCapitalization)?f.Text:f.Text.toLowerCase());t.SearchOptions?(o=Array.indexOf(t.SearchOptions,f.Function),o>=0&&(t.SearchOptionSet[o]=h)):n.append(h)}},_renderSearchBarField:function(n,t,i){var h=t.visibleFields[i],r=this._allFields[h.Index],b=r.Items.length==0||r.FilterType=="Boolean"?null:"$in",c=h.Function.match(/^(.+?),(true|false)$/),f,o,s,p,e,w,a,l;if(n.appendFormat('<tr id="{0}$SearchBarField${1}"><td class="Control"><select id="{0}$SearchBarName${1}" tabindex="{3}" onchange="$find(\'{0}\')._searchBarNameChanged({1})"><option value="{1}" selected="selected">{2}<\/option>',this.get_id(),i,Web.DataView.htmlEncode(r.HeaderText),$nextTabIndex()),this._renderSearchBarFieldNameOptions(n,r,t),n.append("<\/select><\/td>"),n.appendFormat('<td class="Control"><select id="{0}$SearchBarFunction${1}" class="Function" tabindex="{2}" onchange="$find(\'{0}\')._searchBarFuncChanged({1})">',this.get_id(),i,$nextTabIndex()),r.SearchOptions&&(r.SearchOptionSet=[]),this._renderSearchBarFunctionOptions(n,r,Web.DataViewResources.Data.Filters[r.FilterType].List,h,b),r.SearchOptions)for(f=0;f<r.SearchOptionSet.length;f++)n.append(r.SearchOptionSet[f]);n.append("<\/select><\/td>");var v=r.Type.startsWith("DateTime")?'<a class="Calendar" href="javascript:" onclick="return false">&nbsp;<\/a>':"",y=c[1]=="$in"||c[1]=="$notin",u=h.Value;if(y){if(o=new Sys.StringBuilder,s=!String.isNullOrEmpty(u),o.appendFormat('<table class="FilterValues{3}" cellpadding="0" cellspacing="0" onmouseover="Web.DataView.highlightFilterValues(this,true,\'Active\')" onmouseout="Web.DataView.highlightFilterValues(this,false,\'Active\')"><tr><td class="Values" valign="top"><div><a class="Link" onclick="$find(\'{0}\')._showSearchBarFilter({1},{2});return false;" tabindex="{4}" href="javascript:" onfocus="Web.DataView.highlightFilterValues(this,true,\'Focused\')" onblur="Web.DataView.highlightFilterValues(this,false,\'Focused\')" title="{5}">',this.get_id(),r.Index,i,s?"":" Empty",$nextTabIndex(),Web.DataViewResources.Data.Filters.Labels.FilterToolTip),s)for(p=u.split(/\$or\$/),f=0;f<p.length;f++)f>0&&o.append('<span class="Highlight">, <\/span>'),e=p[f],String.isJavaScriptNull(e)?e=Web.DataViewResources.HeaderFilter.EmptyValue:(e=this.convertStringToFieldValue(r,e),w=this._findItemByValue(r,e),e=w?w[1]:r.format(e)),o.append(e);else o.append(Web.DataViewResources.Lookup.SelectLink);o.appendFormat('<\/a><\/div><\/td><td class="Button{5}" valign="top"><a href="javascript:" onclick="$find(\'{0}\')._showSearchBarFilter({1},{2});return false" title="{3}" tabindex="{4}" onfocus="Web.DataView.highlightFilterValues(this,true,\'Focused\')" onblur="Web.DataView.highlightFilterValues(this,false,\'Focused\')" >&nbsp;<\/a><\/td><\/tr><\/table>',this.get_id(),s?-1:r.Index,i,s?Web.DataViewResources.Data.Filters.Labels.Clear:Web.DataViewResources.Data.Filters.Labels.FilterToolTip,$nextTabIndex(),s?" Clear":"");v=o.toString()}else String.isNullOrEmpty(u)||(u=u.split(/\$or\$/)[0]);c[2]=="true"?(typeof u!="string"||y||(u=r.format(this.convertStringToFieldValue(r,u))),n.appendFormat('<td class="Control"><input id="{0}$SearchBarValue${1}" type="{6}" class="{2} {7}" value="{3}" tabindex="{4}"/>{5}<\/td>',this.get_id(),i,r.FilterType,Web.DataView.htmlAttributeEncode(u=="null"?Web.DataViewResources.HeaderFilter.EmptyValue:u),$nextTabIndex(),v,y?"hidden":"text",r.AllowAutoComplete!=!1?" AutoComplete":"")):n.append("<td>&nbsp;<\/td>");a=$nextTabIndex();c[1]=="$between"&&(a=$nextTabIndex());n.appendFormat('<td class="FieldAction"><a href="javascript:" tabindex="{1}" title="{2}" class="Remove" onclick="$find(\'{0}\')._searchBarNameChanged({3}, true)"><span><\/span<\/a><\/td>',this.get_id(),a,Web.DataViewResources.Grid.RemoveCondition,i);n.append("<\/tr>");r.FilterType!="Text"&&c[1]=="$between"&&(l=h.Value2,typeof l=="string"&&(l=r.format(this.convertStringToFieldValue(r,l))),n.appendFormat('<tr><td colspan="2" class="Control AndLabel">{4}<\/td><td><input id="{0}$SearchBarValue2${1}" type="text" class="{2}" value="{3}" tabindex="{5}"/>{6}<\/td><td>&nbsp;<\/td><\/tr>',this.get_id(),i,r.FilterType,Web.DataView.htmlAttributeEncode(l),Web.DataViewResources.Data.Filters.Labels.And,a-1,v))},_focusSearchBar:function(n){var u=n!=null,i,t,r;u||(n=0);i=this._get_searchBarControl("Function",n);i||(n=0,i=this._get_searchBarControl("Function",0));t=this._get_searchBarControl("Value",n);t?t.type=="hidden"?(r=t.parentNode.getElementsByTagName("a")[0],r.focus(),u&&this._searchBarVisibleIndex==null&&String.isNullOrEmpty(t.value)&&r.click()):Sys.UI.DomElement.setFocus(t):i&&i.focus()},_searchBarNameChanged:function(n,t){var i,u,f,r;this._saveSearchBarSettings();i=this._get_searchBarSettings();u=i.visibleFields[n];t?Array.removeAt(i.visibleFields,n):(f=this._get_searchBarControl("Name",n),r=parseInt(f.value),i.visibleFields[n]=i.availableFields[r],Array.removeAt(i.availableFields,r));Array.insert(i.availableFields,0,u);this._renderSearchBarControls(!0);this._focusSearchBar(n)},_searchBarFuncChanged:function(n){this._saveSearchBarSettings();var t=this._get_searchBarSettings(),i=t.visibleFields[n],r=this._get_searchBarControl("Function",n);i.Function=r.value;this._renderSearchBarControls(!0);this._focusSearchBar(n)},_searchBarAddField:function(){this._saveSearchBarSettings();var n=this._get_searchBarSettings();Array.add(n.visibleFields,n.availableFields[0]);Array.removeAt(n.availableFields,0);this._renderSearchBarControls(!0);this._focusSearchBar(n.visibleFields.length-1)},_createSearchBarFilter:function(n){for(var c,i,r,a,u,f,e,o,v,y,p=Array.clone(this._filter),l=this._get_searchBarSettings(),s=[],h=!0,t=0;t<l.visibleFields.length;t++)if(c=l.visibleFields[t],i=this._allFields[c.Index],this.removeFromFilter(i),r=c.Function.match(/^(.+?),(true|false)$/),a=[],r[2]=="true"){if(u=this._get_searchBarControl("Value",t),f=this._get_searchBarControl("Value2",t),String.isBlank(u.value)&&(!f||String.isBlank(f.value))&&i.Search!=Web.FieldSearchMode.Required)continue;if(r[1]=="$in"||r[1]=="$notin"){Array.add(s,{Index:i.Index,Function:r[1],Values:[u.value]});continue}if(String.isBlank(u.value)){if(n)continue;else alert(Web.DataViewResources.Validator.RequiredField),Sys.UI.DomElement.setFocus(u),h=!1;break}if(e={NewValue:u.value.trim()},o=this._validateFieldValueFormat(i,e),o)if(n)continue;else{alert(o);Sys.UI.DomElement.setFocus(u);h=!1;break}else Array.add(a,i.Type.startsWith("DateTime")?u.value.trim():e.NewValue);if(r[1]=="$between"){if(String.isBlank(f.value)){if(n)continue;else alert(Web.DataViewResources.Validator.RequiredField),Sys.UI.DomElement.setFocus(f),h=!1;break}if(e={NewValue:f.value.trim()},o=this._validateFieldValueFormat(i,e),o)if(n)continue;else{alert(o);Sys.UI.DomElement.setFocus(f);h=!1;break}else Array.add(a,i.Type.startsWith("DateTime")?f.value.trim():e.NewValue)}Array.add(s,{Index:i.Index,Function:r[1],Values:a})}else Array.add(s,{Index:i.Index,Function:r[1],Values:null});if(!h)return null;for(t=0;t<l.availableFields.length;t++)c=l.availableFields[t],i=this._allFields[c.Index],this.removeFromFilter(i);for(t=0;t<s.length;t++)v=s[t],this.applyFieldFilter(v.Index,v.Function,v.Values,!0);return y=this._filter,this._filter=p,y},_executeSearch:function(n){var u=this.get_action(n),f,i,t,r,e;if(!u||u.Confirmation&&u.Confirmation.match(/_controller\s*=/))this._clearSelectedKey(),this._cancelConfirmation(),this.refreshAndResize();else for(f=Sys.Application.getComponents(),i=0;i<f.length;i++)t=f[i],Web.DataView.isInstanceOfType(t)&&t._hasSearchAction&&(r=t.get_action(t._hasSearchAction),r&&r.Confirmation&&(e=r.Confirmation.match(/_controller\s*=\s*(\w+)/),e&&e[1]==this._controller&&t.search()))},_performSearch:function(){if(!this._isBusy){this._saveSearchBarSettings();var n=this._createSearchBarFilter(!1);n&&(this.set_filter(n),this.refreshData(),this._setFocusOnSearchBar=!0);this._forgetSelectedRow(!0)}},_resetSearchBar:function(){this._isBusy||(this.clearFilter(),this._searchBarSettings[this.get_viewId()]=null,this._renderSearchBarControls(!0),this._focusSearchBar())},_get_searchBarControl:function(n,t){return $get(String.format("{0}$SearchBar{1}${2}",this.get_id(),n,t))},_saveSearchBarSettings:function(){for(var r=this._get_searchBarSettings(),n=0;n<r.visibleFields.length;n++){var t=r.visibleFields[n],f=this._get_searchBarControl("Function",n),i=this._get_searchBarControl("Value",n),u=this._get_searchBarControl("Value2",n);t.Function=f.value;i&&(i.value==Web.DataViewResources.HeaderFilter.EmptyValue?"null":i.value,t.Value=this._formatSearchField(i,t.Index));u&&(t.Value2=this._formatSearchField(u,t.Index))}},_formatSearchField:function(n,t){var i=this._allFields[t],r,u;return i.Type.startsWith("Date")?(r=Date.tryParseFuzzyDate(n.value,i.DataFormatString),r!=null&&(n.value=i.format(r))):i.Type!="String"&&(u=Number.tryParse(n.value,i.DataFormatString),u!=null&&(n.value=i.format(u))),n.value},_renderSearchBarControls:function(n){var s,i,u,t,a,f,h,e,r,o,l;if(!this._searchBarInitialized||n){for(s=$get(this.get_id()+"$SearchBarContent"),this._searchBarInitialized=!0,i=new Sys.StringBuilder,i.append('<table class="SearchBarFrame">'),u=this._get_searchBarSettings(),t=0;t<u.visibleFields.length;t++)this._renderSearchBarField(i,u,t);for(u.availableFields.length>0&&i.appendFormat('<tr><td colspan="3" class="AddConditionText"><a href="javascript:" onclick="$find(\'{0}\')._searchBarAddField();return false;">{3}<\/a><\/td><td class="FieldAction"><a href="javascript:" class="Add" tabindex="{1}" title="{2}" onclick="$find(\'{0}\')._searchBarAddField();return false;"><span><\/span><\/a><\/td>',this.get_id(),$nextTabIndex(),Web.DataViewResources.Grid.AddCondition,Web.DataViewResources.Grid.AddConditionText),i.appendFormat('<tr><td><div id="{0}$SearchBarNameStub" class="Stub"><\/div><\/td><td><div id="{0}$SearchBarFuncStub" class="Stub"><\/div><\/td><td><\/td><\/tr>',this.get_id()),i.append("<\/table>"),a=Web.DataViewResources.Grid,i.appendFormat('<div class="SearchButtons"><button onclick="$find(\'{0}\')._performSearch();return false" tabindex="{3}" class="Search">{1}<\/button><br/><button onclick="$find(\'{0}\')._resetSearchBar();return false" tabindex="{4}" class="Reset">{2}<\/button><\/div>',this.get_id(),a.PerformAdvancedSearch,Web.DataViewResources.Data.Filters.Labels.Clear,$nextTabIndex(),$nextTabIndex()),s.innerHTML=i.toString(),i.clear(),f=$get(this.get_id()+"$SearchBarNameStub"),f.style.width=f.offsetWidth+"px",f=$get(this.get_id()+"$SearchBarFuncStub"),f.style.width=f.offsetWidth+"px",h=s.getElementsByTagName("select"),t=0;t<h.length;t++)h[t].style.width="100%";for(this._searchBarExtenders||(this._searchBarExtenders=[]),t=0;t<u.visibleFields.length;t++){var v=u.visibleFields[t],y=this._allFields[v.Index],c=this._get_searchBarControl("Value",t);if(c)if(v.Function.match(/\$(in|notin),/)==null)e=this._createFieldInputExtender("SearchBar",y,c,t),e&&Array.add(this._searchBarExtenders,e);else{for(r=c;r&&r.tagName!="TR";)r=r.parentNode;for(o=0;o<r.childNodes.length;o++)r.childNodes[o].vAlign="top"}l=this._get_searchBarControl("Value2",t);l&&(e=this._createFieldInputExtender("SearchBar",y,l,t+"$2"),e&&Array.add(this._searchBarExtenders,e))}}},_updateSearchBar:function(){var r=this._get("$SearchBar"),n,t,u,i;r&&(n=this.get_searchBarIsVisible(),t=this._get("$SearchBarActivator"),t&&(n?Sys.UI.DomElement.addCssClass(t,"Activated"):Sys.UI.DomElement.removeCssClass(t,"Activated")),Sys.UI.DomElement.setVisible(r,n),n&&this._renderSearchBarControls(r),t&&(Sys.UI.DomElement.setVisible(this._get("$QuickFind"),!n),u=this._get("$SearchToggle"),u.title=this._hasSearchAction&&this._hasSearchShortcut?Web.DataViewResources.Grid.PerformAdvancedSearch:this.get_searchBarIsVisible()?Web.DataViewResources.Grid.HideAdvancedSearch:Web.DataViewResources.Grid.ShowAdvancedSearch),i=this._get("$InfoRow"),i&&(n?Sys.UI.DomElement.addCssClass(i,"WithSearchBar"):Sys.UI.DomElement.removeCssClass(i,"WithSearchBar")),this._setFocusOnSearchBar&&(this._setFocusOnSearchBar=!1,this._focusSearchBar()))},_renderSearchBarActivator:function(n){this.get_showSearchBar()&&(this.get_showQuickFind()||!this.get_searchOnStart())&&(n.appendFormat('<td class="SearchBarActivator{1}" id="{0}$SearchBarActivator"><a href="javascript:" onclick="$find(\'{0}\')._toggleSearchBar();return false;" id="{0}$SearchToggle"><span><\/span><\/a><\/td>',this.get_id(),this._hasSearchAction&&this._hasSearchShortcut?" Search":""),this.get_showQuickFind()||n.append('<td class="Divider"><div><\/div><\/td>'))},_internalRenderActionBar:function(n){var e=this.get_actionGroups("ActionBar"),o,s,h,u,r,f,c,i,t;if(n.append('<table cellpadding="0" cellspacing="0" class="Groups"><tr>'),o=this.get_isGrid(),o&&this._renderSearchBarActivator(n),o&&this.get_showQuickFind()?(s=this.get_quickFindText(),n.appendFormat('<td class="QuickFind" title="{2}" id="{0}$QuickFind"><div class="QuickFind"><table cellpadding="0" cellspacing="0"><tr><td><input type="text" id="{0}_QuickFind" value="{1}" class="{3}" tabindex="{4}"/><\/td><td class="Button"><a href="#" onclick="$find(\'{0}\').quickFind();return false;"><span>&nbsp;<\/span><\/a><\/td><\/tr><\/table><\/div><\/td>',this.get_id(),Web.DataView.htmlAttributeEncode(s),Web.DataViewResources.Grid.QuickFindToolTip,s==Web.DataViewResources.Grid.QuickFindText?"Empty":"NonEmpty",$nextTabIndex()),n.append('<td class="Divider"><div><\/div><\/td>'),this.get_lookupField()&&!String.isNullOrEmpty(this.get_lookupField().ItemsNewDataView)&&n.appendFormat('<td class="QuickCreateNew"><a href="javascript:" onclick="$find(\'{0}\').closeLookupAndCreateNew();return false;" class="CreateNew" title="{1}" tabindex="{2}><span class="Placeholder"><\/span><\/a><\/td>',this.get_id(),Web.DataViewResources.Lookup.GenericNewToolTip,$nextTabIndex())):(e.length==0||this.get_lookupField())&&n.append('<td class="Divider"><div style="visibility:hidden"><\/div><\/td>'),!this.get_lookupField())for(this._registerActionBarItems(),h=this.get_isChart()&&!this.get_showViewSelector(),h&&n.appendFormat('<td class="Group Main" onmouseover="$showHover(this,&quot;{0}${1}$ActionGroup$Chart&quot;,&quot;ActionGroup&quot;)" onmouseout="$hideHover(this)" onclick="$toggleHover()"><span class="Outer"><a href="javascript:" onfocus="$showHover(this,&quot;{0}${1}$ActionGroup$Chart&quot;,&quot;ActionGroup&quot;,2)" onblur="$hideHover(this)" tabindex="{3}" onclick="$hoverOver(this, 2);return false;">{2}<\/a><\/span><\/td>',this.get_id(),this.get_viewId(),Web.DataView.htmlEncode(this.get_view().Label),$nextTabIndex()),u=0;u<e.length;u++)if((u>0||h)&&n.append('<td class="Divider"><div><\/div><\/td>'),r=e[u],r.Flat){for(f=-1,c=-1,i=0;i<r.Actions.length;i++)t=r.Actions[i],t._isAvailable=this._isActionAvailable(t)&&!String.isNullOrEmpty(t.HeaderText),t._isFirst=!1,t._isLast=!1,t._isAvailable&&(f==-1&&(f=i),c=i);for(f>=0&&(r.Actions[f]._isFirst=!0,r.Actions[c]._isLast=!0),i=0;i<r.Actions.length;i++)t=r.Actions[i],t._isAvailable&&n.appendFormat('<td class="{7}Group FlatGroup{6}{8}{9}" onmouseover="$showHover(this,&quot;{0}${2}$ActionGroup${1}&quot;,&quot;ActionGroup&quot;)" onmouseout="$hideHover(this)" onclick="if(this._skip)this._skip=null;else $find(\'{0}\').executeAction(\'ActionBar\',{1},null,{2})" title="{10}"><span class="Outer">{5}<a href="javascript:" tabindex="{4}" onclick="this.parentNode.parentNode._skip=true;$find(\'{0}\').executeAction(\'ActionBar\',{1},null,{2});return false;" onfocus="$showHover(this,&quot;{0}${2}$ActionGroup${1}&quot;,&quot;ActionGroup&quot;,2)" onblur="$hideHover(this)">{3}<\/a><\/span><\/td>',this.get_id(),i,u,Web.DataView.htmlEncode(t.HeaderText),$nextTabIndex(),String.isNullOrEmpty(t.CssClass)?"":String.format('<span class="FlatGroupIcon {0}">&nbsp;<\/span>',t.CssClass),String.isNullOrEmpty(t.CssClass)?"":" FlatGroupWithIcon",t.CssClassEx,t._isFirst?" First":"",t._isLast?" Last":"",t.Description)}else n.appendFormat('<td class="{5}Group" onmouseover="$showHover(this,&quot;{0}${1}$ActionGroup${2}&quot;,&quot;ActionGroup&quot;)" onmouseout="$hideHover(this)" onclick="$toggleHover()"><span class="Outer"><a href="javascript:" onfocus="$showHover(this,&quot;{0}${1}$ActionGroup${2}&quot;,&quot;ActionGroup&quot;,2)" onblur="$hideHover(this)" tabindex="{4}" onclick="$hoverOver(this, 2);return false;">{3}<\/a><\/span><\/td>',this.get_id(),this.get_viewId(),u,r.HeaderText,$nextTabIndex(),r.CssClassEx);n.append("<\/tr><\/table>")},_renderActionBar:function(n){if(!this.get_showActionBar()){this._registerActionBarItems();return}n.appendFormat('<tr class="ActionRow"><td colspan="{0}"  class="ActionBar">',this._get_colSpan());n.appendFormat('<table style="width:100%" cellpadding="0" cellspacing="0"><tr><td style="width:100%" id="{0}$ActionBar">',this.get_id());this._internalRenderActionBar(n);this._registerViewSelectorItems();n.append('<\/td><td class="ViewSelectorControl">');this.get_showViewSelector()&&(n.appendFormat('<table cellpadding="0" cellspacing="0"><tr><td class="ViewSelectorLabel">{0}:<\/td><td>',Web.DataViewResources.ActionBar.View),n.appendFormat('<span class="ViewSelector" onmouseover="$showHover(this,&quot;{0}$ViewSelector&quot;,&quot;ViewSelector&quot;)" onmouseout="$hideHover(this)" onclick="$toggleHover()"><span class="Outer"><span class="Inner"><a href="javascript:" class="Link" tabindex="{2}" onfocus="$showHover(this,&quot;{0}$ViewSelector&quot;,&quot;ViewSelector&quot;,3)" onblur="$hideHover(this)">{1}<\/a><\/span><\/span><\/span>',this.get_id(),Web.DataView.htmlEncode(this.get_view().Label),$nextTabIndex()),n.append("<\/td><\/tr><\/table>"));n.append("<\/td><\/tr><\/table>");n.append("<\/td><\/tr>")},get_statusBar:function(){return this._statusBar},_renderStatusBar:function(n){n.appendFormat('<tr class="StatusBarRow" style="display:none"><td colspan="{1}" class="StatusBar" id="{0}$StatusBar"><\/td><\/tr>',this.get_id(),this._get_colSpan())},statusBar:function(){var l=this.get_statusBar(),f,r,n,e,i,u,o,s,t;if(!String.isNullOrEmpty(l))for(r=/((\w+)\.)?((\w+)\.)?(\w+):\s*(.+?)\s*\n\s*(((.+?)\s*>\s*)+)/g,n=r.exec(l);n;){if(e=this.fieldValue(n[5]),e==null&&(e="null"),(n[6]==e||n[6]=="*")&&(String.isNullOrEmpty(n[2])||n[2]==this.get_controller())&&(String.isNullOrEmpty(n[3])||n[4]==this.get_viewId())){for(r=/(\[)?\s*(.+?)\s*(\])?\s*>\s*/g,i=[],u=r.exec(n[7]);u;)Array.add(i,{Text:u[2],Current:u[1]=="["&&u[3]=="]"}),u=r.exec(n[7]);if(i.length>0&&!(__tf!=4)){for(f=new Sys.StringBuilder('<ul class="StatusBar">'),o=!1,s=!0,t=0;t<i.length;t++)if(i[t].Current){o=!0;s=!1;break}for(t=0;t<i.length;t++){var h=i[t],c=h.Current?"Current":o?"Past":s?"Future":"",a=t<i.length-1?i[t+1]:null,v="";a&&(a.Current?v=c+"ToCurrent":h.Current&&(v=a.Current?c+"ToCurrent":c+"ToFuture"));h.Current&&(o=!1,s=!0);f.appendFormat('<li class="Segment {1}{2}{3} {4}"><span class="Outer"><span class="Inner"><span class="Self">{0}<\/span><\/span><\/span><\/li>',Web.DataView.htmlEncode(h.Text),c,t==0?" First":"",t==i.length-1?" Last":"",v)}f.append("<\/ul>")}break}n=r.exec(l)}return f?f.toString():null},_updateStatusBar:function(){var i=this.get_statusBar(),t,n;String.isNullOrEmpty(i)||(n=$(this._get("$StatusBar")),n.length&&(t=this.statusBar(),t?n.html(t).parent().show():n.parent().hide()))},filterByFirstLetter:function(n){var t=this._firstLetters[0],i=this._firstLetters[n];this.applyFieldFilter(this.findField(t).Index,"$beginswith",[i])},_renderViewDescription:function(n){var c=this._firstLetters&&this._firstLetters.length>2,s=this.get_showDescription(),r,f,u,e,h,t,i,l,o;if(s||c){if(r=s?this.get_description():"",f=null,c){for(u=new Sys.StringBuilder,u.append('<div class="Letters">'),e=this.findField(this._firstLetters[0]),h=null,t=0;t<this._filter.length;t++)if(i=this._filter[t].match(Web.DataView._fieldFilterRegex),i&&i[1]==e.Name){i=i[2].match(/^\$beginswith\$(.+?)\0$/);i&&(h=this.convertStringToFieldValue(e,i[1]));break}for(l=String.format("{0} {1} ",Web.DataView.htmlAttributeEncode(e.Label),Web.DataViewResources.Data.Filters.Text.List[2].Text.toLowerCase()),t=1;t<this._firstLetters.length;t++)o=this._firstLetters[t],u.appendFormat('<a href="javascript:" onclick="$find(\'{0}\').filterByFirstLetter({1});return false;" class="Letter{5}" title="{3}{4}">{2}<\/a> ',this.get_id(),t,o,l,Web.DataView.htmlAttributeEncode(o),h==o?" Selected":"");u.append("<\/div>");f=u.toString();u.clear()}s&&String.isNullOrEmpty(r)&&(r=this.get_view().HeaderText);(!String.isNullOrEmpty(r)||this.get_lookupField()||f)&&(n.appendFormat('<tr class="HeaderTextRow"><td colspan="{0}" class="HeaderText">',this._get_colSpan()),this.get_lookupField()!=null&&n.append('<table style="width:100%" cellpadding="0" cellspacing="0"><tr><td style="padding:0px">'),n.appendFormat('<div id="{0}$HeaderText">',this.get_id()),n.append(this._formatViewText(Web.DataViewResources.Views.DefaultDescriptions[r],!0,r)),n.append("<\/div>"),f&&n.append(f),this.get_lookupField()!=null&&n.appendFormat('<\/td><td align="right" style="padding:0px"><a href="javascript:" class="Close" onclick="$find(\'{0}\').hideLookup();return false" tabindex="{2}" title="{1}">&nbsp;<\/a><\/td><\/tr><\/table>',this.get_id(),Web.DataViewResources.ModalPopup.Close,$nextTabIndex()),n.append("<\/td><\/tr>"))}},_renderInfoBar:function(n){var i=this.get_filter(),t;i.length>0&&!this.filterIsExternal()&&(t=new Sys.StringBuilder,this.get_viewType()!="Form"&&this._renderFilterDetails(t,i),this.get_viewType()=="Form"||t.isEmpty()||(n.appendFormat('<tr class="InfoRow {2}" id="{0}$InfoRow"><td colspan="{1}">',this.get_id(),this._get_colSpan(),this.get_viewType()),n.append(t.toString()),n.append("<\/td><\/tr>")),t.clear())},_findFilterDefByFunction:function(n,t){var r,i,u;for(t.endsWith("$")&&(t=t.substring(0,t.length-1)),r=0;r<n.length;r++)if(i=n[r],i)if(i.List){if(u=this._findFilterDefByFunction(i.List,t),u)return u}else if(i.Function==t)return i;return null},_renderFilterDetails:function(n,t,i){for(var s,e,f,o,y,h,p=!1,l=0;l<t.length;l++){var c=t[l].match(Web.DataView._fieldFilterRegex),a=c[1]=="_quickfind_",r=a?this._fields[0]:this.findField(c[1]);if(r&&!this._fieldIsInExternalFilter(r)){p||(i!=!1&&n.appendFormat('<a href="javascript:" onclick="$find(\'{0}\').clearFilter();return false" class="Close" tabindex="{3}" title="{2}">&nbsp;<\/a><span class="Details"><span class="Information">&nbsp;<\/span>{1} ',this.get_id(),Web.DataViewResources.InfoBar.FilterApplied,Web.DataViewResources.ModalPopup.Close,$nextTabIndex()),p=!0);for(var w=r&&this._allFields[r.AliasIndex],u=Web.DataView._filterIteratorRegex.exec(c[2]),v=!0;u&&(u[1].startsWith("~")||!(r.Index==r.AliasIndex&&r.IsPrimaryKey&&r.Hidden));){if(v?n.appendFormat('<span class="FilterElement" onclick="$find(\'{0}\').removeFromFilterByIndex({1})" title="{2}">',this.get_id(),a?-1:r.Index,a?Web.DataViewResources.Data.Filters.Labels.Clear:Web.DataView.htmlAttributeEncode(String.format(Web.DataViewResources.HeaderFilter.ClearFilter,r.Label))):n.append(", "),u[1].startsWith("~"))n.appendFormat(String.format('{0} <b class="String">{1}<\/b>',Web.DataViewResources.InfoBar.QuickFind,this.convertStringToFieldValue(r,u[3])));else if(n.appendFormat('<span class="Highlight">{0}<\/span>',w.HeaderText),s=this._findFilterDefByFunction(Web.DataViewResources.Data.Filters[r.FilterType].List,r.FilterType=="Boolean"&&u[3].length>1?u[3]=="%js%true"?"$true":"$false":u[1]),s)if(s.Prompt){if(n.appendFormat(" {0} ",s.Text.toLowerCase()),f=u[3],o=f.split(Web.DataView._listRegex),String.isJavaScriptNull(o[0])&&(o[0]=Web.DataViewResources.InfoBar.Empty),!String.isJavaScriptNull(u[2]))for(y=o[0].match(/^([\s\S]+?)\0?$/),y&&(o[0]=y[1]),f=this.convertStringToFieldValue(r,o[0]),e=this._findItemByValue(r,f),n.appendFormat("<b>{0}<\/b>",String.htmlEncode(e?e[1]:r.format(f))),h=1;h<o.length;h++)if(n.appendFormat("{0} ",u[1]=="$between$"?" "+Web.DataViewResources.Data.Filters.Labels.And:", "),f=this.convertStringToFieldValue(r,o[h]),f==null?f=Web.DataViewResources.HeaderFilter.EmptyValue:(e=this._findItemByValue(r,f),f=e?e[1]:r.format(f)),n.appendFormat('<b class="{1}">{0}<\/b>',String.htmlEncode(f)),h>5){n.append(", ..");break}}else n.appendFormat(" {0} <b>{1}<\/b>",Web.DataViewResources.Data.Filters.Labels.Equals,s.Function.match(Web.DataView._keepCapitalization)?s.Text:s.Text.toLowerCase());else{switch(u[1]){case"=":n.append(String.isJavaScriptNull(u[2])?Web.DataViewResources.InfoBar.Empty:Web.DataViewResources.InfoBar.EqualTo);break;case"<":n.append(Web.DataViewResources.InfoBar.LessThan);break;case"<=":n.append(Web.DataViewResources.InfoBar.LessThanOrEqual);break;case">":n.append(Web.DataViewResources.InfoBar.GreaterThan);break;case">=":n.append(Web.DataViewResources.InfoBar.GreaterThanOrEqual);break;case"*":n.append(u[2].startsWith("%")?Web.DataViewResources.InfoBar.Like:Web.DataViewResources.InfoBar.StartsWith)}e=this._findItemByValue(r,this.convertStringToFieldValue(r,u[3]));f=e==null?u[3]:e[1];f=String.isJavaScriptNull(u[3])||String.isBlank(f)?Web.DataViewResources.InfoBar.Empty:this.convertStringToFieldValue(r,f);n.appendFormat("<b>{0}<\/b>",String.htmlEncode(f))}u=Web.DataView._filterIteratorRegex.exec(c[2]);v=!1}v||n.append(".");n.append("<\/span> ")}}n.append("<\/span>")},_findItemByValue:function(n,t){var u=n.DynamicItems?n.DynamicItems:n.Items,i,r,f;if(u.length==0)return null;for(t=t==null?"":t.toString(),i=0;i<u.length;i++)if(r=u[i],f=r[0]==null?"":r[0].toString(),f==t)return r;return[null,this.get_isForm()?Web.DataViewResources.Data.NullValueInForms:Web.DataViewResources.Data.NullValue]},_renderPager:function(n,t){var c,u,f,e,o,s,h,l;if(this.get_showPager().indexOf(t)!=-1){if(c=this.get_isChart(),n.appendFormat('<tr class="FooterRow {2}PagerRow"><td colspan="{0}" class="Footer"><table cellpadding="0" cellspacing="0" style="width:100%"><tr><td align="left" class="Pager PageButtons{1}">',this._get_colSpan(),c?" Print":"",t),u=this.get_pageCount(),f=this.get_pageSize(),c&&(u=1,f=this._totalRowCount,e=this._get_specialAction("Print"),e&&n.appendFormat('<a href="javascript:" onclick="{1};return false;" title="{0}" class="Print"><span><\/span><\/a><\/td><td>',e.text,e.script)),u>1){var r=this._firstPageButtonIndex,a=this.get_pagerButtonCount(),v=a;for(this.get_pageIndex()>0?n.appendFormat('<a href="#" onclick="$find(\'{1}\').goToPage({0},true);return false" class="PaddedLink" tabindex="{3}">{2}<\/a>',this.get_pageIndex()-1,this.get_id(),Web.DataViewResources.Pager.Previous,$nextTabIndex()):n.appendFormat('<span class="Disabled">{0}<\/span>',Web.DataViewResources.Pager.Previous),n.appendFormat(" | {0}: ",Web.DataViewResources.Pager.Page),r>0&&n.appendFormat('<a href="#" onclick="$find(\'{1}\').goToPage(0,true);return false" class="PaddedLink" tabindex="{2}">1<\/a><a href="#" onclick="$find(\'{1}\').goToPage({0},true);return false" class="PaddedLink" tabindex="{3}">...<\/a>',r-1,this.get_id(),$nextTabIndex(),$nextTabIndex());v>0&&r<u;)r==this.get_pageIndex()?n.appendFormat('<span class="Selected">{0}<\/span>',r+1):n.appendFormat('<a href="#" onclick="$find(\'{1}\').goToPage({0},true);return false" class="PaddedLink" tabindex="{3}">{2}<\/a>',r,this.get_id(),r+1,$nextTabIndex()),r++,v--;r<=u-1&&n.appendFormat('<a href="#" onclick="$find(\'{1}\').goToPage({0},true);return false" class="PaddedLink" tabindex="{2}">...<\/a><a href="#" onclick="$find(\'{1}\').goToPage({3}-1,true);return false" class="PaddedLink" tabindex="{4}">{3}<\/a>',this._firstPageButtonIndex+a,this.get_id(),$nextTabIndex(),u,$nextTabIndex());n.append(" | ");this.get_pageIndex()<u-1?n.appendFormat('<a href="#" onclick="$find(\'{1}\').goToPage({0},true);return false" class="PaddedLink" tabindex="{3}">{2}<\/a>',this.get_pageIndex()+1,this.get_id(),Web.DataViewResources.Pager.Next,$nextTabIndex()):n.appendFormat('<span class="Disabled">{0}<\/span>',Web.DataViewResources.Pager.Next)}if(n.append('<\/td><td align="right" class="Pager PageSize">&nbsp;'),o=this.get_showPageSize(),s=this._pageSizes,o&&this._totalRowCount>f){for(n.append(Web.DataViewResources.Pager.ItemsPerPage),i=0;i<s.length;i++)i>0&&n.append(", "),f==s[i]?n.appendFormat("<b>{0}<\/b>",f):n.appendFormat('<a href="#" onclick="$find(\'{0}\').set_pageSize({1},true);return false" tabindex="{2}">{1}<\/a>',this.get_id(),s[i],$nextTabIndex());n.append(" | ")}this._totalRowCount>0&&(h=(this.get_pageIndex()+1)*f,h>this._totalRowCount&&(h=this._totalRowCount),o&&n.appendFormat(Web.DataViewResources.Pager.ShowingItems,this.get_pageIndex()*f+1,h,this._totalRowCount),l=this.multiSelect(),l&&(n.appendFormat('<span id="{0}$SelectionInfo">',this.get_id()),this._selectedKeyList.length>0&&n.appendFormat(Web.DataViewResources.Pager.SelectionInfo,this._selectedKeyList.length),n.append("<\/span>")),(o||l)&&n.append(" | "));n.appendFormat('<\/td><td align="center" class="Pager Refresh" id="{0}_Wait">',this.get_id());this.get_searchOnStart()||n.appendFormat('<a href="#" onclick="$find(\'{0}\').{3}();return false" tabindex="{2}" title="{1}"><span>&nbsp;<\/span><\/a>',this.get_id(),Web.DataViewResources.Pager.Refresh,$nextTabIndex(),this._hasSearchAction?"search":"sync");n.append("<\/td><\/tr><\/table>");n.append("<\/td><\/tr>")}},refreshAndResize:function(){this.cancelDataSheetEdit();this.goToPage(-1);delete this._viewColumnSettings},refreshData:function(){this._clearCache();this.set_pageIndex(-2);this._loadPage()},_dittoCollectedValues:function(n,t){var r,i,f,s;if(this.get_isEditing()){var e=t?new RegExp(String.format("^{0}(Length|ContentType|FileName|FullFileName)?$",t)):null,o=this._collectFieldValues(!0),u=[];for(r=0;r<o.length;r++)i=o[r],e&&i.Name.match(e)||Array.add(u,{name:i.Name,value:i.Modified?i.NewValue:i.OldValue});if(n)for(r=0;r<n.length;r++){for(i=n[r],f=0;f<u.length;f++)if(s=i.Name?i.Name:i.name,u[f].name==s){Array.removeAt(u,f);break}Array.add(u,i.Name?{name:i.Name,value:i.NewValue}:i)}this._ditto=u}},refresh:function(n,t,i){this._dittoCollectedValues(t,i);this._lastSelectedCategoryTabIndex=this.get_categoryTabIndex();n?this._render():this.goToView(this.get_viewId())},_cname:function(n){var t=this.get_viewId();return t==null&&(t="grid1"),String.format("{0}${1}${2}",this._id,t,n)},readContext:function(n){return Web.PageState.read(this._cname(n))},writeContext:function(n,t){Web.PageState.write(this._cname(n),t)},_saveViewVitals:function(){this.writeContext("vitals",{PageIndex:this.get_pageIndex(),PageSize:this.get_pageSize(),Filter:this.get_filter(),SortExpression:this.get_sortExpression(),Tag:this.get_tag()})},_restoreViewVitals:function(n){var t,u,i,r,e,h,o;if(!(n.PageIndex>=0)&&(t=this.readContext("vitals"),t!=null)&&(n.RequiresRowCount=!0,n.RequiresMetaData=!0,n.PageIndex==-1&&t.Filter&&n.Filter)){if(n.Tag=t.Tag,n.PageIndex=t.PageIndex,n.PageSize=t.PageSize,n.FilterIsExternal){for(u=n.Filter,i=0;i<t.Filter.length;i++){var f=t.Filter[i],c=f.substring(0,f.indexOf(":")),s=!1;for(r=0;r<n.Filter.length;r++)if(e=n.Filter[r],h=e.substring(0,e.indexOf(":")),h==c){s=!0;break}s||Array.add(u,f)}n.Filter=Array.clone(u)}else(n.Filter==null||n.Filter.length==0)&&(n.Filter=Array.clone(t.Filter));n.SortExpression=t.SortExpression;this.get_isDataSheet()&&this._get_focusedCell()||(o=this.readContext("GridType"),o!=null&&this.changeViewType(o))}},_useSearchParams:function(n){var t=this._paramValues,r,i,u;if(t?(this._searchParamValues=t,this._paramValues=null):t=this._searchParamValues,t){for(r=Array.clone(n.ExternalFilter),i=0;i<t.length;i++)u=t[i],Array.add(r,{Name:u.Name,Value:u.NewValue});n.ExternalFilter=r}},_forceSync:function(){this._skipSync?this._skipSync=!1:this._syncKey=this.get_selectedKey()},sync:function(n){var i,t,r;if(this._clearCache(),n!=null){for(Array.isInstanceOfType(n)||(n=[n]),i=[],t=0;t<this._keyFields.length;t++)r=this._keyFields[t],i[this._keyFields[t].Index]=n[t];this._raiseSelectedDelayed=!0;this._pendingSelectedEvent=!0;this._selectKeyByRow(i)}this._forceSync();this.refreshAndResize();this._synced=!0},_sync:function(){var n=this._viewColumnSettings;this._viewColumnSettings=[];this.sync();this._viewColumnSettings=n},_createParams:function(n){var i=this.get_lookupContext(),r=this.get_viewType(),u;String.isNullOrEmpty(r)&&(r=this.readContext("GridType"));var f=this.extension(),t={PageIndex:this.get_pageIndex(),PageSize:this.get_pageSize(),PageOffset:this.get_pageOffset(),SortExpression:this.get_sortExpression(),Filter:this.get_filter(),ContextKey:this.get_id(),Cookie:this.get_cookie(),FilterIsExternal:this._externalFilter.length>0,LookupContextFieldName:i?i.FieldName:null,LookupContextController:i?i.Controller:null,LookupContextView:i?i.View:null,LookupContext:i,Inserting:this.get_isInserting(),LastCommandName:this.get_lastCommandName(),LastCommandArgument:this.get_lastCommandArgument(),ExternalFilter:this.get_externalFilter(),Transaction:this.get_transaction(),DoesNotRequireData:this.get_searchOnStart(),LastView:this.get_lastViewId(),Tag:this.get_tag(),RequiresFirstLetters:this.get_showFirstLetters(),ViewType:r,SupportsCaching:Sys.Browser.agent!=Sys.Browser.InternetExplorer||Sys.Browser.version>7,SystemFilter:f?f.systemFilter():null,RequiresRowCount:this._requiresRowCount==!0},e=this.get_confirmContext();return e&&(u=Array.clone(t.ExternalFilter),Array.addRange(u,e.Values),t.ExternalFilter=u),this._useSearchParams(t),this._position&&(this._position.changing&&(t.PageIndex=this._position.index,t.PageSize=1,t.Filter=this._position.filter,t.SortExpression=this._position.sortExpression,t.RequiresMetaData=!0),n&&(t.Filter=this._selectedKeyFilter)),t.SyncKey=this._syncKey,this._syncKey&&(this._syncKey=null),this.useCase("$app")&&(t.RequiresMetaData=!0),t},_createArguments:function(n,t,i){var r,u,f;if(i||(i=this._collectFieldValues()),t||(t=this.get_viewId()),n.values&&(i=Array.clone(n.values)),this._paramValues&&(i=Array.clone(i),Array.addRange(i,this._paramValues),delete this._paramVlaues),r={CommandName:n.commandName,CommandArgument:n.commandArgument,Path:n.path,LastCommandName:this.get_lastCommandName(),Values:i,ContextKey:this.get_id(),Cookie:this.get_cookie(),Controller:this.get_controller(),View:t,LastView:this.get_lastViewId(),Tag:this.get_tag(),Trigger:n.trigger},r.Filter=this.get_filter(),r.SortExpression=this.get_sortExpression(),r.SelectedValues=this.get_selectedValues(),r.ExternalFilter=Array.clone(this.get_externalFilter()),r.Transaction=this.get_transaction(),n.commandName=="PopulateDynamicLookups")for(u=0;u<this._allFields.length;u++)f=this.get_contextFilter(this._allFields[u],i),f.length>0&&Array.addRange(r.ExternalFilter,f);return String.isNullOrEmpty(r.Transaction)||this.get_isModal()||this.get_filterSource()||!r.CommandName.match(/Insert|Update|Delete/)||(r.Transaction+=":complete"),r.SaveLEVs=this._allowLEVs==!0,r},_loadPage:function(){var n,t,i;(this._isBusy&&this._cancelWSRequest(),this._delayedLoading=!1,this._source)||(this.get_mode()!=Web.DataViewMode.View?(this._allFields=[{Index:0,Label:"",DataFormatString:"",AliasIndex:0,ItemsDataController:this.get_controller(),ItemsNewDataView:this.get_newViewId(),ItemsDataView:this.get_viewId(),_dataView:this,Behaviors:[],format:_field_format,isReadOnly:_field_isReadOnly,isNumber:_field_isNumber}],this._fields=this._allFields,this._render()):(this._busy(!0),this._detachBehaviors(),this._showWait(),n=this._createParams(),this._restoreViewVitals(n),t={controller:this.get_controller(),view:this.get_viewId(),request:n},i=new Web.BusinessRules(this),i.before({commandName:"Select",commandArgument:t.view}),i.dispose(),this._invoke("GetPage",t,Function.createDelegate(this,this._onGetPageComplete))))},_cancelWSRequest:function(){var n=this._wsRequest;n&&(this._wsRequest=null,n.get_executor&&!n.completed()&&(!Sys.Browser.agent==Sys.Browser.InternetExplorer||Sys.Browser.version>9)&&n.get_executor().abort())},_invoke:function(n,t,i,r){function e(o,s,h){o.get_statusCode()==0?$app.confirm(Web.DataViewResources.Data.ConnectionLost,function(){u._wsRequest=Sys.Net.WebServiceProxy.invoke(f,n,!1,t,i,e,r)},function(){u._onMethodFailed(o,s,h)}):u._onMethodFailed(o,s,h)}var u=this,f=this.get_servicePath();if(u._autoRefresh(!0),f.startsWith("http")){switch(n){case"GetPage":case"GetListOfValues":t.request.Controller=t.controller;t.request.View=t.view;t=t.request;break;case"Execute":t=t.args}$.ajax({url:this.get_baseUrl()+"appservices/_invoke",type:"GET",cache:!1,data:{method:n,args:Sys.Serialization.JavaScriptSerializer.serialize(t)},dataType:"jsonp",success:function(n){i(n,r)},error:function(n){u._onMethodFailed(n.message,n.response,r)}})}else u._wsRequest=Sys.Net.WebServiceProxy.invoke(f,n,!1,t,i,e,r)},_disposeFields:function(){var n,t;if(this._allFields)for(n=0;n<this._allFields.length;n++)t=this._allFields[n],t._dataView=null,t._listOfValues&&Array.clear(t._listOfValues)},_formatViewText:function(n,t,i){var r=this._views.length>0?this._views[0].Label:this._view?this._view.Label:"";return String.isNullOrEmpty(n)?i:String.format(n,t==!0?r.toLowerCase():r)},_autoRefresh:function(n){if(this._refreshInterval>0&&(this._riTimeout&&(clearTimeout(this._riTimeout),this._riTimeout=null),!n)){var t=this;this._riTimeout=setTimeout(function(){t.get_isForm()||t.sync()},this._refreshInterval*1e3)}},_clearCache:function(n){var t=this._cachedPages,i,r,u;if(t){for(i=0;i<t.length;i++)r=t[i],Array.clear(r.rows),delete r.rows;Array.clear(t);delete this._cachedPages}u=this.extension();u&&u.reset(n==null||n==!0)},_supportsCaching:function(n){return n=="DataSheet"||n=="Grid"&&$app.mobile},_cacheResult:function(n){var s=n.PageSize,o=n.PageSize<n.Rows.length,l=this.get_viewType(),t,p,e,i,f,v,r,u,y;if(o||l||(l=this.readContext("GridType")),o||(o=this._supportsCaching(l)),!o&&!l&&n.Views)for(t=0;t<n.Views.length;t++)if(p=n.Views[t],p.Id==n.View){o=this._supportsCaching(p.Type);break}if(o&&n.SupportsCaching){e=n.Rows;n.Rows=[];i=this._cachedPages;i||(i=this._cachedPages=[]);var a=n.PageIndex,h=0,c=s-1;for(a>0&&(e.length<=s*2?(h=s,c=e.length-1):(h+=s,c+=s)),f={index:a,rows:[]},t=h;t<=c;t++)v=e[t],v&&(Array.add(n.Rows,Array.clone(v)),Array.add(f.rows,v));if(r=null,h>0)for(r={index:a-1,rows:[]},t=0;t<h;t++)Array.add(r.rows,e[t]);if(u=null,c<e.length-1)for(u={index:a+1,rows:[]},t=c+1;t<e.length;t++)Array.add(u.rows,e[t]);for(t=0;t<i.length;)y=i[t],f!=null&&y.index==f.index?(i[t]=f,f=null):r!=null&&y.index==r.index?(i[t]=r,r=null):u!=null&&y.index==u.index?(i[t]=u,u=null):t++;(f||r||u)&&(i.length>100&&(Array.removeAt(i,0),Array.removeAt(i,0),Array.removeAt(i,0)),f&&Array.add(i,f),r&&Array.add(i,r),u&&Array.add(i,u))}},_onGetPageComplete:function(n){var y,p,i,t,b,ut,gt,ni,ft,u,ti,f,et,k,ii,c,ot,l,d,st,s,g,ht,r,nt,o,a,h,e,ct,lt,it,at,vt,yt,rt,pt,ui,fi,wt;if(this._busy(!1),Sys.Services&&Sys.Services.AuthenticationService&&Sys.Services.AuthenticationService.get_isLoggedIn&&Sys.Services.AuthenticationService.get_isLoggedIn()&&!n.IsAuthenticated){location.replace($app.unanchor(location.href));return}if(this._containerIsHidden&&(Sys.UI.DomElement.setVisible(this._container,!0),this._containerIsHidden=!1),this.set_tag(n.Tag),n.FirstLetters!=""&&(this._firstLetters=n.FirstLetters?n.FirstLetters.split(/,/):null),y=this._position&&this._position.changed,this._cacheResult(n),this._pageIndex<0||y){if(this._pageIndex==-1||y){if(this._disposeFields(),this._expressions=n.Expressions,this._detachBehaviors(),this._allFields=n.Fields,this._fields=[],p=[],this._keyFields&&this._selectedKey.length>0){for(i=0;i<this._keyFields.length;i++)p[i]={name:this._keyFields[i].Name,value:this._selectedKey[i]};this._selectedKey=[]}this._keyFields=[];var bt=!1,w=!1,kt=[],dt=0;for(i=0;i<n.Fields.length;i++)t=n.Fields[i],t.Index=i,t.Name=="Status"&&(bt=!0);for(bt||(n.Fields[n.Fields.length]={Name:"Status",ReadOnly:!0,Type:"String",AllowNulls:!0,Hidden:!0,Index:n.Fields.length,_system:!0}),b=Web.DataView._commandLine.match(/\W_display=(.+?)(&|$)/),i=0;i<n.Fields.length;i++)t=n.Fields[i],ut=String.isNullOrEmpty(t.AliasName)?null:this.findField(t.AliasName),t.AliasIndex=ut?ut.Index:i,(!t.Hidden||b)&&this._fieldIsInExternalFilter(t)&&this.get_hideExternalFilterFields()&&(gt=t.Hidden,t.Hidden=!0,b&&Array.indexOfCaseInsensitive(b[1].split(","),t.Name)!=-1&&(gt||(t.Hidden=!1),this.get_isInserting()&&(ni=new RegExp(String.format("\\W{0}=(.*?)(&|$)",t.Name)),ft=Web.DataView._commandLine.match(ni),ft&&(n.NewRow||(n.NewRow=[]),n.NewRow[i]=decodeURIComponent(ft[1]))))),String.isNullOrEmpty(t.ToolTip)||(t.ToolTip=Web.DataView.htmlAttributeEncode(t.ToolTip)),t.Watermark||t.AllowNulls||(t.Watermark=Web.DataViewResources.Validator.Required),t.Behaviors=[];if(n.NewRow&&this._ditto)for(i=0;i<n.Fields.length;i++)if(t=n.Fields[i],n.NewRow[i]!=null)for(u=0;u<this._ditto.length;u++)if(this._ditto[u].name==t.Name){Array.removeAt(this._ditto,u);break}for(this._hasDynamicLookups=!1,this._requiresConfiguration=!1,ti=0,i=0;i<n.Fields.length;i++){if(t=n.Fields[i],t._dataView=this,t.Hidden||Array.add(this._fields,t),t.IsPrimaryKey)for(Array.add(this._keyFields,t),u=0;u<p.length;u++)if(p[u].name==t.Name){Array.add(this._selectedKey,p[u].value);break}String.isNullOrEmpty(t.HeaderText)&&(t.HeaderText=t.Label);String.isNullOrEmpty(t.HeaderText)&&(t.HeaderText=t.Name);t.FilterType="Number";switch(t.Type){case"Time":case"String":t.FilterType="Text";break;case"DateTime":case"DateTimeOffset":t.FilterType="Date";break;case"Boolean":t.FilterType="Boolean"}if(String.isBlank(t.SearchOptions)||__tf!=4)t.SearchOptions=null;else{for(f=t.SearchOptions.replace(/\s+/g,",").split(/,/),t.AllowAutoComplete=!Array.contains(f,"$disableautocomplete"),t.AllowAutoComplete||Array.remove(f,"$disableautocomplete"),t.AllowSamples=!Array.contains(f,"$disablesamples"),t.AllowSamples||Array.remove(f,"$disablesamples"),t.AllowMultipleValues=!Array.contains(f,"$disablemultiplevalues"),t.AllowMultipleValues||Array.remove(f,"$disablemultiplevalues"),t.AutoCompleteAnywhere=Array.contains(f,"$autocompleteanywhere"),t.AutoCompleteAnywhere&&(Array.remove(f,"$autocompleteanywhere"),n.Fields[t.AliasIndex].AutoCompleteAnywhere=!0),u=0,et=!1;u<f.length;)k=f[u]=f[u].trim(),k=="*"&&(et=!0),k.length>0&&k!="*"?u++:Array.removeAt(f,u);et&&f.length>0&&(ii=Web.DataViewResources.Data.Filters[t.FilterType],this._enumerateMissingSearchOptions(f,ii.List));Array.contains(f,"$in")&&!Array.contains(f,"$notin")&&Array.add(f,"$notin");t.SearchOptions=f.length==0?null:f}t.format=_field_format;t.isReadOnly=_field_isReadOnly;t.isNumber=_field_isNumber;t.text=_field_text;t.trim=_field_trim;t.htmlEncode=_field_htmlEncode;t.tagged=function(){var t=this.Tag,i,r,u="",n,f;if(t)for(n=0;n<arguments.length;n++)if(r=arguments[n],i=t.indexOf(r),i>=0){for(n=i+r.length;n<t.length;)if(f=t[n].match(/\d/),f)u+=t[n++];else break;return Web.DataView.tagSuffix=u,!0}return!1};t.tag=function(n){this.Tag=(this.Tag||"")+","+n};_field_prepareDataFormatString(this,t);t.Type=="Boolean"&&t.Items.length==0&&(t.Items=Array.clone(t.AllowNulls?Web.DataViewResources.Data.BooleanOptionalDefaultItems:Web.DataViewResources.Data.BooleanDefaultItems),t.ItemsStyle||(t.ItemsStyle=Web.DataViewResources.Data.BooleanDefaultStyle));t.Items&&t.Items.length>0&&(t.AllowNulls||t.ItemsStyle=="DropDownList")&&!String.isNullOrEmpty(t.Items[0][0])&&t.ItemsStyle!="CheckBoxList"&&Array.insert(t.Items,0,[null,Web.DataViewResources.Data.NullValueInForms]);String.isNullOrEmpty(t.ItemsStyle)||(String.isNullOrEmpty(t.ContextFields)||t.ItemsStyle=="Lookup"||t.ItemsStyle=="AutoComplete"||String.isNullOrEmpty(t.ItemsDataController)?t.ItemsStyle=="UserNameLookup"?(t.ItemsStyle="Lookup",t.ItemsDataController="aspnet_Membership",t.ItemsDataTextField="UserUserName",t.ItemsDataValueField="UserUserName",t.ItemsValueSyncDisabled=!0,Web.Menu.findNode("/Membership.aspx")&&(t.ItemsNewDataView="createForm1")):t.ItemsStyle=="UserIdLookup"&&(t.ItemsStyle="Lookup",t.ItemsDataController="aspnet_Membership",t.ItemsDataTextField="UserUserName",t.ItemsDataValueField="UserId",Web.Menu.findNode("/Membership.aspx")&&(t.ItemsNewDataView="createForm1")):(this._hasDynamicLookups=!0,t.ItemsAreDynamic=!0));String.isNullOrEmpty(t.Configuration)||(this._requiresConfiguration=!0);t.AllowLEV&&(this._allowLEVs=!0);t.TextMode==2&&String.isNullOrEmpty(t.Editor)&&!$app.mobile&&(Sys.Extended.UI.HtmlEditorExtenderBehavior||typeof CKEDITOR!="undefined"?t.ClientEditor="Web$DataView$RichText":t.Editor="RichEditor",t.HtmlEncode=!1);t.Editor&&(this._executeClientEditorFactories(t)?(t.ClientEditor=t.Editor,t.Editor=null):t.EditorId=String.format("{0}_Item{1}",this.get_id(),t.Index));t.ColIndex=t.Hidden?-1:ti++;c=Web.DataView.Geo;t.tagged("modified-","created-")&&t.tagged("modified-latitude","modified-longitude","modified-coords","created-latitude","created-longitude","created-coords")&&((!c||c.latitude<0)&&(c=Web.DataView.Geo={latitude:-1,longitude:-1},ot=navigator.geolocation,ot&&ot.watchPosition(function(n){c.latitude=n.coords.latitude;c.longitude=n.coords.longitude},function(n){c.error=n})),t.TextMode=4);w||(t.tagged("map-")&&!t.tagged("map-none")?w=!0:(l=t.Name.match(/\b(address|city|state|region|postal(.*?)code|zip(.*?)code|zip|country)\b/i),l&&!t.tagged("map-none")&&(l=l[1].toLowerCase(),kt.push({field:t,tag:l}),l.match(/address|city/)&&dt++)))}for(this.untag("supports-view-style-map"),w||dt!=2||(w=!0,$(kt).each(function(){this.field.tag("map-"+this.tag);this.tag=="address"&&this.field.tag("action-location")})),w&&this.tag("supports-view-style-map"),n.LEVs&&this._recordLEVs(n.LEVs),this._views=n.Views,this._view=null,this._lastViewId||this.get_isForm()||(this._lastViewId=n.View),this._actionGroups=n.ActionGroups?n.ActionGroups:[],this._statusBar=n.StatusBar,d=/^(true|false)\:(.+)$/,st=0,this._actionColumn=null,i=0;i<this._actionGroups.length;i++)for(s=this._actionGroups[i],g=Web.DataViewResources.Actions.Scopes[s.Scope],g._Self&&(ht=g._Self[s.HeaderText],ht&&(s.HeaderText=ht.HeaderText)),s.Scope=="ActionColumn"&&(this._actionColumn=String.isNullOrEmpty(s.HeaderText)?Web.DataViewResources.Grid.ActionColumnHeaderText:s.HeaderText),s.Id||(s.Id="auto"+st++),s.CssClassEx=String.format("Actions-g-{0} ",s.Id),u=0;u<s.Actions.length;u++)r=s.Actions[u],r.Id||(r.Id="auto"+st++),r.Path=String.format("{0}/{1}",s.Id,r.Id),nt=r.Confirmation,r.CommandName=="Search"&&(this._hasSearchAction=r.Path,this._hasSearchShortcut=nt&&nt.match(/_shortcut\s*=\s*true/)),r.CssClassEx=String.format("Actions-g-{0}-a-{1} ",s.Id,r.Id),String.isNullOrEmpty(r.HeaderText)&&(o=g[r.CommandName],o?(o.CommandArgument&&(a=o.CommandArgument[r.CommandArgument],a&&(o=a)),o.WhenLastCommandName&&(a=o.WhenLastCommandName[r.WhenLastCommandName],a&&(o=a)),r.HeaderText=o.HeaderText,!String.isNullOrEmpty(o.HeaderText)&&o.HeaderText.indexOf("{")>=0&&(r.HeaderText=o.VarMaxLen!=null&&n.Views[0].Label.length>o.VarMaxLen?o.HeaderText2:this._formatViewText(o.HeaderText)),String.isNullOrEmpty(r.Description)&&(r.Description=this._formatViewText(o.Description)),String.isNullOrEmpty(nt)&&(r.Confirmation=o.Confirmation)):r.HeaderText=r.CommandName),String.isNullOrEmpty(r.WhenView)?r.WhenViewRegex=null:(h=d.exec(r.WhenView),r.WhenViewRegex=new RegExp(h?h[2]:r.WhenView),r.WhenViewRegexResult=h?h[1]!="false":!0),String.isNullOrEmpty(r.WhenTag)?r.WhenTagRegex=null:(h=d.exec(r.WhenTag),r.WhenTagRegex=new RegExp(h?h[2]:r.WhenTag),r.WhenTagRegexResult=h?h[1]!="false":!0),String.isNullOrEmpty(r.WhenHRef)?r.WhenHRefRegex=null:(h=d.exec(r.WhenHRef),r.WhenHRefRegex=new RegExp(h?h[2]:r.WhenHRef),r.WhenHRefRegexResult=h?h[1]!="false":!0);var tt=1,ri=!1,v=this._categories=n.Categories;for(this._tabs=[],i=0;i<v.length;i++)if(e=v[i],e.Index=i,String.isNullOrEmpty(e.Tab)||Array.contains(this._tabs,e.Tab)||Array.add(this._tabs,e.Tab),e.NewColumn&&(i>0&&tt++,ri=!0),e.ColumnIndex=tt-1,e.Id&&(ct=$get(String.format("{0}_{1}_{2}",n.Controller,n.View,e.Id)),ct&&(e.Template=ct.innerHTML)),e.Floating&&String.isNullOrEmpty(e.Template)){for(lt=new Sys.StringBuilder('<div class="FloatingCategoryHeader"><\/div>'),u=0;u<this._allFields.length;u++)it=this._allFields[u],it.Hidden||i!=it.CategoryIndex||lt.appendFormat('<div class="FieldPlaceholder">{{{0}}}<\/div>',it.Name);e.Template=lt.toString()}if(this._tabs.length>0){for(i=0;i<v.length;i++)e=v[i],String.isNullOrEmpty(e.Tab)&&(String.isNullOrEmpty(v[0].Tab)?(e.Tab=Web.DataViewResources.Form.GeneralTabText,this._tabs[0]!=Web.DataViewResources.Form.GeneralTabText&&Array.insert(this._tabs,0,Web.DataViewResources.Form.GeneralTabText)):e.Tab=v[0].Tab),e.ColumnIndex=0;this._lastSelectedCategoryTabIndex!=null?(at=this._focusedFieldName,this.set_categoryTabIndex(!(this._lastSelectedCategoryTabIndex>=0)||at&&at.startsWith("_Annotation_")?this._tabs.length-1:0),delete this._lastSelectedCategoryTabIndex):this.set_categoryTabIndex(0);vt=this.get_parentDataView(this);vt._lastClickedIcon=="Attachment"&&this.set_categoryTabIndex(this._tabs.length-1);vt._lastClickedIcon=null;tt=1}else this.set_categoryTabIndex(-1);this._numberOfColumns=ri&&!this._get_template()?tt:0}this._filter=n.Filter;this._sortExpression=n.SortExpression;this._updatePageCount(n,y);yt=this.get_pagerButtonCount(!0);this._firstPageButtonIndex=Math.floor(n.PageIndex/yt)*yt}else this._requiresRowCount&&(this._requiresRowCount=!1,this._updatePageCount(n,!1));for(i=0;i<n.Fields.length;i++)t=n.Fields[i],rt=n.Fields[t.AliasIndex],t.AllowAutoComplete==!1&&(rt.AllowAutoComplete=!1),t.AllowSamples==!1&&(rt.AllowSamples=!1),t.AllowMultipleValues==!1&&(rt.AllowMultipleValues=!1);if(this._icons=n.Icons,!this.get_isInserting()){if(pt=!1,this._rows){for((this._rows.length==0||n.Rows.length==0)&&delete this._viewColumnSettings,i=0;i<this._rows.length;i++)Array.clear(this._rows[i]);Array.clear(this._rows);pt=this.get_isGrid()}if(this._rows=n.Rows,pt)for(this._selectedRowIndex=null,i=0;i<this._rows.length;i++)if(this._rowIsSelected(i)){this._selectedRowIndex=i;break}}this._newRow=n.NewRow?n.NewRow:[];n.Aggregates&&(this._aggregates=n.Aggregates);this.get_isForm()&&this._selectedRowIndex==null&&this._totalRowCount>0&&(this._selectedRowIndex=0,this._selectKeyByRowIndex(0));y&&(this._position.changed=!0,this._selectKeyByRowIndex(0));this._render(!0);$app.mobile||(this.get_lookupField()&&this._adjustLookupSize(),this._isInInstantDetailsMode()&&(ui=$common.getClientBounds(),fi=$common.getContentSize(document.body),resizeBy(0,fi.height-ui.height)),this._saveViewVitals(),this._pendingSelectedEvent&&(this._pendingSelectedEvent=!1,this.updateSummary()),this._registerFieldHeaderItems(),_body_performResize());this._executeSecondCommand();this._autoRefresh();this._autoSelect();String.isNullOrEmpty(n.ClientScript)||eval(n.ClientScript);wt=new Web.BusinessRules(this);wt.after({commandName:n.NewRow?"New":"Select",commandArgument:n.View});wt.dispose()},_updatePageCount:function(n,t){this._totalRowCount=n.TotalRowCount;this._position&&this._position.count==-1&&(this._position.count=n.TotalRowCount);this._pageIndex=n.PageIndex;t||(this._pageSize=n.PageSize,this._pageCount=Math.floor(n.TotalRowCount/n.PageSize),n.TotalRowCount%n.PageSize!=0&&this._pageCount++)},_autoSelect:function(n){var t=null,f=null,e,s=!1,i,r,u,o;if(this.get_autoHighlightFirstRow()&&(this.set_autoHighlightFirstRow(!1),t="Select",e="highlight"),this.get_autoSelectFirstRow()&&(this.set_autoSelectFirstRow(!1),e="select",i=this.get_actionGroups("Grid"),i.length>0))for(r=0;r<i[0].Actions.length;r++)if(u=i[0].Actions[r],u.CommandName){t=u.CommandName;f=u.CommandArgument;s=!String.isNullOrEmpty(f)&!this.get_showModalForms()&&n==null;break}t&&this.get_viewType()!="Form"&&this._rows.length>0&&(s&&this._hideContainer(),o=this.extension(),o?o._autoSelect={row:this._rows[n||0],action:e}:this.executeRowCommand(n||0,t,f));(!this._tryFocusDataSheet||this._forceFocusDataSheet)&&(this._tryFocusDataSheet=!0,this.get_isDataSheet()&&!this.get_lookupField()&(!this.get_filterSource()||this._forceFocusDataSheet)&&this._rows.length>0&&!$app.mobile&&this.executeRowCommand(this.get_selectedKey().length>0?null:0,"Select"),this._forceFocusDataSheet=!1)},_hideContainer:function(){this._containerIsHidden=!0;this._container.style.display="none"},_enumerateMissingSearchOptions:function(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i&&!i.Hidden&&(i.List?this._enumerateExpressions(n,t):Array.contains(n,i.Function)||Array.add(n,i.Function))},_executeSecondCommand:function(n){var t,i;n?(t=Web.DataView._commandLine.match(/_commandName2=(\w+)(.*?_commandArgument2=(.*?)(&|$))?/),t&&this.executeActionInScope([this.get_viewType(),"ActionBar"],t[1],t[3])):this._trySecondCommand&&(this._trySecondCommand=!1,(this.get_viewType()!="Form"||this._totalRowCount>0)&&(i=this,setTimeout(function(){i._executeSecondCommand(!0)},50)))},_skipNextInputListenerClickEvent:function(){(Sys.Browser.agent!=Sys.Browser.InternetExplorer||Sys.Browser.version>=9)&&(this._skipClickEvent=!0)},_gridViewCellFocus:function(n,t){try{var r=new Sys.UI.DomEvent(n),i=r.target;if((i.tagName=="A"||i.parentNode.tagName=="A")&&!this.get_lookupField()||Sys.UI.DomElement.containsCssClass(i,"RowSelector")||i.tagName=="SPAN"&&i.className=="ObjectRef")return!1;this.get_lookupField()&&(r.stopPropagation(),r.preventDefault());this._skipNextInputListenerClickEvent()}catch(u){}return this.executeRowCommand(t,"Select"),!0},_dataSheetCellFocus:function(n,t,i){var r=this._get_focusedCell(),u=this.get_isInserting(),f;if(u&&t!=-1&&(t=-1),i==-1&&(i=r!=null?r.colIndex:0),this.get_isEditing()&&r){this._focusCell(-1,-1,!1);this._focusCell(t,i);f=t==r.rowIndex||u&&t==-1;(f||this._updateFocusedRow(r))&&this._updateFocusedCell(r)?f&&t!=this._selectedRowIndex&&!u&&this.cancelDataSheetEdit():(this._focusCell(t,i,!1),this._focusCell(r.rowIndex,r.colIndex));this._skipNextInputListenerClickEvent();return}if(n){if(!this._gridViewCellFocus(n,t,i))return}else this._skipNextInputListenerClickEvent();r==null||r.rowIndex!=t||r.colIndex!=i||this.get_isEditing()||this.get_lookupField()?this._startInputListenerOnCell(t,i):(document.selection&&document.selection.clear(),this._skipEditOnClick!=!0&&this._allowEdit()&&this.editDataSheetRow(r.rowIndex));this._skipEditOnClick=!1},_startInputListenerOnCell:function(n,t){if(this._startInputListener(),this._focusCell(-1,-1,!1),this._focusCell(n,t),!this.get_lookupField()){if(Web.DataView._activeDataSheetId!=this.get_id()){var i=$find(Web.DataView._activeDataSheetId);i&&i.cancelDataSheet();Web.DataView._activeDataSheetId=this.get_id()}this._lostFocus=!1}},_startInputListener:function(){this._stopInputListener();this._inputListenerKeyDownHandler||(this._inputListenerKeyDownHandler=Function.createDelegate(this,this._inputListenerKeyDown),this._inputListenerKeyPressHandler=Function.createDelegate(this,this._inputListenerKeyPress),this._inputListenerClickHandler=Function.createDelegate(this,this._inputListenerClick),this._inputListenerDblClickHandler=Function.createDelegate(this,this._inputListenerDblClick),this._focusedCell=null);$addHandler(document,"keydown",this._inputListenerKeyDownHandler);$addHandler(document,"keypress",this._inputListenerKeyPressHandler);$addHandler(document,"click",this._inputListenerClickHandler);$addHandler(document,"dblclick",this._inputListenerDblClickHandler);this._trackingInput=!0},_stopInputListener:function(){this._trackingInput&&($removeHandler(document,"keydown",this._inputListenerKeyDownHandler),$removeHandler(document,"keypress",this._inputListenerKeyPressHandler),$removeHandler(document,"click",this._inputListenerClickHandler),$removeHandler(document,"dblclick",this._inputListenerDblClickHandler),this._lostFocus=!0,this._trackingInput=!1)},_allowEdit:function(){return this._findActionsByCommandName("Edit").length>0},_allowNew:function(){return this._findActionsByCommandName("New").length>0},get_interactiveActionGroups:function(){var n=this.get_actionGroups("Grid");return Array.addRange(n,this.get_actionGroups("ActionBar")),Array.addRange(n,this.get_actionGroups("Form")),Array.addRange(n,this.get_actionGroups("ActionColumn")),n},_findActionsByCommandName:function(n){for(var t,r,u=[],f=this.get_interactiveActionGroups(),i=0;i<f.length;i++)for(actions=f[i].Actions,t=0;t<actions.length;t++)r=actions[t],r.CommandName==n&&Array.add(u,r);return u},_inputListenerKeyPress:function(n){var t,i;if((!n.rawEvent||n.rawEvent.charCode!=0)&&!this._lostFocus){if(this.get_isEditing()){this._pendingChars&&(this._pendingChars+=String.fromCharCode(n.charCode));return}this._isBusy||(t=this._get_focusedCell(),t!=null)&&((i=this._fields[t.colIndex],i.ReadOnly)||this._allowEdit()&&(this.executeRowCommand(t.rowIndex,"Select"),i.isReadOnly()||(this._pendingChars=String.fromCharCode(n.charCode),this.editDataSheetRow(t.rowIndex))))}},cancelDataSheet:function(){this.get_isDataSheet()&&(this._focusCell(-1,-1,!1),this._stopInputListener(),this.set_ditto(null),Web.DataView._activeDataSheetId=null,this.cancelDataSheetEdit(),this._lostFocus=!1,this._focusedCell=null)},_inputListenerKeyDown:function(n){var i,e,f,s;if(!this._lookupIsActive&&!this._lostFocus&&!Web.HoverMonitor._instance.get_isOpen()){if(this._isBusy){if(this._pendingChars)return;n.preventDefault();n.stopPropagation();return}if(!this._isBusy&&(i=this._get_focusedCell(),i!=null)){var t={rowIndex:i.rowIndex,colIndex:i.colIndex},r=!1,o=!1,u=this.get_pageSize();this._rows.length<u&&(u=this._rows.length);switch(n.keyCode){case 83:case Sys.UI.Key.enter:if(n.keyCode==83&&!n.ctrlKey)return;if(this.get_isEditing()){if(e=n.target&&n.target.tagName,(e=="TEXTAREA"||e=="A")&&!n.ctrlKey)return;r=!0;this._updateFocusedRow(i);n.preventDefault();n.stopPropagation();return}n.ctrlKey&&!this.get_isEditing()||this.get_lookupField()?(r=!0,this.executeRowCommand(i.rowIndex,"Select")):n.shiftKey?t.rowIndex>0&&t.rowIndex--:this._moveFocusToNextRow(t,u)&&(r=!0);break;case Sys.UI.Key.down:if(this.get_isEditing()||n.ctrlKey)return;this._moveFocusToNextRow(t,u)&&(r=!0);break;case Sys.UI.Key.up:if(this.get_isEditing()||n.ctrlKey)return;t.rowIndex>0?t.rowIndex--:(this._pageOffset==0&&this.get_pageIndex()==0?(this._pageOffset=null,r=!0):this._pageOffset==null?this.get_pageIndex()>0&&(this._pageOffset=-1):this._pageOffset--,r=!0,this._pageOffset==-u?(this._pageOffset=null,this.get_pageIndex()>0&&this.goToPage(this.get_pageIndex()-1)):this.goToPage(this.get_pageIndex()));break;case Sys.UI.Key.tab:case Sys.UI.Key.right:case Sys.UI.Key.left:if(f=!0,(n.keyCode==Sys.UI.Key.right||n.keyCode==Sys.UI.Key.left)&&this.get_isEditing())return;if(!n.shiftKey&&n.target.parentNode.className=="Date")return;if(n.shiftKey&&n.target.id&&n.target.id.match(/\$Time\d+/))return;if(s=this._pageOffset,n.shiftKey||n.keyCode==Sys.UI.Key.left)if(t.colIndex>0){if(t.colIndex--,n.keyCode==Sys.UI.Key.tab)while(t.colIndex>0&&this._fields[t.colIndex].isReadOnly())t.colIndex--}else this.get_isEditing()&&(r=!0);else if(t.colIndex<this._fields.length-1){if(t.colIndex++,n.keyCode==Sys.UI.Key.tab)while(t.colIndex<this._fields.length-1&&this._fields[t.colIndex].isReadOnly())t.colIndex++}else{if(this.get_isEditing()){if(this._updateFocusedRow(i,n.keyCode==Sys.UI.Key.tab))f=!1;else{n.preventDefault();n.stopPropagation();return}r=!0}f&&this._moveFocusToNextRow(t,u)&&(r=!0);(t.rowIndex!=i.rowIndex||this._pageOffset!=s)&&(t.colIndex=0,r=!1)}f&&this.get_isEditing()&&(o=!0);break;case Sys.UI.Key.home:if(this.get_isEditing())return;n.ctrlKey?this.get_pageIndex()>0?(r=!0,this._pageOffset=0,this.goToPage(0),i.rowIndex=0,i.colIndex=0):(t.rowIndex=0,t.colIndex=0):t.colIndex=0;break;case Sys.UI.Key.end:if(this.get_isEditing())return;n.ctrlKey?(r=!0,i.colIndex=this._fields.length-1,i.rowIndex=this._totalRowCount%this.get_pageSize()-1,i.rowIndex<0&&(i.rowIndex=this.get_pageSize()),this._pageOffset=null,this.goToPage(this.get_pageCount()-1)):t.colIndex=this._fields.length-1;break;case Sys.UI.Key.pageUp:if(this.get_isEditing())return;r=!0;this.get_pageIndex()>0?this.goToPage(this.get_pageIndex()-1):this._pageOffset!=null&&(this._pageOffset=null,this.goToPage(this.get_pageIndex()));break;case Sys.UI.Key.pageDown:if(this.get_isEditing())return;r=!0;this.get_pageIndex()<this.get_pageCount()-1&&this.goToPage(this.get_pageIndex()+1);break;case Sys.UI.Key.esc:this.cancelDataSheetEdit()||this.cancelDataSheet();r=!0;break;case Sys.UI.Key.del:if(this.get_isEditing()||n.shiftKey||n.altKey)return;r=!0;n.ctrlKey?this.deleteDataSheetRow():(this._pendingChars="",this.editDataSheetRow(i.rowIndex));break;case 45:this.get_isEditing()||(r=!0,this._allowNew()&&this.newDataSheetRow());break;case 32:if(n.ctrlKey&&this.multiSelect()&&!this.get_isInserting())r=!0,this.toggleSelectedRow(i.rowIndex);else return;break;case 113:if(this.get_isEditing())return;r=!0;this._allowEdit()&&this.editDataSheetRow(i.rowIndex)}i.rowIndex==t.rowIndex&&i.colIndex==t.colIndex||r||(this._focusCell(i.rowIndex,i.colIndex,!1),this._focusCell(t.rowIndex,t.colIndex,!0),r=!0);r&&(n.preventDefault(),n.stopPropagation());o&&(this._updateFocusedCell(i)||(this._focusCell(t.rowIndex,t.colIndex,!1),this._focusCell(i.rowIndex,i.colIndex,!0)))}}},_updateFocusedCell:function(n){var u=this._collectFieldValues(),e=this._validateFieldValues(u,!0,n),t=this._fields[n.colIndex],f,r,i;if(e)f=!0,t.Index<u.length&&u[t.Index].Modified&&(f=!this._performValueChanged(t.Index)),f&&this.refresh(!0);else if(t.Behaviors)for(r=0;r<t.Behaviors.length;r++)i=t.Behaviors[r],AjaxControlToolkit.CalendarBehavior.isInstanceOfType(i)&&i.get_isOpen()&&(i.hide(),i.show());return e},_updateFocusedRow:function(n,t){return Web.DataView.showMessage(),this._syncFocusedCell=this.get_isInserting(),this._lastFocusedCell=n,this._skipSync=!0,this.executeRowCommand(n.rowIndex,this._syncFocusedCell?"Insert":"Update",null,!0),this._valid&&(this._saveAndNew=t),this._valid},_get_selectedDataRowIndex:function(n){return this.get_pageIndex()*this.get_pageSize()+this.get_pageOffset()+(n!=null?n:this._selectedRowIndex)},executeActionInScope:function(n,t,i,r,u){var o,l,s,f,h,e,c;for(r==null&&(r=this._selectedRowIndex),o=0;o<n.length;o++)if(l=n[o],s=this.get_actionGroups(l),s)for(f=0;f<s.length;f++)if(h=s[f].Actions,h)for(e=0;e<h.length;e++)if(c=h[e],c.CommandName==t&&(String.isNullOrEmpty(i)||c.CommandArgument==i)&&this._isActionAvailable(c,r))return u!=!0&&this.executeAction(l,e,r,f),!0;return!1},newDataSheetRow:function(){var n=this;setTimeout(function(){n.executeCommand({commandName:"New",commandArgument:n.get_viewId()})},100)},editDataSheetRow:function(n){this.get_isDataSheet()&&this.executeRowCommand(n,"Edit","",!1)},deleteDataSheetRow:function(){var n=this._get_focusedCell(),t;n&&(this.executeRowCommand(n.rowIndex,"Select"),t=this,setTimeout(function(){t.executeActionInScope(["Row","ActionBar"],"Delete",null,n.rowIndex)},100))},_moveFocusToNextRow:function(n,t){var i=!1,r=this._get_selectedDataRowIndex(n.rowIndex),u=this._pageOffset;return n.rowIndex<t-1?n.rowIndex++:this._get_selectedDataRowIndex(n.rowIndex)<this._totalRowCount-1&&(this._pageOffset==null?this._pageOffset=1:this._pageOffset++,i=!0,this._pageOffset==t?(this._pageOffset=null,this.goToPage(this.get_pageIndex()+1)):this.goToPage(this.get_pageIndex())),r==this._get_selectedDataRowIndex(n.rowIndex)&&!this.get_isEditing()&&this._allowNew()&&(this._ignoreSelectedKey=!0,this.newDataSheetRow(),i=!0),i},_scrollToRow:function(){return},cancelDataSheetEdit:function(){if(this.get_isEditing()){var n=this._get_focusedCell();return n!=null&&this.executeRowCommand(n.rowIndex,"Cancel",null,!1),!0}return!1},_inputListenerClick:function(n){if(this._skipClickEvent){this._skipClickEvent=!1;return}if(!this._lookupIsActive){for(var t=n.target,r=!1,i=!1,u=!0;t!=null;){if(t==this._container){r=!0;break}t.className!=null&&(t.className.match(/Cell|Group|InfoRow|FieldHeaderSelector|Toggle|FooterRow|ActionRow\s*/)?i=!0:t.className.match(/QuickFind|SearchBarFrame\s*/)&&(u=!1));t=t.parentNode}r?(this._lostFocus=u?!i:!0,this._skipEditOnClick=!0,i||this.cancelDataSheetEdit()):this.cancelDataSheet()}},_inputListenerDblClick:function(){if(!this._lostFocus){var n=this._get_focusedCell();n&&!this.get_isEditing()&&this._allowEdit()&&(document.selection&&document.selection.clear(),this.editDataSheetRow(n.rowIndex))}},_get_focusedCell:function(){return this._focusedCell},_focusCell:function(n,t,i){var w,v,s,u,e,c,r,l,k,a;if(!this.get_isDataSheet())return this._focusedCell=null,null;if(w=this.get_isInserting(),i==null&&(i=!0),n==-1&&t==-1){if(!this._focusedCell)return null;n=this._focusedCell.rowIndex;t=this._focusedCell.colIndex}for(n>=this._rows.length&&(n=this._rows.length-1),t>=this._fields.length&&(t=this._fields.length-1),v=this._container.childNodes[0].rows,s=-1,u=0;u<v.length;u++)if(e=v[u],(Sys.UI.DomElement.containsCssClass(e,"Row")||Sys.UI.DomElement.containsCssClass(e,"AlternatingRow"))&&s++,w){if(Sys.UI.DomElement.containsCssClass(e,"Inserting"))break}else if(s==n)break;if(s<0)return null;for(c=-1,u=0;u<e.childNodes.length;u++)if(r=e.childNodes[u+this.get_sysColCount()],r&&Sys.UI.DomElement.containsCssClass(r,"Cell")&&c++,c==t)break;if(c<0)return null;var b=r.parentNode.childNodes[this.get_sysColCount()-1],y=this._get_headerRowElement(),o=y.childNodes[t+this.get_sysColCount()];if(i==!0){if(l=$common.getBounds(o),Sys.UI.DomElement.addCssClass(r,"Focused"),Sys.UI.DomElement.addCssClass(b,"CrossHair"),Sys.UI.DomElement.addCssClass(o,"CrossHair"),!this._skipCellFocus){var h=$app.scrolling(),p=$common.getClientBounds(),f=$common.getBounds(r);h.y>f.y?(s==0?o:r).scrollIntoView(!0):h.y+p.height<=f.y+f.height?r.scrollIntoView(!1):(h.x>f.x||h.x+p.width-1<=f.x||h.x+p.width-1<=f.x+f.width)&&r.scrollIntoView(!1);Sys.Browser.agent==Sys.Browser.InternetExplorer&&(k=$common.getBounds(y),y.style.height=k.height+"px")}a=$common.getBounds(o);(l.width!=a.width||l.x!=a.x||l.y!=a.y)&&Sys.UI.DomElement.addCssClass(o,"Narrow");this._skipCellFocus=!1}else Sys.UI.DomElement.removeCssClass(r,"Focused"),Sys.UI.DomElement.removeCssClass(r,"Narrow"),Sys.UI.DomElement.removeCssClass(b,"CrossHair"),Sys.UI.DomElement.removeCssClass(o,"CrossHair");return this._focusedCell={rowIndex:n,colIndex:t},r},_initializeModalPopup:function(){var u;Sys.UI.DomElement.addCssClass(this.get_element(),"ModalPlaceholder");var r=$common.getClientBounds(),n=r.width/5*4,i=Web.DataViewResources.ModalPopup.MaxWidth,t=this.get_confirmContext();t&&t.MaxWidth>0&&t.MaxWidth<n&&(i=t.MaxWidth);n>i&&(n=i);u=r.height/5*4;this._container.style.overflowX!=null?(this._container.style.overflowY="auto",this._container.style.overflowX="hidden"):this._container.style.overflow="auto";this._container.style.height=u+"px";this._container.style.width=n+"px";this._saveTabIndexes();this._modalPopup=$create(AjaxControlToolkit.ModalPopupBehavior,{id:this.get_id()+"ModalPopup"+Sys.Application.getComponents().length,PopupControlID:this.get_element().id,DropShadow:!0,BackgroundCssClass:"ModalBackground"},null,null,this.get_modalAnchor());this._modalPopup.show()},_resizeContainerBounds:function(){this._modalPopup||(this._container.style.height="");var n=$common.getBounds(this._container),i=$common.getClientBounds(),t=Math.ceil(i.height/5*4);return n.height>t&&(this._container.style.height=t+"px",n.skipResizing=!0),n},_adjustModalPopupSize:function(){var e=this.get_confirmContext(),u,f,i,r,o,l;Sys.UI.DomElement.removeCssClass(this._element,"EmptyModalDialog");var n=new Sys.StringBuilder,t=[],c=this._container.getElementsByTagName("table");for(u=c.length-1;u>=0;u--)f=c[u],f.className=="ActionButtons"&&(n.isEmpty()&&(n.append('<table class="DataView" cellSpacing=0 cellPadding=0><tr class="ActionButtonsRow BottomButtonsRow">'),n.append(f.parentNode.parentNode.innerHTML),n.append("<\/tr><\/table>")),Array.add(t,f.parentNode.parentNode));while(t.length>0)t[0].parentNode.removeChild(t[0]),delete t[0],Array.removeAt(t,0);i=this._container.childNodes[0];i.style.width="";i.style.height="";r=$common.getContentSize(i);r.height+=Sys.Browser.agent===Sys.Browser.InternetExplorer&&Sys.Browser.version<8?3:1;this._buttons?this._modalAutoSized||(this._container.style.width="auto",this._modalAutoSized=!0):(this._buttons=document.createElement("div"),this.get_element().appendChild(this._buttons),this._buttons.style.width=r.width+"px",Sys.UI.DomElement.addCssClass(this._buttons,"FixedButtons"),this._title=document.createElement("div"),Sys.UI.DomElement.addCssClass(this._title,"FixedTitle"),this.get_element().insertBefore(this._title,this._container),__designer()||$(this._element).draggable({handle:this._title,drag:function(n,t){var i=$(window),f=i.width(),e=i.height(),r=t.offset.left-i.scrollLeft(),u=t.offset.top-i.scrollTop(),o=t.helper.outerWidth();if(r+o<50||u<5||r>f-50||u>e-75)return!1}}));this._buttons.innerHTML=n.toString();n.clear();o=this._resizeContainerBounds();o.height>r.height&&!o.skipResizing&&(l=$common.getBorderBox(i),r.width+=l.horizontal,$common.setContentSize(this._container,r));i.style.width=this._title.offsetWidth+"px";this._buttons.style.width=this._title.offsetWidth+"px";Sys.UI.DomElement.setVisible(this.get_element(),!0);var a=$common.getBounds(this._container),s=$common.getPaddingBox(this._title),h=$common.getBorderBox(this._title);this._title.style.width=a.width-s.horizontal-h.horizontal+"px";s=$common.getPaddingBox(this._buttons);h=$common.getBorderBox(this._buttons);this._buttons.style.width=a.width-s.horizontal-h.horizontal+"px";this._title.innerHTML=String.format('<table style="width:100%" cellpadding="0" cellspacing="0"><tr><td><div class="Text">{1}<\/div><\/td><td align="right"><a href="javascript:" class="Close" onclick="$find(\'{0}\').endModalState(\'Cancel\');return false" tabindex="{3}" title="{2}">&nbsp;<\/a><\/td><\/tr><\/table>',this.get_id(),e&&e.WindowTitle?e.WindowTitle:Web.DataView.htmlEncode(this.get_view().Label),Web.DataViewResources.ModalPopup.Close,$nextTabIndex());this._modalPopup.show();this._modalAutoSized&&!this._modalWidthFixed&&(this._modalWidthFixed=!0,this._container.style.width=this._container.offsetWidth+"px");this._adjustModalHeight(!0)},_adjustModalHeight:function(n){var t=this._container,i,o,s,r,f,u,h,e,c;if(this._modalPopup&&this.get_viewType()=="Form")if(n)i=$common.getBounds(t),this._lastContainerHeight=i.height;else if(this._lastContainerHeight!=null){for(o=t.style.height,s=t.scrollTop,t.style.height="",r=null,f=t.getElementsByTagName("tr"),u=0;u<f.length;u++)if(f[u].className=="Categories"){r=f[u].childNodes[0];break}r&&(r.style.paddingBottom="");i=$common.getBounds(t);this._lastContainerHeight>i.height?(h=$common.getPaddingBox(r),r&&(e=this._lastContainerHeight-i.height-h.bottom,Sys.Browser.agent==Sys.Browser.InternetExplorer&&e++,r.style.paddingBottom=e+"px")):(c=$common.getClientBounds(),c.height*.8<=i.height?(t.style.height=o,t.scrollTop=s):this._lastContainerHeight=i.height)}},_allowModalAutoSize:function(){this._modalWidthFixed=!1;this._modalAutoSized=!1},_disposeModalPopup:function(){if(this._modalPopup){this._modalPopup.hide();this._modalPopup.dispose();__designer()||$(this._element).draggable("destroy");delete this._buttons;delete this._title;delete this._modalAnchor;var n=this.get_element();n.parentNode.removeChild(n);this._restoreTabIndexes()}},endModalState:function(n){var t=this.get_parentDataView(),u=Web.HoverMonitor._instance,i,r;if(this.get_isModal()&&(i=this.get_exitModalStateCommands(),i))for(r=0;r<i.length;r++)if(n==i[r])return t&&(t._lookupIsActive=!1,t._skipClickEvent=!0),$app.mobile?$app.mobile.endModalState(t,this):this.dispose(),!0;return t&&!this.get_confirmContext()&&($app.mobile||t.refresh()),u&&u.close(),!1},_adjustLookupSize:function(){if(this.get_lookupField()&&this.get_pageSize()>3){var t=$app.scrolling(),i=$common.getClientBounds(),n=$common.getBounds(this.get_element());n.height+n.y>i.height+t.y&&this.set_pageSize(Math.ceil(this.get_pageSize()*.66))}},_onMethodFailed:function(n){(this._busy(!1),Web.DataView._navigated)||this._wsRequest!=null&&(Web.DataView.showMessage(String.format('<pre style="word-wrap:break-word;margin:0px">Component: {4}\r\nController: {5}; View: {6}; Timed out: {0}; Status Code: {7};\r\nException: {1}\r\nMessage: {2}\r\nStack:\r\n{3}<\/pre>',n.get_timedOut(),n.get_exceptionType(),n.get_message(),n.get_stackTrace(),this.get_id(),this.get_controller(),this.get_viewId(),n.get_statusCode())),this.get_element().style.border="1px red solid")},_createArgsForListOfValues:function(n){var t=this.get_lookupContext(),i=this._searchBarVisibleIndex==null?this.get_filter():this._createSearchBarFilter(!0),r={FieldName:n,Controller:this.get_controller(),View:this.get_viewId(),Filter:i.length==1&&i[0].match(/(\w+):/)[1]==n?null:i,ExternalFilter:this.get_externalFilter(),LookupContextFieldName:t?t.FieldName:null,LookupContextController:t?t.Controller:null,LookupContextView:t?t.View:null,Tag:this.get_tag()};return this._useSearchParams(r),{controller:this.get_controller(),view:this.get_viewId(),request:r}},_loadListOfValues:function(n,t,i){this._busy(!0);this._invoke("GetListOfValues",this._createArgsForListOfValues(i),Function.createDelegate(this,this._onGetListOfValuesComplete),{family:n,fieldName:t})},_onGetListOfValuesComplete:function(n,t){this._busy(!1);var i=this.findField(t.fieldName);i._listOfValues=n;n[n.length-1]==null&&(Array.insert(n,0,n[n.length-1]),Array.removeAt(n,n.length-1));this.get_isChart()?(this.get_showViewSelector()?this._registerViewSelectorItems():this._registerActionBarItems(),Web.HoverMonitor._instance._tempOpenDelay=100):this._registerFieldHeaderItems(Array.indexOf(this.get_fields(),i));$refreshHoverMenu(t.family);Web.DataView._resized=!0},get_parentDataView:function(n){var t=n;return String.isNullOrEmpty(this._parentDataViewId)||(t=$find(this._parentDataViewId)),t},get_selectedValues:function(){var t=this.get_parentDataView(this),n=t.get_selectedValue();return n.length==0?[]:t.multiSelect()?n.split(";"):[n]},_execute:function(n){this._busy(!0);this._showWait();this._lastArgs=n;this._invoke("Execute",{controller:n.Controller,view:n.View,args:n},Function.createDelegate(this,this._onExecuteComplete))},_populateDynamicLookups:function(n){for(var i,r,t=0;t<n.Values.length;t++)i=n.Values[t],r=this.findField(i.Name),r&&(r.DynamicItems=i.NewValue);this._skipPopulateDynamicLookups=!0;this.refresh(!0);this._focus()},_updateCalculatedFields:function(n){var i,t,r;for(this._displayActionErrors(n),i=[],t=0;t<n.Values.length;t++)r=n.Values[t],Array.add(i,{name:r.Name,value:r.NewValue});this.refresh(!0,i);this._focus()},_get_LEVs:function(){for(var n,t=0;t<Web.DataView.LEVs.length;t++)if(n=Web.DataView.LEVs[t],n.controller==this.get_controller())return n.records;return n={controller:this.get_controller(),records:[]},Array.add(Web.DataView.LEVs,n),n.records},_recordLEVs:function(n){var t,r,i;if(this._allowLEVs&&(n||this._lastArgs.CommandName.match(/Insert|Update/))&&(this._lastArgs||n)){for(n||(n=this._lastArgs.Values),t=this._get_LEVs(),r=!0,i=0;i<n.length;i++)if(n[i].Modified){r=!1;break}r||(t.length>0&&Array.removeAt(t,t.length-1),Array.insert(t,0,n))}},_applyLEV:function(n){for(var t,r=this._allFields[n],e=this._allFields[r.AliasIndex],u=[],f=this._get_LEVs()[0],i=0;i<f.length;i++)t=f[i],(t.Name==r.Name||t.Name==e.Name)&&Array.add(u,{name:t.Name,value:t.NewValue});this.refresh(!0,u)},_notifyMaster:function(){if(this.get_hasParent()){var n=$find(this.get_filterSource());n&&n._updateDynamicValues(this.get_controller())}},_clearSelectedKey:function(n){var t=this._lookupInfo?this:this.get_parentDataView(this);t._selectedKey=[];t._selectedKeyFilter=[];t._selectedRowIndex=null;t._position=null;n!=!1&&(t._raiseSelectedDelayed=!0);t._selectedRow=null},_refreshSelectedKey:function(n){var r,u,i,f,t;n.length==0&&this._lastArgs&&(n=this._lastArgs.Values);var e=[],o=[];for(r=0;r<this._keyFields.length;r++)for(u=this._keyFields[r],i=0;i<n.length;i++)if(n[i].Name==u.Name){if(f=n[i],f.NewValue==null){this._clearSelectedKey();return}Array.add(e,f.NewValue);Array.add(o,u.Name+":="+this.convertFieldValueToString(u,f.NewValue));break}t=this.get_parentDataView();t||(t=this);e.length>0&&(t._selectedKey=e,t._selectedKeyFilter=o,t._raiseSelectedDelayed=!0)},_cancelConfirmation:function(){if(this._confirmDataViewId){var n=$find(this._confirmDataViewId);n&&(this._confirmDataViewId=null,n.cancel())}},_findKeyValue:function(n){for(var i,r=this._keyFields[0],t=0;t<n.length;t++)if(i=n[t],r.Name==i.Name)return i.NewValue;return null},_onExecuteComplete:function(n,t){var i=this,tt=$app.mobile,r=i._lastArgs.CommandName,o,s,h,c,l,a,p,w,b,e,k,d,g,v,y,nt,u,f,it;if(i._busy(!1),i._hideWait(),o=n.Errors.length==0,s=i._pendingUploads,s&&s.length>0&&o&&r=="Insert"&&n.RowsAffected==1){h=s[0];Array.removeAt(s,0);c=i._findKeyValue(n.Values);c==null&&(c=i._findKeyValue(i._lastArgs.Values));h.form.action=h.form.action.replace(/=u\|&/,String.format("=u|{0}&",c));i._pendingExecuteComplete={result:n,context:t};i._showDownloadProgress();h.form.submit();return}if(l=i._lastFocusedCell,r=="PopulateDynamicLookups"){i._populateDynamicLookups(n);return}if(r=="Calculate"){i._updateCalculatedFields(n);String.isNullOrEmpty(n.ClientScript)||eval(n.ClientScript);return}if(a=!1,p=r=="Custom",o&&i._cancelConfirmation(),w={result:n,context:t,handled:!1},i.raiseExecuted(w),!w.handled){if(b=!r.match(/Insert/),r.match(/Delete/i)&&n.RowsAffected>0)i._clearSelectedKey();else if(r.match(/Custom|SQL|Email/))a=!p&&i.get_isEditing(),n.Values.length>0?(i.refresh(!0,n.Values),p&&!n.ClientScript&&(n.ClientScript="void(0)"),i._refreshSelectedKey(n.Values,o)):a||r!="SQL"||(i._raiseSelectedDelayed=!0,i._forceChanged=!0);else if(b)for(e=0;e<n.Values.length;e++)k=n.Values[e],d=i.findField(k.Name),d&&(i.get_currentRow()[d.Index]=k.NewValue);else i._refreshSelectedKey(n.Values,o);if(o){if(i._forceSync(),g=i.get_parentDataView(),g&&g._forceSync(),i.set_tag(n.Tag),i._requestedFilter=n.Filter,i._requestedSortExpression=n.SortExpression,i._autoRefresh(),i.multiSelect()&&(i._selectedKeyList=[],i.set_selectedValue("")),i._recordLEVs(),i.updateSummary(),i._continueAfterScript=!0,n.ClientScript&&(i._continueAfterScript=!1,n.ClientScript=i.resolveClientUrl(n.ClientScript),eval(n.ClientScript)),i._lastFocusedCell=null,v=i._lastArgs.CommandArgument,y=new Web.BusinessRules(i),y.after({commandName:r,commandArgument:v}),y.canceled()&&(i._continueAfterScript=!1),y.dispose(),i._continueAfterScript){if(n.NavigateUrl)n.NavigateUrl=i.resolveClientUrl(n.NavigateUrl),i.navigate(n.NavigateUrl,b?i._lastArgs.Values:n.Values);else if(!i._closeInstantDetails()&&!i.endModalState(r))if(i.get_backOnCancel()||!String.isNullOrEmpty(i._replaceTriggerViewId))i.goBack(!0);else{for(i._notifyDesigner(!0),nt=i.get_actions(i._get_lastActionScope(),!0),e=0;e<nt.length;e++)if(u=nt[e],u.WhenLastCommandName==r&&(u.WhenLastCommandArgument==""||u.WhenLastCommandArgument==v)&&i._isActionMatched(u)){f=i;it=f._lastArgs.Values;function rt(){f.set_lastCommandName(r);f.set_lastCommandArgument(v);f.executeCommand({commandName:u.CommandName,commandArgument:u.CommandArgument,path:u.Path,causesValidation:u.CausesValidation,values:r.match(/Insert|Custom/)?it:null});f._pendingSelectedEvent=u.CommandName.match(/^(Edit|Select)/)!=null;f._notifyMaster()}tt&&f._parentDataViewId?(f=$app.find(i._parentDataViewId),tt.endModalState(f,i,rt)):rt();return}a||(i._pendingSelectedEvent=r.match(/Update|Custom|SQL/),i.set_lastCommandName(null),i.get_isModal()&&(!i.get_isForm(i._lastViewId)||i._closeViewDetails)?i.endModalState("Cancel"):i.goToView(i._lastViewId))}i._notifyMaster()}}else l&&(i._focusCell(-1,-1,!1),i._focusCell(l.rowIndex,l.colIndex,!0),i._lastFocusedCell=null,i._saveAndNew=!1),n.ClientScript&&(n.ClientScript=i.resolveClientUrl(n.ClientScript),eval(n.ClientScript)),i._displayActionErrors(n)}},_get_lastActionScope:function(){var f=this._lastArgs?this._lastArgs.Path:null,i,r,n,u,t;if(f&&(i=f.match(/^(\w+)\//),i))for(r=this._actionGroups,n=0;n<r.length;n++)if(u=r[n],u.Id==i[1])return u.Scope;return t=this.get_viewType(),t.match(/DataSheet|Tree/)&&(t="Grid"),t},_displayActionErrors:function(n){if(n.Errors.length!=0){var t=new Sys.StringBuilder;for(i=0;i<n.Errors.length;i++)t.append(Web.DataView.formatMessage("Attention",n.Errors[i]));Web.DataView.showMessage(t.toString());t.clear()}},_busy:function(n){var f,c,b,a,s,y,p;if(n==null)return this._isBusy;if(this._isBusy=n,this._enableButtons(!n),!$app.isSaaS()){var u=this,i=$app.mobile,l=u._busyInterval,r=!i&&(u.get_isModal()||u.get_lookupField()!=null||!this._controller)||i!=null||this.get_useCase()=="$app",w=i?i.toolbar():r?document.body:u._container,o=$(w),h=$(u._container);if(i&&!i.toolbar().is(":visible")){i.wait(n);return}if(n&&!l){i||h.is(".dataview-loaded")||h.addClass("dataview-loading");!r;f=o.outerWidth()/5;f>200&&(f=200);var t=u._$busy=$(String.format('<div class="dataview-busy-indicator{0}"><\/div>',r?" modal":"")).css({position:i?"fixed":"absolute",width:f,"z-index":r?i?1e3:3e6:0}).appendTo(document.body),e=-f,v=r?0:t.height();t.hide();c=0;b=!1;this._busyInterval=setInterval(function(){var n,u;if(c!=null)if(c++>(i?35:75))c=null,a=!0;else return;e+=Math.ceil(f/30);a?(r&&$app._busyIndicator?(s=!0,t.hide()):($app._busyIndicator=!0,t.show()),a=!1):s&&!$app._busyIndicator&&(s=!1,$app._busyIndicator=!0,t.show());e>=0?(n=o.outerWidth(),e>=n-f&&e<n?t.width(n-e):e>=n&&(e=-f),s||(u=o.scrollTop(),t.position({my:"left top",at:String.format("left+{0} top{1}{2}",e,r?"+":"-",r?$(window).scrollTop():v),of:o}))):s||(t.width(f+e),t.position({my:"left top",at:String.format("left top{0}{1}",r?"+":"-",r?$(window).scrollTop():v),of:o}))},1e3/60)}else l&&(i||h.is(".dataview-loaded")||h.removeClass("dataview-loading").addClass("dataview-loaded"),clearInterval(l),u._busyInterval=null,t=u._$busy,t&&(y=t.offset(),p=o.offset(),u._$busy=null,t.width(o.outerWidth()-(y.left-p.left)),setTimeout(function(){t.remove();r&&($app._busyIndicator=!1)},500)))}},_enableButtons:function(n){if(!$app.mobile)var t=$("button",this._element).each(function(){$(this).toggleClass("disabled",!n)})},_bodyKeydown:function(n){var t=!1;this._customFilterField?n.keyCode==Sys.UI.Key.enter?(t=!0,this.applyCustomFilter()):n.keyCode==Sys.UI.Key.esc&&(t=!0,this.closeCustomFilter()):this.get_lookupField()&&n.keyCode==Sys.UI.Key.esc&&(t=!0,this.hideLookup());t&&(n.preventDefault(),n.stopPropagation())},_prepareJavaScriptExpressionEx:function(n){return n.replace(/\[((\w+)\.)?(\w+)\]/g,"this.fieldValue('$3','$2')")},_evaluateVisibility:function(){var n=this.get_visibleWhen();return String.isNullOrEmpty(n)?!0:(n=this._prepareJavaScriptExpressionEx(n),eval(n)!=!1)},_filterSourceSelected:function(n,t,i){var f,r,e,o,s,h,c,l,a,u;if(this._hidden=!this._evaluateVisibility(),f=this.readContext("vitals"),f){for(r=0;r<f.Filter.length;){var v=f.Filter[r],p=v.substring(0,v.indexOf(":")),y=!1;if(this._keyFields)for(e=0;e<this._keyFields.length;e++)if(this._keyFields[e].Name==p){y=!0;break}y?Array.removeAt(f.Filter,r):r++}this.writeContext("vitals",f)}for(o=[],r=0;r<this._externalFilter.length;r++)Array.add(o,this._externalFilter[r].Value),this._externalFilter[r].Value=null;for(s=!1,h=!1,Web.DataView.isInstanceOfType(n)?(String.isNullOrEmpty(this._transaction)||this.set_transaction(n.get_transaction()),this._populateExternalViewFilter(n),s=!n.get_showDetailsInListMode()&&n.get_isGrid(),n._forceChanged&&(h=!0)):this._externalFilter.length>0&&(this._externalFilter[0].Value=n.target.value),this.applyExternalFilter(),c=!0,l=!1,r=0;r<this._externalFilter.length;r++)a=this._externalFilter[r].Value,a!=null&&(c=!1),a!=o[r]&&(l=!0);this.get_autoHide()!=Web.AutoHideMode.Nothing&&this._updateLayoutContainerVisibility(!c&&!s&&!this._hidden);(l||h)&&(i||this.set_pageIndex(-1),u=this._position,u&&(u.index=0,u.count=-1,u.key=[],u.keyFilter=[],u.filter=this.get_filter()),i||(this._selectedKey=[],this._selectedKeyFilter=[]),this._clearCache(),this.loadPage());this.raiseSelected();this.updateSummary()},_createExternalFilter:function(){var i,t,n;if(this._externalFilter=[],i=/(\w+)(,|$)/g,this.get_filterFields())for(t=this.get_filterFields().split(Web.DataView._simpleListRegex),n=0;n<t.length;n++)Array.add(this._externalFilter,{Name:t[n],Value:null})},_populateExternalViewFilter:function(n){var i,r,f,t,u;if(n._selectedKey&&n._keyFields&&n._selectedKey.length==n._keyFields.length)for(i=0;i<this._externalFilter.length;i++){for(r=this._externalFilter[i],f=!1,t=0;t<n._keyFields.length;t++)if(u=n._keyFields[t],r.Name==u.Name){r.Value=n.convertFieldValueToString(u,n._selectedKey[t]);f=!0;break}if(!f&&this.get_controller()!=n.get_controller())for(t=0;t<n._allFields.length;t++)if(u=n._allFields[t],r.Name==u.Name){r.Value=n.convertFieldValueToString(u,n.get_selectedRow()[n._allFields[t].Index]);f=!0;break}!f&&n._selectedKey.length>=i&&(r.Value=n._selectedKey[i])}},_cloneChangedRow:function(){var t,n,i;if(this.get_isEditing()){var r=this._collectFieldValues(),u=this.get_currentRow(),f=u?Array.clone(u):null,e=__designer();for(t=0;t<r.length;t++)n=r[t],i=this.findField(n.Name),i&&(f[i.Index]=e?n.Modified?n.NewValue:n.OldValue:n.NewValue);return f}return this.get_selectedRow()},_updateVisibility:function(n){var p,s,h,w,u,e,t,i,f,c,r,l,b,g,a,tt,o,it,y,d;if(this._expressions&&(this._readOnlyChanged=!1,p=this.get_isForm(),s=[],n||(n=this._cloneChangedRow()),n)){for(h=!1,w=!1,u=0;u<this._expressions.length;u++)e=s[0]=this._expressions[u],e.Type==Web.DynamicExpressionType.ClientScript&&(e.Scope==Web.DynamicExpressionScope.DataFieldVisibility?(t=this.findField(e.Target),t&&(i=this._get(p?"_ItemContainer":"Item",t.Index),i&&(f=this._evaluateJavaScriptExpressions(s,n,!1),p&&(c=Sys.UI.DomElement.getVisible(i),Sys.UI.DomElement.containsCssClass(i.parentNode,"FieldPlaceholder")?i=i.parentNode:Sys.UI.DomElement.containsCssClass(i.parentNode.parentNode,"FieldWrapper")&&(i=i.parentNode.parentNode.parentNode.parentNode),Sys.UI.DomElement.setVisible(i,f==!0),c!=f&&(h=!0))))):e.Scope==Web.DynamicExpressionScope.CategoryVisibility?(r=this.findCategory(e.Target),r&&(i=this._get("_Category",r.Index),i&&(r.IsVisible=this._evaluateJavaScriptExpressions(s,n,!1),f=r.IsVisible&&(String.isNullOrEmpty(r.Tab)||r.Tab==this._get_selectedTab()),c=Sys.UI.DomElement.getVisible(i),Sys.UI.DomElement.setVisible(i,f==!0),c!=f&&(h=!0),l=this._get("$CategoryDescription$",r.Index),l&&(b=this._processTemplatedText(n,r.Description),l.innerHTML=b,l.style.display=String.isNullOrEmpty(b)?"none":"block"),String.isNullOrEmpty(r.Tab)||(w=!0)))):e.Scope==Web.DynamicExpressionScope.ReadOnly&&(t=this.findField(e.Target),t&&(t.OriginalTextMode==null&&(t.OriginalTextMode=t.TextMode),g=t.isReadOnly(),f=this._evaluateJavaScriptExpressions(s,n,!1),t.TextMode=f==!0?4:t.OriginalTextMode,f!=g&&(h=!0,this._readOnlyChanged=!0))));if(w)for(u=0;u<this._tabs.length;u++){var rt=this._tabs[u],nt=!1,k=!1;for(a=0;a<this._categories.length;a++)if(r=this._categories[a],r.Tab==rt&&r.IsVisible!=null&&(nt=!0,k=r.IsVisible,k))break;nt&&Sys.UI.DomElement.setVisible(this._get("_Tab",u),k)}if(this._dynamicActionButtons&&(this._clonedRow=n,tt=this._get("$ActionButtons$","Top"),tt&&(o=new Sys.StringBuilder,this._internalRenderActionButtons(o,"Top",this._lastActionButtonsScope),this._newTopActionButtons=o.toString(),o.clear()),it=this._get("$ActionButtons$","Bottom"),it&&(o=new Sys.StringBuilder,this._internalRenderActionButtons(o,"Bottom",this._lastActionButtonsScope),this._newBottomActionButtons=o.toString(),o.clear()),y=this,setTimeout(function(){y._refreshActionButtons()},500),this._clonedRow=null),this._updateStatusBar(),h&&(this._adjustModalHeight(),this._modalPopup&&this._modalPopup.show(),_body_performResize()),this.get_isEditing()&&!this._lookupIsActive)for(d=this._get_focusedCell(),u=0;u<this._fields.length;u++)if(t=this._fields[u],!t.ReadOnly&&!t.Hidden&&t.AutoSelect&&t.ItemsStyle=="Lookup"&&(d==null||d.colIndex==t.ColIndex)&&(t.AutoSelect=!1,v=n[t.Index],v==null)){this._lookupIsActive=!0;y=this;setTimeout(function(){y.showLookup(t.Index)},100);break}}},_refreshActionButtons:function(){var t=this._get("$ActionButtons$","Top"),n;t&&this._newTopActionButtons&&(t.innerHTML=this._newTopActionButtons,this._newTopActionButtons=null);n=this._get("$ActionButtons$","Bottom");n&&this._newBottomActionButtons&&(n.innerHTML=this._newBottomActionButtons,this._newBottomActionButtons=null)},_updateDynamicValues:function(n){for(var t,s,f,r,i=!1,e=this._allFields,o=n&&n.Name?n.Name:n,u=0;u<e.length;u++)if(t=e[u],s=!String.isNullOrEmpty(t.ContextFields),s){for(f=/\s*(\w+)\s*(=\s*(\w+)\s*)?(,|$)/g,r=f.exec(t.ContextFields);r;){if(t.ItemsAreDynamic&&(n==null||r[3]==o)){if(!this.get_isEditing())return this.refresh(),!0;this._raisePopulateDynamicLookups();i=!0}else if(t.Calculated&&r[1]==o){if(!this.get_isEditing())return this.refresh(),!0;this._raiseCalculate(t,n);i=!0}if(i)break;r=f.exec(t.ContextFields)}if(i)break}return i},_valueFocused:function(n){var t=this._allFields[n];this._focusedFieldName=t.Name;Web.DataView._focusedDataViewId=this._id;Web.DataView._focusedItemIndex=n},_resetContextLookupValues:function(n){var t=[],i;return this._enumerateContextFieldValues(n,t,[]),i=t.length>0,i&&this.refresh(!0,t),i},_enumerateContextFieldValues:function(n,t,i){for(var r,f,s,e,h,c=n.Name,o=this._allFields,u=0;u<o.length;u++)if(r=o[u],f=r.ContextFields,!String.isNullOrEmpty(f)&&!i[u]&&!String.isNullOrEmpty(r.ItemsStyle))for(s=/\s*(\w+)\s*(=\s*(\w+)\s*)?(,|$)/g,e=s.exec(f);e;)e[1]==c&&(i[u]=!0,Array.add(t,{name:r.Name,value:null}),h=o[r.AliasIndex],h!=r&&Array.add(t,{name:h.Name,value:null}),r.DynamicItems=null,this._enumerateContextFieldValues(r,t,i)),e=s.exec(f)},_copyStaticLookupValues:function(n){var o,t,r,u,f,i;if(!String.isNullOrEmpty(n.Copy)&&(n.ItemsStyle=="RadioButtonList"||n.ItemsStyle=="ListBox"||n.ItemsStyle=="DropDownList")){for(o=this._collectFieldValues(),t=o[n.Index].NewValue,t!=null&&typeof t!="string"&&(t=t.toString()),r=null,u=0;u<n.Items.length;u++)if(f=n.Items[u],i=f[0],i!=null&&typeof i!="string"&&(i=i.toString()),i==t){r=f;break}if(r){for(var s=[],h=/(\w+)=(\w+)/g,c=2,e=h.exec(n.Copy);e;)Array.add(s,{name:e[1],value:r[c++]}),e=h.exec(n.Copy);return this.refresh(!0,s),!0}}return!1},_replaceFieldValue:function(n){for(var t,o,r=this._enumerateExpressions(Web.DynamicExpressionType.RegularExpression,Web.DynamicExpressionScope.Field,n.Name),i=0;i<r.length;i++){t=r[i];try{if(t.Result.match(/\$(\d|\'\`)/)){var s=this._collectFieldValues(),u=s[n.Index],f=u.NewValue?u.NewValue.toString():null,h=new RegExp(t.Test),e=f.replace(h,t.Result);e!=f&&(o=[{name:n.Name,value:e}],this.refresh(!0,o))}}catch(c){}}},_valueChanged:function(n){var i=this._allFields[n],t;this._showFieldError(i,null);this._skipErrorReset=!1;t=this;setTimeout(function(){Web.DataView._navigated||t._performValueChanged(n,!0)},200)},_performValueChanged:function(n,t){var i=this._allFields[n],r,u,f;if(i){if(this._skipErrorReset){this._skipErrorReset=!1;return}return this._showFieldError(i,null),this._replaceFieldValue(i),r=this._resetContextLookupValues(i),u=this._copyStaticLookupValues(i),this._updateVisibility(),f=this._updateDynamicValues(i),t&&this._readOnlyChanged&&this.get_isEditing()&&(this.refresh(!0),this._focus()),u||f||r||this._readOnlyChanged}},_quickFind_focus:function(){var n=this.get_quickFindElement();n.value==Web.DataViewResources.Grid.QuickFindText&&(n.value="");Sys.UI.DomElement.removeCssClass(n,"Empty");Sys.UI.DomElement.removeCssClass(n,"NonEmpty");n.select();this._lostFocus=!0},_quickFind_blur:function(){var n=this.get_quickFindElement();String.isBlank(n.value)?(n.value=Web.DataViewResources.Grid.QuickFindText,Sys.UI.DomElement.addCssClass(n,"Empty")):Sys.UI.DomElement.addCssClass(n,"NonEmpty");this._lostFocus=!1},_executeQuickFind:function(n){var t,i;for(this._forceSync(),t=0;t<this._allFields.length;t++)this._allFields[t]._listOfValues=null;for(this.removeQuickFind(),t=0;t<this._allFields.length;t++)if(i=this._allFields[t],!i.Hidden){i=this._allFields[i.AliasIndex];String.isNullOrEmpty(n)?this.refreshData():this.applyFilter(i,"~",n);break}},quickFind:function(n){var t=(String.isNullOrEmpty(n)?this.get_quickFindElement().value:n).match(/^\s*(.*?)\s*$/),i=t[1]==Web.DataViewResources.Grid.QuickFindText?"":t[1];this.set_quickFindText(i);this._executeQuickFind(i);this._lostFocus=!1},_quickFind_keydown:function(n){if(n.keyCode==Sys.UI.Key.enter)n.preventDefault(),n.stopPropagation(),this.quickFind();else if(n.keyCode==Sys.UI.Key.down)return},encodePermalink:function(n,t,i){Sys.Net.WebServiceProxy.invoke(this.get_servicePath(),"EncodePermalink",!1,{link:n,rooted:!1},Function.createDelegate(this,this._encodePermalink_Success),Function.createDelegate(this,this._onMethodFailed),{target:t,features:i})},_encodePermalink_Success:function(n,t){t.target||t.features?open(n,t.target,t.features):location.href=n},showViewMessage:function(n){var r=this._get("$HeaderText"),i,t;r!=null&&n&&(i=String.format('<div class="MsgBox">{1} <a href="javascript:" onclick="$find(\'{0}\').hideViewMessage();return false;" class="Close" title="{2}">&nbsp;<\/a><\/div>',this.get_id(),n,Web.DataViewResources.ModalPopup.Close),t=this.get_view(),t.OriginalHeaderText||(t.OriginalHeaderText=t.HeaderText),t.HeaderText=i,r.innerHTML=i,this._viewMessages||(this._viewMessages={}),this._viewMessages[t.Id]=n)},hideViewMessage:function(){var i=this._get("$HeaderText"),n,t;i!=null&&(n=this.get_view(),t=n.OriginalHeaderText,n.HeaderText=t,i.innerHTML=this._formatViewText(Web.DataViewResources.Views.DefaultDescriptions[t],!0,t),this._viewMessages[n.Id]=null)}};Web.DataView.registerClass("Web.DataView",Sys.UI.Behavior);Web.AutoComplete=function(n){Web.AutoComplete.initializeBase(this,[n])};Web.AutoComplete.prototype={initialize:function(){Web.AutoComplete.callBaseMethod(this,"initialize");this._textBoxMouseOverHandler=Function.createDelegate(this,this._onTextBoxMouseOver);this._textBoxMouseOutHandler=Function.createDelegate(this,this._onTextBoxMouseOut);this._completionListItemCssClass="Item";this._highlightedItemCssClass="HighlightedItem"},dispose:function(){this._viewPage=null;this._element&&($removeHandler(this._element,"mouseover",this._textBoxMouseOverHandler),$removeHandler(this._element,"mouseout",this._textBoxMouseOutHandler));Web.AutoComplete.callBaseMethod(this,"dispose")},get_fieldName:function(){return this._fieldName},set_fieldName:function(n){this._fieldName=n},updated:function(){var n=document.createElement("div");n.className="AutoCompleteFrame "+this.get_typeCssClass();n.innerHTML=String.format('<table><tr><td class="Input"><\/td><td class="Clear" style="{2}"><span class="Clear" onclick="var e=this.parentNode.parentNode.getElementsByTagName(\'input\')[0];e.value=\'\';e.focus()" title="{1}">&nbsp;<\/span><\/td><td class="Button" onmouseover="if(!Sys.UI.DomElement.containsCssClass(this.parentNode, \'Active\'))$find(\'{0}\')._showDropDown(true)" onmouseout="$find(\'{0}\')._showDropDown(false)"><span class="Button" onclick="$find(\'{0}\')._showFullList();">&nbsp;<\/span><\/td><\/tr><\/table>',this.get_id(),Web.DataViewResources.Data.Filters.Labels.Clear,this.get_contextKey().match(/^(SearchBar|Filter)\:/)!=null?"":"display:none");this._element.setAttribute("autocomplete","off");this._element.parentNode.insertBefore(n,this._element);n.getElementsByTagName("td")[0].appendChild(this._element);Sys.Browser.agent==Sys.Browser.WebKit&&(n.style.marginLeft="2px");this._completionSetCount==10&&(this._completionSetCount=100);$addHandler(this._element,"mouseover",this._textBoxMouseOverHandler);$addHandler(this._element,"mouseout",this._textBoxMouseOutHandler);Web.AutoComplete.callBaseMethod(this,"updated");document.body.appendChild(this._completionListElement);this._completionListElement.className="CompletionList AutoComplete";this._completionListElement.style.display="none"},_showCachedFullList:function(){this._update("%",this._cache["%"],!1)},_showFullList:function(){var t,i,n;if(!this._webRequest&&(t=this._popupBehavior.get_visible(),this._hideCompletionList(),this._element.focus(),!t)){if(this._completionWord="%",this._cache&&this._cache["%"]){i=this;setTimeout(function(){i._showCachedFullList()},50);return}n={prefixText:this._completionWord,count:this._completionSetCount};this._useContextKey&&(n.contextKey=this._contextKey);this._ignoreCompletionWord=!0;this._invoke(n,this._completionWord)}},_showDropDown:function(n){for(var t=this._element;t.tagName!="TR";)t=t.parentNode;n?Sys.UI.DomElement.addCssClass(t,"Active"):this._textBoxHasFocus?Sys.UI.DomElement.addCssClass(t,"Active"):Sys.UI.DomElement.removeCssClass(t,"Active")},_onKeyDown:function(n){var i,t;n.keyCode==Sys.UI.Key.down&&n.altKey&&(n.preventDefault(),n.stopPropagation(),this._showFullList());i=this._popupBehavior._visible;Web.AutoComplete.callBaseMethod(this,"_onKeyDown",[n]);(n.keyCode==Sys.UI.Key.enter||n.keyCode==Sys.UI.Key.esc)&&(t=this._get_fieldDataView(!0),t&&(t.get_isDataSheet()&&i?(n.preventDefault(),n.stopPropagation()):t.get_searchBarIsVisible()&&(n.preventDefault(),n.stopPropagation(),i||setTimeout(function(){t._performSearch()},100))))},_update:function(n,t,i){var r,u,f,e;if(Web.AutoComplete.callBaseMethod(this,"_update",[n,t,i]),t){for(r=-1,u=this._currentCompletionWord().toLowerCase(),f=0;f<t.length;f++)if(e=t[f],e!=null&&(e=e.toLowerCase(),r==-1&&e.startsWith(u)&&(r=f),e==u)){r=f;break}r>=0&&r<this._completionListElement.childNodes.length&&(this._selectIndex=r,u=this._completionListElement.childNodes[r],this._highlightItem(u),this._handleScroll(u,r+5))}},_get_fieldDataView:function(n){var i=null,t=this._get_contextInfo();return t&&(t.type=="Field"||n&&t.type=="SearchBar")&&(i=Web.DataView.find(t.controller)),i},_setText:function(n){var u,h,t,o,v,c,r;if(Web.AutoComplete.callBaseMethod(this,"_setText",[n]),this._updateClearButton(),u=this._get_fieldDataView(),u){var f=u.findField(this.get_fieldName()),l=this.get_element().value,e=[];if(l!=Web.DataViewResources.Data.NullValueInForms&&(h=this._enumerateViewPageItems(l),h!=-1)){var i=this._viewPage,a=i.Rows[h],s=[];for(t=0;t<i.Fields.length;t++)o=i.Fields[t],o.Name==f.ItemsDataValueField&&Array.add(s,o);if(s.length==0)for(t=0;t<i.Fields.length;t++)if(o=i.Fields[t],o.IsPrimaryKey){Array.add(s,o);break}for(t=0;t<s.length;t++)v=a[s[0].Index],Array.add(e,v)}if($get(u.get_id()+"_Item"+f.Index).value=e.toString(),this._originalElementText=this.get_element().value,this._get_isInLookupMode()){if(!String.isNullOrEmpty(f.Copy)){for(e=[],c=/(\w+)=(\w+)/g,r=c.exec(f.Copy);r;){if(r[2]=="null")Array.add(e,{name:r[1],value:null});else for(t=0;t<i.Fields.length;t++)i.Fields[t].Name==r[2]&&Array.add(e,{name:r[1],value:a[t]});r=c.exec(f.Copy)}u.refresh(!0,e)}u._valueChanged(f.Index)}}},_get_isInLookupMode:function(){var n=this._get_contextInfo();return n!=null&&n.type=="Field"},_updateClearButton:function(){var n=this._element.parentNode.parentNode;String.isBlank(this._element.value)?Sys.UI.DomElement.removeCssClass(n,"Filtered"):Sys.UI.DomElement.addCssClass(n,"Filtered")},_onGotFocus:function(n){if(Web.AutoComplete.callBaseMethod(this,"_onGotFocus",[n]),this._showDropDown(!0),this._updateClearButton(),this._get_isInLookupMode()){var t=this.get_element();this._originalElementText=t.value;this._originalElementText==Web.DataViewResources.Data.NullValueInForms&&(t.value="",t.select())}},_onLostFocus:function(n){Web.AutoComplete.callBaseMethod(this,"_onLostFocus",[n]);this._showDropDown(!1);this._updateClearButton();this._get_isInLookupMode()&&this._originalElementText!=null&&(this.get_element().value=this._originalElementText)},_onTextBoxMouseOver:function(){this._showDropDown(!0)},_onTextBoxMouseOut:function(){this._showDropDown(!1)},_currentCompletionWord:function(){if(this._completionWord){var n=this._completionWord;return this._completionWord=null,n}return Web.AutoComplete.callBaseMethod(this,"_currentCompletionWord")},_onTimerTick:function(n,t){var i,r;if(this._timer.set_enabled(!1),this._servicePath&&this._serviceMethod){if(i=this._currentCompletionWord(),i.trim().length<this._minimumPrefixLength){this._currentPrefix=null;this._update("",null,!1);return}if(this._currentPrefix!==i||i==""&&this._minimumPrefixLength==0){if(this._currentPrefix=i,i!=""&&this._cache&&this._cache[i]){this._update(i,this._cache[i],!1);return}if(t=new Sys.CancelEventArgs,this.raisePopulating(t),t.get_cancel())return;r={prefixText:this._currentPrefix,count:this._completionSetCount};this._useContextKey&&(r.contextKey=this._contextKey);this._webRequest&&(this._webRequest.get_executor().abort(),this._webRequest=null);this._invoke(r,i);$common.updateFormToRefreshATDeviceBuffer()}}},_get_contextInfo:function(){var n=this.get_contextKey().match(/^(\w+)\:(\w+),(\w+)$/);return n?{type:n[1],controller:n[2],fieldName:n[3]}:null},_invoke:function(n,t){var u=this,e=u._get_contextInfo(),f,s,w,r,h,y;if(e){var i=Web.DataView.find(e.controller),o=[],a=e.fieldName,p="beginswith";if(e.type=="SearchBar"?o=i._createSearchBarFilter(!0):e.type=="Filter"?o=i.get_filter():(f=i.findField(this.get_fieldName()),a=String.isNullOrEmpty(f.ItemsDataTextField)?f.Name:f.ItemsDataTextField),!this._ignoreCompletionWord){for(s=0;s<o.length;s++)if(w=o[s].match(/^(\w+):/),w[1]==e.fieldName){Array.removeAt(o,s);break}f||(f=i.findField(a));f&&f.AutoCompleteAnywhere&&(p="contains");Array.add(o,String.format('{0}:${1}${2}\0',a,p,this._currentCompletionWord()))}var v=null,c=null,l=null;if(e.type=="Field"){for(c=f.ItemsDataController,l=f.ItemsDataView,r={FieldName:f.Name,Controller:i.get_controller(),View:i.get_viewId()},h=i.get_contextFilter(f),s=0;s<h.length;s++)y=h[s],Array.add(o,String.format('{0}:={1}\0',y.Name,y.Value));v={PageIndex:0,RequiresMetaData:!0,RequiresRowCount:!1,PageSize:300,SortExpression:f.ItemsDataTextField,Filter:o,ContextKey:i.get_id(),Cookie:i.get_cookie(),FilterIsExternal:h.length>0,Transaction:i.get_transaction(),LookupContextFieldName:r?r.FieldName:null,LookupContextController:r?r.Controller:null,LookupContextView:r?r.View:null,LookupContext:r,View:i.get_viewId(),Tag:i.get_tag(),ExternalFilter:h}}else c=i.get_controller(),l=i.get_viewId(),v={FieldName:e.fieldName,Filter:o,LookupContextFieldName:r?r.FieldName:null,LookupContextController:r?r.Controller:null,LookupContextView:r?r.View:null,AllowFieldInFilter:this._ignoreCompletionWord!=!0,Controller:c,View:l,Tag:i.get_tag(),ExternalFilter:i.get_externalFilter()};i._busy(!0);u._webRequest=i._invoke(u.get_serviceMethod(),{controller:c,view:l,request:v},function(n,t){e.type=="Field"?(i._busy(!1),u._onGetPageComplete(n,t)):(i._busy(!1),u._onGetListOfValuesComplete(n,t))},t);u._ignoreCompletionWord=!1}else u._webRequest=Sys.Net.WebServiceProxy.invoke(u.get_servicePath(),u.get_serviceMethod(),!1,n,Function.createDelegate(u,u._onMethodComplete),Function.createDelegate(u,u._onMethodFailed),t)},_onGetListOfValuesComplete:function(n,t){n.length>0&&n[0]==null&&(n[0]=Web.DataViewResources.HeaderFilter.EmptyValue);this._webRequest=null;this._update(t,n,!0)},_onGetPageComplete:function(n,t){if(this._element){this._viewPage=n;var i=this._enumerateViewPageItems();this._onGetListOfValuesComplete(i,t)}},_enumerateViewPageItems:function(n){for(var i,f,e,r=this._viewPage,s=this._get_fieldDataView(),o=s.findField(this.get_fieldName()),u=[],t=0;t<r.Fields.length;t++)i=r.Fields[t],i.Index=t,i.Name==o.ItemsDataTextField&&Array.add(u,i);if(u.length==0)for(t=0;t<r.Fields.length;t++)if(i=r.Fields[t],!i.Hidden&&i.Type=="String"){Array.add(u,i);break}if(u.length==0)for(t=0;t<r.Fields.length;t++)if(i=r.Fields[t],!i.Hidden){Array.add(i);break}for(f=[],o.AllowNulls&&Array.add(f,Web.DataViewResources.Data.NullValueInForms),t=0;t<r.Rows.length;t++)if(e=r.Rows[t][u[0].Index],n!=null){if(e==n)return t}else Array.add(f,e);return n!=null?-1:f},get_typeCssClass:function(){return this._typeCssClass},set_typeCssClass:function(n){this._typeCssClass=n}};Web.DataView.hideMessage=function(){Web.DataView.showMessage()};Web.DataView.formatMessage=function(n,t){return String.format('<table cellpadding="0" cellspacing="0" ><tr><td class="{0}" valign="top">&nbsp;<\/td><td class="Message">{1}<\/td><\/tr><\/table>',n,t)};Web.DataView.showMessage=function(n){var i,s,t,r,e,o,u,f;String.isBlank(n)&&(n=null);i=document.getElementsByTagName("body")[0];s=!1;Web.DataView.MessageBar||(t=document.createElement("div"),t.id="DataView_MessageBar",i.appendChild(t),Sys.UI.DomElement.setVisible(t,!1),Sys.UI.DomElement.addCssClass(t,"MessageBar"),Web.DataView.MessageBar=$create(AjaxControlToolkit.AlwaysVisibleControlBehavior,{VerticalOffset:AjaxControlToolkit.VerticalSide.Top},null,null,t),r=Sys.UI.DomElement.getBounds(i),r.y<0&&(r.y=0),Web.DataView.OriginalBodyTopOffset=r.y);t=$get("DataView_MessageBar");e=Sys.UI.DomElement.getVisible(t);t.innerHTML=n?String.format('<div>{0}<\/div><div class="Stub"><\/div>',n):"";Sys.UI.DomElement.setVisible(t,n!=null);o=Sys.UI.DomElement.getBounds(t);u=n?Web.DataView.OriginalBodyTopOffset+o.height:Web.DataView.OriginalBodyTopOffset;i.style.paddingTop=u+"px";f=$get("Membership_Login");f&&(f.style.marginTop=u+"px");Sys.UI.DomElement.getVisible(t)!=e&&_body_performResize()};Web.DataView._tagsWithIndexes=["A","AREA","BUTTON","INPUT","OBJECT","SELECT","TEXTAREA","IFRAME"];Web.DataView._delayedLoadingViews=[];Web.DataView._performDelayedLoading=function(){for(var t=0,n;t<Web.DataView._delayedLoadingViews.length;)n=Web.DataView._delayedLoadingViews[t],n.get_isDisplayed()?(Array.remove(Web.DataView._delayedLoadingViews,n),n._delayedLoading&&n._loadPage()):t++};Web.DataView.unanchor=function(n){var t=n.match(/^(.+?)#.*$/);return t?t[1]:n};Web.DataView.execute=function(n){function i(){t.dispose();u.remove()}function r(){t._busy(!1)}var u=$("<div/>").appendTo($("body")).hide(),t=$create(Web.DataView,{controller:n.controller,viewId:n.view||"grid1",servicePath:__servicePath,baseUrl:__baseUrl,useCase:"$app"},null,null,u.get(0));t._onGetPageComplete=function(u){r();var f={totalRowCount:u.TotalRowCount,pageIndex:u.PageIndex,pageSize:u.PageSize},o=f[n.controller]=[],e=n.format;e&&$(u.Fields).each(function(){var n=this;_field_prepareDataFormatString(t,n);n.format=_field_format});$(u.Rows).each(function(){var t=this,n={};o.push(n);$(u.Fields).each(function(i){var r=this,u=t[i];e&&r.DataFormatString&&r.FormatOnClient&&(u=r.format(u));n[r.Name]=u})});n.success&&n.success(f);i()};t._onMethodFailed=function(t,u){r();n.error&&n.error(t,u);i()};t._pendingExecuteComplete={};t._onExecuteComplete=function(t){if(r(),n.success){var u=t?{rowsAffected:t.RowsAffected,canceled:t.Canceled,clientScript:t.ClientScript,navigateUrl:t.NavigateUrl,errors:t.Errors}:{},f=u[n.controller]={};$(n.values).each(function(){var n=this;f[n.name]=typeof n.newValue=="undefined"?typeof n.oldValue=="undefined"?n.value:n.oldValue:n.newValue});t&&$(t.Values).each(function(){f[this.Name]=this.Value});n.success(u)}i()};t._collectFieldValues=function(){var t=[];return $(n.values).each(function(){var n=this;t.push({Name:n.name,NewValue:typeof n.newValue=="undefined"?typeof n.oldValue=="undefined"?n.value:n.oldValue:n.newValue,OldValue:typeof n.oldValue=="undefined"?n.value:n.oldValue,Modified:n.modified==!0,ReadOnly:n.readOnly==!0})}),t};t._validateFieldValues=function(){return!0};n.pageIndex!=null&&(t._pageIndex=n.pageIndex);n.pageSize!=null&&(t._pageSize=n.pageSize);n.selectedValues&&(t.SelectedValues=n.selectedValues);n._init=!0;t.search(n);t._filterDetailsText=n.filterDetails;n.command||(n.command="Select");n.command=="Select"?t._loadPage():t.executeCommand({commandName:n.command,commandArgument:n.argument||"",causesValidation:!1})};Web.DataView.find=function(n,t){for(var i,f="_"+n,u=Sys.Application.getComponents(),r=0;r<u.length;r++)if(i=u[r],t){if(Web.DataView.isInstanceOfType(i)&&(t=="Controller"&&i._controller==n||t=="Tag"&&i.get_isTagged(n)))return i}else if(i._id==n||Web.DataView.isInstanceOfType(i)&&i._id.endsWith(f))return i;return null};Web.DataView.confirm=function(n,t,i){window.confirm(n)?t&&t():i&&i()};Web.DataView.alert=function(n,t){window.alert(n);t&&t()};Web.DataView.showModal=function(n,t,i,r,u,f,e,o,s){var w=Web.DataView.isInstanceOfType(n),c=n,v=$app.mobile,y,l,h,p;if(!$app.mobile){if(w&&n._container&&(c=n._container.getElementsByTagName("a")[0]),!c)for(y=document.getElementsByTagName("a","input","button"),l=y.length-1;l>=0;l--)if(y[l].tabIndex>=0){c=y[l];break}if(c==null){alert("Cannot find an anchor for a modal popup.");return}Web.HoverMonitor._instance.close()}v&&v.modalDataView();f||(f=Web.DataView._baseUrl);e||(e=Web.DataView._servicePath);var a=this._placeholder=document.createElement("div"),k=Sys.Application.getComponents().length,b=t.toLowerCase();return $find(b)&&(b+=k),a.id=String.format("{0}_{1}_Placeholder{2}",t,i,k),w?n._appendModalPanel(a):document.body.appendChild(a),a.className="ModalPlaceholder FixedDialog EmptyModalDialog",h={id:b,baseUrl:f,servicePath:e,controller:t,viewId:i,showActionBar:!1,modalAnchor:c,startCommandName:r,startCommandArgument:u,exitModalStateCommands:["Cancel"],externalFilter:o},s&&(s.useCase||(s.useCase=$app._defaultUseCase,$app._defaultUseCase=null),h.filter=s.filter,h.ditto=s.ditto,h.lastViewId=s.lastViewId,h.transaction=s.transaction,h.filterSource=s.filterSource,h.filterFields=s.filterFields,h.confirmContext=s.confirmContext,h.showSearchBar=s.showSearchBar,h.useCase=s.useCase,h.tag=s.tag,h.showActionButtons=s.showActionButtons),p=$create(Web.DataView,h,null,null,a),w&&(p._parentDataViewId=n.get_id(),p._hasDetails=n._hasDetails),v&&setTimeout(function(){v.modalDataView(h.id)},0),p};Web.DataView.alert=function(n,t){alert(n);t&&t()};Web.DataView.isSaaS=function(){var n=this;return n._isSaaS==null&&(n._isSaaS=!1,$("script").each(function(){this.src.match(/\/factory(.*?)\.js/)&&(n._isSaaS=!0)})),n._isSaaS};Web.DataView._resizeInterval=null;Web.DataView._resizing=!1;Web.DataView._resized=!1;Web.DataView._customInputElements=[];var $appfactory=Web.DataView,$app=$appfactory;Web.DataView.borderBox=function(n){var t=$(n);return{horizontal:t.outerWidth()-t.innerWidth(),vertical:t.outerHeight()-t.innerHeight()}};Web.DataView.paddingBox=function(n){var t=$(n);return{horizontal:t.innerWidth()-t.width(),vertical:t.innerHeight()-t.height()}};Web.DataView.marginBox=function(n){var t=$(n);return{horizontal:t.outerWidth(!0)-t.outerWidth(),vertical:t.outerHeight(!0)-t.outerHeight()}};Web.DataView.bounds=function(n){var t=$(n),i=t.offset();return{x:i.left,y:i.top,width:t.outerWidth(),height:t.outerHeight()}};Web.DataView.scrolling=function(){var n=$(window);return{x:n.scrollLeft(),y:n.scrollTop()}};Web.DataView.clientBounds=function(){var n=$(window);return{width:n.width(),height:n.height()}};Web.DataView._activate=function(n,t,i){var a=new RegExp("^\\s*"+i+"\\s*\\|"),r=$get(t),f,e,u,s,o,h;if(i=="SideBarTask"){for(f=r;f&&String.isNullOrEmpty(this.prototype.dataAttr(f,"flow"));)f=f.parentNode;for(e=f.getElementsByTagName("div"),u=0;u<e.length;u++)s=this.prototype.dataAttr(e[u],"activator"),!String.isNullOrEmpty(s)&&a.exec(s)&&$(e[u]).hide()}if(Sys.UI.DomElement.setVisible(r,i=="SideBarTask"?!0:!Sys.UI.DomElement.getVisible(r)),r._activated=!0,i=="SiteAction"&&r.childNodes[0].className!="CloseSiteAction"&&(o=document.createElement("div"),o.className="CloseSiteAction",o.innerHTML=String.format("<a href=\"javascript:\" onclick=\"Web.DataView._activate(null,'{0}','SiteAction')\">{1}<\/a>",t,Web.DataViewResources.ModalPopup.Close),r.insertBefore(o,r.childNodes[0])),Sys.UI.DomElement.getVisible(r)){var c=$common.getBounds(r),v=$common.getClientBounds(),l=$app.scrolling();(c.y<l.y||c.y>l.y+v.height)&&r.scrollIntoView(!1)}if(n){while(n&&!Sys.UI.DomElement.containsCssClass(n,"Task"))n=n.parentNode;for(u=0;u<n.parentNode.childNodes.length;u++)h=n.parentNode.childNodes[u],h.className&&Sys.UI.DomElement.removeCssClass(h,"Selected");Sys.UI.DomElement.addCssClass(n,"Selected")}_body_performResize()};Web.DataView._partialUpdateBeginRequest=function(n,t){for(var i,f,s,e=t.get_request(),o=Sys.Application.getComponents(),r=[],u=0;u<o.length;u++)i=o[u],i._controller&&i._viewId&&Web.DataView.isInstanceOfType(i)&&(f=i.get_tag(),String.isNullOrEmpty(f)||(Array.add(r,f),Array.add(r,i.get_selectedKey())));s=Sys.Serialization.JavaScriptSerializer.serialize(r);e.set_body(e.get_body()+"&"+encodeURIComponent("__WEB_DATAVIEWSTATE")+"="+encodeURIComponent(s))};Web.DataView._load=function(){var k,s,t,u,it,e,i,h,rt,n,y,p,c,w,l,ut,b,a,ft,v,et,ot;if(!Web.DataView._loaded){if(Sys.WebForms&&Sys.WebForms.PageRequestManager._instance&&Sys.WebForms.PageRequestManager._instance.add_beginRequest(Web.DataView._partialUpdateBeginRequest),Web.DataView._loaded=!0,updateACT(),typeof __baseUrl=="undefined"&&(__baseUrl="../"),$("#PageHeaderSideBar .PageLogo").attr("src",__baseUrl+"app_themes/_shared/placeholder.gif"),Web.DataView.supportsPlaceholder="placeholder"in document.createElement("input"),k=$get("PageContent"),k){for($("body").find('div[data-app-role="page"]').remove(),s=document.body.getElementsByTagName("div"),t=0;t<s.length;t++)if(s[t].className.match(/Loading/)){Sys.UI.DomElement.removeCssClass(s[t],"Loading");break}s=k.getElementsByTagName("div");var f=[],d=0,st=!1,g=!1,o=null,nt=[];for(Web.DataView._numberOfContainers=0,u=Web.DataView.prototype.dataAttr,t=0;t<s.length;t++){var r=s[t],tt=u(r,"width"),ht=u(r,"flow");if(!String.isNullOrEmpty(tt)||!String.isNullOrEmpty(ht)){if($(r).find("div[data-flow]").length)continue;for(ht!="NewColumn"&&(r.style.clear="left",d++),String.isNullOrEmpty(r.id)&&(r.id="_lc"+f.length),Sys.UI.DomElement.addCssClass(r,"LayoutContainer"),Web.DataView._numberOfContainers++,tt!="100%"&&(r.style.overflow="hidden"),Array.add(f,{id:r.id,width:tt,rowIndex:d,peersWithoutWidth:0}),it=r.getElementsByTagName("div"),e=[],i=0;i<it.length;i++)h=it[i],rt=u(h,"activator"),String.isNullOrEmpty(rt)||(h.id=String.isNullOrEmpty(h.id)?r.id+"$a"+i:h.id,n={elem:h,activator:rt.split("|"),id:h.id},n.activator[0]=n.activator[0].trim(),n.activator.length==1&&(n.activator[1]=i.toString()),Array.add(e,n));for(i=1;i<e.length;){for(n=e[i],y=0;y<i;y++)if(p=e[y],p.activator[0]==n.activator[0]&p.activator[1]==n.activator[1]){while(n.elem.childNodes.length>0)p.elem.appendChild(n.elem.childNodes[0]);delete n.elem;Array.removeAt(e,i);n=null;break}n&&i++}if(e.length>0){for(st=!0,c=[],w=!0,i=0;i<e.length;i++)n=e[i],n.activator[0]=="Tab"?(c.length==0&&(l=document.createElement("div"),l.className="TabBar",r.insertBefore(l,n.elem)),ut={title:n.activator[1],elementId:n.id,selected:c.length==0,description:u(n.elem,"description"),hidden:u(n.elem,"hidden")},Array.add(c,ut),Sys.UI.DomElement.setVisible(n.elem,ut.selected),n.elem._activated=!0,Sys.UI.DomElement.addCssClass(n.elem,"TabBody TabContainer")):n.activator[0]=="SideBarTask"?(o||(o=new Sys.StringBuilder,o.appendFormat('<div class="TaskBox TaskList"><div class="Inner"><div class="Header">{0}<\/div>',Web.DataViewResources.Menu.Tasks)),n.elem._activated=w,w&&(w=!1),Sys.UI.DomElement.setVisible(n.elem,n.elem._activated),o.appendFormat("<div class=\"Task{1}\"{4}><a href=\"javascript:\" onclick=\"Web.DataView._activate(this,'{2}','SideBarTask');return false;\" title='{3}'>{0}<\/a><\/div>",n.activator[1],g?"":" Selected",n.id,Web.DataView.htmlAttributeEncode(u(n.elem,"description")),u(n.elem,"hidden")=="true"?' style="display:none"':""),g=!0):n.activator[0]=="SiteAction"&&Web.Menu.get_siteActionsFamily()?(b=new Web.Item(Web.Menu.get_siteActionsFamily(),n.activator[1],u(n.elem,"description")),b.set_cssClass(u(n.elem,"cssClass")),b.set_script('Web.DataView._activate(null,"{0}","SiteAction")',n.id),Array.add(nt,b),Sys.UI.DomElement.setVisible(n.elem,!1)):Sys.UI.DomElement.setVisible(n.elem,!1),n.elem=null;c.length>0&&($create(Web.Menu,{id:r.id+"$ActivatorMenu",nodes:c},null,null,l),c.length<2&&t==0&&Sys.UI.DomElement.addCssClass(l,"EmptyTabBar"))}}}for(st&&Web.DataView._performDelayedLoading(),g&&o&&(a=$getSideBar(),a&&(o.append("<\/div><\/div>"),ft=document.createElement("div"),ft.innerHTML=o.toString(),o.clear(),a.insertBefore(ft,a.childNodes[0]),a._hasActivators=!0)),nt.length>0&&Web.Menu.set_siteActions(nt),v=d;f.length>0&&v>=f[0].rowIndex;){for(et=0,ot=0,t=0;t<f.length;t++)lc=f[t],lc.rowIndex==v&&(ot++,String.isNullOrEmpty(lc.width)&&et++);for(t=0;t<f.length;t++)lc=f[t],lc.rowIndex==v&&(lc.peersWithoutWidth=et,ot==1&&String.isNullOrEmpty(lc.width)&&(lc.width="100%"));v--}Web.DataView._layoutContainers=f;_body_performResize();$addHandler(window,"resize",_body_resize);$addHandler(window,"scroll",_body_scroll)}Web.DataView._startDelayedLoading();$addHandler(document.body,"keydown",_body_keydown)}};Web.DataView._unload=function(){this._state&&(Array.clear(this._state),delete this._state);Web.DataView._delayedLoadingTimer&&(clearInterval(Web.DataView._delayedLoadingTimer),Array.clear(Web.DataView._delayedLoadingViews),delete Web.DataView._delayedLoadingViews);$get("PageContent")&&($removeHandler(window,"resize",_body_resize),$removeHandler(window,"scroll",_body_scroll));$removeHandler(document.body,"keydown",_body_keydown)};Web.DataView._startDelayedLoading=function(){Web.DataView._delayedLoadingViews.length>0&&!Web.DataView._delayedLoadingTimer&&(Web.DataView._delayedLoadingTimer=setInterval(function(){Web.DataView._performDelayedLoading()},1e3))};Web.DataView._updateBatchSelectStatus=function(n,t){for(var r=t?"Item":"Cell",i=n.parentNode;i!=null&&!Sys.UI.DomElement.containsCssClass(i,r);)i=i.parentNode;i&&(n.checked?Sys.UI.DomElement.addCssClass(i,"BatchEditFrame"):Sys.UI.DomElement.removeCssClass(i,"BatchEditFrame"))};Web.DataView.highlightFilterValues=function(n,t,i){while(n&&n.tagName!="TABLE")n=n.parentNode;n&&(t&&!n.className.match(i)?Sys.UI.DomElement.addCssClass(n,i):!t&&n.className.match(i)&&Sys.UI.DomElement.removeCssClass(n,i))};Web.DataView.get_commandLine=function(){var n=Web.DataView._commandLine;return n||(typeof __dacl!="undefined"&&(n=__dacl),n||(n=typeof Web.Membership!="undefined"?Web.Membership._instance.get_commandLine():null,n=n?location.pathname+"?"+n:location.href),Web.DataView._commandLine=$app.unanchor(n)),n};Web.DataView._parse=function(){this._parsed||(this._parsed=!0,$("div[data-controller]").each(function(){var n=$(this),i=n.attr("data-controller"),t,r,u;i&&(t=n.attr("id"),t||(t=i),r={id:t,controller:i,baseUrl:__baseUrl,servicePath:__servicePath,showSearchBar:!0},u=[{name:"autoHide",aliases:["nothing","self","container"],values:[0,1,2]},{name:"autoSelectFirstRow",type:"bool"},{name:"autoHighlightFirstRow",type:"bool"},{name:"filterSource"},{name:"filterFields"},{name:"pageSize",type:"int"},{name:"refreshInterval",type:"int"},{name:"searchByFirstLetter",type:"bool",propName:"showFirstLetters"},{name:"searchOnStart",type:"bool"},{name:"selectionMode",aliases:["single","multiple"],values:["Single","Multiple"]},{name:"showActionBar",type:"bool"},{name:"showActionButtons",aliases:["none","top","bottom","top-and-bottom"],values:["None","Top","Bottom","TopAndBottom"]},{name:"showDetailsInListMode",type:"bool"},{name:"showDescription",type:"bool"},{name:"showInSummary",type:"bool"},{name:"showModalForms",type:"bool"},{name:"showQuickFind",type:"bool"},{name:"showPageSize",type:"bool"},{name:"showPager",aliases:["none","top","bottom","top-and-bottom"],values:["None","Top","Bottom","TopAndBottom"]},{name:"showRowNumber",type:"bool"},{name:"showSearchBar",type:"bool"},{name:"showViewSelector",type:"bool"},{name:"startCommandName"},{name:"startCommandArgument"},{name:"summaryFieldCount",type:"int"},{name:"tag"},{name:"view"},{name:"visibleWhen"}],$(u).each(function(){var t=this,i=n.attr("data-"+t.name.replace(/([A-Z])/g,"-$1"));i&&(t.aliases&&(i=t.values[Array.indexOf(t.aliases,i.toString().toLowerCase())]),t.type=="bool"&&(i=i=="true"),t.type=="int"&&(i=parseInt(i)),r[t.propName||t.name]=i)}),n.attr("id",null),$create(Web.DataView,r,null,null,this))}))};Web.DataView.DetailsRegex=/\/Details\.aspx\?/i;Web.DataView.LocationRegex=/^(_.+?):(.+)$/;Web.DataView.LEVs=[];Web.DataView.Editors=[];Web.DataView.EditorFactories={},function(){var n=Sys.CultureInfo.CurrentCulture.dateTimeFormat;Web.DataView.dateFormatStrings={"{0:g}":n.ShortDatePattern+" "+n.ShortTimePattern,"{0:G}":n.ShortDatePattern+" "+n.LongTimePattern,"{0:f}":n.LongDatePattern+" "+n.ShortTimePattern,"{0:u}":n.SortableDateTimePattern,"{0:U}":n.UniversalSortableDateTimePattern}}();Sys.Application.add_load(function(){Web.DataView._parse()});$.mobile||(Sys.Application.add_load(Web.DataView._load),Sys.Application.add_unload(Web.DataView._unload));Sys.UI.DomElement.setFocus=function(n){var t=document.selection;t&&t.type!="Text"&&t.type!="None"&&t.clear();n&&(n.focus(),n.select&&n.select(),document.focus&&document.focus())};Sys.UI.DomElement.getCaretPosition=function(n){var t=0,i;return document.selection?(n.focus(),i=document.selection.createRange(),i.moveStart("character",-n.value.length),t=i.text.length):(n.selectionStart||n.selectionStart=="0")&&(t=n.selectionStart),t};Sys.UI.DomElement.setCaretPosition=function(n,t){if(n.setSelectionRange)n.focus(),n.setSelectionRange(t,t);else if(n.createTextRange){var i=n.createTextRange();i.collapse(!0);i.moveEnd("character",t);i.moveStart("character",t);i.select()}};Array.indexOfCaseInsensitive=function(n,t){t=t.toLowerCase();for(var i=0;i<n.length;i++)if(n[i].toLowerCase()==t)return i;return-1};Number.tryParse=function(n){var t,i,r;return typeof n!="string"?null:String.isNullOrEmpty(n)?null:(t=Number.parseLocale(n),isNaN(t)&&(i=Sys.CultureInfo.CurrentCulture.numberFormat,i._simplifyRegex||(i._simplifyRegex=new RegExp(String.format("({0}|\\{1})",i.CurrencySymbol.replace(/(\W)/g,"\\$1"),i.CurrencyGroupSeparator),"gi")),r=n.match(/\(/)!=null,n=n.replace(i._simplifyRegex,"").replace(/\(|\)/g,""),n=n.replace(i.CurrencyDecimalSeparator,i.NumberDecimalSeparator),t=Number.parseLocale(n),isNaN(t)&&(t=Number.parseLocale(n.replace(i.PercentSymbol,"")),isNaN(t)||(t/=100))),!isNaN(t))?(r&&(t*=-1),t):null};Date.tryParseFuzzyDate=function(n,t){var r,i,v,u,f,s,o,h,c,l,e,a;if(String.isNullOrEmpty(n))return null;if(r=Sys.CultureInfo.CurrentCulture.dateTimeFormat,i=Date.parseLocale(n,r.ShortDatePattern),i==null&&(i=Date.parseLocale(n,r.LongDatePattern)),i!=null||String.isNullOrEmpty(t)||(v=t.match(/\{0:([\s\S]*?)\}/),v&&(i=Date.parseLocale(n,v[1]))),i)return i;if(i=new Date,u=n.match(/^\s*(\w+)\s*$/),u&&(f=Array.indexOfCaseInsensitive(r.DayNames,u[1]),f==-1&&(f=Array.indexOfCaseInsensitive(r.AbbreviatedDayNames,u[1])),f==-1&&(f=Array.indexOfCaseInsensitive(r.ShortestDayNames,u[1])),f>=0)){while(i.getDay()!=f)i.setDate(i.getDate()+1);return i}if(u=n.match(/^\s*(\w+|\d+)[^\w\d]*(\w+|\d+)\s*$/),u&&(s=u[1],o=u[2],s.match(/\d+/)&&(s=o,o=u[1]),u=o.match(/\d+/),o=u?u[0]:1,f=Array.indexOfCaseInsensitive(r.MonthNames,s),f==-1&&(f=Array.indexOfCaseInsensitive(r.AbbreviatedMonthNames,s)),f>=0)){for(i.setDate(1);i.getMonth()!=f;)i.setMonth(i.getMonth()+1);return i.setDate(o),i}if(u=n.match(/^\s*(\d\d?)(\D*(\d\d?))?(\D*(\d+))?\s*$/),!u)return null;try{r.LogicalYearPosition||(h=r.ShortDatePattern.indexOf("m"),h<0&&(h=r.ShortDatePattern.indexOf("M")),c=r.ShortDatePattern.indexOf("d"),c<0&&(c=r.ShortDatePattern.indexOf("D")),r.LogicalYearPosition=5,r.LogicalMonthPosition=h<c?1:3,r.LogicalDayPosition=h<c?3:1);l=u[r.LogicalYearPosition];l=String.isNullOrEmpty(l)?i.getFullYear():Number.parseLocale(l);e=u[r.LogicalMonthPosition];String.isNullOrEmpty(e)?e=i.getMonth():(e=Number.parseLocale(e),e--);a=u[r.LogicalDayPosition];a=String.isNullOrEmpty(a)?i.getDay():Number.parseLocale(a);i=new Date(l,e,a)}catch(y){return null}return i};Date.tryParseFuzzyTime=function(n,t){if(String.isNullOrEmpty(n))return null;var u=null,f=Sys.CultureInfo.CurrentCulture.dateTimeFormat,i=n.match(/^\s*(\d\d?)(\D*(\d\d?))?(\s*(\w+))?\s*$/);if(i||(i=n.match(/^\s*(\d\d?)(\D*(\d\d?))?(\D*(\d\d?))?(\D*(\d+))?(\s*([\S\s]+))?\s*$/)),i){u=new Date;var r=i[1],e=i[3],o=i.length==10?i[5]:"",s=i.length==10?i[7]:"",h=i[i.length-1];String.isNullOrEmpty(r)||(r=Number.parseLocale(r),String.isNullOrEmpty(h)?t!=!1&&!String.isNullOrEmpty(f.PMDesignator)&&f.ShortTimePattern.indexOf("tt")>0&&(new Date).getHours()>=12&&(r+=12):h.toLowerCase()==f.PMDesignator.toLowerCase()?r!=12&&(r+=12):r==12&&(r=0),u.setHours(r));String.isNullOrEmpty(e)||u.setMinutes(Number.parseLocale(e));u.setSeconds(String.isNullOrEmpty(o)?0:Number.parseLocale(o));u.setMilliseconds(String.isNullOrEmpty(s)?0:Number.parseLocale(s))}return u};Sys.Serialization.JavaScriptSerializer.deserialize=function(n,t){var i,r,u;Sys.Serialization.JavaScriptSerializer._timeZoneOffset==null&&(Sys.Serialization.JavaScriptSerializer._timeZoneOffset="$1new Date($2)",typeof __timeZoneUtcOffset!="undefined"&&(i=((new Date).getTimezoneOffset()+__timeZoneUtcOffset)*6e4,i!=0&&(Sys.Serialization.JavaScriptSerializer._timeZoneOffset=String.format("$1new Date($2{0}{1})",i<0?"-":"+",i<0?i*-1:i))));r=Sys.Serialization.JavaScriptSerializer._esc;try{if(u=n.replace(r.dateRegEx,Sys.Serialization.JavaScriptSerializer._timeZoneOffset),t&&r.jsonRegEx.test(u.replace(r.jsonStringRegEx,"")))throw null;return eval("("+u+")")}catch(f){throw Error.argument("data",Sys.Res.cannotDeserializeInvalidJson);}};Date.$addDays=function(n,t){return n?new Date(n.setDate(n.getDate()+t)):n};Date.$now=function(){return new Date};Date.$today=function(){var n=new Date;return new Date(n.getFullYear(),n.getMonth(),n.getDate(),0,0,0)};Date.$endOfDay=function(){var n=new Date;return new Date(n.getFullYear(),n.getMonth(),n.getDate(),23,59,59)};Date.$within=function(n,t){return n?n<Date.$addDays(Date.$today(),t)&&n>=Date.$today():!1};Date.$pastDue=function(n,t){return t==null&&(t=new Date),t.getHours()==0&&(t=new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59)),n==null&&(n=new Date),n>t};Web.DataView._blankRegex=/^\s*$/;Web.DataView._fieldFilterRegex=/(\w+):([\s\S]*)/;Web.DataView._filterRegex=/(\*|~|\$\w+\$|=|~|>=?|<(=|>){0,1})([\s\S]*?)(\0|$)$/;Web.DataView._filterIteratorRegex=/(\*|~|\$\w+\$|=|~|>=?|<(=|>){0,1})([\s\S]*?)(\0|$)/g;Web.DataView._keepCapitalization=/^\$(month|quarter|true|false)/;Web.DataView._listRegex=/\$and\$|\$or\$/;Web.DataView._simpleListRegex=/\s*,\s*/;Web.DataView._htmlTest=/<\w+.*?>/;Web.BusinessRules=function(n){this._dataView=n;this.result=new Web.BusinessRules.Result(this)};Web.BusinessRules.prototype={canceled:function(){return this._canceled==!0},dispose:function(){this.reset(null);this._dataView=null;this.result._rules=null},reset:function(n){this._actionArgs=null;this._args=n},_initialize:function(){if(!this._actionArgs){var n=this._dataView;this._actionArgs=n._createArguments(this._args,null);n.get_isEditing()&&(n._validateFieldValues(this._actionArgs.Values,this._args.causesValidation==null||this._args.causesValidation),this._valid=n.validate(this._actionArgs.Values))}},process:function(n){var e=this._dataView,o=this._args.commandName,u,v,t,r,s,w,c,f,y,l,i,h,p,a;if(o=="Calculate"&&e._lookupIsActive){this.preventDefault();return}if(u=Web.DataView.Geo,u&&!(__tf!=4)&&o.match(/New|Edit/)){for(v=this._dataView._fields,t=0;t<v.length;t++)r=v[t],r.readOnly||(r.tagged("modified-latitude")||r.tagged("created-latitude")&&o=="New"?this.updateFieldValue(r.Name,u.latitude==-1?null:u.latitude):r.tagged("modified-longitude")||r.tagged("created-longitude")&&o=="New"?this.updateFieldValue(r.Name,u.longitude==-1?null:u.longitude):(r.tagged("modified-coords")||r.tagged("created-coords")&&o=="New")&&this.updateFieldValue(r.Name,u.latitude==-1?null:String.format("{0},{1}",u.latitude,u.longitude)));this._newValues&&(e._updateCalculatedFields({Errors:[],Values:this._newValues}),this._newValues=null)}if(s=e._expressions,s&&s.length!=0){if(!this._rules)for(this._rules=[],w=0,t=0;t<s.length;t++)c=s[t],c.Type==Web.DynamicExpressionType.ClientScript&&c.Scope==Web.DynamicExpressionScope.Rule&&(f=c.Result.match(/^<id>(.+?)<\/id><commandName>(.+?)<\/commandName><commandArgument>(.*?)<\/commandArgument><view>(.*?)<\/view><phase>(.*?)<\/phase><script>([\s\S]+?)<\/script>$/),f&&(y=String.format("Web.BusinessRules.{0}_Rule_{1}",e._controller,f[1]?f[1]:w),l=eval(String.format('typeof {0} !="undefined"?{0}:null',y)),l||(l=eval(this._parseRule(y,f[6]))),Array.add(this._rules,{commandName:f[2],commandArgument:f[3],view:f[4],phase:f[5],script:l})));for(t=0;t<this._rules.length;t++)if((i=this._rules[t],i.phase==n)&&(h=!1,String.isNullOrEmpty(i.view)||(p=e.get_viewId(),i.view==p||p.match(new RegExp(i.view))||(h=!0)),String.isNullOrEmpty(i.commandName)||(o=this._args.commandName,i.commandName==o||o.match(new RegExp(i.commandName))||(h=!0)),String.isNullOrEmpty(i.commandArgument)||(a=this._args.commandArgument,i.commandArgument==a||a&&a.match(new RegExp(i.commandArgument))||(h=!0)),!h&&(i.script.call(this),this.canceled())))break;this._newValues?(e._updateCalculatedFields({Errors:[],Values:this._newValues}),delete this._newValues,this._pendingFocus()):this.canceled()&&e.get_isDataSheet()&&(e._updateCalculatedFields({Errors:[],Values:[]}),this._pendingFocus())}},_pendingFocus:function(){this._focusFieldName&&(this._dataView._focus(this._focusFieldName,this._focusMessage),this._focusFieldName=null)},before:function(n){this.reset(n);this.process("Before");this.canceled()||this.process("Execute")},after:function(n){this._dataView._isBusy||(this.reset(n),this.process("After"))},_parseRule:function(n,t){var i=new Sys.StringBuilder,r;return i.appendFormat("{0}=function(){{\n",n),r=/([\s\S]*?)(\[(\w+)(\.(\w+))?\](\s*=([^=][\s\S]+?);)?)/g,this._parseScript(i,r,t),t=i.toString(),i.clear(),this._parseScript(i,r,t),i.append("\n}"),i.toString()},_parseScript:function(n,t,i){for(var f=-1,r=t.exec(i),u,e,o;r;)n.append(r[1]),u=r[3],e=r[5],r[1].match(/\w$/)?n.append(r[2]):u.match(/^master$/i)?n.appendFormat("this.fieldValue('{0}','Master')",e):(o=this._dataView.findField(u),String.isNullOrEmpty(r[7])?n.appendFormat("this.fieldValue('{0}','{1}')",u,e):n.appendFormat("this.updateFieldValue('{0}',{1});",u,r[7])),f=t.lastIndex,r=t.exec(i);f!=-1?n.append(f<i.length?i.substr(f):""):n.append(i)},preventDefault:function(){this._canceled=!0;this._dataView._raiseSelectedDelayed=!1;this._dataView._pendingSelectedEvent=!1},validateInput:function(){return this._initialize(),this._valid==!0},dataView:function(){return this._dataView},arguments:function(){return this._initialize(),this._actionArgs},selectFieldValueObject:function(n){var i,t,r;for(this._initialize(),i=this._actionArgs.Values,t=0;t<i.length;t++)if(r=i[t],n==r.Name)return r;return null},selectFieldValue:function(n){var t=this.selectFieldValueObject(n);return t?t.Modified?t.NewValue:t.OldValue:null},fieldValue:function(n,t){var r,i;if(t=="Master")return r=this._dataView.get_master(),r?r.fieldValue(n):null;if(!t||t=="Value")return this.selectFieldValue(n);i=this.selectFieldValueObject(n);i||this._unknownField(n);switch(t){case"NewValue":return i.NewValue;case"OldValue":return i.OldValue;case"Modified":return i.Modified;case"ReadOnly":return i.ReadOnly;case"Error":return i.Error;default:return i.OldValue}},updateFieldValue:function(n,t){var u=this.selectFieldValueObject(n),i,r;if(u){for(u.NewValue=t,u.Modified=!0,i=this._newValues,i||(i=this._newValues=[]),r=0;r<i.length;r++)if(i[r].Name==n){Array.removeAt(i,r);break}Array.add(i,u)}else this._unknownField(n)},property:function(n,t){if(n="Rules$"+n,arguments.length==1)return this._dataView.readContext(n);this._dataView.writeContext(n,t)},_unknownField:function(n){throw new Error(String.format('Unknown field "{0}" is not defined in  /controllers/{1}/views/{2}.',n,this._dataView._controller,this._dataView._viewId));}};Web.BusinessRules.Result=function(n){this._rules=n};Web.BusinessRules.Result.prototype={focus:function(n){var i=null,r,t,u;arguments.length>1&&(r=Array.clone(arguments),Array.removeAt(r,0),i=String._toFormattedString(!0,r));t=this._rules;u=t._dataView;t._focusFieldName=n;t._focusMessage=i;u._focus(n,i)},showMessage:function(){Web.DataView.showMessage(String._toFormattedString(!0,arguments))},showViewMessage:function(){this._rules._dataView.showViewMessage(String._toFormattedString(!0,arguments))},showAlert:function(){alert(String._toFormattedString(!0,arguments))},confirm:function(){return confirm(String._toFormattedString(!0,arguments))},refresh:function(n){this._rules._dataView(n==!0)},refreshChildren:function(){var n=this._rules._dataView;n._forceChanged=!0;n._raiseSelectedDelayed=!0;this.refresh(!0)}};Web$DataView$RichText=function(){};Web$DataView$RichText.prototype={attach:function(n){var f=$(n),r,t,e,i,u,o;return f.addClass("dataview-rich-text"),r=$("html").attr("lang"),String.isNullOrEmpty(r)&&(r=$("html").attr("xml:lang")),typeof CKEDITOR!="undefined"?($("<div><\/div>").insertAfter(f).width(f.outerWidth()).height(1),CKEDITOR.replace(n.id,{language:r,on:{instanceReady:function(t){var i=CKEDITOR.instances[n.id].getCommand("maximize");i&&(i._old_exec=i.exec,i.exec=function(n){this._old_exec(n);$(t.editor.container.$).find(".cke_maximized").css("z-index",10001)})}}})):(t=Web.DataViewResources.Editor,e=[{CommandName:"Undo",Tooltip:t.Undo},{CommandName:"Redo",Tooltip:t.Redo},{CommandName:"Bold",Tooltip:t.Bold,ElementWhiteList:{b:["style"],strong:["style"]}},{CommandName:"Italic",Tooltip:t.Italic,ElementWhiteList:{i:["style"],em:["style"]}},{CommandName:"Underline",Tooltip:t.Underline,ElementWhiteList:{u:["style"]}},{CommandName:"StrikeThrough",Tooltip:t.Strikethrough,ElementWhiteList:{strike:["style"]}},{CommandName:"Subscript",Tooltip:t.Subscript,ElementWhiteList:{sub:["style"]}},{CommandName:"Superscript",Tooltip:t.Superscript,ElementWhiteList:{sup:["style"]}},{CommandName:"JustifyLeft",Tooltip:t.JustifyLeft,ElementWhiteList:{p:["align"],div:["style","align"]},AttributeWhiteList:{style:["text-align"]},align:["left"]},{CommandName:"JustifyCenter",Tooltip:t.JustifyCenter,ElementWhiteList:{p:["align"],div:["style","align"]},AttributeWhiteList:{style:["text-align"]},align:["center"]},{CommandName:"JustifyRight",Tooltip:t.JustifyRight,ElementWhiteList:{p:["align"],div:["style","align"]},AttributeWhiteList:{style:["text-align"]},align:["right"]},{CommandName:"JustifyFull",Tooltip:t.JustifyFull,ElementWhiteList:{p:["align"],div:["style","align"]},AttributeWhiteList:{style:["text-align"]},align:["justify"]},{CommandName:"insertOrderedList",Tooltip:t.InsertOrderedList,ElementWhiteList:{ol:[],li:[]}},{CommandName:"insertUnorderedList",Tooltip:t.InsertUnorderedList,ElementWhiteList:{ul:[],li:[]}},{CommandName:"createLink",Tooltip:t.CreateLink,ElementWhiteList:{a:["href"]}},{CommandName:"UnLink",Tooltip:t.UnLink},{CommandName:"RemoveFormat",Tooltip:t.RemoveFormat},{CommandName:"SelectAll",Tooltip:t.SelectAll},{CommandName:"UnSelect",Tooltip:t.UnSelect},{CommandName:"Delete",Tooltip:t.Delete},{CommandName:"Cut",Tooltip:t.Cut},{CommandName:"Paste",Tooltip:t.Paste},{CommandName:"BackColor",Tooltip:t.BackColor,ElementWhiteList:{font:"style",span:"style"},AttributeWhiteList:{style:"background-color"}},{CommandName:"ForeColor",Tooltip:t.ForeColor,ElementWhiteList:{font:"color"},AttributeWhiteList:{font:"color"}},{CommandName:"FontName",Tooltip:t.FontName,ElementWhiteList:{font:["face"]},AttributeWhitList:{face:[]}},{CommandName:"FontSize",Tooltip:t.FontSize,ElementWhiteList:{font:["size"]},AttributeWhitList:{size:[]}},{CommandName:"Indent",Tooltip:t.Indent,ElementWhiteList:{blockquote:["style","dir"]},AttributeWhitList:{style:["margin","margin-right","padding","border"],dir:["ltr","rtl","auto"]}},{CommandName:"Outdent",Tooltip:t.Outdent},{CommandName:"InsertHorizontalRule",Tooltip:t.InsertHorizontalRule,ElementWhiteList:{hr:["size","width"]},AttributeWhiteList:{size:[],width:[]}},{CommandName:"HorizontalSeparator",Tooltip:""}],navigator.appVersion.match(/MSIE/)&&e.splice(0,2),i=Sys.Extended.UI.HtmlEditorExtenderBehavior,i._customized||(i.prototype.old_executeCommand=i.prototype._executeCommand,i.prototype._executeCommand=function(n){$(this._editableDiv).focus();this.old_executeCommand(n)},i._customized=!0),u=$create(i,{ToolbarButtons:e,id:n.id+"$Editor"},null,null,n),u._noEncoding=!0,u._editableDiv.tabIndex=n.tabIndex,o=$(u._topButtonContainer),o.find("nobr span").hide(),o.find("select").css({"font-family":"","font-size":""})),!0},detach:function(n){if(typeof CKEDITOR!="undefined")CKEDITOR.remove(n.id);else{var t=$find(n.id+"$Editor");t&&t.dispose()}return!0},persist:function(n){if(typeof CKEDITOR!="undefined")n.value=CKEDITOR.instances[n.id].getData();else{var t=$find(n.id+"$Editor");t&&(n.value=t._editableDiv.innerHTML)}}};typeof Sys!="undefined"&&Sys.Application.notifyScriptLoaded()
;< ! D O C T Y P E   h t m l >  
 < h t m l >  
         < h e a d >  
                 < t i t l e > S e s s i o n   s t a t e   h a s   c r e a t e d   a   s e s s i o n   i d ,   b u t   c a n n o t   s a v e   i t   b e c a u s e   t h e   r e s p o n s e   w a s   a l r e a d y   f l u s h e d   b y   t h e   a p p l i c a t i o n . < / t i t l e >  
                 < m e t a   n a m e = " v i e w p o r t "   c o n t e n t = " w i d t h = d e v i c e - w i d t h "   / >  
                 < s t y l e >  
                   b o d y   { f o n t - f a m i l y : " V e r d a n a " ; f o n t - w e i g h t : n o r m a l ; f o n t - s i z e :   . 7 e m ; c o l o r : b l a c k ; }    
                   p   { f o n t - f a m i l y : " V e r d a n a " ; f o n t - w e i g h t : n o r m a l ; c o l o r : b l a c k ; m a r g i n - t o p :   - 5 p x }  
                   b   { f o n t - f a m i l y : " V e r d a n a " ; f o n t - w e i g h t : b o l d ; c o l o r : b l a c k ; m a r g i n - t o p :   - 5 p x }  
                   H 1   {   f o n t - f a m i l y : " V e r d a n a " ; f o n t - w e i g h t : n o r m a l ; f o n t - s i z e : 1 8 p t ; c o l o r : r e d   }  
                   H 2   {   f o n t - f a m i l y : " V e r d a n a " ; f o n t - w e i g h t : n o r m a l ; f o n t - s i z e : 1 4 p t ; c o l o r : m a r o o n   }  
                   p r e   { f o n t - f a m i l y : " C o n s o l a s " , " L u c i d a   C o n s o l e " , M o n o s p a c e ; f o n t - s i z e : 1 1 p t ; m a r g i n : 0 ; p a d d i n g : 0 . 5 e m ; l i n e - h e i g h t : 1 4 p t }  
                   . m a r k e r   { f o n t - w e i g h t :   b o l d ;   c o l o r :   b l a c k ; t e x t - d e c o r a t i o n :   n o n e ; }  
                   . v e r s i o n   { c o l o r :   g r a y ; }  
                   . e r r o r   { m a r g i n - b o t t o m :   1 0 p x ; }  
                   . e x p a n d a b l e   {   t e x t - d e c o r a t i o n : u n d e r l i n e ;   f o n t - w e i g h t : b o l d ;   c o l o r : n a v y ;   c u r s o r : h a n d ;   }  
                   @ m e d i a   s c r e e n   a n d   ( m a x - w i d t h :   6 3 9 p x )   {  
                     p r e   {   w i d t h :   4 4 0 p x ;   o v e r f l o w :   a u t o ;   w h i t e - s p a c e :   p r e - w r a p ;   w o r d - w r a p :   b r e a k - w o r d ;   }  
                   }  
                   @ m e d i a   s c r e e n   a n d   ( m a x - w i d t h :   4 7 9 p x )   {  
                     p r e   {   w i d t h :   2 8 0 p x ;   }  
                   }  
                 < / s t y l e >  
         < / h e a d >  
  
         < b o d y   b g c o l o r = " w h i t e " >  
  
                         < s p a n > < H 1 > S e r v e r   E r r o r   i n   ' / '   A p p l i c a t i o n . < h r   w i d t h = 1 0 0 %   s i z e = 1   c o l o r = s i l v e r > < / H 1 >  
  
                         < h 2 >   < i > S e s s i o n   s t a t e   h a s   c r e a t e d   a   s e s s i o n   i d ,   b u t   c a n n o t   s a v e   i t   b e c a u s e   t h e   r e s p o n s e   w a s   a l r e a d y   f l u s h e d   b y   t h e   a p p l i c a t i o n . < / i >   < / h 2 > < / s p a n >  
  
                         < f o n t   f a c e = " A r i a l ,   H e l v e t i c a ,   G e n e v a ,   S u n S a n s - R e g u l a r ,   s a n s - s e r i f   " >  
  
                         < b >   D e s c r i p t i o n :   < / b > A n   u n h a n d l e d   e x c e p t i o n   o c c u r r e d   d u r i n g   t h e   e x e c u t i o n   o f   t h e   c u r r e n t   w e b   r e q u e s t .   P l e a s e   r e v i e w   t h e   s t a c k   t r a c e   f o r   m o r e   i n f o r m a t i o n   a b o u t   t h e   e r r o r   a n d   w h e r e   i t   o r i g i n a t e d   i n   t h e   c o d e .  
  
                         < b r > < b r >  
  
                         < b >   E x c e p t i o n   D e t a i l s :   < / b > S y s t e m . W e b . H t t p E x c e p t i o n :   S e s s i o n   s t a t e   h a s   c r e a t e d   a   s e s s i o n   i d ,   b u t   c a n n o t   s a v e   i t   b e c a u s e   t h e   r e s p o n s e   w a s   a l r e a d y   f l u s h e d   b y   t h e   a p p l i c a t i o n . < b r > < b r >  
  
                         < b > S o u r c e   E r r o r : < / b >   < b r > < b r >  
  
                         < t a b l e   w i d t h = 1 0 0 %   b g c o l o r = " # f f f f c c " >  
                               < t r >  
                                     < t d >  
                                             < c o d e >  
  
 A n   u n h a n d l e d   e x c e p t i o n   w a s   g e n e r a t e d   d u r i n g   t h e   e x e c u t i o n   o f   t h e   c u r r e n t   w e b   r e q u e s t .   I n f o r m a t i o n   r e g a r d i n g   t h e   o r i g i n   a n d   l o c a t i o n   o f   t h e   e x c e p t i o n   c a n   b e   i d e n t i f i e d   u s i n g   t h e   e x c e p t i o n   s t a c k   t r a c e   b e l o w . < / c o d e >  
  
                                     < / t d >  
                               < / t r >  
                         < / t a b l e >  
  
                         < b r >  
  
                         < b > S t a c k   T r a c e : < / b >   < b r > < b r >  
  
                         < t a b l e   w i d t h = 1 0 0 %   b g c o l o r = " # f f f f c c " >  
                               < t r >  
                                     < t d >  
                                             < c o d e > < p r e >  
  
 [ H t t p E x c e p t i o n   ( 0 x 8 0 0 0 4 0 0 5 ) :   S e s s i o n   s t a t e   h a s   c r e a t e d   a   s e s s i o n   i d ,   b u t   c a n n o t   s a v e   i t   b e c a u s e   t h e   r e s p o n s e   w a s   a l r e a d y   f l u s h e d   b y   t h e   a p p l i c a t i o n . ]  
       S y s t e m . W e b . S e s s i o n S t a t e . S e s s i o n I D M a n a g e r . S a v e S e s s i o n I D ( H t t p C o n t e x t   c o n t e x t ,   S t r i n g   i d ,   B o o l e a n & a m p ;   r e d i r e c t e d ,   B o o l e a n & a m p ;   c o o k i e A d d e d )   + 4 3 2 1 9 0 4  
       S y s t e m . W e b . S e s s i o n S t a t e . S e s s i o n S t a t e M o d u l e . C r e a t e S e s s i o n I d ( )   + 8 8  
       S y s t e m . W e b . S e s s i o n S t a t e . S e s s i o n S t a t e M o d u l e . D e l a y e d G e t S e s s i o n I d ( )   + 1 0 3  
       S y s t e m . W e b . S e s s i o n S t a t e . S e s s i o n S t a t e M o d u l e . O n R e l e a s e S t a t e ( O b j e c t   s o u r c e ,   E v e n t A r g s   e v e n t A r g s )   + 7 8 8  
       S y s t e m . W e b . S y n c E v e n t E x e c u t i o n S t e p . S y s t e m . W e b . H t t p A p p l i c a t i o n . I E x e c u t i o n S t e p . E x e c u t e ( )   + 1 3 9  
       S y s t e m . W e b . H t t p A p p l i c a t i o n . E x e c u t e S t e p I m p l ( I E x e c u t i o n S t e p   s t e p )   + 1 9 5  
       S y s t e m . W e b . H t t p A p p l i c a t i o n . E x e c u t e S t e p ( I E x e c u t i o n S t e p   s t e p ,   B o o l e a n & a m p ;   c o m p l e t e d S y n c h r o n o u s l y )   + 8 8  
 < / p r e > < / c o d e >  
  
                                     < / t d >  
                               < / t r >  
                         < / t a b l e >  
  
                         < b r >  
  
                         < h r   w i d t h = 1 0 0 %   s i z e = 1   c o l o r = s i l v e r >  
  
                         < b > V e r s i o n   I n f o r m a t i o n : < / b > & n b s p ; M i c r o s o f t   . N E T   F r a m e w o r k   V e r s i o n : 4 . 0 . 3 0 3 1 9 ;   A S P . N E T   V e r s i o n : 4 . 7 . 3 9 3 0 . 0  
  
                         < / f o n t >  
  
         < / b o d y >  
 < / h t m l >  
 < ! - -    
 [ H t t p E x c e p t i o n ] :   S e s s i o n   s t a t e   h a s   c r e a t e d   a   s e s s i o n   i d ,   b u t   c a n n o t   s a v e   i t   b e c a u s e   t h e   r e s p o n s e   w a s   a l r e a d y   f l u s h e d   b y   t h e   a p p l i c a t i o n .  
       a t   S y s t e m . W e b . S e s s i o n S t a t e . S e s s i o n I D M a n a g e r . S a v e S e s s i o n I D ( H t t p C o n t e x t   c o n t e x t ,   S t r i n g   i d ,   B o o l e a n &   r e d i r e c t e d ,   B o o l e a n &   c o o k i e A d d e d )  
       a t   S y s t e m . W e b . S e s s i o n S t a t e . S e s s i o n S t a t e M o d u l e . C r e a t e S e s s i o n I d ( )  
       a t   S y s t e m . W e b . S e s s i o n S t a t e . S e s s i o n S t a t e M o d u l e . D e l a y e d G e t S e s s i o n I d ( )  
       a t   S y s t e m . W e b . S e s s i o n S t a t e . S e s s i o n S t a t e M o d u l e . O n R e l e a s e S t a t e ( O b j e c t   s o u r c e ,   E v e n t A r g s   e v e n t A r g s )  
       a t   S y s t e m . W e b . H t t p A p p l i c a t i o n . S y n c E v e n t E x e c u t i o n S t e p . S y s t e m . W e b . H t t p A p p l i c a t i o n . I E x e c u t i o n S t e p . E x e c u t e ( )  
       a t   S y s t e m . W e b . H t t p A p p l i c a t i o n . E x e c u t e S t e p I m p l ( I E x e c u t i o n S t e p   s t e p )  
       a t   S y s t e m . W e b . H t t p A p p l i c a t i o n . E x e c u t e S t e p ( I E x e c u t i o n S t e p   s t e p ,   B o o l e a n &   c o m p l e t e d S y n c h r o n o u s l y )  
 - - > < ! - -    
 T h i s   e r r o r   p a g e   m i g h t   c o n t a i n   s e n s i t i v e   i n f o r m a t i o n   b e c a u s e   A S P . N E T   i s   c o n f i g u r e d   t o   s h o w   v e r b o s e   e r r o r   m e s s a g e s   u s i n g   & l t ; c u s t o m E r r o r s   m o d e = " O f f " / & g t ; .   C o n s i d e r   u s i n g   & l t ; c u s t o m E r r o r s   m o d e = " O n " / & g t ;   o r   & l t ; c u s t o m E r r o r s   m o d e = " R e m o t e O n l y " / & g t ;   i n   p r o d u c t i o n   e n v i r o n m e n t s . - - > 