Core={_copyFunction:function(f){var fCopy;eval("fCopy = "+f.toString()+";");return fCopy},_createFunction:function(){return function(){}},extend:function(){var H=arguments.length==1?null:arguments[0];var G=arguments.length==1?arguments[0]:arguments[1];if(H){if(typeof (H)!="function"){throw new Error("Base class is not a function, cannot derive.")}}if(!G){throw new Error("Object definition not provided.")}var B;if(G.$construct){B=G.$construct;delete G.$construct}else{if(H){B=Core._copyFunction(H)}else{B=Core._createFunction()}}B.$virtual={};B.$super=H;if(H){var F=Core._createFunction();F.prototype=H.prototype;B.prototype=new F()}B.prototype.constructor=B;if(G.$abstract){B.$abstract={};if(H&&H.$abstract){for(var A in H.$abstract){B.$abstract[A]=H.$abstract[A]}}if(G.$abstract instanceof Object){for(var A in G.$abstract){B.$abstract[A]=true;B.$virtual[A]=true}}delete G.$abstract}if(H){for(var E in H.$virtual){B.$virtual[E]=H.$virtual[E]}}if(G.$virtual){Core._inherit(B.prototype,G.$virtual,B.$virtual);for(var E in G.$virtual){B.$virtual[E]=true}delete G.$virtual}if(G.hasOwnProperty("toString")){B.prototype.toString=G.toString}if(G.hasOwnProperty("valueOf")){B.prototype.valueOf=G.valueOf}delete G.toString;delete G.valueOf;if(G.$include){var C=G.$include.reverse();Core._processMixins(B,C);delete G.$include}var D=null;if(G.$load){D=G.$load;delete G.$load}if(G.$static){Core._inherit(B,G.$static);delete G.$static}Core._inherit(B.prototype,G,B.$virtual);if(!B.$abstract){this._verifyAbstractImpl(B)}if(D){D.call(B)}return B},get:function(A,C){for(var B=0;B<C.length;++B){A=A[C[B]];if(!A){return null}}return A},_isVirtual:function(B,A){switch(A){case"toString":case"valueOf":return true}return B[A]},_inherit:function(A,D,C){for(var B in D){if(C&&A[B]&&!this._isVirtual(C,B)){throw new Error('Cannot override non-virtual property "'+B+'".')}else{A[B]=D[B]}}},method:function(A,B){return function(){return B.apply(A,arguments)}},_processMixins:function(B,C){for(var D=0;D<C.length;++D){for(var A in C[D]){if(B.prototype[A]){continue}B.prototype[A]=C[D][A]}}},set:function(A,E,D){var C=null;for(var B=0;B<E.length-1;++B){C=A;A=A[E[B]];if(!A){A={};C[E[B]]=A}}A[E[E.length-1]]=D},_verifyAbstractImpl:function(B){var C=B.$super;if(!C||!C.$abstract||C.$abstract===true){return }for(var A in C.$abstract){if(!B.prototype[A]){throw new Error('Concrete class does not provide implementation of abstract method "'+A+'".')}}}};Core.Debug={consoleElement:null,useAlertDialog:false,consoleWrite:function(B){if(Core.Debug.consoleElement){var A=document.createElement("div");A.appendChild(document.createTextNode(B));if(Core.Debug.consoleElement.childNodes.length==0){Core.Debug.consoleElement.appendChild(A)}else{Core.Debug.consoleElement.insertBefore(A,Core.Debug.consoleElement.firstChild)}}else{if(Core.Debug.useAlertDialog){alert("DEBUG:"+B)}}},toString:function(B){var C="";for(var A in B){if(typeof B[A]!="function"){C+=A+":"+B[A]+"\n"}}return C}};Core.Arrays={containsAll:function(F,D,G){if(G&&F.length<D.length){return false}if(D.length==0){return true}var E,C;for(var B=0;B<D.length;++B){E=false;C=D[B];for(var A=0;A<F.length;++A){if(C==F[A]){E=true;break}}if(!E){return false}}return true},indexOf:function(C,B){for(var A=0;A<C.length;++A){if(B==C[A]){return A}}return -1},remove:function(C,B){for(var A=0;A<C.length;++A){if(B==C[A]){C.splice(A,1);return }}},removeDuplicates:function(C){C.sort();var B=0;for(var A=C.length-1;A>0;--A){if(C[A]==C[A-1]){C[A]=C[C.length-1-B];++B}}if(B>0){C.length=C.length-B}}};Core.Arrays.LargeMap=Core.extend({$static:{garbageCollectEnabled:false},_removeCount:0,garbageCollectionInterval:250,map:null,$construct:function(){this.map={}},_garbageCollect:function(){this._removeCount=0;var A={};for(var B in this.map){A[B]=this.map[B]}this.map=A},remove:function(A){delete this.map[A];if(Core.Arrays.LargeMap.garbageCollectEnabled){++this._removeCount;if(this._removeCount>=this.garbageCollectionInterval){this._garbageCollect()}}}});Core.ListenerList=Core.extend({_data:null,$construct:function(){this._data=[]},addListener:function(A,B){this._data.push(A,B)},fireEvent:function(D){if(D.type==null){throw new Error("Cannot fire event, type property not set.")}var C=[];for(var A=0;A<this._data.length;A+=2){if(this._data[A]==D.type){C.push(this._data[A+1])}}var B=true;for(var A=0;A<C.length;++A){B=C[A](D)&&B}return B},getListenerTypes:function(){var B=[];for(var A=0;A<this._data.length;A+=2){B.push(this._data[A])}Core.Arrays.removeDuplicates(B);return B},getListeners:function(B){var C=[];for(var A=0;A<this._data.length;A+=2){if(this._data[A]==B){C.push(this._data[A+1])}}return C},getListenerCount:function(B){var C=0;for(var A=0;A<this._data.length;A+=2){if(this._data[A]==B){++C}}return C},hasListeners:function(B){for(var A=0;A<this._data.length;A+=2){if(this._data[A]==B){return true}}return false},isEmpty:function(){return this._data.length==0},removeListener:function(B,D){for(var A=0;A<this._data.length;A+=2){if(this._data[A]==B&&D==this._data[A+1]){var C=this._data.length;this._data.splice(A,2);return }}},toString:function(){var A="";for(var B=0;B<this._data.length;B+=2){if(B>0){A+=", "}A+=this._data[B]+":"+this._data[B+1]}return A}});Core.ResourceBundle=Core.extend({$static:{getParentLanguageCode:function(A){if(A.indexOf("-")==-1){return null}else{return A.substring(0,A.indexOf("-"))}}},_sourceBundles:null,_generatedBundles:null,_defaultBundle:null,$construct:function(A){this._sourceBundles={};this._generatedBundles={};this._defaultBundle=A},get:function(D){var B=D?this._generatedBundles[D]:this._defaultBundle;if(B){return B}B={};var A;var C=this._sourceBundles[D];if(C){for(A in C){B[A]=C[A]}}parentLanguageCode=Core.ResourceBundle.getParentLanguageCode(D);if(parentLanguageCode){var C=this._sourceBundles[parentLanguageCode];if(C){for(A in C){if(B[A]===undefined){B[A]=C[A]}}}}for(A in this._defaultBundle){if(B[A]===undefined){B[A]=this._defaultBundle[A]}}this._generatedBundles[D]=B;return B},set:function(B,A){this._generatedBundles={};this._sourceBundles[B]=A},toString:function(){out="ResourceBundle: ";for(var A in this._sourceBundles){out+=" "+A}return out}});Core.Web={dragInProgress:false,init:function(){if(Core.Web.initialized){return }Core.Web.Env._init();Core.Web.Measure._calculateExtentSizes();if(Core.Web.Env.QUIRK_CSS_POSITIONING_ONE_SIDE_ONLY){Core.Web.VirtualPosition._init()}if(Core.Web.Env.BROWSER_INTERNET_EXPLORER){Core.Web.DOM.addEventListener(document,"selectstart",Core.Web._selectStartListener,false);}Core.Web.initialized=true},_selectStartListener:function(A){A=A?A:window.event;if(Core.Web.dragInProgress){Core.Web.DOM.preventEventDefault(A)}}};Core.Web.DOM={_focusPendingElement:null,addEventListener:function(D,C,B,A){if(D.addEventListener){D.addEventListener(C,B,A)}else{if(D.attachEvent){D.attachEvent("on"+C,B)}}},createDocument:function(A,D){if(document.implementation&&document.implementation.createDocument){var E=document.implementation.createDocument(A,D,null);if(!E.documentElement){E.appendChild(E.createElement(D))}return E}else{if(window.ActiveXObject){var B=new ActiveXObject("Microsoft.XMLDOM");var C=B.createElement(D);B.appendChild(C);return B}else{throw new Error("XML DOM creation not supported by browser environment.")}}},focusElement:function(A){if(Core.Web.Env.QUIRK_DELAYED_FOCUS_REQUIRED){Core.Web.DOM._focusPendingElement=A;Core.Web.Scheduler.run(Core.method(window,this._focusElementImpl))}else{this._focusElementImpl(A)}},_focusElementImpl:function(B){if(!B){B=Core.Web.DOM._focusPendingElement;Core.Web.DOM._focusPendingElement=null}if(B&&B.focus){try{B.focus()}catch(A){}}},getChildElementByTagName:function(A,C){var B=A.firstChild;while(B){if(B.nodeType==1&&B.nodeName==C){return B}B=B.nextSibling}return null},getChildElementsByTagName:function(A,C){var D=[];var B=A.firstChild;while(B){if(B.nodeType==1&&B.nodeName==C){D.push(B)}B=B.nextSibling}return D},getEventOffset:function(B){if(typeof (B.offsetX)=="number"){return{x:B.offsetX,y:B.offsetY}}else{var A=new Core.Web.Measure.Bounds(this.getEventTarget(B));return{x:B.clientX-A.left,y:B.clientY-A.top}}},getEventTarget:function(A){return A.target?A.target:A.srcElement},getEventRelatedTarget:function(A){return A.relatedTarget?A.relatedTarget:A.toElement},isAncestorOf:function(A,C){var B=C;while(B!==null){if(B==A){return true}B=B.parentNode}return false},preventEventDefault:function(A){if(A.preventDefault){A.preventDefault()}else{A.returnValue=false}},removeAllChildren:function(A){while(A.firstChild){A.removeChild(A.firstChild)}},removeEventListener:function(D,C,B,A){if(D.removeEventListener){D.removeEventListener(C,B,A)}else{if(D.detachEvent){D.detachEvent("on"+C,B)}}},removeNode:function(B){var A=B.parentNode;if(!A){return }if(Core.Web.Env.QUIRK_PERFORMANCE_LARGE_DOM_REMOVE){this._removeNodeRecursive(B)}else{A.removeChild(B)}},_removeNodeRecursive:function(C){var B=C.firstChild;while(B){var A=B.nextSibling;this._removeNodeRecursive(B);B=A}C.parentNode.removeChild(C)},stopEventPropagation:function(A){if(A.stopPropagation){A.stopPropagation()}else{A.cancelBubble=true}}};Core.Web.Env={_init:function(){var A=navigator.userAgent.toLowerCase();this.BROWSER_OPERA=A.indexOf("opera")!=-1;this.BROWSER_SAFARI=A.indexOf("safari")!=-1;this.BROWSER_KONQUEROR=A.indexOf("konqueror")!=-1;this.BROWSER_FIREFOX=A.indexOf("firefox")!=-1;this.CSS_FLOAT="cssFloat";this.DECEPTIVE_USER_AGENT=this.BROWSER_OPERA||this.BROWSER_SAFARI||this.BROWSER_KONQUEROR;this.BROWSER_MOZILLA=!this.DECEPTIVE_USER_AGENT&&A.indexOf("gecko")!=-1;this.BROWSER_INTERNET_EXPLORER=!this.DECEPTIVE_USER_AGENT&&A.indexOf("msie")!=-1;if(this.BROWSER_INTERNET_EXPLORER){this._parseVersionInfo(A,"msie ")}else{if(this.BROWSER_FIREFOX){this._parseVersionInfo(A,"firefox/")}else{if(this.BROWSER_OPERA){this._parseVersionInfo(A,"opera/")}else{if(this.BROWSER_SAFARI){this._parseVersionInfo(A,"version/")}else{if(this.BROWSER_MOZILLA){this._parseVersionInfo(A,"rv:")}else{if(this.BROWSER_KONQUEROR){this._parseVersionInfo(A,"konqueror/")}}}}}}if(this.BROWSER_INTERNET_EXPLORER){this.PROPRIETARY_EVENT_MOUSE_ENTER_LEAVE_SUPPORTED=true;this.PROPRIETARY_EVENT_SELECT_START_SUPPORTED=true;this.QUIRK_IE_KEY_DOWN_EVENT_REPEAT=true;this.CSS_FLOAT="styleFloat";if(this.BROWSER_MAJOR_VERSION<8){this.QUIRK_TABLE_CELL_WIDTH_EXCLUDES_PADDING=true;this.NOT_SUPPORTED_RELATIVE_COLUMN_WIDTHS=true;this.QUIRK_IE_REPAINT=true;this.QUIRK_TEXTAREA_CONTENT=true;this.QUIRK_IE_TEXTAREA_NEWLINE_OBLITERATION=true;this.QUIRK_IE_SELECT_LIST_DOM_UPDATE=true;this.QUIRK_CSS_BORDER_COLLAPSE_INSIDE=true;this.QUIRK_CSS_BORDER_COLLAPSE_FOR_0_PADDING=true;this.NOT_SUPPORTED_CSS_OPACITY=true;this.PROPRIETARY_IE_OPACITY_FILTER_REQUIRED=true;this.QUIRK_IE_TABLE_PERCENT_WIDTH_SCROLLBAR_ERROR=true;this.QUIRK_IE_SELECT_PERCENT_WIDTH=true;if(this.BROWSER_MAJOR_VERSION<7){this.QUIRK_CSS_POSITIONING_ONE_SIDE_ONLY=true;this.PROPRIETARY_IE_PNG_ALPHA_FILTER_REQUIRED=true;this.QUIRK_CSS_BACKGROUND_ATTACHMENT_USE_FIXED=true;this.QUIRK_IE_SELECT_Z_INDEX=true;this.NOT_SUPPORTED_CSS_MAX_HEIGHT=true;this.QUIRK_DELAYED_FOCUS_REQUIRED=true;Core.Arrays.LargeMap.garbageCollectEnabled=true}}}else{if(this.BROWSER_MOZILLA){if(this.BROWSER_FIREFOX){if(this.BROWSER_MAJOR_VERSION<2){this.QUIRK_DELAYED_FOCUS_REQUIRED=true}}else{this.QUIRK_PERFORMANCE_LARGE_DOM_REMOVE=true;this.QUIRK_DELAYED_FOCUS_REQUIRED=true}}else{if(this.BROWSER_OPERA){this.NOT_SUPPORTED_RELATIVE_COLUMN_WIDTHS=true}}}},_parseVersionInfo:function(E,C){var B=E.indexOf(C);var A=E.indexOf(".",B);var G=E.length;if(A==-1){A=E.length}else{for(var D=A+1;D<E.length;D++){var F=E.charAt(D);if(isNaN(F)){G=D;break}}}this.BROWSER_MAJOR_VERSION=parseInt(E.substring(B+C.length,A));if(A==E.length){this.BROWSER_MINOR_VERSION=0}else{this.BROWSER_MINOR_VERSION=parseInt(E.substring(A+1,G))}}};Core.Web.Event={Selection:{disable:function(A){Core.Web.Event.add(A,"mousedown",Core.Web.Event.Selection._disposeEvent,false);if(Core.Web.Env.PROPRIETARY_EVENT_SELECT_START_SUPPORTED){Core.Web.Event.add(A,"selectstart",Core.Web.Event.Selection._disposeEvent,false)}},_disposeEvent:function(A){Core.Web.DOM.preventEventDefault(A)},enable:function(A){Core.Web.Event.remove(A,"mousedown",Core.Web.Event.Selection._disposeEvent,false);if(Core.Web.Env.PROPRIETARY_EVENT_SELECT_START_SUPPORTED){Core.Web.Event.remove(A,"selectstart",Core.Web.Event.Selection._disposeEvent,false)}}},_nextId:0,_capturingListenerMap:new Core.Arrays.LargeMap(),_bubblingListenerMap:new Core.Arrays.LargeMap(),add:function(C,B,D,A){if(!C.__eventProcessorId){C.__eventProcessorId=++Core.Web.Event._nextId}var F;if(C.__eventProcessorId==Core.Web.Event._lastId&&A==Core.Web.Event._lastCapture){F=Core.Web.Event._lastListenerList}else{var E=A?Core.Web.Event._capturingListenerMap:Core.Web.Event._bubblingListenerMap;F=E.map[C.__eventProcessorId];if(!F){F=new Core.ListenerList();E.map[C.__eventProcessorId]=F}Core.Web.Event._lastId=C.__eventProcessorId;Core.Web.Event._lastCapture=A;Core.Web.Event._lastListenerList=F}if(!F.hasListeners(B)){Core.Web.DOM.addEventListener(C,B,Core.Web.Event._processEvent,false)}F.addListener(B,D)},_processEvent:function(D){D=D?D:window.event;if(!D.target&&D.srcElement){D.target=D.srcElement}var E=[];var B=D.target;while(B){if(B.__eventProcessorId){E.push(B)}B=B.parentNode}var F;var A=true;for(var C=E.length-1;C>=0;--C){F=Core.Web.Event._capturingListenerMap.map[E[C].__eventProcessorId];if(F){D.registeredTarget=E[C];if(!F.fireEvent(D)){A=false}}if(!A){break}}if(A){for(var C=0;C<E.length;++C){F=Core.Web.Event._bubblingListenerMap.map[E[C].__eventProcessorId];D.registeredTarget=E[C];if(F){if(!F.fireEvent(D)){A=false}}if(!A){break}}}Core.Web.DOM.stopEventPropagation(D)},remove:function(C,B,D,A){Core.Web.Event._lastId=null;if(!C.__eventProcessorId){return }var E=A?Core.Web.Event._capturingListenerMap:Core.Web.Event._bubblingListenerMap;var F=E.map[C.__eventProcessorId];if(F){F.removeListener(B,D);if(F.isEmpty()){E.remove(C.__eventProcessorId)}if(!F.hasListeners(B)){Core.Web.DOM.removeEventListener(C,B,Core.Web.Event._processEvent,false)}}},removeAll:function(A){Core.Web.Event._lastId=null;if(!A.__eventProcessorId){return }Core.Web.Event._removeAllImpl(A,Core.Web.Event._capturingListenerMap);Core.Web.Event._removeAllImpl(A,Core.Web.Event._bubblingListenerMap)},_removeAllImpl:function(C,D){var E=D.map[C.__eventProcessorId];if(!E){return }var B=E.getListenerTypes();for(var A=0;A<B.length;++A){Core.Web.DOM.removeEventListener(C,B[A],Core.Web.Event._processEvent,false)}D.remove(C.__eventProcessorId)},toString:function(){return"Capturing: "+Core.Web.Event._capturingListenerMap+"\nBubbling: "+Core.Web.Event._bubblingListenerMap}};Core.Web.HttpConnection=Core.extend({_url:null,_contentType:null,_method:null,_messageObject:null,_listenerList:null,_disposed:false,_xmlHttpRequest:null,$construct:function(A,D,B,C){this._url=A;this._contentType=C;this._method=D;this._messageObject=B;this._listenerList=new Core.ListenerList()},addResponseListener:function(A){this._listenerList.addListener("response",A)},connect:function(){var B=false;if(window.XMLHttpRequest){this._xmlHttpRequest=new XMLHttpRequest()}else{if(window.ActiveXObject){B=true;this._xmlHttpRequest=new ActiveXObject("Microsoft.XMLHTTP")}else{throw"Connect failed: Cannot create XMLHttpRequest."}}var A=this;this._xmlHttpRequest.onreadystatechange=function(){if(!A){return }try{A._processReadyStateChange()}finally{if(A._disposed){A=null}}};this._xmlHttpRequest.open(this._method,this._url,true);if(this._contentType&&(B||this._xmlHttpRequest.setRequestHeader)){this._xmlHttpRequest.setRequestHeader("Content-Type",this._contentType)}this._xmlHttpRequest.send(this._messageObject?this._messageObject:null)},dispose:function(){this._listenerList=null;this._messageObject=null;this._xmlHttpRequest=null;this._disposed=true},getStatus:function(){return this._xmlHttpRequest?this._xmlHttpRequest.status:null},getResponseText:function(){return this._xmlHttpRequest?this._xmlHttpRequest.responseText:null},getResponseXml:function(){return this._xmlHttpRequest?this._xmlHttpRequest.responseXML:null},_processReadyStateChange:function(){if(this._disposed){return }if(this._xmlHttpRequest.readyState==4){var C;try{var B=this._xmlHttpRequest.status==0||(this._xmlHttpRequest.status>=200&&this._xmlHttpRequest.status<=299);C={type:"response",source:this,valid:B}}catch(A){C={type:"response",source:this,valid:false,exception:A}}this._listenerList.fireEvent(C);this.dispose()}},removeResponseListener:function(A){this._listenerList.removeListener("response",A)}});Core.Web.Library={_loadedLibraries:{},Group:Core.extend({_listenerList:null,_libraries:null,_loadedCount:0,_totalCount:0,$construct:function(){this._listenerList=new Core.ListenerList();this._libraries=[]},add:function(B){if(Core.Web.Library._loadedLibraries[B]){return }var A=new Core.Web.Library._Item(this,B);this._libraries.push(A)},addLoadListener:function(A){this._listenerList.addListener("load",A)},_fireLoadEvent:function(){this._listenerList.fireEvent({type:"load",source:this})},hasNewLibraries:function(){return this._libraries.length>0},_install:function(){for(var B=0;B<this._libraries.length;++B){try{this._libraries[B]._install()}catch(A){throw new Error('Exception installing library "'+this._libraries[B]._url+'"; '+A)}}this._fireLoadEvent()},_notifyRetrieved:function(){++this._loadedCount;if(this._loadedCount==this._totalCount){this._install()}},load:function(){this._totalCount=this._libraries.length;for(var A=0;A<this._libraries.length;++A){this._libraries[A]._retrieve()}},removeLoadListener:function(A){this._listenerList.removeListener("load",A)}}),_Item:Core.extend({_url:null,_group:null,_content:null,$construct:function(B,A){this._url=A;this._group=B},_retrieveListener:function(A){if(!A.valid){throw new Error("Invalid HTTP response from library request: "+A.source.getStatus())}this._content=A.source.getResponseText();this._group._notifyRetrieved()},_install:function(){Core.Web.Library._loadedLibraries[this._url]=true;if(this._content==null){throw new Error("Attempt to install library when no content has been loaded.")}eval(this._content)},_retrieve:function(){var A=new Core.Web.HttpConnection(this._url,"GET");A.addResponseListener(Core.method(this,this._retrieveListener));A.connect()}})};Core.Web.Measure={_scrollElements:["div","body"],_hInch:96,_vInch:96,_hEx:7,_vEx:7,_hEm:13.3333,_vEm:13.3333,extentToPixels:function(D,B,A){if(!B||B=="px"){return D}var C=A?Core.Web.Measure._hInch:Core.Web.Measure._vInch;switch(B){case"%":return null;case"in":return D*(A?Core.Web.Measure._hInch:Core.Web.Measure._vInch);case"cm":return D*(A?Core.Web.Measure._hInch:Core.Web.Measure._vInch)/2.54;case"mm":return D*(A?Core.Web.Measure._hInch:Core.Web.Measure._vInch)/25.4;case"pt":return D*(A?Core.Web.Measure._hInch:Core.Web.Measure._vInch)/72;case"pc":return D*(A?Core.Web.Measure._hInch:Core.Web.Measure._vInch)/6;case"em":return D*(A?Core.Web.Measure._hEm:Core.Web.Measure._vEm);case"ex":return D*(A?Core.Web.Measure._hEx:Core.Web.Measure._vEx)}},_calculateExtentSizes:function(){var D=document.getElementsByTagName("body")[0];var C=document.createElement("div");C.style.width="4in";C.style.height="4in";D.appendChild(C);Core.Web.Measure._hInch=C.offsetWidth/4;Core.Web.Measure._vInch=C.offsetHeight/4;D.removeChild(C);var B=document.createElement("div");B.style.width="24em";B.style.height="24em";D.appendChild(B);Core.Web.Measure._hEm=B.offsetWidth/24;Core.Web.Measure._vEm=B.offsetHeight/24;D.removeChild(B);var A=document.createElement("div");A.style.width="24ex";A.style.height="24ex";D.appendChild(A);Core.Web.Measure._hEx=A.offsetWidth/24;Core.Web.Measure._vEx=A.offsetHeight/24;D.removeChild(A)},_getScrollOffset:function(B){var A=0,C=0;do{if((B.scrollLeft||B.scrollTop)&&B.nodeName.toLowerCase() in this._scrollElements){A+=B.scrollTop||0;C+=B.scrollLeft||0}B=B.parentNode}while(B);return{left:C,top:A}},_getCumulativeOffset:function(B){var A=0,C=0;do{A+=B.offsetTop||0;C+=B.offsetLeft||0;B=B.offsetParent}while(B);return{left:C,top:A}},Bounds:Core.extend({width:null,height:null,top:null,left:null,$construct:function(C){var E=C;while(E&&E!=document){E=E.parentNode}var G=E==document;if(!Core.Web.Measure.Bounds._offscreenDiv){Core.Web.Measure.Bounds._offscreenDiv=document.createElement("div");Core.Web.Measure.Bounds._offscreenDiv.style.cssText="position: absolute; top: -1700px; left: -1300px; width: 1600px; height: 1200px;"}var A,D;if(!G){document.body.appendChild(Core.Web.Measure.Bounds._offscreenDiv);A=C.parentNode;D=C.nextSibling;if(A){A.removeChild(C)}Core.Web.Measure.Bounds._offscreenDiv.appendChild(C)}this.width=C.offsetWidth;this.height=C.offsetHeight;if(!G){Core.Web.Measure.Bounds._offscreenDiv.removeChild(C);if(A){A.insertBefore(C,D)}document.body.removeChild(Core.Web.Measure.Bounds._offscreenDiv)}if(G){var F=Core.Web.Measure._getCumulativeOffset(C);var B=Core.Web.Measure._getScrollOffset(C);this.top=F.top-B.top;this.left=F.left-B.left}},toString:function(){return(this.left!=null?(this.left+","+this.top+" : "):"")+"["+this.width+"x"+this.height+"]"}})};Core.Web.Scheduler={_runnables:[],_threadHandle:null,_nextExecution:null,add:function(C){var B=new Date().getTime();var A=C.timeInterval?C.timeInterval:0;C._enabled=true;C._nextExecution=B+A;Core.Web.Scheduler._runnables.push(C);Core.Web.Scheduler._start(C._nextExecution)},_execute:function(){var D=new Date().getTime();var F=Number.MAX_VALUE;for(var C=0;C<Core.Web.Scheduler._runnables.length;++C){var E=Core.Web.Scheduler._runnables[C];if(E._nextExecution&&E._nextExecution<=D){E._nextExecution=null;try{E.run()}catch(B){throw (B)}}}var G=[];for(var C=0;C<Core.Web.Scheduler._runnables.length;++C){var E=Core.Web.Scheduler._runnables[C];if(!E._enabled){continue}if(E._nextExecution){G.push(E);var A=E._nextExecution-D;if(A<F){F=A}continue}if(E.timeInterval!=null&&E.repeat){E._nextExecution=D+E.timeInterval;G.push(E);if(E.timeInterval<F){F=E.timeInterval}}}Core.Web.Scheduler._runnables=G;if(F<Number.MAX_VALUE){this._nextExecution=D+F;Core.Web.Scheduler._threadHandle=window.setTimeout(Core.Web.Scheduler._execute,F)}else{Core.Web.Scheduler._threadHandle=null}},remove:function(A){A._enabled=false;A._nextExecution=null},run:function(D,A,C){var B=new Core.Web.Scheduler.MethodRunnable(D,A,C);this.add(B);return B},_start:function(B){var A=new Date().getTime();if(Core.Web.Scheduler._threadHandle==null){this._nextExecution=B;Core.Web.Scheduler._threadHandle=window.setTimeout(Core.Web.Scheduler._execute,B-A)}else{if(this._nextExecution>B){window.clearTimeout(Core.Web.Scheduler._threadHandle);this._nextExecution=B;Core.Web.Scheduler._threadHandle=window.setTimeout(Core.Web.Scheduler._execute,B-A)}}},_stop:function(){if(Core.Web.Scheduler._threadHandle==null){return }window.clearTimeout(Core.Web.Scheduler._threadHandle);Core.Web.Scheduler._threadHandle=null;Core.Web.Scheduler._nextExecution=null}};Core.Web.Scheduler.Runnable=Core.extend({_enabled:null,_nextExecution:null,$virtual:{timeInterval:null,repeat:false},$abstract:{run:function(){}}});Core.Web.Scheduler.MethodRunnable=Core.extend(Core.Web.Scheduler.Runnable,{f:null,$construct:function(C,A,B){if(!A&&B){throw new Error("Cannot create repeating runnable without time delay:"+C)}this.f=C;this.timeInterval=A;this.repeat=!!B},$virtual:{run:function(){this.f()}}});Core.Web.VirtualPosition={_OFFSETS_VERTICAL:["paddingTop","paddingBottom","marginTop","marginBottom","borderTopWidth","borderBottomWidth"],_OFFSETS_HORIZONTAL:["paddingLeft","paddingRight","marginLeft","marginRight","borderLeftWidth","borderRightWidth"],_enabled:false,_calculateOffsets:function(E,B){var C=0;for(var A=0;A<E.length;++A){var D=B[E[A]];if(D){if(D.toString().indexOf("px")==-1){return -1}C+=parseInt(D)}}return C},_init:function(){this._enabled=true},redraw:function(C){if(!this._enabled){return }if(!C||!C.parentNode){return }if(this._verifyPixelValue(C.style.top)&&this._verifyPixelValue(C.style.bottom)){var B=C.parentNode.offsetHeight;if(!isNaN(B)){var F=this._calculateOffsets(this._OFFSETS_VERTICAL,C.style);if(F!=-1){var E=B-parseInt(C.style.top)-parseInt(C.style.bottom)-F;if(E<=0){C.style.height=0}else{if(C.style.height!=E+"px"){C.style.height=E+"px"}}}}}if(this._verifyPixelValue(C.style.left)&&this._verifyPixelValue(C.style.right)){var D=C.parentNode.offsetWidth;if(!isNaN(D)){var F=this._calculateOffsets(this._OFFSETS_HORIZONTAL,C.style);if(F!=-1){var A=D-parseInt(C.style.left)-parseInt(C.style.right)-F;if(A<=0){C.style.width=0}else{if(C.style.width!=A+"px"){C.style.width=A+"px"}}}}}},_verifyPixelValue:function(B){if(B==null||B==""||B==undefined){return false}var A=B.toString();return A=="0"||A.indexOf("px")!=-1}};Echo={};Echo.Application=Core.extend({$static:{_nextUid:1,generateUid:function(){return this._nextUid++}},$abstract:true,_idToComponentMap:null,_listenerList:null,_locale:null,_modalComponents:null,_styleSheet:null,_focusedComponent:null,rootComponent:null,updateManager:null,focusManager:null,$construct:function(){this._idToComponentMap=new Core.Arrays.LargeMap();this._listenerList=new Core.ListenerList();this.rootComponent=new Echo.Component();this.rootComponent.componentType="Root";this.rootComponent.register(this);this._modalComponents=[];this.updateManager=new Echo.Update.Manager(this);this.focusManager=new Echo.FocusManager(this)},addComponentUpdateListener:function(A){this._listenerList.addListener("componentUpdate",A)},addFocusListener:function(A){this._listenerList.addListener("focus",A)},dispose:function(){this.updateManager.dispose()},_findModalContextRoot:function(A){A=A?A:this.rootComponent;for(var C=A.children.length-1;C>=0;--C){var B=this._findModalContextRoot(A.children[C]);if(B){return B}}if(A.modalSupport&&A.get("modal")){return A}return null},focusNext:function(A){focusedComponent=this.focusManager.find(null,A);if(focusedComponent!=null){this.setFocusedComponent(focusedComponent)}},getComponentByRenderId:function(A){return this._idToComponentMap.map[A]},getFocusedComponent:function(){return this._focusedComponent},getLayoutDirection:function(){return this._layoutDirection?this._layoutDirection:Echo.LayoutDirection.LTR},getLocale:function(){return this._locale},getModalContextRoot:function(){if(this._modalComponents.length==0){return null}else{if(this._modalComponents.length==1){return this._modalComponents[0]}}return this._findModalContextRoot()},getStyleSheet:function(){return this._styleSheet},isActive:function(){return true},notifyComponentUpdate:function(C,A,B,D){if(C.modalSupport&&A=="modal"){this._setModal(C,D)}if(this._listenerList.hasListeners("componentUpdate")){this._listenerList.fireEvent({type:"componentUpdate",parent:C,propertyName:A,oldValue:B,newValue:D})}this.updateManager._processComponentUpdate(C,A,B,D)},_registerComponent:function(A){if(this._idToComponentMap.map[A.renderId]){throw new Error("Component already exists with id: "+A.renderId)}this._idToComponentMap.map[A.renderId]=A;if(A.modalSupport&&A.get("modal")){this._setModal(A,true)}},removeComponentUpdateListener:function(A){this._listenerList.removeListener("componentUpdate",A)},removeFocusListener:function(A){this._listenerList.removeListener("focus",A)},setFocusedComponent:function(B){while(B!=null&&!B.focusable){B=B.parent}if(this._modalComponents.length>0){var A=this.getModalContextRoot();if(!A.isAncestorOf(B)){Core.Debug.consoleWrite("not in modal:"+B);return }}this._focusedComponent=B;this._listenerList.fireEvent({type:"focus",source:this})},setLayoutDirection:function(A){this._layoutDirection=A},setLocale:function(A){this._locale=A},_setModal:function(A,B){Core.Arrays.remove(this._modalComponents,A);if(B){this._modalComponents.push(A)}if(this._modalComponents.length>0&&this._focusedComponent){var C=this.getModalContextRoot();if(!C.isAncestorOf(this._focusedComponent)){if(C.focusable){this.setFocusedComponent(C)}else{this.setFocusedComponent(this.focusManager.findInParent(C,false))}}}},setStyleSheet:function(B){var A=this._styleSheet;this._styleSheet=B},_unregisterComponent:function(A){this._idToComponentMap.remove(A.renderId);if(A.modalSupport){this._setModal(A,false)}}});Echo.ComponentFactory={_typeToConstructorMap:{},newInstance:function(A,C){var D=this._typeToConstructorMap[A];if(!D){throw new Error("Type not registered: "+A)}var B=new D();B.renderId=C;return B},getConstructor:function(A){return this._typeToConstructorMap[A]},getSuperType:function(A){var B=this._typeToConstructorMap[A];if(!B){throw new Error("Type not found: "+A+".")}if(B.$super){return B.$super.prototype.componentType}else{return null}},registerType:function(A,B){if(this._typeToConstructorMap[A]){throw new Error("Type already registered: "+A)}this._typeToConstructorMap[A]=B}};Echo.Component=Core.extend({$static:{_nextRenderId:0},$load:function(){Echo.ComponentFactory.registerType("Component",this)},$abstract:true,$virtual:{componentType:"Component",getFocusComponent:function(A){return this.children[A]}},_layoutDirection:null,_locale:null,renderId:null,parent:null,application:null,_listenerList:null,_style:null,_styleName:null,_enabled:true,children:null,_localStyle:null,$construct:function(D){this.children=[];this._localStyle={};if(D){for(var A in D){switch(A){case"style":this._style=D.style;break;case"styleName":this._styleName=D.styleName;break;case"renderId":this._renderId=D.renderId;break;case"children":for(var C=0;C<D.children.length;++C){this.add(D.children[C])}break;case"events":for(var B in D.events){this.addListener(B,D.events[B])}break;default:this._localStyle[A]=D[A];break}}}},add:function(B,A){if(!(B instanceof Echo.Component)){throw new Error("Cannot add child: specified component object is not derived from Echo.Component. Parent: "+this+", Child: "+B)}if(!B.componentType){throw new Error("Cannot add child: specified component object does not have a componentType property. Parent: "+this+", Child: "+B)}if(B.parent){B.parent.remove(B)}B.parent=this;if(A==null||A==this.children.length){this.children.push(B)}else{this.children.splice(A,0,B)}if(this.application){B.register(this.application);this.application.notifyComponentUpdate(this,"children",null,B)}},addListener:function(A,B){if(this._listenerList==null){this._listenerList=new Core.ListenerList()}this._listenerList.addListener(A,B);if(this.application){this.application.notifyComponentUpdate(this,"listeners",null,A)}},fireEvent:function(A){if(this._listenerList==null){return }this._listenerList.fireEvent(A)},get:function(A){return this._localStyle[A]},getComponent:function(A){return this.children[A]},getComponentCount:function(){return this.children.length},getIndex:function(B,A){var C=this._localStyle[B];return C?C[A]:null},getLayoutDirection:function(){return this._layoutDirection},getLocale:function(){return this._locale},getLocalStyleData:function(){return this._localStyle},getRenderLayoutDirection:function(){var A=this;while(A){if(A._layoutDirection){return A._layoutDirection}A=A.parent}if(this.application){return this.application.getLayoutDirection()}return null},getRenderLocale:function(){var A=this;while(A){if(A._locale){return A._locale}A=A.parent}if(this.application){return this.application.getLocale()}return null},getStyle:function(){return this._style},getStyleName:function(){return this._styleName},indexOf:function(A){for(var B=0;B<this.children.length;++B){if(this.children[B]==A){return B}}return -1},isActive:function(){if(!this.isRenderEnabled()){return false}if(!this.application||!this.application.isActive()){return false}var A=this.application.getModalContextRoot();if(A!=null&&!A.isAncestorOf(this)){return false}return true},isAncestorOf:function(A){while(A!=null&&A!=this){A=A.parent}return A==this},isEnabled:function(){return this._enabled},isRenderEnabled:function(){var A=this;while(A!=null){if(!A._enabled){return false}A=A.parent}return true},register:function(A){if(A&&this.application){throw new Error("Attempt to re-register or change registered application of component.")}if(!A){if(this.children!=null){for(var B=0;B<this.children.length;++B){this.children[B].register(false)}}this.application._unregisterComponent(this);if(this.application._focusedComponent==this){this.application.setFocusedComponent(this.parent)}}this.application=A;if(A){if(this.renderId==null){this.renderId="cl_"+ ++Echo.Component._nextRenderId}this.application._registerComponent(this);if(this.children!=null){for(var B=0;B<this.children.length;++B){this.children[B].register(A)}}}},render:function(B,A){var D=this._localStyle[B];if(D==null){if(this._style!=null){D=this._style[B]}if(D==null&&this._styleName&&this.application&&this.application._styleSheet){var C=this.application._styleSheet.getRenderStyle(this._styleName,this.componentType);if(C){D=C[B]}}}return D==null?A:D},renderIndex:function(C,B,A){var E=this._localStyle[C];var F=E?E[B]:null;if(F==null){if(this._style!=null){E=this._style[C];F=E?E[B]:null}if(F==null&&this._styleName&&this.application&&this.application._styleSheet){var D=this.application._styleSheet.getRenderStyle(this._styleName,this.componentType);if(D){E=D[C];F=E?E[B]:null}}}return F==null?A:F},remove:function(C){var B;var A;if(typeof C=="number"){A=C;B=this.children[A];if(!B){throw new Error("Index out of bounds: "+A)}}else{B=C;A=this.indexOf(B);if(A==-1){return }}if(this.application){B.register(null)}this.children.splice(A,1);B.parent=null;if(this.application){this.application.notifyComponentUpdate(this,"children",B,null)}},removeAll:function(){while(this.children.length>0){this.remove(this.children.length-1)}},removeListener:function(A,B){if(this._listenerList==null){return }this._listenerList.removeListener(A,B);if(this.application){this.application.notifyComponentUpdate(this,"listeners",A,null)}},set:function(B,C){var A=this._localStyle[B];this._localStyle[B]=C;if(this._listenerList&&this._listenerList.hasListeners("property")){this._listenerList.fireEvent({type:"property",source:this,propertyName:B,oldValue:A,newValue:C})}if(this.application){this.application.notifyComponentUpdate(this,B,A,C)}},setEnabled:function(B){var A=this._enabled;this._enabled=B;if(this.application){this.application.notifyComponentUpdate(this,"enabled",A,B)}},setIndex:function(C,B,E){var D=this._localStyle[C];var A=null;if(D){A=D[B]}else{D=[];this._localStyle[C]=D}D[B]=E;if(this.application){this.application.notifyComponentUpdate(this,C,A,E)}if(this._listenerList&&this._listenerList.hasListeners("property")){this._listenerList.fireEvent({type:"property",source:this,propertyName:C,index:B,oldValue:A,newValue:E})}},setLayoutDirection:function(B){var A=this._layoutDirection;this._layoutDirection=B;if(this.application){this.application.notifyComponentUpdate(this,"layoutDirection",A,B)}},setLocale:function(B){var A=this._locale;this._locale=B;if(this.application){this.application.notifyComponentUpdate(this,"locale",A,B)}},setStyle:function(B){var A=this._style;this._style=B;if(this.application){this.application.notifyComponentUpdate(this,"style",A,B)}},setStyleName:function(B){var A=this._styleName;this._styleName=B;if(this.application){this.application.notifyComponentUpdate(this,"styleName",A,B)}},toString:function(E){var C=this.renderId+"/"+this.componentType;if(E){C+="\n";var B=this.getComponentCount();C+=this.renderId+"/properties:"+this._localStyle+"\n";for(var D=0;D<B;++D){var A=this.getComponent(D);C+=this.renderId+"/child:"+A.renderId+"\n";C+=A.toString(true)}}return C}});Echo.FocusManager=Core.extend({_application:null,$construct:function(A){this._application=A},find:function(F,E){if(!F){F=this._application.getFocusedComponent();if(!F){F=this._application.rootComponent}}var H=F;var G={};var B=null;while(true){var D=null;if((E&&F==H)||(B&&B.parent==F)){}else{var C=F.getComponentCount();if(C>0){D=F.getComponent(E?C-1:0);if(G[D.renderId]){D=null}}}if(D==null){if(F.parent){if(E){var A=F.parent.indexOf(F);if(A>0){D=F.parent.getComponent(A-1)}}else{var A=F.parent.indexOf(F);if(A<F.parent.getComponentCount()-1){D=F.parent.getComponent(A+1)}}}}if(D==null){D=F.parent}if(D==null){return null}B=F;F=D;G[F.renderId]=true;if(F!=H&&F.isActive()&&F.focusable){return F}}},findInParent:function(G,D,C){if(!C){C=1}var E=this._application.getFocusedComponent();var F=this._getDescendantIndex(G,E);if(F==-1){return null}var A=F;var B=E;do{B=this.find(B,D);if(B==null){return null}A=this._getDescendantIndex(G,B)}while(Math.abs(A-F)<C&&B!=E);if(B==E){return null}this._application.setFocusedComponent(B);return B},_getDescendantIndex:function(B,A){while(A.parent!=B&&A.parent!=null){A=A.parent}if(A.parent==null){return -1}return B.indexOf(A)}});Echo.LayoutDirection=Core.extend({_ltr:false,$construct:function(A){this._ltr=A},isLeftToRight:function(){return this._ltr}});Echo.LayoutDirection.LTR=new Echo.LayoutDirection(true);Echo.LayoutDirection.RTL=new Echo.LayoutDirection(false);Echo.StyleSheet=Core.extend({_nameToStyleMap:null,_renderCache:null,$construct:function(C){this._renderCache={};this._nameToStyleMap={};if(C){for(var B in C){for(var A in C[B]){this.setStyle(B,A,C[B][A])}}}},getRenderStyle:function(B,A){var D=this._renderCache[B];if(!D){return null}var C=D[A];if(C!==undefined){return C}else{return this._loadRenderStyle(B,A)}},_loadRenderStyle:function(C,B){var D=this._nameToStyleMap[C];if(D==null){this._renderCache[C][B]=null;return null}style=D[B];if(style==null){var A=B;while(style==null){A=Echo.ComponentFactory.getSuperType(A);if(A==null){this._renderCache[C][A]=null;return null}style=D[A]}}this._renderCache[C][B]=style;return style},getStyle:function(B,A){var C=this._nameToStyleMap[B];if(C==null){return null}return C[A]},setStyle:function(B,A,C){this._renderCache[B]={};var D=this._nameToStyleMap[B];if(D==null){D={};this._nameToStyleMap[B]=D}D[A]=C}});Echo.Update={};Echo.Update.ComponentUpdate=Core.extend({$static:{PropertyUpdate:function(A,B){this.oldValue=A;this.newValue=B}},_manager:null,parent:null,renderContext:null,_addedChildIds:null,_propertyUpdates:null,_removedChildIds:null,_removedDescendantIds:null,_updatedLayoutDataChildIds:null,$construct:function(A,B){this._manager=A;this.parent=B},_addChild:function(A){if(!this._addedChildIds){this._addedChildIds=[]}this._addedChildIds.push(A.renderId);this._manager._idMap[A.renderId]=A},_appendRemovedDescendants:function(B){if(B._removedDescendantIds!=null){if(this._removedDescendantIds==null){this._removedDescendantIds=[]}for(var A in B._removedDescendantIds){this._removedDescendantIds.push(A)}}if(B._removedChildIds!=null){if(this._removedDescendantIds==null){this._removedDescendantIds=[]}for(var A in B._removedChildIds){this._removedDescendantIds.push(A)}}if(this._removedDescendantIds!=null){Core.Arrays.removeDuplicates(this._removedDescendantIds)}},getAddedChildren:function(){if(!this._addedChildIds){return null}var B=new Array(this._addedChildIds.length);for(var A=0;A<this._addedChildIds.length;++A){B[A]=this._manager._idMap[this._addedChildIds[A]]}return B},getRemovedChildren:function(){if(!this._removedChildIds){return null}var B=new Array(this._removedChildIds.length);for(var A=0;A<this._removedChildIds.length;++A){B[A]=this._manager._removedIdMap[this._removedChildIds[A]]}return B},getRemovedDescendants:function(){if(!this._removedDescendantIds){return null}var B=new Array(this._removedDescendantIds.length);for(var A=0;A<this._removedDescendantIds.length;++A){B[A]=this._manager._removedIdMap[this._removedDescendantIds[A]]}return B},getUpdatedLayoutDataChildren:function(){if(!this._updatedLayoutDataChildIds){return null}var B=new Array(this._updatedLayoutDataChildIds.length);for(var A=0;A<this._updatedLayoutDataChildIds.length;++A){B[A]=this._manager._idMap[this._updatedLayoutDataChildIds[A]]}return B},hasAddedChildren:function(){return this._addedChildIds!=null},hasRemovedChildren:function(){return this._removedChildIds!=null},hasUpdatedLayoutDataChildren:function(){return this._updatedLayoutDataChildIds!=null},hasUpdatedProperties:function(){return this._propertyUpdates!=null},getUpdatedProperty:function(A){if(this._propertyUpdates==null){return null}return this._propertyUpdates[A]},getUpdatedPropertyNames:function(){if(this._propertyUpdates==null){return[]}var B=[];for(var A in this._propertyUpdates){B.push(A)}return B},hasUpdatedPropertyIn:function(B){for(var A in this._propertyUpdates){if(B[A]){return true}}return false},isUpdatedPropertySetIn:function(B){for(var A in this._propertyUpdates){if(!B[A]){return false}}return true},_removeChild:function(B){this._manager._removedIdMap[B.renderId]=B;if(this._addedChildIds){Core.Arrays.remove(this._addedChildIds,B.renderId)}if(this._updatedLayoutDataChildIds){Core.Arrays.remove(this._updatedLayoutDataChildIds,B.renderId)}if(!this._removedChildIds){this._removedChildIds=[]}this._removedChildIds.push(B.renderId);for(var A=0;A<B.children.length;++A){this._removeDescendant(B.children[A])}},_removeDescendant:function(B){this._manager._removedIdMap[B.renderId]=B;if(!this._removedDescendantIds){this._removedDescendantIds=[]}this._removedDescendantIds.push(B.renderId);for(var A=0;A<B.children.length;++A){this._removeDescendant(B.children[A])}},toString:function(){var A="ComponentUpdate\n";A+="- Parent: "+this.parent+"\n";A+="- Adds: "+this._addedChildIds+"\n";A+="- Removes: "+this._removedChildIds+"\n";A+="- DescendantRemoves: "+this._removedDescendantIds+"\n";A+="- Properties: "+this._propertyUpdates+"\n";A+="- LayoutDatas: "+this._updatedLayoutDataChildIds+"\n";return A},_updateLayoutData:function(A){this._manager._idMap[A.renderId]=A;if(this._updatedLayoutDataChildIds==null){this._updatedLayoutDataChildIds=[]}this._updatedLayoutDataChildIds.push(A.renderId)},_updateProperty:function(A,B,D){if(this._propertyUpdates==null){this._propertyUpdates={}}var C=new Echo.Update.ComponentUpdate.PropertyUpdate(B,D);this._propertyUpdates[A]=C}});Echo.Update.Manager=Core.extend({_componentUpdateMap:null,_fullRefreshRequired:false,application:null,_hasUpdates:true,_listenerList:null,_idMap:null,_removedIdMap:null,_lastAncestorTestParentId:null,$construct:function(A){this._componentUpdateMap={};this.application=A;this._listenerList=new Core.ListenerList();this._idMap={};this._removedIdMap={}},addUpdateListener:function(A){this._listenerList.addListener("update",A)},_createComponentUpdate:function(A){this._hasUpdates=true;var B=this._componentUpdateMap[A.renderId];if(!B){B=new Echo.Update.ComponentUpdate(this,A);this._componentUpdateMap[A.renderId]=B}return B},dispose:function(){this.application=null},_fireUpdate:function(){if(!this._listenerList.isEmpty()){this._listenerList.fireEvent({type:"update",source:this})}},getUpdates:function(){var B=[];for(var A in this._componentUpdateMap){B.push(this._componentUpdateMap[A])}return B},hasUpdates:function(){return this._hasUpdates},_isAncestorBeingAdded:function(A){var F=A;var D=A.parent;var C=D?D.renderId:null;if(C&&this._lastAncestorTestParentId==C){return false}while(D){var E=this._componentUpdateMap[D.renderId];if(E&&E._addedChildIds){for(var B=0;B<E._addedChildIds.length;++B){if(E._addedChildIds[B]==F.renderId){return true}}}F=D;D=D.parent}this._lastAncestorTestParentId=C;return false},_processComponentAdd:function(A,C){if(this.fullRefreshRequired){return }if(this._isAncestorBeingAdded(C)){return }var B=this._createComponentUpdate(A);B._addChild(C)},_processComponentLayoutDataUpdate:function(A){if(this.fullRefreshRequired){return }var B=A.parent;if(B==null||this._isAncestorBeingAdded(B)){return }var C=this._createComponentUpdate(B);C._updateLayoutData(A)},_processComponentRemove:function(D,G){if(this.fullRefreshRequired){return }if(this._isAncestorBeingAdded(D)){return }var F=this._createComponentUpdate(D);F._removeChild(G);var B=null;for(var A in this._componentUpdateMap){var E=this._componentUpdateMap[A];if(G.isAncestorOf(E.parent)){F._appendRemovedDescendants(E);if(B==null){B=[]}B.push(A)}}if(B!=null){for(var C=0;C<B.length;++C){delete this._componentUpdateMap[B[C]]}}},_processComponentPropertyUpdate:function(C,A,B,D){if(this.fullRefreshRequired){return }if(this._isAncestorBeingAdded(C)){return }var E=this._createComponentUpdate(C);E._updateProperty(A,B,D)},_processComponentUpdate:function(C,A,B,D){if(A=="children"){if(D==null){this._processComponentRemove(C,B)}else{this._processComponentAdd(C,D)}}else{if(A=="layoutData"){this._processComponentLayoutDataUpdate(C,B,D)}else{this._processComponentPropertyUpdate(C,A,B,D)}}this._fireUpdate()},purge:function(){this.fullRefreshRequired=false;this._componentUpdateMap={};this._idMap={};this._removedIdMap={};this._hasUpdates=false;this._lastAncestorTestParentId=null},removeUpdateListener:function(A){this._listenerList.removeListener("update",A)},toString:function(){var B="[ UpdateManager ]\n";if(this.fullRefreshRequired){B+="fullRefresh"}else{for(var A in this._componentUpdateMap){B+=this._componentUpdateMap[A]}}return B}});Echo.AbstractButton=Core.extend(Echo.Component,{$abstract:true,$load:function(){Echo.ComponentFactory.registerType("AbstractButton",this);Echo.ComponentFactory.registerType("AB",this)},componentType:"AbstractButton",focusable:true,$virtual:{doAction:function(){this.fireEvent({type:"action",source:this,actionCommand:this.get("actionCommand")})}}});Echo.Button=Core.extend(Echo.AbstractButton,{$load:function(){Echo.ComponentFactory.registerType("Button",this);Echo.ComponentFactory.registerType("B",this)},componentType:"Button"});Echo.ToggleButton=Core.extend(Echo.AbstractButton,{$load:function(){Echo.ComponentFactory.registerType("ToggleButton",this);Echo.ComponentFactory.registerType("TB",this)},$abstract:true,componentType:"ToggleButton"});Echo.CheckBox=Core.extend(Echo.ToggleButton,{$load:function(){Echo.ComponentFactory.registerType("CheckBox",this);Echo.ComponentFactory.registerType("CB",this)},componentType:"CheckBox"});Echo.RadioButton=Core.extend(Echo.ToggleButton,{$load:function(){Echo.ComponentFactory.registerType("RadioButton",this);Echo.ComponentFactory.registerType("RB",this)},componentType:"RadioButton"});Echo.AbstractListComponent=Core.extend(Echo.Component,{$abstract:true,$load:function(){Echo.ComponentFactory.registerType("AbstractListComponent",this);Echo.ComponentFactory.registerType("LC",this)},componentType:"AbstractListComponent",focusable:true,$virtual:{doAction:function(){this.fireEvent({type:"action",source:this,actionCommand:this.get("actionCommand")})}}});Echo.ListBox=Core.extend(Echo.AbstractListComponent,{$static:{SINGLE_SELECTION:0,MULTIPLE_SELECTION:2},$load:function(){Echo.ComponentFactory.registerType("ListBox",this);Echo.ComponentFactory.registerType("LB",this)},componentType:"ListBox"});Echo.SelectField=Core.extend(Echo.AbstractListComponent,{$load:function(){Echo.ComponentFactory.registerType("SelectField",this);Echo.ComponentFactory.registerType("SF",this)},componentType:"SelectField"});Echo.Column=Core.extend(Echo.Component,{$load:function(){Echo.ComponentFactory.registerType("Column",this);Echo.ComponentFactory.registerType("C",this)},componentType:"Column"});Echo.Composite=Core.extend(Echo.Component,{$load:function(){Echo.ComponentFactory.registerType("Composite",this);Echo.ComponentFactory.registerType("CM",this)},componentType:"Composite"});Echo.Panel=Core.extend(Echo.Composite,{$load:function(){Echo.ComponentFactory.registerType("Panel",this);Echo.ComponentFactory.registerType("P",this)},componentType:"Panel"});Echo.ContentPane=Core.extend(Echo.Component,{$static:{OVERFLOW_AUTO:0,OVERFLOW_HIDDEN:1,OVERFLOW_SCROLL:2},$load:function(){Echo.ComponentFactory.registerType("ContentPane",this);Echo.ComponentFactory.registerType("CP",this)},componentType:"ContentPane",pane:true});Echo.Grid=Core.extend(Echo.Component,{$static:{ORIENTATION_HORIZONTAL:0,ORIENTATION_VERTICAL:1,SPAN_FILL:-1},$load:function(){Echo.ComponentFactory.registerType("Grid",this);Echo.ComponentFactory.registerType("G",this)},componentType:"Grid"});Echo.Label=Core.extend(Echo.Component,{$load:function(){Echo.ComponentFactory.registerType("Label",this);Echo.ComponentFactory.registerType("L",this)},componentType:"Label"});Echo.Row=Core.extend(Echo.Component,{$load:function(){Echo.ComponentFactory.registerType("Row",this);Echo.ComponentFactory.registerType("R",this)},componentType:"Row"});Echo.SplitPane=Core.extend(Echo.Component,{$static:{ORIENTATION_HORIZONTAL_LEADING_TRAILING:0,ORIENTATION_HORIZONTAL_TRAILING_LEADING:1,ORIENTATION_HORIZONTAL_LEFT_RIGHT:2,ORIENTATION_HORIZONTAL_RIGHT_LEFT:3,ORIENTATION_VERTICAL_TOP_BOTTOM:4,ORIENTATION_VERTICAL_BOTTOM_TOP:5,DEFAULT_SEPARATOR_POSITION:100,DEFAULT_SEPARATOR_SIZE_FIXED:0,DEFAULT_SEPARATOR_SIZE_RESIZABLE:4,DEFAULT_SEPARATOR_COLOR:"#3f3f4f",OVERFLOW_AUTO:0,OVERFLOW_HIDDEN:1,OVERFLOW_SCROLL:2},$load:function(){Echo.ComponentFactory.registerType("SplitPane",this);Echo.ComponentFactory.registerType("SP",this)},componentType:"SplitPane",pane:true});Echo.TextComponent=Core.extend(Echo.Component,{$abstract:true,$load:function(){Echo.ComponentFactory.registerType("TextComponent",this);Echo.ComponentFactory.registerType("TC",this)},componentType:"TextComponent",focusable:true});Echo.TextArea=Core.extend(Echo.TextComponent,{$load:function(){Echo.ComponentFactory.registerType("TextArea",this);Echo.ComponentFactory.registerType("TA",this)},componentType:"TextArea"});Echo.TextField=Core.extend(Echo.TextComponent,{$load:function(){Echo.ComponentFactory.registerType("TextField",this);Echo.ComponentFactory.registerType("TF",this)},componentType:"TextField"});Echo.PasswordField=Core.extend(Echo.TextField,{$load:function(){Echo.ComponentFactory.registerType("PasswordField",this);Echo.ComponentFactory.registerType("PF",this)},componentType:"PasswordField"});Echo.WindowPane=Core.extend(Echo.Component,{$load:function(){Echo.ComponentFactory.registerType("WindowPane",this);Echo.ComponentFactory.registerType("WP",this)},$static:{DEFAULT_BORDER:{color:"#4f4faf",borderInsets:20,contentInsets:3},DEFAULT_BACKGROUND:"#ffffff",DEFAULT_FOREGROUND:"#000000",DEFAULT_CONTROLS_INSETS:4,DEFAULT_HEIGHT:200,DEFAULT_MINIMUM_WIDTH:100,DEFAULT_MINIMUM_HEIGHT:100,DEFAULT_TITLE_HEIGHT:30,DEFAULT_WIDTH:400},componentType:"WindowPane",modalSupport:true,floatingPane:true,pane:true,focusable:true,_preMaximizedState:null,userClose:function(){this.fireEvent({type:"close",source:this})},userMaximize:function(){if(this.render("width")=="100%"&&this.render("height")=="100%"){if(this._preMaximizedState){this.set("width",this._preMaximizedState.width);this.set("height",this._preMaximizedState.height);this.set("positionX",this._preMaximizedState.x);this.set("positionY",this._preMaximizedState.y)}}else{this._preMaximizedState={x:this.get("positionX"),y:this.get("positionY"),width:this.get("width"),height:this.get("height")};this.set("width","100%");this.set("height","100%")}this.fireEvent({type:"maximize",source:this})},userMinimize:function(){this.fireEvent({type:"minimize",source:this})}});Echo.Render={_peers:{},_disposedComponents:null,_componentDepthArraySort:function(B,A){return Echo.Render._getComponentDepth(B.parent)-Echo.Render._getComponentDepth(A.parent)},_doRenderDisplay:function(B,A){if(A){Echo.Render._doRenderDisplayImpl(B)}else{for(var C=0;C<B.children.length;++C){Echo.Render._doRenderDisplayImpl(B.children[C])}}},_doRenderDisplayImpl:function(A){if(A.peer){if(A.peer.renderDisplay){A.peer.renderDisplay()}for(var B=0;B<A.children.length;++B){Echo.Render._doRenderDisplayImpl(A.children[B])}}},_getComponentDepth:function(A){var B=-1;while(A!=null){A=A.parent;++B}return B},getPeerClass:function(A){return Echo.Render._peers[A.componentType]},_loadPeer:function(A,B){if(B.peer){return }var C=Echo.Render._peers[B.componentType];if(!C){throw new Error("Peer not found for: "+B.componentType)}B.peer=new C();B.peer.component=B;B.peer.client=A},notifyResize:function(A){Echo.Render._doRenderDisplay(A,false)},_processDispose:function(C){var B=C.getRemovedDescendants();if(B){for(var A=0;A<B.length;++A){Echo.Render._renderComponentDisposeImpl(C,B[A])}}B=C.getRemovedChildren();if(B){for(var A=0;A<B.length;++A){Echo.Render._renderComponentDisposeImpl(C,B[A])}}},processUpdates:function(B){var E=B.application.updateManager;if(!E.hasUpdates()){return }Echo.Render._disposedComponents={};var I=E.getUpdates();I.sort(Echo.Render._componentDepthArraySort);for(var D=0;D<I.length;++D){I[D].renderContext={};var A=I[D].parent.peer;if(F==null&&I[D].parent.componentType=="Root"){Echo.Render._loadPeer(B,I[D].parent)}}for(var D=I.length-1;D>=0;--D){if(I[D]==null){continue}var F=I[D].parent.peer;Echo.Render._processDispose(I[D])}if(Echo.Client.profilingTimer){Echo.Client.profilingTimer.mark("rem")}for(var D=0;D<I.length;++D){if(I[D]==null){continue}var F=I[D].parent.peer;var K=F.renderUpdate(I[D]);if(K){for(var C=D+1;C<I.length;++C){if(I[C]!=null&&I[D].parent.isAncestorOf(I[C].parent)){I[C]=null}}}Echo.Render._setPeerDisposedState(I[D].parent,false)}if(Echo.Client.profilingTimer){Echo.Client.profilingTimer.mark("up")}for(var D=0;D<I.length;++D){if(I[D]==null){continue}if(I[D].renderContext.displayRequired){for(var C=0;C<I[D].renderContext.displayRequired.length;++C){Core.Debug.consoleWrite("PartialRenderUpdate:"+I[D].renderContext.displayRequired[C]);Echo.Render._doRenderDisplay(I[D].renderContext.displayRequired[C],true)}}else{Echo.Render._doRenderDisplay(I[D].parent,true)}}if(Echo.Client.profilingTimer){Echo.Client.profilingTimer.mark("disp")}for(var G in Echo.Render._disposedComponents){var H=Echo.Render._disposedComponents[G];Echo.Render._unloadPeer(H)}Echo.Render._disposedComponents=null;E.purge();if(B.focusUpdateRequired){var J=B.application.getFocusedComponent();if(J&&J.peer&&J.peer.renderFocus){J.peer.renderFocus();B.focusUpdateRequired=false}}},registerPeer:function(A,B){if(this._peers[A]){throw new Error("Peer already registered: "+A)}this._peers[A]=B},renderComponentAdd:function(C,B,A){if(!B.parent||!B.parent.peer||!B.parent.peer.client){throw new Error("Cannot find reference to the Client with which this component should be associated: cannot load peer.  This is due to the component's parent's peer not being associated with a Client. Component = "+B)}Echo.Render._loadPeer(B.parent.peer.client,B);Echo.Render._setPeerDisposedState(B,false);B.peer.renderAdd(C,A)},renderComponentDisplay:function(A){this._doRenderDisplay(A,true)},renderComponentDispose:function(B,A){this._renderComponentDisposeImpl(B,A)},_renderComponentDisposeImpl:function(C,A){if(!A.peer||A.peer.disposed){return }Echo.Render._setPeerDisposedState(A,true);A.peer.renderDispose(C);for(var B=0;B<A.children.length;++B){Echo.Render._renderComponentDisposeImpl(C,A.children[B])}},_setPeerDisposedState:function(A,B){if(B){A.peer.disposed=true;Echo.Render._disposedComponents[A.renderId]=A}else{A.peer.disposed=false;delete Echo.Render._disposedComponents[A.renderId]}},_unloadPeer:function(A){A.peer.client=null;A.peer.component=null;A.peer=null}};Echo.Render.ComponentSync=Core.extend({$static:{FOCUS_PERMIT_ARROW_UP:1,FOCUS_PERMIT_ARROW_DOWN:2,FOCUS_PERMIT_ARROW_LEFT:4,FOCUS_PERMIT_ARROW_RIGHT:8,FOCUS_PERMIT_ARROW_ALL:15},client:null,component:null,$construct:function(){},$abstract:{renderAdd:function(B,A){throw new Error('Operation "renderAdd" not supported (Component: '+this.component+").")},renderDispose:function(A){throw new Error('Operation "renderDispose" not supported (Component: '+this.component+").")},renderUpdate:function(A){throw new Error('Operation "renderUpdate" not supported (Component: '+this.component+").")}},$virtual:{getFocusFlags:null,renderFocus:null,renderDisplay:null}});Echo.Render.RootSync=Core.extend(Echo.Render.ComponentSync,{renderAdd:function(B,A){throw new Error("Unsupported operation: renderAdd().")},renderDispose:function(A){},renderUpdate:function(D){var B=false;if(D.hasAddedChildren()||D.hasRemovedChildren()){Core.Web.DOM.removeAllChildren(this.client.domainElement);for(var A=0;A<D.parent.children.length;++A){Echo.Render.renderComponentAdd(D,D.parent.children[A],this.client.domainElement)}B=true}if(D.hasUpdatedProperties()){var C=D.getUpdatedProperty("title");if(C){document.title=C.newValue}}return B}});Echo.Render.Util={};Echo.Render.registerPeer("Root",Echo.Render.RootSync);Echo.Sync={getEffectProperty:function(B,G,F,C,A,E){var D;if(C){D=B.render(F,E)}if(!D){D=B.render(G,A)}return D}};Echo.Sync.Alignment={_HORIZONTALS:{left:true,center:true,right:true,leading:true,trailing:true},_VERTICALS:{top:true,middle:true,bottom:true},getRenderedHorizontal:function(D,B){if(D==null){return null}var C=B?B.getRenderLayoutDirection():Echo.LayoutDirection.LTR;var A=typeof (D)=="object"?D.horizontal:D;switch(A){case"leading":return C.isLeftToRight()?"left":"right";case"trailing":return C.isLeftToRight()?"right":"left";default:return A in this._HORIZONTALS?A:null}},getHorizontal:function(A){if(A==null){return null}if(typeof (A=="string")){return A in this._HORIZONTALS?A:null}else{return A.horizontal}},getVertical:function(A){if(A==null){return null}if(typeof (A=="string")){return A in this._VERTICALS?A:null}else{return A.vertical}},render:function(H,E,D,G){if(H==null){return }var B=Echo.Sync.Alignment.getRenderedHorizontal(H,G);var C=typeof (H)=="object"?H.vertical:H;var A;switch(B){case"left":A="left";break;case"center":A="center";break;case"right":A="right";break;default:A="";break}var F;switch(C){case"top":F="top";break;case"middle":F="middle";break;case"bottom":F="bottom";break;default:F="";break}if(D){E.align=A;E.vAlign=F}else{E.style.textAlign=A;E.style.verticalAlign=F}}};Echo.Sync.Border={_PARSER_PX:new RegExp("^(-?\\d+px)?(?:^|$|(?= )) ?(none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset)?(?:^|$|(?= )) ?(#[0-9a-fA-F]{6})?$"),_PARSER:new RegExp("^(-?\\d+(?:px|pt|pc|cm|mm|in|em|ex))?(?:^|$|(?= )) ?(none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset)?(?:^|$|(?= )) ?(#[0-9a-fA-F]{6})?$"),_TEST_EXTENT_PX:/^(-?\d+px*)$/,compose:function(C,D,A){if(typeof C=="number"){C+="px"}var B=[];if(C){B.push(C)}if(D){B.push(D)}if(A){B.push(A)}return B.join(" ")},parse:function(A){if(!A){return{}}if(typeof (A)=="string"){var B=this._PARSER.exec(A);return{size:B[1],style:B[2],color:B[3]}}else{return{}}},render:function(A,C,B){if(!A){return }B=B?B:"border";if(typeof (A)=="string"){if(this._PARSER_PX.test(A)){C.style[B]=A}else{var D=this._PARSER.exec(A);if(D==null){throw new Error('Invalid border: "'+A+'"')}}}else{if(A.top){if(A.right){this.render(A.top,C,B+"Top");this.render(A.right,C,B+"Right");if(A.bottom){this.render(A.bottom,C,B+"Bottom")}else{this.render(A.top,C,B+"Bottom")}if(A.left){this.render(A.left,C,B+"Left")}else{this.render(A.right,C,B+"Left")}}else{this.render(A.top,C,B)}}}},renderClear:function(A,B){if(A){this.render(A,B)}else{B.style.border=""}},getPixelSize:function(B,A){if(!B){return 0}if(typeof (B)=="string"){var D=this._PARSER.exec(B)[1];if(D==null){return 0}else{if(this._TEST_EXTENT_PX.test(D)){return parseInt(D)}else{return Echo.Sync.Extent.toPixels(D)}}}else{if(typeof (B)=="object"){while(true){var C=this.getPixelSize(B[A]);if(C==null){switch(A){case"left":A="right";continue;case"right":case"bottom":A="top";continue}}return C}}}}};Echo.Sync.Color={adjust:function(F,D,C,B){var H=parseInt(F.substring(1),16);var G=parseInt(H/65536)+D;if(G<0){G=0}else{if(G>255){G=255}}var E=parseInt(H/256)%256+C;if(E<0){E=0}else{if(E>255){E=255}}var A=H%256+B;if(A<0){A=0}else{if(A>255){A=255}}return"#"+(G<16?"0":"")+G.toString(16)+(E<16?"0":"")+E.toString(16)+(A<16?"0":"")+A.toString(16)},render:function(A,B,C){if(A){B.style[C]=A}},renderClear:function(A,B,C){B.style[C]=A?A:""},renderFB:function(B,C){var A;if(A=B.render("foreground")){C.style.color=A}if(A=B.render("background")){C.style.backgroundColor=A}}};Echo.Sync.Extent={_PARSER:/^(-?\d+(?:\.\d+)?)(.+)?$/,_FORMATTED_PIXEL_TEST:/^(-?\d+px *)$/,isPercent:function(A){if(A==null||typeof (A)=="number"){return false}else{var B=this._PARSER.exec(arguments[0]);if(!B){throw new Error("Invalid Extent: "+arguments[0])}return B[2]=="%"}},toCssValue:function(C,A,B){switch(typeof (C)){case"number":return C+"px";break;case"string":if(this._FORMATTED_PIXEL_TEST.test(C)){return C}else{if(B&&this.isPercent(C)){return C}else{var D=this.toPixels(C,A);return D==null?"":this.toPixels(C,A)+"px"}}break}return""},toPixels:function(C,A){if(C==null){return 0}else{if(typeof (C)=="number"){return C}else{var E=this._PARSER.exec(C);if(!E){throw new Error("Invalid Extent: "+C)}var D=parseFloat(E[1]);var B=E[2]?E[2]:"px";return Core.Web.Measure.extentToPixels(D,B,A)}}}};Echo.Sync.FillImage={_REPEAT_VALUES:{"0":"no-repeat",x:"repeat-x",y:"repeat-y",xy:"repeat","no-repeat":"no-repeat","repeat-x":"repeat-x","repeat-y":"repeat-y",repeat:"repeat"},FLAG_ENABLE_IE_PNG_ALPHA_FILTER:1,render:function(F,E,C){if(F==null){return }var B=typeof (F)=="object";var D=B?F.url:F;if(Core.Web.Env.PROPRIETARY_IE_PNG_ALPHA_FILTER_REQUIRED&&C&&(C&this.FLAG_ENABLE_IE_PNG_ALPHA_FILTER)){E.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+D+"', sizingMethod='scale')"}else{E.style.backgroundImage="url("+D+")"}if(B){if(this._REPEAT_VALUES[F.repeat]){E.style.backgroundRepeat=this._REPEAT_VALUES[F.repeat]}if(F.x||F.y){var A,G;if(Echo.Sync.Extent.isPercent(F.x)){A=F.x}else{A=Echo.Sync.Extent.toPixels(F.x,true)+"px"}if(Echo.Sync.Extent.isPercent(F.y)){G=F.y}else{G=Echo.Sync.Extent.toPixels(F.y,false)+"px"}E.style.backgroundPosition=A+" "+G}}},renderClear:function(C,B,A){if(C){this.render(C,B,A)}else{B.style.backgroundImage="";B.style.backgroundPosition="";B.style.backgroundRepeat=""}}};Echo.Sync.Font={render:function(A,B){if(!A){return }if(A.typeface){if(A.typeface instanceof Array){B.style.fontFamily=A.typeface.join(",")}else{B.style.fontFamily=A.typeface}}if(A.size){B.style.fontSize=Echo.Sync.Extent.toCssValue(A.size)}if(A.bold){B.style.fontWeight="bold"}if(A.italic){B.style.fontStyle="italic"}if(A.underline){B.style.textDecoration="underline"}else{if(A.overline){B.style.textDecoration="overline"}else{if(A.lineThrough){B.style.textDecoration="line-through"}}}},renderClear:function(A,B){if(A){this.render(A,B)}else{B.style.fontFamily="";B.style.fontSize="";B.style.fontWeight="";B.style.fontStyle="";B.style.textDecoration=""}}};Echo.Sync.ImageReference={getUrl:function(A){return A?(typeof (A)=="string"?A:A.url):null},renderImg:function(A,B){if(!A){return }if(typeof (A)=="string"){B.src=A}else{B.src=A.url;if(A.width){B.style.width=Echo.Sync.Extent.toCssValue(A.width,true)}if(A.height){B.style.height=Echo.Sync.Extent.toCssValue(A.height,false)}}}};Echo.Sync.Insets={_FORMATTED_PIXEL_INSETS:/^(-?\d+px *){1,4}$/,_ZERO:{top:0,right:0,bottom:0,left:0},_INDEX_MAPS:{1:[0,0,0,0],2:[0,1,0,1],3:[0,1,2,1],4:[0,1,2,3]},render:function(A,B,D){switch(typeof (A)){case"number":B.style[D]=A+"px";break;case"string":if(this._FORMATTED_PIXEL_INSETS.test(A)){B.style[D]=A}else{var C=this.toPixels(A);B.style[D]=C.top+"px "+C.right+"px "+C.bottom+"px "+C.left+"px"}break}},toCssValue:function(A){switch(typeof (A)){case"number":return A+"px";break;case"string":if(this._FORMATTED_PIXEL_INSETS.test(A)){return A}else{var B=this.toPixels(A);return B.top+"px "+B.right+"px "+B.bottom+"px "+B.left+"px"}break}return""},toPixels:function(A){if(A==null){return this._ZERO}else{if(typeof (A)=="number"){return{top:A,right:A,bottom:A,left:A}}}A=A.split(" ");var B=this._INDEX_MAPS[A.length];return{top:Echo.Sync.Extent.toPixels(A[B[0]],false),right:Echo.Sync.Extent.toPixels(A[B[1]],true),bottom:Echo.Sync.Extent.toPixels(A[B[2]],false),left:Echo.Sync.Extent.toPixels(A[B[3]],true)}}};Echo.Sync.FloatingPaneManager=Core.extend({$construct:function(){this._floatingPanes=null;this._listeners=null},add:function(A){if(!this._floatingPanes){this._floatingPanes=[]}Core.Arrays.remove(this._floatingPanes,A);this._floatingPanes.push(A);this._fireZIndexEvent();return this._floatingPanes.length},addZIndexListener:function(A){if(!this._listeners){this._listeners=new Core.ListenerList()}this._listeners.addListener("zIndex",A)},_fireZIndexEvent:function(){if(this._listeners){this._listeners.fireEvent({type:"zIndex",source:this})}},getIndex:function(B){if(this._floatingPanes){var A=Core.Arrays.indexOf(this._floatingPanes,B);return A==-1?-1:A+1}else{return -1}},remove:function(A){if(!this._floatingPanes){return }Core.Arrays.remove(this._floatingPanes,A);this._fireZIndexEvent()},removeZIndexListener:function(A){if(!this._listeners){return }this._listeners.removeListener("zIndex",A)}});Echo.Sync.TriCellTable=Core.extend({$static:{INVERTED:1,VERTICAL:2,LEADING_TRAILING:0,TRAILING_LEADING:1,TOP_BOTTOM:2,BOTTOM_TOP:3,getOrientation:function(D,C){var A=D.render(C);var B;if(A){switch(Echo.Sync.Alignment.getRenderedHorizontal(A,D)){case"leading":B=this.LEADING_TRAILING;break;case"trailing":B=this.TRAILING_LEADING;break;case"left":B=this.LEADING_TRAILING;break;case"right":B=this.TRAILING_LEADING;break;default:switch(Echo.Sync.Alignment.getVertical(A,D)){case"top":B=this.TOP_BOTTOM;break;case"bottom":B=this.BOTTOM_TOP;break;default:B=this.TRAILING_LEADING;break}}}else{B=this.TRAILING_LEADING}return B},_createTablePrototype:function(){var A=document.createElement("table");A.style.borderCollapse="collapse";A.style.padding="0";tbodyElement=document.createElement("tbody");A.appendChild(tbodyElement);return A}},$load:function(){this._tablePrototype=this._createTablePrototype()},tableElement:null,tbodyElement:null,$construct:function(C,B,A,D){this.tableElement=Echo.Sync.TriCellTable._tablePrototype.cloneNode(true);this.tbodyElement=this.tableElement.firstChild;if(A==null){this.configure2(C,B)}else{this.configure3(C,B,A,D)}},addColumn:function(B,A){if(A!=null){B.appendChild(A)}},addRow:function(A){if(A==null){return }var B=document.createElement("tr");B.appendChild(A);this.tbodyElement.appendChild(B)},addSpacer:function(B,D,C){var A=document.createElement("div");A.style.width=C?"1px":D+"px";A.style.height=C?D+"px":"1px";B.appendChild(A)},configure2:function(B,A){this.tdElements=[document.createElement("td"),document.createElement("td")];this.tdElements[0].style.padding="0";this.tdElements[1].style.padding="0";this.marginTdElements=new Array(1);if(A){this.marginTdElements[0]=document.createElement("td");this.marginTdElements[0].style.padding="0";if((B&Echo.Sync.TriCellTable.VERTICAL)==0){this.marginTdElements[0].style.width=A+"px";this.addSpacer(this.marginTdElements[0],A,false)}else{this.marginTdElements[0].style.height=A+"px";this.addSpacer(this.marginTdElements[0],A,true)}}if(B&Echo.Sync.TriCellTable.VERTICAL){if(B&Echo.Sync.TriCellTable.INVERTED){this.addRow(this.tdElements[1]);this.addRow(this.marginTdElements[0]);this.addRow(this.tdElements[0])}else{this.addRow(this.tdElements[0]);this.addRow(this.marginTdElements[0]);this.addRow(this.tdElements[1])}}else{var C=document.createElement("tr");if(B&Echo.Sync.TriCellTable.INVERTED){this.addColumn(C,this.tdElements[1]);this.addColumn(C,this.marginTdElements[0]);this.addColumn(C,this.tdElements[0])}else{this.addColumn(C,this.tdElements[0]);this.addColumn(C,this.marginTdElements[0]);this.addColumn(C,this.tdElements[1])}this.tbodyElement.appendChild(C)}},configure3:function(F,D,C,H){this.tdElements=new Array(3);for(var B=0;B<3;++B){this.tdElements[B]=document.createElement("td");this.tdElements[B].style.padding="0"}this.marginTdElements=new Array(2);if(D||H!=null){if(D&&D>0){this.marginTdElements[0]=document.createElement("td");if(F&Echo.Sync.TriCellTable.VERTICAL){this.marginTdElements[0].style.height=D+"px";this.addSpacer(this.marginTdElements[0],D,true)}else{this.marginTdElements[0].style.width=D+"px";this.addSpacer(this.marginTdElements[0],D,false)}}if(H!=null&&H>0){this.marginTdElements[1]=document.createElement("td");if(F&Echo.Sync.TriCellTable.VERTICAL){this.marginTdElements[1].style.height=H+"px";this.addSpacer(this.marginTdElements[1],H,true)}else{this.marginTdElements[1].style.width=H+"px";this.addSpacer(this.marginTdElements[1],H,false)}}}if(F&Echo.Sync.TriCellTable.VERTICAL){if(C&Echo.Sync.TriCellTable.VERTICAL){if(C&Echo.Sync.TriCellTable.INVERTED){this.addRow(this.tdElements[2]);this.addRow(this.marginTdElements[1])}if(F&Echo.Sync.TriCellTable.INVERTED){this.addRow(this.tdElements[1]);this.addRow(this.marginTdElements[0]);this.addRow(this.tdElements[0])}else{this.addRow(this.tdElements[0]);this.addRow(this.marginTdElements[0]);this.addRow(this.tdElements[1])}if(!(C&Echo.Sync.TriCellTable.INVERTED)){this.addRow(this.marginTdElements[1]);this.addRow(this.tdElements[2])}}else{var E=(D&&D>0)?3:2;this.tdElements[2].rowSpan=E;if(this.marginTdElements[1]){this.marginTdElements[1].rowSpan=E}var G=document.createElement("tr");if(C&Echo.Sync.TriCellTable.INVERTED){this.addColumn(G,this.tdElements[2]);this.addColumn(G,this.marginTdElements[1]);if(F&Echo.Sync.TriCellTable.INVERTED){this.addColumn(G,this.tdElements[1])}else{this.addColumn(G,this.tdElements[0])}}else{if(F&Echo.Sync.TriCellTable.INVERTED){this.addColumn(G,this.tdElements[1])}else{this.addColumn(G,this.tdElements[0])}this.addColumn(G,this.marginTdElements[1]);this.addColumn(G,this.tdElements[2])}this.tbodyElement.appendChild(G);this.addRow(this.marginTdElements[0]);if(F&Echo.Sync.TriCellTable.INVERTED){this.addRow(this.tdElements[0])}else{this.addRow(this.tdElements[1])}}}else{if(C&Echo.Sync.TriCellTable.VERTICAL){var A=D?3:2;this.tdElements[2].setAttribute("colspan",A);if(this.marginTdElements[1]!=null){this.marginTdElements[1].setAttribute("colspan",Integer.toString(A))}if(C&Echo.Sync.TriCellTable.INVERTED){this.addRow(this.tdElements[2]);this.addRow(this.marginTdElements[1])}G=document.createElement("tr");if((F&Echo.Sync.TriCellTable.INVERTED)==0){this.addColumn(G,this.tdElements[0]);this.addColumn(G,this.marginTdElements[0]);this.addColumn(G,this.tdElements[1])}else{this.addColumn(G,this.tdElements[1]);this.addColumn(G,this.marginTdElements[0]);this.addColumn(G,this.tdElements[0])}this.tbodyElement.appendChild(G);if(!(C&Echo.Sync.TriCellTable.INVERTED)){this.addRow(this.marginTdElements[1]);this.addRow(this.tdElements[2])}}else{G=document.createElement("tr");if(C&Echo.Sync.TriCellTable.INVERTED){this.addColumn(G,this.tdElements[2]);this.addColumn(G,this.marginTdElements[1])}if(F&Echo.Sync.TriCellTable.INVERTED){this.addColumn(G,this.tdElements[1]);this.addColumn(G,this.marginTdElements[0]);this.addColumn(G,this.tdElements[0])}else{this.addColumn(G,this.tdElements[0]);this.addColumn(G,this.marginTdElements[0]);this.addColumn(G,this.tdElements[1])}if(!(C&Echo.Sync.TriCellTable.INVERTED)){this.addColumn(G,this.marginTdElements[1]);this.addColumn(G,this.tdElements[2])}this.tbodyElement.appendChild(G)}}}});Echo.Serial={_propertyTranslatorMap:{},_propertyTranslatorTypeData:[],addPropertyTranslator:function(A,B){this._propertyTranslatorMap[A]=B},addPropertyTranslatorByType:function(A,B){this._propertyTranslatorTypeData.push(A,B)},getPropertyTranslator:function(A){return this._propertyTranslatorMap[A]},getPropertyTranslatorByType:function(B){for(var A=0;A<this._propertyTranslatorTypeData.length;A+=2){if(this._propertyTranslatorTypeData[A]==B){return this._propertyTranslatorTypeData[A+1]}}return null},loadComponent:function(D,E,C){if(!E.nodeName=="c"){throw new Error("Element is not a component.")}var H=E.getAttribute("t");var B=E.getAttribute("i");var I=Echo.ComponentFactory.newInstance(H,B);var G=I.getLocalStyleData();var F=E.firstChild;while(F){if(F.nodeType==1){switch(F.nodeName){case"c":var A=this.loadComponent(D,F,C);I.add(A);break;case"p":this.loadProperty(D,F,I,G,C);break;case"s":I.setStyleName(F.firstChild?F.firstChild.nodeValue:null);break;case"e":this._loadComponentEvent(D,F,I);break;case"en":I.setEnabled(F.firstChild.nodeValue=="true");break;case"locale":I.setLocale(F.firstChild?F.firstChild.nodeValue:null);break;case"dir":I.setLayoutDirection(F.firstChild?(F.firstChild.nodeValue=="rtl"?Echo.LayoutDirection.RTL:Echo.LayoutDirection.LTR):null)}}F=F.nextSibling}return I},_loadComponentEvent:function(A,C,B){var D=C.getAttribute("t");A.addComponentListener(B,D)},loadProperty:function(G,E,I,L,F){var K=E.getAttribute("n");var C=E.getAttribute("t");var A=E.getAttribute("x");var H;if(C){var J=Echo.Serial._propertyTranslatorMap[C];if(!J){throw new Error("Translator not available for property type: "+C)}H=J.toProperty(G,E)}else{if(F){var D=E.getAttribute("r");if(D){H=F[D]}else{H=Echo.Serial.String.toProperty(G,E)}}else{H=Echo.Serial.String.toProperty(G,E)}}if(K){if(L){if(A==null){L[K]=H}else{var M=L[K];if(!M){M=[];L[K]=M}M[A]=H}}else{if(A==null){I.set(K,H)}else{I.setIndex(K,A,H)}}}else{var B=E.getAttribute("m");if(A==null){I[B](H)}else{I[B](A,H)}}},loadStyleSheet:function(B,A,E){var G=new Echo.StyleSheet();var F=A.firstChild;while(F){if(F.nodeType==1){if(F.nodeName=="s"){var D={};var C=F.firstChild;while(C){if(C.nodeType==1){switch(C.nodeName){case"p":this.loadProperty(B,C,null,D,E);break}}C=C.nextSibling}G.setStyle(F.getAttribute("n"),F.getAttribute("t"),D)}}F=F.nextSibling}return G},storeProperty:function(C,A,B){if(B==null){}else{if(typeof (B)=="object"){var D=null;if(B.className){D=this._propertyTranslatorMap[B.className]}else{D=this.getPropertyTranslatorByType(B.constructor)}if(!D||!D.toXml){return }D.toXml(C,A,B)}else{A.appendChild(A.ownerDocument.createTextNode(B.toString()))}}}};Echo.Serial.Null={toProperty:function(B,A){return null}};Echo.Serial.addPropertyTranslator("0",Echo.Serial.Null);Echo.Serial.Boolean={toProperty:function(B,A){return A.firstChild.data=="true"}};Echo.Serial.addPropertyTranslator("b",Echo.Serial.Boolean);Echo.Serial.Float={toProperty:function(B,A){return parseFloat(A.firstChild.data)}};Echo.Serial.addPropertyTranslator("f",Echo.Serial.Float);Echo.Serial.Integer={toProperty:function(B,A){return parseInt(A.firstChild.data)}};Echo.Serial.addPropertyTranslator("i",Echo.Serial.Integer);Echo.Serial.String={toProperty:function(B,A){var D=A.firstChild;if(!D){return""}var C=D.data;while(D.nextSibling){D=D.nextSibling;C+=D.data}return C}};Echo.Serial.addPropertyTranslator("s",Echo.Serial.String);Echo.Serial.Date={_expr:/(\d{4})\.(\d{2}).(\d{2})/,toProperty:function(C,B){var D=Echo.Serial.String.toProperty(C,B);var A=this._expr.exec(D);if(!A){return null}return new Date(A[1],parseInt(A[2])-1,A[3])},toXml:function(C,A,B){A.appendChild(A.ownerDocument.createTextNode(B.getFullYear()+"."+(B.getMonth()+1)+"."+B.getDate()))}};Echo.Serial.addPropertyTranslator("d",Echo.Serial.Date);Echo.Serial.addPropertyTranslatorByType(Date,Echo.Serial.Date);Echo.Serial.Map={toProperty:function(B,A){var D={};var C=A.firstChild;while(C){if(C.nodeType!=1){continue}Echo.Serial.loadProperty(B,C,null,D,null);C=C.nextSibling}return D}};Echo.Serial.addPropertyTranslator("m",Echo.Serial.Map);Echo.Serial.Alignment={_HORIZONTAL_MAP:{leading:"leading",trailing:"trailing",left:"left",center:"center",right:"right"},_VERTICAL_MAP:{top:"top",center:"middle",bottom:"bottom"},toProperty:function(B,A){var D=Core.Web.DOM.getChildElementByTagName(A,"a");var E=this._HORIZONTAL_MAP[D.getAttribute("h")];var C=this._VERTICAL_MAP[D.getAttribute("v")];if(E){if(C){return{horizontal:E,vertical:C}}return E}if(C){return C}return null}};Echo.Serial.addPropertyTranslator("Alignment",Echo.Serial.Alignment);Echo.Serial.addPropertyTranslator("AL",Echo.Serial.Alignment);Echo.Serial.Border={toProperty:function(B,A){var E=A.getAttribute("v");if(E){return E}else{var D=Core.Web.DOM.getChildElementByTagName(A,"b");var C={};E=D.getAttribute("t");if(E){C.top=E;E=D.getAttribute("r");if(E){C.right=E;E=D.getAttribute("b");if(E){C.bottom=E;E=D.getAttribute("l");if(E){C.left=E}}}}else{throw new Error("Invalid multi-sided border: no sides set.")}return C}}};Echo.Serial.addPropertyTranslator("Border",Echo.Serial.Border);Echo.Serial.addPropertyTranslator("BO",Echo.Serial.Border);Echo.Serial.Extent={toProperty:function(B,A){return A.firstChild.data},toXml:function(C,A,B){A.appendChild(A.ownerDocument.createTextNode(B.toString()))}};Echo.Serial.addPropertyTranslator("Extent",Echo.Serial.Extent);Echo.Serial.addPropertyTranslator("X",Echo.Serial.Extent);Echo.Serial.FillImage={toProperty:function(B,A){var C=Core.Web.DOM.getChildElementByTagName(A,"fi");return this._parseElement(B,C)},_parseElement:function(B,C){var D=C.getAttribute("u");if(B.decompressUrl){D=B.decompressUrl(D)}repeat=C.getAttribute("r");var A=C.getAttribute("x");var E=C.getAttribute("y");if(repeat||A||E){return{url:D,repeat:repeat,x:A,y:E}}else{return D}}};Echo.Serial.addPropertyTranslator("FillImage",Echo.Serial.FillImage);Echo.Serial.addPropertyTranslator("FI",Echo.Serial.FillImage);Echo.Serial.FillImageBorder={_NAMES:["topLeft","top","topRight","left","right","bottomLeft","bottom","bottomRight"],toProperty:function(B,A){var C=Core.Web.DOM.getChildElementByTagName(A,"fib");return Echo.Serial.FillImageBorder._parseElement(B,C)},_parseElement:function(A,E){var D={contentInsets:E.getAttribute("ci")==""?null:E.getAttribute("ci"),borderInsets:E.getAttribute("bi")==""?null:E.getAttribute("bi"),color:E.getAttribute("bc")};var C=E.firstChild;var B=0;while(C){if(C.nodeType==1){if(C.nodeName=="fi"){D[this._NAMES[B]]=Echo.Serial.FillImage._parseElement(A,C);++B}else{if(C.nodeName=="null-fi"){++B}}}C=C.nextSibling}if(!(B==0||B==8)){throw new Error("Invalid FillImageBorder image count: "+B)}return D}};Echo.Serial.addPropertyTranslator("FillImageBorder",Echo.Serial.FillImageBorder);Echo.Serial.addPropertyTranslator("FIB",Echo.Serial.FillImageBorder);Echo.Serial.Font={toProperty:function(C,A){var G=Core.Web.DOM.getChildElementByTagName(A,"f");var B=Core.Web.DOM.getChildElementsByTagName(G,"tf");var D={};if(B.length>1){D.typeface=new Array(B.length);for(var F=0;F<B.length;++F){D.typeface[F]=B[F].getAttribute("n")}}else{if(B.length==1){D.typeface=B[0].getAttribute("n")}}var E=G.getAttribute("sz");if(E){D.size=E}if(G.getAttribute("bo")){D.bold=true}if(G.getAttribute("it")){D.italic=true}if(G.getAttribute("un")){D.underline=true}if(G.getAttribute("ov")){D.overline=true}if(G.getAttribute("lt")){D.lineThrough=true}return D}};Echo.Serial.addPropertyTranslator("Font",Echo.Serial.Font);Echo.Serial.addPropertyTranslator("F",Echo.Serial.Font);Echo.Serial.ImageReference={toProperty:function(C,B){var D=B.firstChild.data;if(C.decompressUrl){D=C.decompressUrl(D)}var E=B.getAttribute("w");E=E?E:null;var A=B.getAttribute("h");A=A?A:null;if(E||A){return{url:D,width:E,height:A}}else{return D}}};Echo.Serial.addPropertyTranslator("ImageReference",Echo.Serial.ImageReference);Echo.Serial.addPropertyTranslator("I",Echo.Serial.ImageReference);Echo.Serial.Insets={toProperty:function(B,A){return A.firstChild.data}};Echo.Serial.addPropertyTranslator("Insets",Echo.Serial.Insets);Echo.Serial.addPropertyTranslator("N",Echo.Serial.Insets);Echo.Serial.LayoutData={toProperty:function(B,A){var D={};var C=A.firstChild;while(C){if(C.nodeType==1){switch(C.nodeName){case"p":Echo.Serial.loadProperty(B,C,null,D);break}}C=C.nextSibling}return D}};Echo.Serial.addPropertyTranslator("LayoutData",Echo.Serial.LayoutData);Echo.Serial.addPropertyTranslator("L",Echo.Serial.LayoutData);Echo.Client=Core.extend({$static:{FLAG_INPUT_PROPERTY:1,_activeClients:[],_globalWindowResizeListener:function(B){for(var A=0;A<Echo.Client._activeClients.length;++A){Echo.Client._activeClients[A]._windowResizeListener(B)}}},$load:function(){Core.Web.DOM.addEventListener(window,"resize",this._globalWindowResizeListener,false)},domainElement:null,application:null,focusUpdateRequired:false,_lastInputRestrictionId:0,_inputRestrictionCount:0,_inputRescriptionMap:null,_keyPressListener:null,_applicationFocusListener:null,parent:null,$construct:function(){this._inputRestrictionMap={};this._keyPressListener=Core.method(this,this._processKeyPress);this._applicationFocusListener=Core.method(this,this._processApplicationFocus)},$abstract:true,$virtual:{getResourceUrl:function(A,B){if(this.parent){return this.parent.getResourceUrl(A,B)}else{return null}},verifyInput:function(C,B){if(this._inputRestrictionCount!=0){if(!B&Echo.Client.FLAG_INPUT_PROPERTY){return false}for(var A in this._inputRestrictionMap){if(this._inputRestrictionMap[A]===false){return false}}}if(C){return C.isActive()}else{return this.application.isActive()}},dispose:function(){this.configure(null,null)}},configure:function(A,B){if(this.application){Core.Arrays.remove(Echo.Client._activeClients,this);Core.Web.Event.remove(this.domainElement,Core.Web.Env.QUIRK_IE_KEY_DOWN_EVENT_REPEAT?"keydown":"keypress",this._keyPressListener,false);this.application.removeFocusListener(this._applicationFocusListener)}this.application=A;this.domainElement=B;if(this.application){this.application.addFocusListener(this._applicationFocusListener);Core.Web.Event.add(this.domainElement,Core.Web.Env.QUIRK_IE_KEY_DOWN_EVENT_REPEAT?"keydown":"keypress",this._keyPressListener,false);Echo.Client._activeClients.push(this)}},createInputRestriction:function(A){var B=(++this._lastInputRestrictionId).toString();++this._inputRestrictionCount;this._inputRestrictionMap[B]=A;return B},_processApplicationFocus:function(B){var A=this.application.getFocusedComponent();if(A&&A.peer&&A.peer.renderFocus){A.peer.renderFocus();this.focusUpdateRequired=false}else{this.focusUpdateRequired=true}},_processKeyPress:function(A){if(A.keyCode==9){this.application.focusNext(A.shiftKey);Core.Web.DOM.preventEventDefault(A);return false}return true},removeInputRestriction:function(A){if(this._inputRestrictionMap[A]===undefined){return }delete this._inputRestrictionMap[A];--this._inputRestrictionCount},_windowResizeListener:function(A){Echo.Render.notifyResize(this.application.rootComponent)}});Echo.Client.Timer=Core.extend({_times:null,_labels:null,$construct:function(){this._times=[new Date().getTime()];this._labels=["Start"]},mark:function(A){this._times.push(new Date().getTime());this._labels.push(A)},toString:function(){var A="";for(var B=1;B<this._times.length;++B){var C=this._times[B]-this._times[B-1];A+=this._labels[B]+":"+C+" "}A+="TOT:"+(this._times[this._times.length-1]-this._times[0])+"ms";return A}});Echo.FreeClient=Core.extend(Echo.Client,{_processUpdateRef:null,_resourcePaths:null,$construct:function(A,B){Echo.Client.call(this);this._processUpdateRef=Core.method(this,this._processUpdate);this.configure(A,B)},addResourcePath:function(A,B){if(!this._resourcePaths){this._resourcePaths={}}this._resourcePaths[A]=B},dispose:function(){Core.Web.Scheduler.remove(this._autoUpdate);this.application.updateManager.removeUpdateListener(this._processUpdateRef);this._autoUpdate=null;Echo.Render.renderComponentDispose(null,this.application.rootComponent);Echo.Client.prototype.dispose.call(this)},getResourceUrl:function(A,B){if(this._resourcePaths&&this._resourcePaths[A]){return this._resourcePaths[A]+B}else{return Echo.Client.prototype.getResourceUrl.call(this,A,B)}},init:function(){Core.Web.init();this._autoUpdate=new Echo.FreeClient.AutoUpdate(this);this.application.updateManager.addUpdateListener(this._processUpdateRef);Core.Web.Scheduler.add(this._autoUpdate)},loadStyleSheet:function(A){var B=new Core.Web.HttpConnection(A,"GET");B.addResponseListener(Core.method(this,this._processStyleSheet));B.connect()},_processStyleSheet:function(B){if(!B.valid){throw new Error("Received invalid response from StyleSheet HTTP request.")}var A=B.source.getResponseXml().documentElement;var C=Echo.Serial.loadStyleSheet(this,A);this.application.setStyleSheet(C)},_processUpdate:function(A){}});Echo.FreeClient.AutoUpdate=Core.extend(Core.Web.Scheduler.Runnable,{timeInterval:10,repeat:true,_client:null,$construct:function(A){this._client=A},run:function(){Echo.Render.processUpdates(this._client)}});Echo.Sync.ArrayContainer=Core.extend(Echo.Render.ComponentSync,{$abstract:{cellElementNodeName:true,renderChildLayoutData:function(B,A){}},element:null,containerElement:null,spacingPrototype:null,cellSpacing:null,_childIdToElementMap:null,processKeyPress:function(E){switch(E.keyCode){case this.prevFocusKey:case this.nextFocusKey:var A=E.keyCode==this.prevFocusKey;var C=this.component.application.getFocusedComponent();if(C&&C.peer&&C.peer.getFocusFlags){var D=C.peer.getFocusFlags();if((A&&D&this.prevFocusFlag)||(!A&&D&this.nextFocusFlag)){var B=this.component.application.focusManager.findInParent(this.component,A);if(B){this.component.application.setFocusedComponent(B);Core.Web.DOM.preventEventDefault(E);return false}}}break}return true},renderAddChild:function(G,F,B){var A=document.createElement(this.cellElementNodeName);this._childIdToElementMap[F.renderId]=A;Echo.Render.renderComponentAdd(G,F,A);this.renderChildLayoutData(F,A);if(B!=null){var D;if(this.containerElement.childNodes.length>=3&&this.cellSpacing){D=(this.containerElement.childNodes.length+1)/2}else{D=this.containerElement.childNodes.length}if(B==D){B=null}}if(B==null){if(this.cellSpacing&&this.containerElement.firstChild){this.containerElement.appendChild(this.spacingPrototype.cloneNode(false))}this.containerElement.appendChild(A)}else{var E=this.cellSpacing?B*2:B;var C=this.containerElement.childNodes[E];this.containerElement.insertBefore(A,C);if(this.cellSpacing){this.containerElement.insertBefore(this.spacingPrototype.cloneNode(false),C)}}},renderAddChildren:function(D){this._childIdToElementMap={};var A=this.component.getComponentCount();for(var B=0;B<A;++B){var C=this.component.getComponent(B);this.renderAddChild(D,C)}Core.Web.Event.add(this.element,Core.Web.Env.QUIRK_IE_KEY_DOWN_EVENT_REPEAT?"keydown":"keypress",Core.method(this,this.processKeyPress),false)},renderDispose:function(A){Core.Web.Event.removeAll(this.element);this.element=null;this.containerElement=null;this._childIdToElementMap=null;this.spacingPrototype=null},renderRemoveChild:function(C,B){var A=this._childIdToElementMap[B.renderId];if(this.cellSpacing){if(A.previousSibling){this.containerElement.removeChild(A.previousSibling)}else{if(A.nextSibling){this.containerElement.removeChild(A.nextSibling)}}}this.containerElement.removeChild(A);delete this._childIdToElementMap[B.renderId]},renderUpdate:function(G){var D=false;if(G.hasUpdatedProperties()||G.hasUpdatedLayoutDataChildren()){D=true}else{var A=G.getRemovedChildren();if(A){for(var C=0;C<A.length;++C){this.renderRemoveChild(G,A[C])}}var E=G.getAddedChildren();if(E){for(var C=0;C<E.length;++C){this.renderAddChild(G,E[C],this.component.indexOf(E[C]))}}}if(D){var B=this.element;var F=B.parentNode;Echo.Render.renderComponentDispose(G,G.parent);F.removeChild(B);this.renderAdd(G,F)}return D}});Echo.Sync.Column=Core.extend(Echo.Sync.ArrayContainer,{$load:function(){Echo.Render.registerPeer("Column",this)},cellElementNodeName:"div",prevFocusKey:38,prevFocusFlag:Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_UP,nextFocusKey:40,nextFocusFlag:Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_DOWN,renderAdd:function(B,A){this.element=this.containerElement=document.createElement("div");this.element.id=this.component.renderId;this.element.style.outlineStyle="none";this.element.tabIndex="-1";Echo.Sync.Border.render(this.component.render("border"),this.element);Echo.Sync.Color.renderFB(this.component,this.element);Echo.Sync.Font.render(this.component.render("font"),this.element);Echo.Sync.Insets.render(this.component.render("insets"),this.element,"padding");this.cellSpacing=Echo.Sync.Extent.toPixels(this.component.render("cellSpacing"),false);if(this.cellSpacing){this.spacingPrototype=document.createElement("div");this.spacingPrototype.style.height=this.cellSpacing+"px";this.spacingPrototype.style.fontSize="1px";this.spacingPrototype.style.lineHeight="0"}this.renderAddChildren(B);A.appendChild(this.element)},renderChildLayoutData:function(C,A){var B=C.render("layoutData");if(B){Echo.Sync.Color.render(B.background,A,"backgroundColor");Echo.Sync.FillImage.render(B.backgroundImage,A);Echo.Sync.Insets.render(B.insets,A,"padding");Echo.Sync.Alignment.render(B.alignment,A,true,this.component);if(B.height){A.style.height=Echo.Sync.Extent.toPixels(B.height,false)+"px"}}}});Echo.Sync.Row=Core.extend(Echo.Sync.ArrayContainer,{$static:{_createRowPrototype:function(){var C=document.createElement("div");C.style.outlineStyle="none";C.style.overflow="hidden";C.tabIndex="-1";var B=document.createElement("table");B.style.borderCollapse="collapse";C.appendChild(B);var A=document.createElement("tbody");B.appendChild(A);A.appendChild(document.createElement("tr"));return C}},$load:function(){this._rowPrototype=this._createRowPrototype();Echo.Render.registerPeer("Row",this)},cellElementNodeName:"td",prevFocusKey:37,prevFocusFlag:Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_LEFT,nextFocusKey:39,nextFocusFlag:Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_RIGHT,renderAdd:function(B,A){this.element=Echo.Sync.Row._rowPrototype.cloneNode(true);this.element.id=this.component.renderId;Echo.Sync.Border.render(this.component.render("border"),this.element);Echo.Sync.Color.renderFB(this.component,this.element);Echo.Sync.Font.render(this.component.render("font"),this.element);Echo.Sync.Insets.render(this.component.render("insets"),this.element,"padding");Echo.Sync.Alignment.render(this.component.render("alignment"),this.element,true,this.component);this.containerElement=this.element.firstChild.firstChild.firstChild;this.cellSpacing=Echo.Sync.Extent.toPixels(this.component.render("cellSpacing"),false);if(this.cellSpacing){this.spacingPrototype=document.createElement("td");this.spacingPrototype.style.width=this.cellSpacing+"px"}this.renderAddChildren(B);A.appendChild(this.element)},renderChildLayoutData:function(D,B){var C=D.render("layoutData");var A;if(C){A=C.insets;Echo.Sync.Color.render(C.background,B,"backgroundColor");Echo.Sync.FillImage.render(C.backgroundImage,B);Echo.Sync.Alignment.render(C.alignment,B,true,this.component);if(C.width){if(Echo.Sync.Extent.isPercent(C.width)){B.style.width=C.width;if(this.element.firstChild.style.width!="100%"){this.element.firstChild.style.width="100%"}}else{B.style.width=Echo.Sync.Extent.toPixels(C.width,true)+"px"}}}if(!A){A=0}Echo.Sync.Insets.render(A,B,"padding")}});Echo.Sync.Button=Core.extend(Echo.Render.ComponentSync,{$static:{_createPrototypeButton:function(){var A=document.createElement("div");A.tabIndex="0";A.style.outlineStyle="none";A.style.cursor="pointer";A.style.overflow="hidden";return A},_defaultIconTextMargin:5},$load:function(){this._prototypeButton=this._createPrototypeButton();Echo.Render.registerPeer("Button",this)},_prototypeButton:null,_processRolloverExitRef:null,_processInitEventRef:null,$construct:function(){this._processInitEventRef=Core.method(this,this._processInitEvent)},$virtual:{doAction:function(){this.component.doAction()},renderContent:function(){var E=this.component.render("text");var D=Echo.Sync.getEffectProperty(this.component,"icon","disabledIcon",!this._enabled);if(E!=null){if(D){var A=this.component.render("iconTextMargin",Echo.Sync.Button._defaultIconTextMargin);var C=Echo.Sync.TriCellTable.getOrientation(this.component,"textPosition");var B=new Echo.Sync.TriCellTable(C,Echo.Sync.Extent.toPixels(A));this._renderButtonText(B.tdElements[0],E);this._iconImg=this._renderButtonIcon(B.tdElements[1],D);this._div.appendChild(B.tableElement)}else{this._renderButtonText(this._div,E)}}else{if(D){this._iconImg=this._renderButtonIcon(this._div,D)}}}},_addEventListeners:function(){this._processRolloverExitRef=Core.method(this,this._processRolloverExit);Core.Web.Event.remove(this._div,"focus",this._processInitEventRef);Core.Web.Event.remove(this._div,"mouseover",this._processInitEventRef);Core.Web.Event.add(this._div,"click",Core.method(this,this._processClick),false);Core.Web.Event.add(this._div,"keypress",Core.method(this,this._processKeyPress),false);if(this.component.render("rolloverEnabled")){var A=Core.Web.Env.PROPRIETARY_EVENT_MOUSE_ENTER_LEAVE_SUPPORTED;var C=A?"mouseenter":"mouseover";var B=A?"mouseleave":"mouseout";Core.Web.Event.add(this._div,C,Core.method(this,this._processRolloverEnter),false);Core.Web.Event.add(this._div,B,Core.method(this,this._processRolloverExit),false)}if(this.component.render("pressedEnabled")){Core.Web.Event.add(this._div,"mousedown",Core.method(this,this._processPress),false);Core.Web.Event.add(this._div,"mouseup",Core.method(this,this._processRelease),false)}Core.Web.Event.add(this._div,"focus",Core.method(this,this._processFocus),false);Core.Web.Event.add(this._div,"blur",Core.method(this,this._processBlur),false);Core.Web.Event.Selection.disable(this._div)},getFocusFlags:function(){return Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_ALL},_processBlur:function(A){if(!this.client.verifyInput(this.component)){return }this._setFocusState(false)},_processClick:function(A){if(!this.client.verifyInput(this.component)){return }this.component.application.setFocusedComponent(this.component);this.doAction()},_processFocus:function(A){if(!this.client.verifyInput(this.component)){return }this._setFocusState(true)},_processInitEvent:function(A){this._addEventListeners();switch(A.type){case"focus":this._processFocus(A);break;case"mouseover":if(this.component.render("rolloverEnabled")){this._processRolloverEnter(A)}break}},_processKeyPress:function(A){if(!this.client.verifyInput(this.component)){return true}if(A.keyCode==13){this.doAction();return false}else{return true}},_processPress:function(A){if(!this.client.verifyInput(this.component)){return }Core.Web.DOM.preventEventDefault(A);this._setPressedState(true)},_processRelease:function(A){if(!this.client.verifyInput(this.component)){return }this._setPressedState(false)},_processRolloverEnter:function(A){if(!this.client.verifyInput(this.component)||Core.Web.dragInProgress){return }this.component.application.addFocusListener(this._processRolloverExitRef);this._setRolloverState(true)},_processRolloverExit:function(A){if(!this.client.verifyInput(this.component)){return }if(this._processRolloverExitRef){this.component.application.removeFocusListener(this._processRolloverExitRef)}this._setRolloverState(false)},renderAdd:function(E,B){this._enabled=this.component.isRenderEnabled();this._div=Echo.Sync.Button._prototypeButton.cloneNode(false);this._div.id=this.component.renderId;if(this._enabled){Echo.Sync.Color.render(this.component.render("foreground"),this._div,"color");Echo.Sync.Color.render(this.component.render("background"),this._div,"backgroundColor");Echo.Sync.Border.render(this.component.render("border"),this._div);Echo.Sync.Font.render(this.component.render("font"),this._div);Echo.Sync.FillImage.render(this.component.render("backgroundImage"),this._div)}else{Echo.Sync.Color.render(Echo.Sync.getEffectProperty(this.component,"foreground","disabledForeground",true),this._div,"color");Echo.Sync.Color.render(Echo.Sync.getEffectProperty(this.component,"background","disabledBackground",true),this._div,"backgroundColor");Echo.Sync.Border.render(Echo.Sync.getEffectProperty(this.component,"border","disabledBorder",true),this._div);Echo.Sync.Font.render(Echo.Sync.getEffectProperty(this.component,"font","disabledFont",true),this._div);Echo.Sync.FillImage.render(Echo.Sync.getEffectProperty(this.component,"backgroundImage","disabledBackgroundImage",true),this._div)}Echo.Sync.Insets.render(this.component.render("insets"),this._div,"padding");Echo.Sync.Alignment.render(this.component.render("alignment"),this._div,true,this.component);var D=this.component.render("toolTipText");if(D){this._div.title=D}var C=this.component.render("width");if(C){this._div.style.width=Echo.Sync.Extent.toCssValue(C,true,true)}var A=this.component.render("height");if(A){this._div.style.height=Echo.Sync.Extent.toCssValue(A,false);this._div.style.overflow="hidden"}this.renderContent();if(this._enabled){Core.Web.Event.add(this._div,"focus",this._processInitEventRef,false);Core.Web.Event.add(this._div,"mouseover",this._processInitEventRef,false)}B.appendChild(this._div)},_renderButtonText:function(A,C){var B=this.component.render("textAlignment");if(B){Echo.Sync.Alignment.render(B,A,true,this.component)}A.appendChild(document.createTextNode(C));if(!this.component.render("lineWrap",true)){A.style.whiteSpace="nowrap"}},_renderButtonIcon:function(A,B){var D=this.component.render("alignment");if(D){Echo.Sync.Alignment.render(D,A,true,this.component)}var C=document.createElement("img");Echo.Sync.ImageReference.renderImg(B,C);A.appendChild(C);return C},renderDispose:function(A){if(this._processRolloverExitRef){this.client.application.removeFocusListener(this._processRolloverExitRef)}Core.Web.Event.removeAll(this._div);this._iconImg=null},renderFocus:function(){Core.Web.DOM.focusElement(this._div);this._setFocusState(true)},renderUpdate:function(C){var A=this._div;var B=A.parentNode;this.renderDispose(C);B.removeChild(A);this.renderAdd(C,B);return false},_setFocusState:function(D){if(!this.component.render("focusedEnabled")){var E=this.component.render("background");if(E!=null){var A=D?Echo.Sync.Color.adjust(E,32,32,32):E;Echo.Sync.Color.render(A,this._div,"backgroundColor")}return }else{var G=Echo.Sync.getEffectProperty(this.component,"foreground","focusedForeground",D);var E=Echo.Sync.getEffectProperty(this.component,"background","focusedBackground",D);var H=Echo.Sync.getEffectProperty(this.component,"backgroundImage","focusedBackgroundImage",D);var B=Echo.Sync.getEffectProperty(this.component,"font","focusedFont",D);var C=Echo.Sync.getEffectProperty(this.component,"border","focusedBorder",D);Echo.Sync.Color.renderClear(G,this._div,"color");Echo.Sync.Color.renderClear(E,this._div,"backgroundColor");Echo.Sync.FillImage.renderClear(H,this._div,"backgroundColor");Echo.Sync.Font.renderClear(B,this._div);Echo.Sync.Border.renderClear(C,this._div);if(this._iconImg){var F=Echo.Sync.ImageReference.getUrl(Echo.Sync.getEffectProperty(this.component,"icon","focusedIcon",D));if(F!=this._iconImg.src){this._iconImg.src=F}}}},_setPressedState:function(A){var F=Echo.Sync.getEffectProperty(this.component,"foreground","pressedForeground",A);var D=Echo.Sync.getEffectProperty(this.component,"background","pressedBackground",A);var G=Echo.Sync.getEffectProperty(this.component,"backgroundImage","pressedBackgroundImage",A);var B=Echo.Sync.getEffectProperty(this.component,"font","pressedFont",A);var C=Echo.Sync.getEffectProperty(this.component,"border","pressedBorder",A);Echo.Sync.Color.renderClear(F,this._div,"color");Echo.Sync.Color.renderClear(D,this._div,"backgroundColor");Echo.Sync.FillImage.renderClear(G,this._div,"backgroundColor");Echo.Sync.Font.renderClear(B,this._div);Echo.Sync.Border.renderClear(C,this._div);if(this._iconImg){var E=Echo.Sync.ImageReference.getUrl(Echo.Sync.getEffectProperty(this.component,"icon","pressedIcon",A));if(E!=this._iconImg.src){this._iconImg.src=E}}},_setRolloverState:function(A){var F=Echo.Sync.getEffectProperty(this.component,"foreground","rolloverForeground",A);var D=Echo.Sync.getEffectProperty(this.component,"background","rolloverBackground",A);var G=Echo.Sync.getEffectProperty(this.component,"backgroundImage","rolloverBackgroundImage",A);var B=Echo.Sync.getEffectProperty(this.component,"font","rolloverFont",A);var C=Echo.Sync.getEffectProperty(this.component,"border","rolloverBorder",A);Echo.Sync.Color.renderClear(F,this._div,"color");Echo.Sync.Color.renderClear(D,this._div,"backgroundColor");Echo.Sync.FillImage.renderClear(G,this._div,"backgroundColor");Echo.Sync.Font.renderClear(B,this._div);Echo.Sync.Border.renderClear(C,this._div);if(this._iconImg){var E=Echo.Sync.ImageReference.getUrl(Echo.Sync.getEffectProperty(this.component,"icon","rolloverIcon",A));if(E!=this._iconImg.src){this._iconImg.src=E}}}});Echo.Sync.ToggleButton=Core.extend(Echo.Sync.Button,{$load:function(){Echo.Render.registerPeer("ToggleButton",this)},_selected:false,_stateElement:null,$abstract:{createStateElement:function(){},updateStateElement:function(){}},$virtual:{doAction:function(){this.setSelected(!this._selected);Echo.Sync.Button.prototype.doAction.call(this)}},renderAdd:function(B,A){this._selected=this.component.render("selected");Echo.Sync.Button.prototype.renderAdd.call(this,B,A)},getStateIcon:function(){var A;if(this._selected){A=Echo.Sync.getEffectProperty(this.component,"selectedStateIcon","disabledSelectedStateIcon",!this._enabled)}if(!A){A=Echo.Sync.getEffectProperty(this.component,"stateIcon","disabledStateIcon",!this._enabled)}return A},renderContent:function(){var H=this.component.render("text");var D=this.component.render("icon");this._stateElement=this.createStateElement();var A=(H?1:0)+(D?1:0)+(this._stateElement?1:0);if(A==1){if(H!=null){this._renderButtonText(this._div,H)}else{if(D){this._iconImg=this._renderButtonIcon(this._div,D)}else{this._div.appendChild(this._stateElement)}}}else{if(A==2){var C=Echo.Sync.TriCellTable.getOrientation(this.component,"textPosition");var E;if(this._stateElement){E=this.component.render("stateMargin",Echo.Sync.Button._defaultIconTextMargin)}else{E=this.component.render("iconTextMargin",Echo.Sync.Button._defaultIconTextMargin)}var B=new Echo.Sync.TriCellTable(C,Echo.Sync.Extent.toPixels(E));if(H!=null){this._renderButtonText(B.tdElements[0],H);if(D){this._iconImg=this._renderButtonIcon(B.tdElements[1],D)}else{B.tdElements[1].appendChild(this._stateElement)}}else{this._iconImg=this._renderButtonIcon(B.tdElements[0],D);B.tdElements[1].appendChild(this._stateElement)}this._div.appendChild(B.tableElement)}else{if(A==3){var C=Echo.Sync.TriCellTable.getOrientation(this.component,"textPosition");var E=this.component.render("iconTextMargin",Echo.Sync.Button._defaultIconTextMargin);var F=Echo.Sync.TriCellTable.TRAILING_LEADING;var G=this.component.render("stateMargin",Echo.Sync.Button._defaultIconTextMargin);var B=new Echo.Sync.TriCellTable(C,Echo.Sync.Extent.toPixels(E),F,Echo.Sync.Extent.toPixels(G));this._renderButtonText(B.tdElements[0],H);this._iconImg=this._renderButtonIcon(B.tdElements[1],D);B.tdElements[2].appendChild(this._stateElement);this._div.appendChild(B.tableElement)}}}},renderDispose:function(A){Echo.Sync.Button.prototype.renderDispose.call(this,A);if(this._stateElement){Core.Web.Event.removeAll(this._stateElement);this._stateElement=null}},setSelected:function(A){if(this._selected==A){return }this._selected=A;this.component.set("selected",A);this.updateStateElement()}});Echo.Sync.CheckBox=Core.extend(Echo.Sync.ToggleButton,{$load:function(){Echo.Render.registerPeer("CheckBox",this)},createStateElement:function(){var B=this.getStateIcon();var A;if(B){A=document.createElement("img");Echo.Sync.ImageReference.renderImg(B,A)}else{A=document.createElement("input");A.type="checkbox";A.defaultChecked=this._selected?true:false;Core.Web.Event.add(A,"change",Core.method(this,this._processStateChange),false)}return A},_processStateChange:function(A){this.updateStateElement()},updateStateElement:function(){var A=this.getStateIcon();if(A){this._stateElement.src=Echo.Sync.ImageReference.getUrl(A)}else{this._stateElement.checked=this._selected?true:false}}});Echo.Sync.RadioButton=Core.extend(Echo.Sync.ToggleButton,{$static:{_nextNameId:0,_groups:new Core.Arrays.LargeMap()},$load:function(){Echo.Render.registerPeer("RadioButton",this)},_group:null,$construct:function(){Echo.Sync.ToggleButton.call(this)},doAction:function(){if(this._group){this._group.deselect()}Echo.Sync.ToggleButton.prototype.doAction.call(this)},renderAdd:function(D,A){var B=this.component.render("group");if(B!=null){var C=Echo.Sync.RadioButton._groups.map[B];if(!C){C=new Echo.Sync.RadioButton.Group(B);Echo.Sync.RadioButton._groups.map[B]=C}C.add(this);this._group=C}Echo.Sync.ToggleButton.prototype.renderAdd.call(this,D,A)},createStateElement:function(){var B=this.getStateIcon();var A;if(B){A=document.createElement("img");Echo.Sync.ImageReference.renderImg(B,A)}else{A=document.createElement("input");A.type="radio";A.name="__echo_"+Echo.Sync.RadioButton._nextNameId++;A.defaultChecked=this._selected?true:false;Core.Web.Event.add(A,"change",Core.method(this,this._processStateChange),false)}return A},_processStateChange:function(A){this.updateStateElement()},renderDispose:function(A){Echo.Sync.ToggleButton.prototype.renderDispose.call(this,A);if(this._group){this._group.remove(this);if(this._group.size()==0){Echo.Sync.RadioButton._groups.remove(this._group.id)}this._group=null}},updateStateElement:function(){var A=this.getStateIcon();if(A){this._stateElement.src=Echo.Sync.ImageReference.getUrl(A)}else{this._stateElement.checked=this._selected?true:false}}});Echo.Sync.RadioButton.Group=Core.extend({id:null,_buttons:null,$construct:function(A){this.id=A;this._buttons=[]},add:function(A){this._buttons.push(A)},deselect:function(){for(var A=0;A<this._buttons.length;++A){this._buttons[A].setSelected(false)}},remove:function(B){var C=-1;for(var A=0;A<this._buttons.length;++A){if(this._buttons[A]==B){C=A;break}}if(C==-1){throw new Error("No such button: "+B.component.renderId)}if(this._buttons.length==1){this._buttons=[]}else{this._buttons[C]=this._buttons[this._buttons.length-1];this._buttons.length=this._buttons.length-1}},size:function(){return this._buttons.length}});Echo.Sync.ContentPane=Core.extend(Echo.Render.ComponentSync,{$static:{DEFAULT_BACKGROUND:"#ffffff"},$load:function(){Echo.Render.registerPeer("ContentPane",this)},$construct:function(){this._floatingPaneManager=null},_processZIndexChanged:function(D){for(var C=0;C<this.component.children.length;++C){if(!this.component.children[C].floatingPane){continue}var B=this._floatingPaneManager.getIndex(this.component.children[C].renderId);var A=this._childIdToElementMap[this.component.children[C].renderId];if(A){A.style.zIndex=B}}},raise:function(A){if(!this._floatingPaneManager){this._floatingPaneManager=new Echo.Sync.FloatingPaneManager();this._floatingPaneManager.addZIndexListener(Core.method(this,this._processZIndexChanged))}this._floatingPaneManager.add(A.renderId)},renderAdd:function(G,A){this._div=document.createElement("div");this._div.id=this.component.renderId;this._div.style.position="absolute";this._div.style.width="100%";this._div.style.height="100%";this._div.style.overflow="hidden";this._div.style.zIndex="0";Echo.Sync.Font.render(this.component.render("font"),this._div);Echo.Sync.Color.render(this.component.render("foreground"),this._div,"color");var D=this.component.render("background");var E=this.component.render("backgroundImage");Echo.Sync.Color.render(D,this._div,"backgroundColor");Echo.Sync.FillImage.render(E,this._div);if(!D&&!E){Echo.Sync.FillImage.render(this.client.getResourceUrl("Echo","resource/Transparent.gif"),this._div)}this._childIdToElementMap={};var B=this.component.getComponentCount();for(var C=0;C<B;++C){var F=this.component.getComponent(C);this._renderAddChild(G,F)}this._pendingScrollX=this.component.render("horizontalScroll");this._pendingScrollY=this.component.render("verticalScroll");A.appendChild(this._div)},_renderAddChild:function(E,D){var B=document.createElement("div");this._childIdToElementMap[D.renderId]=B;B.style.position="absolute";if(D.floatingPane){B.style.zIndex="1"}else{var A=this.component.render("insets",0);var C=Echo.Sync.Insets.toPixels(A);B.style.zIndex="0";B.style.left=C.left+"px";B.style.top=C.top+"px";B.style.bottom=C.bottom+"px";B.style.right=C.right+"px";if(D.pane){B.style.overflow="auto"}else{switch(this.component.render("overflow")){case Echo.ContentPane.OVERFLOW_HIDDEN:B.style.overflow="hidden";break;case Echo.ContentPane.OVERFLOW_SCROLL:B.style.overflow="scroll";break;default:B.style.overflow="auto";break}}}Echo.Render.renderComponentAdd(E,D,B);this._div.appendChild(B);if(D.floatingPane){this.raise(D)}},renderDispose:function(A){this._childIdToElementMap=null;this._div=null},_renderRemoveChild:function(C,B){if(B.floatingPane&&this._floatingPaneManager){this._floatingPaneManager.remove(B.renderId)}var A=this._childIdToElementMap[B.renderId];A.parentNode.removeChild(A);delete this._childIdToElementMap[B.renderId]},renderDisplay:function(){var D=this._div.firstChild;while(D){Core.Web.VirtualPosition.redraw(D);D=D.nextSibling}if(this._pendingScrollX||this._pendingScrollY){var A=this.component.getComponentCount();for(var B=0;B<A;++B){var D=this.component.getComponent(B);if(!D.floatingPane){var C=this._childIdToElementMap[D.renderId];if(this._pendingScrollX){C.scrollLeft=parseInt(this._pendingScrollX<0)?1000000:this._pendingScrollX;this._pendingScrollX=null}if(this._pendingScrollY){C.scrollTop=parseInt(this._pendingScrollY)<0?1000000:this._pendingScrollY;this._pendingScrollY=null}break}}}},renderUpdate:function(G){var D=false;if(G.hasUpdatedProperties()||G.hasUpdatedLayoutDataChildren()){D=true}else{var A=G.getRemovedChildren();if(A){for(var C=0;C<A.length;++C){this._renderRemoveChild(G,A[C])}}var E=G.getAddedChildren();G.renderContext.displayRequired=[];if(E){for(var C=0;C<E.length;++C){this._renderAddChild(G,E[C],this.component.indexOf(E[C]));G.renderContext.displayRequired.push(E[C])}}}if(D){var B=this._div;var F=B.parentNode;Echo.Render.renderComponentDispose(G,G.parent);F.removeChild(B);this.renderAdd(G,F)}return D}});Echo.Sync.Label=Core.extend(Echo.Render.ComponentSync,{$static:{_defaultIconTextMargin:5},$load:function(){Echo.Render.registerPeer("Label",this)},_node:null,_formatWhitespace:function(E,C){E=E.replace(/\t/g," \u00a0 \u00a0");E=E.replace(/ {2}/g," \u00a0");var B=E.split("\n");for(var D=0;D<B.length;D++){var A=B[D];if(D>0){C.appendChild(document.createElement("br"))}if(A.length>0){C.appendChild(document.createTextNode(A))}}},renderAdd:function(G,L){this._containerElement=L;var K=this.component.render("icon");var M=this.component.render("text");var I=this.component.render("foreground");var B=this.component.render("background");var A=this.component.render("toolTipText");if(M!=null){var N=this.component.render("lineWrap",true);var F=this.component.render("formatWhitespace",false)&&(M.indexOf(" ")!=-1||M.indexOf("\n")!=-1||M.indexOf("\t")!=-1);if(K){var E=this.component.render("iconTextMargin",Echo.Sync.Label._defaultIconTextMargin);var C=Echo.Sync.TriCellTable.getOrientation(this.component,"textPosition");var J=new Echo.Sync.TriCellTable(C,Echo.Sync.Extent.toPixels(E));var H=document.createElement("img");Echo.Sync.ImageReference.renderImg(K,H);if(F){this._formatWhitespace(M,J.tdElements[0])}else{J.tdElements[0].appendChild(document.createTextNode(M))}if(!N){J.tdElements[0].style.whiteSpace="nowrap"}J.tdElements[1].appendChild(H);this._node=J.tableElement;this._node.id=this.component.renderId;Echo.Sync.Font.render(this.component.render("font"),this._node);Echo.Sync.Color.renderFB(this.component,this._node)}else{var D=this.component.render("font");if(!A&&!D&&N&&!I&&!B&&!F){this._node=document.createTextNode(M)}else{this._node=document.createElement("span");this._node.id=this.component.renderId;if(F){this._formatWhitespace(M,this._node)}else{this._node.appendChild(document.createTextNode(M))}if(!N){this._node.style.whiteSpace="nowrap"}Echo.Sync.Font.render(D,this._node);Echo.Sync.Color.renderFB(this.component,this._node)}}}else{if(K){var H=document.createElement("img");Echo.Sync.ImageReference.renderImg(K,H);this._node=document.createElement("span");this._node.id=this.component.renderId;this._node.appendChild(H);Echo.Sync.Color.renderFB(this.component,this._node)}else{this._node=null}}if(A){this._node.title=A}if(this._node){L.appendChild(this._node)}},renderDispose:function(A){this._containerElement=null;this._node=null},renderUpdate:function(A){if(this._node){this._node.parentNode.removeChild(this._node)}this.renderAdd(A,this._containerElement);return false}});Echo.Sync.ListComponent=Core.extend(Echo.Render.ComponentSync,{$static:{DEFAULT_DIV_HEIGHT:"6em",DEFAULT_DIV_BORDER:"1px solid",DEFAULT_SELECTED_BACKGROUND:"#0a246a",DEFAULT_SELECTED_FOREGROUND:"#ffffff"},$abstract:true,_hasRenderedSelectedItems:false,_multipleSelect:false,_selectedIdPriority:false,_alternateRender:false,_element:null,_div:null,_processClick:function(D){if(!this.client.verifyInput(this.component)){Core.Web.DOM.preventEventDefault(D);this._renderSelection();return }var E=this._div.firstChild;var B=0;while(E){if(E==D.target){break}E=E.nextSibling;++B}if(E==null){return }if(this._multipleSelect&&D.ctrlKey){var C=this._getSelection();if(C==null){C=[]}var A=Core.Arrays.indexOf(C,B);if(A==-1){C.push(B)}else{C.splice(A,1)}}else{C=B}this._setSelection(C);this.component.doAction();this._renderSelection()},_processChange:function(C){if(!this.client.verifyInput(this.component)){Core.Web.DOM.preventEventDefault(C);this._renderSelection();return }var B;if(this._multipleSelect){B=[];for(var A=0;A<this._element.options.length;++A){if(this._element.options[A].selected){B.push(A)}}}else{if(this._element.selectedIndex!=-1){B=this._element.selectedIndex}}this._setSelection(B);this.component.doAction()},_processSelectStart:function(A){Core.Web.DOM.preventEventDefault(A)},_renderMainAsSelect:function(F,B,E){this._element=document.createElement("select");this._element.id=this.component.renderId;this._element.size=E;if(!this._enabled){this._element.disabled=true}if(this._multipleSelect){this._element.multiple="multiple"}Echo.Sync.Border.render(Echo.Sync.getEffectProperty(this.component,"border","disabledBorder",!this._enabled),this._element);Echo.Sync.Color.render(Echo.Sync.getEffectProperty(this.component,"foreground","disabledForeground",!this._enabled),this._element,"color");Echo.Sync.Color.render(Echo.Sync.getEffectProperty(this.component,"background","disabledBackground",!this._enabled),this._element,"backgroundColor");Echo.Sync.Font.render(Echo.Sync.getEffectProperty(this.component,"font","disabledFont",!this._enabled),this._element);Echo.Sync.Insets.render(this.component.render("insets"),this._element,"padding");var C=this.component.get("items");if(C){for(var D=0;D<C.length;++D){var A=document.createElement("option");if(C[D].text==null){A.appendChild(document.createTextNode(C[D].toString()))}else{A.appendChild(document.createTextNode(C[D].text))}if(C[D].foreground){Echo.Sync.Color.render(C[D].foreground,A,"color")}if(C[D].background){Echo.Sync.Color.render(C[D].background,A,"backgroundColor")}if(C[D].font){Echo.Sync.Font.render(C[D].font,A)}this._element.appendChild(A)}}if(this._enabled){Core.Web.Event.add(this._element,"change",Core.method(this,this._processChange),false)}B.appendChild(this._element)},_renderMainAsDiv:function(D,H,I){this._element=document.createElement("table");this._element.id=this.component.renderId;var A=document.createElement("tbody");this._element.appendChild(A);var F=document.createElement("tr");A.appendChild(F);var B=document.createElement("td");F.appendChild(B);this._div=document.createElement("div");B.appendChild(this._div);this._div.style.cssText="cursor:default;overflow:auto;";this._div.style.height="6em";Echo.Sync.Border.render(Echo.Sync.getEffectProperty(this.component,"border","disabledBorder",!this._enabled,Echo.Sync.ListComponent.DEFAULT_DIV_BORDER,Echo.Sync.ListComponent.DEFAULT_DIV_BORDER),this._div);Echo.Sync.Color.render(Echo.Sync.getEffectProperty(this.component,"foreground","disabledForeground",!this._enabled),this._div,"color");Echo.Sync.Color.render(Echo.Sync.getEffectProperty(this.component,"background","disabledBackground",!this._enabled),this._div,"backgroundColor");Echo.Sync.Font.render(Echo.Sync.getEffectProperty(this.component,"font","disabledFont",!this._enabled),this._div);Echo.Sync.Insets.render(this.component.render("insets"),this._div,"padding");var G=this.component.get("items");if(G){for(var E=0;E<G.length;++E){var C=document.createElement("div");if(G[E].text){C.appendChild(document.createTextNode(G[E].text))}else{C.appendChild(document.createTextNode(G[E].toString()))}if(G[E].foreground){Echo.Sync.Color.render(G[E].foreground,C,"color")}if(G[E].background){Echo.Sync.Color.render(G[E].background,C,"backgroundColor")}if(G[E].font){Echo.Sync.Font.render(G[E].font,C)}this._div.appendChild(C)}}if(this._enabled){Core.Web.Event.add(this._div,"click",Core.method(this,this._processClick),false);Core.Web.Event.add(this._div,"selectstart",Core.method(this,this._processSelectStart),false)}H.appendChild(this._element)},_renderMain:function(C,A,B){this._multipleSelect=this.component.get("selectionMode")==Echo.ListBox.MULTIPLE_SELECTION;if(this.component instanceof Echo.ListBox&&Core.Web.Env.QUIRK_IE_SELECT_LIST_DOM_UPDATE){this._alternateRender=true}this._enabled=this.component.isRenderEnabled();if(this._alternateRender){this._renderMainAsDiv(C,A,B)}else{this._renderMainAsSelect(C,A,B)}},renderDisplay:function(){this._renderSelection()},renderDispose:function(A){Core.Web.Event.removeAll(this._element);this._element=null;if(this._div){Core.Web.Event.removeAll(this._div);this._div=null}},_getSelection:function(){var D=this._selectedIdPriority?null:this.component.get("selection");if(D==null){var B=this.component.get("selectedId");if(B){var A=this.component.get("items");for(var C=0;C<A.length;++C){if(A[C].id==B){D=C}}}if(D==null){D=this._multipleSelect?[]:0}}return D},_renderSelection:function(){var C=this._getSelection();if(this._alternateRender){if(this._hasRenderedSelectedItems){var A=this.component.get("items");for(var B=0;B<A.length;++B){Echo.Sync.Color.renderClear(A[B].foreground,this._div.childNodes[B],"color");Echo.Sync.Color.renderClear(A[B].background,this._div.childNodes[B],"backgroundColor")}}if(C instanceof Array){for(var B=0;B<C.length;++B){if(C[B]>=0&&C[B]<this._div.childNodes.length){Echo.Sync.Color.render(Echo.Sync.ListComponent.DEFAULT_SELECTED_FOREGROUND,this._div.childNodes[C[B]],"color");Echo.Sync.Color.render(Echo.Sync.ListComponent.DEFAULT_SELECTED_BACKGROUND,this._div.childNodes[C[B]],"backgroundColor")}}}else{if(C>=0&&C<this._div.childNodes.length){Echo.Sync.Color.render(Echo.Sync.ListComponent.DEFAULT_SELECTED_FOREGROUND,this._div.childNodes[C],"color");Echo.Sync.Color.render(Echo.Sync.ListComponent.DEFAULT_SELECTED_BACKGROUND,this._div.childNodes[C],"backgroundColor")}}}else{if(this._hasRenderedSelectedItems){this._element.selectedIndex=-1}if(C instanceof Array){for(var B=0;B<C.length;++B){if(C[B]>=0&&C[B]<this._element.options.length){this._element.options[C[B]].selected=true}}}else{if(C>=0&&C<this._element.options.length){this._element.options[C].selected=true}}}this._hasRenderedSelectedItems=true},renderUpdate:function(C){if(C.getUpdatedProperty("selectedId")&&!C.getUpdatedProperty("selection")){this._selectedIdPriority=true}var A=this._element;var B=A.parentNode;this.renderDispose(C);B.removeChild(A);this.renderAdd(C,B);return false},_setSelection:function(E){this._selectedIdPriority=false;var C=null;if(E instanceof Array&&E.length==1){E=E[0]}var B=this.component.get("items");if(E instanceof Array){C=[];for(var D=0;D<E.length;++D){var A=E[D];if(A<B.length){if(B[A].id!=null){C.push(B[A].id)}}}}else{if(E<B.length){if(B[E].id!=null){C=B[E].id}}}this.component.set("selection",E);this.component.set("selectedId",C)}});Echo.Sync.ListBox=Core.extend(Echo.Sync.ListComponent,{$load:function(){Echo.Render.registerPeer("ListBox",this)},renderAdd:function(B,A){this._renderMain(B,A,6)}});Echo.Sync.SelectField=Core.extend(Echo.Sync.ListComponent,{$load:function(){Echo.Render.registerPeer("SelectField",this)},renderAdd:function(B,A){this._renderMain(B,A,0)}});Echo.Sync.SplitPane=Core.extend(Echo.Render.ComponentSync,{$static:{ChildPane:Core.extend({minimumSize:0,maximumSize:null,component:null,layoutData:null,scrollLeft:0,scrolltop:0,$construct:function(B,A){this.component=A;this.layoutData=A.render("layoutData");if(this.layoutData){if(this.layoutData.minimumSize){this.minimumSize=Echo.Sync.Extent.toPixels(this.layoutData.minimumSize,!B._orientationVertical)}if(this.layoutData.maximumSize){this.maximumSize=Echo.Sync.Extent.toPixels(this.layoutData.maximumSize,!B._orientationVertical)}}},loadScrollPositions:function(A){A.scrollLeft=this.scrollLeft;A.scrollTop=this.scrollTop},storeScrollPositions:function(A){this.scrollLeft=A.scrollLeft;this.scrollTop=A.scrollTop}})},$load:function(){Echo.Render.registerPeer("SplitPane",this)},_childPanes:null,_paneDivs:null,_separatorDiv:null,_requested:null,_rendered:null,_processSeparatorMouseMoveRef:null,_processSeparatorMouseUpRef:null,$construct:function(){this._childPanes=new Array(2);this._paneDivs=new Array(2);this._processSeparatorMouseMoveRef=Core.method(this,this._processSeparatorMouseMove);this._processSeparatorMouseUpRef=Core.method(this,this._processSeparatorMouseUp)},loadRenderData:function(){var A=this.component.render("orientation",Echo.SplitPane.ORIENTATION_HORIZONTAL_LEADING_TRAILING);var B=false;switch(A){case Echo.SplitPane.ORIENTATION_HORIZONTAL_LEADING_TRAILING:this._orientationTopLeft=!B;this._orientationVertical=false;break;case Echo.SplitPane.ORIENTATION_HORIZONTAL_TRAILING_LEADING:this._orientationTopLeft=B;this._orientationVertical=false;break;case Echo.SplitPane.ORIENTATION_HORIZONTAL_LEFT_RIGHT:this._orientationTopLeft=true;this._orientationVertical=false;break;case Echo.SplitPane.ORIENTATION_HORIZONTAL_RIGHT_LEFT:this._orientationTopLeft=false;this._orientationVertical=false;break;case Echo.SplitPane.ORIENTATION_VERTICAL_TOP_BOTTOM:this._orientationTopLeft=true;this._orientationVertical=true;break;case Echo.SplitPane.ORIENTATION_VERTICAL_BOTTOM_TOP:this._orientationTopLeft=false;this._orientationVertical=true;break;default:throw new Error("Invalid orientation: "+A)}this._resizable=this.component.render("resizable");this._requested=this.component.render("separatorPosition",Echo.SplitPane.DEFAULT_SEPARATOR_POSITION);this._separatorSize=Echo.Sync.Extent.toPixels(this.component.render(this._orientationVertical?"separatorHeight":"separatorWidth",this._resizable?Echo.SplitPane.DEFAULT_SEPARATOR_SIZE_RESIZABLE:Echo.SplitPane.DEFAULT_SEPARATOR_SIZE_FIXED),this._orientationVertical)},_processKeyPress:function(E){switch(E.keyCode){case 37:case 39:if(!this._orientationVertical){var A=(E.keyCode==37)^(!this._orientationTopLeft);var C=this.component.application.getFocusedComponent();if(C&&C.peer&&C.peer.getFocusFlags){var D=C.peer.getFocusFlags();if((A&&D&Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_LEFT)||(!A&&D&Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_RIGHT)){var B=this.component.application.focusManager.findInParent(this.component,A);if(B){this.component.application.setFocusedComponent(B);Core.Web.DOM.preventEventDefault(E);return false}}}}break;case 38:case 40:if(this._orientationVertical){var A=(E.keyCode==38)^(!this._orientationTopLeft);var C=this.component.application.getFocusedComponent();if(C&&C.peer&&C.peer.getFocusFlags){var D=C.peer.getFocusFlags();if((A&&D&Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_UP)||(!A&&D&Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_DOWN)){var B=this.component.application.focusManager.findInParent(this.component,A);if(B){this.component.application.setFocusedComponent(B);Core.Web.DOM.preventEventDefault(E);return false}}}}break}return true},_processSeparatorMouseDown:function(A){if(!this.client.verifyInput(this.component)){return }Core.Web.DOM.preventEventDefault(A);Core.Web.dragInProgress=true;this._dragInitPosition=this._rendered;if(this._orientationVertical){this._dragInitMouseOffset=A.clientY}else{this._dragInitMouseOffset=A.clientX}Core.Web.Event.add(document.body,"mousemove",this._processSeparatorMouseMoveRef,true);Core.Web.Event.add(document.body,"mouseup",this._processSeparatorMouseUpRef,true)},_processSeparatorMouseMove:function(A){var B=this._orientationVertical?A.clientY:A.clientX;this._setSeparatorPosition(this._orientationTopLeft?this._dragInitPosition+B-this._dragInitMouseOffset:this._dragInitPosition-B+this._dragInitMouseOffset)},_processSeparatorMouseUp:function(A){Core.Web.DOM.preventEventDefault(A);Core.Web.dragInProgress=false;this._removeSeparatorListeners();this.component.set("separatorPosition",this._rendered);this._requested=this._rendered;if(this._paneDivs[0]){Core.Web.VirtualPosition.redraw(this._paneDivs[0])}if(this._paneDivs[1]){Core.Web.VirtualPosition.redraw(this._paneDivs[1])}Echo.Render.notifyResize(this.component)},_getInsetsSizeAdjustment:function(C){if(!C||C.insets==null||B==0){return 0}var B=Echo.Sync.Insets.toPixels(C.insets);var A;if(this._orientationVertical){A=B.top+B.bottom}else{A=B.left+B.right}if(A>this._rendered){A=this._rendered}return A},_hasRelocatedChildren:function(F){var C=this._childPanes[0]?this._childPanes[0].component:null;var B=this._childPanes[1]?this._childPanes[1].component:null;var A=this.component.getComponentCount();var E=A>0?this.component.getComponent(0):null;var D=A>1?this.component.getComponent(1):null;return(C!=null&&C==D)||(B!=null&&B==E)},_redraw:function(){var D=0;if(this.component.getComponentCount()>0){var C=this.component.getComponent(0).render("layoutData");D=this._getInsetsSizeAdjustment(C)}var A=this._orientationVertical?"height":"width";var B=this._orientationVertical?(this._orientationTopLeft?"top":"bottom"):(this._orientationTopLeft?"left":"right");this._redrawItem(this._paneDivs[0],A,(this._rendered-D)+"px");this._redrawItem(this._paneDivs[1],B,(this._rendered+this._separatorSize)+"px");this._redrawItem(this._separatorDiv,B,this._rendered+"px")},_redrawItem:function(A,C,B){if(A){A.style[C]=B}},_removeSeparatorListeners:function(){Core.Web.Event.remove(document.body,"mousemove",this._processSeparatorMouseMoveRef,true);Core.Web.Event.remove(document.body,"mouseup",this._processSeparatorMouseUpRef,true)},renderAdd:function(H,A){this.loadRenderData();var B=this.component.getComponentCount();if(B>2){throw new Error("Cannot render SplitPane with more than two child components.")}var F=B<1?null:this.component.getComponent(0);var D=B<2?null:this.component.getComponent(1);this._splitPaneDiv=document.createElement("div");this._splitPaneDiv.id=this.component.renderId;this._splitPaneDiv.style.cssText="position:absolute;overflow:hidden;top:0;left:0;right:0;bottom:0;";Echo.Sync.Color.renderFB(this.component,this._splitPaneDiv);Echo.Sync.Font.render(this.component.render("font"),this._splitPaneDiv);if(this._separatorSize>0){this._separatorDiv=document.createElement("div");this._separatorDiv.style.cssText="position:absolute;font-size:1px;line-height:0;z-index:2;";Echo.Sync.Color.render(this.component.render("separatorColor",Echo.SplitPane.DEFAULT_SEPARATOR_COLOR),this._separatorDiv,"backgroundColor");var E=null;if(this._orientationVertical){E=this._orientationTopLeft?"s-resize":"n-resize";this._separatorDiv.style.width="100%";this._separatorDiv.style.height=this._separatorSize+"px";Echo.Sync.FillImage.render(this.component.render("separatorVerticalImage"),this._separatorDiv,0)}else{E=this._orientationTopLeft?"e-resize":"w-resize";this._separatorDiv.style.height="100%";this._separatorDiv.style.width=this._separatorSize+"px";Echo.Sync.FillImage.render(this.component.render("separatorHorizontalImage"),this._separatorDiv,0)}if(this._resizable&&E){this._separatorDiv.style.cursor=E}this._splitPaneDiv.appendChild(this._separatorDiv)}else{this._separatorDiv=null}for(var C=0;C<B&&C<2;++C){var G=this.component.getComponent(C);this._renderAddChild(H,G,C)}A.appendChild(this._splitPaneDiv);Core.Web.Event.add(this._splitPaneDiv,Core.Web.Env.QUIRK_IE_KEY_DOWN_EVENT_REPEAT?"keydown":"keypress",Core.method(this,this._processKeyPress),false);if(this._resizable){Core.Web.Event.add(this._separatorDiv,"mousedown",Core.method(this,this._processSeparatorMouseDown),false)}},_renderAddChild:function(H,G,C){var F=this.component.indexOf(G);var B=document.createElement("div");this._paneDivs[C]=B;B.style.cssText="position: absolute; overflow: auto; z-index: 1;";var D=G.render("layoutData");if(D){Echo.Sync.Alignment.render(D.alignment,B,false,this.component);Echo.Sync.Color.render(D.background,B,"backgroundColor");Echo.Sync.FillImage.render(D.backgroundImage,B);if(!G.pane){Echo.Sync.Insets.render(D.insets,B,"padding")}switch(D.overflow){case Echo.SplitPane.OVERFLOW_HIDDEN:B.style.overflow="hidden";break;case Echo.SplitPane.OVERFLOW_SCROLL:B.style.overflow="scroll";break}}var E=this._getInsetsSizeAdjustment(D);var A=(C==0&&this._orientationTopLeft)||(C!=0&&!this._orientationTopLeft);if(this._orientationVertical){B.style.left="0";B.style.right="0";if(this._orientationTopLeft){if(C==0){B.style.top="0";B.style.height=(this._rendered-E)+"px"}else{B.style.top=(this._rendered+this._separatorSize)+"px";B.style.bottom="0"}}else{if(C==0){B.style.bottom="0";B.style.height=(this._rendered-E)+"px"}else{B.style.top="0";B.style.bottom=(this._rendered+this._separatorSize)+"px"}}}else{B.style.top="0";B.style.bottom="0";if(this._orientationTopLeft){if(C==0){B.style.left="0";B.style.width=(this._rendered-E)+"px"}else{B.style.left=(this._rendered+this._separatorSize)+"px";B.style.right="0"}}else{if(C==0){B.style.width=(this._rendered-E)+"px";B.style.right="0"}else{B.style.left="0";B.style.right=(this._rendered+this._separatorSize)+"px"}}}Echo.Render.renderComponentAdd(H,G,B);this._splitPaneDiv.appendChild(B);if(this._childPanes[C]&&this._childPanes[C].component==G){this._childPanes[C].loadScrollPositions(B)}else{this._childPanes[C]=new Echo.Sync.SplitPane.ChildPane(this,G)}},renderDisplay:function(){Core.Web.VirtualPosition.redraw(this._splitPaneDiv);this._setSeparatorPosition(this._requested);if(this._paneDivs[0]){Core.Web.VirtualPosition.redraw(this._paneDivs[0])}if(this._paneDivs[1]){Core.Web.VirtualPosition.redraw(this._paneDivs[1])}},renderDispose:function(B){for(var A=0;A<2;++A){if(this._paneDivs[A]){if(this._childPanes[A]){this._childPanes[A].storeScrollPositions(this._paneDivs[A])}this._paneDivs[A]=null}}if(this._separatorDiv){Core.Web.Event.removeAll(this._separatorDiv);this._separatorDiv=null}Core.Web.Event.removeAll(this._splitPaneDiv);this._splitPaneDiv=null},_renderRemoveChild:function(C,B){var A;if(this._childPanes[0]&&this._childPanes[0].component==B){A=0}else{if(this._childPanes[1]&&this._childPanes[1].component==B){A=1}else{throw new Error("Specified component is not a child of the SplitPane.")}}this._childPanes[A]=null;Core.Web.DOM.removeNode(this._paneDivs[A]);this._paneDivs[A]=null},renderUpdate:function(G){var D=false;if(this._hasRelocatedChildren()){D=true}else{if(G.hasUpdatedProperties()||G.hasUpdatedLayoutDataChildren()){if(G.isUpdatedPropertySetIn({separatorPosition:true})){this._requested=Echo.Sync.Extent.toPixels(this.component.render("separatorPosition",Echo.SplitPane.DEFAULT_SEPARATOR_POSITION),this._orientationVertical);this._setSeparatorPosition(this._requested)}else{D=true}}}if(!D&&(G.hasAddedChildren()||G.hasRemovedChildren())){var A=G.getRemovedChildren();if(A){for(var C=0;C<A.length;++C){this._renderRemoveChild(G,A[C])}}var E=G.getAddedChildren();if(E){for(var C=0;C<E.length;++C){this._renderAddChild(G,E[C],this.component.indexOf(E[C]))}}}if(D){var B=this._splitPaneDiv;var F=B.parentNode;Echo.Render.renderComponentDispose(G,G.parent);F.removeChild(B);this.renderAdd(G,F)}return D},_setSeparatorPosition:function(C){var B=this._rendered;if(Echo.Sync.Extent.isPercent(C)){var A=this._orientationVertical?this._splitPaneDiv.offsetHeight:this._splitPaneDiv.offsetWidth;C=parseInt((parseInt(C)/100)*A)}else{C=Echo.Sync.Extent.toPixels(C,!this._orientationVertical)}if(this._childPanes[1]){var A=this._orientationVertical?this._splitPaneDiv.offsetHeight:this._splitPaneDiv.offsetWidth;if(C>A-this._childPanes[1].minimumSize-this._separatorSize){C=A-this._childPanes[1].minimumSize-this._separatorSize}else{if(this._childPanes[1].maximumSize!=null&&C<A-this._childPanes[1].maximumSize-this._separatorSize){C=A-this._childPanes[1].maximumSize-this._separatorSize}}}if(this._childPanes[0]){if(C<this._childPanes[0].minimumSize){C=this._childPanes[0].minimumSize}else{if(this._childPanes[0].maximumSize!=null&&C>this._childPanes[0].maximumSize){C=this._childPanes[0].maximumSize}}}this._rendered=C;this._redraw()}});Extras={uniqueId:0};Extras.Serial={PROPERTY_TYPE_PREFIX:"Extras.Serial."};Extras.Sync={configureStyle:function(A,B,C){if(B){A.setStyleName(B)}else{A.setStyle(C)}},DEFAULT_CONTROL_PANE_SPLIT_PANE_STYLE:{orientation:Echo.SplitPane.ORIENTATION_VERTICAL_BOTTOM_TOP,separatorColor:"#dfdfef",separatorHeight:1,separatorPosition:30},DEFAULT_CONTROL_PANE_ROW_STYLE:{insets:"2px 10px",cellSpacing:3,layoutData:{overflow:Echo.SplitPane.OVERFLOW_HIDDEN,background:"#cfcfdf"}},DEFAULT_CONTROL_PANE_BUTTON_STYLE:{insets:"0px 8px",lineWrap:false,foreground:"#000000",rolloverEnabled:true,rolloverForeground:"#6f0f0f"}};Extras.Sync.FadeRunnable=Core.extend(Core.Web.Scheduler.Runnable,{timeInterval:10,repeat:true,_runTime:null,_element:null,_fadeIn:null,_fullOpacity:null,_startTime:null,$construct:function(D,A,B,C){this._element=D;this._fullOpacity=B;this._fadeIn=A;this._runTime=C;this._startTime=new Date().getTime()},run:function(){var B=new Date().getTime();if(B<this._startTime+this._runTime){var A=((B-this._startTime)/this._runTime)*this._fullOpacity;this._element.style.opacity=this._fadeIn?A:this._fullOpacity-A}else{if(this._fadeIn){this._element.style.opacity=this._fullOpacity}else{if(this._element.parentNode){this._element.parentNode.removeChild(this._element)}}Core.Web.Scheduler.remove(this)}}});Extras.TransitionPane=Core.extend(Echo.Component,{$static:{DEFAULT_DURATION:350,DEFAULT_TYPE:0,TYPE_IMMEDIATE_REPLACE:0,TYPE_CAMERA_PAN_LEFT:1,TYPE_CAMERA_PAN_RIGHT:2,TYPE_CAMERA_PAN_UP:3,TYPE_CAMERA_PAN_DOWN:4,TYPE_FADE:9},$load:function(){Echo.ComponentFactory.registerType("Extras.TransitionPane",this)},componentType:"Extras.TransitionPane",pane:true});Extras.Sync.TransitionPane=Core.extend(Echo.Render.ComponentSync,{$load:function(){Echo.Render.registerPeer("Extras.TransitionPane",this)},element:null,type:null,_duration:null,_transition:null,_transitionClass:null,_runnable:null,oldChildDivElement:null,childDivElement:null,_initialContentLoaded:false,$construct:function(){},doImmediateTransition:function(){this._removeOldContent();if(this.childDivElement){this._showContent()}},_loadTransition:function(){this.type=this.component.render("type");switch(this.type){case Extras.TransitionPane.TYPE_FADE:this._transitionClass=Extras.Sync.TransitionPane.FadeOpacityTransition;break;case Extras.TransitionPane.TYPE_CAMERA_PAN_DOWN:case Extras.TransitionPane.TYPE_CAMERA_PAN_LEFT:case Extras.TransitionPane.TYPE_CAMERA_PAN_RIGHT:case Extras.TransitionPane.TYPE_CAMERA_PAN_UP:this._transitionClass=Extras.Sync.TransitionPane.CameraPanTransition;break;default:this._transitionClass=null;this._duration=null}},_removeOldContent:function(){if(this.oldChildDivElement){this.element.removeChild(this.oldChildDivElement);this.oldChildDivElement=null}},_hideContent:function(){if(this.childDivElement){this.childDivElement.style.visibility="hidden"}},_showContent:function(){if(this.childDivElement){this.childDivElement.style.visibility="visible"}},renderAdd:function(B,A){this.element=document.createElement("div");this.element.style.cssText="position:absolute;overflow:hidden;top:0;left:0;width:100%;height:100%;";A.appendChild(this.element);if(this.component.children.length>0){this._renderAddChild(B)}},_renderAddChild:function(A){this._loadTransition();this.childDivElement=document.createElement("div");this.childDivElement.style.cssText="position:absolute;top:0;left:0;width:100%;height:100%;";Echo.Render.renderComponentAdd(A,this.component.children[0],this.childDivElement);if(this._initialContentLoaded){this._hideContent();if(this._transitionClass){this._transitionStart()}else{this.doImmediateTransition()}}else{this._initialContentLoaded=true}this.element.appendChild(this.childDivElement)},renderDisplay:function(){},i:0,renderDispose:function(A){this._initialContentLoaded=false;this._transitionFinish();this._childDivElement=null;this.element=null},renderUpdate:function(G){var D=false;if(G.hasUpdatedLayoutDataChildren()){D=true}else{if(G.hasUpdatedProperties()){var B=G.getUpdatedPropertyNames();if(!(B.length==1&&B[0]=="type")){D=true}}}if(D){var C=this.element;var F=C.parentNode;Echo.Render.renderComponentDispose(G,G.parent);F.removeChild(C);this.renderAdd(G,F)}else{this._transitionFinish();var A=G.getRemovedChildren();if(A){this.oldChildDivElement=this.childDivElement;this.childDivElement=null}var E=G.getAddedChildren();if(G.parent.children>1){throw new Error("Cannot render more than one child in a TransitionPane.")}if(E){this._renderAddChild(G)}}return D},_transitionStart:function(){this._transition=new this._transitionClass(this);this._duration=this.component.render("duration",this._transition.duration);this._runnable=new Extras.Sync.TransitionPane.Runnable(this);Core.Web.Scheduler.add(this._runnable)},_transitionFinish:function(){if(this._runnable){Core.Web.Scheduler.remove(this._runnable);this._runnable=null}if(this._transition){this._transition.finish();this._showContent();this._transition=null}this._removeOldContent()}});Extras.Sync.TransitionPane.Runnable=Core.extend(Core.Web.Scheduler.Runnable,{transitionPane:null,timeInterval:null,_startTime:null,_endTime:null,repeat:true,_initialized:false,$construct:function(A){this.transitionPane=A;this.timeInterval=A._transition.stepInterval},run:function(){if(!this.initialized){this._startTime=new Date().getTime();this._endTime=this._startTime+this.transitionPane._duration;this.transitionPane._transition.start();this.initialized=true}else{var B=new Date().getTime();if(B<this._endTime){var A=(B-this._startTime)/this.transitionPane._duration;this.transitionPane._transition.step(A)}else{this.transitionPane._transitionFinish()}}}});Extras.Sync.TransitionPane.Transition=Core.extend({transitionPane:null,$virtual:{duration:350,stepInterval:10},$abstract:{finish:function(){},start:function(){},step:function(A){}},$construct:function(A){this.transitionPane=A}});Extras.Sync.TransitionPane.CameraPanTransition=Core.extend(Extras.Sync.TransitionPane.Transition,{_newChildOnScreen:false,_travel:null,finish:function(){if(this.transitionPane.childDivElement){this.transitionPane.childDivElement.style.zIndex=0;this.transitionPane.childDivElement.style.top="0px";this.transitionPane.childDivElement.style.left="0px"}},start:function(){var A=new Core.Web.Measure.Bounds(this.transitionPane.element);this._travel=(this.transitionPane.type==Extras.TransitionPane.TYPE_CAMERA_PAN_DOWN||this.transitionPane.type==Extras.TransitionPane.TYPE_CAMERA_PAN_UP)?A.height:A.width;if(this.transitionPane.oldChildDivElement){this.transitionPane.oldChildDivElement.style.zIndex=1}},step:function(A){switch(this.transitionPane.type){case Extras.TransitionPane.TYPE_CAMERA_PAN_DOWN:if(this.transitionPane.childDivElement){this.transitionPane.childDivElement.style.top=((1-A)*this._travel)+"px"}if(this.transitionPane.oldChildDivElement){this.transitionPane.oldChildDivElement.style.top=(0-(A*this._travel))+"px"}break;case Extras.TransitionPane.TYPE_CAMERA_PAN_UP:if(this.transitionPane.childDivElement){this.transitionPane.childDivElement.style.top=(0-((1-A)*this._travel))+"px"}if(this.transitionPane.oldChildDivElement){this.transitionPane.oldChildDivElement.style.top=(A*this._travel)+"px"}break;case Extras.TransitionPane.TYPE_CAMERA_PAN_RIGHT:if(this.transitionPane.childDivElement){this.transitionPane.childDivElement.style.left=((1-A)*this._travel)+"px"}if(this.transitionPane.oldChildDivElement){this.transitionPane.oldChildDivElement.style.left=(0-(A*this._travel))+"px"}break;default:if(this.transitionPane.childDivElement){this.transitionPane.childDivElement.style.left=(0-((1-A)*this._travel))+"px"}if(this.transitionPane.oldChildDivElement){this.transitionPane.oldChildDivElement.style.left=(A*this._travel)+"px"}break}if(!this._newChildOnScreen&&this.transitionPane.childDivElement){this.transitionPane._showContent();this.transitionPane.childDivElement.style.zIndex=2;this._newChildOnScreen=true}}});Extras.Sync.TransitionPane.FadeOpacityTransition=Core.extend(Extras.Sync.TransitionPane.Transition,{duration:1000,finish:function(){if(this.transitionPane.childDivElement){this.transitionPane.childDivElement.style.zIndex=0;if(Core.Web.Env.PROPRIETARY_IE_OPACITY_FILTER_REQUIRED){this.transitionPane.childDivElement.style.filter=""}else{this.transitionPane.childDivElement.style.opacity=1}}},start:function(){if(this.transitionPane.childDivElement){if(Core.Web.Env.PROPRIETARY_IE_OPACITY_FILTER_REQUIRED){this.transitionPane.childDivElement.style.filter="alpha(opacity=0)"}else{this.transitionPane.childDivElement.style.opacity=0}}this.transitionPane._showContent()},step:function(A){if(this.transitionPane.childDivElement){if(Core.Web.Env.PROPRIETARY_IE_OPACITY_FILTER_REQUIRED){var B=parseInt(A*100);this.transitionPane.childDivElement.style.filter="alpha(opacity="+B+")"}else{this.transitionPane.childDivElement.style.opacity=A}}else{if(this.transitionPane.oldChildDivElement){if(Core.Web.Env.PROPRIETARY_IE_OPACITY_FILTER_REQUIRED){var B=parseInt((1-A)*100);this.transitionPane.oldChildDivElement.style.filter="alpha(opacity="+B+")"}else{this.transitionPane.oldChildDivElement.style.opacity=1-A}}}}});
