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.ENGINE_MSHTML){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,NOT_SUPPORTED_INPUT_SELECTION:null,NOT_SUPPORTED_RANGE: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,PROPRIETARY_IE_RANGE: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_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.NOT_SUPPORTED_RANGE=true;this.NOT_SUPPORTED_INPUT_SELECTION=true;this.PROPRIETARY_IE_RANGE=true;this.PROPRIETARY_EVENT_MOUSE_ENTER_LEAVE_SUPPORTED=true;this.PROPRIETARY_EVENT_SELECT_START_SUPPORTED=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){if(!g){alert(new Error().stack);}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:32000;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.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.ENGINE_MSHTML){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.ENGINE_MSHTML){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.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.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:32600;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.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:32600;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.ENGINE_GECKO||Core.Web.Env.ENGINE_MSHTML;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"}},menuModel:null,stateModel:null,element:null,active:false,_openMenuPath:null,_maskDeployed:false,_processMaskClickRef:null,_overlay:null,$construct:function(){this._processMaskClickRef=Core.method(this,this._processMaskClick);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);
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)}},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)},clientKeyDown:function(a){if(a.keyCode==27){this.deactivate();return false}return true},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;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:30000;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:30000;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:30000;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:30000;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()},renderFocus:function(){Core.Web.DOM.focusElement(this.element)},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 v,A,D,w,s,B;this.element=document.createElement("div");this.element.style.position="absolute";
this.element.style.zIndex=30050;var c=(Core.Web.Env.NOT_SUPPORTED_CSS_OPACITY?100:this.component.render("menuOpacity",100))/100;var k=document.createElement("div");k.style.cssText="position:relative;z-index:10;";this.element.appendChild(k);Echo.Sync.LayoutDirection.render(this.component.getLayoutDirection(),k);Echo.Sync.Insets.render(Extras.Sync.Menu.RenderedMenu.DEFAULTS.menuInsets,k,"padding");Echo.Sync.Border.render(this.component.render("menuBorder",Extras.Sync.Menu.DEFAULTS.border),k);var a;var f=this.component.render("menuForeground");if(f){a=f}else{a=this.component.render("foreground",Extras.Sync.Menu.DEFAULTS.foreground)}Echo.Sync.Color.render(a,k,"color");var m=this.component.render("menuFont");if(!m){m=this.component.render("font")}if(m){Echo.Sync.Font.render(m,k)}var t;if(c<1){t=document.createElement("div");t.style.cssText="position:absolute;z-index:1;width:100%;height:100%;top:0;bottom:0;";t.style.opacity=c;this.element.appendChild(t)}else{t=this.element}var x;var o=this.component.render("menuBackground");
if(o){x=o}else{x=this.component.render("background",Extras.Sync.Menu.DEFAULTS.background)}Echo.Sync.Color.render(x,t,"backgroundColor");var b;var r=this.component.render("menuBackgroundImage");if(r){b=r}else{if(o==null){b=this.component.render("backgroundImage")}}if(b){Echo.Sync.FillImage.render(b,t,null)}var d=document.createElement("table");d.style.borderCollapse="collapse";k.appendChild(d);var h=document.createElement("tbody");d.appendChild(h);var n=this.menuModel.items;var j=false;for(v=0;v<n.length;++v){A=n[v];if(A.icon||A instanceof Extras.ToggleOptionModel){j=true;break}}var u,p;if(j){var y=Echo.Sync.Insets.toPixels(Extras.Sync.Menu.RenderedMenu.DEFAULTS.menuItemInsets);p="0px 0px 0px "+y.left+"px";u=y.top+"px "+y.right+"px "+y.bottom+"px "+y.left+"px"}else{u=Extras.Sync.Menu.RenderedMenu.DEFAULTS.menuItemInsets}for(v=0;v<n.length;++v){A=n[v];if(A instanceof Extras.OptionModel||A instanceof Extras.MenuModel){B=document.createElement("tr");this.itemElements[A.id]=B;B.style.cursor="pointer";
h.appendChild(B);if(j){s=document.createElement("td");Echo.Sync.Insets.render(p,s,"padding");if(A instanceof Extras.ToggleOptionModel){var l;var q=this.stateModel&&this.stateModel.isSelected(A.modelId);if(A instanceof Extras.RadioOptionModel){l=q?"image/menu/RadioOn.gif":"image/menu/RadioOff.gif"}else{l=q?"image/menu/ToggleOn.gif":"image/menu/ToggleOff.gif"}D=document.createElement("img");D.src=this.client.getResourceUrl("Extras",l);s.appendChild(D)}else{if(A.icon){D=document.createElement("img");Echo.Sync.ImageReference.renderImg(A.icon,D);s.appendChild(D)}}B.appendChild(s)}w=document.createElement("td");Echo.Sync.Insets.render(u,w,"padding");w.style.whiteSpace="nowrap";if(this.stateModel&&!this.stateModel.isEnabled(A.modelId)){Echo.Sync.Color.render(this.component.render("disabledForeground",Extras.Sync.Menu.DEFAULTS.disabledForeground),w,"color")}w.appendChild(document.createTextNode(A.text));B.appendChild(w);if(A instanceof Extras.MenuModel){var g=document.createElement("td");g.style.textAlign="right";
D=document.createElement("img");var z=this.component.render("menuExpandIcon",this.client.getResourceUrl("Extras","image/menu/ArrowRight.gif"));D.setAttribute("src",z.url?z.url:z);D.setAttribute("alt","");g.appendChild(D);B.appendChild(g)}else{w.colSpan=2}}else{if(A instanceof Extras.SeparatorModel){if(v===0||v===n.length-1||n[v-1] instanceof Extras.SeparatorModel||n[v+1] instanceof Extras.SeparatorModel){continue}B=document.createElement("tr");h.appendChild(B);w=document.createElement("td");w.colSpan=j?3:2;w.style.padding="3px 0px";var C=document.createElement("div");C.style.cssText="border-top:1px solid #a7a7a7;height:0;font-size:1px;line-height:0";w.appendChild(C);B.appendChild(w)}}}var e=new Core.Web.Measure.Bounds(this.element);this.width=e.width;this.height=e.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;";if(!this.component.render("lineWrap")){this._contentDiv.style.whiteSpace="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:30000;";
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:30000;";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}}});DemoApp=Core.extend(Echo.Application,{$static:{MODULE_ABOUT:["lib/extras/Application.TabPane.js","lib/extras/Sync.TabPane.js","app/About.js"],MODULE_AUTOMATIC_DEMO:["lib/echo/Sync.Composite.js","lib/echo/Sync.List.js","lib/echo/Sync.ToggleButton.js","app/AutomaticDemo.js"],MODULE_SOURCE_VIEW:["app/SourceView.js"],MODULE_PREFERENCES:["lib/echo/Sync.List.js","lib/echo/Sync.ToggleButton.js","lib/extras/Application.ColorSelect.js","lib/extras/Sync.ColorSelect.js","app/Preferences.js"],MODULE_DEMO_WINDOWPANE:["lib/echo/Sync.ToggleButton.js","lib/extras/Application.TabPane.js","lib/extras/Sync.TabPane.js","lib/extras/Application.ColorSelect.js","lib/extras/Sync.ColorSelect.js","app/WindowPaneScreen.js"],MODULE_DEMO_SPLITPANE:["app/SplitPaneScreen.js"],MODULE_DEMO_BASIC_COMPONENTS:["lib/echo/Sync.ToggleButton.js","lib/echo/Sync.Grid.js","lib/echo/Sync.List.js","lib/echo/Sync.TextComponent.js","app/BasicComponentsScreen.js"],MODULE_DEMO_LAYOUT_CONTAINERS:["lib/echo/Sync.Grid.js","app/LayoutContainersScreen.js"],MODULE_DEMO_JS_DEVELOPMENT:["lib/echo/Sync.Composite.js","lib/extras/Application.TabPane.js","lib/extras/Sync.TabPane.js","lib/extras/Application.ToolTipContainer.js","lib/extras/Sync.ToolTipContainer.js","app/SourceView.js","app/JSDevelopmentScreen.js"],MODULE_DEMO_JAVA_DEVELOPMENT:["app/SourceView.js","app/JavaDevelopmentScreen.js"],MODULE_DEMO_ACCORDIONPANE:["app/AccordionPaneScreen.js"],MODULE_DEMO_TABPANE:["lib/echo/Sync.Grid.js","lib/echo/Sync.ToggleButton.js","lib/extras/Application.ColorSelect.js","lib/extras/Sync.ColorSelect.js","lib/extras/Application.TabPane.js","lib/extras/Sync.TabPane.js","app/TabPaneScreen.js"],MODULE_DEMO_RICHTEXTAREA:["lib/echo/Sync.List.js","lib/echo/Sync.Grid.js","lib/echo/Arc.js","lib/echo/Sync.Composite.js","lib/echo/Sync.List.js","lib/echo/Sync.TextComponent.js","lib/extras/Application.BorderPane.js","lib/extras/Sync.BorderPane.js","lib/extras/Application.ColorSelect.js","lib/extras/Sync.ColorSelect.js","lib/extras/Application.RichTextInput.js","lib/extras/Sync.RichTextInput.js","lib/extras/Application.RichTextArea.js","lib/extras/Sync.RichTextArea.js","app/RichTextScreen.js"],MODULE_DEMO_EXTRAS_WIDGETS:["lib/echo/Sync.Composite.js","lib/echo/Sync.ToggleButton.js","lib/extras/Application.CalendarSelect.js","lib/extras/Sync.CalendarSelect.js","lib/extras/Application.ColorSelect.js","lib/extras/Sync.ColorSelect.js","lib/extras/Application.Group.js","lib/extras/Sync.Group.js","lib/extras/Application.BorderPane.js","lib/extras/Sync.BorderPane.js","lib/extras/Application.ToolTipContainer.js","lib/extras/Sync.ToolTipContainer.js","app/ExtrasWidgetsScreen.js"],LOCALE_MODULES:{"1337":true},pref:{transitionsEnabled:true,windowStyleName:"Default",sourceViewerBackground:"#000000",sourceViewerForeground:"#00ff00"},getMessages:function(){return DemoApp.Messages.get(DemoApp.locale)
},init:function(){Core.Web.init();if(Echo.DebugConsole){Echo.DebugConsole.install()}var b=new DemoApp();var a=new Echo.FreeClient(b,document.getElementById("rootArea"));a.addResourcePath("Echo","lib/echo/");a.addResourcePath("Extras","lib/extras/");b.setStyleSheet(DemoApp.StyleSheet);a.init()},locale:null},_msg:null,workspace:null,init:function(){this._msg=DemoApp.getMessages();var a=[new DemoApp.Workspace.SectionData(this._msg["SectionTitle.Welcome"],[new DemoApp.Workspace.ScreenData(this._msg["WelcomeScreen.Title"],"image/demoicon/WelcomeIcon16.gif","image/demoicon/WelcomeIcon64.gif",[],function(b){b.setContent(new DemoApp.WelcomeScreen())},"app/WelcomeScreen.js")]),new DemoApp.Workspace.SectionData(this._msg["SectionTitle.CoreComponents"],[new DemoApp.Workspace.ScreenData(this._msg["WindowPaneScreen.Title"],"image/demoicon/WindowPaneIcon16.gif","image/demoicon/WindowPaneIcon64.gif",DemoApp.MODULE_DEMO_WINDOWPANE,function(b){b.setContent(new DemoApp.WindowPaneScreen())},"app/WindowPaneScreen.js"),new DemoApp.Workspace.ScreenData(this._msg["SplitPaneScreen.Title"],"image/demoicon/SplitPaneIcon16.gif","image/demoicon/SplitPaneIcon64.gif",DemoApp.MODULE_DEMO_SPLITPANE,function(b){b.setContent(new DemoApp.SplitPaneScreen())
},"app/SplitPaneScreen.js"),new DemoApp.Workspace.ScreenData(this._msg["BasicComponentsScreen.Title"],"image/demoicon/BasicComponentsIcon16.gif","image/demoicon/BasicComponentsIcon64.gif",DemoApp.MODULE_DEMO_BASIC_COMPONENTS,function(b){b.setContent(new DemoApp.BasicComponentsScreen())},"app/BasicComponentsScreen.js"),new DemoApp.Workspace.ScreenData(this._msg["LayoutContainersScreen.Title"],"image/demoicon/LayoutContainersIcon16.gif","image/demoicon/LayoutContainersIcon64.gif",DemoApp.MODULE_DEMO_LAYOUT_CONTAINERS,function(b){b.setContent(new DemoApp.LayoutContainersScreen())},"app/LayoutContainersScreen.js")]),new DemoApp.Workspace.SectionData(this._msg["SectionTitle.Technology"],[new DemoApp.Workspace.ScreenData(this._msg["JSDevelopmentScreen.Title"],"image/demoicon/JSDevelopmentIcon16.gif","image/demoicon/JSDevelopmentIcon64.gif",DemoApp.MODULE_DEMO_JS_DEVELOPMENT,function(b){b.setContent(new DemoApp.JSDevelopmentScreen())},"app/JSDevelopmentScreen.js"),new DemoApp.Workspace.ScreenData(this._msg["JavaDevelopmentScreen.Title"],"image/demoicon/JavaDevelopmentIcon16.gif","image/demoicon/JavaDevelopmentIcon64.gif",DemoApp.MODULE_DEMO_JAVA_DEVELOPMENT,function(b){b.setContent(new DemoApp.JavaDevelopmentScreen())
},"app/JavaDevelopmentScreen.js")]),new DemoApp.Workspace.SectionData(this._msg["SectionTitle.Extras"],[new DemoApp.Workspace.ScreenData(this._msg["AccordionPaneScreen.Title"],"image/demoicon/AccordionPaneIcon16.gif","image/demoicon/AccordionPaneIcon64.gif",DemoApp.MODULE_DEMO_ACCORDIONPANE,function(b){b.setContent(new DemoApp.AccordionPaneScreen())},"app/AccordionPaneScreen.js"),new DemoApp.Workspace.ScreenData(this._msg["TabPaneScreen.Title"],"image/demoicon/TabPaneIcon16.gif","image/demoicon/TabPaneIcon64.gif",DemoApp.MODULE_DEMO_TABPANE,function(b){b.setContent(new DemoApp.TabPaneScreen())},"app/TabPaneScreen.js"),new DemoApp.Workspace.ScreenData(this._msg["RichTextScreen.Title"],"image/demoicon/RichTextIcon16.gif","image/demoicon/RichTextIcon64.gif",DemoApp.MODULE_DEMO_RICHTEXTAREA,function(b){b.setContent(new DemoApp.RichTextScreen())},"app/RichTextScreen.js"),new DemoApp.Workspace.ScreenData(this._msg["ExtrasWidgetsScreen.Title"],"image/demoicon/WidgetsIcon16.gif","image/demoicon/WidgetsIcon64.gif",DemoApp.MODULE_DEMO_EXTRAS_WIDGETS,function(b){b.setContent(new DemoApp.ExtrasWidgetsScreen())
},"app/ExtrasWidgetsScreen.js")])];this.workspace=new DemoApp.Workspace(a);this.rootComponent.add(this.workspace)}});DemoApp.DownloadWindow=Core.extend(Echo.WindowPane,{_msg:null,$construct:function(){this._msg=DemoApp.getMessages();Echo.WindowPane.call(this,{styleName:DemoApp.pref.windowStyleName,title:this._msg["DownloadWindow.Title"],icon:"image/icon/Icon16ArrowBottom.png",iconInsets:"6px 10px",insets:10,events:{close:function(a){a.source.parent.remove(a.source)}},children:[new DemoApp.HtmlLabel({html:this._msg["DownloadWindow.Message"]})]})}});DemoApp.ScreenWindow=Core.extend(Echo.WindowPane,{$construct:function(a){Echo.WindowPane.call(this,{icon:a.icon16,iconInsets:"6px 10px",title:a.title,styleName:DemoApp.pref.windowStyleName,width:600,height:500,maximizeEnabled:true,events:{close:function(b){b.source.parent.remove(b.source)}}})},setContent:function(a){this.removeAll();this.add(a)}});DemoApp.Workspace=Core.extend(Echo.ContentPane,{$static:{SectionData:Core.extend({title:null,screens:null,$construct:function(b,a){this.title=b;
this.screens=a}}),ScreenData:Core.extend({title:null,icon16:null,icon64:null,modules:null,launchFunction:null,sourceUrl:null,$construct:function(f,b,d,a,e,c){this.id=Echo.Application.generateUid();this.title=f;this.icon16=b;this.icon64=d;this.modules=a;this.launchFunction=e;this.sourceUrl=c}})},_msg:null,_launchPanel:null,_contentArea:null,_screenMap:null,_activeScreen:null,_sections:null,_activeScreenLaunchButton:null,_stopWindow:null,fpsLabel:null,$construct:function(a){this._sections=a;this._msg=DemoApp.getMessages();Echo.ContentPane.call(this,{children:[new Echo.SplitPane({separatorWidth:6,separatorPosition:"18%",resizable:true,separatorHorizontalImage:"image/workspace/MainSeparator.png",separatorHorizontalRolloverImage:"image/workspace/MainSeparatorRollover.png",children:[new Echo.SplitPane({orientation:Echo.SplitPane.ORIENTATION_VERTICAL_TOP_BOTTOM,separatorPosition:52,layoutData:{minimumSize:"1em",maximumSize:"33%"},children:[new Echo.Label({icon:"image/workspace/Logo.png",layoutData:{overflow:Echo.SplitPane.OVERFLOW_HIDDEN,alignment:"center",backgroundImage:{url:"image/workspace/LogoBackground.png",repeat:"repeat-x"}}}),this._launchPanel=new Extras.AccordionPane({styleName:"Default",background:"#313131",foreground:"#ffffff",defaultContentInsets:"5px 10px"})]}),new Echo.SplitPane({orientation:Echo.SplitPane.ORIENTATION_VERTICAL_TOP_BOTTOM,autoPositioned:true,separatorHeight:1,separatorColor:"#000000",children:[this._menu=new Extras.MenuBarPane({styleName:"Workspace",model:this.createMenuModel(),events:{action:Core.method(this,this._processMenuAction)}}),new Echo.SplitPane({orientation:Echo.SplitPane.ORIENTATION_VERTICAL_BOTTOM_TOP,autoPositioned:true,separatorHeight:1,separatorColor:"#000000",children:[new Echo.Row({insets:8,alignment:"center",cellSpacing:100,layoutData:{overflow:Echo.SplitPane.OVERFLOW_HIDDEN,backgroundImage:"image/workspace/NavigationBackground.png"},children:[new Echo.Button({icon:"image/workspace/PreviousArrow.png",rolloverIcon:"image/workspace/PreviousArrowRollover.png",text:this._msg["Navigation.Previous"],foreground:"#ffffff",rolloverForeground:"#c9fdd2",font:{bold:true,italic:true},iconTextMargin:5,textPosition:"right",rolloverEnabled:true,events:{action:Core.method(this,this._processPrevious)}}),new Echo.Button({icon:"image/workspace/NextArrow.png",rolloverIcon:"image/workspace/NextArrowRollover.png",text:this._msg["Navigation.Next"],foreground:"#ffffff",rolloverForeground:"#c9fdd2",font:{bold:true,italic:true},iconTextMargin:5,textPosition:"left",rolloverEnabled:true,events:{action:Core.method(this,this._processNext)}})]}),this._contentArea=new Extras.TransitionPane({})]})]})]})],events:{init:Core.method(this,function(){this.launchScreen(this.getNextScreen())
})}});this._createLaunchPanel()},_createLaunchPanel:function(){this._screenMap={};for(var c=0;c<this._sections.length;++c){var d=new Echo.Column({styleName:"Workspace.LaunchPanel",layoutData:{title:this._sections[c].title}});this._launchPanel.add(d);for(var b=0;b<this._sections[c].screens.length;++b){var a=this._sections[c].screens[b];d.add(new Echo.Button({id:a.id,styleName:"Workspace.LaunchPanel",icon:a.icon64,text:a.title,actionCommand:a.id,events:{action:Core.method(this,this._processLauncherClick)}}));this._screenMap[a.id]=a}}},createMenuModel:function(){var f=new Extras.MenuModel(null,this._msg["Menu.LaunchMenu"],null);var a=new Extras.MenuModel(null,this._msg["Menu.StartWindowedDemoMenu"],null);for(var d=0;d<this._sections.length;++d){for(var c=0;c<this._sections[d].screens.length;++c){var b=this._sections[d].screens[c];f.addItem(new Extras.OptionModel("L:"+b.id,b.title,b.icon16));a.addItem(new Extras.OptionModel("W:"+b.id,b.title,b.icon16))}}f.addItem(new Extras.SeparatorModel());
f.addItem(a);f.addItem(new Extras.SeparatorModel());f.addItem(new Extras.OptionModel("autodemo",this._msg["Menu.StartAutoDemo"],"image/icon/Icon16Play.gif"));f.addItem(new Extras.OptionModel("perftest",this._msg["Menu.PerformanceTest"],"image/icon/Icon16Performance.gif"));var e=new Extras.MenuModel(null,null,null,[f,new Extras.MenuModel(null,this._msg["Menu.ToolsMenu"],null,[new Extras.OptionModel("viewsource",this._msg["Menu.ViewSource"],"image/icon/Icon16Terminal.png"),new Extras.MenuModel(null,this._msg["Menu.ViewSourceMenu"],null,[new Extras.OptionModel("viewsource.main",this._msg["Menu.ViewSourceMain"],null),new Extras.OptionModel("viewsource.ss",this._msg["Menu.ViewSourceStyleSheet"],null),new Extras.OptionModel("viewsource.msg",this._msg["Menu.ViewSourceMessages"],null),new Extras.SeparatorModel(),new Extras.OptionModel("viewsource.html",this._msg["Menu.ViewSourceHtml"],null)]),new Extras.SeparatorModel(),new Extras.OptionModel("preferences",this._msg["Menu.Preferences"],"image/icon/Icon16Preferences.png"),new Extras.MenuModel(null,this._msg["Menu.Locale"],"image/icon/Icon16Flags.png",[new Extras.OptionModel("locale.en","English/US",null),new Extras.OptionModel("locale.1337","1337",null)]),new Extras.SeparatorModel(),new Extras.OptionModel("download",this._msg["Menu.Download"],"image/icon/Icon16ArrowBottom.png")]),new Extras.MenuModel(null,this._msg["Menu.HelpMenu"],null,[new Extras.OptionModel("about",this._msg["Menu.About"],"image/icon/Icon16About.png")])]);
return e},getNextScreen:function(){var e=this._activeScreen==null;for(var b=0;b<2;++b){for(var d=0;d<this._sections.length;++d){for(var c=0;c<this._sections[d].screens.length;++c){var a=this._sections[d].screens[c];if(e&&a.launchFunction){return a}if(this._activeScreen==a){e=true}}}}},getPreviousScreen:function(){var e=this._activeScreen==null;for(var b=0;b<2;++b){for(var d=this._sections.length-1;d>=0;--d){for(var c=this._sections[d].screens.length-1;c>=0;--c){var a=this._sections[d].screens[c];if(e&&a.launchFunction){return a}if(this._activeScreen==a){e=true}}}}},launchScreen:function(a,b){var c;if(b){c=new DemoApp.ScreenWindow(a);this.add(c)}else{if(this._activeScreenLaunchButton){this._activeScreenLaunchButton.setStyleName("Workspace.LaunchPanel");this._activeScreenLaunchButton=null}this._activeScreen=a}this.application.client.exec(a.modules,Core.method(this,function(){if(a.launchFunction){a.launchFunction(b?c:this)}if(!b){this._setActiveTab(a)}}))},_processLauncherClick:function(b){if(this._screenMap[b.actionCommand]){this.setTransition(Extras.TransitionPane.TYPE_FADE);
var a=this._screenMap[b.actionCommand];this.launchScreen(a)}},_processMenuAction:function(c){switch(c.modelId){case"about":this.application.client.exec(DemoApp.MODULE_ABOUT,Core.method(this,function(){this.add(new DemoApp.AboutDialog())}));break;case"autodemo":this.application.client.exec(DemoApp.MODULE_AUTOMATIC_DEMO,Core.method(this,function(){this.add(new DemoApp.AutomaticDemo.StartDialog(this))}));break;case"download":this.add(new DemoApp.DownloadWindow());break;case"perftest":this.application.client.exec(DemoApp.MODULE_AUTOMATIC_DEMO,Core.method(this,function(){this.add(new DemoApp.AutomaticDemo.PerformanceTestDialog(this))}));break;case"preferences":this.application.client.exec(DemoApp.MODULE_PREFERENCES,Core.method(this,function(){this.add(new DemoApp.PreferencesDialog(this.application))}));break;case"viewsource":this.application.client.exec(DemoApp.MODULE_SOURCE_VIEW,Core.method(this,function(){this.add(new DemoApp.SourceWindow(this._activeScreen))}));break;case"viewsource.main":this.application.client.exec(DemoApp.MODULE_SOURCE_VIEW,Core.method(this,function(){this.add(new DemoApp.SourceWindow("app/Main.js"))
}));break;case"viewsource.ss":this.application.client.exec(DemoApp.MODULE_SOURCE_VIEW,Core.method(this,function(){this.add(new DemoApp.SourceWindow("app/Default.StyleSheet.js"))}));break;case"viewsource.msg":this.application.client.exec(DemoApp.MODULE_SOURCE_VIEW,Core.method(this,function(){this.add(new DemoApp.SourceWindow("app/Messages.js"))}));break;case"viewsource.html":this.application.client.exec(DemoApp.MODULE_SOURCE_VIEW,Core.method(this,function(){this.add(new DemoApp.SourceWindow("index.html"))}));break;default:var b;if(c.modelId.substring(0,2)=="L:"){b=this._screenMap[c.modelId.substring(2)];this.launchScreen(b)}else{if(c.modelId.substring(0,2)=="W:"){b=this._screenMap[c.modelId.substring(2)];this.launchScreen(b,true)}else{if(c.modelId.substring(0,7)=="locale."){var a=c.modelId.substring(7);this._setLocale(a)}}}break}},_processNext:function(a){this.setTransition(Extras.TransitionPane.TYPE_CAMERA_PAN_RIGHT);this.launchScreen(this.getNextScreen())},_processPrevious:function(a){this.setTransition(Extras.TransitionPane.TYPE_CAMERA_PAN_LEFT);
this.launchScreen(this.getPreviousScreen())},_setActiveTab:function(b){for(var d=0;d<this._launchPanel.children.length&&!this._activeScreenLaunchButton;++d){var e=this._launchPanel.children[d];for(var c=0;c<e.children.length&&!this._activeScreenLaunchButton;++c){var a=e.children[c];if(a.get("id")==b.id){this._activeScreenLaunchButton=a;this._activeScreenLaunchButton.setStyleName("Workspace.LaunchPanel.Selected");this._launchPanel.set("activeTabId",e.renderId)}}}},setContent:function(a){this._contentArea.removeAll();this._contentArea.add(a)},_setLocale:function(a){DemoApp.locale=a;if(a in DemoApp.LOCALE_MODULES){this.application.client.exec(["app/Messages."+a+".js"],Core.method(this,function(){this.application.setLocale(a)}))}},setTransition:function(b,a){this._contentArea.set("type",a||DemoApp.pref.transitionsEnabled?b:Extras.TransitionPane.TYPE_IMMEDIATE)},startAutomaticDemo:function(a,b,d,c){if(a){b=0;c="None"}if(b===0){this._launchPanel.set("animationTime",0)}this._stopWindow=new DemoApp.AutomaticDemo.StopDialog(a,b===0);
this._stopWindow.addListener("stop",Core.method(this,function(f){this.stopAutomaticDemo()}));this.add(this._stopWindow);this._autoDemoRunnable=new DemoApp.AutomaticDemo.Runnable(this,this._stopWindow,this._sections,a,b,d,c);Core.Web.Scheduler.add(this._autoDemoRunnable)},stopAutomaticDemo:function(a){this.remove(this._stopWindow);this._stopWindow=null;this.fpsLabel=null;this._launchPanel.set("animationTime",null);Core.Web.Scheduler.remove(this._autoDemoRunnable);this._autoDemoRunnable=null;if(typeof(a)=="number"){this.add(new DemoApp.AutomaticDemo.PerformanceTestResultDialog(a))}this.launchScreen(this._sections[0].screens[0])}});DemoApp.ColorSelectButton=Core.extend(Echo.Button,{_msg:null,_color:null,_window:null,_colorSelect:null,$construct:function(a){this._msg=DemoApp.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:DemoApp.pref.windowStyleName,title:"Select Color",width:220,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)}});DemoApp.HtmlLabel=Core.extend(Echo.Component,{componentType:"DemoApp.HtmlLabel"});DemoApp.HtmlLabelSync=Core.extend(Echo.Render.ComponentSync,{$load:function(){Echo.Render.registerPeer("DemoApp.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}});DemoApp.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)}};DemoApp.StyleSheet=new Echo.StyleSheet({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":{tabBorder:{top:"1px solid #817f88",bottom:"1px solid #312f38"},tabForeground:"#ffffff",tabBackground:"#514f58",tabBackgroundImage:{url:"image/fill/BlueGrey.png",y:"50%"},tabRolloverEnabled:true,tabRolloverBackground:"#86899a",tabRolloverBackgroundImage:{url:"image/fill/BlueGreyHighlight.png",y:"50%"}},"Extras.CalendarSelect":{background:"#6f87af",dateBackground:"#bcbcbc",dateBackgroundImage:{url:"image/calendarselect/CalendarSelectGradient.png",repeat:"repeat-x"},headerForeground:"#ffffff",headerBackgroundImage:{url:"image/calendarselect/CalendarHeaderBackground.png",y:"50%"},rolloverDateBackground:"#ffffff",selectedDateBackground:"#1579c7",selectedDateBackgroundImage:"image/calendarselect/CalendarSelectSelectedDateFill.png",selectedDateBorder:{left:"1px solid #0e4f82",top:"1px solid #0e4f82",right:"1px solid #1472bc",bottom:"1px solid #1472bc"}},"Extras.ContextMenu":{animationTime:350,backgroundImage:{url:"image/fill/LightBlueLine.png",y:"50%"},menuBackgroundIamge:"image/fill/LightBlueLine.png",menuBorder:{top:"1px solid #dfdfef",left:"1px solid #dfdfef",right:"1px solid #7f7f8f",bottom:"1px solid #7f7f8f"},menuOpacity:80,selectionBackgroundImage:"image/ShadowBlueGrey.png"},"Extras.DropDownMenu":{animationTime:350,backgroundImage:{url:"image/fill/LightBlueLine.png",y:"50%"},border:{top:"1px solid #dfdfef",left:"1px solid #dfdfef",right:"1px solid #7f7f8f",bottom:"1px solid #7f7f8f"},insets:"2px 10px",menuBackgroundIamge:"image/fill/LightBlueLine.png",menuBorder:{top:"1px solid #dfdfef",left:"1px solid #dfdfef",right:"1px solid #7f7f8f",bottom:"1px solid #7f7f8f"},menuOpacity:80,selectionBackgroundImage:"image/ShadowBlueGrey.png"},"Extras.RichTextArea":{controlPaneSplitPaneStyleName:"ControlPane.Container.Bottom",controlPaneRowStyleName:"ControlPane",controlPaneButtonStyleName:"ControlPane.Button",menuStyleName:"RichTextArea.Menu",toolbarButtonStyleName:"RichTextArea.Toolbar",toolbarPanelStyleName:"RichTextArea.Toolbar",windowPaneStyleName:"Default"},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":{"Extras.TabPane":{insets:0,tabIconTextMargin:3,tabCloseIconTextMargin:8,background:"#ffffff",tabSpacing:-20,border:"1px solid #7f7faf",tabActiveBackground:"#ffffff",tabActiveBackgroundInsets:"8px 14px 0px 8px",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 0px 8px",tabInactiveImageBorder:{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},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"}},"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%"}}},DisplayPanel:{Panel:{background:"#ffffff",imageBorder:{contentInsets:"7px 13px 13px 7px",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"}},Label:{layoutData:{backgroundImage:{url:"image/fill/GlassPurple.png",y:"50%"},insets:"5px 10px"},foreground:"#ffffff",font:{italic:true,bold:true,size:"10pt"}}},Workspace:{"Extras.MenuBarPane":{animationTime:150,border:"0px solid #000000",backgroundImage:{url:"image/workspace/MenuBarBackground.png",y:"50%"},foreground:"#ffffff",menuBackground:"#000000",menuExpandIcon:"image/icon/Icon16ExpandRight.png",menuOpacity:92,menuBackgroundImage:"image/fill/InterlaceDarkGrey.png",menuBorder:{top:"1px solid #3f3f3f",left:"1px solid #3f3f3f",right:"1px solid #1f1f1f",bottom:"1px solid #1f1f1f"},selectionBackground:"#fffac1",selectionBackgroundImage:{url:"image/fill/LightedBeige.png",x:"50%",y:"50%"},selectionForeground:"#000000"}},"Workspace.LaunchPanel":{Button:{alignment:"center",background:"#1f1f1f",textAlignment:"center",textPosition:"bottom",rolloverEnabled:true,rolloverBackgroundImage:"image/workspace/DemoSelectButtonRolloverBackground.png",rolloverBorder:{top:"1px solid #1d1d1d",left:"1px solid #1d1d1d",bottom:"1px solid #5d5d5d",right:"1px solid #5d5d5d"},backgroundImage:"image/workspace/DemoSelectButtonBackground.png",foreground:"#ffffff",font:{size:"9pt"},iconTextMargin:2,insets:10,pressedEnabled:true,border:{top:"1px solid #0d0d0d",left:"1px solid #0d0d0d",bottom:"1px solid #3d3d3d",right:"1px solid #3d3d3d"},pressedBackgroundImage:"image/workspace/DemoSelectButtonSelectedBackground.png",pressedBorder:{top:"1px solid #2b2b2b",left:"1px solid #2b2b2b",bottom:"1px solid #9e9e9e",right:"1px solid #9e9e9e"}},Column:{cellSpacing:1}},"Workspace.LaunchPanel.Selected":{Button:{alignment:"center",textAlignment:"center",textPosition:"bottom",foreground:"#ffffff",backgroundImage:"image/workspace/DemoSelectButtonSelectedBackground.png",font:{size:"9pt"},iconTextMargin:2,insets:10,border:{top:"1px solid #9e9e9e",left:"1px solid #9e9e9e",bottom:"1px solid #2b2b2b",right:"1px solid #2b2b2b"}}},GlassBlue:{WindowPane:{ieAlphaRenderBorder:true,titleFont:{size:"10pt",bold:true,italic:true},titleForeground:"#ffffff",titleInsets:"5px 10px",titleBackgroundImage:{url:"image/window/glassblue/Header.png",repeat:"repeat-x",y:"100%"},border:{contentInsets:"6px 15px 15px 12px",borderInsets:"34px 20px 20px 20px",topLeft:"image/window/glassblue/BorderTopLeft.png",top:"image/window/glassblue/BorderTop.png",topRight:"image/window/glassblue/BorderTopRight.png",left:"image/window/glassblue/BorderLeft.png",right:"image/window/glassblue/BorderRight.png",bottomLeft:"image/window/glassblue/BorderBottomLeft.png",bottom:"image/window/glassblue/BorderBottom.png",bottomRight:"image/window/glassblue/BorderBottomRight.png"}}},GlassBlue2:{WindowPane:{ieAlphaRenderBorder:true,titleFont:{size:"10pt",bold:true,italic:true},titleForeground:"#ffffff",titleInsets:"5px 10px",titleBackgroundImage:{url:"image/window/glassblue2/Header.png",repeat:"repeat-x",y:"100%"},border:{contentInsets:"6px 15px 15px 12px",borderInsets:"34px 20px 20px 20px",topLeft:"image/window/glassblue2/BorderTopLeft.png",top:"image/window/glassblue2/BorderTop.png",topRight:"image/window/glassblue2/BorderTopRight.png",left:"image/window/glassblue2/BorderLeft.png",right:"image/window/glassblue2/BorderRight.png",bottomLeft:"image/window/glassblue2/BorderBottomLeft.png",bottom:"image/window/glassblue2/BorderBottom.png",bottomRight:"image/window/glassblue2/BorderBottomRight.png"}}},"Layout.Bordered":{Grid:{width:"100%",insets:"3px 8px",background:"#ffffff",border:"2px groove #7ea4d3"}},Junior:{"Extras.ColorSelect":{hueWidth:10,saturationHeight:60,valueWidth:60}},"Photo.Countryside":{ContentPane:{backgroundImage:{url:"image/bgpictures/Countryside.jpg",x:-1,y:"100%"}}},"Photo.Coral":{ContentPane:{backgroundImage:{url:"image/bgpictures/Coral.jpg",x:300,y:"50%"}}},"Photo.EarthEast":{ContentPane:{background:"#000000",backgroundImage:{url:"image/bgpictures/EarthEast.jpg",y:"100%",repeat:"no-repeat"}}},"Photo.EarthWest":{ContentPane:{background:"#000000",backgroundImage:{url:"image/bgpictures/EarthWest.jpg",y:"100%",repeat:"no-repeat"}}},"Photo.Fern":{ContentPane:{backgroundImage:{url:"image/bgpictures/Fern.jpg",x:"50%",y:"50%"}}},"Photo.Leaf":{ContentPane:{backgroundImage:{url:"image/bgpictures/Leaf.jpg",x:"50%",y:"50%"}}},"Photo.Moonlight":{ContentPane:{backgroundImage:{url:"image/bgpictures/Moonlight.jpg",x:-1,y:-1}}},"Photo.Poinsettia":{ContentPane:{backgroundImage:{url:"image/bgpictures/Poinsettia.jpg",x:-1,y:"70%"}}},"Photo.Winter":{ContentPane:{backgroundImage:{url:"image/bgpictures/Winter.jpg",x:-1,y:-1}}},PhotoAlbum:{Button:{insets:3,foreground:"#ffffff",rolloverEnabled:true,rolloverBackground:"#000000",rolloverForeground:"#fffed0",alignment:"center",textAlignment:"center",textPosition:"bottom",iconTextMargin:1,layoutData:{alignment:"center"}}},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}}},"RichTextArea.Menu":{"Extras.MenuBarPane":{border:"0px solid #000000",backgroundImage:{url:"image/fill/SilverMenu.png",repeat:"x",y:"100%"},menuBackgroundImage:"image/fill/LightBlueLine.png",selectionBackgroundImage:"image/fill/ShadowBlueGrey.png"}},"RichTextArea.Toolbar":{Button:{background:"#abcdef",backgroundImage:"image/fill/SilverToolbar.png",foreground:"#000000",border:"1px outset #cfcfdf",rolloverEnabled:true,rolloverBackgroundImage:"image/fill/SilverMenu.png",rolloverBorder:"1px outset #efefff",pressedEnabled:true,pressedBorder:"1px inset #afafbf",insets:"1px 3px"},Panel:{backgroundImage:{url:"image/fill/SilverToolbar.png",y:"50%"}}},TransGreen:{WindowPane:{ieAlphaRenderBorder:true,titleFont:{size:"10pt",bold:true,italic:true},titleForeground:"#ffffff",titleInsets:"5px 10px",titleBackgroundImage:{url:"image/window/transgreen/Header.png",repeat:"repeat-x",y:0},border:{contentInsets:"6px 15px 15px 12px",borderInsets:"34px 20px 20px 20px",topLeft:"image/window/transgreen/BorderTopLeft.png",top:"image/window/transgreen/BorderTop.png",topRight:"image/window/transgreen/BorderTopRight.png",left:"image/window/transgreen/BorderLeft.png",right:"image/window/transgreen/BorderRight.png",bottomLeft:"image/window/transgreen/BorderBottomLeft.png",bottom:"image/window/transgreen/BorderBottom.png",bottomRight:"image/window/transgreen/BorderBottomRight.png"}}}});
DemoApp.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","SectionTitle.Welcome":"Welcome","SectionTitle.CoreComponents":"Core Components","SectionTitle.Technology":"Technology","SectionTitle.Extras":"Extras Components","PrefDialog.WindowTitle":"Preferences","PrefDialog.PromptAnimations":"Animated Screen Transitions:","PrefDialog.PromptWindowAppearance":"Default Window Appearance:","PrefDialog.PromptForeground":"Foreground:","PrefDialog.PromptBackground":"Background:","PrefDialog.PromptSourceViewerColors":"Source Viewer Colors:","PrefDialog.WindowStyle.BlueShadow":"Blue Shadow","PrefDialog.WindowStyle.GlassBlueDark":"Glass Blue (Dark)","PrefDialog.WindowStyle.GlassBlueLight":"Glass Blue (Light)","PrefDialog.WindowStyle.TransGreen":"Transparent Green","PrefDialog.WindowStyle.Default":"Default","DownloadWindow.Title":"Download Application","DownloadWindow.Message":'This application may be downloaded with complete uncompressed source code at the <a href="http://echo.nextapp.com/site/echo3/download" target="new"><strong>Echo3 Download Page</strong></a>.',"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.","AutomaticDemo.WindowTitle":"Start Automatic Demo","AutomaticDemo.Description":"The Automatic Demo will display various demo screens automatically until the stop button is clicked.","AutomaticDemo.SpeedPrompt":"Speed","AutomaticDemo.SpeedNormal":"Normal","AutomaticDemo.SpeedFast":"Fast","AutomaticDemo.SpeedLudicrous":"Ludicrous","AutomaticDemo.TransitionPrompt":"Transition Style","AutomaticDemo.TransitionRandom":"Random","AutomaticDemo.TransitionRandomPan":"Random Pan","AutomaticDemo.TransitionPanRight":"Pan Right","AutomaticDemo.TransitionFade":"Fade","AutomaticDemo.TransitionNone":"None","AutomaticDemo.OrderPrompt":"Display Order","AutomaticDemo.OrderRandom":"Random","AutomaticDemo.OrderSequential":"Sequential","AutomaticDemo.RunWindowTitle":"Automatic Demo","AutomaticDemo.StopMessage":"STOP","AutomaticDemo.Fps":"FPS","About.WindowTitle":"About this Application","About.GeneralTab":"General Information","About.ArtworkTab":"Artwork","About.General1":"Copyright 2006-2008 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 Echo3 and the source code for this application may be found at <a href="http://echo.nextapp.com/site/echo3/">http://echo.nextapp.com/site/echo3</a>.',"About.Artwork1":'This application contains public-domain photography provided by <a href="http://publicdomainpictures.net">http://publicdomainpictures.net</a>.',"About.Artwork2":'This application contains public-domain icons provided by the <a href="http://tango.freedesktop.org">Tango Desktop Project</a>.',"Menu.LaunchMenu":"Launch","Menu.ToolsMenu":"Tools","Menu.HelpMenu":"Help","Menu.StartWindowedDemoMenu":"Start Windowed Demo","Menu.StartAutoDemo":"Start Automatic Demo...","Menu.PerformanceTest":"Performance Test...","Menu.Preferences":"Preferences...","Menu.Download":"Download this Application...","Menu.ViewSource":"View Source Code of this Screen","Menu.ViewSourceMenu":"View Source Code","Menu.ViewSourceMain":"View Source Code of Main.js","Menu.ViewSourceStyleSheet":"View Source Code of Default.StyleSheet.js","Menu.ViewSourceMessages":"View Source Code of Messages.js","Menu.ViewSourceHtml":"View Source Code of HTML","Menu.Locale":"Locale","Menu.About":"About","Menu.WindowPaneStyle":"Windowed Demo Border","Menu.WindowPaneSize":"Windowed Demo Size","Menu.WindowPaneStyleTransGreen":"Transparent Green","Menu.WindowPaneStyleGlassBlue":"Glass Blue","Menu.WindowPaneStyleSimple":"Opaque Blue Gradient","Navigation.Previous":"Previous","Navigation.Next":"Next","DebugLaunchWindow.Title":"Launch Debug Window","DebugLaunchWindow.LaunchButton":"Launch Debug Window","AccordionPaneScreen.Title":"AccordionPane","AccordionPaneScreen.Description":'The "AccordionPane" is a tabbed container component that is typically used in a navigation-related role.  The component works well in vertical spaces, and can often serve to replace two-level tree components with a more appealing interface.',"AccordionPaneScreen.Animation":"AccordionPanes play an animation effect when tabs are selected.  The animation effect is synchronized to take a specific amount of time, such that it will not become bothersome if the user is working on a low-performance or highly-loaded computer.","BasicComponentsScreen.Title":"Basic Components","BasicComponentsScreen.CategoryDataVisualization":"Data Visualization","BasicComponentsScreen.CategoryButton":"Button Components","BasicComponentsScreen.CategoryText":"Text Components","BasicComponentsScreen.CategoryList":"List Components","BasicComponentsScreen.ShowStyled":"Show Styled Widgets","BasicComponentsScreen.ShowDefault":"Show Default Widgets","BasicComponentsScreen.ButtonPrompt":"Button","BasicComponentsScreen.ButtonText":"Next","BasicComponentsScreen.CheckBoxPrompt":"CheckBox","BasicComponentsScreen.CheckBoxJumping":"Jumping","BasicComponentsScreen.CheckBoxRunning":"Running","BasicComponentsScreen.CheckBoxLaughing":"Laughing","BasicComponentsScreen.RadioButtonPrompt":"RadioButton","BasicComponentsScreen.RadioButtonOrangutan":"Orangutan","BasicComponentsScreen.RadioButtonChimpanzee":"Chimpanzee","BasicComponentsScreen.RadioButtonGorilla":"Gorilla","BasicComponentsScreen.TextFieldPrompt":"TextField","BasicComponentsScreen.PasswordFieldPrompt":"PasswordField","BasicComponentsScreen.TextAreaPrompt":"TextArea","BasicComponentsScreen.TextSampleString":"The quick red fox jumps over the lazy brown dog.","BasicComponentsScreen.SelectFieldPrompt":"SelectField","BasicComponentsScreen.ListBoxPrompt":"ListBox","BasicComponentsScreen.ListItem.Africa":"Africa","BasicComponentsScreen.ListItem.Antarctica":"Antarctica","BasicComponentsScreen.ListItem.Asia":"Asia","BasicComponentsScreen.ListItem.Australia":"Australia","BasicComponentsScreen.ListItem.Europe":"Europe","BasicComponentsScreen.ListItem.NorthAmerica":"North America","BasicComponentsScreen.ListItem.SouthAmerica":"South America","BasicComponentsScreen.Description":"This screen shows the basic user interface components used to present data and obtain user input.  Echo3 provides numerous capabilities to style these components to fit the theme of an application.  In addition to basic rendering properties such as colors, borders, and fonts, many components can be configured to provide rollover and selection effects.","ExtrasWidgetsScreen.Title":"Widgets","ExtrasWidgetsScreen.CalendarSelect.Title":"CalendarSelect","ExtrasWidgetsScreen.CalendarSelect.Desc1":"The CalendarSelect component provides the capability to select dates from a visual representation of a calendar.","ExtrasWidgetsScreen.CalendarSelect.Desc2":"It features animated transitions when selecting a month or year.","ExtrasWidgetsScreen.Menu.Title":"Menu Components","ExtrasWidgetsScreen.Menu.ContextButton":"A Button with a ContextMenu (Right-click it!)","ExtrasWidgetsScreen.Menu.DropDownButton":"Options","ExtrasWidgetsScreen.Menu.DropDownSelection":"Enable Selection in DropDownMenu","ExtrasWidgetsScreen.Menu.Note":"Note: the example menu components above do not have configured event listeners, so selecting an option will cause no action.","ExtrasWidgetsScreen.Menu.MenuBarPane.Desc":"A MenuBarPane displays a conventional pull-down menu, such as the one shown at the top of the screen.","ExtrasWidgetsScreen.Menu.ContextMenu.Desc":"A ContextMenu provides the capability to display a context menu for any component.","ExtrasWidgetsScreen.Menu.DropDownMenu.Desc":"DropDownMenu is a simple menu control with a small visual footprint.  It can optionally be used as a list selection component.","ExtrasWidgetsScreen.ToolTip.Title":"ToolTipContainer","ExtrasWidgetsScreen.ToolTip.Button":"A Button in a ToolTipContainer (Roll the mouse over it!)","ExtrasWidgetsScreen.ToolTip.Tip":"This is a custom tool tip.","ExtrasWidgetsScreen.ToolTip.Desc":"The ToolTipContainer component lets you place arbitrary components in a tool tip.","ExtrasWidgetsScreen.ColorSelect.Title":"ColorSelect","ExtrasWidgetsScreen.ColorSelect.Desc":"The ColorSelect component enables a user to select an RGB color quickly using a visual component.","ExtrasWidgetsScreen.ColorSelect.ChangeText":"Adjust the ColorSelect to change the color of this text.","ExtrasWidgetsScreen.ColorSelect.DisplayHex":"Display Hex Color Value","JavaDevelopmentScreen.Title":"Java Development","JavaDevelopmentScreen.Text.1":"Echo3 applications can be built entirely in server-side Java.  When using this development method, the state of an Echo application is automatically serialized to the browser.  The user's input and actions are then serialized back to the server and processed by server-side Java code.  The client-side and server-side APIs are very similar.","JavaDevelopmentScreen.Text.2":'Developers creating server-side Echo applications <span style="color: #00004f;font-weight: bold;">do not need any knowledge of HTML or JavaScript</span>.',"JavaDevelopmentScreen.Text.3":"Server-side Echo2 applications can be easily ported to Echo3.  The only significant API change is that the nextapp.echo2 package name prefix has been changed to nextapp.echo.  In some cases applications can be run after only a search-and-replace.","JavaDevelopmentScreen.SourceDescription.Title":"NumberGuessApp.java","JavaDevelopmentScreen.SourceDescription.Message":'Shown here is the source of an Echo3 server-side development tutorial application, the "Guess-A-Number" game.',"JSDevelopmentScreen.Title":"JavaScript Development","JSDevelopmentScreen.Tab.CoreJS":"CoreJS Framework","JSDevelopmentScreen.Tab.HierarchalConstruction":"Hierarchal Construction","JSDevelopmentScreen.Tab.LazyModuleLoading":"Lazy JS Module Loading","JSDevelopmentScreen.CoreJS.0":"Echo3 uses the CoreJS framework to enable true object-oriented JavaScript development.","JSDevelopmentScreen.CoreJS.1":'The CoreJS framework allows the developer to create JavaScript objects that use <span style="color: #ffffff;font-weight: bold;">classical inheritance</span> (rather than prototype-based inheritance).  It provides a convenient means of creating <span style="color: #ffffff;font-weight: bold;">object-oriented event handlers</span>.  And it does this with a syntax that makes JavaScript code <span style="color: #ffffff;font-weight: bold;">easy to read, write, and maintain</span>.',"JSDevelopmentScreen.CoreJS.2":'Writing code using CoreJS is not done at the expense of performance.  <span style="color: #ffffff;font-weight: bold;">The use of closures is minimized</span> by the inheritance model, eliminating a common source of reduced performance seen in JavaScript frameworks.',"JSDevelopmentScreen.LazyJS.WindowTitle":"Example","JSDevelopmentScreen.LazyJS.0":"Lazy-loading of Modules Enables the Development of Large JavaScript Applications","JSDevelopmentScreen.LazyJS.1":'CoreJS (on which Echo3 is built) provides a convenient means of <span style="color: #ffffff;font-weight: bold;">dynamically downloading JavaScript modules to the client as when they are needed</span>.  This enables a developer to create very large JavaScript applications without incurring an unnecessary delay at startup to load a monolithic application.',"JSDevelopmentScreen.LazyJS.2":'<span style="color: #ffffff;font-weight: bold;">Writing applications that use dynamic module loading is straightforward.</span> Just enclose any inter-module calls in a "Library.exec" statement, such as in the code shown to the right.',"JSDevelopmentScreen.LazyJS.3":'The example code shown will load the modules "Alpha.js" and "Beta.js".  They will be installed in the specified order, and will not be reloaded if they were previously fetched.  When the loading has completed, the method will be executed.',"JSDevelopmentScreen.CoreJS.WindowTitle":"CoreJS Class Declaration","JSDevelopmentScreen.CoreJS.RolloverDirection":"Roll the mouse over any green text to see a description.","JSDevelopmentScreen.CoreJS.Simple":"Simple","JSDevelopmentScreen.CoreJS.Advanced":"Advanced","JSDevelopmentScreen.ClassNameAlpha":'The class name.  The declared class, returned by Core.extend(), is being assigned to the variable "Example.Alpha."',"JSDevelopmentScreen.ClassNameBeta":'The class name.  The declared class, returned by Core.extend(), is being assigned to the variable "Example.Beta."',"JSDevelopmentScreen.CoreExtend":"Core.extend() is the CoreJS method used to declare a class.","JSDevelopmentScreen.BaseClass":"This is the base class which is being extended.  This parameter is omitted when extending directly from Object.","JSDevelopmentScreen.StaticBlock":'This is a static declaration block.  All properties defined inside of it will be assigned to "ExampleClass" as class properties.',"JSDevelopmentScreen.StaticField":'This is a static class field.  It is referenced as "Example.Beta.staticField."',"JSDevelopmentScreen.StaticMethod":'This is a static class method.  It is invoked as "Example.Beta.staticMethod(x, y)."',"JSDevelopmentScreen.StaticInitializer":"This is a static initializer method.  It will be invoked when the class is declared.","JSDevelopmentScreen.VirtualBlock":"This is a virtual declaration block.  All properties declared here will be allowed to be overridden by extending classes.  Properties not declared in this block are final: attempting to override one in a derived class will result in an exception being thrown.","JSDevelopmentScreen.VirtualField":"This is a publicly accessible, virtual field.   This field is may be overridden by derived classes.","JSDevelopmentScreen.VirtualMethod":"This is a virtual, publicly accessible method.  By being declared inside of the $virtual block, it is allowed to be overridden by derived classes.","JSDevelopmentScreen.AbstractBlock":"This is an abstract declaration block.  If this block is present, the class is abstract.  All properties contained in this block must be provided by derived classes.","JSDevelopmentScreen.AbstractMethod":"This method must be implemented by any derived classes.","JSDevelopmentScreen.IncludeBlock":"This is an include block.  Methods contained in objects referenced in this block will be copied into the class declaration.","JSDevelopmentScreen.InternalField":"This is an internal, pseudo-private field.  Leading underscores are used to denote internal properties.  Because this property is declared outside of the $virtual block, it cannot be overridden by derived classes.","JSDevelopmentScreen.PublicField":"This is a publicly accessible field.   Because this property is declared outside of the $virtual block, it cannot be overridden by derived classes.","JSDevelopmentScreen.Constructor":"This is the constructor function for the class.","JSDevelopmentScreen.SuperConstructorCall":"This is a call to the super-constructor of this class.","JSDevelopmentScreen.InternalMethod":"This is an internal, pseudo-private method.  Leading underscores are used to denote internal properties.  Because this property is declared outside of the $virtual block, it cannot be overridden by derived classes.","JSDevelopmentScreen.PublicMethod":"This is a normal, publicly accessible method.  By being declared outside of the $virtual block, it is final, and may not be overridden by derived classes.","JSDevelopmentScreen.Hierarchal.0":'Complete user interfaces can be created using "Hierarchal Component Construction":',"JSDevelopmentScreen.Hierarchal.1":"Client-side component constructors in Echo3 allow you to pass in the initial state of a component.  The state information may include properties, style information, child components, and event listeners.  Code created using this approach naturally takes on an indentation that mirrors the hierarchal structure of the user interface.","JSDevelopmentScreen.Hierarchal.2":'The code <span style="color: #ffffff;font-weight: bold;">looks like</span> the <span style="color: #ffffff;font-weight: bold;">component hierarchy</span>.',"JSDevelopmentScreen.Hierarchal.WindowTitle":"Hierarchal Construction Example","JSDevelopmentScreen.Tab.HierarchalCode":"Code","JSDevelopmentScreen.Tab.ComponentHierarchy":"Hierarchy","JSDevelopmentScreen.Tab.RenderedComponents":"Result","PerformanceTest.WindowTitle":"Performance Test","PerformanceTest.Description":"The performance test will measure the rate at which this web browser can render the various screens of this demonstration application.  The test will run for about 30 seconds and then display the number of frames (screens) rendered per second. for the most accurate result, ensure that no other applications are running.","PerformanceTest.ResultPre":"This browser rendered","PerformanceTest.ResultPost":"frames (screens) per second.","LayoutContainersScreen.Title":"Layout Containers","LayoutContainersScreen.GridTitle":"Grid Component","LayoutContainersScreen.GridDescription":"A simple Grid showing components laid out using column and row spans.","LayoutContainersScreen.ColumnRowTitle":"Column & Row Components","LayoutContainersScreen.ColumnRowDescription":"A combination of columns and rows demonstrating their layout capabilities.  More often than not, these components will be used without borders to simply control content alignment, spacing, and flow.","SplitPaneScreen.Title":"SplitPane","SplitPaneScreen.PrimaryDescription":"A SplitPane divides a region in two.  This component may be configured to be static or resizable.   The developer may also specify which region grows when the user resizes its container (e.g., when the user resizes the entire browser window).","SplitPaneScreen.SecondaryDescription":"SplitPanes are used extensively throughout this demonstration and most other Echo3 applications.  Note how the user interface layout of this application behaves when the browser window is resized as a result.","RichTextScreen.Title":"RichTextArea","TabPaneScreen.Title":"TabPane","TabPaneScreen.ConfiguratorTab":"Configurator","TabPaneScreen.WindowPanesTab":"WindowPanes","TabPaneScreen.PromptActiveTab":"Active Tab","TabPaneScreen.PromptInactiveTab":"Inactive Tab","TabPaneScreen.PromptRolloverTab":"Rollover","TabPaneScreen.PromptForeground":"Foreground","TabPaneScreen.PromptBackground":"Background","TabPaneScreen.PromptBorder":"Border","TabPaneScreen.AddTab":"Add a new tab","TabPaneScreen.RemoveTab":"Remove a tab","TabPaneScreen.Update":"Re-create TabPane with updated style","TabPaneScreen.WindowPanesMessage":"Any component can be placed within a TabPane, including additional TabPanes, AccordionPanes, and even WindowPanes.","TabPaneScreen.WindowPaneInATabPane":"WindowPane-in-a-TabPane","TabPaneScreen.AnotherEmbeddedWindowPane":"Another Embedded WindowPane","TabPaneScreen.YetAnotherWindowPane":"Yet Another WindowPane","TabPaneScreen.MoreTab":"More","TabPaneScreen.JustTab":"Just","TabPaneScreen.AnotherTab":"Another","TabPaneScreen.TabPaneTab":"TabPane","TabPaneScreen.DynamicTabLabel":"Each child component of a TabPane becomes a new tab.  Adding and removing tabs is accomplished by invoking the add() and remove() methods of a TabPane instance.","TabPaneScreen.Description.1":"This screen demonstrates the Echo3Extras TabPane.","TabPaneScreen.Description.2":"The TabPane component is highly customizable.  It supports icons and/or text as tab titles, close buttons within tabs, and CSS or graphically rendered tabs.","WelcomeScreen.Title":"Hello","WelcomeScreen.WindowTitle":"Welcome","WelcomeScreen.WelcomeText":"Welcome to the Echo3 Client-Side JavaScript Demonstration Application.","WelcomeScreen.DevelopmentText":"This application was developed using the open-source Echo3 framework, and a few open-source Echo3 components. This application is written entirely in the component-oriented and event-driven Echo JavaScript API.  It does not require an application server.","WelcomeScreen.NavHelpText":'To navigate through this application, use the next and previous arrow buttons shown at the bottom of the screen. The "AccordionPane" at left may also be used if you wish to jump directly to a specific demonstration.',"WindowPaneScreen.Title":"WindowPane","WindowPaneScreen.TabCountryside":"Countryside Background","WindowPaneScreen.TabCoral":"Coral Background","WindowPaneScreen.TabColor":"Solid Color Background","WindowPaneScreen.TabColorWindowTitle":"Color Selection","WindowPaneScreen.TabColorSetButton":"Set Color","WindowPaneScreen.TranslucentTitle":"Translucent Rendering","WindowPaneScreen.TranslucentText1":'Echo3 WindowPanes can be decorated with "FillImageBorders"that enable highly customized appearances far beyond the capabilities of traditional CSS borders. By using PNG images with alpha-channels, translucent effects can be rendered as shown in this window\'s border.',"WindowPaneScreen.TranslucentText2":"Echo3 can even render translucent PNG effects on Internet Explorer 6, with some limitations due to bugs in this particular browser that are corrected in the next version, IE7.","WindowPaneScreen.ConfigurationTitle":"Configurability","WindowPaneScreen.ConfigurationHelpTab":"Help","WindowPaneScreen.ConfigurationHelpText1":"WindowPanes can be configured with or without the abilities to be moved, resized, and/or closed by the user.  Window sizes may also be constrained with specified minimum and/or maximum dimensions.","WindowPaneScreen.ConfigurationHelpText2":"Click on the tabs in this window to try various configuration options.","WindowPaneScreen.ConfigurationMoveTab":"Move","WindowPaneScreen.ConfigurationMoveEnable":"Allow user to move window.","WindowPaneScreen.ConfigurationMoveDisable":"Fix window to screen.","WindowPaneScreen.ConfigurationResizeTab":"Resize","WindowPaneScreen.ConfigurationResizeEnable":"Allow user to resize window.","WindowPaneScreen.ConfigurationResizeDisable":"Fix window size.","WindowPaneScreen.ConfigurationResizeMinimumEnable":"Set minimum window size to 300x200 pixels.","WindowPaneScreen.ConfigurationResizeMinimumDisable":"Use default minimum window size.","WindowPaneScreen.ConfigurationResizeMaximumEnable":"Set maximum window size to 640x480 pixels.","WindowPaneScreen.ConfigurationResizeMaximumDisable":"Allow unrestricted maximum window size.","WindowPaneScreen.ConfigurationControlsTab":"Controls","WindowPaneScreen.ConfigurationCloseEnable":"Enable close button.","WindowPaneScreen.ConfigurationCloseDisable":"Disable close button.","WindowPaneScreen.ConfigurationMaximizeEnable":"Enable maximize button.","WindowPaneScreen.ConfigurationMaximizeDisable":"Disable maximize button.","WindowPaneScreen.ConfigurationMinimizeEnable":"Enable minimize button.","WindowPaneScreen.ConfigurationMinimizeDisable":"Disable minimize button.","WindowPaneScreen.ModalTitle":"Modal Dialogs","WindowPaneScreen.ModalText1":'A WindowPane can be configured to be modal, such that the user cannot manipulate other user interface components outside of the window while it is present. The client will disallow input, with additional security checks on the server to ensure that it is  not possible for user input to be processed outside of the "modal context".',"WindowPaneScreen.ModalText2":"Try closing any of the WindowPanes on this screen to see an example of a modal dialog.","WindowPaneScreen.ModalEnable":"Configure this WindowPane as a modal dialog.","WindowPaneScreen.ModalDisable":"Configure this WindowPane as a non-modal dialog.","WindowPaneScreen.ModalWarning":"Input to other components is being blocked until this window is closed or made to be non-modal.","WindowPaneScreen.ChooseColor":"Choose Color"});
DemoApp.WelcomeScreen=Core.extend(Echo.ContentPane,{_msg:null,$construct:function(){this._msg=DemoApp.getMessages(null);var a=new Date().getTimezoneOffset()>=60;Echo.ContentPane.call(this,{styleName:a?"Photo.EarthWest":"Photo.EarthEast",children:[new Echo.WindowPane({styleName:"GlassBlue",contentWidth:"32em",insets:"1em 2em",positionX:"10%",positionY:"90%",maximizeEnabled:true,title:this._msg["WelcomeScreen.WindowTitle"],closable:false,children:[new Echo.Column({cellSpacing:"1em",children:[new Echo.Label({text:this._msg["WelcomeScreen.WelcomeText"]}),new Echo.Label({text:this._msg["WelcomeScreen.DevelopmentText"]}),new Echo.Label({text:this._msg["WelcomeScreen.NavHelpText"]})]})]})]})}});
