Type.registerNamespace("AjaxControlToolkit");AjaxControlToolkit.BoxSide=function(){};AjaxControlToolkit.BoxSide.prototype={Top:0,Right:1,Bottom:2,Left:3};AjaxControlToolkit.BoxSide.registerEnum("AjaxControlToolkit.BoxSide",false);AjaxControlToolkit._CommonToolkitScripts=function(){};AjaxControlToolkit._CommonToolkitScripts.prototype={_borderStyleNames:["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"],_borderWidthNames:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],_paddingWidthNames:["paddingTop","paddingRight","paddingBottom","paddingLeft"],_marginWidthNames:["marginTop","marginRight","marginBottom","marginLeft"],getCurrentStyle:function(b,c,e){var d="undefined",a=null;if(b){if(b.currentStyle)a=b.currentStyle[c];else if(document.defaultView&&document.defaultView.getComputedStyle){var f=document.defaultView.getComputedStyle(b,null);if(f)a=f[c]}if(!a&&b.style.getPropertyValue)a=b.style.getPropertyValue(c);else if(!a&&b.style.getAttribute)a=b.style.getAttribute(c)}if(!a||a==""||typeof a===d)if(typeof e!=d)a=e;else a=null;return a},getInheritedBackgroundColor:function(b){var d="backgroundColor",c="#FFFFFF";if(!b)return c;var a=this.getCurrentStyle(b,d);try{while(!a||a==""||a=="transparent"||a=="rgba(0, 0, 0, 0)"){b=b.parentNode;if(!b)a=c;else a=this.getCurrentStyle(b,d)}}catch(e){a=c}return a},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("element");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("element");return {width:a.offsetWidth,height:a.offsetHeight}},setContentSize:function(a,b){var d="border-box",c=this;if(!a)throw Error.argumentNull("element");if(!b)throw Error.argumentNull("size");if(c.getCurrentStyle(a,"MozBoxSizing")==d||c.getCurrentStyle(a,"BoxSizing")==d){var f=c.getBorderBox(a),e=c.getPaddingBox(a);b={width:b.width+f.horizontal+e.horizontal,height:b.height+f.vertical+e.vertical}}a.style.width=b.width.toString()+"px";a.style.height=b.height.toString()+"px"},setSize:function(a,b){if(!a)throw Error.argumentNull("element");if(!b)throw Error.argumentNull("size");var d=this.getBorderBox(a),c=this.getPaddingBox(a),e={width:b.width-d.horizontal-c.horizontal,height:b.height-d.vertical-c.vertical};this.setContentSize(a,e)},getBounds:function(a){return Sys.UI.DomElement.getBounds(a)},setBounds:function(a,b){if(!a)throw Error.argumentNull("element");if(!b)throw Error.argumentNull("bounds");this.setSize(a,b);$common.setLocation(a,b)},getClientBounds:function(){var b,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("element");var a={top:c.getMargin(b,AjaxControlToolkit.BoxSide.Top),right:c.getMargin(b,AjaxControlToolkit.BoxSide.Right),bottom:c.getMargin(b,AjaxControlToolkit.BoxSide.Bottom),left:c.getMargin(b,AjaxControlToolkit.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("element");var a={top:c.getBorderWidth(b,AjaxControlToolkit.BoxSide.Top),right:c.getBorderWidth(b,AjaxControlToolkit.BoxSide.Right),bottom:c.getBorderWidth(b,AjaxControlToolkit.BoxSide.Bottom),left:c.getBorderWidth(b,AjaxControlToolkit.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("element");var a={top:c.getPadding(b,AjaxControlToolkit.BoxSide.Top),right:c.getPadding(b,AjaxControlToolkit.BoxSide.Right),bottom:c.getPadding(b,AjaxControlToolkit.BoxSide.Bottom),left:c.getPadding(b,AjaxControlToolkit.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("element");if(a AjaxControlToolkit.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,a,"AjaxControlToolkit.BoxSide"));var d=this._borderStyleNames[a],c=this.getCurrentStyle(b,d);return c!="none"},getMargin:function(b,a){if(!b)throw Error.argumentNull("element");if(aAjaxControlToolkit.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,a,"AjaxControlToolkit.BoxSide"));var d=this._marginWidthNames[a],c=this.getCurrentStyle(b,d);try{return this.parsePadding(c)}catch(e){return 0}},getBorderWidth:function(c,a){var b=this;if(!c)throw Error.argumentNull("element");if(aAjaxControlToolkit.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,a,"AjaxControlToolkit.BoxSide"));if(!b.isBorderVisible(c,a))return 0;var e=b._borderWidthNames[a],d=b.getCurrentStyle(c,e);return b.parseBorderWidth(d)},getPadding:function(b,a){if(!b)throw Error.argumentNull("element");if(aAjaxControlToolkit.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,a,"AjaxControlToolkit.BoxSide"));var d=this._paddingWidthNames[a],c=this.getCurrentStyle(b,d);return this.parsePadding(c)},parseBorderWidth:function(d){var h="thick",g="medium",f="thin",e=this;if(!e._borderThicknesses){var c={},a=document.createElement("div");a.style.visibility="hidden";a.style.position="absolute";a.style.fontSize="1px";document.body.appendChild(a);var b=document.createElement("div");b.style.height="0px";b.style.overflow="hidden";a.appendChild(b);var i=a.offsetHeight;b.style.borderTop="solid black";b.style.borderTopWidth=f;c[f]=a.offsetHeight-i;b.style.borderTopWidth=g;c[g]=a.offsetHeight-i;b.style.borderTopWidth=h;c[h]=a.offsetHeight-i;a.removeChild(b);document.body.removeChild(a);e._borderThicknesses=c}if(d){switch(d){case f:case g:case h:return e._borderThicknesses[d];case "inherit":return 0}var j=e.parseUnit(d);Sys.Debug.assert(j.type=="px",String.format(AjaxControlToolkit.Resources.Common_InvalidBorderWidthUnit,j.type));return j.size}return 0},parsePadding:function(a){if(a){if(a=="inherit")return 0;var b=this.parseUnit(a);Sys.Debug.assert(b.type=="px",String.format(AjaxControlToolkit.Resources.Common_InvalidPaddingUnit,b.type));return b.size}return 0},parseUnit:function(a){if(!a)throw Error.argumentNull("value");a=a.trim().toLowerCase();for(var g=a.length,c=-1,f=0;f"9")&&b!="-"&&b!="."&&b!=",")break;c=f}if(c==-1)throw Error.create(AjaxControlToolkit.Resources.Common_UnitHasNoDigits);var e,d;if(c0){var func;if((func=window[value])instanceof Function)return func;else if((func=eval(value))instanceof Function)return func}return null},addCssClasses:function(c,b){for(var a=0;a=a.x&&b=a.y&&c<=a&&a<=57},isKeyNavigation:function(a){return Sys.UI.Key.left<=a&&a<=Sys.UI.Key.down},padLeft:function(c,b,d,a){return $common._pad(c,b||2,d||" ","l",a||false)},padRight:function(c,b,d,a){return $common._pad(c,b||2,d||" ","r",a||false)},_pad:function(c,b,h,e,g){c=c.toString();var f=c.length,d=new Sys.StringBuilder;e=="r"&&d.append(c);while(fb)if(e=="l")a=a.substr(a.length-b,b);else a=a.substr(0,b);return a},__DOMEvents:{focusin:{eventGroup:"UIEvents",init:function(a){a.initUIEvent("focusin",true,false,window,1)}},focusout:{eventGroup:"UIEvents",init:function(a){a.initUIEvent("focusout",true,false,window,1)}},activate:{eventGroup:"UIEvents",init:function(a){a.initUIEvent("activate",true,true,window,1)}},focus:{eventGroup:"UIEvents",init:function(a){a.initUIEvent("focus",false,false,window,1)}},blur:{eventGroup:"UIEvents",init:function(a){a.initUIEvent("blur",false,false,window,1)}},click:{eventGroup:"MouseEvents",init:function(c,a){var b=false;c.initMouseEvent("click",true,true,window,1,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||b,a.altKey||b,a.shiftKey||b,a.metaKey||b,a.button||0,a.relatedTarget||null)}},dblclick:{eventGroup:"MouseEvents",init:function(c,a){var b=false;c.initMouseEvent("click",true,true,window,2,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||b,a.altKey||b,a.shiftKey||b,a.metaKey||b,a.button||0,a.relatedTarget||null)}},mousedown:{eventGroup:"MouseEvents",init:function(c,a){var b=false;c.initMouseEvent("mousedown",true,true,window,1,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||b,a.altKey||b,a.shiftKey||b,a.metaKey||b,a.button||0,a.relatedTarget||null)}},mouseup:{eventGroup:"MouseEvents",init:function(c,a){var b=false;c.initMouseEvent("mouseup",true,true,window,1,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||b,a.altKey||b,a.shiftKey||b,a.metaKey||b,a.button||0,a.relatedTarget||null)}},mouseover:{eventGroup:"MouseEvents",init:function(c,a){var b=false;c.initMouseEvent("mouseover",true,true,window,1,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||b,a.altKey||b,a.shiftKey||b,a.metaKey||b,a.button||0,a.relatedTarget||null)}},mousemove:{eventGroup:"MouseEvents",init:function(c,a){var b=false;c.initMouseEvent("mousemove",true,true,window,1,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||b,a.altKey||b,a.shiftKey||b,a.metaKey||b,a.button||0,a.relatedTarget||null)}},mouseout:{eventGroup:"MouseEvents",init:function(c,a){var b=false;c.initMouseEvent("mousemove",true,true,window,1,a.screenX||0,a.screenY||0,a.clientX||0,a.clientY||0,a.ctrlKey||b,a.altKey||b,a.shiftKey||b,a.metaKey||b,a.button||0,a.relatedTarget||null)}},load:{eventGroup:"HTMLEvents",init:function(a){a.initEvent("load",false,false)}},unload:{eventGroup:"HTMLEvents",init:function(a){a.initEvent("unload",false,false)}},select:{eventGroup:"HTMLEvents",init:function(a){a.initEvent("select",true,false)}},change:{eventGroup:"HTMLEvents",init:function(a){a.initEvent("change",true,false)}},submit:{eventGroup:"HTMLEvents",init:function(a){a.initEvent("submit",true,true)}},reset:{eventGroup:"HTMLEvents",init:function(a){a.initEvent("reset",true,false)}},resize:{eventGroup:"HTMLEvents",init:function(a){a.initEvent("resize",true,false)}},scroll:{eventGroup:"HTMLEvents",init:function(a){a.initEvent("scroll",true,false)}}},tryFireRawEvent:function(a,b){try{if(a.fireEvent){a.fireEvent("on"+b.type,b);return true}else if(a.dispatchEvent){a.dispatchEvent(b);return true}}catch(c){}return false},tryFireEvent:function(e,d,c){try{if(document.createEventObject){var a=document.createEventObject();$common.applyProperties(a,c||{});e.fireEvent("on"+d,a);return true}else if(document.createEvent){var b=$common.__DOMEvents[d];if(b){var a=document.createEvent(b.eventGroup);b.init(a,c||{});e.dispatchEvent(a);return true}}}catch(f){}return false},wrapElement:function(a,b,c){var d=a.parentNode;d.replaceChild(b,a);(c||b).appendChild(a)},unwrapElement:function(b,a){var c=a.parentNode;if(c!=null){$common.removeElement(b);c.replaceChild(b,a)}},removeElement:function(a){var b=a.parentNode;b!=null&&b.removeChild(a)},applyProperties:function(d,c){for(var b in c){var a=c[b];if(a!=null&&Object.getType(a)===Object){var e=d[b];$common.applyProperties(e,a)}else d[b]=a}},createElementFromTemplate:function(a,j,e){var c=null,b="undefined";if(typeof a.nameTable!=b){var g=a.nameTable;if(String.isInstanceOfType(g))g=e[g];if(g!=c)e=g}var l=c;if(typeof a.name!==b)l=a.name;var d=document.createElement(a.nodeName);if(typeof a.name!==b&&e)e[a.name]=d;if(typeof a.parent!==b&&j==c){var h=a.parent;if(String.isInstanceOfType(h))h=e[h];if(h!=c)j=h}typeof a.properties!==b&&a.properties!=c&&$common.applyProperties(d,a.properties);typeof a.cssClasses!==b&&a.cssClasses!=c&&$common.addCssClasses(d,a.cssClasses);typeof a.events!==b&&a.events!=c&&$addHandlers(d,a.events);typeof a.visible!==b&&a.visible!=c&&this.setVisible(d,a.visible);j&&j.appendChild(d);typeof a.opacity!==b&&a.opacity!=c&&$common.setElementOpacity(d,a.opacity);if(typeof a.children!==b&&a.children!=c)for(var k=0;k=3){e+=parseInt(b.borderLeftWidth);f+=parseInt(b.borderTopWidth)}}b=Sys.UI.DomElement._getCurrentStyle(c);var j=b?b.position:d;if(!j||j!==i)for(a=c.parentNode;a;a=a.parentNode){g=a.tagName?a.tagName.toUpperCase():d;if(g!=="BODY"&&g!=="HTML"&&(a.scrollLeft||a.scrollTop)){e-=a.scrollLeft||0;f-=a.scrollTop||0}b=Sys.UI.DomElement._getCurrentStyle(a);var k=b?b.position:d;if(k&&k===i)break}return new Sys.UI.Point(e,f)};else Sys.UI.DomElement.getLocation=function(e){var i="absolute",d=null;if(e.window&&e.window===e||e.nodeType===9)return new Sys.UI.Point(0,0);for(var f=0,g=0,k=d,h=d,b=d,a=e;a;k=a,h=b,a=a.offsetParent){var c=a.tagName?a.tagName.toUpperCase():d;b=Sys.UI.DomElement._getCurrentStyle(a);if((a.offsetLeft||a.offsetTop)&&!(c==="BODY"&&(!h||h.position!==i))){f+=a.offsetLeft;g+=a.offsetTop}if(k!==d&&b){if(c!=="TABLE"&&c!=="TD"&&c!=="HTML"){f+=parseInt(b.borderLeftWidth)||0;g+=parseInt(b.borderTopWidth)||0}if(c==="TABLE"&&(b.position==="relative"||b.position===i)){f+=parseInt(b.marginLeft)||0;g+=parseInt(b.marginTop)||0}}}b=Sys.UI.DomElement._getCurrentStyle(e);var j=b?b.position:d;if(!j||j!==i)for(a=e.parentNode;a;a=a.parentNode){c=a.tagName?a.tagName.toUpperCase():d;if(c!=="BODY"&&c!=="HTML"&&(a.scrollLeft||a.scrollTop)){f-=a.scrollLeft||0;g-=a.scrollTop||0;b=Sys.UI.DomElement._getCurrentStyle(a);if(b){f+=parseInt(b.borderLeftWidth)||0;g+=parseInt(b.borderTopWidth)||0}}}return new Sys.UI.Point(f,g)};var CommonToolkitScripts=AjaxControlToolkit.CommonToolkitScripts=new AjaxControlToolkit._CommonToolkitScripts,$common=CommonToolkitScripts;Sys.UI.DomElement.getVisible=$common.getVisible;Sys.UI.DomElement.setVisible=$common.setVisible;Sys.UI.Control.overlaps=$common.overlaps;AjaxControlToolkit._DomUtility=function(){};AjaxControlToolkit._DomUtility.prototype={isDescendant:function(c,b){for(var a=b.parentNode;a!=null;a=a.parentNode)if(a==c)return true;return false},isDescendantOrSelf:function(b,a){if(b===a)return true;return AjaxControlToolkit.DomUtility.isDescendant(b,a)},isAncestor:function(a,b){return AjaxControlToolkit.DomUtility.isDescendant(b,a)},isAncestorOrSelf:function(a,b){if(a===b)return true;return AjaxControlToolkit.DomUtility.isDescendant(b,a)},isSibling:function(d,c){for(var b=d.parentNode,a=0;a КартаКарта