Core={_copyFunction:function(a){return function(){a.apply(this,arguments)}},_createFunction:function(){return function(){}},extend:function(){var h=arguments.length==1?null:arguments[0];var g=arguments.length==1?arguments[0]:arguments[1];var b,e;if(arguments.length==2){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 a;if(g.$construct){a=g.$construct;delete g.$construct}else{if(h){a=Core._copyFunction(h)}else{a=Core._createFunction()}}a.$virtual={};a.$super=h;if(h){var f=Core._createFunction();f.prototype=h.prototype;a.prototype=new f()}a.prototype.constructor=a;if(g.$abstract){a.$abstract={};if(h&&h.$abstract){for(b in h.$abstract){a.$abstract[b]=h.$abstract[b]}}if(g.$abstract instanceof Object){for(b in g.$abstract){a.$abstract[b]=true;a.$virtual[b]=true}}delete g.$abstract}if(h){for(e in h.$virtual){a.$virtual[e]=h.$virtual[e]}}if(g.$virtual){Core._inherit(a.prototype,g.$virtual,a.$virtual);for(e in g.$virtual){a.$virtual[e]=true}delete g.$virtual}if(g.hasOwnProperty("toString")){a.prototype.toString=g.toString}if(g.hasOwnProperty("valueOf")){a.prototype.valueOf=g.valueOf}delete g.toString;delete g.valueOf;if(g.$include){var c=g.$include.reverse();Core._processMixins(a,c);delete g.$include}var d=null;if(g.$load){d=g.$load;delete g.$load}if(g.$static){Core._inherit(a,g.$static);delete g.$static}Core._inherit(a.prototype,g,a.$virtual);if(!a.$abstract){this._verifyAbstractImpl(a)}if(d){d.call(a)}return a},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]!==undefined&&!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]==null){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()}}},toString:function(){return Core.Debug.toString(this.map)}});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 a,c=true,b=[];for(a=0;a<this._data.length;a+=2){if(this._data[a]==d.type){b.push(this._data[a+1])}}for(a=0;a<b.length;++a){c=b[a](d)&&c}return c},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("-"))}}},_sourceMaps:null,_generatedMaps:null,_defaultMap:null,$construct:function(a){this._sourceMaps={};this._generatedMaps={};this._defaultMap=a},get:function(d){var c=d?this._generatedMaps[d]:this._defaultMap;if(c){return c}c={};var a;var e=this._sourceMaps[d];if(e){for(a in e){c[a]=e[a]}}var b=Core.ResourceBundle.getParentLanguageCode(d);if(b){e=this._sourceMaps[b];if(e){for(a in e){if(c[a]===undefined){c[a]=e[a]}}}}for(a in this._defaultMap){if(c[a]===undefined){c[a]=this._defaultMap[a]}}this._generatedMaps[d]=c;return c},set:function(b,a){this._generatedMaps={};this._sourceMaps[b]=a},toString:function(){var b="ResourceBundle: ";for(var a in this._sourceMaps){b+=" "+a}return b}});Core.Web={dragInProgress:false,init:function(){if(Core.Web.initialized){return}Core.Web.Env._init();Core.Web.Measure._calculateExtentSizes();Core.Web.Measure.Bounds._initMeasureContainer();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,_focusRunnable: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;if(Core.Web.Env.BROWSER_FIREFOX&&Core.Web.Env.BROWSER_VERSION_MAJOR==3&&Core.Web.Env.BROWSER_VERSION_MINOR===0){e=new DOMParser().parseFromString("<?xml version='1.0' encoding='UTF-8'?><"+d+"/>","application/xml")}else{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){if(!this._focusRunnable){this._focusRunnable=new Core.Web.Scheduler.MethodRunnable(this._focusElementImpl)}Core.Web.DOM._focusPendingElement=a;Core.Web.Scheduler.add(this._focusRunnable)}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={ENGINE_PRESTO:null,ENGINE_WEBKIT:null,ENGINE_KHTML:null,ENGINE_MSHTML:null,ENGINE_GECKO:null,BROWSER_MOZILLA:null,BROWSER_OPERA:null,BROWSER_KONQUEROR:null,BROWSER_FIREFOX:null,BROWSER_INTERNET_EXPLORER:null,BROWSER_CHROME:null,BROWSER_VERSION_MAJOR:null,BROWSER_VERSION_MINOR:null,ENGINE_VERSION_MAJOR:null,ENGINE_VERSION_MINOR:null,DECEPTIVE_USER_AGENT:null,CSS_FLOAT:"cssFloat",MEASURE_OFFSET_EXCLUDES_BORDER:null,NOT_SUPPORTED_CSS_OPACITY:null,NOT_SUPPORTED_RELATIVE_COLUMN_WIDTHS:null,PROPRIETARY_EVENT_MOUSE_ENTER_LEAVE_SUPPORTED:null,PROPRIETARY_EVENT_SELECT_START_SUPPORTED:null,PROPRIETARY_IE_OPACITY_FILTER_REQUIRED:null,PROPRIETARY_IE_PNG_ALPHA_FILTER_REQUIRED:null,QUIRK_KEY_CODE_IS_CHAR_CODE:null,QUIRK_KEY_PRESS_FIRED_FOR_SPECIAL_KEYS:null,QUIRK_KEY_DOWN_NOT_FIRED_FOR_SPECIAL_KEYS:null,QUIRK_CSS_BORDER_COLLAPSE_INSIDE:null,QUIRK_CSS_POSITIONING_ONE_SIDE_ONLY:null,QUIRK_DELAYED_FOCUS_REQUIRED:null,QUIRK_IE_BLANK_SCREEN:null,QUIRK_IE_HAS_LAYOUT:null,QUIRK_IE_KEY_DOWN_EVENT_REPEAT:null,QUIRK_IE_SELECT_LIST_DOM_UPDATE:null,QUIRK_IE_SELECT_PERCENT_WIDTH:null,QUIRK_IE_SELECT_Z_INDEX:null,QUIRK_IE_SECURE_ITEMS:null,QUIRK_IE_TABLE_PERCENT_WIDTH_SCROLLBAR_ERROR:null,QUIRK_MEASURE_OFFSET_HIDDEN_BORDER:null,QUIRK_OPERA_CSS_POSITIONING:null,QUIRK_PERFORMANCE_LARGE_DOM_REMOVE:null,QUIRK_WEBKIT_DOM_TEXT_ESCAPE:null,QUIRK_TABLE_CELL_WIDTH_EXCLUDES_PADDING:null,QUIRK_UNLOADED_IMAGE_HAS_SIZE:null,_ua:null,_uaAlpha:null,_init:function(){var b=null,c=null,a=false;this._ua=navigator.userAgent.toLowerCase();this._uaAlpha="/"+this._ua.replace(/[^a-z]+/g,"/")+"/";if(this._testUAString("opera")){this.BROWSER_OPERA=a=this.ENGINE_PRESTO=true;b=this._parseVersionInfo("opera/")}else{if(this._testUAString("chrome")){this.BROWSER_CHROME=a=this.ENGINE_WEBKIT=true;b=this._parseVersionInfo("chrome/")}else{if(this._testUAString("safari")){this.BROWSER_SAFARI=a=this.ENGINE_WEBKIT=true;b=this._parseVersionInfo("version/")}else{if(this._testUAString("konqueror")){this.BROWSER_KONQUEROR=a=this.ENGINE_KHTML=true;b=this._parseVersionInfo("konqueror/")}else{if(this._testUAString("firefox")){this.BROWSER_FIREFOX=this.BROWSER_MOZILLA=a=this.ENGINE_GECKO=true;b=this._parseVersionInfo("firefox/")}else{if(this._testUAString("msie")){this.BROWSER_INTERNET_EXPLORER=a=this.ENGINE_MSHTML=true;c=b=this._parseVersionInfo("msie ")}}}}}}if(!a){if(this._testUAString("presto")){this.ENGINE_PRESTO=true}else{if(this._testUAString("webkit")){this.ENGINE_WEBKIT=true}else{if(this._testUAString("khtml")){this.ENGINE_KHTML=true}else{if(this._testUAString("trident")){this.ENGINE_MSHTML=true}else{if(this._testUAString("gecko")){this.BROWSER_MOZILLA=this.ENGINE_GECKO=true}}}}}}if(!c){if(this.ENGINE_PRESTO){c=this._parseVersionInfo("presto/")}else{if(this.ENGINE_WEBKIT){c=this._parseVersionInfo("webkit/")}else{if(this.ENGINE_GECKO){c=this._parseVersionInfo("rv:");if(!b){b=c}}}}}if(b){this.BROWSER_VERSION_MAJOR=b.major;this.BROWSER_VERSION_MINOR=b.minor}if(c){this.ENGINE_VERSION_MAJOR=c.major;this.ENGINE_VERSION_MINOR=c.minor}this.DECEPTIVE_USER_AGENT=this.BROWSER_OPERA||this.BROWSER_SAFARI||this.BROWSER_CHROME||this.BROWSER_KONQUEROR;this.MEASURE_OFFSET_EXCLUDES_BORDER=false;if(this.BROWSER_INTERNET_EXPLORER){this.CSS_FLOAT="styleFloat";this.QUIRK_KEY_CODE_IS_CHAR_CODE=true;this.QUIRK_IE_SECURE_ITEMS=true;this.PROPRIETARY_EVENT_MOUSE_ENTER_LEAVE_SUPPORTED=true;this.PROPRIETARY_EVENT_SELECT_START_SUPPORTED=true;this.QUIRK_IE_KEY_DOWN_EVENT_REPEAT=true;this.QUIRK_DELAYED_FOCUS_REQUIRED=true;this.QUIRK_UNLOADED_IMAGE_HAS_SIZE=true;this.MEASURE_OFFSET_EXCLUDES_BORDER=true;this.QUIRK_IE_BLANK_SCREEN=true;this.QUIRK_IE_HAS_LAYOUT=true;if(this.BROWSER_VERSION_MAJOR<8){this.QUIRK_TABLE_CELL_WIDTH_EXCLUDES_PADDING=true;this.NOT_SUPPORTED_RELATIVE_COLUMN_WIDTHS=true;this.QUIRK_CSS_BORDER_COLLAPSE_INSIDE=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_VERSION_MAJOR<7){this.QUIRK_IE_SELECT_LIST_DOM_UPDATE=true;this.QUIRK_CSS_POSITIONING_ONE_SIDE_ONLY=true;this.PROPRIETARY_IE_PNG_ALPHA_FILTER_REQUIRED=true;this.QUIRK_IE_SELECT_Z_INDEX=true;Core.Arrays.LargeMap.garbageCollectEnabled=true}}}else{if(this.ENGINE_GECKO){this.QUIRK_KEY_PRESS_FIRED_FOR_SPECIAL_KEYS=true;this.MEASURE_OFFSET_EXCLUDES_BORDER=true;this.QUIRK_MEASURE_OFFSET_HIDDEN_BORDER=true;if(this.BROWSER_FIREFOX){if(this.BROWSER_VERSION_MAJOR<2){this.QUIRK_DELAYED_FOCUS_REQUIRED=true}}else{this.QUIRK_PERFORMANCE_LARGE_DOM_REMOVE=true;this.QUIRK_DELAYED_FOCUS_REQUIRED=true}}else{if(this.ENGINE_PRESTO){this.QUIRK_KEY_CODE_IS_CHAR_CODE=true;this.QUIRK_TABLE_CELL_WIDTH_EXCLUDES_PADDING=true;if(this.BROWSER_VERSION_MAJOR==9&&this.BROWSER_VERSION_MINOR>=50){this.QUIRK_OPERA_CSS_POSITIONING=true}this.NOT_SUPPORTED_RELATIVE_COLUMN_WIDTHS=true}else{if(this.ENGINE_WEBKIT){this.MEASURE_OFFSET_EXCLUDES_BORDER=true;if(this.ENGINE_VERSION_MAJOR<526||(this.ENGINE_VERSION_MAJOR==526&&this.ENGINE_VERSION_MINOR<8)){this.QUIRK_WEBKIT_DOM_TEXT_ESCAPE=true}}}}}},_parseVersionInfo:function(e){var d={};var b=this._ua.indexOf(e);if(b==-1){return}var a=this._ua.indexOf(".",b);var h=this._ua.length;if(a==-1){a=this._ua.length}else{for(var f=a+1;f<this._ua.length;f++){var g=this._ua.charAt(f);if(isNaN(g)){h=f;break}}}d.major=parseInt(this._ua.substring(b+e.length,a),10);if(a==this._ua.length){d.minor=0}else{d.minor=parseInt(this._ua.substring(a+1,h),10)}return d},_testUAString:function(a){return this._uaAlpha.indexOf("/"+a+"/")!=-1}};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,_listenerCount:0,debugListenerCount:false,_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);++Core.Web.Event._listenerCount}f.addListener(b,d)},_processEvent:function(d){if(Core.Web.Event.debugListenerCount){Core.Debug.consoleWrite("Core.Web.Event listener count: "+Core.Web.Event._listenerCount)}d=d?d:window.event;if(!d.target&&d.srcElement){d.target=d.srcElement}var f=[];var b=d.target;while(b){if(b.__eventProcessorId){f.push(b)}b=b.parentNode}var g,c,a=true;for(c=f.length-1;c>=0;--c){g=Core.Web.Event._capturingListenerMap.map[f[c].__eventProcessorId];if(g){d.registeredTarget=f[c];if(!g.fireEvent(d)){a=false;break}}}if(a){for(c=0;c<f.length;++c){g=Core.Web.Event._bubblingListenerMap.map[f[c].__eventProcessorId];if(g){d.registeredTarget=f[c];if(!g.fireEvent(d)){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);--Core.Web.Event._listenerCount}}},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);--Core.Web.Event._listenerCount}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,_requestHeaders:null,$construct:function(a,d,b,c){this._url=a;this._contentType=c;this._method=d;if(Core.Web.Env.QUIRK_WEBKIT_DOM_TEXT_ESCAPE&&b instanceof Document){this._preprocessWebkitDOM(b.documentElement)}this._messageObject=b;this._listenerList=new Core.ListenerList()},_preprocessWebkitDOM:function(a){if(a.nodeType==3){var b=a.data;b=b.replace(/&/g,"&amp;");b=b.replace(/</g,"&lt;");b=b.replace(/>/g,"&gt;");a.data=b}else{var c=a.firstChild;while(c){this._preprocessWebkitDOM(c);c=c.nextSibling}}},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._requestHeaders&&(b||this._xmlHttpRequest.setRequestHeader)){for(var c in this._requestHeaders){try{this._xmlHttpRequest.setRequestHeader(c,this._requestHeaders[c])}catch(d){throw new Error('Failed to set header "'+c+'"')}}}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;this._requestHeaders=null},getResponseHeader:function(a){return this._xmlHttpRequest?this._xmlHttpRequest.getResponseHeader(a):null},getAllResponseHeaders:function(){return this._xmlHttpRequest?this._xmlHttpRequest.getAllResponseHeaders():null},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||(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}}Core.Web.Scheduler.run(Core.method(this,function(){this._listenerList.fireEvent(c);this.dispose()}))}},removeResponseListener:function(a){this._listenerList.removeListener("response",a)},setRequestHeader:function(b,a){if(!this._requestHeaders){this._requestHeaders={}}this._requestHeaders[b]=a}});Core.Web.Image={_Monitor:Core.extend({_processImageLoadRef:null,_queuedRunnable:null,_listener:null,_interval:null,_count:0,$construct:function(c,d,a){this._listener=d;this._interval=a||250;this._processImageLoadRef=Core.method(this,this._processImageLoad);var e=c.getElementsByTagName("img");this._count=e.length;for(var b=0;b<this._count;++b){if(!e[b].complete&&(Core.Web.Env.QUIRK_UNLOADED_IMAGE_HAS_SIZE||(!e[b].height&&!e[b].style.height))){Core.Web.DOM.addEventListener(e[b],"load",this._processImageLoadRef,false)}}},_processImageLoad:function(a){a=a?a:window.event;Core.Web.DOM.removeEventListener(Core.Web.DOM.getEventTarget(a),"load",this._processImageLoadRef,false);--this._count;if(this._queuedRunnable&&this._count===0){Core.Web.Scheduler.remove(this._queuedRunnable);this._queuedRunnable=null}if(!this._queuedRunnable){this._queuedRunnable=Core.Web.Scheduler.run(Core.method(this,function(){this._queuedRunnable=null;this._listener()}),this._count===0?0:this._interval)}}}),monitor:function(d,b,c){var a=new Core.Web.Image._Monitor(d,b,c)}};Core.Web.Key={_KEY_TABLES:{GECKO:{59:186,61:187,109:189},MAC_GECKO:{},PRESTO:{59:186,61:187,44:188,45:189,46:190,47:191,96:192,91:219,92:220,93:221,39:222},WEBKIT:{}},_keyTable:null,_loadKeyTable:function(){if(Core.Web.Env.ENGINE_GECKO){this._keyTable=this._KEY_TABLES.GECKO}else{if(Core.Web.Env.ENGINE_PRESTO){this._keyTable=this._KEY_TABLES.PRESTO}else{this._keyTable={}}}},translateKeyCode:function(a){if(!this._keyTable){this._loadKeyTable()}return this._keyTable[a]||a}};Core.Web.Library={_loadedLibraries:{},evalLine:null,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)},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){var c={type:"load",source:this,success:false,ex:a,url:this._libraries[b]._url,cancel:false};try{this._listenerList.fireEvent(c)}finally{if(!c.cancel){throw new Error('Exception installing library "'+this._libraries[b]._url+'"; '+a)}}}}this._listenerList.fireEvent({type:"load",source:this,success:true})},_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 retrieving library "'+this._url+'", received status: '+a.source.getStatus())}this._content=a.source.getResponseText();this._group._notifyRetrieved()},_install:function(){if(Core.Web.Library._loadedLibraries[this._url]){return}Core.Web.Library._loadedLibraries[this._url]=true;if(this._content==null){throw new Error("Attempt to install library when no content has been loaded.")}Core.Web.Library.evalLine=new Error().lineNumber+1;eval(this._content)},_retrieve:function(){var a=new Core.Web.HttpConnection(this._url,"GET");a.addResponseListener(Core.method(this,this._retrieveListener));a.connect()}}),exec:function(b,c){var d=null;for(var a=0;a<b.length;++a){if(!Core.Web.Library._loadedLibraries[b[a]]){if(d==null){d=new Core.Web.Library.Group()}d.add(b[a])}}if(d==null){Core.Web.Scheduler.run(c);return}d.addLoadListener(c);d.load()}};Core.Web.Measure={_scrollElements:["div","body"],_hInch:96,_vInch:96,_hEx:7,_vEx:7,_hEm:13.3333,_vEm:13.3333,SCROLL_WIDTH:17,SCROLL_HEIGHT:17,_PARSER:/^(-?\d+(?:\.\d+)?)(.+)?$/,extentToPixels:function(d,a){var f=this._PARSER.exec(d);if(!f){throw new Error("Invalid Extent: "+d)}var e=parseFloat(f[1]);var b=f[2]?f[2]:"px";if(!b||b=="px"){return e}var c=a?Core.Web.Measure._hInch:Core.Web.Measure._vInch;switch(b){case"%":return null;case"in":return e*(a?Core.Web.Measure._hInch:Core.Web.Measure._vInch);case"cm":return e*(a?Core.Web.Measure._hInch:Core.Web.Measure._vInch)/2.54;case"mm":return e*(a?Core.Web.Measure._hInch:Core.Web.Measure._vInch)/25.4;case"pt":return e*(a?Core.Web.Measure._hInch:Core.Web.Measure._vInch)/72;case"pc":return e*(a?Core.Web.Measure._hInch:Core.Web.Measure._vInch)/6;case"em":return e*(a?Core.Web.Measure._hEm:Core.Web.Measure._vEm);case"ex":return e*(a?Core.Web.Measure._hEx:Core.Web.Measure._vEx)}},_calculateExtentSizes:function(){var h=document.getElementsByTagName("body")[0];var f=document.createElement("div");f.style.width="4in";f.style.height="4in";h.appendChild(f);Core.Web.Measure._hInch=f.offsetWidth/4;Core.Web.Measure._vInch=f.offsetHeight/4;h.removeChild(f);var b=document.createElement("div");b.style.width="24em";b.style.height="24em";h.appendChild(b);Core.Web.Measure._hEm=b.offsetWidth/24;Core.Web.Measure._vEm=b.offsetHeight/24;h.removeChild(b);var a=document.createElement("div");a.style.width="24ex";a.style.height="24ex";h.appendChild(a);Core.Web.Measure._hEx=a.offsetWidth/24;Core.Web.Measure._vEx=a.offsetHeight/24;h.removeChild(a);var g=document.createElement("div");g.style.cssText="width:500px;height:100px;overflow:auto;";var d=document.createElement("div");d.style.cssText="width:100px;height:200px;";g.appendChild(d);var e=document.createElement("div");e.style.cssText="width:100%;height:10px;";g.appendChild(e);h.appendChild(g);var c=500-e.offsetWidth;if(c){Core.Web.Measure.SCROLL_WIDTH=Core.Web.Measure.SCROLL_HEIGHT=c}h.removeChild(g)},_getScrollOffset:function(b){var a=0,c=0;do{if(b.scrollLeft||b.scrollTop){a+=b.scrollTop||0;c+=b.scrollLeft||0}b=b.offsetParent}while(b);return{left:c,top:a}},_getCumulativeOffset:function(b){var a=0,d=0,e=true;do{a+=b.offsetTop||0;d+=b.offsetLeft||0;if(!e&&Core.Web.Env.MEASURE_OFFSET_EXCLUDES_BORDER){if(b.style.borderLeftWidth&&b.style.borderLeftStyle!="none"){var c=Core.Web.Measure.extentToPixels(b.style.borderLeftWidth,true);d+=c;if(Core.Web.Env.QUIRK_MEASURE_OFFSET_HIDDEN_BORDER&&b.style.overflow=="hidden"){d+=c}}if(b.style.borderTopWidth&&b.style.borderTopStyle!="none"){var f=Core.Web.Measure.extentToPixels(b.style.borderTopWidth,false);a+=f;if(Core.Web.Env.QUIRK_MEASURE_OFFSET_HIDDEN_BORDER&&b.style.overflow=="hidden"){a+=f}}}e=false;b=b.offsetParent}while(b);return{left:d,top:a}},Bounds:Core.extend({$static:{FLAG_MEASURE_DIMENSION:1,FLAG_MEASURE_POSITION:2,_initMeasureContainer:function(){this._offscreenDiv=document.createElement("div");this._offscreenDiv.style.cssText="position: absolute; top: -1300px; left: -1700px; width: 1600px; height: 1200px;";document.body.appendChild(this._offscreenDiv)}},width:null,height:null,top:null,left:null,$construct:function(g,e){var b=(e&&e.flags)||(Core.Web.Measure.Bounds.FLAG_MEASURE_DIMENSION|Core.Web.Measure.Bounds.FLAG_MEASURE_POSITION);if(g===document.body){return{x:0,y:0,height:window.innerHeight||document.documentElement.clientHeight,width:window.innerWidth||document.documentElement.clientWidth}}var a=g;while(a&&a!=document){a=a.parentNode}var c=a==document;var i,f;if(b&Core.Web.Measure.Bounds.FLAG_MEASURE_DIMENSION){if(!c){i=g.parentNode;f=g.nextSibling;if(i){i.removeChild(g)}if(e){if(e.width){Core.Web.Measure.Bounds._offscreenDiv.width=e.width}if(e.height){Core.Web.Measure.Bounds._offscreenDiv.height=e.height}}Core.Web.Measure.Bounds._offscreenDiv.appendChild(g);if(e){Core.Web.Measure.Bounds._offscreenDiv.width="1600px";Core.Web.Measure.Bounds._offscreenDiv.height="1200px"}}this.width=g.offsetWidth;this.height=g.offsetHeight;if(!c){Core.Web.Measure.Bounds._offscreenDiv.removeChild(g);if(i){i.insertBefore(g,f)}}}if(c&&(b&Core.Web.Measure.Bounds.FLAG_MEASURE_POSITION)){var d=Core.Web.Measure._getCumulativeOffset(g);var h=Core.Web.Measure._getScrollOffset(g);this.top=d.top-h.top;this.left=d.left-h.left}},toString:function(){return(this.left!=null?(this.left+","+this.top+" : "):"")+(this.width!=null?("["+this.width+"x"+this.height+"]"):"")}})};Core.Web.Scheduler={_runnables:[],_threadHandle:null,_nextExecution:null,add:function(a){Core.Arrays.remove(Core.Web.Scheduler._runnables,a);a._nextExecution=new Date().getTime()+(a.timeInterval?a.timeInterval:0);Core.Web.Scheduler._runnables.push(a);Core.Web.Scheduler._setTimeout(a._nextExecution)},_execute:function(){Core.Web.Scheduler._threadHandle=null;var d=new Date().getTime();var f=Number.MAX_VALUE;var c,e;for(c=0;c<Core.Web.Scheduler._runnables.length;++c){e=Core.Web.Scheduler._runnables[c];if(e&&e._nextExecution&&e._nextExecution<=d){e._nextExecution=null;try{e.run()}catch(b){throw (b)}}}var g=[];for(c=0;c<Core.Web.Scheduler._runnables.length;++c){e=Core.Web.Scheduler._runnables[c];if(e==null){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){Core.Web.Scheduler._setTimeout(d+f)}},remove:function(b){var a=Core.Arrays.indexOf(Core.Web.Scheduler._runnables,b);Core.Web.Scheduler._runnables[a]=null},run:function(d,a,c){var b=new Core.Web.Scheduler.MethodRunnable(d,a,c);Core.Web.Scheduler.add(b);return b},_setTimeout:function(c){if(Core.Web.Scheduler._threadHandle!=null&&Core.Web.Scheduler._nextExecution<c){return}if(Core.Web.Scheduler._threadHandle!=null){window.clearTimeout(Core.Web.Scheduler._threadHandle)}var a=new Date().getTime();Core.Web.Scheduler._nextExecution=c;var b=c-a>0?c-a:0;Core.Web.Scheduler._threadHandle=window.setTimeout(Core.Web.Scheduler._execute,b)},update:function(c){if(Core.Arrays.indexOf(Core.Web.Scheduler._runnables,c)==-1){return}var b=new Date().getTime();var a=c.timeInterval?c.timeInterval:0;c._nextExecution=b+a;Core.Web.Scheduler._setTimeout(c._nextExecution)}};Core.Web.Scheduler.Runnable=Core.extend({_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,10)}}return c},_init:function(){this.enabled=true},redraw:function(c){if(!this.enabled){return}if(!c||!c.parentNode){return}var f;if(this._verifyPixelValue(c.style.top)&&this._verifyPixelValue(c.style.bottom)){var b=c.parentNode.offsetHeight;if(!isNaN(b)){f=this._calculateOffsets(this._OFFSETS_VERTICAL,c.style);if(f!=-1){var e=b-parseInt(c.style.top,10)-parseInt(c.style.bottom,10)-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)){f=this._calculateOffsets(this._OFFSETS_HORIZONTAL,c.style);if(f!=-1){var a=d-parseInt(c.style.left,10)-parseInt(c.style.right,10)-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===""){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,$virtual:{init:function(){},dispose:function(){},isActive:function(){return true}},client:null,_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)},addListener:function(a,b){this._listenerList.addListener(a,b)},doDispose:function(){this.updateManager.dispose();this.dispose()},doInit:function(){this.init()},_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},fireEvent:function(a){if(this._listenerList==null){return}this._listenerList.fireEvent(a)},focusNext:function(a){var b=this.focusManager.find(null,a);if(b!=null){this.setFocusedComponent(b)}},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},notifyComponentUpdate:function(c,a,b,d,e){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})}if(!e){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)}},removeListener:function(a,b){this._listenerList.removeListener(a,b)},setFocusedComponent:function(c){var a=this._focusedComponent;while(c!=null&&!c.focusable){c=c.parent}if(this._modalComponents.length>0){var b=this.getModalContextRoot();if(!b.isAncestorOf(c)){return}}if(this._focusedComponent==c){return}this._focusedComponent=c;this._listenerList.fireEvent({type:"focus",source:this,oldValue:a,newValue:c})},setLayoutDirection:function(a){this._layoutDirection=a;this.updateManager._processFullRefresh()},setLocale:function(a){this._locale=a;this.updateManager._processFullRefresh()},_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))}}}this.fireEvent({source:this,type:"modal",modal:this._modalComponents.length>0})},setStyleSheet:function(a){this._styleSheet=a;this.updateManager._processFullRefresh()},_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 with ComponentFactory: "+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){return"Component"}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",focusable:false,getFocusComponent:function(a){return this.children[a]},pane:false},_layoutDirection:null,_locale:null,renderId:null,parent:null,application:null,_listenerList:null,_style:null,_styleName:null,_enabled:true,children:null,focusNextId:null,focusPreviousId: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]}}}},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)}if(b._listenerList&&b._listenerList.hasListeners("parent")){b._listenerList.fireEvent({type:"parent",source:b,oldValue:null,newValue:this})}if(this._listenerList&&this._listenerList.hasListeners("children")){this._listenerList.fireEvent({type:"children",source:this,add:b,index:a})}},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.")}var b;if(!a){if(this.children!=null){for(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)}if(this._listenerList!=null&&this._listenerList.hasListeners("dispose")){this._listenerList.fireEvent({type:"dispose",source:this})}}this.application=a;if(a){if(this.renderId==null){this.renderId="CL."+(++Echo.Component._nextRenderId)}this.application._registerComponent(this);if(this._listenerList!=null&&this._listenerList.hasListeners("init")){this._listenerList.fireEvent({type:"init",source:this})}if(this.children!=null){for(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.application&&this.application._styleSheet){var c=this.application._styleSheet.getRenderStyle(this._styleName!=null?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!=null?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("Component.remove(): index out of bounds: "+a+", parent: "+this)}}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)}if(b._listenerList&&b._listenerList.hasListeners("parent")){b._listenerList.fireEvent({type:"parent",source:b,oldValue:this,newValue:null})}if(this._listenerList&&this._listenerList.hasListeners("children")){this._listenerList.fireEvent({type:"children",source:this,remove:b,index:a})}},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,d){var a=this._localStyle[b];if(a===c){return}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,d)}},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,f){var d=this._localStyle[c];var a=null;if(d){a=d[b];if(a===e){return}}else{d=[];this._localStyle[c]=d}d[b]=e;if(this.application){this.application.notifyComponentUpdate(this,c,a,e,f)}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(i,h){if(!i){i=this._application.getFocusedComponent();if(!i){i=this._application.rootComponent}}var g=h?i.focusPreviousId:i.focusNextId;if(g){var j=this._application.getComponentByRenderId(g);if(j&&j.isActive()&&j.focusable){return j}}var b=i;var c={};var a=null;while(true){var d=null,f;if((h&&i==b)||(a&&a.parent==i)){}else{var e=i.getComponentCount();if(e>0){d=i.getComponent(h?e-1:0);if(c[d.renderId]){d=null}}}if(d==null){if(i.parent){if(h){f=i.parent.indexOf(i);if(f>0){d=i.parent.getComponent(f-1)}}else{f=i.parent.indexOf(i);if(f<i.parent.getComponentCount()-1){d=i.parent.getComponent(f+1)}}}}if(d==null){d=i.parent}if(d==null){return null}a=i;i=d;c[i.renderId]=true;if(i!=b&&i.isActive()&&i.focusable){return i}}},findInParent:function(g,d,c){if(!c){c=1}var h={},e=this._application.getFocusedComponent();if(!e){return null}h[e.renderId]=true;var f=this._getDescendantIndex(g,e);if(f==-1){return null}var a=f;var b=e;do{b=this.find(b,d,h);if(b==null||h[b.renderId]){return null}a=this._getDescendantIndex(g,b);h[b.renderId]=true}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 e=this._nameToStyleMap[c];if(e==null){this._renderCache[c][b]=null;return null}var d=e[b];if(d==null){var a=b;while(d==null){a=Echo.ComponentFactory.getSuperType(a);if(a==null){this._renderCache[c][a]=null;return null}d=e[a]}}this._renderCache[c][b]=d;return d},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,_listenerUpdates: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){var a;if(b._removedDescendantIds!=null){if(this._removedDescendantIds==null){this._removedDescendantIds=[]}for(a=0;a<b._removedDescendantIds.length;++a){this._removedDescendantIds.push(b._removedDescendantIds[a])}}if(b._removedChildIds!=null){if(this._removedDescendantIds==null){this._removedDescendantIds=[]}for(a=0;a<b._removedChildIds.length;++a){this._removedDescendantIds.push(b._removedChildIds[a])}}if(this._removedDescendantIds!=null){Core.Arrays.removeDuplicates(this._removedDescendantIds)}},getAddedChildren:function(){if(!this._addedChildIds){return null}var b=[];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=[];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=[];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=[];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]},isListenerTypeUpdated:function(a){return this._listenerUpdates==null?false:this._listenerUpdates[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: "+Core.Debug.toString(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)},_updateListener:function(a){if(this._listenerUpdates==null){this._listenerUpdates={}}this._listenerUpdates[a]=true},_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:false,_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)},_processComponentListenerUpdate:function(a,b){if(this.fullRefreshRequired){return}if(this._isAncestorBeingAdded(a)){return}var c=this._createComponentUpdate(a);c._updateListener(b)},_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)},_processFullRefresh:function(){for(var a=0;a<this.application.rootComponent.children.length;++a){this._processComponentRemove(this.application.rootComponent,this.application.rootComponent.children[a])}this.fullRefreshRequired=true;var b=this._createComponentUpdate(this.application.rootComponent);b.fullRefresh=true;this._fireUpdate()},_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)}else{if(a=="listeners"){this._processComponentListenerUpdate(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,{$abstract:true,$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:"50%",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)},$virtual:{doAction:function(){this.fireEvent({type:"action",source:this,actionCommand:this.get("actionCommand")})},doKeyDown:function(b){var a={type:"keyDown",source:this,keyCode:b};this.fireEvent(a);return !a.veto},doKeyPress:function(c,a){var b={type:"keyPress",source:this,keyCode:c,charCode:a};this.fireEvent(b);return !b.veto}},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:"#36537a",borderInsets:20,contentInsets:3},DEFAULT_BACKGROUND:"#ffffff",DEFAULT_FOREGROUND:"#000000",DEFAULT_CONTROLS_INSETS:4,DEFAULT_CONTROLS_SPACING:4,DEFAULT_HEIGHT:"15em",DEFAULT_MINIMUM_WIDTH:100,DEFAULT_MINIMUM_HEIGHT:100,DEFAULT_TITLE_BACKGROUND:"#becafe",DEFAULT_TITLE_HEIGHT:30,DEFAULT_TITLE_INSETS:"5px 10px",DEFAULT_WIDTH:"30em"},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={_loadedPeerCount:0,_nextPeerId:0,_peers:{},_disposedComponents:null,_componentDepthArraySort:function(d,c){return Echo.Render._getComponentDepth(d.parent)-Echo.Render._getComponentDepth(c.parent)},_doRenderDisplay:function(b,a){var d,c=b;var e=c.parent;while(e){if(e.peer.isChildVisible&&!e.peer.isChildVisible(c)){return}c=e;e=e.parent}if(a){Echo.Render._doRenderDisplayImpl(b)}else{if(b.peer.isChildVisible){for(d=0;d<b.children.length;++d){if(b.peer.isChildVisible(b.children[d])){Echo.Render._doRenderDisplayImpl(b.children[d])}}}else{for(d=0;d<b.children.length;++d){Echo.Render._doRenderDisplayImpl(b.children[d])}}}},_doRenderDisplayImpl:function(a){if(!a.peer){return}if(a.peer.renderDisplay){a.peer.renderDisplay()}a.peer.displayed=true;var b;if(a.peer.isChildVisible){for(b=0;b<a.children.length;++b){if(a.peer.isChildVisible(a.children[b])){Echo.Render._doRenderDisplayImpl(a.children[b])}}}else{for(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},_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)}++this._loadedPeerCount;b.peer=new c();b.peer._peerId=this._nextPeerId++;b.peer.component=b;b.peer.client=a},notifyResize:function(a){Echo.Render._doRenderDisplay(a,false)},_processDispose:function(c){var a,b=c.getRemovedDescendants();if(b){for(a=0;a<b.length;++a){Echo.Render._renderComponentDisposeImpl(c,b[a])}}b=c.getRemovedChildren();if(b){for(a=0;a<b.length;++a){Echo.Render._renderComponentDisposeImpl(c,b[a])}}},processUpdates:function(c){var g=c.application.updateManager;if(!g.hasUpdates()){return}Echo.Render._disposedComponents={};var l=g.getUpdates();l.sort(Echo.Render._componentDepthArraySort);var h,f,e;for(f=0;f<l.length;++f){l[f].renderContext={};h=l[f].parent.peer;if(h==null&&l[f].parent.componentType=="Root"){Echo.Render._loadPeer(c,l[f].parent)}}for(f=l.length-1;f>=0;--f){if(l[f]==null){continue}h=l[f].parent.peer;Echo.Render._processDispose(l[f])}if(Echo.Client.profilingTimer){Echo.Client.profilingTimer.mark("rem")}for(f=0;f<l.length;++f){if(l[f]==null){continue}h=l[f].parent.peer;var m=h.renderUpdate(l[f]);if(m){for(e=f+1;e<l.length;++e){if(l[e]!=null&&l[f].parent.isAncestorOf(l[e].parent)){l[e]=null}}}Echo.Render._setPeerDisposedState(l[f].parent,false)}if(Echo.Client.profilingTimer){Echo.Client.profilingTimer.mark("up")}var d=[];for(f=0;f<l.length;++f){if(l[f]==null){continue}var b=false;for(e=0;e<d.length;++e){if(d[e].isAncestorOf(l[f].parent)){b=true;break}}if(b){continue}if(l[f].renderContext.displayRequired){for(e=0;e<l[f].renderContext.displayRequired.length;++e){d.push(l[f].renderContext.displayRequired[e]);Echo.Render._doRenderDisplay(l[f].renderContext.displayRequired[e],true)}}else{d.push(l[f].parent);Echo.Render._doRenderDisplay(l[f].parent,true)}}if(Echo.Client.profilingTimer){Echo.Client.profilingTimer.mark("disp")}for(var a in Echo.Render._disposedComponents){var k=Echo.Render._disposedComponents[a];Echo.Render._unloadPeer(k)}Echo.Render._disposedComponents=null;g.purge();Echo.Render.updateFocus(c)},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+", Parent = "+b.parent+", Parent Peer = "+(b.parent?b.parent.peer:"N/A")+", Parent Peer Client = "+((b.parent&&b.parent.peer)?b.parent.peer.client:"N/A"))}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])}},renderComponentHide:function(a){if(!a.peer||a.peer.disposed){return}if(a.peer.displayed){if(a.peer.renderHide){a.peer.renderHide()}a.peer.displayed=false;for(var b=0;b<a.children.length;++b){Echo.Render.renderComponentHide(a.children[b])}}},_setPeerDisposedState:function(a,b){if(b){a.peer.disposed=true;Echo.Render._disposedComponents[a.peer._peerId]=a}else{a.peer.disposed=false;delete Echo.Render._disposedComponents[a.peer._peerId]}},_unloadPeer:function(a){a.peer.client=null;a.peer.component=null;a.peer=null;--this._loadedPeerCount},updateFocus:function(a){var b=a.application.getFocusedComponent();if(b&&b.peer){if(!b.peer.renderFocus){throw new Error("Cannot focus component: "+b+", peer does not provide renderFocus() implementation.")}b.peer.renderFocus()}}};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,SIZE_HEIGHT:1,SIZE_WIDTH:2},_peerId:null,client:null,component:null,displayed:false,disposed:false,$construct:function(){},$abstract:{renderAdd:function(b,a){},renderDispose:function(a){},renderUpdate:function(a){}},$virtual:{clientKeyDown:null,clientKeyPress:null,clientKeyUp:null,getFocusFlags:null,getPreferredSize:null,isChildVisible:null,renderFocus:null,renderHide:null,renderDisplay:null}});Echo.Render.RootSync=Core.extend(Echo.Render.ComponentSync,{$load:function(){Echo.Render.registerPeer("Root",this)},renderAdd:function(b,a){throw new Error("Unsupported operation: renderAdd().")},_renderContent:function(b){Echo.Render.renderComponentDispose(b,b.parent);Core.Web.DOM.removeAllChildren(this.client.domainElement);for(var a=0;a<b.parent.children.length;++a){Echo.Render.renderComponentAdd(b,b.parent.children[a],this.client.domainElement)}},renderDispose:function(a){},renderUpdate:function(d){var b,a=false;if(d.fullRefresh||d.hasAddedChildren()||d.hasRemovedChildren()){Echo.Sync.renderComponentDefaults(this.component,this.client.domainElement);var c=this.component.render("title");if(c){document.title=c}this._renderContent(d);a=true}else{this.client.domainElement.dir=this.client.application.getLayoutDirection().isLeftToRight()?"ltr":"rtl";if(d.hasUpdatedProperties()){b=d.getUpdatedProperty("title");if(b){document.title=b.newValue}b=d.getUpdatedProperty("background");if(b){Echo.Sync.Color.renderClear(b.newValue,this.client.domainElement,"backgroundColor")}b=d.getUpdatedProperty("foreground");if(b){Echo.Sync.Color.renderClear(b.newValue,this.client.domainElement,"foreground")}b=d.getUpdatedProperty("font");if(b){Echo.Sync.Font.renderClear(b.newValue,this.client.domainElement)}Echo.Sync.LayoutDirection.render(this.component.getLayoutDirection(),this.client.domainElement)}}return a}});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},renderComponentDefaults:function(c,d){var b;if((b=c.render("foreground"))){d.style.color=b}if((b=c.render("background"))){d.style.backgroundColor=b}var a=c.render("font");if(a){Echo.Sync.Font.render(a,d)}if(c.getLayoutDirection()){d.dir=c.getLayoutDirection().isLeftToRight()?"ltr":"rtl"}}};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(" ")},isMultisided:function(a){return(a&&(a.top||a.bottom||a.left||a.right))?true:false},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 Echo.Sync.Border.parse(a.top||a.right||a.bottom||a.left)}},render:function(a,b,d){if(!a){return}d=d?d:"border";if(typeof(a)=="string"){if(this._PARSER_PX.test(a)){b.style[d]=a}else{var c=this._PARSER.exec(a);if(c==null){throw new Error('Invalid border: "'+a+'"')}this.render(Echo.Sync.Extent.toPixels(c[1])+"px "+c[2]+" "+c[3],b,d)}}else{this.render(a.top,b,d+"Top");if(a.right!==null){this.render(a.right||a.top,b,d+"Right")}if(a.bottom!==null){this.render(a.bottom||a.top,b,d+"Bottom")}if(a.left!==null){this.render(a.left||a.right||a.top,b,d+"Left")}}},renderClear:function(a,b){if(a){if(a instanceof Object){b.style.border=""}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,10)}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(h,e,d,c){var j=parseInt(h.substring(1),16);var i=Math.floor(j/65536)+e;var f=Math.floor(j/256)%256+d;var a=j%256+c;return this.toHex(i,f,a)},blend:function(c,b,d){d=d<0?0:(d>1?1:d);var g=parseInt(c.substring(1),16);var e=parseInt(b.substring(1),16);var h=Math.round(Math.floor(g/65536)*(1-d)+Math.floor(e/65536)*d);var f=Math.round(Math.floor(g/256)%256*(1-d)+Math.floor(e/256)%256*d);var a=Math.round((g%256)*(1-d)+(e%256)*d);return this.toHex(h,f,a)},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}},toHex:function(c,b,a){if(c<0){c=0}else{if(c>255){c=255}}if(b<0){b=0}else{if(b>255){b=255}}if(a<0){a=0}else{if(a>255){a=255}}return"#"+(c<16?"0":"")+c.toString(16)+(b<16?"0":"")+b.toString(16)+(a<16?"0":"")+a.toString(16)}};Echo.Sync.Extent={_PARSER:/^(-?\d+(?:\.\d+)?)(.+)?$/,_FORMATTED_INT_PIXEL_TEST:/^(-?\d+px *)$/,_FORMATTED_DECIMAL_PIXEL_TEST:/^(-?\d+(.\d+)?px *)$/,isPercent:function(a){if(a==null||typeof(a)=="number"){return false}else{var b=this._PARSER.exec(a);if(!b){return false}return b[2]=="%"}},render:function(e,c,f,b,d){var a=Echo.Sync.Extent.toCssValue(e,b,d);if(a!==""){c.style[f]=a}},toCssValue:function(c,a,b){switch(typeof(c)){case"number":return Math.round(c)+"px";case"string":if(this._FORMATTED_INT_PIXEL_TEST.test(c)){return c}else{if(this._FORMATTED_DECIMAL_PIXEL_TEST.test(c)){return Math.round(parseFloat(c))+"px"}else{if(this.isPercent(c)){return b?c:""}else{var d=this.toPixels(c,a);return d==null?"":this.toPixels(c,a)+"px"}}}break}return""},toPixels:function(b,a){if(b==null){return 0}else{if(typeof(b)=="number"){return Math.round(b)}else{return Math.round(Core.Web.Measure.extentToPixels(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,getPosition:function(b){if(b.x||b.y){var a,c;if(Echo.Sync.Extent.isPercent(b.x)){a=b.x}else{a=Echo.Sync.Extent.toPixels(b.x,true)+"px"}if(Echo.Sync.Extent.isPercent(b.y)){c=b.y}else{c=Echo.Sync.Extent.toPixels(b.y,false)+"px"}return a+" "+c}else{return null}},getRepeat:function(a){if(this._REPEAT_VALUES[a.repeat]){return this._REPEAT_VALUES[a.repeat]}else{return null}},getUrl:function(a){if(a==null){return null}return typeof(a)=="object"?a.url:a},render:function(f,e,c){if(f==null){return}var b=typeof(f)=="object";var d=b?f.url:f;if(Core.Web.Env.QUIRK_IE_SECURE_ITEMS&&document.location.protocol=="https:"){if(d.substring(0,5)!="http:"&&d.substring(0,6)!="https:"){d=document.location.protocol+"//"+document.location.hostname+(document.location.port?(":"+document.location.port):"")+d}}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){var a=Echo.Sync.FillImage.getPosition(f);e.style.backgroundPosition=a?a:"";e.style.backgroundRepeat=this._REPEAT_VALUES[f.repeat]?this._REPEAT_VALUES[f.repeat]:""}},renderClear:function(c,b,a){if(c){this.render(c,b,a)}else{if(Core.Web.Env.PROPRIETARY_IE_PNG_ALPHA_FILTER_REQUIRED){b.style.filter=""}b.style.backgroundImage="";b.style.backgroundPosition="";b.style.backgroundRepeat=""}}};Echo.Sync.FillImageBorder={_NAMES:["top","topRight","right","bottomRight","bottom","bottomLeft","left","topLeft"],_MAP:[[0,0,0,0,0,0,0,0],[1,0,0,0,0,0,0,0],[0,0,1,0,0,0,0,0],[1,1,1,0,0,0,0,0],[0,0,0,0,1,0,0,0],[1,0,0,0,1,0,0,0],[0,0,1,1,1,0,0,0],[1,1,1,1,1,0,0,0],[0,0,0,0,0,0,1,0],[1,0,0,0,0,0,1,1],[0,0,1,0,0,0,1,0],[1,1,1,0,0,0,1,1],[0,0,0,0,1,1,1,0],[1,0,0,0,1,1,1,1],[0,0,1,1,1,1,1,0],[1,1,1,1,1,1,1,1]],_PROTOTYPES:[],_createSegment:function(b,a){var c=document.createElement("div");c.style.cssText="font-size:1px;line-height:0;position:absolute;"+a;b.appendChild(c)},_createPrototype:function(a){var b=document.createElement("div");if(Core.Web.Env.QUIRK_IE_HAS_LAYOUT){b.style.zoom=1}if(a&1){this._createSegment(b,"top:0;");if(a&2){this._createSegment(b,"top:0;right:0;")}}if(a&2){this._createSegment(b,"right:0;");if(a&4){this._createSegment(b,"bottom:0;right:0;")}}if(a&4){this._createSegment(b,"bottom:0;");if(a&8){this._createSegment(b,"bottom:0;left:0;")}}if(a&8){this._createSegment(b,"left:0;");if(a&1){this._createSegment(b,"top:0;left:0;")}}return b},getBorder:function(c){var a=[];var b=c.firstChild;while(b){if(b.__FIB_segment!=null){a[b.__FIB_segment]=b}b=b.nextSibling}return a},getContainerContent:function(b){if(!b.__FIB_hasContent){return null}var a=b.firstChild;while(a){if(a.__FIB_content){return a}a=a.nextSibling}return null},renderContainer:function(a,e){a=a||{};e=e||{};var j=Echo.Sync.Insets.toPixels(a.borderInsets);var p=(j.left&&8)|(j.bottom&&4)|(j.right&&2)|(j.top&&1);var c=this._MAP[p];var h=this._PROTOTYPES[p]?this._PROTOTYPES[p]:this._PROTOTYPES[p]=this._createPrototype(p);var b,d,l,o,k,n=null,g=[],m=null,r,f;if(e.update){b=e.update;d=b.firstChild;while(d){r=d;d=d.nextSibling;if(r.__FIB_segment!=null){m=d;b.removeChild(r)}if(r.__FIB_content){n=r}}d=h.firstChild;while(d){l=d.cloneNode(true);if(!o){o=l}if(m){b.insertBefore(l,m)}else{b.appendChild(l)}d=d.nextSibling}}else{b=h.cloneNode(true);o=b.firstChild;if(e.content||e.child){n=document.createElement("div");n.__FIB_content=true;if(e.child){n.appendChild(e.child)}b.__FIB_hasContent=true;b.appendChild(n)}if(e.absolute){b.__FIB_absolute=true;b.style.position="absolute"}else{b.style.position="relative";if(n){n.style.position="relative";if(Core.Web.Env.QUIRK_IE_HAS_LAYOUT){n.style.zoom=1}}}}b.__key=p;d=o;for(k=0;k<8;++k){if(!c[k]){continue}d.__FIB_segment=k;g[k]=d;if(a.color){d.style.backgroundColor=a.color}if(k===0||k===1||k===7){d.style.height=j.top+"px"}else{if(k>=3&&k<=5){d.style.height=j.bottom+"px"}}if(k>=1&&k<=3){d.style.width=j.right+"px"}else{if(k>=5){d.style.width=j.left+"px"}}Echo.Sync.FillImage.render(a[this._NAMES[k]],d,Echo.Sync.FillImage.FLAG_ENABLE_IE_PNG_ALPHA_FILTER);d=d.nextSibling}if(j.top){g[0].style.left=j.left+"px";g[0].style.right=j.right+"px"}if(j.right){g[2].style.top=j.top+"px";g[2].style.bottom=j.bottom+"px"}if(j.bottom){g[4].style.left=j.left+"px";g[4].style.right=j.right+"px"}if(j.left){g[6].style.top=j.top+"px";g[6].style.bottom=j.bottom+"px"}if(b.__FIB_absolute){if(n){var q=Echo.Sync.Insets.toPixels(a.contentInsets);n.style.position="absolute";n.style.overflow="auto";n.style.top=q.top+"px";n.style.right=q.right+"px";n.style.bottom=q.bottom+"px";n.style.left=q.left+"px"}}else{if(n){Echo.Sync.Insets.render(a.contentInsets,n,"padding")}if(!e.update){b.style.position="relative";if(n){n.style.position="relative"}}}return b},renderContainerDisplay:function(d){var c;if(Core.Web.VirtualPosition.enabled){if(d.__FIB_absolute){Core.Web.VirtualPosition.redraw(d);if((c=this.getContainerContent(d))){Core.Web.VirtualPosition.redraw(c)}}var a=this.getBorder(d);for(var b=0;b<8;b+=2){if(a[b]){Core.Web.VirtualPosition.redraw(a[b])}}}}};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);if(!a.typeface){b.style.fontFamily=""}if(!a.underline){b.style.textDecoration=""}if(!a.bold){b.style.fontWeight=""}if(!a.size){b.style.fontSize=""}if(!a.italic){b.style.fontStyle=""}}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]=Math.round(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}},renderPosition:function(a,b){var c=this.toPixels(a);b.style.top=c.top+"px";b.style.right=c.right+"px";b.style.bottom=c.bottom+"px";b.style.left=c.left+"px"},toCssValue:function(a){switch(typeof(a)){case"number":return a+"px";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"){a=Math.round(a);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.LayoutDirection={render:function(b,a){if(b){a.dir=b.isLeftToRight()?"ltr":"rtl"}}};Echo.Sync.TriCellTable=Core.extend({$static:{INVERTED:1,VERTICAL:2,LEADING_TRAILING:0,TRAILING_LEADING:1,TOP_BOTTOM:2,BOTTOM_TOP:3,_createTablePrototype:function(){var b=document.createElement("table");b.style.borderCollapse="collapse";b.style.padding="0";var a=document.createElement("tbody");b.appendChild(a);return b},getInvertedOrientation:function(c,b,a){return this.getOrientation(c,b,a)^this.INVERTED},getOrientation:function(e,d,b){var a=e.render(d,b);var c;if(a){switch(Echo.Sync.Alignment.getRenderedHorizontal(a,e)){case"left":return this.LEADING_TRAILING;case"right":return this.TRAILING_LEADING}switch(Echo.Sync.Alignment.getVertical(a,e)){case"top":return this.TOP_BOTTOM;case"bottom":return this.BOTTOM_TOP}}return e.getRenderLayoutDirection().isLeftToRight()?this.TRAILING_LEADING:this.LEADING_TRAILING}},$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(a,b){if(b!=null){a.appendChild(b)}},_addRow:function(b){if(b==null){return}var a=document.createElement("tr");a.appendChild(b);this.tbodyElement.appendChild(a)},_addSpacer:function(b,d,c){var a=document.createElement("div");if(c){a.style.cssText="width:1px;height:"+d+"px;font-size:1px;line-height:0;"}else{a.style.cssText="width:"+d+"px;height:1px;font-size:1px;line-height:0;"}b.appendChild(a)},_configure2:function(c,a){this.tdElements=[document.createElement("td"),document.createElement("td")];this.tdElements[0].style.padding="0";this.tdElements[1].style.padding="0";this.marginTdElements=[];if(a){this.marginTdElements[0]=document.createElement("td");this.marginTdElements[0].style.padding="0";if((c&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(c&Echo.Sync.TriCellTable.VERTICAL){if(c&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 b=document.createElement("tr");if(c&Echo.Sync.TriCellTable.INVERTED){this._addColumn(b,this.tdElements[1]);this._addColumn(b,this.marginTdElements[0]);this._addColumn(b,this.tdElements[0])}else{this._addColumn(b,this.tdElements[0]);this._addColumn(b,this.marginTdElements[0]);this._addColumn(b,this.tdElements[1])}this.tbodyElement.appendChild(b)}},_configure3:function(g,d,c,h){this.tdElements=[];for(var b=0;b<3;++b){this.tdElements[b]=document.createElement("td");this.tdElements[b].style.padding="0"}this.marginTdElements=[];if(d||h!=null){if(d&&d>0){this.marginTdElements[0]=document.createElement("td");if(g&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(g&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(g&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(g&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 f=(d&&d>0)?3:2;this.tdElements[2].rowSpan=f;if(this.marginTdElements[1]){this.marginTdElements[1].rowSpan=f}var e=document.createElement("tr");if(c&Echo.Sync.TriCellTable.INVERTED){this._addColumn(e,this.tdElements[2]);this._addColumn(e,this.marginTdElements[1]);if(g&Echo.Sync.TriCellTable.INVERTED){this._addColumn(e,this.tdElements[1])}else{this._addColumn(e,this.tdElements[0])}}else{if(g&Echo.Sync.TriCellTable.INVERTED){this._addColumn(e,this.tdElements[1])}else{this._addColumn(e,this.tdElements[0])}this._addColumn(e,this.marginTdElements[1]);this._addColumn(e,this.tdElements[2])}this.tbodyElement.appendChild(e);this._addRow(this.marginTdElements[0]);if(g&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",a)}if(c&Echo.Sync.TriCellTable.INVERTED){this._addRow(this.tdElements[2]);this._addRow(this.marginTdElements[1])}e=document.createElement("tr");if((g&Echo.Sync.TriCellTable.INVERTED)===0){this._addColumn(e,this.tdElements[0]);this._addColumn(e,this.marginTdElements[0]);this._addColumn(e,this.tdElements[1])}else{this._addColumn(e,this.tdElements[1]);this._addColumn(e,this.marginTdElements[0]);this._addColumn(e,this.tdElements[0])}this.tbodyElement.appendChild(e);if(!(c&Echo.Sync.TriCellTable.INVERTED)){this._addRow(this.marginTdElements[1]);this._addRow(this.tdElements[2])}}else{e=document.createElement("tr");if(c&Echo.Sync.TriCellTable.INVERTED){this._addColumn(e,this.tdElements[2]);this._addColumn(e,this.marginTdElements[1])}if(g&Echo.Sync.TriCellTable.INVERTED){this._addColumn(e,this.tdElements[1]);this._addColumn(e,this.marginTdElements[0]);this._addColumn(e,this.tdElements[0])}else{this._addColumn(e,this.tdElements[0]);this._addColumn(e,this.marginTdElements[0]);this._addColumn(e,this.tdElements[1])}if(!(c&Echo.Sync.TriCellTable.INVERTED)){this._addColumn(e,this.marginTdElements[1]);this._addColumn(e,this.tdElements[2])}this.tbodyElement.appendChild(e)}}}});Echo.Serial={_translatorMap:{},_translatorTypeData:[],addPropertyTranslator:function(b,a){this._translatorMap[b]=a},addPropertyTranslatorByType:function(b,a){this._translatorTypeData.push(b,a)},getPropertyTranslator:function(a){return this._translatorMap[a]},getPropertyTranslatorByType:function(b){for(var a=0;a<this._translatorTypeData.length;a+=2){if(this._translatorTypeData[a]==b){return this._translatorTypeData[a+1]}}return null},loadComponent:function(d,c,g,h){if(!c.nodeName=="c"){throw new Error("Element is not a component.")}var i=c.getAttribute("t");var b=c.getAttribute("i");var j=Echo.ComponentFactory.newInstance(i,b);var f=j.getLocalStyleData();var e=c.firstChild;while(e){if(e.nodeType==1){switch(e.nodeName){case"c":var a=this.loadComponent(d,e,g,h);j.add(a);break;case"p":this.loadProperty(d,e,j,f,g);break;case"s":j.setStyleName(e.firstChild?e.firstChild.nodeValue:null);break;case"sr":j.setStyle(h?h[e.firstChild.nodeValue]:null);break;case"e":this._loadComponentEvent(d,e,j);break;case"en":j.setEnabled(e.firstChild.nodeValue=="true");break;case"locale":j.setLocale(e.firstChild?e.firstChild.nodeValue:null);break;case"dir":j.setLayoutDirection(e.firstChild?(e.firstChild.nodeValue=="rtl"?Echo.LayoutDirection.RTL:Echo.LayoutDirection.LTR):null);break;case"f":if(e.getAttribute("n")){j.focusNextId=e.getAttribute("n")}if(e.getAttribute("p")){j.focusPreviousId=e.getAttribute("p")}}}e=e.nextSibling}return j},_loadComponentEvent:function(a,c,b){if(a.addComponentListener){var d=c.getAttribute("t");a.addComponentListener(b,d)}},loadProperty:function(d,k,e,h,i){var a=k.getAttribute("n");var j=k.getAttribute("t");var g=k.getAttribute("x");var l;if(j){var f=Echo.Serial._translatorMap[j];if(!f){throw new Error("Translator not available for property type: "+j)}l=f.toProperty(d,k)}else{if(i){var c=k.getAttribute("r");if(c){l=i[c]}else{l=Echo.Serial.String.toProperty(d,k)}}else{l=Echo.Serial.String.toProperty(d,k)}}if(a){if(h){if(g==null){h[a]=l}else{var m=h[a];if(!m){m=[];h[a]=m}m[g]=l}}else{if(g==null){e.set(a,l)}else{e.setIndex(a,g,l)}}}else{var b=k.getAttribute("m");if(g==null){e[b](l)}else{e[b](g,l)}}},loadStyleSheet:function(c,b,a){var g=new Echo.StyleSheet();var f=b.firstChild;while(f){if(f.nodeType==1){if(f.nodeName=="s"){var e={};var d=f.firstChild;while(d){if(d.nodeType==1){if(d.nodeName=="p"){this.loadProperty(c,d,null,e,a)}}d=d.nextSibling}g.setStyle(f.getAttribute("n")||"",f.getAttribute("t"),e)}}f=f.nextSibling}return g},storeProperty:function(a,b,d){if(d==null){}else{if(typeof(d)=="object"){var c=null;if(d.className){c=this._translatorMap[d.className]}else{c=this.getPropertyTranslatorByType(d.constructor)}if(!c||!c.toXml){return}c.toXml(a,b,d)}else{b.appendChild(b.ownerDocument.createTextNode(d.toString()))}}}};Echo.Serial.PropertyTranslator=Core.extend({$abstract:true,$static:{toProperty:function(a,b){return null},toXml:null}});Echo.Serial.Null=Core.extend(Echo.Serial.PropertyTranslator,{$static:{toProperty:function(a,b){return null}},$load:function(){Echo.Serial.addPropertyTranslator("0",this)}});Echo.Serial.Boolean=Core.extend(Echo.Serial.PropertyTranslator,{$static:{toProperty:function(a,b){return b.firstChild.data=="true"}},$load:function(){Echo.Serial.addPropertyTranslator("b",this)}});Echo.Serial.Integer=Core.extend(Echo.Serial.PropertyTranslator,{$static:{toProperty:function(a,b){return parseInt(b.firstChild.data,10)}},$load:function(){Echo.Serial.addPropertyTranslator("i",this)}});Echo.Serial.Number=Core.extend(Echo.Serial.PropertyTranslator,{$static:{toProperty:function(a,b){return parseFloat(b.firstChild.data)}},$load:function(){Echo.Serial.addPropertyTranslator("n",this)}});Echo.Serial.String=Core.extend(Echo.Serial.PropertyTranslator,{$static:{toProperty:function(a,b){var d=b.firstChild;if(!d){return""}var c=d.data;while(d.nextSibling){d=d.nextSibling;c+=d.data}return c}},$load:function(){Echo.Serial.addPropertyTranslator("s",this)}});Echo.Serial.Date=Core.extend(Echo.Serial.PropertyTranslator,{$static:{_expr:/(\d{4})\.(\d{2}).(\d{2})/,toProperty:function(b,c){var d=Echo.Serial.String.toProperty(b,c);var a=this._expr.exec(d);if(!a){return null}return new Date(a[1],parseInt(a[2],10)-1,a[3])},toXml:function(a,b,c){b.appendChild(b.ownerDocument.createTextNode(c.getFullYear()+"."+(c.getMonth()+1)+"."+c.getDate()))}},$load:function(){Echo.Serial.addPropertyTranslator("d",this);Echo.Serial.addPropertyTranslatorByType(Date,this)}});Echo.Serial.Map=Core.extend(Echo.Serial.PropertyTranslator,{$static:{toProperty:function(a,b){var d={};var c=b.firstChild;while(c){if(c.nodeType!=1){continue}Echo.Serial.loadProperty(a,c,null,d,null);c=c.nextSibling}return d}},$load:function(){Echo.Serial.addPropertyTranslator("m",this)}});Echo.Serial.Alignment=Core.extend(Echo.Serial.PropertyTranslator,{$static:{_HORIZONTAL_MAP:{leading:"leading",trailing:"trailing",left:"left",center:"center",right:"right"},_VERTICAL_MAP:{top:"top",center:"middle",bottom:"bottom"},toProperty:function(a,c){var d=Core.Web.DOM.getChildElementByTagName(c,"a");var e=this._HORIZONTAL_MAP[d.getAttribute("h")];var b=this._VERTICAL_MAP[d.getAttribute("v")];if(e){if(b){return{horizontal:e,vertical:b}}return e}if(b){return b}return null}},$load:function(){Echo.Serial.addPropertyTranslator("Alignment",this);Echo.Serial.addPropertyTranslator("AL",this)}});Echo.Serial.Border=Core.extend(Echo.Serial.PropertyTranslator,{$static:{toProperty:function(a,b){if(b.firstChild.nodeType==3){return b.firstChild.data}else{if(b.getAttribute("v")){return b.getAttribute("v")}else{var d=Core.Web.DOM.getChildElementByTagName(b,"b");var c={};var 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}}}},$load:function(){Echo.Serial.addPropertyTranslator("Border",this);Echo.Serial.addPropertyTranslator("BO",this)}});Echo.Serial.FillImage=Core.extend(Echo.Serial.PropertyTranslator,{$static:{parseElement:function(b,c){var d=c.getAttribute("u");if(b.decompressUrl){d=b.decompressUrl(d)}var e=c.getAttribute("r");var a=c.getAttribute("x");var f=c.getAttribute("y");if(e||a||f){return{url:d,repeat:e,x:a,y:f}}else{return d}},toProperty:function(a,b){var c=Core.Web.DOM.getChildElementByTagName(b,"fi");return this.parseElement(a,c)}},$load:function(){Echo.Serial.addPropertyTranslator("FillImage",this);Echo.Serial.addPropertyTranslator("FI",this)}});Echo.Serial.FillImageBorder=Core.extend(Echo.Serial.PropertyTranslator,{$static:{_NAMES:["topLeft","top","topRight","left","right","bottomLeft","bottom","bottomRight"],_parseElement:function(a,e){var d={contentInsets:e.getAttribute("ci")?e.getAttribute("ci"):null,borderInsets:e.getAttribute("bi")?e.getAttribute("bi"):null,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},toProperty:function(a,b){var c=Core.Web.DOM.getChildElementByTagName(b,"fib");return Echo.Serial.FillImageBorder._parseElement(a,c)}},$load:function(){Echo.Serial.addPropertyTranslator("FillImageBorder",this);Echo.Serial.addPropertyTranslator("FIB",this)}});Echo.Serial.Font=Core.extend(Echo.Serial.PropertyTranslator,{$static:{toProperty:function(b,d){var g=Core.Web.DOM.getChildElementByTagName(d,"f");var a=Core.Web.DOM.getChildElementsByTagName(g,"tf");var c={};if(a.length>1){c.typeface=[];for(var f=0;f<a.length;++f){c.typeface[f]=a[f].firstChild.data}}else{if(a.length==1){c.typeface=a[0].firstChild.data}}var e=g.getAttribute("sz");if(e){c.size=e}if(g.getAttribute("bo")){c.bold=true}if(g.getAttribute("it")){c.italic=true}if(g.getAttribute("un")){c.underline=true}if(g.getAttribute("ov")){c.overline=true}if(g.getAttribute("lt")){c.lineThrough=true}return c}},$load:function(){Echo.Serial.addPropertyTranslator("Font",this);Echo.Serial.addPropertyTranslator("F",this)}});Echo.Serial.ImageReference=Core.extend(Echo.Serial.PropertyTranslator,{$static:{toProperty:function(b,c){var d;if(c.firstChild.nodeType==1){var f=c.firstChild;d=f.firstChild.data;if(b.decompressUrl){d=b.decompressUrl(d)}var e=f.getAttribute("w");e=e?e:null;var a=f.getAttribute("h");a=a?a:null;if(e||a){return{url:d,width:e,height:a}}else{return d}}else{d=c.firstChild.data;return b.decompressUrl?b.decompressUrl(d):d}}},$load:function(){Echo.Serial.addPropertyTranslator("ImageReference",this);Echo.Serial.addPropertyTranslator("I",this)}});Echo.Serial.LayoutData=Core.extend(Echo.Serial.PropertyTranslator,{$static:{toProperty:function(a,b){var d={};var c=b.firstChild;while(c){if(c.nodeType==1){if(c.nodeName=="p"){Echo.Serial.loadProperty(a,c,null,d)}}c=c.nextSibling}return d}},$load:function(){Echo.Serial.addPropertyTranslator("LayoutData",this);Echo.Serial.addPropertyTranslator("L",this)}});Echo.Client=Core.extend({$static:{DEFAULT_CONFIGURATION:{"StopError.Message":"This application has been stopped due to an error.","WaitIndicator.Text":"Please wait...","Action.Continue":"Continue","Action.Restart":"Restart Application"},STYLE_CRITICAL:0,STYLE_MESSAGE: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)},configuration:null,designMode:false,domainElement:null,application:null,_lastInputRestrictionId:0,_inputRestrictionCount:0,_inputRestrictionListeners:null,_inputRescriptionMap:null,_keyFocusedComponentId:null,_lastKeyCode:null,_processKeyRef:null,_waitIndicatorActive:false,_processApplicationFocusRef:null,parent:null,_waitIndicator:null,_preWaitIndicatorDelay:500,_waitIndicatorRunnable:null,$construct:function(){this.configuration={};for(var a in Echo.Client.DEFAULT_CONFIGURATION){this.configuration[a]=Echo.Client.DEFAULT_CONFIGURATION[a]}this._inputRestrictionMap={};this._processKeyRef=Core.method(this,this._processKey);this._processApplicationFocusRef=Core.method(this,this._processApplicationFocus);this._waitIndicator=new Echo.Client.DefaultWaitIndicator();this._waitIndicatorRunnable=new Core.Web.Scheduler.MethodRunnable(Core.method(this,this._waitIndicatorActivate),this._preWaitIndicatorDelay,false)},$abstract:true,$virtual:{getResourceUrl:function(a,b){if(this.parent){return this.parent.getResourceUrl(a,b)}else{return null}},verifyInput:function(a){if(this._inputRestrictionCount!==0){return false}if(a){return a.isActive()}else{return this.application.isActive()}},dispose:function(){this.configure(null,null);this._setWaitVisible(false)}},addElement:function(a){Core.Web.Event.add(a,"keypress",this._processKeyRef,false);Core.Web.Event.add(a,"keydown",this._processKeyRef,false);Core.Web.Event.add(a,"keyup",this._processKeyRef,false)},configure:function(a,b){if(this.application){Core.Arrays.remove(Echo.Client._activeClients,this);this.removeElement(this.domainElement);this.application.removeListener("focus",this._processApplicationFocusRef);this.application.doDispose();this.application.client=null}this.application=a;this.domainElement=b;if(this.application){this.application.client=this;this.application.doInit();this.application.addListener("focus",this._processApplicationFocusRef);this.addElement(this.domainElement);Echo.Client._activeClients.push(this)}},createInputRestriction:function(){this._setWaitVisible(true);var a=(++this._lastInputRestrictionId).toString();++this._inputRestrictionCount;this._inputRestrictionMap[a]=true;return a},displayError:function(m,n,i,h,g,b){m=m||document.body;var f=this.createInputRestriction();this._setWaitVisible(false);var j=document.createElement("div");j.style.cssText="position:absolute;z-index:32766;width:100%;height:100%;background-color:#000000;opacity:0.75";if(Core.Web.Env.PROPRIETARY_IE_OPACITY_FILTER_REQUIRED){j.style.filter="alpha(opacity=75)"}m.appendChild(j);var a=document.createElement("div");a.style.cssText="position:absolute;z-index:32767;width:100%;height:100%;overflow:hidden;";m.appendChild(a);var e=document.createElement("div");e.style.cssText="color:#ffffff;padding:20px 40px 0px;"+(b===Echo.Client.STYLE_MESSAGE?"border-bottom:4px solid #1f1faf;background-color:#1f1f5f":"border-bottom:4px solid #af1f1f;background-color:#5f1f1f");if(n){var l=document.createElement("div");l.style.cssText="font-weight: bold; margin-bottom:20px;";l.appendChild(document.createTextNode(n));e.appendChild(l)}if(i){var k=document.createElement("div");k.style.cssText="max-height:10em;overflow:auto;margin-bottom:20px;";k.appendChild(document.createTextNode(i));e.appendChild(k)}a.appendChild(e);if(h){var d=document.createElement("div");d.tabIndex="0";d.style.cssText="margin-bottom:20px;cursor:pointer;font-weight:bold;padding:2px 10px;"+(b===Echo.Client.STYLE_MESSAGE?"border: 1px outset #2f2faf;background-color:#2f2faf;":"border: 1px outset #af2f2f;background-color:#af2f2f;");d.appendChild(document.createTextNode(h));e.appendChild(d);var c=Core.method(this,function(o){if(o.type!="keypress"||o.keyCode==13){try{Core.Web.DOM.removeEventListener(d,"click",c,false);Core.Web.DOM.removeEventListener(d,"keypress",c,false);a.parentNode.removeChild(a);j.parentNode.removeChild(j);this.removeInputRestriction(f)}finally{if(g){g()}}}});Core.Web.DOM.addEventListener(d,"click",c,false);Core.Web.DOM.addEventListener(d,"keypress",c,false);Core.Web.DOM.focusElement(d)}},exec:function(b,c){var a=this.createInputRestriction();Core.Web.Library.exec(b,Core.method(this,function(d){if(d&&!d.success){this.fail("Cannot install library: "+d.url+" Exception: "+d.ex);return}this.removeInputRestriction(a);c()}))},fail:function(b){var a=this.domainElement;try{this.dispose()}finally{if(this.configuration["StopError.URI"]){window.location.href=this.configuration["StopError.URI"]}else{this.displayError(a,this.configuration["StopError.Message"],b,this.configuration["Action.Restart"],function(){window.location.reload()})}}},forceRedraw:function(){if(this.parent){this.parent.forceRedraw()}else{if(Core.Web.Env.QUIRK_IE_BLANK_SCREEN){if(this.domainElement&&this.domainElement.offsetHeight===0){var a=document.documentElement.style.display||"";document.documentElement.style.display="none";document.documentElement.style.display=a}}}},getWaitIndicator:function(){return this._waitIndicator},_processApplicationFocus:function(b){var a=this.application.getFocusedComponent();if(a&&a.peer&&a.peer.renderFocus){a.peer.renderFocus()}},_processKey:function(c){var a=c.type=="keyup",b=c.type=="keypress",g=this.application.getFocusedComponent(),f=true,d=null,i;if(b){i=this._lastKeyCode}else{i=this._lastKeyCode=Core.Web.Key.translateKeyCode(c.keyCode)}if(!a){if(i==8){var h=c.target.nodeName?c.target.nodeName.toLowerCase():null;if(h!="input"&&h!="textarea"){Core.Web.DOM.preventEventDefault(c)}}else{if(!b&&i==9){this.application.focusNext(c.shiftKey);Core.Web.DOM.preventEventDefault(c)}}if(b&&Core.Web.Env.QUIRK_KEY_PRESS_FIRED_FOR_SPECIAL_KEYS&&!c.charCode){return true}}if(!g){return true}if(a||b){if(this._keyFocusedComponentId!=g.renderId){return true}}else{this._keyFocusedComponentId=g.renderId}var j=b?"clientKeyPress":(a?"clientKeyUp":"clientKeyDown");while(g&&f){if(g.peer&&g.peer[j]){if(!d){d={type:c.type,source:this,keyCode:i,domEvent:c};if(b){d.charCode=Core.Web.Env.QUIRK_KEY_CODE_IS_CHAR_CODE?c.keyCode:c.charCode}}f=g.peer[j](d)}g=g.parent}return true},processUpdates:function(){var b=null;try{b=this.createInputRestriction();Echo.Render.processUpdates(this);this.removeInputRestriction(b);this.forceRedraw()}catch(a){if(a.lineNumber){Core.Debug.consoleWrite("Reported Line #: "+a.lineNumber);Core.Debug.consoleWrite("Evaluated Line #: "+(a.lineNumber-Core.Web.Library.evalLine)+" (if evaluated script)")}if(a.stack){Core.Debug.consoleWrite("Exception: "+a+", Stack Trace: "+a.stack)}this.fail("Exception during Client.processUpdates(): "+a.message);throw (a)}},registerRestrictionListener:function(b,a){if(!this._inputRestrictionListeners){this._inputRestrictionListeners={}}this._inputRestrictionListeners[b.renderId]=a},removeInputRestriction:function(c){if(this._inputRestrictionMap[c]===undefined){return}delete this._inputRestrictionMap[c];--this._inputRestrictionCount;if(this._inputRestrictionCount===0){this._setWaitVisible(false);if(this._inputRestrictionListeners){var b=this._inputRestrictionListeners;this._inputRestrictionListeners=null;for(var a in b){b[a]()}}}},_setWaitVisible:function(a){if(a){if(!this._waitIndicatorActive){this._waitIndicatorActive=true;Core.Web.Scheduler.add(this._waitIndicatorRunnable)}}else{if(this._waitIndicatorActive){this._waitIndicatorActive=false;Core.Web.Scheduler.remove(this._waitIndicatorRunnable);this._waitIndicator.deactivate(this);this.forceRedraw()}}},setWaitIndicator:function(a){if(this._waitIndicator){this._setWaitVisible(false);if(this._waitIndicator.dispose){this._waitIndicator.dispose(this)}}this._waitIndicator=a},removeElement:function(a){Core.Web.Event.remove(a,"keypress",this._processKeyRef,false);Core.Web.Event.remove(a,"keydown",this._processKeyRef,false);Core.Web.Event.remove(a,"keyup",this._processKeyRef,false)},_waitIndicatorActivate:function(){this._waitIndicator.activate(this)},_windowResizeListener:function(a){if(this.application.rootComponent.peer){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.Client.WaitIndicator=Core.extend({$abstract:{activate:function(a){},deactivate:function(a){}},$virtual:{dispose:null}});Echo.Client.DefaultWaitIndicator=Core.extend(Echo.Client.WaitIndicator,{$construct:function(){this._divElement=document.createElement("div");this._divElement.style.cssText="display: none;z-index:32767;position:absolute;top:30px;right:30px;width:200px;padding:20px;border:1px outset #abcdef;background-color:#abcdef;color:#000000;text-align:center;";this._textNode=document.createTextNode("");this._divElement.appendChild(this._textNode);this._fadeRunnable=new Core.Web.Scheduler.MethodRunnable(Core.method(this,this._tick),50,true);document.body.appendChild(this._divElement)},activate:function(a){if(a.configuration["WaitIndicator.Background"]){this._divElement.style.backgroundColor=a.configuration["WaitIndicator.Background"];this._divElement.style.borderColor=a.configuration["WaitIndicator.Background"]}if(a.configuration["WaitIndicator.Foreground"]){this._divElement.style.color=a.configuration["WaitIndicator.Foreground"]}this._textNode.nodeValue=a.configuration["WaitIndicator.Text"];this._divElement.style.display="block";Core.Web.Scheduler.add(this._fadeRunnable);this._opacity=0},deactivate:function(a){this._divElement.style.display="none";Core.Web.Scheduler.remove(this._fadeRunnable)},dispose:function(a){if(this._divElement&&this._divElement.parentNode){this._divElement.parentNode.removeChild(this._divElement)}this._divElement=null;this._textNode=null},_tick:function(){++this._opacity;var a=1-(Math.abs((this._opacity%40)-20)/30);if(!Core.Web.Env.PROPRIETARY_IE_OPACITY_FILTER_REQUIRED){this._divElement.style.opacity=a}}});Echo.FreeClient=Core.extend(Echo.Client,{_processUpdateRef:null,_doRenderRef:null,_resourcePaths:null,_renderPending:false,$construct:function(a,b){Echo.Client.call(this);this._doRenderRef=Core.method(this,this._doRender);this._processUpdateRef=Core.method(this,this._processUpdate);this.configure(a,b);this._processUpdate()},addResourcePath:function(a,b){if(!this._resourcePaths){this._resourcePaths={}}this._resourcePaths[a]=b},dispose:function(){this.application.updateManager.removeUpdateListener(this._processUpdateRef);Echo.Render.renderComponentDispose(null,this.application.rootComponent);Echo.Client.prototype.dispose.call(this)},_doRender:function(){if(this.application){this.processUpdates();this._renderPending=false}},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.application.updateManager.addUpdateListener(this._processUpdateRef)},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){if(!this._renderPending){this._renderPending=true;Core.Web.Scheduler.run(this._doRenderRef)}}});Echo.Sync.ArrayContainer=Core.extend(Echo.Render.ComponentSync,{$abstract:{cellElementNodeName:null,renderChildLayoutData:function(b,a){}},$virtual:{prevFocusKey:null,prevFocusFlag:null,nextFocusKey:null,nextFocusFlag:null,invertFocusRtl:false},element:null,containerElement:null,spacingPrototype:null,cellSpacing:null,_childIdToElementMap:null,clientKeyDown:function(f){switch(f.keyCode){case this.prevFocusKey:case this.nextFocusKey:var a=f.keyCode==this.prevFocusKey;if(this.invertFocusRtl&&!this.component.getRenderLayoutDirection().isLeftToRight()){a=!a}var c=this.client.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.client.application.focusManager.findInParent(this.component,a);if(b){this.client.application.setFocusedComponent(b);Core.Web.DOM.preventEventDefault(f.domEvent);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||!this.containerElement.firstChild){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)}},renderDispose:function(a){this.element=null;this.containerElement=null;this._childIdToElementMap=null;this.spacingPrototype=null},_renderRemoveChild:function(c,b){var a=this._childIdToElementMap[b.renderId];if(!a){return}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 c,d=false;if(g.hasUpdatedProperties()||g.hasUpdatedLayoutDataChildren()){d=true}else{var a=g.getRemovedChildren();if(a){for(c=0;c<a.length;++c){this._renderRemoveChild(g,a[c])}}var e=g.getAddedChildren();if(e){for(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.renderComponentDefaults(this.component,this.element);Echo.Sync.Border.render(this.component.render("border"),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.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},_rowPrototype:null},$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,invertFocusRtl:true,renderAdd:function(b,a){this.element=Echo.Sync.Row._rowPrototype.cloneNode(true);this.element.id=this.component.renderId;Echo.Sync.renderComponentDefaults(this.component,this.element);Echo.Sync.Border.render(this.component.render("border"),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.padding=0;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:{_defaultIconTextMargin:5,_prototypeButton:null,_createPrototypeButton:function(){var a=document.createElement("div");a.tabIndex="0";a.style.outlineStyle="none";a.style.cursor="pointer";return a}},$load:function(){this._prototypeButton=this._createPrototypeButton();Echo.Render.registerPeer("Button",this)},enabled:null,div:null,_textElement:null,iconImg:null,_processRolloverExitRef:null,_processInitEventRef:null,_focused:false,$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)}}},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.Border.renderClear(c,this.div);if(this._textElement){Echo.Sync.Font.renderClear(b,this._textElement)}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.Border.renderClear(c,this.div);if(this._textElement){Echo.Sync.Font.renderClear(b,this._textElement)}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}}}},_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);if(this.component.render("rolloverEnabled")){Core.Web.Event.add(this.div,Core.Web.Env.PROPRIETARY_EVENT_MOUSE_ENTER_LEAVE_SUPPORTED?"mouseenter":"mouseover",Core.method(this,this._processRolloverEnter),false);Core.Web.Event.add(this.div,Core.Web.Env.PROPRIETARY_EVENT_MOUSE_ENTER_LEAVE_SUPPORTED?"mouseleave":"mouseout",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)},clientKeyDown:function(a){if(!this.client||!this.client.verifyInput(this.component)){return true}if(a.keyCode==13){this.doAction();return false}else{return true}},getFocusFlags:function(){return Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_ALL},_processBlur:function(a){this._renderFocusStyle(false)},_processClick:function(a){if(!this.client||!this.client.verifyInput(this.component)){return true}this.client.application.setFocusedComponent(this.component);this.doAction()},_processFocus:function(a){if(!this.client||!this.client.verifyInput(this.component)){return true}this.client.application.setFocusedComponent(this.component)},_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}},_processPress:function(a){if(!this.client||!this.client.verifyInput(this.component)){return true}Core.Web.DOM.preventEventDefault(a);this.setPressedState(true)},_processRelease:function(a){if(!this.client){return true}this.setPressedState(false)},_processRolloverEnter:function(a){if(!this.client||!this.client.verifyInput(this.component)||Core.Web.dragInProgress){return true}this.client.application.addListener("focus",this._processRolloverExitRef);this.setRolloverState(true);return true},_processRolloverExit:function(a){if(!this.client||!this.client.application){return true}if(this._processRolloverExitRef){this.client.application.removeListener("focus",this._processRolloverExitRef)}this.setRolloverState(false);return true},renderAdd:function(e,b){this.enabled=this.component.isRenderEnabled();this.div=Echo.Sync.Button._prototypeButton.cloneNode(false);this.div.id=this.component.renderId;Echo.Sync.LayoutDirection.render(this.component.getLayoutDirection(),this.div);if(this.enabled){Echo.Sync.Color.renderFB(this.component,this.div);Echo.Sync.Border.render(this.component.render("border"),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.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){this._textElement=a;var b=this.component.render("textAlignment");if(b){Echo.Sync.Alignment.render(b,a,true,this.component)}if(this.enabled){Echo.Sync.Font.render(this.component.render("font"),this._textElement)}else{Echo.Sync.Font.render(Echo.Sync.getEffectProperty(this.component,"font","disabledFont",true),this._textElement)}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.removeListener("focus",this._processRolloverExitRef)}Core.Web.Event.removeAll(this.div);this._focused=false;this.div=null;this._textElement=null;this.iconImg=null},renderFocus:function(){if(this._focused){return}this._renderFocusStyle(true);Core.Web.DOM.focusElement(this.div)},renderUpdate:function(c){var a=this.div;var b=a.parentNode;this.renderDispose(c);b.removeChild(a);this.renderAdd(c,b);return false},_renderFocusStyle:function(d){if(this._focused==d){return}this._focused=d;var e;if(!this.component.render("focusedEnabled")){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);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.Border.renderClear(c,this.div);if(this._textElement){Echo.Sync.Font.renderClear(b,this._textElement)}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}}}}});Echo.Sync.Composite=Core.extend(Echo.Render.ComponentSync,{$load:function(){Echo.Render.registerPeer("Composite",this)},div:null,contentDiv:null,$virtual:{renderStyle:function(){Echo.Sync.renderComponentDefaults(this.component,this.div)}},renderAdd:function(b,a){this.div=this.contentDiv=document.createElement("div");this.div.id=this.component.renderId;if(this.component.children.length!==0){this.renderStyle();Echo.Render.renderComponentAdd(b,this.component.children[0],this.contentDiv)}a.appendChild(this.div)},renderDispose:function(a){this.div=null},renderUpdate:function(c){var a=this.div;var b=a.parentNode;Echo.Render.renderComponentDispose(c,c.parent);b.removeChild(a);this.renderAdd(c,b);return true}});Echo.Sync.Panel=Core.extend(Echo.Sync.Composite,{$load:function(){Echo.Render.registerPeer("Panel",this)},renderDisplay:function(){if(this._imageBorder){Echo.Sync.FillImageBorder.renderContainerDisplay(this.div)}},renderStyle:function(){this._imageBorder=this.component.render("imageBorder");var e=this.component.children.length!==0?this.component.children[0]:null;var b=this.component.render("width");var a=this.component.render("height");if(Echo.Sync.Extent.isPercent(a)){a=null}if(e&&e.pane){this.div.style.position="relative";if(!a){a="10em"}}if(b||a){this.contentDiv.style.overflow="hidden";if(a&&this._imageBorder){var d=Echo.Sync.Insets.toPixels(this._imageBorder.contentInsets);var c=Echo.Sync.Extent.toPixels(a)-d.top-d.bottom;if(!e||!e.pane){d=Echo.Sync.Insets.toPixels(this.component.render("insets"));c-=d.top+d.bottom}this.contentDiv.style.height=c+"px"}}if(this._imageBorder){this.div=Echo.Sync.FillImageBorder.renderContainer(this._imageBorder,{child:this.contentDiv})}else{Echo.Sync.Border.render(this.component.render("border"),this.contentDiv)}Echo.Sync.renderComponentDefaults(this.component,this.contentDiv);if(!e||!e.pane){Echo.Sync.Insets.render(this.component.render("insets"),this.contentDiv,"padding")}Echo.Sync.Alignment.render(this.component.render("alignment"),this.contentDiv,true,this.component);Echo.Sync.FillImage.render(this.component.render("backgroundImage"),this.contentDiv);Echo.Sync.Extent.render(b,this.div,"width",true,true);Echo.Sync.Extent.render(a,this.div,"height",false,false)}});Echo.Sync.ContentPane=Core.extend(Echo.Render.ComponentSync,{$load:function(){Echo.Render.registerPeer("ContentPane",this)},_floatingPaneStack:null,_zIndexRenderRequired:false,$construct:function(){this._floatingPaneStack=[]},getSize:function(){return new Core.Web.Measure.Bounds(this._div)},raise:function(a){if(this._floatingPaneStack[this._floatingPaneStack.length-1]==a){return}Core.Arrays.remove(this._floatingPaneStack,a);this._floatingPaneStack.push(a);this._renderFloatingPaneZIndices();this._storeFloatingPaneZIndices()},renderAdd:function(g,a){var d;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.renderComponentDefaults(this.component,this._div);var c=this.component.render("background");var e=this.component.render("backgroundImage");Echo.Sync.FillImage.render(e,this._div);if(!c&&!e){Echo.Sync.FillImage.render(this.client.getResourceUrl("Echo","resource/Transparent.gif"),this._div)}this._childIdToElementMap={};var b=this.component.getComponentCount();for(d=0;d<b;++d){var f=this.component.getComponent(d);this._renderAddChild(g,f)}this._pendingScrollX=this.component.render("horizontalScroll");this._pendingScrollY=this.component.render("verticalScroll");a.appendChild(this._div);if(this._zIndexRenderRequired){this._renderFloatingPaneZIndices()}},_renderAddChild:function(c,a){var e=document.createElement("div");this._childIdToElementMap[a.renderId]=e;e.style.position="absolute";if(a.floatingPane){var h=a.render("zIndex");if(h!=null){var j=false;var d=0;while(d<this._floatingPaneStack.length&&!j){var f=this._floatingPaneStack[d].render("zIndex");if(f!=null&&f>h){this._floatingPaneStack.splice(d,0,a);j=true}++d}if(!j){this._floatingPaneStack.push(a)}}else{this._floatingPaneStack.push(a)}e.style.zIndex="1";e.style.left=e.style.top=0;this._zIndexRenderRequired=true}else{var b=this.component.render("insets",0);var g=Echo.Sync.Insets.toPixels(b);e.style.zIndex="0";e.style.left=g.left+"px";e.style.top=g.top+"px";e.style.bottom=g.bottom+"px";e.style.right=g.right+"px";if(a.pane){e.style.overflow="hidden"}else{switch(this.component.render("overflow")){case Echo.ContentPane.OVERFLOW_HIDDEN:e.style.overflow="hidden";break;case Echo.ContentPane.OVERFLOW_SCROLL:e.style.overflow="scroll";break;default:e.style.overflow="auto";break}}}Echo.Render.renderComponentAdd(c,a,e);this._div.appendChild(e)},renderDisplay:function(){var h=this._div.firstChild;while(h){Core.Web.VirtualPosition.redraw(h);h=h.nextSibling}if(this._pendingScrollX||this._pendingScrollY){var c=this.component.getComponentCount();for(var d=0;d<c;++d){h=this.component.getComponent(d);if(!h.floatingPane){var f=this._childIdToElementMap[h.renderId];var b,e;if(this._pendingScrollX){var a=Echo.Sync.Extent.toPixels(this._pendingScrollX);if(Echo.Sync.Extent.isPercent(this._pendingScrollX)||a<0){e=a<0?100:parseInt(this._pendingScrollX,10);b=Math.round((f.scrollWidth-f.offsetWidth)*e/100);if(b>0){f.scrollLeft=b;if(Core.Web.Env.BROWSER_INTERNET_EXPLORER){b=Math.round((f.scrollWidth-f.offsetWidth)*e/100);f.scrollLeft=b}}}else{f.scrollLeft=a}this._pendingScrollX=null}if(this._pendingScrollY){var g=Echo.Sync.Extent.toPixels(this._pendingScrollY);if(Echo.Sync.Extent.isPercent(this._pendingScrollY)||g<0){e=g<0?100:parseInt(this._pendingScrollY,10);b=Math.round((f.scrollHeight-f.offsetHeight)*e/100);if(b>0){f.scrollTop=b;if(Core.Web.Env.BROWSER_INTERNET_EXPLORER){b=Math.round((f.scrollHeight-f.offsetHeight)*e/100);f.scrollTop=b}}}else{f.scrollTop=g}this._pendingScrollY=null}break}}}},renderDispose:function(a){this._childIdToElementMap=null;this._div=null},_renderFloatingPaneZIndices:function(){for(var b=0;b<this._floatingPaneStack.length;++b){var a=this._childIdToElementMap[this._floatingPaneStack[b].renderId];a.style.zIndex=2+b}this._zIndexRenderRequired=false},_renderRemoveChild:function(c,b){if(b.floatingPane){Core.Arrays.remove(this._floatingPaneStack,b)}var a=this._childIdToElementMap[b.renderId];if(!a){return}a.parentNode.removeChild(a);delete this._childIdToElementMap[b.renderId]},renderUpdate:function(g){var c,d=false;if(g.hasUpdatedProperties()||g.hasUpdatedLayoutDataChildren()){d=true}else{var a=g.getRemovedChildren();if(a){for(c=0;c<a.length;++c){this._renderRemoveChild(g,a[c])}}var e=g.getAddedChildren();g.renderContext.displayRequired=[];if(e){for(c=0;c<e.length;++c){if(!e[c].floatingPane){g.renderContext.displayRequired=null}this._renderAddChild(g,e[c],this.component.indexOf(e[c]));if(g.renderContext.displayRequired){g.renderContext.displayRequired.push(e[c])}}if(this._zIndexRenderRequired){this._renderFloatingPaneZIndices()}}}if(d){this._floatingPaneStack=[];var b=this._div;var f=b.parentNode;Echo.Render.renderComponentDispose(g,g.parent);f.removeChild(b);this.renderAdd(g,f)}return d},_storeFloatingPaneZIndices:function(){for(var a=0;a<this._floatingPaneStack.length;++a){this._floatingPaneStack[a].set("zIndex",a)}}});Echo.Sync.Grid=Core.extend(Echo.Render.ComponentSync,{$static:{_createPrototypeTable:function(){var a=document.createElement("table");a.style.outlineStyle="none";a.tabIndex="-1";a.style.borderCollapse="collapse";var b=document.createElement("colgroup");a.appendChild(b);a.appendChild(document.createElement("tbody"));return a},Processor:Core.extend({$static:{Cell:Core.extend({xSpan:null,ySpan:null,index:null,component:null,$construct:function(c,b,d,a){this.component=c;this.index=b;this.xSpan=d;this.ySpan=a}})},cellArrays:null,grid:null,gridXSize:null,gridYSize:null,xExtents:null,yExtents:null,horizontalOrientation:null,$construct:function(b){this.grid=b;this.cellArrays=[];this.horizontalOrientation=b.render("orientation")!=Echo.Grid.ORIENTATION_VERTICAL;var a=this.createCells();if(a==null){this.gridXSize=0;this.gridYSize=0;return}this.renderCellMatrix(a);this.calculateExtents();this.reduceY();this.reduceX()},addExtents:function(e,c,d){var f=Echo.Sync.Extent.isPercent(e),g=Echo.Sync.Extent.isPercent(c);if(f||g){if(f&&g){return(parseFloat(e)+parseFloat(c))+"%"}else{return f?e:c}}else{return Echo.Sync.Extent.toPixels(e)+Echo.Sync.Extent.toPixels(c)}},calculateExtents:function(){var c,b=this.horizontalOrientation?"columnWidth":"rowHeight",a=this.horizontalOrientation?"rowHeight":"columnWidth";this.xExtents=[];for(c=0;c<this.gridXSize;++c){this.xExtents.push(this.grid.renderIndex(b,c))}this.yExtents=[];for(c=0;c<this.gridYSize;++c){this.yExtents.push(this.grid.renderIndex(a,c))}},createCells:function(){var b=this.grid.getComponentCount();if(b===0){return null}var c=[];for(var d=0;d<b;++d){var g=this.grid.getComponent(d);var f=g.render("layoutData");if(f){var e=this.horizontalOrientation?f.columnSpan:f.rowSpan;var a=this.horizontalOrientation?f.rowSpan:f.columnSpan;c.push(new Echo.Sync.Grid.Processor.Cell(g,d,e?e:1,a?a:1))}else{c.push(new Echo.Sync.Grid.Processor.Cell(g,d,1,1))}}return c},_getCellArray:function(a){while(a>=this.cellArrays.length){this.cellArrays.push([])}return this.cellArrays[a]},getColumnCount:function(){return this.horizontalOrientation?this.gridXSize:this.gridYSize},getCell:function(a,b){if(this.horizontalOrientation){return this.cellArrays[b][a]}else{return this.cellArrays[a][b]}},getRowCount:function(){return this.horizontalOrientation?this.gridYSize:this.gridXSize},reduceX:function(){var c=[],b=1,g,e=this.cellArrays[0].length;while(b<e){g=0;var f=true;while(g<this.cellArrays.length){if(this.cellArrays[g][b]!=this.cellArrays[g][b-1]){f=false;break}++g}if(f){c[b]=true}++b}if(c.length===0){return}for(var a=this.gridXSize-1;a>=1;--a){if(!c[a]){continue}for(g=0;g<this.gridYSize;++g){if(g===0||this.cellArrays[g][a-1]!=this.cellArrays[g-1][a-1]){if(this.cellArrays[g][a-1]!=null){--this.cellArrays[g][a-1].xSpan}}this.cellArrays[g].splice(a,1)}var d=this.xExtents.splice(a,1)[0];if(d){this.xExtents[a-1]=this.addExtents(this.xExtents[a-1],d,this.horizontalOrientation?true:false)}--this.gridXSize}},reduceY:function(){var h=[],e=1,g,j=this.cellArrays.length,i,c=this.cellArrays[0];while(e<j){i=c;c=this.cellArrays[e];g=0;var f=true;while(g<c.length){if(c[g]!=i[g]){f=false;break}++g}if(f){h[e]=true}++e}if(h.length===0){return}for(var d=this.gridYSize-1;d>=0;--d){if(!h[d]){continue}var b=this.cellArrays[d-1];for(g=0;g<this.gridXSize;++g){if(g===0||b[g]!=b[g-1]){if(b[g]!=null){--b[g].ySpan}}}this.cellArrays.splice(d,1);var a=this.yExtents.splice(d,1)[0];if(a){this.yExtents[d-1]=this.addExtents(this.yExtents[d-1],a,this.horizontalOrientation?false:true)}--this.gridYSize}},renderCellMatrix:function(i){this.gridXSize=parseInt(this.grid.render("size",2),10);var g=0,f=0,b,e,h=this._getCellArray(f);for(var c=0;c<i.length;++c){if(i[c].xSpan==Echo.Grid.SPAN_FILL||i[c].xSpan>this.gridXSize-g){i[c].xSpan=this.gridXSize-g}if(i[c].xSpan<1){i[c].xSpan=1}if(i[c].ySpan<1){i[c].ySpan=1}if(i[c].xSpan!=1||i[c].ySpan!=1){for(b=1;b<i[c].xSpan;++b){if(h[g+b]!=null){i[c].xSpan=b;break}}for(e=0;e<i[c].ySpan;++e){var d=this._getCellArray(f+e);for(b=0;b<i[c].xSpan;++b){d[g+b]=i[c]}}}h[g]=i[c];if(c<i.length-1){var a=false;while(!a){if(g<this.gridXSize-1){++g}else{g=0;++f;h=this._getCellArray(f)}a=h[g]==null}}}this.gridYSize=this.cellArrays.length}})},$load:function(){this._prototypeTable=this._createPrototypeTable();Echo.Render.registerPeer("Grid",this)},_columnCount:null,_rowCount:null,clientKeyDown:function(f){var a,c,d,b;switch(f.keyCode){case 37:case 39:a=this.component.getRenderLayoutDirection().isLeftToRight()?f.keyCode==37:f.keyCode==39;c=this.client.application.getFocusedComponent();if(c&&c.peer&&c.peer.getFocusFlags){d=c.peer.getFocusFlags();if((a&&d&Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_LEFT)||(!a&&d&Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_RIGHT)){b=this.client.application.focusManager.findInParent(this.component,a);if(b){this.client.application.setFocusedComponent(b);Core.Web.DOM.preventEventDefault(f.domEvent);return false}}}break;case 38:case 40:a=f.keyCode==38;c=this.client.application.getFocusedComponent();if(c&&c.peer&&c.peer.getFocusFlags){d=c.peer.getFocusFlags();if((a&&d&Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_UP)||(!a&&d&Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_DOWN)){b=this.client.application.focusManager.findInParent(this.component,a,this._columnCount);if(b){this.client.application.setFocusedComponent(b);Core.Web.DOM.preventEventDefault(f.domEvent);return false}}}break}return true},renderAdd:function(o,j){var g=new Echo.Sync.Grid.Processor(this.component),m=Echo.Sync.Insets.toCssValue(this.component.render("insets",0)),f,l=this.component.render("border",""),u=this.component.render("width"),r=this.component.render("height"),n,y;f=Echo.Sync.Insets.toPixels(m);this._columnCount=g.getColumnCount();this._rowCount=g.getRowCount();this._table=Echo.Sync.Grid._prototypeTable.cloneNode(true);this._table.id=this.component.renderId;Echo.Sync.renderComponentDefaults(this.component,this._table);Echo.Sync.Border.render(l,this._table);this._table.style.padding=m;if(u&&Core.Web.Env.QUIRK_IE_TABLE_PERCENT_WIDTH_SCROLLBAR_ERROR&&Echo.Sync.Extent.isPercent(u)){this._renderPercentWidthByMeasure=parseInt(u,10);u=null}if(u){if(Echo.Sync.Extent.isPercent(u)){this._table.style.width=u}else{this._table.style.width=Echo.Sync.Extent.toCssValue(u,true)}this._table.style.tableLayout="fixed"}if(r){if(Echo.Sync.Extent.isPercent(r)){this._table.style.height=r}else{this._table.style.height=Echo.Sync.Extent.toCssValue(r,false)}}var t=this._table.firstChild;for(y=0;y<this._columnCount;++y){var k=document.createElement("col");u=g.xExtents[y];if(u!=null){if(Echo.Sync.Extent.isPercent(u)){k.style.width=u.toString()}else{var x=Echo.Sync.Extent.toPixels(u,true);if(Core.Web.Env.QUIRK_TABLE_CELL_WIDTH_EXCLUDES_PADDING){x-=f.left+f.right;if(x<0){x=0}}k.style.width=x+"px"}}t.appendChild(k)}var b=t.nextSibling;var q=parseInt(this.component.render("size",2),10);var c;var e={};var a,s;if(g.horizontalOrientation){a="colSpan";s="rowSpan"}else{a="rowSpan";s="colSpan"}var w=document.createElement("td");Echo.Sync.Border.render(l,w);w.style.padding=m;for(var p=0;p<this._rowCount;++p){c=document.createElement("tr");r=g.yExtents[p];if(r){c.style.height=Echo.Sync.Extent.toCssValue(r,false)}b.appendChild(c);for(y=0;y<this._columnCount;++y){var d=g.getCell(y,p);if(d==null){n=document.createElement("td");c.appendChild(n);continue}if(e[d.component.renderId]){continue}e[d.component.renderId]=true;n=w.cloneNode(false);if(d.xSpan>1){n.setAttribute(a,d.xSpan)}if(d.ySpan>1){n.setAttribute(s,d.ySpan)}var v=d.component.render("layoutData");if(v){var i=g.xExtents[y];if(Core.Web.Env.QUIRK_TABLE_CELL_WIDTH_EXCLUDES_PADDING&&i&&!Echo.Sync.Extent.isPercent(i)){var h=Echo.Sync.Insets.toPixels(v.insets);if(f.left+f.right<h.left+h.right){n.style.width=(Echo.Sync.Extent.toPixels(i)-(h.left+h.right))+"px"}}Echo.Sync.Insets.render(v.insets,n,"padding");Echo.Sync.Alignment.render(v.alignment,n,true,this.component);Echo.Sync.FillImage.render(v.backgroundImage,n);Echo.Sync.Color.render(v.background,n,"backgroundColor")}Echo.Render.renderComponentAdd(o,d.component,n);c.appendChild(n)}}j.appendChild(this._table)},renderDisplay:function(){if(this._renderPercentWidthByMeasure){this._table.style.width="";var c=this._table.parentNode;var b=c.offsetWidth;if(c.style.paddingLeft){b-=parseInt(c.style.paddingLeft,10)}if(c.style.paddingRight){b-=parseInt(c.style.paddingRight,10)}var a=((b*this._renderPercentWidthByMeasure)/100)-Core.Web.Measure.SCROLL_WIDTH;if(a>0){this._table.style.width=a+"px"}}},renderDispose:function(a){Core.Web.Event.removeAll(this._table);this._table=null;this._renderPercentWidthByMeasure=null},renderUpdate:function(c){var a=this._table;var b=a.parentNode;Echo.Render.renderComponentDispose(c,c.parent);b.removeChild(a);this.renderAdd(c,b);return true}});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"),m=this.component.render("text"),i=this.component.render("foreground"),b=this.component.render("background"),a=this.component.render("toolTipText"),h;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));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.renderComponentDefaults(this.component,this._node)}else{var d=this.component.render("font");if(!this.client.designMode&&!a&&!d&&n&&!i&&!b&&!f&&!this.component.getLayoutDirection()){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.renderComponentDefaults(this.component,this._node)}}}else{if(k){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.render(this.component.render("background"),this._node,"backgroundColor")}else{if(this.client.designMode){this._node=document.createElement("span");this._node.id=this.component.renderId}else{this._node=null}}}if(this._node){if(a){this._node.title=a}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_BORDER:"1px solid #7f7f7f",DEFAULT_SELECTED_BACKGROUND:"#0a246a",DEFAULT_SELECTED_FOREGROUND:"#ffffff"},$abstract:{listBox:null},_hasRenderedSelectedItems:false,_multipleSelect:false,_selectedIdPriority:false,_alternateRender:false,_element:null,_div:null,_focused:false,_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;break}}}if(d==null){d=this.listBox?[]:0}}return d},_processBlur:function(a){this._focused=false},_processClick:function(d){if(!this.client||!this.client.verifyInput(this.component)){Core.Web.DOM.preventEventDefault(d);this._renderSelection();return true}var f=this._div.firstChild;var b=0;while(f){if(f==d.target){break}f=f.nextSibling;++b}if(f==null){return}if(this._multipleSelect&&d.ctrlKey){var c=this._getSelection();if(c==null){c=[]}else{if(typeof(c)=="number"){c=[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||!this.client.verifyInput(this.component)){Core.Web.DOM.preventEventDefault(c);this._renderSelection();return false}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()},_processFocus:function(a){this._focused=true;if(!this.client||!this.client.verifyInput(this.component)){return true}this.client.application.setFocusedComponent(this.component)},_processSelectStart:function(a){Core.Web.DOM.preventEventDefault(a)},renderAdd:function(b,a){this._multipleSelect=this.component.get("selectionMode")==Echo.ListBox.MULTIPLE_SELECTION;if(this.listBox&&Core.Web.Env.QUIRK_IE_SELECT_LIST_DOM_UPDATE){this._alternateRender=true}this._enabled=this.component.isRenderEnabled();if(this._alternateRender){this._renderMainAsDiv(b,a)}else{this._renderMainAsSelect(b,a)}},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}},renderFocus:function(){if(this._focused){return}this._focused=true;Core.Web.DOM.focusElement(this._element)},_renderMainAsDiv:function(e,j){this._element=document.createElement("table");this._element.id=this.component.renderId;var a=document.createElement("tbody");this._element.appendChild(a);var g=document.createElement("tr");a.appendChild(g);var c=document.createElement("td");g.appendChild(c);this._div=document.createElement("div");c.appendChild(this._div);this._div.style.cssText="cursor:default;overflow:auto;";this._div.style.height=Echo.Sync.Extent.toCssValue(this.component.render("height","6em"),false,false);var b=this.component.render("width");if(!Echo.Sync.Extent.isPercent(b)){this._div.style.width=Echo.Sync.Extent.toCssValue(b,true,false)}if(this._enabled){Echo.Sync.renderComponentDefaults(this.component,this._element)}else{Echo.Sync.LayoutDirection.render(this.component.getLayoutDirection(),this._element);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.Font.render(Echo.Sync.getEffectProperty(this.component,"font","disabledFont",true),this._div)}Echo.Sync.Border.render(Echo.Sync.getEffectProperty(this.component,"border","disabledBorder",!this._enabled,Echo.Sync.ListComponent.DEFAULT_DIV_BORDER,null),this._div);Echo.Sync.Insets.render(this.component.render("insets"),this._div,"padding");var h=this.component.get("items");if(h){for(var f=0;f<h.length;++f){var d=document.createElement("div");if(h[f].text){d.appendChild(document.createTextNode(h[f].text))}else{d.appendChild(document.createTextNode(h[f].toString()))}if(h[f].foreground){Echo.Sync.Color.render(h[f].foreground,d,"color")}if(h[f].background){Echo.Sync.Color.render(h[f].background,d,"backgroundColor")}if(h[f].font){Echo.Sync.Font.render(h[f].font,d)}this._div.appendChild(d)}}if(this._enabled){Core.Web.Event.add(this._element,"blur",Core.method(this,this._processBlur),false);Core.Web.Event.add(this._element,"focus",Core.method(this,this._processFocus),false);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)}j.appendChild(this._element)},_renderMainAsSelect:function(f,b){this._div=document.createElement("div");this._element=document.createElement("select");this._element.id=this.component.renderId;this._element.size=this.listBox?6:1;if(!this._enabled){this._element.disabled=true}if(this._multipleSelect){this._element.multiple="multiple"}this._element.style.height=Echo.Sync.Extent.toCssValue(this.component.render("height"),false,false);var e=this.component.render("width");if(e){if(Echo.Sync.Extent.isPercent(e)){if(!Core.Web.Env.QUIRK_IE_SELECT_PERCENT_WIDTH){this._div.style.width=e;this._element.style.width="100%"}}else{this._element.style.width=Echo.Sync.Extent.toCssValue(e,true,false)}}if(this._enabled){Echo.Sync.renderComponentDefaults(this.component,this._element)}else{Echo.Sync.LayoutDirection.render(this.component.getLayoutDirection(),this._element);Echo.Sync.Color.render(Echo.Sync.getEffectProperty(this.component,"foreground","disabledForeground",true),this._element,"color");Echo.Sync.Color.render(Echo.Sync.getEffectProperty(this.component,"background","disabledBackground",true),this._element,"backgroundColor");Echo.Sync.Font.render(Echo.Sync.getEffectProperty(this.component,"font","disabledFont",true),this._element)}Echo.Sync.Border.render(Echo.Sync.getEffectProperty(this.component,"border","disabledBorder",!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);Core.Web.Event.add(this._element,"blur",Core.method(this,this._processBlur),false);Core.Web.Event.add(this._element,"focus",Core.method(this,this._processFocus),false)}this._div.appendChild(this._element);b.appendChild(this._div)},_renderSelection:function(){var c=this._getSelection(),b;if(this._alternateRender){if(this._hasRenderedSelectedItems){var a=this.component.get("items");for(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(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(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,{listBox:true,$load:function(){Echo.Render.registerPeer("ListBox",this)}});Echo.Sync.SelectField=Core.extend(Echo.Sync.ListComponent,{listBox:false,$load:function(){Echo.Render.registerPeer("SelectField",this)}});Echo.Sync.SplitPane=Core.extend(Echo.Render.ComponentSync,{$static:{ChildPane:Core.extend({minimumSize:0,maximumSize:null,component:null,layoutData:null,scrollLeft:0,scrollTop:0,scrollRequired:false,_permanentSizes:false,_peer:null,$construct:function(b,a){this._peer=b;this.component=a;this.layoutData=a.render("layoutData")},loadDisplayData:function(){if(this._permanentSizes){return}var a;this._permanentSizes=true;if(this.layoutData){if(this.layoutData.minimumSize){if(Echo.Sync.Extent.isPercent(this.layoutData.minimumSize)){a=this._peer._getSize();this.minimumSize=Math.round((this._peer._orientationVertical?a.height:a.width)*parseInt(this.layoutData.minimumSize,10)/100);this._permanentSizes=false}else{this.minimumSize=Math.round(Echo.Sync.Extent.toPixels(this.layoutData.minimumSize,!this._peer._orientationVertical))}}if(this.layoutData.maximumSize){if(Echo.Sync.Extent.isPercent(this.layoutData.maximumSize)){a=this._peer._getSize();this.maximumSize=Math.round((this._peer._orientationVertical?a.height:a.width)*parseInt(this.layoutData.maximumSize,10)/100);this._permanentSizes=false}else{this.maximumSize=Math.round(Echo.Sync.Extent.toPixels(this.layoutData.maximumSize,!this._peer._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,_autoPositioned:false,_overlay:null,_redisplayRequired:false,_requested:null,_rendered:null,_processSeparatorMouseMoveRef:null,_processSeparatorMouseUpRef:null,_initialAutoSizeComplete:false,_size:null,$construct:function(){this._childPanes=[];this._paneDivs=[];this._processSeparatorMouseMoveRef=Core.method(this,this._processSeparatorMouseMove);this._processSeparatorMouseUpRef=Core.method(this,this._processSeparatorMouseUp)},clientKeyDown:function(f){var a,c,d,b;switch(f.keyCode){case 37:case 39:if(!this._orientationVertical){a=(f.keyCode==37)^(!this._orientationTopLeft);c=this.client.application.getFocusedComponent();if(c&&c.peer&&c.peer.getFocusFlags){d=c.peer.getFocusFlags();if((a&&d&Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_LEFT)||(!a&&d&Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_RIGHT)){b=this.client.application.focusManager.findInParent(this.component,a);if(b){this.client.application.setFocusedComponent(b);Core.Web.DOM.preventEventDefault(f.domEvent);return false}}}}break;case 38:case 40:if(this._orientationVertical){a=(f.keyCode==38)^(!this._orientationTopLeft);c=this.client.application.getFocusedComponent();if(c&&c.peer&&c.peer.getFocusFlags){d=c.peer.getFocusFlags();if((a&&d&Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_UP)||(!a&&d&Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_DOWN)){b=this.client.application.focusManager.findInParent(this.component,a);if(b){this.client.application.setFocusedComponent(b);Core.Web.DOM.preventEventDefault(f.domEvent);return false}}}}break}return true},_getBoundedSeparatorPosition:function(a){if(this._childPanes[1]){var b=this._orientationVertical?this._getSize().height:this._getSize().width;if(a>b-this._childPanes[1].minimumSize-this._separatorSize){a=b-this._childPanes[1].minimumSize-this._separatorSize}else{if(this._childPanes[1].maximumSize!=null&&a<b-this._childPanes[1].maximumSize-this._separatorSize){a=b-this._childPanes[1].maximumSize-this._separatorSize}}}if(this._childPanes[0]){if(a<this._childPanes[0].minimumSize){a=this._childPanes[0].minimumSize}else{if(this._childPanes[0].maximumSize!=null&&a>this._childPanes[0].maximumSize){a=this._childPanes[0].maximumSize}}}return a},_getInsetsSizeAdjustment:function(a,d){if(!d||d.insets==null){return 0}var c=Echo.Sync.Insets.toPixels(d.insets);var b;if(this._orientationVertical){b=c.top+c.bottom}else{b=c.left+c.right}if(a!=null&&b>a){b=a}return b},getPreferredSize:function(h){if(this.component.children.length===0){return null}var e,b,g;h=h||(Echo.Render.ComponentSync.SIZE_WIDTH|Echo.Render.ComponentSync.SIZE_HEIGHT);var f;if(this.component.children[0].peer.getPreferredSize){f=this.component.children[0].peer.getPreferredSize(h)}else{if(!this.component.children[0].pane&&(h&Echo.Render.ComponentSync.SIZE_HEIGHT)&&this._paneDivs[0].firstChild){e=new Core.Web.Measure.Bounds(this._paneDivs[0].firstChild);f={height:e.height===0?null:e.height};if(f.height){g=this.component.children[0].render("layoutData");if(g&&g.insets){b=Echo.Sync.Insets.toPixels(g.insets);f.height+=b.top+b.bottom}}}else{f={}}}var d;if(this.component.children.length==1){d={width:0,height:0}}else{if(this.component.children[1].peer.getPreferredSize){d=this.component.children[1].peer.getPreferredSize(h)}else{if(!this.component.children[1].pane&&(h&Echo.Render.ComponentSync.SIZE_HEIGHT)&&this._paneDivs[1].firstChild){e=new Core.Web.Measure.Bounds(this._paneDivs[1].firstChild);d={height:e.height===0?null:e.height};if(d.height){g=this.component.children[1].render("layoutData");if(g&&g.insets){b=Echo.Sync.Insets.toPixels(g.insets);d.height+=b.top+b.bottom}}}else{d={}}}}var a=null;if((h&Echo.Render.ComponentSync.SIZE_HEIGHT)&&f.height!=null&&d.height!=null){if(this._orientationVertical){a=f.height+d.height+this._separatorSize}else{a=f.height>d.height?f.height:d.height}}var c=null;if((h&Echo.Render.ComponentSync.SIZE_WIDTH)&&f.width!=null&&d.width!=null){if(this._orientationVertical){c=f.width>d.width?f.width:d.width}else{c=f.width+d.width+this._separatorSize}}return{height:a,width:c}},_getSize:function(){if(!this._size){this._size=new Core.Web.Measure.Bounds(this._splitPaneDiv)}return this._size},_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)},_loadRenderData:function(){var a=this.component.render("orientation",Echo.SplitPane.ORIENTATION_HORIZONTAL_LEADING_TRAILING);switch(a){case Echo.SplitPane.ORIENTATION_HORIZONTAL_LEADING_TRAILING:this._orientationTopLeft=this.component.getRenderLayoutDirection().isLeftToRight();this._orientationVertical=false;break;case Echo.SplitPane.ORIENTATION_HORIZONTAL_TRAILING_LEADING:this._orientationTopLeft=!this.component.getRenderLayoutDirection().isLeftToRight();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._autoPositioned=this.component.render("autoPositioned");this._requested=this.component.render("separatorPosition");var b=this._resizable?Echo.SplitPane.DEFAULT_SEPARATOR_SIZE_RESIZABLE:Echo.SplitPane.DEFAULT_SEPARATOR_SIZE_FIXED;var c=this.component.render(this._orientationVertical?"separatorHeight":"separatorWidth",b);this._separatorSize=Echo.Sync.Extent.toPixels(c,this._orientationVertical);if(this._separatorSize==null){this._separatorSize=b}this._separatorVisible=this._resizable||(this.component.render("separatorVisible",true)&&this._separatorSize>0);if(!this._separatorVisible){this._separatorSize=0}if(this._separatorSize>0){this._separatorColor=this.component.render("separatorColor",Echo.SplitPane.DEFAULT_SEPARATOR_COLOR);this._separatorRolloverColor=this.component.render("separatorRolloverColor")||Echo.Sync.Color.adjust(this._separatorColor,32,32,32);this._separatorImage=this.component.render(this._orientationVertical?"separatorVerticalImage":"separatorHorizontalImage");this._separatorRolloverImage=this.component.render(this._orientationVertical?"separatorVerticalRolloverImage":"separatorHorizontalRolloverImage")}},_overlayAdd:function(){if(this._overlay){return}this._overlay=document.createElement("div");this._overlay.style.cssText="position:absolute;z-index:32767;width:100%;height:100%;";Echo.Sync.FillImage.render(this.client.getResourceUrl("Echo","resource/Transparent.gif"),this._overlay);document.body.appendChild(this._overlay)},_overlayRemove:function(){if(!this._overlay){return}document.body.removeChild(this._overlay);this._overlay=null},_processSeparatorMouseDown:function(a){if(!this.client||!this.client.verifyInput(this.component)){return true}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);this._overlayAdd()},_processSeparatorMouseMove:function(a){var b=this._orientationVertical?a.clientY:a.clientX;this._rendered=this._getBoundedSeparatorPosition(this._orientationTopLeft?this._dragInitPosition+b-this._dragInitMouseOffset:this._dragInitPosition-b+this._dragInitMouseOffset);this._redraw(this._rendered)},_processSeparatorMouseUp:function(a){Core.Web.DOM.preventEventDefault(a);this._overlayRemove();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)},_processSeparatorRolloverEnter:function(a){if(!this.client||!this.client.verifyInput(this.component)){return true}if(this._separatorRolloverImage){Echo.Sync.FillImage.render(this._separatorRolloverImage,this._separatorDiv,0)}else{Echo.Sync.Color.render(this._separatorRolloverColor,this._separatorDiv,"backgroundColor")}},_processSeparatorRolloverExit:function(a){if(this._separatorRolloverImage){Echo.Sync.FillImage.renderClear(this._separatorImage,this._separatorDiv,0)}else{Echo.Sync.Color.render(this._separatorColor,this._separatorDiv,"backgroundColor")}},_redraw:function(b){var e=0;if(this.component.getComponentCount()>0){var d=this.component.getComponent(0).render("layoutData");e=this._getInsetsSizeAdjustment(b,d)}var a=this._orientationVertical?"height":"width";var c=this._orientationVertical?(this._orientationTopLeft?"top":"bottom"):(this._orientationTopLeft?"left":"right");if(this._paneDivs[0]){this._paneDivs[0].style[a]=(b-e)+"px"}if(this._paneDivs[1]){this._paneDivs[1].style[c]=(b+this._separatorSize)+"px"}if(this._separatorDiv){this._separatorDiv.style[c]=b+"px"}},_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._initialAutoSizeComplete=false;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.renderComponentDefaults(this.component,this._splitPaneDiv);if(this._separatorVisible){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._separatorColor,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._separatorImage,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._separatorImage,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);if(this._resizable){Core.Web.Event.add(this._separatorDiv,"mousedown",Core.method(this,this._processSeparatorMouseDown),false);Core.Web.Event.add(this._separatorDiv,"mouseover",Core.method(this,this._processSeparatorRolloverEnter),false);Core.Web.Event.add(this._separatorDiv,"mouseout",Core.method(this,this._processSeparatorRolloverExit),false)}},_renderAddChild:function(f,e,b){var d=this.component.indexOf(e);var a=document.createElement("div");this._paneDivs[b]=a;a.style.cssText="position: absolute; overflow: auto; z-index: 1;";var c=e.render("layoutData");if(c){Echo.Sync.Alignment.render(c.alignment,a,false,this.component);Echo.Sync.Color.render(c.background,a,"backgroundColor");Echo.Sync.FillImage.render(c.backgroundImage,a);if(!e.pane){Echo.Sync.Insets.render(c.insets,a,"padding");switch(c.overflow){case Echo.SplitPane.OVERFLOW_HIDDEN:a.style.overflow="hidden";break;case Echo.SplitPane.OVERFLOW_SCROLL:a.style.overflow="scroll";break}}}if(e.pane){a.style.overflow="hidden"}if(this._orientationVertical){a.style.left=0;a.style.right=0;if((this._orientationTopLeft&&b===0)||(!this._orientationTopLeft&&b==1)){a.style.top=0}else{a.style.bottom=0}}else{a.style.top="0";a.style.bottom="0";if((this._orientationTopLeft&&b===0)||(!this._orientationTopLeft&&b==1)){a.style.left=0}else{a.style.right=0}}Echo.Render.renderComponentAdd(f,e,a);this._splitPaneDiv.appendChild(a);if(this._childPanes[b]&&this._childPanes[b].component==e){this._childPanes[b].scrollRequired=true}else{this._childPanes[b]=new Echo.Sync.SplitPane.ChildPane(this,e)}},renderDisplay:function(){Core.Web.VirtualPosition.redraw(this._splitPaneDiv);Core.Web.VirtualPosition.redraw(this._paneDivs[0]);Core.Web.VirtualPosition.redraw(this._paneDivs[1]);this._size=null;if(this._childPanes[0]){this._childPanes[0].loadDisplayData()}if(this._childPanes[1]){this._childPanes[1].loadDisplayData()}var a=this._requested;if(a==null&&this._autoPositioned&&this._paneDivs[0]){if(this.component.children[0].peer.getPreferredSize){var c=this.component.children[0].peer.getPreferredSize(this._orientationVertical?Echo.Render.ComponentSync.SIZE_HEIGHT:Echo.Render.ComponentSync.SIZE_WIDTH);a=c?(this._orientationVertical?c.height:c.width):null}if(a==null&&this._orientationVertical&&!this.component.children[0].pane){this._paneDivs[0].style.height="";var d=new Core.Web.Measure.Bounds(this._paneDivs[0]);a=d.height}if(a!=null&&!this._initialAutoSizeComplete){this._initialAutoSizeComplete=true;var f=Core.method(this,function(){if(this.component){Echo.Render.renderComponentDisplay(this.component)}});Core.Web.Image.monitor(this._paneDivs[0],f)}}if(a==null){a=Echo.SplitPane.DEFAULT_SEPARATOR_POSITION}if(Echo.Sync.Extent.isPercent(a)){var b=this._orientationVertical?this._getSize().height:this._getSize().width;a=Math.round((parseInt(a,10)/100)*b)}else{a=Math.round(Echo.Sync.Extent.toPixels(a,!this._orientationVertical))}this._rendered=this._getBoundedSeparatorPosition(a);this._redraw(this._rendered);Core.Web.VirtualPosition.redraw(this._paneDivs[0]);Core.Web.VirtualPosition.redraw(this._paneDivs[1]);for(var e=0;e<this._childPanes.length;++e){if(this._childPanes[e]&&this._childPanes[e].scrollRequired&&this._paneDivs[e]){this._childPanes[e].loadScrollPositions(this._paneDivs[e]);this._childPanes[e].scrollRequired=false}}},renderDispose:function(b){this._overlayRemove();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{return}}this._childPanes[a]=null;Core.Web.DOM.removeNode(this._paneDivs[a]);this._paneDivs[a]=null},renderUpdate:function(g){var d=false,c;if(this._hasRelocatedChildren()){d=true}else{if(g.hasUpdatedProperties()||g.hasUpdatedLayoutDataChildren()){if(g.isUpdatedPropertySetIn({separatorPosition:true})){this._requested=this.component.render("separatorPosition")}else{d=true}}}if(!d&&(g.hasAddedChildren()||g.hasRemovedChildren())){var a=g.getRemovedChildren();if(a){for(c=0;c<a.length;++c){this._renderRemoveChild(g,a[c])}}var e=g.getAddedChildren();if(e){for(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}});Echo.Sync.TextComponent=Core.extend(Echo.Render.ComponentSync,{$abstract:true,$virtual:{getSupportedPartialProperties:function(){return["text","editable","selectionStart","selectionEnd"]},processBlur:function(a){this._focused=false;this._storeSelection();this._storeValue();return true},sanitizeInput:function(){var a=this.component.render("maximumLength",-1);if(a>=0){if(this.input.value&&this.input.value.length>a){this.input.value=this.input.value.substring(0,a)}}}},input:null,container:null,_focused:false,_lastProcessedValue:null,percentWidth:false,_selectionStart:0,_selectionEnd:0,_renderStyle:function(){if(this.component.isRenderEnabled()){Echo.Sync.renderComponentDefaults(this.component,this.input);Echo.Sync.Border.render(this.component.render("border"),this.input);Echo.Sync.FillImage.render(this.component.render("backgroundImage"),this.input)}else{Echo.Sync.LayoutDirection.render(this.component.getLayoutDirection(),this.input);Echo.Sync.Color.render(Echo.Sync.getEffectProperty(this.component,"foreground","disabledForeground",true),this.input,"color");Echo.Sync.Color.render(Echo.Sync.getEffectProperty(this.component,"background","disabledBackground",true),this.input,"backgroundColor");Echo.Sync.Border.render(Echo.Sync.getEffectProperty(this.component,"border","disabledBorder",true),this.input);Echo.Sync.Font.render(Echo.Sync.getEffectProperty(this.component,"font","disabledFont",true),this.input);Echo.Sync.FillImage.render(Echo.Sync.getEffectProperty(this.component,"backgroundImage","disabledBackgroundImage",true),this.input)}Echo.Sync.Alignment.render(this.component.render("alignment"),this.input,false,null);Echo.Sync.Insets.render(this.component.render("insets"),this.input,"padding");var b=this.component.render("width");this.percentWidth=Echo.Sync.Extent.isPercent(b);if(b){if(this.percentWidth){this.input.style.width="5px"}else{this.input.style.width=Echo.Sync.Extent.toCssValue(b,true)}}var a=this.component.render("height");if(a){this.input.style.height=Echo.Sync.Extent.toCssValue(a,false)}var c=this.component.render("toolTipText");if(c){this.input.title=c}},_addEventHandlers:function(){Core.Web.Event.add(this.input,"keydown",Core.method(this,this._processKeyDown),false);Core.Web.Event.add(this.input,"click",Core.method(this,this._processClick),false);Core.Web.Event.add(this.input,"focus",Core.method(this,this._processFocus),false);Core.Web.Event.add(this.input,"blur",Core.method(this,this.processBlur),false)},_adjustPercentWidth:function(a,d,b){var c=(100-Math.ceil(100*d/b))*a/100;return c>0?c:0},clientKeyDown:function(a){this._storeValue(a);if(this.client&&this.component.isActive()){if(!this.component.doKeyDown(a.keyCode)){Core.Web.DOM.preventEventDefault(a.domEvent)}}return true},clientKeyPress:function(a){this._storeValue(a);if(this.client&&this.component.isActive()){if(!this.component.doKeyPress(a.keyCode,a.charCode)){Core.Web.DOM.preventEventDefault(a.domEvent)}}return true},clientKeyUp:function(a){this._storeSelection();this._storeValue(a);return true},_processClick:function(a){if(!this.client||!this.component.isActive()){Core.Web.DOM.preventEventDefault(a);return true}this.client.application.setFocusedComponent(this.component);this._storeSelection();return false},_processFocus:function(a){this._focused=true;if(this.client){if(this.component.isActive()){this.client.application.setFocusedComponent(this.component)}else{this._resetFocus()}}return false},_processKeyDown:function(a){if(!this.component.isActive()){Core.Web.DOM.preventEventDefault(a)}return true},_processRestrictionsClear:function(){if(!this.client){return}if(!this.client.verifyInput(this.component)||this.input.readOnly){this.input.value=this.component.get("text");return}this.component.set("text",this.input.value,true)},_resetFocus:function(){var b=document.createElement("div");b.style.cssText="position:absolute;width:0;height:0;overflow:hidden;";var a=document.createElement("input");a.type="text";b.appendChild(a);document.body.appendChild(b);a.focus();document.body.removeChild(b);b=null;a=null;this.client.forceRedraw();Echo.Render.updateFocus(this.client)},renderAddToParent:function(a){if(Core.Web.Env.BROWSER_INTERNET_EXPLORER&&this.percentWidth){this.container=document.createElement("div");this.container.appendChild(this.input);a.appendChild(this.container)}else{a.appendChild(this.input)}},renderDisplay:function(){var c=this.component.render("width");if(c&&Echo.Sync.Extent.isPercent(c)&&this.input.parentNode.offsetWidth){var a=this.component.render("border");var b=Echo.Sync.Border.getPixelSize(this.component.render("border","2px solid #000000"),"left")+Echo.Sync.Border.getPixelSize(this.component.render("border","2px solid #000000"),"right")+1;if(Core.Web.Env.BROWSER_INTERNET_EXPLORER){if(this.container){this.container.style.width=this._adjustPercentWidth(100,Core.Web.Measure.SCROLL_WIDTH,this.input.parentNode.offsetWidth)+"%"}else{b+=Core.Web.Measure.SCROLL_WIDTH}}this.input.style.width=this._adjustPercentWidth(parseInt(c,10),b,this.input.parentNode.offsetWidth)+"%"}},renderDispose:function(a){Core.Web.Event.removeAll(this.input);this._focused=false;this.input=null;this.container=null},renderFocus:function(){if(this._focused){return}this._focused=true;Core.Web.DOM.focusElement(this.input)},renderUpdate:function(g){var c=!Core.Arrays.containsAll(this.getSupportedPartialProperties(),g.getUpdatedPropertyNames(),true);if(c){var a=this.container?this.container:this.input;var f=a.parentNode;this.renderDispose(g);f.removeChild(a);this.renderAdd(g,f)}else{if(g.hasUpdatedProperties()){var e=g.getUpdatedProperty("text");if(e){var d=e.newValue==null?"":e.newValue;if(d!=this._lastProcessedValue){this.input.value=d;this._lastProcessedValue=d}}var b=g.getUpdatedProperty("editable");if(b!=null){this.input.readOnly=!b.newValue}}}return false},_storeSelection:function(){if(!this.component){return}var a,b;if(Core.Web.Env.BROWSER_INTERNET_EXPLORER){a=document.selection.createRange();if(a.parentElement()!=this.input){return}b=a.duplicate();if(this.input.nodeName.toLowerCase()=="textarea"){b.moveToElementText(this.input)}else{b.expand("textedit")}b.setEndPoint("EndToEnd",a);this._selectionStart=b.text.length-a.text.length;this._selectionEnd=this._selectionStart+a.text.length}else{this._selectionStart=this.input.selectionStart;this._selectionEnd=this.input.selectionEnd}this.component.set("selectionStart",this._selectionStart,true);this.component.set("selectionEnd",this._selectionEnd,true)},_storeValue:function(a){if(!this.client||!this.component.isActive()){if(a){Core.Web.DOM.preventEventDefault(a)}return}this.sanitizeInput();if(!this.client.verifyInput(this.component)){this.client.registerRestrictionListener(this.component,Core.method(this,this._processRestrictionsClear));return}this.component.set("text",this.input.value,true);this._lastProcessedValue=this.input.value;if(a&&a.keyCode==13&&a.type=="keydown"){this.component.doAction()}}});Echo.Sync.TextArea=Core.extend(Echo.Sync.TextComponent,{$load:function(){Echo.Render.registerPeer("TextArea",this)},renderAdd:function(b,a){this.input=document.createElement("textarea");this.input.id=this.component.renderId;if(!this.component.render("editable",true)){this.input.readOnly=true}this._renderStyle(this.input);this.input.style.overflow="auto";this._addEventHandlers(this.input);if(this.component.get("text")){this.input.value=this.component.get("text")}this.renderAddToParent(a)}});Echo.Sync.TextField=Core.extend(Echo.Sync.TextComponent,{$load:function(){Echo.Render.registerPeer("TextField",this)},$virtual:{_type:"text"},getFocusFlags:function(){return Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_UP|Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_DOWN},renderAdd:function(c,a){this.input=document.createElement("input");this.input.id=this.component.renderId;if(!this.component.render("editable",true)){this.input.readOnly=true}this.input.type=this._type;var b=this.component.render("maximumLength",-1);if(b>=0){this.input.maxLength=b}this._renderStyle(this.input);this._addEventHandlers(this.input);if(this.component.get("text")){this.input.value=this.component.get("text")}this.renderAddToParent(a)},sanitizeInput:function(){}});Echo.Sync.PasswordField=Core.extend(Echo.Sync.TextField,{$load:function(){Echo.Render.registerPeer("PasswordField",this)},_type:"password"});Echo.Sync.ToggleButton=Core.extend(Echo.Sync.Button,{$load:function(){Echo.Render.registerPeer("ToggleButton",this)},$abstract:{inputType:null},_selected:false,_stateElement:null,doAction:function(){this.setSelected(!this._selected);Echo.Sync.Button.prototype.doAction.call(this)},getStateIcon:function(b,c){var a;if(this._selected){a=Echo.Sync.getEffectProperty(this.component,"selectedStateIcon","disabledSelectedStateIcon",!this.enabled);if(a){if(c){a=this.component.render("pressedSelectedStateIcon",a)}else{if(b){a=this.component.render("rolloverSelectedStateIcon",a)}}}}if(!a){a=Echo.Sync.getEffectProperty(this.component,"stateIcon","disabledStateIcon",!this.enabled);if(a){if(c){a=this.component.render("pressedStateIcon",a)}else{if(b){a=this.component.render("rolloverStateIcon",a)}}}}return a},_processStateChange:function(a){this._updateStateElement()},renderAdd:function(b,a){this._selected=this.component.render("selected");Echo.Sync.Button.prototype.renderAdd.call(this,b,a)},renderContent:function(){var h=this.component.render("text");var d=this.component.render("icon");var c,e,b;var a=(h!=null?1:0)+(d?1:0)+1;if(a==1){if(h!=null){this.renderButtonText(this.div,h)}else{if(d){this.iconImg=this.renderButtonIcon(this.div,d)}else{this._stateElement=this._renderButtonState(this.div)}}}else{if(a==2){c=Echo.Sync.TriCellTable.getInvertedOrientation(this.component,"statePosition","leading");e=this.component.render("stateMargin",Echo.Sync.Button._defaultIconTextMargin);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{this._stateElement=this._renderButtonState(b.tdElements[1])}}else{this.iconImg=this.renderButtonIcon(b.tdElements[0],d);this._stateElement=this._renderButtonState(b.tdElements[1])}this.div.appendChild(b.tableElement)}else{if(a==3){c=Echo.Sync.TriCellTable.getOrientation(this.component,"textPosition");e=this.component.render("iconTextMargin",Echo.Sync.Button._defaultIconTextMargin);var f=Echo.Sync.TriCellTable.getInvertedOrientation(this.component,"statePosition","leading");var g=this.component.render("stateMargin",Echo.Sync.Button._defaultIconTextMargin);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);this._stateElement=this._renderButtonState(b.tdElements[2]);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}},_renderButtonState:function(a){var c=this.getStateIcon();var b;if(c){b=document.createElement("img");Echo.Sync.ImageReference.renderImg(c,b)}else{b=document.createElement("input");b.type=this.inputType;if(this.inputType=="radio"){b.name="__echo_"+Echo.Sync.RadioButton._nextNameId++}b.defaultChecked=this._selected?true:false;Core.Web.Event.add(b,"change",Core.method(this,this._processStateChange),false);Core.Web.Event.add(this.div,"click",Core.method(this,this._processStateChange),false)}a.appendChild(b);var d=this.component.render("stateAlignment");if(d){Echo.Sync.Alignment.render(d,a,true,this.component)}return b},setPressedState:function(a){Echo.Sync.Button.prototype.setPressedState.call(this,a);var c=this.getStateIcon(false,a);if(c){var b=Echo.Sync.ImageReference.getUrl(c);if(this._stateElement.src!=b){this._stateElement.src=b}}},setRolloverState:function(a){Echo.Sync.Button.prototype.setRolloverState.call(this,a);var c=this.getStateIcon(a,false);if(c){var b=Echo.Sync.ImageReference.getUrl(c);if(this._stateElement.src!=b){this._stateElement.src=b}}},setSelected:function(a){if(this._selected==a){return}this._selected=a;this.component.set("selected",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.CheckBox=Core.extend(Echo.Sync.ToggleButton,{$load:function(){Echo.Render.registerPeer("CheckBox",this)},inputType:"checkbox"});Echo.Sync.RadioButton=Core.extend(Echo.Sync.ToggleButton,{$static:{_nextNameId:0,_groups:new Core.Arrays.LargeMap()},$load:function(){Echo.Render.registerPeer("RadioButton",this)},inputType:"radio",_group:null,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)},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}}});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.WindowPane=Core.extend(Echo.Render.ComponentSync,{$static:{CURSORS:["n-resize","ne-resize","e-resize","se-resize","s-resize","sw-resize","w-resize","nw-resize"],PARTIAL_PROPERTIES:{background:true,backgroundImage:true,border:true,closable:true,closeIcon:true,closeIconInsets:true,controlsInsets:true,font:true,foreground:true,height:true,icon:true,iconInsets:true,insets:true,maximizeEnabled:true,maximizeIcon:true,maximumHeight:true,maximumWidth:true,minimizeEnabled:true,minimizeIcon:true,minimumHeight:true,minimumWidth:true,movable:true,positionX:true,positionY:true,resizable:true,title:true,titleBackground:true,titleBackgroundImage:true,titleFont:true,titleForeground:true,titleHeight:true,titleInsets:true,width:true},NON_RENDERED_PROPERTIES:{zIndex:true},PARTIAL_PROPERTIES_POSITION_SIZE:{positionX:true,positionY:true,width:true,height:true}},$load:function(){Echo.Render.registerPeer("WindowPane",this)},_initialAutoSizeComplete:false,_requested:null,_rendered:null,_dragInit:null,_dragOrigin:null,_resizeIncrement:null,_containerSize:null,_processBorderMouseMoveRef:null,_processBorderMouseUpRef:null,_processTitleBarMouseMoveRef:null,_processTitleBarMouseUpRef:null,_controlIcons:null,_overlay:null,$construct:function(){this._processBorderMouseMoveRef=Core.method(this,this._processBorderMouseMove);this._processBorderMouseUpRef=Core.method(this,this._processBorderMouseUp);this._processTitleBarMouseMoveRef=Core.method(this,this._processTitleBarMouseMove);this._processTitleBarMouseUpRef=Core.method(this,this._processTitleBarMouseUp)},_loadPositionAndSize:function(){this._requested={x:this.component.render("positionX","50%"),y:this.component.render("positionY","50%"),contentWidth:this.component.render("contentWidth"),contentHeight:this.component.render("contentHeight")};this._requested.width=this.component.render("width",this._requested.contentWidth?null:Echo.WindowPane.DEFAULT_WIDTH);this._requested.height=this.component.render("height")},_loadContainerSize:function(){this._containerSize=this.component.parent.peer.getSize()},_overlayAdd:function(){if(this._overlay){return}this._overlay=document.createElement("div");this._overlay.style.cssText="position:absolute;z-index:32767;width:100%;height:100%;";Echo.Sync.FillImage.render(this.client.getResourceUrl("Echo","resource/Transparent.gif"),this._overlay);document.body.appendChild(this._overlay)},_overlayRemove:function(){if(!this._overlay){return}document.body.removeChild(this._overlay);this._overlay=null},_processBorderMouseDown:function(a){if(!this.client||!this.client.verifyInput(this.component)){return true}Core.Web.dragInProgress=true;Core.Web.DOM.preventEventDefault(a);this._overlayAdd();this._loadContainerSize();this._dragInit={x:this._rendered.x,y:this._rendered.y,width:this._rendered.width,height:this._rendered.height};this._dragOrigin={x:a.clientX,y:a.clientY};switch(a.target){case this._borderDivs[0]:this._resizeIncrement={x:0,y:-1};break;case this._borderDivs[1]:this._resizeIncrement={x:1,y:-1};break;case this._borderDivs[2]:this._resizeIncrement={x:1,y:0};break;case this._borderDivs[3]:this._resizeIncrement={x:1,y:1};break;case this._borderDivs[4]:this._resizeIncrement={x:0,y:1};break;case this._borderDivs[5]:this._resizeIncrement={x:-1,y:1};break;case this._borderDivs[6]:this._resizeIncrement={x:-1,y:0};break;case this._borderDivs[7]:this._resizeIncrement={x:-1,y:-1};break}Core.Web.Event.add(document.body,"mousemove",this._processBorderMouseMoveRef,true);Core.Web.Event.add(document.body,"mouseup",this._processBorderMouseUpRef,true)},_processBorderMouseMove:function(a){this._setBounds({x:this._resizeIncrement.x==-1?this._dragInit.x+a.clientX-this._dragOrigin.x:null,y:this._resizeIncrement.y==-1?this._dragInit.y+a.clientY-this._dragOrigin.y:null,width:this._dragInit.width+(this._resizeIncrement.x*(a.clientX-this._dragOrigin.x)),height:this._dragInit.height+(this._resizeIncrement.y*(a.clientY-this._dragOrigin.y))},true);Echo.Sync.FillImageBorder.renderContainerDisplay(this._div)},_processBorderMouseUp:function(a){Core.Web.DOM.preventEventDefault(a);Core.Web.dragInProgress=false;this._overlayRemove();this._removeBorderListeners();this.component.set("positionX",this._rendered.x);this.component.set("positionY",this._rendered.y);this.component.set("width",this._rendered.width);this.component.set("height",this._rendered.height);this._requested={x:this._rendered.x,y:this._rendered.y,width:this._rendered.width,height:this._rendered.height};Echo.Sync.FillImageBorder.renderContainerDisplay(this._div);Core.Web.VirtualPosition.redraw(this._contentDiv);Core.Web.VirtualPosition.redraw(this._maskDiv);Echo.Render.notifyResize(this.component)},_processControlClick:function(a){if(!this.client||!this.client.verifyInput(this.component)){return true}switch(a.registeredTarget._controlData.name){case"close":this.component.userClose();break;case"maximize":this.component.userMaximize();Echo.Render.processUpdates(this.client);break;case"minimize":this.component.userMinimize();break}},_processControlRolloverEnter:function(a){if(!this.client||!this.client.verifyInput(this.component)){return true}Echo.Sync.ImageReference.renderImg(a.registeredTarget._controlData.rolloverIcon,a.registeredTarget.firstChild)},_processControlRolloverExit:function(a){Echo.Sync.ImageReference.renderImg(a.registeredTarget._controlData.icon,a.registeredTarget.firstChild)},clientKeyDown:function(a){if(a.keyCode==27){if(this.component.render("closable",true)){this.component.userClose();Core.Web.DOM.preventEventDefault(a.domEvent);return false}}return true},_processFocusClick:function(a){if(!this.client||!this.client.verifyInput(this.component)){return true}this.component.parent.peer.raise(this.component);return true},_processTitleBarMouseDown:function(b){if(!this.client||!this.client.verifyInput(this.component)){return true}var a=b.target;while(a!=b.registeredTarget){if(a._controlData){return}a=a.parentNode}this.component.parent.peer.raise(this.component);Core.Web.dragInProgress=true;Core.Web.DOM.preventEventDefault(b);this._overlayAdd();this._loadContainerSize();this._dragInit={x:this._rendered.x,y:this._rendered.y};this._dragOrigin={x:b.clientX,y:b.clientY};Core.Web.Event.add(document.body,"mousemove",this._processTitleBarMouseMoveRef,true);Core.Web.Event.add(document.body,"mouseup",this._processTitleBarMouseUpRef,true)},_processTitleBarMouseMove:function(a){this._setBounds({x:this._dragInit.x+a.clientX-this._dragOrigin.x,y:this._dragInit.y+a.clientY-this._dragOrigin.y},true)},_processTitleBarMouseUp:function(a){Core.Web.dragInProgress=false;this._overlayRemove();this._removeTitleBarListeners();this.component.set("positionX",this._rendered.x);this.component.set("positionY",this._rendered.y);this._requested.x=this._rendered.x;this._requested.y=this._rendered.y},_redraw:function(){if(this._rendered.width<=0||this._rendered.height<=0){return}var b=this._rendered.width-this._borderInsets.left-this._borderInsets.right;var a=this._rendered.height-this._borderInsets.top-this._borderInsets.bottom;this._div.style.left=this._rendered.x+"px";this._div.style.top=this._rendered.y+"px";this._div.style.width=this._rendered.width+"px";this._div.style.height=this._rendered.height+"px";this._titleBarDiv.style.width=(this._rendered.width-this._contentInsets.left-this._contentInsets.right)+"px";Echo.Sync.FillImageBorder.renderContainerDisplay(this._div);Core.Web.VirtualPosition.redraw(this._contentDiv);Core.Web.VirtualPosition.redraw(this._maskDiv)},_removeBorderListeners:function(){Core.Web.Event.remove(document.body,"mousemove",this._processBorderMouseMoveRef,true);Core.Web.Event.remove(document.body,"mouseup",this._processBorderMouseUpRef,true)},_removeTitleBarListeners:function(){Core.Web.Event.remove(document.body,"mousemove",this._processTitleBarMouseMoveRef,true);Core.Web.Event.remove(document.body,"mouseup",this._processTitleBarMouseUpRef,true)},renderAdd:function(d,b){this._initialAutoSizeComplete=false;this._rtl=!this.component.getRenderLayoutDirection().isLeftToRight();this._contentDiv=document.createElement("div");var c=this.component.getComponentCount();if(c==1){Echo.Render.renderComponentAdd(d,this.component.getComponent(0),this._contentDiv)}else{if(c>1){throw new Error("Too many children: "+c)}}if(Core.Web.Env.QUIRK_IE_SELECT_Z_INDEX){this._maskDiv=document.createElement("div");this._maskDiv.style.cssText="filter:alpha(opacity=0);z-index:1;position:absolute;left:0,right:0,top:0,bottom:0,borderWidth:0;";var a=document.createElement("iframe");a.style.cssText="width:100%;height:100%;";a.src=this.client.getResourceUrl("Echo","resource/Blank.html");this._maskDiv.appendChild(a)}Echo.Sync.LayoutDirection.render(this.component.getLayoutDirection(),this._div);this._renderAddFrame(b)},_renderAddFrame:function(f){this._loadPositionAndSize();this._div=document.createElement("div");this._div.id=this.component.renderId;this._div.tabIndex="0";this._minimumWidth=Echo.Sync.Extent.toPixels(this.component.render("minimumWidth",Echo.WindowPane.DEFAULT_MINIMUM_WIDTH),true);this._minimumHeight=Echo.Sync.Extent.toPixels(this.component.render("minimumHeight",Echo.WindowPane.DEFAULT_MINIMUM_HEIGHT),false);this._maximumWidth=Echo.Sync.Extent.toPixels(this.component.render("maximumWidth"),true);this._maximumHeight=Echo.Sync.Extent.toPixels(this.component.render("maximumHeight"),false);this._resizable=this.component.render("resizable",true);var o=this.component.render("border",Echo.WindowPane.DEFAULT_BORDER);this._borderInsets=Echo.Sync.Insets.toPixels(o.borderInsets);this._contentInsets=Echo.Sync.Insets.toPixels(o.contentInsets);var e=this.component.render("movable",true);var g=this.component.render("closable",true);var h=this.component.render("maximizeEnabled",false);var c=this.component.render("minimizeEnabled",false);var d=g||h||c;var b=this.component.render("ieAlphaRenderBorder")?Echo.Sync.FillImage.FLAG_ENABLE_IE_PNG_ALPHA_FILTER:0;this._div=Echo.Sync.FillImageBorder.renderContainer(o,{absolute:true});this._div.style.outlineStyle="none";this._div.style.overflow="hidden";this._div.style.zIndex=1;this._borderDivs=Echo.Sync.FillImageBorder.getBorder(this._div);var a=this._resizable?Core.method(this,this._processBorderMouseDown):null;for(var q=0;q<8;++q){if(this._borderDivs[q]){if(this._resizable){this._borderDivs[q].style.zIndex=2;this._borderDivs[q].style.cursor=Echo.Sync.WindowPane.CURSORS[q];Core.Web.Event.add(this._borderDivs[q],"mousedown",a,true)}}}this._titleBarDiv=document.createElement("div");this._titleBarDiv.style.position="absolute";this._titleBarDiv.style.zIndex=3;var r=this.component.render("icon");if(r){var j=document.createElement("div");j.style[Core.Web.Env.CSS_FLOAT]=this._rtl?"right":"left";Echo.Sync.Insets.render(this.component.render("iconInsets"),j,"padding");this._titleBarDiv.appendChild(j);var t=document.createElement("img");Echo.Sync.ImageReference.renderImg(r,t);j.appendChild(t)}var s=this.component.render("title");var k=document.createElement("div");if(r){k.style[Core.Web.Env.CSS_FLOAT]=this._rtl?"right":"left"}k.style.whiteSpace="nowrap";Echo.Sync.Font.render(this.component.render("titleFont"),k);Echo.Sync.Insets.render(this.component.render("titleInsets",Echo.WindowPane.DEFAULT_TITLE_INSETS),k,"padding");k.appendChild(document.createTextNode(s?s:"\u00a0"));this._titleBarDiv.appendChild(k);var n=this.component.render("titleHeight");if(n){this._titleBarHeight=Echo.Sync.Extent.toPixels(n)}if(!n){var m=new Core.Web.Measure.Bounds(this._titleBarDiv);if(m.height){this._titleBarHeight=m.height}else{this._titleBarHeight=Echo.Sync.Extent.toPixels(Echo.WindowPane.DEFAULT_TITLE_HEIGHT)}}this._titleBarDiv.style.top=this._contentInsets.top+"px";this._titleBarDiv.style.left=this._contentInsets.left+"px";this._titleBarDiv.style.height=this._titleBarHeight+"px";this._titleBarDiv.style.overflow="hidden";if(e){this._titleBarDiv.style.cursor="move";Core.Web.Event.add(this._titleBarDiv,"mousedown",Core.method(this,this._processTitleBarMouseDown),true)}Echo.Sync.Color.render(this.component.render("titleForeground"),this._titleBarDiv,"color");var p=this.component.render("titleBackground");var l=this.component.render("titleBackgroundImage");if(p){this._titleBarDiv.style.backgroundColor=p}if(l){Echo.Sync.FillImage.render(l,this._titleBarDiv)}if(!p&&!l){this._titleBarDiv.style.backgroundColor=Echo.WindowPane.DEFAULT_TITLE_BACKGROUND}if(d){this._controlDiv=document.createElement("div");this._controlDiv.style.cssText="position:absolute;top:0;";this._controlDiv.style[this._rtl?"left":"right"]=0;Echo.Sync.Insets.render(this.component.render("controlsInsets",Echo.WindowPane.DEFAULT_CONTROLS_INSETS),this._controlDiv,"margin");this._titleBarDiv.appendChild(this._controlDiv);if(g){this._renderControlIcon("close",this.client.getResourceUrl("Echo","resource/WindowPaneClose.gif"),"[X]")}if(h){this._renderControlIcon("maximize",this.client.getResourceUrl("Echo","resource/WindowPaneMaximize.gif"),"[+]")}if(c){this._renderControlIcon("minimize",this.client.getResourceUrl("Echo","resource/WindowPaneMinimize.gif"),"[-]")}}this._div.appendChild(this._titleBarDiv);this._contentDiv.style.cssText="position:absolute;z-index:2;top:"+(this._contentInsets.top+this._titleBarHeight)+"px;bottom:"+this._contentInsets.bottom+"px;left:"+this._contentInsets.left+"px;right:"+this._contentInsets.right+"px;overflow:"+((this.component.children.length===0||this.component.children[0].pane)?"hidden;":"auto;");Echo.Sync.Font.renderClear(this.component.render("font"),this._contentDiv);if(this.component.children.length>0&&!this.component.children[0].pane){Echo.Sync.Insets.render(this.component.render("insets"),this._contentDiv,"padding")}Echo.Sync.Color.render(this.component.render("background",Echo.WindowPane.DEFAULT_BACKGROUND),this._contentDiv,"backgroundColor");Echo.Sync.Color.render(this.component.render("foreground",Echo.WindowPane.DEFAULT_FOREGROUND),this._contentDiv,"color");Echo.Sync.FillImage.render(this.component.render("backgroundImage"),this._contentDiv);this._div.appendChild(this._contentDiv);if(Core.Web.Env.QUIRK_IE_SELECT_Z_INDEX){this._div.appendChild(this._maskDiv)}Core.Web.Event.add(this._div,"click",Core.method(this,this._processFocusClick),true);f.appendChild(this._div)},_renderControlIcon:function(d,h,b){var a=document.createElement("div"),g=this.component.render(d+"Icon",h),f=this.component.render(d+"RolloverIcon");var e=Echo.Sync.Extent.toCssValue(this.component.render("controlsSpacing",Echo.WindowPane.DEFAULT_CONTROLS_SPACING));a.style.cssText=this._rtl?("float:left;cursor:pointer;margin-right:"+e):("float:right;cursor:pointer;margin-left:"+e);Echo.Sync.Insets.render(this.component.render(d+"Insets"),a,"padding");if(g){var c=document.createElement("img");Echo.Sync.ImageReference.renderImg(g,c);a.appendChild(c);if(f){Core.Web.Event.add(a,"mouseover",Core.method(this,this._processControlRolloverEnter),false);Core.Web.Event.add(a,"mouseout",Core.method(this,this._processControlRolloverExit),false)}}else{a.appendChild(document.createTextNode(b))}Core.Web.Event.add(a,"click",Core.method(this,this._processControlClick),false);this._controlDiv.appendChild(a);if(this._controlIcons==null){this._controlIcons=[]}this._controlIcons.push(a);a._controlData={name:d,icon:g,rolloverIcon:f}},renderDisplay:function(){this._loadContainerSize();this._setBounds(this._requested,false);Core.Web.VirtualPosition.redraw(this._contentDiv);Core.Web.VirtualPosition.redraw(this._maskDiv);if(!this._initialAutoSizeComplete){this._initialAutoSizeComplete=true;var a=Core.method(this,function(){if(this.component){Echo.Render.renderComponentDisplay(this.component)}});Core.Web.Image.monitor(this._contentDiv,a)}},renderDispose:function(a){this._overlayRemove();this._renderDisposeFrame();this._maskDiv=null;this._contentDiv=null},_renderDisposeFrame:function(){var a;Core.Web.Event.removeAll(this._div);for(a=0;a<8;++a){if(this._borderDivs[a]){Core.Web.Event.removeAll(this._borderDivs[a])}}this._borderDivs=null;if(this._controlIcons!=null){for(a=0;a<this._controlIcons.length;++a){Core.Web.Event.removeAll(this._controlIcons[a])}this._controlIcons=null}Core.Web.Event.removeAll(this._titleBarDiv);this._titleBarDiv=null;this._div=null},renderFocus:function(){Core.Web.DOM.focusElement(this._div)},renderUpdate:function(c){if(c.hasAddedChildren()||c.hasRemovedChildren()){}else{if(c.isUpdatedPropertySetIn(Echo.Sync.WindowPane.NON_RENDERED_PROPERTIES)){return false}else{if(c.isUpdatedPropertySetIn(Echo.Sync.WindowPane.PARTIAL_PROPERTIES_POSITION_SIZE)){this._loadPositionAndSize();return false}else{if(c.isUpdatedPropertySetIn(Echo.Sync.WindowPane.PARTIAL_PROPERTIES)){this._renderUpdateFrame();return false}}}}var a=this._div;var b=a.parentNode;Echo.Render.renderComponentDispose(c,c.parent);b.removeChild(a);this.renderAdd(c,b);return true},_renderUpdateFrame:function(){var a=this._div;var b=a.parentNode;this._renderDisposeFrame();b.removeChild(a);this._renderAddFrame(b)},_setBounds:function(h,f){var b={},i=false;if(f){if(h.x!=null&&h.x<0){h.x=0}if(h.y!=null&&h.y<0){h.y=0}}if(h.width!=null){b.width=Math.round(Echo.Sync.Extent.isPercent(h.width)?(parseInt(h.width,10)*this._containerSize.width/100):Echo.Sync.Extent.toPixels(h.width,true))}else{if(h.contentWidth!=null){b.contentWidth=Math.round(Echo.Sync.Extent.isPercent(h.contentWidth)?(parseInt(h.contentWidth,10)*this._containerSize.width/100):Echo.Sync.Extent.toPixels(h.contentWidth,true));b.width=this._contentInsets.left+this._contentInsets.right+b.contentWidth}}if(h.height!=null){b.height=Math.round(Echo.Sync.Extent.isPercent(h.height)?(parseInt(h.height,10)*this._containerSize.height/100):Echo.Sync.Extent.toPixels(h.height,false))}else{if(h.contentHeight!=null){b.contentHeight=Math.round(Echo.Sync.Extent.isPercent(h.contentHeight)?(parseInt(h.contentHeight,10)*this._containerSize.height/100):Echo.Sync.Extent.toPixels(h.contentHeight,false));b.height=this._contentInsets.top+this._contentInsets.bottom+this._titleBarHeight+b.contentHeight}else{if(!f){i=true;if(this.component.children[0]){var a=b.contentWidth?b.contentWidth:b.width-(this._contentInsets.left+this._contentInsets.right);var d=this._contentDiv.style.cssText;if(this.component.children[0].peer.getPreferredSize){this._contentDiv.style.cssText="position:absolute;width:"+a+"px;height:"+this._containerSize.height+"px";var c=this.component.children[0].peer.getPreferredSize(Echo.Render.ComponentSync.SIZE_HEIGHT);if(c.height){b.height=this._contentInsets.top+this._contentInsets.bottom+this._titleBarHeight+c.height}this._contentDiv.style.cssText=d}if(!b.height&&!this.component.children[0].pane){var e=Echo.Sync.Insets.toPixels(this.component.render("insets"));this._contentDiv.style.position="static";this._contentDiv.style.width=(a-e.left-e.right)+"px";this._contentDiv.style.height="";this._contentDiv.style.padding="";var g=new Core.Web.Measure.Bounds(this._contentDiv).height;if(g){b.height=this._contentInsets.top+this._contentInsets.bottom+this._titleBarHeight+g+e.top+e.bottom}this._contentDiv.style.cssText=d}}if(!b.height){b.height=Echo.Sync.Extent.toPixels(Echo.WindowPane.DEFAULT_HEIGHT,false)}}}}if(h.x!=null){if(Echo.Sync.Extent.isPercent(h.x)){b.x=Math.round((this._containerSize.width-b.width)*(parseInt(h.x,10)/100));if(b.x<0){b.x=0}}else{b.x=Math.round(Echo.Sync.Extent.toPixels(h.x,true));if(b.x<0){b.x+=this._containerSize.width-b.width}}}if(h.y!=null){if(Echo.Sync.Extent.isPercent(h.y)){b.y=Math.round((this._containerSize.height-b.height)*(parseInt(h.y,10)/100));if(b.y<0){b.y=0}}else{b.y=Math.round(Echo.Sync.Extent.toPixels(h.y,false));if(b.y<0){b.y+=this._containerSize.height-b.height}}}if(this._rendered==null){this._rendered={}}if(b.width!=null){if(this._resizable&&b.width>this._containerSize.width){b.width=this._containerSize.width}if(this._maximumWidth&&b.width>this._maximumWidth){if(f&&b.x!=null){b.x+=(b.width-this._maximumWidth)}b.width=this._maximumWidth}if(b.width<this._minimumWidth){if(f&&b.x!=null){b.x+=(b.width-this._minimumWidth)}b.width=this._minimumWidth}this._rendered.width=Math.round(b.width)}if(b.height!=null){if((i||this._resizable)&&b.height>this._containerSize.height){b.height=this._containerSize.height}if(this._maximumHeight&&b.height>this._maximumHeight){if(f&&b.y!=null){b.y+=(b.height-this._maximumHeight)}b.height=this._maximumHeight}if(b.height<this._minimumHeight){if(f&&b.y!=null){b.y+=(b.height-this._minimumHeight)}b.height=this._minimumHeight}this._rendered.height=Math.round(b.height)}if(b.x!=null){if(this._containerSize.width>0&&b.x>this._containerSize.width-this._rendered.width){b.x=this._containerSize.width-this._rendered.width}if(b.x<0){b.x=0}this._rendered.x=Math.round(b.x)}if(b.y!=null){if(this._containerSize.height>0&&b.y>this._containerSize.height-this._rendered.height){b.y=this._containerSize.height-this._rendered.height}if(b.y<0){b.y=0}this._rendered.y=Math.round(b.y)}this._redraw()}});Extras={uniqueId:0};Extras.Serial={PROPERTY_TYPE_PREFIX:"Extras.Serial."};Extras.Sync={};Extras.Sync.Animation=Core.extend({stepIndex:0,startTime:null,endTime:null,_listenerList:null,_runnable:null,$virtual:{runTime:0,sleepInterval:10},$abstract:{init:function(){},complete:function(a){},step:function(a){}},_doStep:function(){var a=new Date().getTime();if(a<this.endTime){if(this.stepIndex===0){this.init()}else{this.step((a-this.startTime)/this.runTime)}++this.stepIndex;Core.Web.Scheduler.add(this._runnable)}else{this.complete(false);if(this._completeMethod){this._completeMethod(false)}}},abort:function(){Core.Web.Scheduler.remove(this._runnable);this.complete(true);if(this._completeMethod){this._completeMethod(true)}},start:function(a){this._runnable=new Core.Web.Scheduler.MethodRunnable(Core.method(this,this._doStep),this.sleepInterval,false);this.startTime=new Date().getTime();this.endTime=this.startTime+this.runTime;this._completeMethod=a;Core.Web.Scheduler.add(this._runnable)}});Extras.AccordionPane=Core.extend(Echo.Component,{$static:{DEFAULT_ANIMATION_TIME:350},$load:function(){Echo.ComponentFactory.registerType("Extras.AccordionPane",this)},componentType:"Extras.AccordionPane",pane:true,$construct:function(a){Echo.Component.call(this,a);this.addListener("property",Core.method(this,this._tabChangeListener))},doTabSelect:function(a){var b=this.application.getComponentByRenderId(a);if(!b||b.parent!=this){throw new Error("doTabSelect(): Invalid tab: "+a)}this.set("activeTabId",a);this.fireEvent({type:"tabSelect",source:this,tab:b,data:a})},_tabChangeListener:function(b){var a;switch(b.propertyName){case"activeTabId":if(this.application){for(a=0;a<this.children.length;++a){if(this.children[a].renderId==b.newValue){if(this.get("activeTabIndex")!=a){this.set("activeTabIndex",a)}return}}}break;case"activeTabIndex":a=parseInt(b.newValue,10);if(this.application&&this.children[a]&&this.get("activeTabId")!=this.children[a].renderId){this.set("activeTabId",this.children[a].renderId)}break}}});Extras.Sync.AccordionPane=Core.extend(Echo.Render.ComponentSync,{$static:{_DEFAULTS:{tabBackground:"#cfcfcf",tabBorder:"1px outset #cfcfcf",tabForeground:"#000000",tabInsets:"2px 5px",tabContentInsets:0}},$load:function(){Echo.Render.registerPeer("Extras.AccordionPane",this)},_animationTime:0,div:null,_activeTabId:null,_newImagesLoaded:null,_pendingRenderDisplay:false,rotation:null,tabs:null,resetOverflowForAnimation:false,_tabSelectListenerRef:null,imageMonitorRef:null,$construct:function(){this.tabs=[];this.resetOverflowForAnimation=Core.Web.Env.BROWSER_MOZILLA||Core.Web.Env.BROWSER_INTERNET_EXPLORER;this._tabSelectListenerRef=Core.method(this,this._tabSelectListener);this.imageMonitorRef=Core.method(this,this._imageMonitor)},_getTabById:function(a){for(var b=0;b<this.tabs.length;++b){var c=this.tabs[b];if(c.childComponent.renderId==a){return c}}return null},getTabHeight:function(c,d){if(d==null||d<c){throw new Error("Invalid indices: begin="+c+",end="+d)}else{var b=0;for(var a=c;a<d;++a){b+=this.tabs[a].tabDiv.offsetHeight}return b}},_imageMonitor:function(){if(this._newImagesLoaded){return}this._newImagesLoaded=true;Core.Web.Scheduler.run(Core.method(this,function(){if(this.client&&!this._pendingRenderDisplay){this.redrawTabs(false)}this._newImagesLoaded=false}))},redrawTabs:function(a){if(this.rotation){this.rotation.abort()}if(this._activeTabId==null||this._getTabById(this._activeTabId)==null){if(this.tabs.length>0){this._activeTabId=this.tabs[0].childComponent.renderId}else{this._activeTabId=null}}var b=false;for(var c=0;c<this.tabs.length;++c){if(b){this.tabs[c].tabDiv.style.top="";this.tabs[c].tabDiv.style.bottom=this.getTabHeight(c+1,this.tabs.length)+"px"}else{this.tabs[c].tabDiv.style.bottom="";this.tabs[c].tabDiv.style.top=this.getTabHeight(0,c)+"px"}this.tabs[c].containerDiv.style.height="";if(this._activeTabId==this.tabs[c].childComponent.renderId){b=true;this.tabs[c].containerDiv.style.display="block";this.tabs[c].containerDiv.style.top=this.getTabHeight(0,c+1)+"px";this.tabs[c].containerDiv.style.bottom=this.getTabHeight(c+1,this.tabs.length)+"px";this.tabs[c].contentDiv.style.top=0;this.tabs[c].contentDiv.style.bottom=0;this.tabs[c].contentDiv.style.height="";Core.Web.VirtualPosition.redraw(this.tabs[c].contentDiv)}else{this.tabs[c].containerDiv.style.display="none"}}if(a){Echo.Render.notifyResize(this.component);this.renderDisplayTabs()}},renderAdd:function(f,a){this.component.addListener("tabSelect",this._tabSelectListenerRef);this._animationTime=this.component.render("animationTime",Extras.AccordionPane.DEFAULT_ANIMATION_TIME);this._activeTabId=this.component.get("activeTabId");this.div=document.createElement("div");this.div.id=this.component.renderId;this.div.style.cssText="position:absolute;width:100%;height:100%;";Echo.Sync.renderComponentDefaults(this.component,this.div);var b=this.component.getComponentCount();for(var c=0;c<b;++c){var e=this.component.getComponent(c);var d=new Extras.Sync.AccordionPane.Tab(e,this);this.tabs.push(d);d.render(f);this.div.appendChild(d.tabDiv);this.div.appendChild(d.containerDiv)}a.appendChild(this.div);this._pendingRenderDisplay=true},renderDisplay:function(){this._pendingRenderDisplay=false;if(!this.rotation){this.redrawTabs(false)}this.renderDisplayTabs()},renderDisplayTabs:function(){for(var a=0;a<this.tabs.length;++a){this.tabs[a].renderDisplay()}},renderDispose:function(b){this.component.removeListener("tabSelect",this._tabSelectListenerRef);if(this.rotation){this.rotation.abort()}this._activeTabId=null;for(var a=0;a<this.tabs.length;a++){this.tabs[a].dispose()}this.tabs=[];this.div=null},renderUpdate:function(e){var c;if(e.hasUpdatedLayoutDataChildren()||e.hasAddedChildren()||e.hasRemovedChildren()){c=true}else{var a=e.getUpdatedPropertyNames();if(a.length==1&&a[0]=="activeTabId"){this._selectTab(e.getUpdatedProperty("activeTabId").newValue);c=false}else{c=true}}if(c){var b=this.div;var d=b.parentNode;Echo.Render.renderComponentDispose(e,e.parent);d.removeChild(b);this.renderAdd(e,d)}return c},_rotateTabs:function(d,a){var b=this._getTabById(d);if(b==null){this.redrawTabs(true);return}if(this.rotation){this.rotation.abort();this.redrawTabs(true)}else{var c=this._getTabById(a);this.rotation=new Extras.Sync.AccordionPane.Rotation(this,b,c);this.rotation.runTime=this._animationTime;this.rotation.start()}},_selectTab:function(a){if(a==this._activeTabId){return}var b=this._activeTabId;this._activeTabId=a;if(b!=null&&this._animationTime>0){this._rotateTabs(b,a)}else{this.redrawTabs(true)}},_tabSelectListener:function(a){this._selectTab(a.tab.renderId)}});Extras.Sync.AccordionPane.Tab=Core.extend({tabDiv:null,_parent:null,containerDiv:null,contentDiv:null,childComponent:null,$construct:function(a,b){this.childComponent=a;this._parent=b},_addEventListeners:function(){Core.Web.Event.add(this.tabDiv,"click",Core.method(this,this._processClick),false);if(this._parent.component.render("tabRolloverEnabled",true)){Core.Web.Event.add(this.tabDiv,Core.Web.Env.PROPRIETARY_EVENT_MOUSE_ENTER_LEAVE_SUPPORTED?"mouseenter":"mouseover",Core.method(this,this._processEnter),false);Core.Web.Event.add(this.tabDiv,Core.Web.Env.PROPRIETARY_EVENT_MOUSE_ENTER_LEAVE_SUPPORTED?"mouseleave":"mouseout",Core.method(this,this._processExit),false)}Core.Web.Event.Selection.disable(this.tabDiv)},dispose:function(){Core.Web.Event.removeAll(this.tabDiv);this._parent=null;this.childComponent=null;this.tabDiv=null;this.containerDiv=null},getContentInsets:function(){if(this.childComponent.pane){return 0}else{var a=this._parent.component.render("defaultContentInsets");return a?a:Extras.Sync.AccordionPane._DEFAULTS.tabContentInsets}},_processClick:function(a){if(!this._parent||!this._parent.client||!this._parent.client.verifyInput(this._parent.component)){return}this._parent.component.doTabSelect(this.childComponent.renderId)},_processEnter:function(a){if(!this._parent||!this._parent.client||!this._parent.client.verifyInput(this._parent.component)){return}this._renderState(true)},_processExit:function(a){if(!this._parent||!this._parent.client||!this._parent.client.verifyInput(this._parent.component)){return}this._renderState(false)},render:function(c){var b=this.childComponent.render("layoutData")||{};this.tabDiv=document.createElement("div");this.tabDiv.id=this._parent.component.renderId+"_tab_"+this.childComponent.renderId;this.tabDiv.style.cssText="cursor:pointer;position:absolute;left:0;right:0;overflow:hidden;";Echo.Sync.Insets.render(this._parent.component.render("tabInsets",Extras.Sync.AccordionPane._DEFAULTS.tabInsets),this.tabDiv,"padding");if(b.icon){var a=document.createElement("img");Echo.Sync.ImageReference.renderImg(b.icon,a);a.style.paddingRight="3px";this.tabDiv.appendChild(a);Core.Web.Image.monitor(this.tabDiv,this._parent.imageMonitorRef)}this.tabDiv.appendChild(document.createTextNode(b.title?b.title:"\u00a0"));this.containerDiv=document.createElement("div");this.containerDiv.style.cssText="display:none;position:absolute;left:0;right:0;overflow:hidden;";this.contentDiv=document.createElement("div");this.contentDiv.style.cssText="position:absolute;left:0;right:0;overflow:auto;";Echo.Sync.Insets.render(this.getContentInsets(),this.contentDiv,"padding");Echo.Render.renderComponentAdd(c,this.childComponent,this.contentDiv);this.containerDiv.appendChild(this.contentDiv);this._renderState(false);this._addEventListeners()},_renderState:function(j){var g=this.tabDiv,c=this._parent.component.render("tabBorder",Extras.Sync.AccordionPane._DEFAULTS.tabBorder),i,d,a=this._parent.component.render("tabBackground",Extras.Sync.AccordionPane._DEFAULTS.tabBackground);if(j){var b=this._parent.component.render("tabRolloverBackground");if(!b){b=Echo.Sync.Color.adjust(a,20,20,20)}Echo.Sync.Color.render(b,g,"backgroundColor");var h=this._parent.component.render("tabRolloverBackgroundImage");if(h){g.style.backgroundImage="";g.style.backgroundPosition="";g.style.backgroundRepeat="";Echo.Sync.FillImage.render(h,g,null)}var f=this._parent.component.render("tabRolloverForeground");if(f){Echo.Sync.Color.render(f,g,"color")}Echo.Sync.Font.render(this._parent.component.render("tabRolloverFont"),g);var e=this._parent.component.render("tabRolloverBorder");if(!e){e=c;if(Echo.Sync.Border.isMultisided(e)){i=Echo.Sync.Border.parse(e.top);d=Echo.Sync.Border.parse(e.bottom);e={top:Echo.Sync.Border.compose(i.size,i.style,Echo.Sync.Color.adjust(i.color,20,20,20)),bottom:Echo.Sync.Border.compose(d.size,d.style,Echo.Sync.Color.adjust(d.color,20,20,20))}}else{i=Echo.Sync.Border.parse(e);e=Echo.Sync.Border.compose(i.size,i.style,Echo.Sync.Color.adjust(i.color,20,20,20))}}}else{Echo.Sync.Color.render(a,g,"backgroundColor");Echo.Sync.Color.render(this._parent.component.render("tabForeground",Extras.Sync.AccordionPane._DEFAULTS.tabForeground),g,"color");Echo.Sync.Font.renderClear(this._parent.component.render("tabFont"),g);g.style.backgroundImage="";g.style.backgroundPosition="";g.style.backgroundRepeat="";Echo.Sync.FillImage.render(this._parent.component.render("tabBackgroundImage"),g)}if(Echo.Sync.Border.isMultisided(c)){Echo.Sync.Border.render(c.top,g,"borderTop");Echo.Sync.Border.render(c.bottom,g,"borderBottom")}else{Echo.Sync.Border.render(c,g,"borderTop");Echo.Sync.Border.render(c,g,"borderBottom")}},renderDisplay:function(){Core.Web.VirtualPosition.redraw(this.tabDiv);Core.Web.VirtualPosition.redraw(this.containerDiv);Core.Web.VirtualPosition.redraw(this.contentDiv)}});Extras.Sync.AccordionPane.Rotation=Core.extend(Extras.Sync.Animation,{_parent:null,_oldTab:null,_newTab:null,_oldTabIndex:null,_newTabIndex:null,_directionDown:null,_rotatingTabCount:null,_regionHeight:null,_numberOfTabsAbove:null,_numberOfTabsBelow:null,_startPosition:null,_animationDistance:null,$construct:function(a,b,c){this._parent=a;this._oldTab=b;this._newTab=c;this._regionHeight=this._parent.div.offsetHeight;this._oldTabIndex=Core.Arrays.indexOf(this._parent.tabs,this._oldTab);this._newTabIndex=Core.Arrays.indexOf(this._parent.tabs,this._newTab);this._rotatingTabCount=Math.abs(this._newTabIndex-this._oldTabIndex);this._directionDown=this._newTabIndex<this._oldTabIndex;if(this._directionDown){this._numberOfTabsAbove=this._newTabIndex+1;this._numberOfTabsBelow=this._parent.tabs.length-1-this._newTabIndex;this._startPosition=this._parent.getTabHeight(0,this._newTabIndex+1);this._animationDistance=this._regionHeight-this._parent.getTabHeight(this._newTabIndex+1,this._parent.tabs.length)-this._startPosition}else{this._numberOfTabsAbove=this._newTabIndex;this._numberOfTabsBelow=this._parent.tabs.length-1-this._newTabIndex;this._startPosition=this._parent.getTabHeight(this._newTabIndex+1,this._parent.tabs.length);this._animationDistance=this._regionHeight-this._parent.getTabHeight(0,this._newTabIndex+1)-this._startPosition}},complete:function(){this._parent.rotation=null;var a=this._parent;if(this._parent.resetOverflowForAnimation){this._oldTab.contentDiv.style.overflow="auto";this._newTab.contentDiv.style.overflow="auto"}var b=this._parent.component.renderId;this._parent=null;this._oldTab=null;this._newTab=null;a.redrawTabs(true)},init:function(){this._newTab.containerDiv.style.height="";if(this._directionDown){this._oldTab.containerDiv.style.bottom="";this._newTab.containerDiv.style.top=this._parent.getTabHeight(0,this._newTabIndex+1)+"px"}else{this._newTab.containerDiv.style.top="";this._newTab.containerDiv.style.bottom=this._parent.getTabHeight(this._newTabIndex+1,this._parent.tabs.length)+"px"}this._newTab.containerDiv.style.display="block";var e=this._parent.div.offsetHeight-this._parent.getTabHeight(0,this._parent.tabs.length);var c=Echo.Sync.Insets.toPixels(this._oldTab.getContentInsets());var b=Echo.Sync.Insets.toPixels(this._newTab.getContentInsets());var d=e-c.top-c.bottom;var a=e-b.top-b.bottom;d=d>0?d:0;a=a>0?a:0;if(this._parent.resetOverflowForAnimation){this._oldTab.contentDiv.style.overflow="hidden";this._newTab.contentDiv.style.overflow="hidden"}this._oldTab.contentDiv.style.bottom="";this._newTab.contentDiv.style.bottom="";this._oldTab.contentDiv.style.height=d+"px";this._newTab.contentDiv.style.height=a+"px"},step:function(b){var d,c,f,e=Math.round(b*this._animationDistance);if(this._directionDown){for(d=this._oldTabIndex;d>this._newTabIndex;--d){this._parent.tabs[d].tabDiv.style.top=(e+this._startPosition+this._parent.getTabHeight(this._newTabIndex+1,d))+"px"}f=e;if(f<0){f=0}this._newTab.containerDiv.style.height=f+"px";var a=e+this._startPosition+this._parent.getTabHeight(this._newTabIndex+1,this._oldTabIndex+1);this._oldTab.containerDiv.style.top=a+"px";c=this._regionHeight-this._parent.getTabHeight(this._newTabIndex,this._oldTabIndex);if(c<0){c=0}this._oldTab.containerDiv.style.height=c+"px"}else{for(d=this._oldTabIndex+1;d<=this._newTabIndex;++d){this._parent.tabs[d].tabDiv.style.bottom=(e+this._startPosition+this._parent.getTabHeight(d+1,this._newTabIndex+1))+"px"}c=this._regionHeight-e-this._parent.getTabHeight(this._oldTabIndex,this._newTabIndex);if(c<0){c=0}this._oldTab.containerDiv.style.height=c+"px";f=e;if(f<0){f=0}this._newTab.containerDiv.style.height=f+"px"}}});Extras.MenuComponent=Core.extend(Echo.Component,{$abstract:true,modalSupport:true,focusable:true,doAction:function(a){var b=a.getItemPositionPath().join(".");if(a instanceof Extras.ToggleOptionModel){this._toggleItem(a)}this.fireEvent({type:"action",source:this,data:b,modelId:a.modelId})},_toggleItem:function(c){var a=this.get("model");var e=this.get("stateModel");if(c.groupId){var d=a.findItemGroup(c.groupId);for(var b=0;b<d.length;++b){e.setSelected(d[b].modelId,false)}}if(e){e.setSelected(c.modelId,!e.isSelected(c.modelId))}}});Extras.ContextMenu=Core.extend(Extras.MenuComponent,{$static:{ACTIVATION_MODE_CLICK:1,ACTIVATION_MODE_CONTEXT_CLICK:2},$load:function(){Echo.ComponentFactory.registerType("Extras.ContextMenu",this)},componentType:"Extras.ContextMenu"});Extras.DropDownMenu=Core.extend(Extras.MenuComponent,{$load:function(){Echo.ComponentFactory.registerType("Extras.DropDownMenu",this)},componentType:"Extras.DropDownMenu"});Extras.MenuBarPane=Core.extend(Extras.MenuComponent,{$load:function(){Echo.ComponentFactory.registerType("Extras.MenuBarPane",this)},componentType:"Extras.MenuBarPane"});Extras.ItemModel=Core.extend({$abstract:true,modelId:null,parent:null});Extras.MenuModel=Core.extend(Extras.ItemModel,{text:null,icon:null,items:null,$construct:function(e,d,c,a){this.modelId=e;this.id=Extras.uniqueId++;this.parent=null;this.text=d;this.icon=c;if(a){for(var b=0;b<a.length;++b){a[b].parent=this}}this.items=a?a:[]},addItem:function(a){this.items.push(a);a.parent=this},findItem:function(c){var a;for(a=0;a<this.items.length;++a){if(this.items[a].id==c){return this.items[a]}}for(a=0;a<this.items.length;++a){if(this.items[a] instanceof Extras.MenuModel){var b=this.items[a].findItem(c);if(b){return b}}}return null},findItemGroup:function(c){var d=[];for(var b=0;b<this.items.length;++b){if(this.items[b] instanceof Extras.MenuModel){var e=this.items[b].findItemGroup(c);for(var a=0;a<e.length;++a){d.push(e[a])}}else{if(this.items[b].groupId==c){d.push(this.items[b])}}}return d},getItemModelFromPositions:function(b){var c=this;for(var a=0;a<b.length;++a){c=c.items[parseInt(b[a],10)]}return c},indexOfItem:function(b){for(var a=0;a<this.items.length;++a){if(this.items[a]==b){return a}}return -1},toString:function(){return'MenuModel "'+this.text+'" Items:'+this.items.length}});Extras.OptionModel=Core.extend(Extras.ItemModel,{text:null,icon:null,$construct:function(c,b,a){this.modelId=c;this.id=Extras.uniqueId++;this.parent=null;this.text=b;this.icon=a},getItemPositionPath:function(){var b=[];var a=this;while(a.parent!=null){b.unshift(a.parent.indexOfItem(a));a=a.parent}return b},toString:function(){return'OptionModel "'+this.text+'"'}});Extras.ToggleOptionModel=Core.extend(Extras.OptionModel,{$construct:function(b,a){Extras.OptionModel.call(this,b,a,null)}});Extras.RadioOptionModel=Core.extend(Extras.ToggleOptionModel,{groupId:null,$construct:function(c,b,a){Extras.ToggleOptionModel.call(this,c,b);this.groupId=a}});Extras.SeparatorModel=Core.extend(Extras.ItemModel,{});Extras.MenuStateModel=Core.extend({_disabledItems:null,_selectedItems:null,$construct:function(){this._disabledItems=[];this._selectedItems=[]},isEnabled:function(b){if(b){for(var a=0;a<this._disabledItems.length;a++){if(this._disabledItems[a]==b){return false}}}return true},isSelected:function(b){if(b){for(var a=0;a<this._selectedItems.length;a++){if(this._selectedItems[a]==b){return true}}}return false},setEnabled:function(b,a){if(a){Core.Arrays.remove(this._disabledItems,b)}else{if(Core.Arrays.indexOf(this._disabledItems,b)==-1){this._disabledItems.push(b)}}},setSelected:function(b,a){if(a){if(Core.Arrays.indexOf(this._selectedItems,b)==-1){this._selectedItems.push(b)}}else{Core.Arrays.remove(this._selectedItems,b)}}});Extras.Sync.Menu=Core.extend(Echo.Render.ComponentSync,{$static:{DEFAULTS:{foreground:"#000000",background:"#cfcfcf",disabledForeground:"#7f7f7f",selectionForeground:"#ffffff",selectionBackground:"#3f3f3f",border:"1px outset #cfcfcf"},MAX_Z_INDEX:65535},menuModel:null,stateModel:null,element:null,active:false,_openMenuPath:null,_maskDeployed:false,_processMaskClickRef:null,_processKeyPressRef:null,_overlay:null,$construct:function(){this._processMaskClickRef=Core.method(this,this._processMaskClick);this._processKeyPressRef=Core.method(this,this.processKeyPress);this._openMenuPath=[]},$abstract:{getSubMenuPosition:function(a){},renderMain:function(a){}},$virtual:{activate:function(){if(this.active){return false}this.component.set("modal",true);this.active=true;this.addMask();this.client.application.setFocusedComponent(this.component);Core.Web.DOM.focusElement(this.element);Core.Web.Event.add(this.element,Core.Web.Env.QUIRK_IE_KEY_DOWN_EVENT_REPEAT?"keydown":"keypress",this._processKeyPressRef,true);return true},activateItem:function(a){if(this.stateModel&&!this.stateModel.isEnabled(a.modelId)){return}if(a instanceof Extras.OptionModel){this.deactivate();this.processAction(a)}else{if(a instanceof Extras.MenuModel){this._openMenu(a)}}},processAction:function(a){this.component.doAction(a)},processKeyPress:function(a){if(a.keyCode==27){this.deactivate();return false}return true},renderFocus:function(){Core.Web.DOM.focusElement(this.element)}},addMenu:function(a){this._openMenuPath.push(a)},addMask:function(){if(this.maskDeployed){return}this.maskDeployed=true;this._overlayAdd(new Core.Web.Measure.Bounds(this.element));Core.Web.Event.add(document.body,"click",this._processMaskClickRef,false);Core.Web.Event.add(document.body,"contextmenu",this._processMaskClickRef,false)},closeAll:function(){while(this._openMenuPath.length>0){var a=this._openMenuPath.pop();a.close()}},closeDescendants:function(a){while(a!=this._openMenuPath[this._openMenuPath.length-1]){var b=this._openMenuPath.pop();b.close()}},deactivate:function(){this.component.set("modal",false);if(!this.active){return}this.active=false;Core.Web.Event.remove(this.element,Core.Web.Env.QUIRK_IE_KEY_DOWN_EVENT_REPEAT?"keydown":"keypress",this._processKeyPressRef,true);this.closeAll();this.removeMask()},isOpen:function(b){for(var a=0;a<this._openMenuPath.length;++a){if(this._openMenuPath[a].menuModel==b){return true}}return false},_overlayAdd:function(e){this._overlayRemove();var b=e.top+e.height,d=e.left+e.width,a=new Core.Web.Measure.Bounds(document.body);this._overlay={};if(e.top>0){this._overlay.top=document.createElement("div");this._overlay.top.style.cssText="position:absolute;z-index:32767;top:0;left:0;width:100%;height:"+e.top+"px;";document.body.appendChild(this._overlay.top)}if(b<a.height){this._overlay.bottom=document.createElement("div");this._overlay.bottom.style.cssText="position:absolute;z-index:32767;bottom:0;left:0;width:100%;top:"+b+"px;";document.body.appendChild(this._overlay.bottom)}if(e.left>0){this._overlay.left=document.createElement("div");this._overlay.left.style.cssText="position:absolute;z-index:32767;left:0;width:"+e.left+"px;top:"+e.top+"px;height:"+e.height+"px;";document.body.appendChild(this._overlay.left)}if(d<a.width){this._overlay.right=document.createElement("div");this._overlay.right.style.cssText="position:absolute;z-index:32767;right:0;left:"+d+"px;top:"+e.top+"px;height:"+e.height+"px;";document.body.appendChild(this._overlay.right)}for(var c in this._overlay){Echo.Sync.FillImage.render(this.client.getResourceUrl("Echo","resource/Transparent.gif"),this._overlay[c]);Core.Web.VirtualPosition.redraw(this._overlay[c])}this.client.forceRedraw()},_overlayRemove:function(){if(!this._overlay){return}for(var a in this._overlay){document.body.removeChild(this._overlay[a])}this._overlay=null;this.client.forceRedraw()},_openMenu:function(f){if(this.isOpen(f)){return}var b=new Extras.Sync.Menu.RenderedMenu(this,f);b.create();var c=null;for(var d=0;d<this._openMenuPath.length;++d){if(this._openMenuPath[d].menuModel==f.parent){c=this._openMenuPath[d];break}}if(c==null){c=this}else{this.closeDescendants(c)}var a=c.getSubMenuPosition(f);var e=new Core.Web.Measure.Bounds(document.body);if(a.x+b.width>e.width){a.x=e.width-b.width;if(a.x<0){a.x=0}}if(a.y+b.height>e.height){a.y=e.height-b.height;if(a.y<0){a.y=0}}b.open(a.x,a.y);this.addMenu(b)},_processMaskClick:function(a){this.deactivate();return true},removeMask:function(){if(!this.maskDeployed){return}this._overlayRemove();this.maskDeployed=false;Core.Web.Event.remove(document.body,"click",this._processMaskClickRef,false);Core.Web.Event.remove(document.body,"contextmenu",this._processMaskClickRef,false)},renderAdd:function(b,a){this.menuModel=this.component.get("model");this.stateModel=this.component.get("stateModel");this.element=this.renderMain(b);this.element.tabIndex="-1";this.element.style.outlineStyle="none";a.appendChild(this.element)},renderDispose:function(a){this.deactivate()},renderHide:function(){this.deactivate()},renderUpdate:function(c){if(c.isUpdatedPropertySetIn({modal:true})){return}var a=this.element;var b=a.parentNode;Echo.Render.renderComponentDispose(c,c.parent);b.removeChild(a);this.renderAdd(c,b);return false}});Extras.Sync.Menu.RenderedMenu=Core.extend({$static:{DEFAULTS:{iconTextMargin:5,menuInsets:"2px",menuItemInsets:"1px 12px"},FadeAnimation:Core.extend(Extras.Sync.Animation,{_element:null,$construct:function(b,a){this._element=b;this.runTime=a},init:function(){},step:function(a){this._element.style.opacity=a},complete:function(a){this._element.style.opacity=1}})},menuSync:null,component:null,client:null,element:null,itemElements:null,menuModel:null,width:null,height:null,_activeItem:null,stateModel:null,$construct:function(b,a){this.menuSync=b;this.menuModel=a;this.component=this.menuSync.component;this.client=this.menuSync.client;this.stateModel=this.menuSync.stateModel;this.itemElements={}},close:function(){Core.Web.Event.removeAll(this.element);document.body.removeChild(this.element);this.client.forceRedraw();this.element=null;this.itemElements=null;this._activeItem=null},create:function(){var w,B,E,x,t,C;this.element=document.createElement("div");this.element.style.position="absolute";this.element.style.zIndex=Extras.Sync.Menu.MAX_Z_INDEX;var d=(Core.Web.Env.NOT_SUPPORTED_CSS_OPACITY?100:this.component.render("menuOpacity",100))/100;var l=document.createElement("div");l.style.cssText="position:relative;z-index:10;";this.element.appendChild(l);Echo.Sync.LayoutDirection.render(this.component.getLayoutDirection(),l);Echo.Sync.Insets.render(Extras.Sync.Menu.RenderedMenu.DEFAULTS.menuInsets,l,"padding");Echo.Sync.Border.render(this.component.render("menuBorder",Extras.Sync.Menu.DEFAULTS.border),l);var a;var g=this.component.render("menuForeground");if(g){a=g}else{a=this.component.render("foreground",Extras.Sync.Menu.DEFAULTS.foreground)}Echo.Sync.Color.render(a,l,"color");var n=this.component.render("menuFont");if(!n){n=this.component.render("font")}if(n){Echo.Sync.Font.render(n,l)}var u;if(d<1){u=document.createElement("div");u.style.cssText="position:absolute;z-index:1;width:100%;height:100%;top:0;bottom:0;";u.style.opacity=d;this.element.appendChild(u)}else{u=this.element}var y;var p=this.component.render("menuBackground");if(p){y=p}else{y=this.component.render("background",Extras.Sync.Menu.DEFAULTS.background)}Echo.Sync.Color.render(y,u,"backgroundColor");var b;var s=this.component.render("menuBackgroundImage");if(s){b=s}else{if(p==null){b=this.component.render("backgroundImage")}}if(b){Echo.Sync.FillImage.render(b,u,null)}var e=document.createElement("table");e.style.borderCollapse="collapse";l.appendChild(e);var j=document.createElement("tbody");e.appendChild(j);var o=this.menuModel.items;var k=false;for(w=0;w<o.length;++w){B=o[w];if(B.icon||B instanceof Extras.ToggleOptionModel){k=true;break}}var v,q;if(k){var z=Echo.Sync.Insets.toPixels(Extras.Sync.Menu.RenderedMenu.DEFAULTS.menuItemInsets);q="0px 0px 0px "+z.left+"px";v=z.top+"px "+z.right+"px "+z.bottom+"px "+z.left+"px"}else{v=Extras.Sync.Menu.RenderedMenu.DEFAULTS.menuItemInsets}for(w=0;w<o.length;++w){B=o[w];if(B instanceof Extras.OptionModel||B instanceof Extras.MenuModel){C=document.createElement("tr");this.itemElements[B.id]=C;C.style.cursor="pointer";j.appendChild(C);if(k){t=document.createElement("td");Echo.Sync.Insets.render(q,t,"padding");if(B instanceof Extras.ToggleOptionModel){var m;var r=this.stateModel&&this.stateModel.isSelected(B.modelId);if(B instanceof Extras.RadioOptionModel){m=r?"image/menu/RadioOn.gif":"image/menu/RadioOff.gif"}else{m=r?"image/menu/ToggleOn.gif":"image/menu/ToggleOff.gif"}E=document.createElement("img");E.src=this.client.getResourceUrl("Extras",m);t.appendChild(E)}else{if(B.icon){E=document.createElement("img");Echo.Sync.ImageReference.renderImg(B.icon,E);t.appendChild(E)}}C.appendChild(t)}x=document.createElement("td");Echo.Sync.Insets.render(v,x,"padding");var c=this.component.render("lineWrap");if(c!=null&&!c){x.style.whiteSpace="nowrap"}if(this.stateModel&&!this.stateModel.isEnabled(B.modelId)){Echo.Sync.Color.render(this.component.render("disabledForeground",Extras.Sync.Menu.DEFAULTS.disabledForeground),x,"color")}x.appendChild(document.createTextNode(B.text));C.appendChild(x);if(B instanceof Extras.MenuModel){var h=document.createElement("td");h.style.textAlign="right";E=document.createElement("img");var A=this.component.render("menuExpandIcon",this.client.getResourceUrl("Extras","image/menu/ArrowRight.gif"));E.setAttribute("src",A.url?A.url:A);E.setAttribute("alt","");h.appendChild(E);C.appendChild(h)}else{x.colSpan=2}}else{if(B instanceof Extras.SeparatorModel){if(w===0||w===o.length-1||o[w-1] instanceof Extras.SeparatorModel||o[w+1] instanceof Extras.SeparatorModel){continue}C=document.createElement("tr");j.appendChild(C);x=document.createElement("td");x.colSpan=k?3:2;x.style.padding="3px 0px";var D=document.createElement("div");D.style.cssText="border-top:1px solid #a7a7a7;height:0;font-size:1px;line-height:0";x.appendChild(D);C.appendChild(x)}}}var f=new Core.Web.Measure.Bounds(this.element);this.width=f.width;this.height=f.height},_getItemElement:function(a){if(a==null){return null}while(a.nodeName.toLowerCase()!="tr"){if(a==this.element){return null}a=a.parentNode}return a},_getItemModel:function(c){var b=null;c=this._getItemElement(c);if(c==null){return null}for(var a in this.itemElements){if(this.itemElements[a]==c){b=a;break}}if(b==null){return null}else{return this.menuModel.findItem(b)}},getSubMenuPosition:function(c){var d=this.itemElements[c.id];var b=new Core.Web.Measure.Bounds(d);var a=new Core.Web.Measure.Bounds(this.element);return{x:a.left+a.width,y:b.top}},open:function(a,d){this.element.style.left=a+"px";this.element.style.top=d+"px";var c=this.component.render("animationTime",0);if(c&&!Core.Web.Env.NOT_SUPPORTED_CSS_OPACITY){this.element.style.opacity=0;var b=new Extras.Sync.Menu.RenderedMenu.FadeAnimation(this.element,c);b.start()}document.body.appendChild(this.element);this.client.forceRedraw();Core.Web.Event.add(this.element,"click",Core.method(this,this._processClick),false);Core.Web.Event.add(this.element,"mouseover",Core.method(this,this._processItemEnter),false);Core.Web.Event.add(this.element,"mouseout",Core.method(this,this._processItemExit),false);Core.Web.Event.Selection.disable(this.element)},_processClick:function(b){Core.Web.DOM.preventEventDefault(b);var a=this._getItemModel(Core.Web.DOM.getEventTarget(b));if(a){this._setActiveItem(a,true)}},_processItemEnter:function(a){this._processRollover(a,true)},_processItemExit:function(a){this._processRollover(a,false)},_processRollover:function(d,c){if(!this.client||!this.client.verifyInput(this.component)||Core.Web.dragInProgress){return true}var a=this._getItemElement(Core.Web.DOM.getEventTarget(d));if(!a){return}var b=this._getItemModel(a);if(!b){return}if(this.stateModel&&!this.stateModel.isEnabled(b.modelId)){return}if(c){this._setActiveItem(b,false)}},_setActiveItem:function(a,b){if(this._activeItem){this._setItemHighlight(this._activeItem,false);this._activeItem=null}if(a instanceof Extras.MenuModel){this.menuSync.activateItem(a)}else{if(b){this.menuSync.activateItem(a);return}else{this.menuSync.closeDescendants(this)}}if(a){this._activeItem=a;this._setItemHighlight(this._activeItem,true)}},_setItemHighlight:function(b,c){var a=this.itemElements[b.id];if(c){Echo.Sync.FillImage.render(this.component.render("selectionBackgroundImage"),a);Echo.Sync.Color.render(this.component.render("selectionBackground",Extras.Sync.Menu.DEFAULTS.selectionBackground),a,"backgroundColor");Echo.Sync.Color.render(this.component.render("selectionForeground",Extras.Sync.Menu.DEFAULTS.selectionForeground),a,"color")}else{a.style.backgroundImage="";a.style.backgroundColor="";a.style.color=""}}});Extras.Sync.ContextMenu=Core.extend(Extras.Sync.Menu,{$load:function(){Echo.Render.registerPeer("Extras.ContextMenu",this)},_mouseX:null,_mouseY:null,getSubMenuPosition:function(a){return{x:this._mouseX,y:this._mouseY}},_processContextClick:function(a){if(!this.client||!this.client.verifyInput(this.component)||Core.Web.dragInProgress){return true}Core.Web.DOM.preventEventDefault(a);this._mouseX=a.pageX||(a.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));this._mouseY=a.pageY||(a.clientY+(document.documentElement.scrollTop||document.body.scrollTop));this.activate();this.activateItem(this.menuModel)},renderDispose:function(a){Core.Web.Event.removeAll(this.element);Extras.Sync.Menu.prototype.renderDispose.call(this,a)},renderMain:function(d){var c=document.createElement("div");c.id=this.component.renderId;var a=this.component.render("activationMode",Extras.ContextMenu.ACTIVATION_MODE_CONTEXT_CLICK);if(a&Extras.ContextMenu.ACTIVATION_MODE_CLICK){Core.Web.Event.add(c,"click",Core.method(this,this._processContextClick),false)}if(a&Extras.ContextMenu.ACTIVATION_MODE_CONTEXT_CLICK){Core.Web.Event.add(c,"contextmenu",Core.method(this,this._processContextClick),false)}var b=this.component.getComponentCount();if(b>0){Echo.Render.renderComponentAdd(d,this.component.getComponent(0),c)}return c},renderUpdate:function(f){if(f.isUpdatedPropertySetIn({stateModel:true,model:true})){var b=f.getRemovedChildren();if(b){Core.Web.DOM.removeNode(this.element.firstChild)}var e=f.getAddedChildren();if(e){Echo.Render.renderComponentAdd(f,e[0],this.element)}var a=f.getUpdatedProperty("model");var c=f.getUpdatedProperty("stateModel");var d=this.maskDeployed&&(a||c);if(d){this.deactivate()}if(a){this.menuModel=a.newValue}if(c){this.stateModel=c.newValue}if(d){this.activate();this.activateItem(this.menuModel)}return false}Extras.Sync.Menu.prototype.renderUpdate.call(this,f);return true}});Extras.Sync.DropDownMenu=Core.extend(Extras.Sync.Menu,{$load:function(){Echo.Render.registerPeer("Extras.DropDownMenu",this)},_contentDiv:null,_selectedItem:null,_createSelectionContent:function(c){var a;if(c.icon){if(c.text){var d=document.createElement("table");d.style.cssText="border-collapse:collapse;padding:0;";var b=document.createElement("tbody");var e=document.createElement("tr");var g=document.createElement("td");g.style.cssText="padding:0vertical-align:top;";a=document.createElement("img");Echo.Sync.ImageReference.renderImg(c.icon,a);g.appendChild(a);e.appendChild(g);g=document.createElement("td");g.style.cssText="padding:width:3px;";var f=document.createElement("div");f.style.cssText="width:3px";g.appendChild(f);e.appendChild(g);g=document.createElement("td");g.style.cssText="padding:0vertical-align:top;";g.appendChild(document.createTextNode(c.text));e.appendChild(g);b.appendChild(e);d.appendChild(b);return d}else{a=document.createElement("img");Echo.Sync.ImageReference.renderImg(c.icon,a);return a}}else{return document.createTextNode(c.text?c.text:"\u00a0")}},getSubMenuPosition:function(a){var b=new Core.Web.Measure.Bounds(this.element);return{x:b.left,y:b.top+b.height}},processAction:function(a){if(this.component.render("selectionEnabled")){this._setSelection(a)}var b=a.getItemPositionPath().join(".");this.component.set("selection",b);Extras.Sync.Menu.prototype.processAction.call(this,a)},_processClick:function(a){if(!this.client||!this.client.verifyInput(this.component)||Core.Web.dragInProgress){return true}Core.Web.DOM.preventEventDefault(a);this.activate();this.activateItem(this.menuModel)},renderDispose:function(a){Core.Web.Event.removeAll(this.element);this._contentDiv=null;Extras.Sync.Menu.prototype.renderDispose.call(this,a)},renderMain:function(){var e=document.createElement("div");e.id=this.component.renderId;e.style.cssText="overflow:hidden;cursor:pointer;";Echo.Sync.LayoutDirection.render(this.component.getLayoutDirection(),e);Echo.Sync.Color.render(this.component.render("foreground",Extras.Sync.Menu.DEFAULTS.foreground),e,"color");Echo.Sync.Color.render(this.component.render("background",Extras.Sync.Menu.DEFAULTS.background),e,"backgroundColor");Echo.Sync.FillImage.render(this.component.render("backgroundImage"),e);Echo.Sync.Border.render(this.component.render("border",Extras.Sync.Menu.DEFAULTS.border),e);Echo.Sync.Extent.render(this.component.render("width"),e,"width",true,true);Echo.Sync.Extent.render(this.component.render("height"),e,"height",false,true);var f=document.createElement("div");f.style.cssText="float:right;position:relative;";e.appendChild(f);var c=document.createElement("div");c.style.cssText="position:absolute;top:2px;right:2px;";var b=this.component.render("expandIcon",this.client.getResourceUrl("Extras","image/menu/ArrowDown.gif"));var d=document.createElement("img");Echo.Sync.ImageReference.renderImg(b,d);c.appendChild(d);f.appendChild(c);this._contentDiv=document.createElement("div");this._contentDiv.style.cssText="float:left;white-space:nowrap;";Echo.Sync.Insets.render(this.component.render("insets","2px 5px"),this._contentDiv,"padding");e.appendChild(this._contentDiv);var g=document.createElement("div");g.style.cssText="clear:both;";e.appendChild(g);Core.Web.Event.add(e,"click",Core.method(this,this._processClick),false);Core.Web.Event.Selection.disable(e);if(this.component.render("selectionEnabled")){var h=this.component.render("selection");if(h){this._selectedItem=this.menuModel.getItemModelFromPositions(h.split("."))}}else{this._selectedItem=null}if(this._selectedItem){this._contentDiv.appendChild(this._createSelectionContent(this._selectedItem))}else{var a=this.component.render("selectionText");this._contentDiv.appendChild(document.createTextNode(a?a:"\u00a0"))}if(!this.component.render("height")){var i=new Core.Web.Measure.Bounds(this._contentDiv);f.style.height=i.height+"px"}return e},_setSelection:function(b){this._selectedItem=b;for(var a=this._contentDiv.childNodes.length-1;a>=0;--a){this._contentDiv.removeChild(this._contentDiv.childNodes[a])}this._contentDiv.appendChild(this._createSelectionContent(b))}});Extras.Sync.MenuBarPane=Core.extend(Extras.Sync.Menu,{$static:{DEFAULTS:{itemInsets:"0px 12px",insets:"3px 0px"}},$load:function(){Echo.Render.registerPeer("Extras.MenuBarPane",this)},_activeItem:null,_menuBarTable:null,_menuBarBorderHeight:null,itemElements:null,$construct:function(){Extras.Sync.Menu.call(this);this.itemElements={}},activate:function(){if(Extras.Sync.Menu.prototype.activate.call(this)){this.addMenu(this)}},close:function(){if(this._activeItem){this._setItemHighlight(this._activeItem,false);this._activeItem=null}},_getItemElement:function(a){if(a==null){return null}while(a.nodeName.toLowerCase()!="td"){if(a==this.element){return null}a=a.parentNode}return a},_getItemModel:function(c){var b=null;c=this._getItemElement(c);if(c==null){return null}for(var a in this.itemElements){if(this.itemElements[a]==c){b=a;break}}if(b==null){return null}else{return this.menuModel.findItem(b)}},getPreferredSize:function(){this._menuBarTable.style.height="";var a=Echo.Sync.Insets.toPixels(this.component.render("insets",Extras.Sync.MenuBarPane.DEFAULTS.insets));return{height:new Core.Web.Measure.Bounds(this.element).height+a.top+a.bottom}},getSubMenuPosition:function(d){var b=this.itemElements[d.id];if(!b){throw new Error("Invalid menu: "+d)}var a=new Core.Web.Measure.Bounds(this.element);var c=new Core.Web.Measure.Bounds(b);return{x:c.left,y:a.top+a.height}},_processClick:function(b){if(!this.client||!this.client.verifyInput(this.component)){return true}Core.Web.DOM.preventEventDefault(b);var a=this._getItemModel(Core.Web.DOM.getEventTarget(b));if(a){if(a instanceof Extras.OptionModel){this.deactivate();this.processAction(a)}else{this.activate();this._setActiveItem(a,true)}}else{this.deactivate()}},_processItemEnter:function(a){this._processRollover(a,true)},_processItemExit:function(a){this._processRollover(a,false)},_processRollover:function(d,c){if(!this.client||!this.client.verifyInput(this.component)||Core.Web.dragInProgress){return true}var a=this._getItemElement(Core.Web.DOM.getEventTarget(d));if(!a){return}var b=this._getItemModel(a);if(this.stateModel&&!this.stateModel.isEnabled(b.modelId)){return}if(this.active){if(c){this._setActiveItem(b,b instanceof Extras.MenuModel)}}else{this._setItemHighlight(b,c)}},renderDisplay:function(){Core.Web.VirtualPosition.redraw(this.element);var b=new Core.Web.Measure.Bounds(this.element.parentNode);var a=b.height-this._menuBarBorderHeight;this._menuBarTable.style.height=a<=0?"":a+"px"},renderDispose:function(a){this._menuBarTable=null;Core.Web.Event.removeAll(this.element);Extras.Sync.Menu.prototype.renderDispose.call(this,a)},renderMain:function(d){var b=document.createElement("div");b.id=this.component.renderId;b.style.cssText="overflow:hidden;";Echo.Sync.renderComponentDefaults(this.component,b);var c=this.component.render("border",Extras.Sync.Menu.DEFAULTS.border);var n=Echo.Sync.Border.isMultisided(c);this._menuBarBorderHeight=Echo.Sync.Border.getPixelSize(c,"top")+Echo.Sync.Border.getPixelSize(c,"bottom");Echo.Sync.Border.render(n?c.top:c,b,"borderTop");Echo.Sync.Border.render(n?c.bottom:c,b,"borderBottom");Echo.Sync.FillImage.render(this.component.render("backgroundImage"),b);this._menuBarTable=document.createElement("table");this._menuBarTable.style.borderCollapse="collapse";b.appendChild(this._menuBarTable);var j=document.createElement("tbody");this._menuBarTable.appendChild(j);var a=document.createElement("tr");j.appendChild(a);if(this.menuModel!=null){var g=this.menuModel.items;for(var f=0;f<g.length;++f){var m=g[f];if(m instanceof Extras.OptionModel||m instanceof Extras.MenuModel){var l=document.createElement("td");this.itemElements[m.id]=l;l.style.padding="0px";l.style.cursor="pointer";a.appendChild(l);var h=document.createElement("div");h.style.whiteSpace="nowrap";Echo.Sync.Insets.render(Extras.Sync.MenuBarPane.DEFAULTS.itemInsets,h,"padding");l.appendChild(h);if(m.icon){var e=document.createElement("img");e.style.verticalAlign="middle";e.src=m.icon;h.appendChild(e);if(m.text){e.style.paddingRight="1ex"}}if(m.text){var k=document.createElement("span");k.style.verticalAlign="middle";k.appendChild(document.createTextNode(m.text));h.appendChild(k)}}}}Core.Web.Event.add(b,"click",Core.method(this,this._processClick),false);Core.Web.Event.add(b,"mouseover",Core.method(this,this._processItemEnter),false);Core.Web.Event.add(b,"mouseout",Core.method(this,this._processItemExit),false);Core.Web.Event.Selection.disable(b);return b},_setActiveItem:function(a,b){if(this._activeItem==a){return}if(this._activeItem){this._setItemHighlight(this._activeItem,false);this._activeItem=null}if(b){this.activateItem(a)}if(a){this._activeItem=a;this._setItemHighlight(this._activeItem,true)}},_setItemHighlight:function(b,c){var a=this.itemElements[b.id];if(c){Echo.Sync.FillImage.render(this.component.render("selectionBackgroundImage"),a);Echo.Sync.Color.render(this.component.render("selectionBackground",Extras.Sync.Menu.DEFAULTS.selectionBackground),a,"backgroundColor");Echo.Sync.Color.render(this.component.render("selectionForeground",Extras.Sync.Menu.DEFAULTS.selectionForeground),a,"color")}else{a.style.backgroundImage="";a.style.backgroundColor="";a.style.color=""}}});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_BLIND_BLACK_IN:5,TYPE_BLIND_BLACK_OUT:6,TYPE_FADE_TO_BLACK:7,TYPE_FADE_TO_WHITE:8,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)},_containerDiv:null,contentDiv:null,type:null,_transition:null,_transitionClass:null,oldChildDiv:null,childDiv:null,_initialContentLoaded:false,doImmediateTransition:function(){this.removeOldContent();if(this.childDiv){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_FADE_TO_BLACK:case Extras.TransitionPane.TYPE_FADE_TO_WHITE:this._transitionClass=Extras.Sync.TransitionPane.FadeOpacityColorTransition;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;case Extras.TransitionPane.TYPE_BLIND_BLACK_IN:case Extras.TransitionPane.TYPE_BLIND_BLACK_OUT:this._transitionClass=Extras.Sync.TransitionPane.BlindTransition;break;default:this._transitionClass=null}},removeOldContent:function(){if(this.oldChildDiv){this.contentDiv.removeChild(this.oldChildDiv);this.oldChildDiv=null}},showContent:function(){if(this.childDiv){this.childDiv.style.visibility="visible"}},renderAdd:function(b,a){this._containerDiv=document.createElement("div");this._containerDiv.id=this.component.renderId;this._containerDiv.style.cssText="position:absolute;overflow:auto;top:0;left:0;width:100%;height:100%;";this.contentDiv=document.createElement("div");this.contentDiv.style.cssText="position:absolute;overflow:hidden;top:0;left:0;width:100%;height:100%;";this._containerDiv.appendChild(this.contentDiv);a.appendChild(this._containerDiv);if(this.component.children.length>0){this._renderAddChild(b)}},_renderAddChild:function(a){this._loadTransition();this.childDiv=document.createElement("div");this.childDiv.style.cssText="position:absolute;top:0;left:0;width:100%;height:100%;";Echo.Render.renderComponentAdd(a,this.component.children[0],this.childDiv);if(this._initialContentLoaded){this.childDiv.style.visibility="hidden";if(this._transitionClass){this._transitionStart()}else{this.doImmediateTransition()}}else{this._initialContentLoaded=true}this.contentDiv.appendChild(this.childDiv)},renderDispose:function(a){this._initialContentLoaded=false;if(this._transition){this._transition.abort()}this._childDiv=null;this.contentDiv=null;this._containerDiv=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._containerDiv;var f=c.parentNode;Echo.Render.renderComponentDispose(g,g.parent);f.removeChild(c);this.renderAdd(g,f)}else{if(this._transition){this._transition.abort()}var a=g.getRemovedChildren();if(a){this.oldChildDiv=this.childDiv;this.childDiv=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._transition.runTime=this.component.render("duration",this._transition.runTime);this._transition.start(Core.method(this,this._transitionFinish))},_transitionFinish:function(b){if(this._transition){this._transition=null;this.showContent()}this.removeOldContent();if(this.component&&this.component.application){var a=this.component.application.getFocusedComponent();if(a!=null&&this.component.isAncestorOf(a)){Echo.Render.updateFocus(this.client)}}}});Extras.Sync.TransitionPane.Transition=Core.extend(Extras.Sync.Animation,{transitionPane:null,runTime:350,sleepInterval:10,$abstract:true,$construct:function(a){this.transitionPane=a}});Extras.Sync.TransitionPane.BlindTransition=Core.extend(Extras.Sync.TransitionPane.Transition,{runTime:700,_maskDiv:null,_stepCount:14,_swapStep:null,_reverse:false,complete:function(a){this._maskDiv.parentNode.removeChild(this._maskDiv)},init:function(){this._swapStep=Math.floor(this._stepCount)/2+1;this._reverse=this.transitionPane.type===Extras.TransitionPane.TYPE_BLIND_BLACK_OUT;this._maskDiv=document.createElement("div");this._maskDiv.style.cssText="position:absolute;width:100%;height:100%;z-index:32767;";this.transitionPane.contentDiv.appendChild(this._maskDiv)},step:function(b){var c=Math.ceil(b*this._stepCount);if(c===0){c=1}if(c===this._renderedStep){return}var a=this.transitionPane.client.getResourceUrl("Extras","image/transitionpane/blindblack/Frame"+c+".gif");this._maskDiv.style.backgroundImage="url("+a+")";if(c<this._swapStep){if(this.transitionPane.oldChildDiv){if(this._reverse){this.transitionPane.oldChildDiv.style.top=c+"px"}else{this.transitionPane.oldChildDiv.style.top=(0-c)+"px"}}}else{if(this._renderedStep<this._swapStep){this.transitionPane.showContent();this.transitionPane.removeOldContent()}if(this.transitionPane.childDiv){if(this._reverse){this.transitionPane.childDiv.style.top=(c-this._stepCount)+"px"}else{this.transitionPane.childDiv.style.top=(this._stepCount-c)+"px"}}}this._renderedStep=c}});Extras.Sync.TransitionPane.CameraPanTransition=Core.extend(Extras.Sync.TransitionPane.Transition,{_newChildOnScreen:false,_travel:null,complete:function(a){if(this.transitionPane.childDiv){this.transitionPane.childDiv.style.zIndex=0;this.transitionPane.childDiv.style.top="0px";this.transitionPane.childDiv.style.left="0px"}},init:function(){var a=new Core.Web.Measure.Bounds(this.transitionPane.contentDiv);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.oldChildDiv){this.transitionPane.oldChildDiv.style.zIndex=1}},step:function(a){switch(this.transitionPane.type){case Extras.TransitionPane.TYPE_CAMERA_PAN_DOWN:if(this.transitionPane.childDiv){this.transitionPane.childDiv.style.top=((1-a)*this._travel)+"px"}if(this.transitionPane.oldChildDiv){this.transitionPane.oldChildDiv.style.top=(0-(a*this._travel))+"px"}break;case Extras.TransitionPane.TYPE_CAMERA_PAN_UP:if(this.transitionPane.childDiv){this.transitionPane.childDiv.style.top=(0-((1-a)*this._travel))+"px"}if(this.transitionPane.oldChildDiv){this.transitionPane.oldChildDiv.style.top=(a*this._travel)+"px"}break;case Extras.TransitionPane.TYPE_CAMERA_PAN_RIGHT:if(this.transitionPane.childDiv){this.transitionPane.childDiv.style.left=((1-a)*this._travel)+"px"}if(this.transitionPane.oldChildDiv){this.transitionPane.oldChildDiv.style.left=(0-(a*this._travel))+"px"}break;default:if(this.transitionPane.childDiv){this.transitionPane.childDiv.style.left=(0-((1-a)*this._travel))+"px"}if(this.transitionPane.oldChildDiv){this.transitionPane.oldChildDiv.style.left=(a*this._travel)+"px"}break}if(!this._newChildOnScreen&&this.transitionPane.childDiv){this.transitionPane.showContent();this.transitionPane.childDiv.style.zIndex=2;this._newChildOnScreen=true}}});Extras.Sync.TransitionPane.FadeOpacityTransition=Core.extend(Extras.Sync.TransitionPane.Transition,{runTime:1000,complete:function(a){if(this.transitionPane.childDiv){this.transitionPane.childDiv.style.zIndex=0;if(Core.Web.Env.PROPRIETARY_IE_OPACITY_FILTER_REQUIRED){this.transitionPane.childDiv.style.filter=""}else{this.transitionPane.childDiv.style.opacity=1}}},init:function(){if(this.transitionPane.childDiv){if(Core.Web.Env.PROPRIETARY_IE_OPACITY_FILTER_REQUIRED){this.transitionPane.childDiv.style.filter="alpha(opacity=0)"}else{this.transitionPane.childDiv.style.opacity=0}}this.transitionPane.showContent()},step:function(a){var b;if(this.transitionPane.childDiv){if(Core.Web.Env.PROPRIETARY_IE_OPACITY_FILTER_REQUIRED){b=Math.floor(a*100);this.transitionPane.childDiv.style.filter="alpha(opacity="+b+")"}else{this.transitionPane.childDiv.style.opacity=a}}else{if(this.transitionPane.oldChildDiv){if(Core.Web.Env.PROPRIETARY_IE_OPACITY_FILTER_REQUIRED){b=Math.floor((1-a)*100);this.transitionPane.oldChildDiv.style.filter="alpha(opacity="+b+")"}else{this.transitionPane.oldChildDiv.style.opacity=1-a}}}}});Extras.Sync.TransitionPane.FadeOpacityColorTransition=Core.extend(Extras.Sync.TransitionPane.Transition,{runTime:1000,_maskDiv:null,_swapped:false,complete:function(a){this._maskDiv.parentNode.removeChild(this._maskDiv)},init:function(){this._maskDiv=document.createElement("div");this._maskDiv.style.cssText="position:absolute;width:100%;height:100%;z-index:32767;";if(Core.Web.Env.PROPRIETARY_IE_OPACITY_FILTER_REQUIRED){this._maskDiv.style.filter="alpha(opacity=0)"}else{this._maskDiv.style.opacity=0}if(this.transitionPane.type===Extras.TransitionPane.TYPE_FADE_TO_WHITE){this._maskDiv.style.backgroundColor="#ffffff"}else{this._maskDiv.style.backgroundColor="#000000"}this.transitionPane.contentDiv.appendChild(this._maskDiv)},step:function(b){var a=1-Math.abs(b*2-1);if(b>0.5&&!this._swapped){this.transitionPane.showContent();this.transitionPane.removeOldContent();this._swapped=true}if(Core.Web.Env.PROPRIETARY_IE_OPACITY_FILTER_REQUIRED){var c=Math.floor(a*100);this._maskDiv.style.filter="alpha(opacity="+c+")"}else{this._maskDiv.style.opacity=a}}});CoreDocViewer=Core.extend(Echo.Application,{$static:{MODULE_ABOUT:["lib/extras/Application.TabPane.js","lib/extras/Sync.TabPane.js","app/About.js"],MODULE_SOURCE_VIEW:["app/SyntaxHighlighter.js","app/SourceView.js"],MODULE_PREFERENCES:["app/Preferences.js"],pref:{transitionsEnabled:true,syntaxHighlightEnabled:true},getMessages:function(){return CoreDocViewer.Messages.get()},init:function(){Core.Web.init();if(Echo.DebugConsole){Echo.DebugConsole.install()}var b=new CoreDocViewer();var a=new Echo.FreeClient(b,document.getElementById("rootArea"));a.addResourcePath("Echo","lib/echo/");a.addResourcePath("Extras","lib/extras/");b.setStyleSheet(CoreDocViewer.StyleSheet);a.init()}},workspace:null,$construct:function(){Echo.Application.call(this);this._msg=CoreDocViewer.getMessages();this.workspace=new CoreDocViewer.Workspace();this.rootComponent.add(this.workspace)}});CoreDocViewer.ClassCache=Core.extend({$static:{_BundleLoader:Core.extend({_instanceModel:null,contentPath:"content/",_objectNames:null,_completeCount:0,_classModels:null,_onComplete:null,$construct:function(b,a,c){this._instanceModel=b;this._objectNames=a;this._onComplete=c},_checkComplete:function(){++this._completeCount;if(this._completeCount==this._objectNames.length){this._onComplete(this._classModels)}},load:function(){this._classModels={};for(var a=0;a<this._objectNames.length;++a){this._loadItem(this._objectNames[a])}},_loadItem:function(a){var b=new Core.Web.HttpConnection(this.contentPath+"Class."+a+".xml","GET");b.addResponseListener(Core.method(this,function(c){if(c.valid){this._classModels[a]=new CoreDocViewer.Model.Class(this._instanceModel,c.source.getResponseXml());this._checkComplete()}else{throw new Error("Invalid response: "+c)}}));b.connect()}})},_classMap:null,_classQueue:null,_model:null,$construct:function(a){this._model=a;this._classMap={};this._classQueue={}},get:function(a){return this._classMap[a]},load:function(c,d){var e=[];for(var b=0;b<c.length;++b){if(this._classMap[c[b]]){continue}e.push(c[b])}if(e.length===0){d()}else{var a=new CoreDocViewer.ClassCache._BundleLoader(this._model,c,Core.method(this,function(g){for(var f in g){this._classMap[f]=g[f]}for(var f in g){g[f].superclass=g[this._model.superclasses[f]]}d()}));a.load()}}});CoreDocViewer.Toolbar=Core.extend(Echo.Panel,{_navigationSelect:null,_findField:null,_findDropDown:null,_findResults:null,_msg:null,_completionActionRef:null,$construct:function(){this._msg=CoreDocViewer.getMessages();this._completionActionRef=Core.method(this,this._completionAction);Echo.Panel.call(this,{styleName:"Toolbar",children:[new Echo.Row({cellSpacing:"2em",children:[new Echo.Row({cellSpacing:"1ex",children:[new Echo.Label({text:this._msg["FindObject.Prompt"],icon:"image/icon/Icon24Find.png"}),this._findDropDown=new CoreDocViewer.DropDown({styleName:"FindObject",events:{property:Core.method(this,this._findDropDownUpdate)},children:[this._findField=new Echo.TextField({events:{property:Core.method(this,this._findUpdate),keyDown:Core.method(this,this._findKeyDown),action:Core.method(this,this._findAction)}}),this._findResults=new Echo.Column({})]})]}),new Echo.Row({cellSpacing:2,children:[new Echo.Label({icon:"image/icon/Icon24Move.png"}),this._navigationSelect=new Echo.SelectField({events:{action:Core.method(this,this._navigationAction)}})]})]})]})},_completionAction:function(a){this.fireEvent({source:this,type:"findObject",value:a.actionCommand});this._findDropDown.set("expanded",false);this._findField.set("text",null)},_findAction:function(a){this.fireEvent({source:this,type:"findObject",value:this._findField.get("text")});this._findDropDown.set("expanded",false);this._findField.set("text",null)},_findDropDownUpdate:function(a){if(a.propertyName=="expanded"&&!a.newValue){this.application.setFocusedComponent(this._findField)}},_findKeyDown:function(a){switch(a.keyCode){case 27:this._findDropDown.set("expanded",false);break;case 40:if(this._findDropDown.get("expanded")&&this._findResults.children.length>0){this.application.setFocusedComponent(this._findResults.children[0])}break}},_findUpdate:function(d){var b=this.get("searchModel");if(d.propertyName!="text"||!d.newValue||!b){return}this._findResults.removeAll();var a=b.find(d.newValue);for(var c=0;c<a.length&&c<10;++c){this._findResults.add(new Echo.Button({styleName:"FindObject",text:a[c],actionCommand:a[c],events:{action:this._completionActionRef}}))}this._findDropDown.set("expanded",a.length>0)},_navigationAction:function(a){this.fireEvent({source:this,type:"navigateTo",value:this._navigationSelect.get("selectedId")})},update:function(d){this._navigationSelect.set("selectedId",null);var c=d&&d.navigationItems;if(!c){return}var a=[{id:"-",text:this._msg["NavigateTo.Prompt"]},{id:"^",text:this._msg["NavigateTo.ItemTop"]}];for(var b=0;b<c.length;++b){a.push({id:c[b],text:c[b]})}this._navigationSelect.set("items",a);a.push({id:"$",text:this._msg["NavigateTo.ItemBottom"]})}});CoreDocViewer.Workspace=Core.extend(Echo.ContentPane,{_classCache:null,contentPath:"content/",_contentArea:null,_content:null,_menu:null,_controller:null,_model:null,_activeClassModel:null,_searchModel:null,_stateModel:null,_options:null,$construct:function(a){this._options={};this._sections=a;this._msg=CoreDocViewer.getMessages();this._stateModel=new Extras.MenuStateModel();Echo.ContentPane.call(this,{children:[new Echo.SplitPane({styleName:"DefaultResizableLarge",separatorPosition:"18%",children:[new Echo.SplitPane({orientation:Echo.SplitPane.ORIENTATION_VERTICAL_TOP_BOTTOM,autoPositioned:true,layoutData:{minimumSize:"1em",maximumSize:"33%"},children:[new Echo.Panel({styleName:"TitlePanel",children:[new Echo.Label({text:this._msg["TitlePanel.Text"]})]}),new Echo.ContentPane({insets:0,children:[this._namespaceAccordion=new CoreDocViewer.NamespaceAccordion({styleName:"Default",font:{size:"8pt"},events:{objectSelect:Core.method(this,function(b){this._loadClass(b.objectName)})}})]})]}),new Echo.SplitPane({orientation:Echo.SplitPane.ORIENTATION_VERTICAL_TOP_BOTTOM,autoPositioned:true,children:[this._menu=new Extras.MenuBarPane({model:this.createMenuModel(),stateModel:this._stateModel,styleName:"Default",events:{action:Core.method(this,this._processMenuAction)}}),new Echo.SplitPane({orientation:Echo.SplitPane.ORIENTATION_VERTICAL_TOP_BOTTOM,autoPositioned:true,children:[this._toolbar=new CoreDocViewer.Toolbar(),this._contentArea=new Extras.TransitionPane({})]})]})]})]});this._toolbar.addListener("navigateTo",Core.method(this,function(b){if(this._content&&this._content.navigateTo){this._content.navigateTo(b.value)}}));this._toolbar.addListener("findObject",Core.method(this,function(c){var b=this._searchModel.find(c.value);if(b.length>0){this._loadClass(b[0])}}));this._loadInstance()},createMenuModel:function(){var a=new Extras.MenuModel(null,null,null,[new Extras.MenuModel(null,this._msg["Menu.ViewMenu"],null,[new Extras.OptionModel("home",this._msg["Menu.Home"],"image/icon/Icon16Home.png"),new Extras.SeparatorModel(),new Extras.OptionModel("expand",this._msg["Menu.Expand"],"image/icon/Icon16Add.png"),new Extras.OptionModel("collapse",this._msg["Menu.Collapse"],"image/icon/Icon16Remove.png"),new Extras.SeparatorModel(),new Extras.ToggleOptionModel("internal",this._msg["Menu.InternalProperties"]),new Extras.ToggleOptionModel("inherited",this._msg["Menu.InheritedProperties"]),new Extras.SeparatorModel(),new Extras.OptionModel("viewsource",this._msg["Menu.ViewSource"],"image/icon/Icon16Terminal.png"),new Extras.SeparatorModel(),new Extras.OptionModel("preferences",this._msg["Menu.Preferences"],"image/icon/Icon16Preferences.png")]),new Extras.MenuModel(null,this._msg["Menu.HelpMenu"],null,[new Extras.OptionModel("about",this._msg["Menu.About"],"image/icon/Icon16About.png")])]);return a},_displayHome:function(a){if(this._model.home){this._setContent(new CoreDocViewer.IFrame({url:this.contentPath+this._model.home+"/index.html"}))}else{this._setContent(null)}},displayObject:function(a){this._loadClass(a)},_loadClass:function(c){var b=[];var a=c;while(a){b.push(a);a=this._model.superclasses[a]}this._classCache.load(b,Core.method(this,function(){var d=this._classCache.get(c);this._openClass(d)}))},_loadInstance:function(){var a=new Core.Web.HttpConnection(this.contentPath+"Index.xml","GET");a.addResponseListener(Core.method(this,function(b){if(b.valid){this._model=new CoreDocViewer.Model.Instance(b.source.getResponseXml());this._searchModel=new CoreDocViewer.Model.Search(this._model);this._classCache=new CoreDocViewer.ClassCache(this._model);this._namespaceAccordion.set("model",this._model);this._toolbar.set("searchModel",this._searchModel);this.application.rootComponent.set("title",this._model.title);this._displayHome()}else{alert("Cannot load content.")}}));a.connect()},_openClass:function(b){this._activeClassModel=b;var a=new CoreDocViewer.ClassDisplay(this,b,this._options);this._setContent(a)},_redrawClass:function(){if(this._activeClassModel){this._openClass(this._activeClassModel)}},_processMenuAction:function(a){switch(a.modelId){case"home":this._displayHome();break;case"about":this.application.client.exec(CoreDocViewer.MODULE_ABOUT,Core.method(this,function(){this.add(new CoreDocViewer.AboutDialog())}));break;case"preferences":this.application.client.exec(CoreDocViewer.MODULE_PREFERENCES,Core.method(this,function(){this.add(new CoreDocViewer.PreferencesDialog(this.application))}));break;case"viewsource":if(this._activeClassModel){this.application.client.exec(CoreDocViewer.MODULE_SOURCE_VIEW,Core.method(this,function(){var b=new CoreDocViewer.SourceWindow(this._activeClassModel);this.add(b);this.application.setFocusedComponent(b)}))}break;case"expand":this._options.defaultExpanded=true;this._redrawClass();break;case"collapse":this._options.defaultExpanded=false;this._redrawClass();break;case"internal":this._options.showInternal=this._stateModel.isSelected("internal");this._redrawClass();break;case"inherited":this._options.showInherited=this._stateModel.isSelected("inherited");this._redrawClass();break}},_setContent:function(a){this._contentArea.removeAll();this._content=a;if(a!=null){this._contentArea.add(a)}this._toolbar.update(this._content)}});CoreDocViewer.DropDown=Core.extend(Echo.Component,{$load:function(){Echo.ComponentFactory.registerType("CoreDocViewer.DropDown",this)},componentType:"CoreDocViewer.DropDown"});CoreDocViewer.DropDownSync=Core.extend({_div:null,_expandedDiv:null,_expandedContentDiv:null,$load:function(){Echo.Render.registerPeer("CoreDocViewer.DropDown",this)},clientKeyDown:function(a){if(a.keyCode==27){this.component.set("expanded",false)}},_dropDownShow:function(){if(this._expandedDiv){return}this._expandedDiv=document.createElement("div");this._expandedDiv.style.cssText="position:absolute;min-width:15em;";Echo.Sync.Border.render(this.component.render("expandedBorder","1px outset #afafaf"),this._expandedDiv);Echo.Sync.Color.render(this.component.render("expandedBackground","#ffffff"),this._expandedDiv,"backgroundColor");Echo.Sync.Color.render(this.component.render("expandedForeground"),this._expandedDiv,"color");Echo.Sync.Insets.render(this.component.render("expandedInsets",3),this._expandedDiv,"padding");var a=new Core.Web.Measure.Bounds(this._div);this._expandedDiv.style.top=(a.top+a.height)+"px";this._expandedDiv.style.left=a.left+"px";if(this._expandedContentDiv){this._expandedDiv.appendChild(this._expandedContentDiv)}this.client.domainElement.appendChild(this._expandedDiv)},_dropDownHide:function(){if(!this._expandedDiv){return}if(this._expandedContentDiv){this._expandedDiv.removeChild(this._expandedContentDiv)}this._expandedDiv.parentNode.removeChild(this._expandedDiv);this._expandedDiv=null},renderAdd:function(c,b){this._div=document.createElement("div");this._div.id=this.component.renderId;if(this.component.children.length>0){var a=document.createElement("div");Echo.Render.renderComponentAdd(c,this.component.children[0],this._div);this._div.appendChild(a)}if(this.component.children.length>1){this._expandedContentDiv=document.createElement("div");Echo.Render.renderComponentAdd(c,this.component.children[1],this._expandedContentDiv)}b.appendChild(this._div)},renderDispose:function(a){this._dropDownHide();this._expandedContentDiv=null;this._div=null},renderUpdate:function(d){if(d.isUpdatedPropertySetIn({expanded:true})&&!d.hasAddedChildren()&&!d.hasRemovedChildren()){if(d.getUpdatedProperty("expanded")!=null){var a=this.component.get("expanded");if(a){this._dropDownShow()}else{this._dropDownHide()}return}}var b=this._div;var c=b.parentNode;this.renderDispose(d);c.removeChild(b);this.renderAdd(d,c);return true}});CoreDocViewer.ScrollPoint=Core.extend(Echo.Button,{$load:function(){Echo.ComponentFactory.registerType("CoreDocViewer.ScrollPoint",this)},componentType:"CoreDocViewer.ScrollPoint",scrollIntoView:function(){this.fireEvent({source:this,type:"scrollIntoView"})}});CoreDocViewer.ScrollPointSync=Core.extend({$load:function(){Echo.Render.registerPeer("CoreDocViewer.ScrollPoint",this)},_processScrollIntoViewRef:null,$construct:function(){this._processScrollIntoViewRef=Core.method(this,this._processScrollIntoView)},_processScrollIntoView:function(a){if(this._div.scrollIntoView){this._div.scrollIntoView()}else{this._div.focus()}},renderAdd:function(b,a){this.component.addListener("scrollIntoView",this._processScrollIntoViewRef);this._div=document.createElement("div");this._div.id=this.component.renderId;this._div.tabIndex=0;a.appendChild(this._div)},renderDispose:function(a){this.component.removeListener("scrollIntoView",this._processScrollIntoViewRef);this._div=null},renderUpdate:function(c){var a=this._div;var b=a.parentNode;this.renderDispose(c);b.removeChild(a);this.renderAdd(c,b);return true}});CoreDocViewer.ColorSelectButton=Core.extend(Echo.Button,{_msg:null,_color:null,_window:null,_colorSelect:null,$construct:function(a){this._msg=CoreDocViewer.getMessages();this.color=a?a:"#000000";Echo.Button.call(this,{width:50,height:20,border:"1px outset "+this.color,background:this.color,events:{action:Core.method(this,this._processAction)}})},_apply:function(a){this.color=this._colorSelect.get("color");this.set("border","1px outset "+this.color);this.set("background",this.color);this._window.parent.remove(this._window);this._window=null;this._colorSelect=null},_close:function(a){this._window.parent.remove(this._window);this._window=null;this._colorSelect=null},_processAction:function(){var a=this;while(!(a instanceof Echo.ContentPane)){a=a.parent}this._window=new Echo.WindowPane({styleName:"Default",title:"Select Color",width:220,height:260,modal:true,events:{close:Core.method(this,this._close)},children:[new Echo.SplitPane({autoPositioned:true,orientation:Echo.SplitPane.ORIENTATION_VERTICAL_BOTTOM_TOP,children:[new Echo.Row({styleName:"ControlPane",children:[new Echo.Button({styleName:"ControlPane.Button",text:this._msg["Generic.Ok"],icon:"image/icon/Icon24Ok.png",events:{action:Core.method(this,this._apply)}}),new Echo.Button({styleName:"ControlPane.Button",text:this._msg["Generic.Cancel"],icon:"image/icon/Icon24Cancel.png",events:{action:Core.method(this,this._close)}})]}),this._colorSelect=new Extras.ColorSelect({layoutData:{insets:"5px 10px"},color:this.color,hueWidth:16,saturationHeight:128,valueWidth:128})]})]});a.add(this._window)}});CoreDocViewer.Flow=Core.extend(Echo.Component,{$load:function(){Echo.ComponentFactory.registerType("CoreDocViewer.Flow",this)},componentType:"CoreDocViewer.Flow"});CoreDocViewer.FlowSync=Core.extend(Echo.Render.ComponentSync,{$load:function(){Echo.Render.registerPeer("CoreDocViewer.Flow",this)},renderAdd:function(e,b){this._div=document.createElement("div");Echo.Sync.Font.render(this.component.render("font"),this._div);Echo.Sync.Color.renderFB(this.component,this._div);for(var c=0;c<this.component.children.length;++c){var a=document.createElement("div");a.style.cssText="float:left;";Echo.Sync.Extent.render(this.component.render("cellSpacing"),a,"paddingRight");Echo.Render.renderComponentAdd(e,this.component.children[c],a);this._div.appendChild(a)}var d=document.createElement("div");d.style.clear="both";this._div.appendChild(d);b.appendChild(this._div)},renderDispose:function(a){this._div=null},renderUpdate:function(c){var a=this._spanElement;var b=a.parentNode;this.renderDispose(c);b.removeChild(a);this.renderAdd(c,b);return true}});CoreDocViewer.HtmlLabel=Core.extend(Echo.Component,{componentType:"CoreDocViewer.HtmlLabel"});CoreDocViewer.HtmlLabelSync=Core.extend(Echo.Render.ComponentSync,{$load:function(){Echo.Render.registerPeer("CoreDocViewer.HtmlLabel",this)},renderAdd:function(b,a){this._spanElement=document.createElement("span");Echo.Sync.Font.render(this.component.render("font"),this._spanElement);Echo.Sync.Color.renderFB(this.component,this._spanElement);this._spanElement.innerHTML=this.component.render("html","");a.appendChild(this._spanElement)},renderDispose:function(a){this._spanElement=null},renderUpdate:function(c){var a=this._spanElement;var b=a.parentNode;this.renderDispose(c);b.removeChild(a);this.renderAdd(c,b);return false}});CoreDocViewer.IFrame=Core.extend(Echo.Component,{componentType:"CoreDocViewer.IFrame"});CoreDocViewer.IFrameSync=Core.extend(Echo.Render.ComponentSync,{$load:function(){Echo.Render.registerPeer("CoreDocViewer.IFrame",this)},renderAdd:function(b,a){this._div=document.createElement("div");this._div.id=this.component.renderId;this._div.style.cssText="position:absolute;top:0;left:0;right:0;bottom:0;overflow:hidden;";this._iframe=document.createElement("iframe");this._iframe.src=this.component.get("url");this._iframe.frameBorder=0;this._div.appendChild(this._iframe);a.appendChild(this._div)},renderDisplay:function(){Core.Web.VirtualPosition.redraw(this._div);var a=new Core.Web.Measure.Bounds(this._div);this._iframe.style.width=a.width+"px";this._iframe.style.height=a.height+"px"},renderDispose:function(a){this._iframe=null},renderUpdate:function(c){var a=this._iframe;var b=a.parentNode;this.renderDispose(c);b.removeChild(a);this.renderAdd(c,b);return false}});CoreDocViewer.DOM={getPropertyElementValue:function(b,a){if(b==null){return null}var c=b.firstChild;while(c){if(c.nodeName==a){c=c.firstChild;var d="";while(c){if(c.nodeType==3||c.nodeType==4){d+=c.nodeValue}c=c.nextSibling}return d==""?null:d}c=c.nextSibling}return null},getElementText:function(a){var b=a.firstChild;var c="";while(b){if(b.nodeType==3||b.nodeType==4){c+=b.nodeValue}b=b.nextSibling}return c==""?null:c}};CoreDocViewer.Util={_LEADING_SPACES:/^(\s*)/,_TRAILING_SPACES:/(\s*)$/,_BLOCK_COMMENT_START:/^\/\*/,_BLOCK_COMMENT_END:/\*\//,_LINE_COMMENT:/^\/\//,BLANK_LINE:/^\s*$/,countLeadingSpaces:function(a){return this._LEADING_SPACES.exec(a)[1].length},countTrailingSpaces:function(a){return this._TRAILING_SPACES.exec(a)[1].length},randomItem:function(a){return a[Math.floor(Math.random()*a.length)]},trim:function(a){var c=this._LEADING_SPACES.exec(a)[1].length;var b=this._TRAILING_SPACES.exec(a)[1].length;return a.substring(c)}};CoreDocViewer.Model={};CoreDocViewer.Model.Instance=Core.extend({title:null,home:null,namespaces:null,namespaceToClasses:null,superclasses:null,classMap:null,$construct:function(a){var b;b=a.documentElement.firstChild;while(b){switch(b.nodeName){case"title":this.title=CoreDocViewer.DOM.getElementText(b);break;case"home":this.home=CoreDocViewer.DOM.getElementText(b);break;case"namespaces":this._processNamespaces(b);break}b=b.nextSibling}b=a.documentElement.firstChild;while(b){if(b.nodeName=="classes"){this._processClasses(b)}b=b.nextSibling}},getNamespace:function(d){var a=d.split(".");for(var b=a.length;b>0;--b){var c=a.slice(0,b).join(".");if(this.namespaceToClasses[c]){return c}}return null},_processClasses:function(c){var a=c.firstChild,b=0;this.superclasses=[];this.classMap={};while(a){if(a.nodeType==1&&a.nodeName=="class"){var e=a.getAttribute("name");e=a.getAttribute("name");var d=this.getNamespace(e);this.namespaceToClasses[d?d:"%global"].push(e);superclassName=a.getAttribute("super");if(superclassName){this.superclasses[e]=superclassName}}a=a.nextSibling}},_processNamespaces:function(c){var b=c.firstChild,a=0;this.namespaces=[];this.namespaceToClasses={};while(b){if(b.nodeType==1&&b.nodeName=="namespace"){this.namespaces[a++]=b.getAttribute("name");this.namespaceToClasses[b.getAttribute("name")]=[]}b=b.nextSibling}}});CoreDocViewer.Model.Search=Core.extend({_searchArray:null,_searchString:null,_references:null,model:null,$construct:function(a){this.model=a},_addReference:function(b,a){var c="."+b.toLowerCase();if(!this._references[c]){this._searchArray.push(c);this._references[c]=a}},find:function(d){if(!this._searchArray){this._generate()}var b=[];d="."+d.toLowerCase();var c=0;while(c!=-1){c=this._searchString.indexOf(d,c);if(c!=-1){var e=this._searchString.lastIndexOf("\n",c);var a=this._searchString.indexOf("\n",c);if(a===-1){a=this._searchString.length}var f=this._searchString.substring(e+1,a);b.push(this._references[f]);c++}}return b},_generate:function(){var c,a;this._searchArray=[];this._references={};for(c=0;c<this.model.namespaces.length;++c){var b=this.model.namespaceToClasses[this.model.namespaces[c]];for(a=0;a<b.length;++a){this._addReference(b[a],b[a])}}this._searchString=this._searchArray.join("\n")}});CoreDocViewer.Model.Class=Core.extend({qualifiedName:null,fileName:null,startIndex:null,endIndex:null,instance:null,superclass:null,$construct:function(b,a){this.instance=b;this.qualifiedName=CoreDocViewer.DOM.getPropertyElementValue(a.documentElement,"qualified-name");this.fileName=CoreDocViewer.DOM.getPropertyElementValue(a.documentElement,"file-name");this.startIndex=parseInt(CoreDocViewer.DOM.getPropertyElementValue(a.documentElement,"start-index"),10);this.endIndex=parseInt(CoreDocViewer.DOM.getPropertyElementValue(a.documentElement,"end-index"),10)+1;this.instance.classMap[this.qualifiedName]=this;var c=a.documentElement.firstChild;while(c){switch(c.nodeName){case"ancestors":this.ancestors=this._loadClasses(c);break;case"descendants":this.descendants=this._loadClasses(c);break;case"description":this.description=CoreDocViewer.DOM.getElementText(c);break;case"constructor":this.constructorData=this._loadConstructor(c);break;case"instance-fields":this.instanceFields=this._loadFields(c,"instance-field");break;case"instance-methods":this.instanceMethods=this._loadMethods(c,"instance-method");break;case"class-fields":this.classFields=this._loadFields(c,"class-field");break;case"class-methods":this.classMethods=this._loadMethods(c,"class-method");break;case"custom-blocks":this.customBlocks=this._loadCustomBlocks(c,"custom-blocks");break}c=c.nextSibling}},_loadCustomBlockItem:function(a){var c={};var b=a.firstChild;while(b){if(b.nodeType==1){c[b.nodeName]=CoreDocViewer.DOM.getElementText(b)}b=b.nextSibling}return c},_loadCustomBlockItems:function(b){var a=[];var c=b.firstChild;while(c){switch(c.nodeName){case"item":a.push(this._loadCustomBlockItem(c));break}c=c.nextSibling}return a},_loadCustomBlocks:function(a){var c=[];var b=a.firstChild;while(b){if(b.nodeName=="custom-block"){var d={name:b.getAttribute("name"),items:this._loadCustomBlockItems(b)};c.push(d)}b=b.nextSibling}return c},_loadClasses:function(c){var d=c.firstChild,b=0;var a=[];while(d){if(d.nodeName=="class"){a.push(d.firstChild.nodeValue)}d=d.nextSibling}return a.length>0?a:null},_loadConstructor:function(a){var c={};var b=a.firstChild;while(b){switch(b.nodeName){case"short-description":c.shortDescription=CoreDocViewer.DOM.getElementText(b);break;case"description":c.description=CoreDocViewer.DOM.getElementText(b);break;case"parameters":c.parameters=this._loadParameters(b);break}b=b.nextSibling}return c},_loadField:function(a){var c={};var b=a.firstChild;while(b){switch(b.nodeName){case"name":c.name=CoreDocViewer.DOM.getElementText(b);break;case"description":c.description=CoreDocViewer.DOM.getElementText(b);break;case"short-description":c.shortDescription=CoreDocViewer.DOM.getElementText(b);break;case"modifiers":c.modifiers=this._loadModifiers(b);break}b=b.nextSibling}return c},_loadFields:function(c,b){var a=[];var d=c.firstChild;while(d){if(d.nodeName==b){a.push(this._loadField(d))}d=d.nextSibling}return a},_loadMethod:function(a){var c={};var b=a.firstChild;while(b){switch(b.nodeName){case"name":c.name=CoreDocViewer.DOM.getElementText(b);break;case"description":c.description=CoreDocViewer.DOM.getElementText(b);break;case"short-description":c.shortDescription=CoreDocViewer.DOM.getElementText(b);break;case"modifiers":c.modifiers=this._loadModifiers(b);break;case"parameters":c.parameters=this._loadParameters(b);break;case"return-value":c.returnValue=this._loadReturnValue(b);break}b=b.nextSibling}return c},_loadMethods:function(c,a){var b=[];var d=c.firstChild;while(d){if(d.nodeName==a){b.push(this._loadMethod(d))}d=d.nextSibling}return b},_loadParameter:function(a){var c={};var b=a.firstChild;while(b){switch(b.nodeName){case"name":c.name=CoreDocViewer.DOM.getElementText(b);break;case"type":c.type=CoreDocViewer.DOM.getElementText(b);break;case"description":c.description=CoreDocViewer.DOM.getElementText(b);break}b=b.nextSibling}return c},_loadModifiers:function(b){var a={};var c=b.firstChild;while(c){if(c.nodeName=="modifier"){a[CoreDocViewer.DOM.getElementText(c).toLowerCase()]=true}c=c.nextSibling}return a},_loadParameters:function(a){var c=[];var b=a.firstChild;while(b){if(b.nodeName=="parameter"){c.push(this._loadParameter(b))}b=b.nextSibling}return c},_loadReturnValue:function(b){var a={};var c=b.firstChild;while(c){switch(c.nodeName){case"type":a.type=CoreDocViewer.DOM.getElementText(c);break;case"description":a.description=CoreDocViewer.DOM.getElementText(c);break;case"shortDescription":a.shortDescription=CoreDocViewer.DOM.getElementText(c);break}c=c.nextSibling}return a}});CoreDocViewer.ObjectButton=Core.extend(Echo.Button,{$construct:function(a,b,c){Echo.Button.call(this,{styleName:"ObjectButton",text:b,events:{action:Core.method(this,function(d){a.displayObject(b)})}});if(c){this.setEnabled(false)}}});CoreDocViewer.NamespaceAccordion=Core.extend(Extras.AccordionPane,{_namespaceContainers:null,_actionHandler:null,_activeButton:null,_msg:null,$construct:function(a){this._msg=CoreDocViewer.getMessages();Extras.AccordionPane.call(this,a);this._namespaceContainers={};this._actionHandler=Core.method(this,this._processAction);this.addListener("property",Core.method(this,function(b){if(b.propertyName=="model"){this._processModelUpdate()}}))},_addObject:function(d,b){var a=this._namespaceContainers[d];if(!a){var e=d=="%global"?this._msg["Namespace.Global"]:d;a=new Echo.Column({layoutData:{title:e,icon:"image/icon/Icon16x14Package.png"}});this.add(a);this._namespaceContainers[d]=a}var c=new Echo.Button({styleName:"NamespaceView.ClassButton",text:b,events:{action:this._actionHandler}});a.add(c)},_processAction:function(a){if(this._activeButton){this._activeButton.setStyleName("NamespaceView.ClassButton")}this._activeButton=a.source;this._activeButton.setStyleName("NamespaceView.SelectedClassButton");this.fireEvent({type:"objectSelect",source:this,objectName:a.source.get("text")})},_processModelUpdate:function(){this.removeAll();var b=this.get("model");if(b==null){return}for(var d=0;d<b.namespaces.length;++d){var c=b.namespaceToClasses[b.namespaces[d]];for(var a=0;a<c.length;++a){this._addObject(b.namespaces[d],c[a])}}}});CoreDocViewer.ClassDisplay=Core.extend(Echo.ContentPane,{$static:{_fieldComponentArraySort:function(d,c){return d.name>c.name}},_content:null,_controller:null,_model:null,_options:null,navigationItems:null,_scrollPointMap:null,$construct:function(a,c,b){this._scrollPointMap={};this._options=b||{};this._msg=CoreDocViewer.getMessages();this._controller=a;this._model=c;Echo.ContentPane.call(this,{children:[this._content=new Echo.Column({cellSpacing:"1em",insets:"1em"})]});this.create()},create:function(){this._content.removeAll();this._content.add(this._scrollPointMap["^"]=new CoreDocViewer.ScrollPoint());this._content.add(new Echo.Label({text:this._model.qualifiedName,font:{typeface:"serif",size:"18pt",italic:true}}));this._content.add(new CoreDocViewer.ClassDisplay.AncestorDisplay(this._controller,this._model));if(this._model.descendants){this._content.add(new CoreDocViewer.ClassDisplay.DescendantDisplay(this._controller,this._model))}if(this._model.description){this._content.add(new CoreDocViewer.HtmlLabel({html:this._model.description}))}if(this._model.constructorData){this._content.add(new CoreDocViewer.ClassDisplay.ExpandableBlock(this._controller,this._model,{title:this._msg["Doc.Constructor"],shortDescription:this._model.constructorData.shortDescription,description:this._model.constructorData.description,parameters:this._model.constructorData.parameters}))}this.navigationItems=[];if(this._createFieldBlocks(this._msg["Doc.ClassFields"],"classFields",Core.method(this,this._createFieldBlockData),false)){this.navigationItems.push(this._msg["Doc.ClassFields"])}if(this._createFieldBlocks(this._msg["Doc.ClassMethods"],"classMethods",Core.method(this,this._createMethodBlockData),false)){this.navigationItems.push(this._msg["Doc.ClassMethods"])}if(this._createFieldBlocks(this._msg["Doc.InstanceFields"],"instanceFields",Core.method(this,this._createFieldBlockData),true)){this.navigationItems.push(this._msg["Doc.InstanceFields"])}if(this._createFieldBlocks(this._msg["Doc.InstanceMethods"],"instanceMethods",Core.method(this,this._createMethodBlockData),true)){this.navigationItems.push(this._msg["Doc.InstanceMethods"])}this._createCustomBlocks();this._content.add(this._scrollPointMap["$"]=new CoreDocViewer.ScrollPoint())},_createCustomBlocks:function(){var c=this._model,d,b,f={},e,a;while(c){if(c.customBlocks){for(d=0;d<c.customBlocks.length;++d){a=c.customBlocks[d].name;e=f[a];if(!e){e={name:a,items:[],addedItems:{}};f[a]=e}for(b=0;b<c.customBlocks[d].items.length;++b){if(!e.addedItems[c.customBlocks[d].items[b].name]){e.addedItems[c.customBlocks[d].items[b].name]=true;e.items.push(c.customBlocks[d].items[b])}}}}if(this._options.showInherited){c=c.superclass}else{c=null}}for(a in f){f[a].items.sort(CoreDocViewer.ClassDisplay._fieldComponentArraySort);this._createCustomBlock(f[a]);this.navigationItems.push(a)}},_createCustomBlock:function(b){var c=new CoreDocViewer.ScrollPoint();this._scrollPointMap[b.name]=c;this._content.add(c);this._content.add(new CoreDocViewer.ClassDisplay.Title(b.name));for(var a=0;a<b.items.length;++a){this._content.add(new CoreDocViewer.ClassDisplay.ExpandableBlock(this._controller,this._model,{title:b.items[a].name,description:b.items[a].description},this._options.defaultExpanded))}},_createFieldBlocks:function(j,l,g,k){var d;var m={};var e=this._model;var h=[];while(e){var f=e[l];if(f){for(d=0;d<f.length;++d){if(m[f[d].name]){continue}if((f[d].modifiers||{}).internal&&!this._options.showInternal){continue}var a=g(f[d]);a.inherited=e!=this._model;var c=new CoreDocViewer.ClassDisplay.ExpandableBlock(this._controller,e,a,this._options.defaultExpanded);h.push(c);m[f[d].name]=true}}if(k&&this._options.showInherited){e=e.superclass}else{e=null}}h.sort(CoreDocViewer.ClassDisplay._fieldComponentArraySort);if(h.length>0){var b=new CoreDocViewer.ScrollPoint();this._scrollPointMap[j]=b;this._content.add(b);this._content.add(new CoreDocViewer.ClassDisplay.Title(j));for(d=0;d<h.length;++d){this._content.add(h[d])}}return h.length>0},_createMethodBlockData:function(a){return{title:a.name+"()",modifiers:a.modifiers,description:a.description,shortDescription:a.shortDescription,parameters:a.parameters,returnValue:a.returnValue}},_createFieldBlockData:function(a){return{title:a.name,modifiers:a.modifiers,description:a.description,shortDescription:a.shortDescription}},navigateTo:function(a){var b=this._scrollPointMap[a];if(b){b.scrollIntoView()}}});CoreDocViewer.ClassDisplay.AncestorDisplay=Core.extend(Echo.Column,{$construct:function(a,b){var f;Echo.Column.call(this,{styleName:"Box",children:[new Echo.Label({styleName:"Box.Title",text:"Inheritance Hierarchy"}),f=new Echo.Column({styleName:"Box.Content"})]});f.add(new CoreDocViewer.ObjectButton(a,"Object",true));var d=b.ancestors?b.ancestors.length:0;if(d){for(var c=0;c<d;++c){var e=new CoreDocViewer.ObjectButton(a,b.ancestors[c]);e.set("layoutData",{insets:"0 0 0 "+((c+1)*10)+"px"});f.add(e)}}e=new CoreDocViewer.ObjectButton(a,b.qualifiedName,true);e.set("layoutData",{insets:"0 0 0 "+((d+1)*10)+"px"});e.set("font",{bold:true});f.add(e)}});CoreDocViewer.ClassDisplay.DescendantDisplay=Core.extend(Echo.Column,{$construct:function(a,b){var d;Echo.Column.call(this,{styleName:"Box",children:[new Echo.Label({styleName:"Box.Title",text:"Direct Known Descendants"}),d=new CoreDocViewer.Flow({styleName:"Box.Content"})]});for(var c=0;c<b.descendants.length;++c){d.add(new CoreDocViewer.ObjectButton(a,b.descendants[c]))}}});CoreDocViewer.ClassDisplay.Title=Core.extend(Echo.Panel,{$construct:function(a){Echo.Panel.call(this,{styleName:"ClassDisplay.Title",children:[new Echo.Label({text:a})]})}});CoreDocViewer.ClassDisplay.ExpandableBlock=Core.extend(Echo.Column,{_model:null,_controller:null,_blockData:null,expanded:null,_content:null,_titleButton:null,name:null,$construct:function(a,c,d,b){this._blockData=d;this.expanded=b;this._model=c;this._controller=a;this.name=this._blockData.title;Echo.Column.call(this,{styleName:"Box",children:[this._titleButton=new Echo.Button({styleName:"Box.Title",text:this._blockData.title,font:{typeface:"monospace",bold:true},events:{action:Core.method(this,function(f){this.expanded=!this.expanded;this.create()})}})]});this.create()},create:function(){if(this._content){this._content.parent.remove(this._content)}this._content=new Echo.Column({styleName:"Box.Content",cellSpacing:10});var c=false;if(this._blockData.modifiers){var f=new CoreDocViewer.Flow({cellSpacing:5});if(this._blockData.modifiers.internal){f.add(new Echo.Panel({styleName:"FieldModifier.Internal",children:[new Echo.Label({text:"Internal"})]}))}if(this._blockData.modifiers.override){f.add(new Echo.Panel({styleName:"FieldModifier.Override",children:[new Echo.Label({text:"Override"})]}))}else{if(this._blockData.modifiers.virtual){f.add(new Echo.Panel({styleName:"FieldModifier.Virtual",children:[new Echo.Label({text:"Virtual"})]}))}}if(this._blockData.modifiers.inherited){f.add(new Echo.Panel({styleName:"FieldModifier.Inherited",children:[new Echo.Label({text:"Inherited"})]}))}if(this._blockData.modifiers["abstract"]){f.add(new Echo.Panel({styleName:"FieldModifier.Abstract",children:[new Echo.Label({text:"Abstract"})]}))}this._content.add(f)}if(this._blockData.description){if(this.expanded||this._blockData.description==this._blockData.shortDescription){this._content.add(new CoreDocViewer.HtmlLabel({html:this._blockData.description}))}else{c=true;this._content.add(new CoreDocViewer.HtmlLabel({html:this._blockData.shortDescription}))}}if(this._blockData.parameters){if(this.expanded){var g;this._content.add(new Echo.Column({children:[new Echo.Label({text:"Paramaters",font:{size:"8pt",bold:true}}),g=new Echo.Column({cellSpacing:"1em"})]}));for(var d=0;d<this._blockData.parameters.length;++d){var b;var h=new Echo.Column({layoutData:{insets:"0 0 0 1em"},children:[b=new Echo.Row({cellSpacing:"1em",children:[new Echo.Label({foreground:"#007f00",font:{typeface:"monospace"},text:this._blockData.parameters[d].name})]})]});var e=this._blockData.parameters[d].type;if(e){b.add(this._createObjectReference(e))}if(this._blockData.parameters[d].description){h.add(new CoreDocViewer.HtmlLabel({layoutData:{insets:"0 0 0 3em"},html:this._blockData.parameters[d].description}))}g.add(h)}}else{c=true}}if(this._blockData.returnValue){if(this.expanded){var a;this._content.add(new Echo.Column({children:[new Echo.Label({text:"Return Value",font:{size:"8pt",bold:true}}),a=new Echo.Column({layoutData:{insets:"0 0 0 1em"}})]}));if(this._blockData.returnValue.type){a.add(this._createObjectReference(this._blockData.returnValue.type))}if(this._blockData.returnValue.description){a.add(new CoreDocViewer.HtmlLabel({returnValueColumn:{insets:"0 0 0 3em"},html:this._blockData.returnValue.description}))}}else{c=true}}if(this.expanded||c){this._titleButton.set("icon",this.expanded?"image/icon/Icon24Remove.png":"image/icon/Icon24Add.png")}else{this._titleButton.set("icon","image/icon/Icon24Dot.png");this._titleButton.setEnabled(false)}if(this._content.children.length>0){this.add(this._content)}else{this._Content=null}},_createObjectReference:function(a){if(this._model.instance.classMap[a]){return new CoreDocViewer.ObjectButton(this._controller,a,false)}else{return new Echo.Label({font:{italic:true},text:"("+a+")"})}}});CoreDocViewer.StyleSheet=new Echo.StyleSheet({Box:{Column:{border:{top:"1px solid #e7e7e7",left:"1px solid #e7e7e7",bottom:"1px solid #afafaf",right:"1px solid #afafaf"}}},"Box.Title":{Component:{font:{size:"8pt"},layoutData:{insets:"3px 1em",background:"#efefef"}}},"Box.Content":{Component:{insets:"3px 1em"}},FindObject:{"CoreDocViewer.DropDown":{expandedBorder:"1px dashed #4f4fff",expandedBackground:"#cfcfff"},Button:{insets:"0px 5px",focusedForeground:"#ffffff",focusedBackground:"#3939d6",focusedBackgroundImage:{url:"image/fill/GradientBlue.png",y:"50%"},focusedEnabled:true,rolloverForeground:"#ffffff",rolloverBackground:"#3939d6",rolloverBackgroundImage:{url:"image/fill/GradientBlue.png",y:"50%"},rolloverEnabled:true,pressedForeground:"#dfffff",pressedBackground:"#3939d6",pressedBackgroundImage:{url:"image/fill/GradientBlueHighlight.png",y:"50%"},pressedEnabled:true}},ObjectButton:{Button:{insets:"1px 5px",lineWrap:false,foreground:"#1f4f2f",rolloverForeground:"#ffffff",rolloverBackground:"#3939d6",rolloverBackgroundImage:{url:"image/fill/GradientBlue.png",y:"50%"},rolloverEnabled:true,pressedForeground:"#dfffff",pressedBackground:"#3939d6",pressedBackgroundImage:{url:"image/fill/GradientBlueHighlight.png",y:"50%"},pressedEnabled:true}},ControlPane:{Row:{layoutData:{backgroundImage:{url:"image/fill/GradientWhiteSilver.png",y:"50%"},overflow:Echo.SplitPane.OVERFLOW_HIDDEN},cellSpacing:3,insets:"0px 9px"}},"ControlPane.Button":{Button:{insets:"3px 15px",lineWrap:false,foreground:"#000000",rolloverForeground:"#ffffff",rolloverBackground:"#3939d6",rolloverBackgroundImage:{url:"image/fill/GradientBlue.png",y:"50%"},rolloverEnabled:true,pressedForeground:"#dfffff",pressedBackground:"#3939d6",pressedBackgroundImage:{url:"image/fill/GradientBlueHighlight.png",y:"50%"},pressedEnabled:true}},Default:{AbstractButton:{border:"1px outset #709bcd",foreground:"#000000",backgroundImage:{url:"image/fill/InputField.png",y:"50%"},pressedBackgroundImage:{url:"image/fill/InputFieldPressed.png",y:"50%"},pressedBorder:"1px inset #709bcd",rolloverBackgroundImage:{url:"image/fill/InputFieldHighlight.png",y:"50%"},rolloverBorder:"1px outset #bcd6f4",pressedEnabled:true,rolloverEnabled:true,insets:"1px 7px",disabledForeground:"#93bed5"},AbstractListComponent:{border:"2px groove #cfdfff",background:"#cfdfff"},"Extras.AccordionPane":{animationTime:0,tabBackground:"#dfdfef",tabBorder:{top:"1px solid #efefff",bottom:"1px solid #afafbf"},tabForeground:"#000000",tabFont:{size:"9pt"},tabRolloverEnabled:true,tabRolloverBackground:"#efefff"},"Extras.MenuBarPane":{animationTime:150,menuOpacity:90,background:"#cfcfd7",border:{top:"1px solid #dfdfe7",bottom:"1px solid #bfbfc7"},menuBorder:{left:"1px solid #dfdfe7",top:"1px solid #dfdfe7",right:"1px solid #bfbfc7",bottom:"1px solid #bfbfc7"},selectionBackgroundImage:"image/fill/ShadowBlueGrey.png"},TextComponent:{background:"#cfdfff",border:"2px groove #cfdfff",backgroundImage:{url:"image/fill/InputField.png",repeat:"repeat-x",y:"50%"}},WindowPane:{ieAlphaRenderBorder:true,titleForeground:"#ffffff",titleBackground:"#2f2f4f",titleInsets:"5px 10px",controlsInsets:"-1px 5px",closeIcon:"image/window/simple/ControlClose.png",closeRolloverIcon:"image/window/simple/ControlCloseRollover.png",maximizeIcon:"image/window/simple/ControlMaximize.png",maximizeRolloverIcon:"image/window/simple/ControlMaximizeRollover.png",minimizeIcon:"image/window/simple/ControlMinimize.png",minimizeRolloverIcon:"image/window/simple/ControlMinimizeRollover.png",titleBackgroundImage:{url:"image/window/simple/Header.png",repeat:"repeat-x",y:"50%"},border:{contentInsets:"8px 14px 14px 8px",borderInsets:"17px 23px 23px 17px",topLeft:"image/window/simple/BorderTopLeft.png",top:"image/window/simple/BorderTop.png",topRight:"image/window/simple/BorderTopRight.png",left:"image/window/simple/BorderLeft.png",right:"image/window/simple/BorderRight.png",bottomLeft:"image/window/simple/BorderBottomLeft.png",bottom:"image/window/simple/BorderBottom.png",bottomRight:"image/window/simple/BorderBottomRight.png"}}},"Default.Top.Surround":{"Extras.TabPane":{insets:0,tabIconTextMargin:3,tabCloseIconTextMargin:8,background:"#ffffff",tabSpacing:-20,imageBorder:{contentInsets:"8px 14px 14px 8px",borderInsets:"17px 23px 23px 17px",topLeft:"image/window/simple/BorderTopLeft.png",top:"image/window/simple/BorderTop.png",topRight:"image/window/simple/BorderTopRight.png",left:"image/window/simple/BorderLeft.png",right:"image/window/simple/BorderRight.png",bottomLeft:"image/window/simple/BorderBottomLeft.png",bottom:"image/window/simple/BorderBottom.png",bottomRight:"image/window/simple/BorderBottomRight.png"},tabActiveBackground:"#ffffff",tabActiveBackgroundInsets:"8px 14px 0px 8px",tabActiveHeightIncrease:3,tabActiveImageBorder:{contentInsets:"8px 14px 0px 8px",borderInsets:"17px 23px 0px 17px",topLeft:"image/window/simple/BorderTopLeft.png",top:"image/window/simple/BorderTop.png",topRight:"image/window/simple/BorderTopRight.png",left:"image/window/simple/BorderLeft.png",right:"image/window/simple/BorderRight.png",bottomLeft:null,bottom:null,bottomRight:null},tabActiveInsets:"4px 10px",tabInactiveBackground:"#e7e7e7",tabInactiveBackgroundInsets:"8px 14px 1px 8px",tabInactiveImageBorder:{contentInsets:"8px 14px 1px 8px",borderInsets:"17px 23px 1px 17px",topLeft:"image/window/simple/BorderTopLeft.png",top:"image/window/simple/BorderTop.png",topRight:"image/window/simple/BorderTopRight.png",left:"image/window/simple/BorderLeft.png",right:"image/window/simple/BorderRight.png",bottomLeft:null,bottom:null,bottomRight:null},tabInactiveBackgroundImage:{url:"image/fill/LightedSilver.png",repeat:"repeat-x",y:"53%"},tabInactiveInsets:"4px 10px",tabCloseIcon:"image/icon/Icon16TabClose.png",tabRolloverEnabled:true,tabRolloverForeground:"#ffffff",tabRolloverBackgroundImage:{url:"image/fill/GradientBlue.png",y:"50%"},tabRolloverCloseIcon:"image/icon/Icon16TabCloseRollover.png"}},DefaultResizableLarge:{SplitPane:{separatorHeight:12,separatorWidth:12,resizable:true,separatorHorizontalImage:{url:"image/splitpane/SeparatorH12.png",y:"50%"},separatorHorizontalRolloverImage:{url:"image/splitpane/SeparatorH12Rollover.png",y:"50%"},separatorVerticalImage:{url:"image/splitpane/SeparatorV12.png",x:"50%"},separatorVerticalRolloverImage:{url:"image/splitpane/SeparatorV12Rollover.png",x:"50%"}}},"NamespaceView.ClassButton":{Button:{insets:"1px 5px",lineWrap:false,foreground:"#000000",border:"1px solid #ffffff",rolloverBackground:"#afffaf",rolloverEnabled:true,rolloverBorder:"1px solid #9fef9f",pressedBackground:"#9fef9f",pressedBorder:"1px solid #8fdf8f",pressedEnabled:true}},"NamespaceView.SelectedClassButton":{Button:{border:"1px solid #9f9fef",background:"#8f8fdf",insets:"1px 5px",lineWrap:false}},"ClassDisplay.Title":{Panel:{insets:"1ex 1em",background:"#fff4e7",border:"1px dashed #ffdfaf",font:{typeface:"serif",size:"13pt",italic:true}}},TitlePanel:{Panel:{alignment:"center",background:"#4f4f5f",foreground:"#ffffff",border:{top:"1px solid #5f5f6f",bottom:"1px solid #3f3f4f",left:null,right:null},font:{bold:true,italic:true},insets:"1em 0px"}},"Layout.Bordered":{Grid:{width:"100%",insets:"3px 8px",background:"#ffffff",border:"2px groove #7ea4d3"}},Junior:{"Extras.ColorSelect":{hueWidth:10,saturationHeight:60,valueWidth:60}},PreferencesColumn:{Column:{border:{left:"1px solid #afafaf",top:"1px solid #afafaf",right:"1px solid #dfdfdf",bottom:"1px solid #dfdfdf"},cellSpacing:8,insets:"8px 20px"}},PreferencesTitle:{Label:{foreground:"#2f2faf",font:{bold:true}}},Toolbar:{Panel:{background:"#efefef",border:{top:"1px solid #f3f3f3",bottom:"1px solid #dfdfdf",left:null,right:null},insets:"2px 10px"}},"FieldModifier.Override":{Panel:{border:"1px solid #dfdfaf",background:"#fffffef",font:{typeface:"monospace",size:"8pt"},insets:"1px 8px"}},"FieldModifier.Inherited":{Panel:{border:"1px solid #afafdf",background:"#efefff",font:{typeface:"monospace",size:"8pt"},insets:"1px 8px"}},"FieldModifier.Virtual":{Panel:{border:"1px solid #afdfaf",background:"#efffef",font:{typeface:"monospace",size:"8pt"},insets:"1px 8px"}},"FieldModifier.Abstract":{Panel:{border:"1px solid #dfafdf",background:"#ffefff",font:{typeface:"monospace",size:"8pt"},insets:"1px 8px"}},"FieldModifier.Internal":{Panel:{border:"1px solid #dfafaf",background:"#ffefef",font:{typeface:"monospace",size:"8pt"},insets:"1px 8px"}}});CoreDocViewer.Messages=new Core.ResourceBundle({"Generic.Ok":"Ok","Generic.Cancel":"Cancel","Generic.Start":"Start","Generic.Yes":"Yes","Generic.No":"No","Generic.Enabled":"Enabled","Generic.Disabled":"Disabled","FindObject.Prompt":"Find Object:","NavigateTo.Prompt":"Navigate to:","NavigateTo.ItemTop":"Top","NavigateTo.ItemBottom":"Bottom","Namespace.Global":"[Global]","Doc.Constructor":"Constructor","Doc.InstanceMethods":"Instance Methods","Doc.InstanceFields":"Instance Fields","Doc.ClassMethods":"Class Methods","Doc.ClassFields":"Class Fields","PrefDialog.WindowTitle":"Preferences","PrefDialog.PromptAnimations":"Animated Screen Transitions:","PrefDialog.PromptSyntaxHighlight":"Source Syntax Highlighting:","SourceWindow.TitlePrompt":"View Source:","SourcePane.XHRError":"The source code could not be retrieved.  If you are visiting this application from a local file, this may be due to security constraints imposed by your browser.","TitlePanel.Text":"CoreDoc Explorer","About.WindowTitle":"NextApp CoreDoc Explorer","About.GeneralTab":"General Information","About.General0":"CoreDoc Explorer v0.1","About.General1":"Copyright 2006-2009 NextApp, Inc.","About.General2":'This application is distributed under the terms of the Mozilla Public License.  See <a href="http://echo.nextapp.com/site/license/mpl">http://echo.nextapp.com/site/license/mpl</a> for full license text.',"About.General3":'More information about CoreDocViewer and the source code may be found at <a href="http://echo.nextapp.com/site/corejs/">http://echo.nextapp.com/site/corejs</a>.',"About.LibrariesTab":"Libraries","About.Libraries0":'CoreDocViewer is based on the Echo3 framework, available from <a href="http://echo.nextapp.com/site/echo3/">http://echo.nextapp.com/site/echo3</a>.',"About.Libraries1":'This application uses Google Code Prettify for highlighting JavaScript code, available from <a href="http://code.google.com/p/google-code-prettify/">http://code.google.com/p/google-code-prettify/</a>.',"Menu.ViewMenu":"View","Menu.HelpMenu":"Help","Menu.Home":"Display Home Screen","Menu.Collapse":"Hide Details For All Properties","Menu.Expand":"Show Details For All Properties","Menu.InternalProperties":"Include Private / Internal Properties","Menu.InheritedProperties":"Include Inherited Properties","Menu.Preferences":"Preferences...","Menu.ViewSource":"View Source Code","Menu.About":"About"});