function Sys$Component$_setProperties(n,t){var c=Function._validateParams(arguments,[{name:"target"},{name:"properties"}]),r,i,f,o,s;if(c)throw c;var u,l=Object.getType(n),e=l===Object||l===Sys.UI.DomElement,a=Sys.Component.isInstanceOfType(n)&&!n.get_isUpdating();a&&n.beginUpdate();for(r in t)if(i=t[r],f=e?null:n["get_"+r],e||typeof f!="function")o=n[r],i&&typeof i=="object"&&(!e||o)?this._setProperties(o,i):n[r]=i;else if(s=n["set_"+r],typeof s=="function")s.apply(n,[i]);else if(i instanceof Array){if(u=f.apply(n),!(u instanceof Array))throw new Error.invalidOperation(String.format(Sys.Res.propertyNotAnArray,r));for(var h=0,v=u.length,y=i.length;hSys.Extended.UI.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,t,"Sys.Extended.UI.BoxSide"));var i=this._borderStyleNames[t],r=this.getCurrentStyle(n,i);return r!="none"},getMargin:function(n,t){if(!n)throw Error.argumentNull("element");if(tSys.Extended.UI.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,t,"Sys.Extended.UI.BoxSide"));var i=this._marginWidthNames[t],r=this.getCurrentStyle(n,i);try{return this.parsePadding(r)}catch(u){return 0}},getBorderWidth:function(n,t){if(!n)throw Error.argumentNull("element");if(tSys.Extended.UI.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,t,"Sys.Extended.UI.BoxSide"));if(!this.isBorderVisible(n,t))return 0;var i=this._borderWidthNames[t],r=this.getCurrentStyle(n,i);return this.parseBorderWidth(r)},getPadding:function(n,t){if(!n)throw Error.argumentNull("element");if(tSys.Extended.UI.BoxSide.Left)throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue,t,"Sys.Extended.UI.BoxSide"));var i=this._paddingWidthNames[t],r=this.getCurrentStyle(n,i);return this.parsePadding(r)},parseBorderWidth:function(n){var r,t,i,u,f;if(this._borderThicknesses||(r={},t=document.createElement("div"),t.style.visibility="hidden",t.style.position="absolute",t.style.fontSize="1px",document.body.appendChild(t),i=document.createElement("div"),i.style.height="0px",i.style.overflow="hidden",t.appendChild(i),u=t.offsetHeight,i.style.borderTop="solid black",i.style.borderTopWidth="thin",r.thin=t.offsetHeight-u,i.style.borderTopWidth="medium",r.medium=t.offsetHeight-u,i.style.borderTopWidth="thick",r.thick=t.offsetHeight-u,t.removeChild(i),document.body.removeChild(t),this._borderThicknesses=r),n){switch(n){case"thin":case"medium":case"thick":return this._borderThicknesses[n];case"inherit":return 0}return f=this.parseUnit(n),Sys.Debug.assert(f.type=="px",String.format(Sys.Extended.UI.Resources.Common_InvalidBorderWidthUnit,f.type)),f.size}return 0},parsePadding:function(n){if(n){if(n=="inherit")return 0;var t=this.parseUnit(n);return t.type!=="px"&&Sys.Debug.fail(String.format(Sys.Extended.UI.Resources.Common_InvalidPaddingUnit,t.type)),t.size}return 0},parseUnit:function(n){var f,t,r,i,e,u;if(!n)throw Error.argumentNull("value");for(n=n.trim().toLowerCase(),f=n.length,t=-1,r=0;r"9")&&i!="-"&&i!="."&&i!=",")break;t=r}if(t==-1)throw Error.create(Sys.Extended.UI.Resources.Common_UnitHasNoDigits);return e=t0){var func;if((func=window[value])instanceof Function||(func=eval(value))instanceof Function)return func}}return null},addCssClasses:function(n,t){for(var i=0;i=n.x&&t=n.y&&it&&(f=r=="l"?f.substr(f.length-t,t):f.substr(0,t)),f},__DOMEvents:{focusin:{eventGroup:"UIEvents",init:function(n){n.initUIEvent("focusin",!0,!1,window,1)}},focusout:{eventGroup:"UIEvents",init:function(n){n.initUIEvent("focusout",!0,!1,window,1)}},activate:{eventGroup:"UIEvents",init:function(n){n.initUIEvent("activate",!0,!0,window,1)}},focus:{eventGroup:"UIEvents",init:function(n){n.initUIEvent("focus",!1,!1,window,1)}},blur:{eventGroup:"UIEvents",init:function(n){n.initUIEvent("blur",!1,!1,window,1)}},click:{eventGroup:"MouseEvents",init:function(n,t){n.initMouseEvent("click",!0,!0,window,1,t.screenX||0,t.screenY||0,t.clientX||0,t.clientY||0,t.ctrlKey||!1,t.altKey||!1,t.shiftKey||!1,t.metaKey||!1,t.button||0,t.relatedTarget||null)}},dblclick:{eventGroup:"MouseEvents",init:function(n,t){n.initMouseEvent("click",!0,!0,window,2,t.screenX||0,t.screenY||0,t.clientX||0,t.clientY||0,t.ctrlKey||!1,t.altKey||!1,t.shiftKey||!1,t.metaKey||!1,t.button||0,t.relatedTarget||null)}},mousedown:{eventGroup:"MouseEvents",init:function(n,t){n.initMouseEvent("mousedown",!0,!0,window,1,t.screenX||0,t.screenY||0,t.clientX||0,t.clientY||0,t.ctrlKey||!1,t.altKey||!1,t.shiftKey||!1,t.metaKey||!1,t.button||0,t.relatedTarget||null)}},mouseup:{eventGroup:"MouseEvents",init:function(n,t){n.initMouseEvent("mouseup",!0,!0,window,1,t.screenX||0,t.screenY||0,t.clientX||0,t.clientY||0,t.ctrlKey||!1,t.altKey||!1,t.shiftKey||!1,t.metaKey||!1,t.button||0,t.relatedTarget||null)}},mouseover:{eventGroup:"MouseEvents",init:function(n,t){n.initMouseEvent("mouseover",!0,!0,window,1,t.screenX||0,t.screenY||0,t.clientX||0,t.clientY||0,t.ctrlKey||!1,t.altKey||!1,t.shiftKey||!1,t.metaKey||!1,t.button||0,t.relatedTarget||null)}},mousemove:{eventGroup:"MouseEvents",init:function(n,t){n.initMouseEvent("mousemove",!0,!0,window,1,t.screenX||0,t.screenY||0,t.clientX||0,t.clientY||0,t.ctrlKey||!1,t.altKey||!1,t.shiftKey||!1,t.metaKey||!1,t.button||0,t.relatedTarget||null)}},mouseout:{eventGroup:"MouseEvents",init:function(n,t){n.initMouseEvent("mousemove",!0,!0,window,1,t.screenX||0,t.screenY||0,t.clientX||0,t.clientY||0,t.ctrlKey||!1,t.altKey||!1,t.shiftKey||!1,t.metaKey||!1,t.button||0,t.relatedTarget||null)}},load:{eventGroup:"HTMLEvents",init:function(n){n.initEvent("load",!1,!1)}},unload:{eventGroup:"HTMLEvents",init:function(n){n.initEvent("unload",!1,!1)}},select:{eventGroup:"HTMLEvents",init:function(n){n.initEvent("select",!0,!1)}},change:{eventGroup:"HTMLEvents",init:function(n){n.initEvent("change",!0,!1)}},submit:{eventGroup:"HTMLEvents",init:function(n){n.initEvent("submit",!0,!0)}},reset:{eventGroup:"HTMLEvents",init:function(n){n.initEvent("reset",!0,!1)}},resize:{eventGroup:"HTMLEvents",init:function(n){n.initEvent("resize",!0,!1)}},scroll:{eventGroup:"HTMLEvents",init:function(n){n.initEvent("scroll",!0,!1)}}},tryFireRawEvent:function(n,t){try{if(n.fireEvent)return n.fireEvent("on"+t.type,t),!0;if(n.dispatchEvent)return n.dispatchEvent(t),!0}catch(i){}return!1},tryFireEvent:function(n,t,i){var u,r;try{if(document.createEventObject)return r=document.createEventObject(),$common.applyProperties(r,i||{}),n.fireEvent("on"+t,r),!0;if(document.createEvent&&(u=$common.__DOMEvents[t],u))return r=document.createEvent(u.eventGroup),u.init(r,i||{}),n.dispatchEvent(r),!0}catch(r){}return!1},wrapElement:function(n,t,i){var r=n.parentNode;r.replaceChild(t,n);(i||t).appendChild(n)},unwrapElement:function(n,t){var i=t.parentNode;i!=null&&($common.removeElement(n),i.replaceChild(n,t))},removeElement:function(n){var t=n.parentNode;t!=null&&t.removeChild(n)},applyProperties:function(n,t){var r,i,u;for(r in t)i=t[r],i!=null&&Object.getType(i)===Object?(u=n[r],$common.applyProperties(u,i)):n[r]=i},createElementFromTemplate:function(n,t,i){var f,h,r,e,s,c,o,u;if(typeof n.nameTable!="undefined"&&(f=n.nameTable,String.isInstanceOfType(f)&&(f=i[f]),f!=null&&(i=f)),h=null,typeof n.name!="undefined"&&(h=n.name),r=document.createElement(n.nodeName),typeof n.name!="undefined"&&i&&(i[n.name]=r),typeof n.parent!="undefined"&&t==null&&(e=n.parent,String.isInstanceOfType(e)&&(e=i[e]),e!=null&&(t=e)),typeof n.properties!="undefined"&&n.properties!=null&&$common.applyProperties(r,n.properties),typeof n.cssClasses!="undefined"&&n.cssClasses!=null&&$common.addCssClasses(r,n.cssClasses),typeof n.events!="undefined"&&n.events!=null&&$addHandlers(r,n.events),typeof n.visible!="undefined"&&n.visible!=null&&this.setVisible(r,n.visible),t&&t.appendChild(r),typeof n.opacity!="undefined"&&n.opacity!=null&&$common.setElementOpacity(r,n.opacity),typeof n.children!="undefined"&&n.children!=null)for(s=0;s