Core={_copyFunction:function(a){return function(){a.apply(this,arguments)}},_createFunction:function(){return function(){}},extend:function(){var h=arguments.length==1?null:arguments[0];var g=arguments.length==1?arguments[0]:arguments[1];var b,e;if(arguments.length==2){if(typeof(h)!="function"){throw new Error("Base class is not a function, cannot derive.")}}if(!g){throw new Error("Object definition not provided.")}var a;if(g.$construct){a=g.$construct;delete g.$construct}else{if(h){a=Core._copyFunction(h)}else{a=Core._createFunction()}}a.$virtual={};a.$super=h;if(h){var f=Core._createFunction();f.prototype=h.prototype;a.prototype=new f()}a.prototype.constructor=a;if(g.$abstract){a.$abstract={};if(h&&h.$abstract){for(b in h.$abstract){a.$abstract[b]=h.$abstract[b]}}if(g.$abstract instanceof Object){for(b in g.$abstract){a.$abstract[b]=true;a.$virtual[b]=true}}delete g.$abstract}if(h){for(e in h.$virtual){a.$virtual[e]=h.$virtual[e]}}if(g.$virtual){Core._inherit(a.prototype,g.$virtual,a.$virtual);for(e in g.$virtual){a.$virtual[e]=true}delete g.$virtual}if(g.hasOwnProperty("toString")){a.prototype.toString=g.toString}if(g.hasOwnProperty("valueOf")){a.prototype.valueOf=g.valueOf}delete g.toString;delete g.valueOf;if(g.$include){var c=g.$include.reverse();Core._processMixins(a,c);delete g.$include}var d=null;if(g.$load){d=g.$load;delete g.$load}if(g.$static){Core._inherit(a,g.$static);delete g.$static}Core._inherit(a.prototype,g,a.$virtual);if(!a.$abstract){this._verifyAbstractImpl(a)}if(d){d.call(a)}return a},get:function(a,c){for(var b=0;b<c.length;++b){a=a[c[b]];if(!a){return null}}return a},_isVirtual:function(b,a){switch(a){case"toString":case"valueOf":return true}return b[a]},_inherit:function(a,d,c){for(var b in d){if(c&&a[b]!==undefined&&!this._isVirtual(c,b)){throw new Error('Cannot override non-virtual property "'+b+'".')}else{a[b]=d[b]}}},method:function(a,b){return function(){return b.apply(a,arguments)}},_processMixins:function(b,c){for(var d=0;d<c.length;++d){for(var a in c[d]){if(b.prototype[a]){continue}b.prototype[a]=c[d][a]}}},set:function(a,e,d){var c=null;for(var b=0;b<e.length-1;++b){c=a;a=a[e[b]];if(!a){a={};c[e[b]]=a}}a[e[e.length-1]]=d},_verifyAbstractImpl:function(b){var c=b.$super;if(!c||!c.$abstract||c.$abstract===true){return}for(var a in c.$abstract){if(b.prototype[a]==null){throw new Error('Concrete class does not provide implementation of abstract method "'+a+'".')}}}};Core.Debug={consoleElement:null,useAlertDialog:false,consoleWrite:function(b){if(Core.Debug.consoleElement){var a=document.createElement("div");a.appendChild(document.createTextNode(b));if(Core.Debug.consoleElement.childNodes.length===0){Core.Debug.consoleElement.appendChild(a)}else{Core.Debug.consoleElement.insertBefore(a,Core.Debug.consoleElement.firstChild)}}else{if(Core.Debug.useAlertDialog){alert("DEBUG:"+b)}}},toString:function(b){var c="";for(var a in b){if(typeof b[a]!="function"){c+=a+":"+b[a]+"\n"}}return c}};Core.Arrays={containsAll:function(f,d,g){if(g&&f.length<d.length){return false}if(d.length===0){return true}var e,c;for(var b=0;b<d.length;++b){e=false;c=d[b];for(var a=0;a<f.length;++a){if(c==f[a]){e=true;break}}if(!e){return false}}return true},indexOf:function(c,b){for(var a=0;a<c.length;++a){if(b==c[a]){return a}}return -1},remove:function(c,b){for(var a=0;a<c.length;++a){if(b==c[a]){c.splice(a,1);return}}},removeDuplicates:function(c){c.sort();var b=0;for(var a=c.length-1;a>0;--a){if(c[a]==c[a-1]){c[a]=c[c.length-1-b];++b}}if(b>0){c.length=c.length-b}}};Core.Arrays.LargeMap=Core.extend({$static:{garbageCollectEnabled:false},_removeCount:0,garbageCollectionInterval:250,map:null,$construct:function(){this.map={}},_garbageCollect:function(){this._removeCount=0;var a={};for(var b in this.map){a[b]=this.map[b]}this.map=a},remove:function(a){delete this.map[a];if(Core.Arrays.LargeMap.garbageCollectEnabled){++this._removeCount;if(this._removeCount>=this.garbageCollectionInterval){this._garbageCollect()}}},toString:function(){return Core.Debug.toString(this.map)}});Core.ListenerList=Core.extend({_data:null,$construct:function(){this._data=[]},addListener:function(a,b){this._data.push(a,b)},fireEvent:function(d){if(d.type==null){throw new Error("Cannot fire event, type property not set.")}var a,c=true,b=[];for(a=0;a<this._data.length;a+=2){if(this._data[a]==d.type){b.push(this._data[a+1])}}for(a=0;a<b.length;++a){c=b[a](d)&&c}return c},getListenerTypes:function(){var b=[];for(var a=0;a<this._data.length;a+=2){b.push(this._data[a])}Core.Arrays.removeDuplicates(b);return b},getListeners:function(b){var c=[];for(var a=0;a<this._data.length;a+=2){if(this._data[a]==b){c.push(this._data[a+1])}}return c},getListenerCount:function(b){var c=0;for(var a=0;a<this._data.length;a+=2){if(this._data[a]==b){++c}}return c},hasListeners:function(b){for(var a=0;a<this._data.length;a+=2){if(this._data[a]==b){return true}}return false},isEmpty:function(){return this._data.length===0},removeListener:function(b,d){for(var a=0;a<this._data.length;a+=2){if(this._data[a]==b&&d==this._data[a+1]){var c=this._data.length;this._data.splice(a,2);return}}},toString:function(){var a="";for(var b=0;b<this._data.length;b+=2){if(b>0){a+=", "}a+=this._data[b]+":"+this._data[b+1]}return a}});Core.ResourceBundle=Core.extend({$static:{getParentLanguageCode:function(a){if(a.indexOf("-")==-1){return null}else{return a.substring(0,a.indexOf("-"))}}},_sourceMaps:null,_generatedMaps:null,_defaultMap:null,$construct:function(a){this._sourceMaps={};this._generatedMaps={};this._defaultMap=a},get:function(d){var c=d?this._generatedMaps[d]:this._defaultMap;if(c){return c}c={};var a;var e=this._sourceMaps[d];if(e){for(a in e){c[a]=e[a]}}var b=Core.ResourceBundle.getParentLanguageCode(d);if(b){e=this._sourceMaps[b];if(e){for(a in e){if(c[a]===undefined){c[a]=e[a]}}}}for(a in this._defaultMap){if(c[a]===undefined){c[a]=this._defaultMap[a]}}this._generatedMaps[d]=c;return c},set:function(b,a){this._generatedMaps={};this._sourceMaps[b]=a},toString:function(){var b="ResourceBundle: ";for(var a in this._sourceMaps){b+=" "+a}return b}});Core.Web={dragInProgress:false,init:function(){if(Core.Web.initialized){return}Core.Web.Env._init();Core.Web.Measure._calculateExtentSizes();Core.Web.Measure.Bounds._initMeasureContainer();if(Core.Web.Env.QUIRK_CSS_POSITIONING_ONE_SIDE_ONLY){Core.Web.VirtualPosition._init()}if(Core.Web.Env.BROWSER_INTERNET_EXPLORER){Core.Web.DOM.addEventListener(document,"selectstart",Core.Web._selectStartListener,false)}Core.Web.initialized=true},_selectStartListener:function(a){a=a?a:window.event;if(Core.Web.dragInProgress){Core.Web.DOM.preventEventDefault(a)}}};Core.Web.DOM={_focusPendingElement:null,_focusRunnable:null,addEventListener:function(d,c,b,a){if(d.addEventListener){d.addEventListener(c,b,a)}else{if(d.attachEvent){d.attachEvent("on"+c,b)}}},createDocument:function(a,d){if(document.implementation&&document.implementation.createDocument){var e;if(Core.Web.Env.BROWSER_FIREFOX&&Core.Web.Env.BROWSER_VERSION_MAJOR==3&&Core.Web.Env.BROWSER_VERSION_MINOR===0){e=new DOMParser().parseFromString("<?xml version='1.0' encoding='UTF-8'?><"+d+"/>","application/xml")}else{e=document.implementation.createDocument(a,d,null)}if(!e.documentElement){e.appendChild(e.createElement(d))}return e}else{if(window.ActiveXObject){var b=new ActiveXObject("Microsoft.XMLDOM");var c=b.createElement(d);b.appendChild(c);return b}else{throw new Error("XML DOM creation not supported by browser environment.")}}},focusElement:function(a){if(Core.Web.Env.QUIRK_DELAYED_FOCUS_REQUIRED){if(!this._focusRunnable){this._focusRunnable=new Core.Web.Scheduler.MethodRunnable(this._focusElementImpl)}Core.Web.DOM._focusPendingElement=a;Core.Web.Scheduler.add(this._focusRunnable)}else{this._focusElementImpl(a)}},_focusElementImpl:function(b){if(!b){b=Core.Web.DOM._focusPendingElement;Core.Web.DOM._focusPendingElement=null}if(b&&b.focus){try{b.focus()}catch(a){}}},getChildElementByTagName:function(a,c){var b=a.firstChild;while(b){if(b.nodeType==1&&b.nodeName==c){return b}b=b.nextSibling}return null},getChildElementsByTagName:function(a,c){var d=[];var b=a.firstChild;while(b){if(b.nodeType==1&&b.nodeName==c){d.push(b)}b=b.nextSibling}return d},getEventOffset:function(b){if(typeof b.offsetX=="number"){return{x:b.offsetX,y:b.offsetY}}else{var a=new Core.Web.Measure.Bounds(this.getEventTarget(b));return{x:b.clientX-a.left,y:b.clientY-a.top}}},getEventTarget:function(a){return a.target?a.target:a.srcElement},getEventRelatedTarget:function(a){return a.relatedTarget?a.relatedTarget:a.toElement},isAncestorOf:function(a,c){var b=c;while(b!==null){if(b==a){return true}b=b.parentNode}return false},preventEventDefault:function(a){if(a.preventDefault){a.preventDefault()}else{a.returnValue=false}},removeAllChildren:function(a){while(a.firstChild){a.removeChild(a.firstChild)}},removeEventListener:function(d,c,b,a){if(d.removeEventListener){d.removeEventListener(c,b,a)}else{if(d.detachEvent){d.detachEvent("on"+c,b)}}},removeNode:function(b){var a=b.parentNode;if(!a){return}if(Core.Web.Env.QUIRK_PERFORMANCE_LARGE_DOM_REMOVE){this._removeNodeRecursive(b)}else{a.removeChild(b)}},_removeNodeRecursive:function(c){var b=c.firstChild;while(b){var a=b.nextSibling;this._removeNodeRecursive(b);b=a}c.parentNode.removeChild(c)},stopEventPropagation:function(a){if(a.stopPropagation){a.stopPropagation()}else{a.cancelBubble=true}}};Core.Web.Env={ENGINE_PRESTO:null,ENGINE_WEBKIT:null,ENGINE_KHTML:null,ENGINE_MSHTML:null,ENGINE_GECKO:null,BROWSER_MOZILLA:null,BROWSER_OPERA:null,BROWSER_KONQUEROR:null,BROWSER_FIREFOX:null,BROWSER_INTERNET_EXPLORER:null,BROWSER_CHROME:null,BROWSER_VERSION_MAJOR:null,BROWSER_VERSION_MINOR:null,ENGINE_VERSION_MAJOR:null,ENGINE_VERSION_MINOR:null,DECEPTIVE_USER_AGENT:null,CSS_FLOAT:"cssFloat",MEASURE_OFFSET_EXCLUDES_BORDER:null,NOT_SUPPORTED_CSS_OPACITY:null,NOT_SUPPORTED_RELATIVE_COLUMN_WIDTHS:null,PROPRIETARY_EVENT_MOUSE_ENTER_LEAVE_SUPPORTED:null,PROPRIETARY_EVENT_SELECT_START_SUPPORTED:null,PROPRIETARY_IE_OPACITY_FILTER_REQUIRED:null,PROPRIETARY_IE_PNG_ALPHA_FILTER_REQUIRED:null,QUIRK_KEY_CODE_IS_CHAR_CODE:null,QUIRK_KEY_PRESS_FIRED_FOR_SPECIAL_KEYS:null,QUIRK_KEY_DOWN_NOT_FIRED_FOR_SPECIAL_KEYS:null,QUIRK_CSS_BORDER_COLLAPSE_INSIDE:null,QUIRK_CSS_POSITIONING_ONE_SIDE_ONLY:null,QUIRK_DELAYED_FOCUS_REQUIRED:null,QUIRK_IE_BLANK_SCREEN:null,QUIRK_IE_HAS_LAYOUT:null,QUIRK_IE_KEY_DOWN_EVENT_REPEAT:null,QUIRK_IE_SELECT_LIST_DOM_UPDATE:null,QUIRK_IE_SELECT_PERCENT_WIDTH:null,QUIRK_IE_SELECT_Z_INDEX:null,QUIRK_IE_SECURE_ITEMS:null,QUIRK_IE_TABLE_PERCENT_WIDTH_SCROLLBAR_ERROR:null,QUIRK_MEASURE_OFFSET_HIDDEN_BORDER:null,QUIRK_OPERA_CSS_POSITIONING:null,QUIRK_PERFORMANCE_LARGE_DOM_REMOVE:null,QUIRK_SAFARI_DOM_TEXT_ESCAPE:null,QUIRK_TABLE_CELL_WIDTH_EXCLUDES_PADDING:null,QUIRK_UNLOADED_IMAGE_HAS_SIZE:null,_ua:null,_uaAlpha:null,_init:function(){var b=null,c=null,a=false;this._ua=navigator.userAgent.toLowerCase();this._uaAlpha="/"+this._ua.replace(/[^a-z]+/g,"/")+"/";if(this._testUAString("opera")){this.BROWSER_OPERA=a=this.ENGINE_PRESTO=true;b=this._parseVersionInfo("opera/")}else{if(this._testUAString("chrome")){this.BROWSER_CHROME=a=this.ENGINE_WEBKIT=true;b=this._parseVersionInfo("chrome/")}else{if(this._testUAString("safari")){this.BROWSER_SAFARI=a=this.ENGINE_WEBKIT=true;b=this._parseVersionInfo("version/")}else{if(this._testUAString("konqueror")){this.BROWSER_KONQUEROR=a=this.ENGINE_KHTML=true;b=this._parseVersionInfo("konqueror/")}else{if(this._testUAString("firefox")){this.BROWSER_FIREFOX=this.BROWSER_MOZILLA=a=this.ENGINE_GECKO=true;b=this._parseVersionInfo("firefox/")}else{if(this._testUAString("msie")){this.BROWSER_INTERNET_EXPLORER=a=this.ENGINE_MSHTML=true;c=b=this._parseVersionInfo("msie ")}}}}}}if(!a){if(this._testUAString("presto")){this.ENGINE_PRESTO=true}else{if(this._testUAString("webkit")){this.ENGINE_WEBKIT=true}else{if(this._testUAString("khtml")){this.ENGINE_KHTML=true}else{if(this._testUAString("trident")){this.ENGINE_MSHTML=true}else{if(this._testUAString("gecko")){this.BROWSER_MOZILLA=this.ENGINE_GECKO=true}}}}}}if(!c){if(this.ENGINE_PRESTO){c=this._parseVersionInfo("presto/")}else{if(this.ENGINE_WEBKIT){c=this._parseVersionInfo("webkit/")}else{if(this.ENGINE_GECKO){c=this._parseVersionInfo("rv:");if(!b){b=c}}}}}if(b){this.BROWSER_VERSION_MAJOR=b.major;this.BROWSER_VERSION_MINOR=b.minor}if(c){this.ENGINE_VERSION_MAJOR=c.major;this.ENGINE_VERSION_MINOR=c.minor}this.DECEPTIVE_USER_AGENT=this.BROWSER_OPERA||this.BROWSER_SAFARI||this.BROWSER_CHROME||this.BROWSER_KONQUEROR;this.MEASURE_OFFSET_EXCLUDES_BORDER=false;if(this.BROWSER_INTERNET_EXPLORER){this.CSS_FLOAT="styleFloat";this.QUIRK_KEY_CODE_IS_CHAR_CODE=true;this.QUIRK_IE_SECURE_ITEMS=true;this.PROPRIETARY_EVENT_MOUSE_ENTER_LEAVE_SUPPORTED=true;this.PROPRIETARY_EVENT_SELECT_START_SUPPORTED=true;this.QUIRK_IE_KEY_DOWN_EVENT_REPEAT=true;this.QUIRK_DELAYED_FOCUS_REQUIRED=true;this.QUIRK_UNLOADED_IMAGE_HAS_SIZE=true;this.MEASURE_OFFSET_EXCLUDES_BORDER=true;this.QUIRK_IE_BLANK_SCREEN=true;this.QUIRK_IE_HAS_LAYOUT=true;if(this.BROWSER_VERSION_MAJOR<8){this.QUIRK_TABLE_CELL_WIDTH_EXCLUDES_PADDING=true;this.NOT_SUPPORTED_RELATIVE_COLUMN_WIDTHS=true;this.QUIRK_CSS_BORDER_COLLAPSE_INSIDE=true;this.NOT_SUPPORTED_CSS_OPACITY=true;this.PROPRIETARY_IE_OPACITY_FILTER_REQUIRED=true;this.QUIRK_IE_TABLE_PERCENT_WIDTH_SCROLLBAR_ERROR=true;this.QUIRK_IE_SELECT_PERCENT_WIDTH=true;if(this.BROWSER_VERSION_MAJOR<7){this.QUIRK_IE_SELECT_LIST_DOM_UPDATE=true;this.QUIRK_CSS_POSITIONING_ONE_SIDE_ONLY=true;this.PROPRIETARY_IE_PNG_ALPHA_FILTER_REQUIRED=true;this.QUIRK_IE_SELECT_Z_INDEX=true;Core.Arrays.LargeMap.garbageCollectEnabled=true}}}else{if(this.ENGINE_GECKO){this.QUIRK_KEY_PRESS_FIRED_FOR_SPECIAL_KEYS=true;this.MEASURE_OFFSET_EXCLUDES_BORDER=true;this.QUIRK_MEASURE_OFFSET_HIDDEN_BORDER=true;if(this.BROWSER_FIREFOX){if(this.BROWSER_VERSION_MAJOR<2){this.QUIRK_DELAYED_FOCUS_REQUIRED=true}}else{this.QUIRK_PERFORMANCE_LARGE_DOM_REMOVE=true;this.QUIRK_DELAYED_FOCUS_REQUIRED=true}}else{if(this.ENGINE_PRESTO){this.QUIRK_KEY_CODE_IS_CHAR_CODE=true;this.QUIRK_TABLE_CELL_WIDTH_EXCLUDES_PADDING=true;if(this.BROWSER_VERSION_MAJOR==9&&this.BROWSER_VERSION_MINOR>=50){this.QUIRK_OPERA_CSS_POSITIONING=true}this.NOT_SUPPORTED_RELATIVE_COLUMN_WIDTHS=true}else{if(this.ENGINE_WEBKIT){this.MEASURE_OFFSET_EXCLUDES_BORDER=true;this.QUIRK_SAFARI_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_SAFARI_DOM_TEXT_ESCAPE&&b instanceof Document){this._preprocessSafariDOM(b.documentElement)}this._messageObject=b;this._listenerList=new Core.ListenerList()},_preprocessSafariDOM: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._preprocessSafariDOM(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)},_fireLoadEvent:function(){this._listenerList.fireEvent({type:"load",source:this})},hasNewLibraries:function(){return this._libraries.length>0},_install:function(){for(var b=0;b<this._libraries.length;++b){try{this._libraries[b]._install()}catch(a){throw new Error('Exception installing library "'+this._libraries[b]._url+'"; '+a)}}this._fireLoadEvent()},_notifyRetrieved:function(){++this._loadedCount;if(this._loadedCount==this._totalCount){this._install()}},load:function(){this._totalCount=this._libraries.length;for(var a=0;a<this._libraries.length;++a){this._libraries[a]._retrieve()}},removeLoadListener:function(a){this._listenerList.removeListener("load",a)}}),_Item:Core.extend({_url:null,_group:null,_content:null,$construct:function(b,a){this._url=a;this._group=b},_retrieveListener:function(a){if(!a.valid){throw new Error('Invalid HTTP response retrieving library "'+this._url+'", received status: '+a.source.getStatus())}this._content=a.source.getResponseText();this._group._notifyRetrieved()},_install:function(){if(Core.Web.Library._loadedLibraries[this._url]){return}Core.Web.Library._loadedLibraries[this._url]=true;if(this._content==null){throw new Error("Attempt to install library when no content has been loaded.")}Core.Web.Library.evalLine=new Error().lineNumber+1;eval(this._content)},_retrieve:function(){var a=new Core.Web.HttpConnection(this._url,"GET");a.addResponseListener(Core.method(this,this._retrieveListener));a.connect()}}),exec:function(b,c){var d=null;for(var a=0;a<b.length;++a){if(!Core.Web.Library._loadedLibraries[b[a]]){if(d==null){d=new Core.Web.Library.Group()}d.add(b[a])}}if(d==null){Core.Web.Scheduler.run(c);return}d.addLoadListener(c);d.load()}};Core.Web.Measure={_scrollElements:["div","body"],_hInch:96,_vInch:96,_hEx:7,_vEx:7,_hEm:13.3333,_vEm:13.3333,SCROLL_WIDTH:17,SCROLL_HEIGHT:17,_PARSER:/^(-?\d+(?:\.\d+)?)(.+)?$/,extentToPixels:function(d,a){var f=this._PARSER.exec(d);if(!f){throw new Error("Invalid Extent: "+d)}var e=parseFloat(f[1]);var b=f[2]?f[2]:"px";if(!b||b=="px"){return e}var c=a?Core.Web.Measure._hInch:Core.Web.Measure._vInch;switch(b){case"%":return null;case"in":return e*(a?Core.Web.Measure._hInch:Core.Web.Measure._vInch);case"cm":return e*(a?Core.Web.Measure._hInch:Core.Web.Measure._vInch)/2.54;case"mm":return e*(a?Core.Web.Measure._hInch:Core.Web.Measure._vInch)/25.4;case"pt":return e*(a?Core.Web.Measure._hInch:Core.Web.Measure._vInch)/72;case"pc":return e*(a?Core.Web.Measure._hInch:Core.Web.Measure._vInch)/6;case"em":return e*(a?Core.Web.Measure._hEm:Core.Web.Measure._vEm);case"ex":return e*(a?Core.Web.Measure._hEx:Core.Web.Measure._vEx)}},_calculateExtentSizes:function(){var h=document.getElementsByTagName("body")[0];var f=document.createElement("div");f.style.width="4in";f.style.height="4in";h.appendChild(f);Core.Web.Measure._hInch=f.offsetWidth/4;Core.Web.Measure._vInch=f.offsetHeight/4;h.removeChild(f);var b=document.createElement("div");b.style.width="24em";b.style.height="24em";h.appendChild(b);Core.Web.Measure._hEm=b.offsetWidth/24;Core.Web.Measure._vEm=b.offsetHeight/24;h.removeChild(b);var a=document.createElement("div");a.style.width="24ex";a.style.height="24ex";h.appendChild(a);Core.Web.Measure._hEx=a.offsetWidth/24;Core.Web.Measure._vEx=a.offsetHeight/24;h.removeChild(a);var g=document.createElement("div");g.style.cssText="width:500px;height:100px;overflow:auto;";var d=document.createElement("div");d.style.cssText="width:100px;height:200px;";g.appendChild(d);var e=document.createElement("div");e.style.cssText="width:100%;height:10px;";g.appendChild(e);h.appendChild(g);var c=500-e.offsetWidth;if(c){Core.Web.Measure.SCROLL_WIDTH=Core.Web.Measure.SCROLL_HEIGHT=c}h.removeChild(g)},_getScrollOffset:function(b){var a=0,c=0;do{if(b.scrollLeft||b.scrollTop){a+=b.scrollTop||0;c+=b.scrollLeft||0}b=b.offsetParent}while(b);return{left:c,top:a}},_getCumulativeOffset:function(b){var a=0,d=0,e=true;do{a+=b.offsetTop||0;d+=b.offsetLeft||0;if(!e&&Core.Web.Env.MEASURE_OFFSET_EXCLUDES_BORDER){if(b.style.borderLeftWidth&&b.style.borderLeftStyle!="none"){var c=Core.Web.Measure.extentToPixels(b.style.borderLeftWidth,true);d+=c;if(Core.Web.Env.QUIRK_MEASURE_OFFSET_HIDDEN_BORDER&&b.style.overflow=="hidden"){d+=c}}if(b.style.borderTopWidth&&b.style.borderTopStyle!="none"){var f=Core.Web.Measure.extentToPixels(b.style.borderTopWidth,false);a+=f;if(Core.Web.Env.QUIRK_MEASURE_OFFSET_HIDDEN_BORDER&&b.style.overflow=="hidden"){a+=f}}}e=false;b=b.offsetParent}while(b);return{left:d,top:a}},Bounds:Core.extend({$static:{FLAG_MEASURE_DIMENSION:1,FLAG_MEASURE_POSITION:2,_initMeasureContainer:function(){this._offscreenDiv=document.createElement("div");this._offscreenDiv.style.cssText="position: absolute; top: -1300px; left: -1700px; width: 1600px; height: 1200px;";document.body.appendChild(this._offscreenDiv)}},width:null,height:null,top:null,left:null,$construct:function(g,e){var b=(e&&e.flags)||(Core.Web.Measure.Bounds.FLAG_MEASURE_DIMENSION|Core.Web.Measure.Bounds.FLAG_MEASURE_POSITION);if(g===document.body){return{x:0,y:0,height:window.innerHeight||document.documentElement.clientHeight,width:window.innerWidth||document.documentElement.clientWidth}}var a=g;while(a&&a!=document){a=a.parentNode}var c=a==document;var i,f;if(b&Core.Web.Measure.Bounds.FLAG_MEASURE_DIMENSION){if(!c){i=g.parentNode;f=g.nextSibling;if(i){i.removeChild(g)}if(e){if(e.width){Core.Web.Measure.Bounds._offscreenDiv.width=e.width}if(e.height){Core.Web.Measure.Bounds._offscreenDiv.height=e.height}}Core.Web.Measure.Bounds._offscreenDiv.appendChild(g);if(e){Core.Web.Measure.Bounds._offscreenDiv.width="1600px";Core.Web.Measure.Bounds._offscreenDiv.height="1200px"}}this.width=g.offsetWidth;this.height=g.offsetHeight;if(!c){Core.Web.Measure.Bounds._offscreenDiv.removeChild(g);if(i){i.insertBefore(g,f)}}}if(c&&(b&Core.Web.Measure.Bounds.FLAG_MEASURE_POSITION)){var d=Core.Web.Measure._getCumulativeOffset(g);var h=Core.Web.Measure._getScrollOffset(g);this.top=d.top-h.top;this.left=d.left-h.left}},toString:function(){return(this.left!=null?(this.left+","+this.top+" : "):"")+(this.width!=null?("["+this.width+"x"+this.height+"]"):"")}})};Core.Web.Scheduler={_runnables:[],_threadHandle:null,_nextExecution:null,add:function(a){Core.Arrays.remove(Core.Web.Scheduler._runnables,a);a._nextExecution=new Date().getTime()+(a.timeInterval?a.timeInterval:0);Core.Web.Scheduler._runnables.push(a);Core.Web.Scheduler._setTimeout(a._nextExecution)},_execute:function(){Core.Web.Scheduler._threadHandle=null;var d=new Date().getTime();var f=Number.MAX_VALUE;var c,e;for(c=0;c<Core.Web.Scheduler._runnables.length;++c){e=Core.Web.Scheduler._runnables[c];if(e&&e._nextExecution&&e._nextExecution<=d){e._nextExecution=null;try{e.run()}catch(b){throw (b)}}}var g=[];for(c=0;c<Core.Web.Scheduler._runnables.length;++c){e=Core.Web.Scheduler._runnables[c];if(e==null){continue}if(e._nextExecution){g.push(e);var a=e._nextExecution-d;if(a<f){f=a}continue}if(e.timeInterval!=null&&e.repeat){e._nextExecution=d+e.timeInterval;g.push(e);if(e.timeInterval<f){f=e.timeInterval}}}Core.Web.Scheduler._runnables=g;if(f<Number.MAX_VALUE){Core.Web.Scheduler._setTimeout(d+f)}},remove:function(b){var a=Core.Arrays.indexOf(Core.Web.Scheduler._runnables,b);Core.Web.Scheduler._runnables[a]=null},run:function(d,a,c){var b=new Core.Web.Scheduler.MethodRunnable(d,a,c);Core.Web.Scheduler.add(b);return b},_setTimeout:function(c){if(Core.Web.Scheduler._threadHandle!=null&&Core.Web.Scheduler._nextExecution<c){return}if(Core.Web.Scheduler._threadHandle!=null){window.clearTimeout(Core.Web.Scheduler._threadHandle)}var a=new Date().getTime();Core.Web.Scheduler._nextExecution=c;var b=c-a>0?c-a:0;Core.Web.Scheduler._threadHandle=window.setTimeout(Core.Web.Scheduler._execute,b)},update:function(c){if(Core.Arrays.indexOf(Core.Web.Scheduler._runnables,c)==-1){return}var b=new Date().getTime();var a=c.timeInterval?c.timeInterval:0;c._nextExecution=b+a;Core.Web.Scheduler._setTimeout(c._nextExecution)}};Core.Web.Scheduler.Runnable=Core.extend({_nextExecution:null,$virtual:{timeInterval:null,repeat:false},$abstract:{run:function(){}}});Core.Web.Scheduler.MethodRunnable=Core.extend(Core.Web.Scheduler.Runnable,{f:null,$construct:function(c,a,b){if(!a&&b){throw new Error("Cannot create repeating runnable without time delay:"+c)}this.f=c;this.timeInterval=a;this.repeat=!!b},$virtual:{run:function(){this.f()}}});Core.Web.VirtualPosition={_OFFSETS_VERTICAL:["paddingTop","paddingBottom","marginTop","marginBottom","borderTopWidth","borderBottomWidth"],_OFFSETS_HORIZONTAL:["paddingLeft","paddingRight","marginLeft","marginRight","borderLeftWidth","borderRightWidth"],enabled:false,_calculateOffsets:function(e,b){var c=0;for(var a=0;a<e.length;++a){var d=b[e[a]];if(d){if(d.toString().indexOf("px")==-1){return -1}c+=parseInt(d,10)}}return c},_init:function(){this.enabled=true},redraw:function(c){if(!this.enabled){return}if(!c||!c.parentNode){return}var f;if(this._verifyPixelValue(c.style.top)&&this._verifyPixelValue(c.style.bottom)){var b=c.parentNode.offsetHeight;if(!isNaN(b)){f=this._calculateOffsets(this._OFFSETS_VERTICAL,c.style);if(f!=-1){var e=b-parseInt(c.style.top,10)-parseInt(c.style.bottom,10)-f;if(e<=0){c.style.height=0}else{if(c.style.height!=e+"px"){c.style.height=e+"px"}}}}}if(this._verifyPixelValue(c.style.left)&&this._verifyPixelValue(c.style.right)){var d=c.parentNode.offsetWidth;if(!isNaN(d)){f=this._calculateOffsets(this._OFFSETS_HORIZONTAL,c.style);if(f!=-1){var a=d-parseInt(c.style.left,10)-parseInt(c.style.right,10)-f;if(a<=0){c.style.width=0}else{if(c.style.width!=a+"px"){c.style.width=a+"px"}}}}}},_verifyPixelValue:function(b){if(b==null||b===""){return false}var a=b.toString();return a=="0"||a.indexOf("px")!=-1}};Echo={};Echo.Application=Core.extend({$static:{_nextUid:1,generateUid:function(){return this._nextUid++}},$abstract:true,$virtual:{init:function(){},dispose:function(){}},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},isActive:function(){return true},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 e=this._application.getFocusedComponent();var f=this._getDescendantIndex(g,e);if(f==-1){return null}var a=f;var b=e;do{b=this.find(b,d);if(b==null){return null}a=this._getDescendantIndex(g,b)}while(Math.abs(a-f)<c&&b!=e);if(b==e){return null}this._application.setFocusedComponent(b);return b},_getDescendantIndex:function(b,a){while(a.parent!=b&&a.parent!=null){a=a.parent}if(a.parent==null){return -1}return b.indexOf(a)}});Echo.LayoutDirection=Core.extend({_ltr:false,$construct:function(a){this._ltr=a},isLeftToRight:function(){return this._ltr}});Echo.LayoutDirection.LTR=new Echo.LayoutDirection(true);Echo.LayoutDirection.RTL=new Echo.LayoutDirection(false);Echo.StyleSheet=Core.extend({_nameToStyleMap:null,_renderCache:null,$construct:function(c){this._renderCache={};this._nameToStyleMap={};if(c){for(var b in c){for(var a in c[b]){this.setStyle(b,a,c[b][a])}}}},getRenderStyle:function(b,a){var d=this._renderCache[b];if(!d){return null}var c=d[a];if(c!==undefined){return c}else{return this._loadRenderStyle(b,a)}},_loadRenderStyle:function(c,b){var 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){if(a){Echo.Render._doRenderDisplayImpl(b)}else{for(var c=0;c<b.children.length;++c){Echo.Render._doRenderDisplayImpl(b.children[c])}}},_doRenderDisplayImpl:function(a){if(!a.peer){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)}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() implemnetation.")}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,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(c){var b,a=false;if(c.fullRefresh||c.hasAddedChildren()||c.hasRemovedChildren()){Echo.Sync.renderComponentDefaults(this.component,this.client.domainElement);document.title=this.component.render("title","");this._renderContent(c);a=true}else{this.client.domainElement.dir=this.client.application.getLayoutDirection().isLeftToRight()?"ltr":"rtl";if(c.hasUpdatedProperties()){b=c.getUpdatedProperty("title");if(b){document.title=b.newValue}b=c.getUpdatedProperty("background");if(b){Echo.Sync.Color.renderClear(b.newValue,this.client.domainElement,"backgroundColor")}b=c.getUpdatedProperty("foreground");if(b){Echo.Sync.Color.renderClear(b.newValue,this.client.domainElement,"foreground")}b=c.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.Sync.Composite=Core.extend(Echo.Render.ComponentSync,{$load:function(){Echo.Render.registerPeer("Composite",this)},div:null,contentDiv:null,$virtual:{renderStyle:function(){Echo.Sync.renderComponentDefaults(this.component,this.div)}},renderAdd:function(b,a){this.div=this.contentDiv=document.createElement("div");this.div.id=this.component.renderId;if(this.component.children.length!==0){this.renderStyle();Echo.Render.renderComponentAdd(b,this.component.children[0],this.contentDiv)}a.appendChild(this.div)},renderDispose:function(a){this.div=null},renderUpdate:function(c){var a=this.div;var b=a.parentNode;Echo.Render.renderComponentDispose(c,c.parent);b.removeChild(a);this.renderAdd(c,b);return true}});Echo.Sync.Panel=Core.extend(Echo.Sync.Composite,{$load:function(){Echo.Render.registerPeer("Panel",this)},renderDisplay:function(){if(this._imageBorder){Echo.Sync.FillImageBorder.renderContainerDisplay(this.div)}},renderStyle:function(){this._imageBorder=this.component.render("imageBorder");var e=this.component.children.length!==0?this.component.children[0]:null;var b=this.component.render("width");var a=this.component.render("height");if(Echo.Sync.Extent.isPercent(a)){a=null}if(e&&e.pane){this.div.style.position="relative";if(!a){a="10em"}}if(b||a){this.contentDiv.style.overflow="hidden";if(a&&this._imageBorder){var d=Echo.Sync.Insets.toPixels(this._imageBorder.contentInsets);var c=Echo.Sync.Extent.toPixels(a)-d.top-d.bottom;if(!e||!e.pane){d=Echo.Sync.Insets.toPixels(this.component.render("insets"));c-=d.top+d.bottom}this.contentDiv.style.height=c+"px"}}if(this._imageBorder){this.div=Echo.Sync.FillImageBorder.renderContainer(this._imageBorder,{child:this.contentDiv})}else{Echo.Sync.Border.render(this.component.render("border"),this.contentDiv)}Echo.Sync.renderComponentDefaults(this.component,this.contentDiv);if(!e||!e.pane){Echo.Sync.Insets.render(this.component.render("insets"),this.contentDiv,"padding")}Echo.Sync.FillImage.render(this.component.render("backgroundImage"),this.contentDiv);Echo.Sync.Extent.render(b,this.div,"width",true,true);Echo.Sync.Extent.render(a,this.div,"height",false,false)}});Echo.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"},_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,_processKeyRef:null,_waitIndicatorActive:false,_processApplicationFocusRef:null,parent:null,_waitIndicator:null,_preWaitIndicatorDelay:500,_waitIndicatorRunnable:null,_lastKeyCode: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)}},configure:function(a,b){if(this.application){Core.Arrays.remove(Echo.Client._activeClients,this);Core.Web.Event.remove(this.domainElement,"keypress",this._processKeyRef,false);Core.Web.Event.remove(this.domainElement,"keydown",this._processKeyRef,false);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);Core.Web.Event.add(this.domainElement,"keypress",this._processKeyRef,false);Core.Web.Event.add(this.domainElement,"keydown",this._processKeyRef,false);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(l,m,h,g,f){l=l||document.body;var e=this.createInputRestriction();this._setWaitVisible(false);var i=document.createElement("div");i.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){i.style.filter="alpha(opacity=75)"}l.appendChild(i);var a=document.createElement("div");a.style.cssText="position:absolute;z-index:32767;width:100%;height:100%;overflow:hidden;";l.appendChild(a);var d=document.createElement("div");d.style.cssText="border-bottom:4px solid #af1f1f;background-color:#5f1f1f;color:#ffffff;padding:20px 40px 0px;";if(m){var k=document.createElement("div");k.style.cssText="font-weight: bold; margin-bottom:20px;";k.appendChild(document.createTextNode(m));d.appendChild(k)}if(h){var j=document.createElement("div");j.style.cssText="max-height:10em;overflow:auto;margin-bottom:20px;";j.appendChild(document.createTextNode(h));d.appendChild(j)}a.appendChild(d);if(g){var c=document.createElement("div");c.tabIndex="0";c.style.cssText="border: 1px outset #af2f2f;background-color:#af2f2f;padding:2px 10px;margin-bottom:20px;cursor:pointer;font-weight:bold;";c.appendChild(document.createTextNode(g));d.appendChild(c);var b=Core.method(this,function(n){if(n.type!="keypress"||n.keyCode==13){try{Core.Web.DOM.removeEventListener(c,"click",b,false);Core.Web.DOM.removeEventListener(c,"keypress",b,false);a.parentNode.removeChild(a);i.parentNode.removeChild(i);this.removeInputRestriction(e)}finally{if(f){f()}}}});Core.Web.DOM.addEventListener(c,"click",b,false);Core.Web.DOM.addEventListener(c,"keypress",b,false);Core.Web.DOM.focusElement(c)}},exec:function(b,c){var a=this.createInputRestriction();Core.Web.Library.exec(b,Core.method(this,function(){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(h){var d=h.type=="keypress";var g=d?this._lastKeyCode:this._lastKeyCode=Core.Web.Key.translateKeyCode(h.keyCode);if(g==8){var i=h.target.nodeName?h.target.nodeName.toLowerCase():null;if(i!="input"&&i!="textarea"){Core.Web.DOM.preventEventDefault(h)}}else{if(!d&&g==9){this.application.focusNext(h.shiftKey);Core.Web.DOM.preventEventDefault(h)}}if(d&&Core.Web.Env.QUIRK_KEY_PRESS_FIRED_FOR_SPECIAL_KEYS&&!h.charCode){return true}var b=this.application.getFocusedComponent(),a=true,c=null;if(!b){return true}var f=d?"clientKeyPress":"clientKeyDown";while(b&&a){if(b.peer&&b.peer[f]){if(!c){c={type:h.type,source:this,keyCode:g,domEvent:h};if(d){c.charCode=Core.Web.Env.QUIRK_KEY_CODE_IS_CHAR_CODE?h.keyCode:h.charCode}}a=b.peer[f](c)}b=b.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)}this._waitIndicator=a},_waitIndicatorActivate:function(){this._waitIndicator.activate(this)},_windowResizeListener:function(a){Echo.Render.notifyResize(this.application.rootComponent)}});Echo.Client.Timer=Core.extend({_times:null,_labels:null,$construct:function(){this._times=[new Date().getTime()];this._labels=["Start"]},mark:function(a){this._times.push(new Date().getTime());this._labels.push(a)},toString:function(){var a="";for(var b=1;b<this._times.length;++b){var c=this._times[b]-this._times[b-1];a+=this._labels[b]+":"+c+" "}a+="TOT:"+(this._times[this._times.length-1]-this._times[0])+"ms";return a}});Echo.Client.WaitIndicator=Core.extend({$abstract:{activate:function(a){},deactivate:function(a){}}});Echo.Client.DefaultWaitIndicator=Core.extend(Echo.Client.WaitIndicator,{$construct:function(){this._divElement=document.createElement("div");this._divElement.style.cssText="display: none;z-index:32767;position:absolute;top:30px;right:30px;width:200px;padding:20px;border:1px outset #abcdef;background-color:#abcdef;color:#000000;text-align:center;";this._textNode=document.createTextNode("");this._divElement.appendChild(this._textNode);this._fadeRunnable=new Core.Web.Scheduler.MethodRunnable(Core.method(this,this._tick),50,true);document.body.appendChild(this._divElement)},activate:function(a){if(a.configuration["WaitIndicator.Background"]){this._divElement.style.backgroundColor=a.configuration["WaitIndicator.Background"];this._divElement.style.borderColor=a.configuration["WaitIndicator.Background"]}if(a.configuration["WaitIndicator.Foreground"]){this._divElement.style.color=a.configuration["WaitIndicator.Foreground"]}this._textNode.nodeValue=a.configuration["WaitIndicator.Text"];this._divElement.style.display="block";Core.Web.Scheduler.add(this._fadeRunnable);this._opacity=0},deactivate:function(a){this._divElement.style.display="none";Core.Web.Scheduler.remove(this._fadeRunnable)},_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.DebugConsole={_installed:false,_rendered:false,_titleDiv:null,_contentDiv:null,_div:null,_logging:false,_maximized:false,_mouseMoveRef:null,_mouseDownRef:null,_addControl:function(b,c){var a=document.createElement("span");a.style.cssText="padding:0 8px 0 0;cursor:pointer;";a.appendChild(document.createTextNode("["+b+"]"));this._controlsDiv.appendChild(a);Core.Web.DOM.addEventListener(a,"click",Core.method(this,c),false)},_clearListener:function(a){while(this._contentDiv.firstChild){this._contentDiv.removeChild(this._contentDiv.firstChild)}},_closeListener:function(a){this._div.style.display="none"},_consoleWrite:function(b){if(!this._logging){return}if(!this._rendered){this._render()}var a=document.createElement("div");a.appendChild(document.createTextNode(b));this._contentDiv.appendChild(a);this._contentDiv.scrollTop=10000000},_keyListener:function(a){a=a?a:window.event;if(!(a.keyCode==67&&a.ctrlKey&&a.altKey)){return}this._logging=true;this.setVisible(!this.isVisible())},install:function(){if(this._installed){return}Core.Web.DOM.addEventListener(document,"keydown",Core.method(this,this._keyListener),false);Core.Debug.consoleWrite=function(a){Echo.DebugConsole._consoleWrite(a)};if(document.URL.toString().indexOf("?debug")!=-1){this.setVisible(true);this._logging=true}this._installed=true},isVisible:function(){if(!this._rendered){return false}return this._div.style.display=="block"},_maximizeListener:function(c){this._maximized=!this._maximized;this._div.style.top="20px";this._div.style.right="20px";this._div.style.left="";this._div.style.bottom="";if(this._maximized){var a=document.height||600;var b=document.width||600;this._div.style.width=(b-50)+"px";this._div.style.height=(a-50)+"px";this._contentDiv.style.width=(b-72)+"px";this._contentDiv.style.height=(a-85)+"px"}else{this._div.style.width="300px";this._div.style.height="300px";this._contentDiv.style.width="278px";this._contentDiv.style.height="265px"}},_render:function(){var a;this._div=document.createElement("div");this._div.id="__DebugConsole__";this._div.style.cssText="display:none;position:absolute;top:20px;right:20px;width:300px;height:300px;background-color:#2f2f3f;border:5px solid #3f6fff;overflow:hidden;z-index:32767;";this._titleDiv=document.createElement("div");this._titleDiv.style.cssText="position:relative;margin:1px;height:20px;padding:3px 10px;background-color:#5f5f8f;color:#ffffff;overflow:hidden;cursor:move;";Core.Web.DOM.addEventListener(this._titleDiv,"mousedown",Core.method(this,this._titleMouseDown),false);Core.Web.Event.Selection.disable(this._titleDiv);this._div.appendChild(this._titleDiv);var b=document.createElement("div");b.style.cssText="position:absolute;font-weight:bold;";b.appendChild(document.createTextNode("Debug Console"));this._titleDiv.appendChild(b);this._controlsDiv=document.createElement("div");this._controlsDiv.style.cssText="position:absolute;right:0;background-color:#5f5f8f;";this._titleDiv.appendChild(this._controlsDiv);this._addControl("C",this._clearListener);this._addControl("^",this._maximizeListener);this._addControl("X",this._closeListener);this._contentDiv=document.createElement("div");this._contentDiv.style.cssText="font-family:monospace;font-size:9px;position:absolute;top:28px;left:1px;width:278px;height:265px;padding:3px 10px;background-color:#1f1f2f;overflow:auto;color:#3fff6f;";this._div.appendChild(this._contentDiv);document.body.appendChild(this._div);this._titleMouseUpRef=Core.method(this,this._titleMouseUp);this._titleMouseMoveRef=Core.method(this,this._titleMouseMove);this._rendered=true},_titleMouseDown:function(a){this._drag={originX:a.clientX,originY:a.clientY,initialX:this._div.offsetLeft,initialY:this._div.offsetTop};Core.Web.DOM.preventEventDefault(a);Core.Web.DOM.addEventListener(document.body,"mouseup",this._titleMouseUpRef,false);Core.Web.DOM.addEventListener(document.body,"mousemove",this._titleMouseMoveRef,false)},_titleMouseMove:function(a){if(!this._drag){return}this._div.style.right=this._div.style.bottom="";this._div.style.top=(a.clientY-this._drag.originY+this._drag.initialY)+"px";this._div.style.left=(a.clientX-this._drag.originX+this._drag.initialX)+"px"},_titleMouseUp:function(a){this._drag=null;Core.Web.DOM.removeEventListener(document.body,"mouseup",this._titleMouseUpRef,false);Core.Web.DOM.removeEventListener(document.body,"mousemove",this._titleMouseMoveRef,false)},setVisible:function(a){if(!this._rendered){this._render()}this._div.style.display=a?"block":"none"}};Echo.Arc={};Echo.Arc.Client=Core.extend(Echo.FreeClient,{arcSync:null,verifyInput:function(b,a){if(!this.arcSync.client.verifyInput(this.arcSync.component,a)){return false}return Echo.FreeClient.prototype.verifyInput.call(this,b,a)}});Echo.Arc.ComponentSync=Core.extend(Echo.Render.ComponentSync,{arcApplication:null,arcClient:null,baseComponent:null,_defaultDomainElement:null,$abstract:{createComponent:function(){}},$virtual:{getDomainElement:function(){if(!this._defaultDomainElement){this._defaultDomainElement=document.createElement("div")}return this._defaultDomainElement},renderAdd:function(c,a){var b=this.getDomainElement();a.appendChild(b)},renderDisplay:function(){if(this.arcApplication){Echo.Render.renderComponentDisplay(this.baseComponent)}else{this.arcApplication=new Echo.Application();this.arcApplication.setStyleSheet(this.client.application.getStyleSheet());this.baseComponent=this.createComponent();if(!this.baseComponent){throw new Error("Invalid base component: null")}this.arcApplication.rootComponent.add(this.baseComponent);this.arcClient=new Echo.Arc.Client(this.arcApplication,this.getDomainElement());this.arcClient.arcSync=this;this.arcClient.parent=this.client;this.arcClient.init()}},renderDispose:function(a){if(this.arcClient){this.arcClient.dispose();this.arcClient=null}if(this.arcApplication){this.arcApplication=null;this.baseComponent=null}this._defaultDomainElement=null},renderUpdate:function(c){var a=this.getDomainElement();var b=a.parentNode;Echo.Render.renderComponentDispose(c,c.parent);b.removeChild(a);this.renderAdd(c,b)}}});Echo.Arc.ChildContainer=Core.extend(Echo.Component,{$load:function(){Echo.ComponentFactory.registerType("ArcChildContainer",this)},componentType:"ArcChildContainer"});Echo.Arc.ChildContainerPeer=Core.extend(Echo.Render.ComponentSync,{$load:function(){Echo.Render.registerPeer("ArcChildContainer",this)},renderAdd:function(c,a){this._div=document.createElement("div");var b=this.component.get("component");if(b){if(!b.parent||!b.parent.peer||!b.parent.peer.client){throw new Error("Invalid component: not part of registered hierarchy.")}Echo.Render.renderComponentAdd(null,b,this._div)}a.appendChild(this._div)},renderDisplay:function(){var a=this.component.get("component");if(a){Echo.Render.renderComponentDisplay(a)}},renderDispose:function(b){var a=this.component.get("component");if(a){Echo.Render.renderComponentDispose(null,a)}this._div=null},renderUpdate:function(a){}});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,processKeyPress:function(f){if(!this.client){return}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);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)}Core.Web.Event.add(this.element,Core.Web.Env.QUIRK_IE_KEY_DOWN_EVENT_REPEAT?"keydown":"keypress",Core.method(this,this.processKeyPress),false)},renderDispose:function(a){Core.Web.Event.removeAll(this.element);this.element=null;this.containerElement=null;this._childIdToElementMap=null;this.spacingPrototype=null},_renderRemoveChild:function(c,b){var a=this._childIdToElementMap[b.renderId];if(!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);Core.Web.Event.add(this.div,"keypress",Core.method(this,this._processKeyPress),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)},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}},_processKeyPress:function(a){if(!this.client||!this.client.verifyInput(this.component)){return true}if(a.keyCode==13){this.doAction();return false}else{return true}},_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.BROWSER_INTERNET_EXPLORER){b=Math.round((f.scrollWidth-f.offsetWidth)*e/100);f.scrollLeft=b}}}else{f.scrollLeft=a}this._pendingScrollX=null}if(this._pendingScrollY){var g=Echo.Sync.Extent.toPixels(this._pendingScrollY);if(Echo.Sync.Extent.isPercent(this._pendingScrollY)||g<0){e=g<0?100:parseInt(this._pendingScrollY,10);b=Math.round((f.scrollHeight-f.offsetHeight)*e/100);if(b>0){f.scrollTop=b;if(Core.Web.Env.BROWSER_INTERNET_EXPLORER){b=Math.round((f.scrollHeight-f.offsetHeight)*e/100);f.scrollTop=b}}}else{f.scrollTop=g}this._pendingScrollY=null}break}}}},renderDispose:function(a){this._childIdToElementMap=null;this._div=null},_renderFloatingPaneZIndices:function(){for(var b=0;b<this._floatingPaneStack.length;++b){var a=this._childIdToElementMap[this._floatingPaneStack[b].renderId];a.style.zIndex=2+b}this._zIndexRenderRequired=false},_renderRemoveChild:function(c,b){if(b.floatingPane){Core.Arrays.remove(this._floatingPaneStack,b)}var a=this._childIdToElementMap[b.renderId];if(!a){return}a.parentNode.removeChild(a);delete this._childIdToElementMap[b.renderId]},renderUpdate:function(g){var c,d=false;if(g.hasUpdatedProperties()||g.hasUpdatedLayoutDataChildren()){d=true}else{var a=g.getRemovedChildren();if(a){for(c=0;c<a.length;++c){this._renderRemoveChild(g,a[c])}}var e=g.getAddedChildren();g.renderContext.displayRequired=[];if(e){for(c=0;c<e.length;++c){if(!e[c].floatingPane){g.renderContext.displayRequired=null}this._renderAddChild(g,e[c],this.component.indexOf(e[c]));if(g.renderContext.displayRequired){g.renderContext.displayRequired.push(e[c])}}if(this._zIndexRenderRequired){this._renderFloatingPaneZIndices()}}}if(d){this._floatingPaneStack=[];var b=this._div;var f=b.parentNode;Echo.Render.renderComponentDispose(g,g.parent);f.removeChild(b);this.renderAdd(g,f)}return d},_storeFloatingPaneZIndices:function(){for(var a=0;a<this._floatingPaneStack.length;++a){this._floatingPaneStack[a].set("zIndex",a)}}});Echo.Sync.Grid=Core.extend(Echo.Render.ComponentSync,{$static:{_createPrototypeTable:function(){var a=document.createElement("table");a.style.outlineStyle="none";a.tabIndex="-1";a.style.borderCollapse="collapse";var b=document.createElement("colgroup");a.appendChild(b);a.appendChild(document.createElement("tbody"));return a},Processor:Core.extend({$static:{Cell:Core.extend({xSpan:null,ySpan:null,index:null,component:null,$construct:function(c,b,d,a){this.component=c;this.index=b;this.xSpan=d;this.ySpan=a}})},cellArrays:null,grid:null,gridXSize:null,gridYSize:null,xExtents:null,yExtents:null,horizontalOrientation:null,$construct:function(b){this.grid=b;this.cellArrays=[];this.horizontalOrientation=b.render("orientation")!=Echo.Grid.ORIENTATION_VERTICAL;var a=this.createCells();if(a==null){this.gridXSize=0;this.gridYSize=0;return}this.renderCellMatrix(a);this.calculateExtents();this.reduceY();this.reduceX()},addExtents:function(e,c,d){var f=Echo.Sync.Extent.isPercent(e),g=Echo.Sync.Extent.isPercent(c);if(f||g){if(f&&g){return(parseFloat(e)+parseFloat(c))+"%"}else{return f?e:c}}else{return Echo.Sync.Extent.toPixels(e)+Echo.Sync.Extent.toPixels(c)}},calculateExtents:function(){var c,b=this.horizontalOrientation?"columnWidth":"rowHeight",a=this.horizontalOrientation?"rowHeight":"columnWidth";this.xExtents=[];for(c=0;c<this.gridXSize;++c){this.xExtents.push(this.grid.renderIndex(b,c))}this.yExtents=[];for(c=0;c<this.gridYSize;++c){this.yExtents.push(this.grid.renderIndex(a,c))}},createCells:function(){var b=this.grid.getComponentCount();if(b===0){return null}var c=[];for(var d=0;d<b;++d){var g=this.grid.getComponent(d);var f=g.render("layoutData");if(f){var e=this.horizontalOrientation?f.columnSpan:f.rowSpan;var a=this.horizontalOrientation?f.rowSpan:f.columnSpan;c.push(new Echo.Sync.Grid.Processor.Cell(g,d,e?e:1,a?a:1))}else{c.push(new Echo.Sync.Grid.Processor.Cell(g,d,1,1))}}return c},_getCellArray:function(a){while(a>=this.cellArrays.length){this.cellArrays.push([])}return this.cellArrays[a]},getColumnCount:function(){return this.horizontalOrientation?this.gridXSize:this.gridYSize},getCell:function(a,b){if(this.horizontalOrientation){return this.cellArrays[b][a]}else{return this.cellArrays[a][b]}},getRowCount:function(){return this.horizontalOrientation?this.gridYSize:this.gridXSize},reduceX:function(){var c=[],b=1,g,e=this.cellArrays[0].length;while(b<e){g=0;var f=true;while(g<this.cellArrays.length){if(this.cellArrays[g][b]!=this.cellArrays[g][b-1]){f=false;break}++g}if(f){c[b]=true}++b}if(c.length===0){return}for(var a=this.gridXSize-1;a>=1;--a){if(!c[a]){continue}for(g=0;g<this.gridYSize;++g){if(g===0||this.cellArrays[g][a-1]!=this.cellArrays[g-1][a-1]){if(this.cellArrays[g][a-1]!=null){--this.cellArrays[g][a-1].xSpan}}this.cellArrays[g].splice(a,1)}var d=this.xExtents.splice(a,1)[0];if(d){this.xExtents[a-1]=this.addExtents(this.xExtents[a-1],d,this.horizontalOrientation?true:false)}--this.gridXSize}},reduceY:function(){var h=[],e=1,g,j=this.cellArrays.length,i,c=this.cellArrays[0];while(e<j){i=c;c=this.cellArrays[e];g=0;var f=true;while(g<c.length){if(c[g]!=i[g]){f=false;break}++g}if(f){h[e]=true}++e}if(h.length===0){return}for(var d=this.gridYSize-1;d>=0;--d){if(!h[d]){continue}var b=this.cellArrays[d-1];for(g=0;g<this.gridXSize;++g){if(g===0||b[g]!=b[g-1]){if(b[g]!=null){--b[g].ySpan}}}this.cellArrays.splice(d,1);var a=this.yExtents.splice(d,1)[0];if(a){this.yExtents[d-1]=this.addExtents(this.yExtents[d-1],a,this.horizontalOrientation?false:true)}--this.gridYSize}},renderCellMatrix:function(i){this.gridXSize=parseInt(this.grid.render("size",2),10);var g=0,f=0,b,e,h=this._getCellArray(f);for(var c=0;c<i.length;++c){if(i[c].xSpan==Echo.Grid.SPAN_FILL||i[c].xSpan>this.gridXSize-g){i[c].xSpan=this.gridXSize-g}if(i[c].xSpan<1){i[c].xSpan=1}if(i[c].ySpan<1){i[c].ySpan=1}if(i[c].xSpan!=1||i[c].ySpan!=1){for(b=1;b<i[c].xSpan;++b){if(h[g+b]!=null){i[c].xSpan=b;break}}for(e=0;e<i[c].ySpan;++e){var d=this._getCellArray(f+e);for(b=0;b<i[c].xSpan;++b){d[g+b]=i[c]}}}h[g]=i[c];if(c<i.length-1){var a=false;while(!a){if(g<this.gridXSize-1){++g}else{g=0;++f;h=this._getCellArray(f)}a=h[g]==null}}}this.gridYSize=this.cellArrays.length}})},$load:function(){this._prototypeTable=this._createPrototypeTable();Echo.Render.registerPeer("Grid",this)},_columnCount:null,_rowCount:null,_processKeyPress:function(f){if(!this.client){return}var a,c,d,b;switch(f.keyCode){case 37:case 39:a=this.component.getRenderLayoutDirection().isLeftToRight()?f.keyCode==37:f.keyCode==39;c=this.client.application.getFocusedComponent();if(c&&c.peer&&c.peer.getFocusFlags){d=c.peer.getFocusFlags();if((a&&d&Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_LEFT)||(!a&&d&Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_RIGHT)){b=this.client.application.focusManager.findInParent(this.component,a);if(b){this.client.application.setFocusedComponent(b);Core.Web.DOM.preventEventDefault(f);return false}}}break;case 38:case 40:a=f.keyCode==38;c=this.client.application.getFocusedComponent();if(c&&c.peer&&c.peer.getFocusFlags){d=c.peer.getFocusFlags();if((a&&d&Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_UP)||(!a&&d&Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_DOWN)){b=this.client.application.focusManager.findInParent(this.component,a,this._columnCount);if(b){this.client.application.setFocusedComponent(b);Core.Web.DOM.preventEventDefault(f);return false}}}break}return true},renderAdd:function(o,j){var g=new Echo.Sync.Grid.Processor(this.component),m=Echo.Sync.Insets.toCssValue(this.component.render("insets",0)),f,l=this.component.render("border",""),u=this.component.render("width"),r=this.component.render("height"),n,y;f=Echo.Sync.Insets.toPixels(m);this._columnCount=g.getColumnCount();this._rowCount=g.getRowCount();this._table=Echo.Sync.Grid._prototypeTable.cloneNode(true);this._table.id=this.component.renderId;Echo.Sync.renderComponentDefaults(this.component,this._table);Echo.Sync.Border.render(l,this._table);this._table.style.padding=m;if(u&&Core.Web.Env.QUIRK_IE_TABLE_PERCENT_WIDTH_SCROLLBAR_ERROR&&Echo.Sync.Extent.isPercent(u)){this._renderPercentWidthByMeasure=parseInt(u,10);u=null}if(u){if(Echo.Sync.Extent.isPercent(u)){this._table.style.width=u}else{this._table.style.width=Echo.Sync.Extent.toCssValue(u,true)}}if(r){if(Echo.Sync.Extent.isPercent(r)){this._table.style.height=r}else{this._table.style.height=Echo.Sync.Extent.toCssValue(r,false)}}var t=this._table.firstChild;for(y=0;y<this._columnCount;++y){var k=document.createElement("col");u=g.xExtents[y];if(u!=null){if(Echo.Sync.Extent.isPercent(u)){k.style.width=u.toString()}else{var x=Echo.Sync.Extent.toPixels(u,true);if(Core.Web.Env.QUIRK_TABLE_CELL_WIDTH_EXCLUDES_PADDING){x-=f.left+f.right;if(x<0){x=0}}k.style.width=x+"px"}}t.appendChild(k)}var b=t.nextSibling;var q=parseInt(this.component.render("size",2),10);var c;var e={};var a,s;if(g.horizontalOrientation){a="colSpan";s="rowSpan"}else{a="rowSpan";s="colSpan"}var w=document.createElement("td");Echo.Sync.Border.render(l,w);w.style.padding=m;for(var p=0;p<this._rowCount;++p){c=document.createElement("tr");r=g.yExtents[p];if(r){c.style.height=Echo.Sync.Extent.toCssValue(r,false)}b.appendChild(c);for(y=0;y<this._columnCount;++y){var d=g.getCell(y,p);if(d==null){n=document.createElement("td");c.appendChild(n);continue}if(e[d.component.renderId]){continue}e[d.component.renderId]=true;n=w.cloneNode(false);if(d.xSpan>1){n.setAttribute(a,d.xSpan)}if(d.ySpan>1){n.setAttribute(s,d.ySpan)}var v=d.component.render("layoutData");if(v){var i=g.xExtents[y];if(Core.Web.Env.QUIRK_TABLE_CELL_WIDTH_EXCLUDES_PADDING&&i&&!Echo.Sync.Extent.isPercent(i)){var h=Echo.Sync.Insets.toPixels(v.insets);if(f.left+f.right<h.left+h.right){n.style.width=(Echo.Sync.Extent.toPixels(i)-(h.left+h.right))+"px"}}Echo.Sync.Insets.render(v.insets,n,"padding");Echo.Sync.Alignment.render(v.alignment,n,true,this.component);Echo.Sync.FillImage.render(v.backgroundImage,n);Echo.Sync.Color.render(v.background,n,"backgroundColor")}Echo.Render.renderComponentAdd(o,d.component,n);c.appendChild(n)}}Core.Web.Event.add(this._table,Core.Web.Env.QUIRK_IE_KEY_DOWN_EVENT_REPEAT?"keydown":"keypress",Core.method(this,this._processKeyPress),false);j.appendChild(this._table)},renderDisplay:function(){if(this._renderPercentWidthByMeasure){this._table.style.width="";var c=this._table.parentNode;var b=c.offsetWidth;if(c.style.paddingLeft){b-=parseInt(c.style.paddingLeft,10)}if(c.style.paddingRight){b-=parseInt(c.style.paddingRight,10)}var a=((b*this._renderPercentWidthByMeasure)/100)-Core.Web.Measure.SCROLL_WIDTH;if(a>0){this._table.style.width=a+"px"}}},renderDispose:function(a){Core.Web.Event.removeAll(this._table);this._table=null;this._renderPercentWidthByMeasure=null},renderUpdate:function(c){var a=this._table;var b=a.parentNode;Echo.Render.renderComponentDispose(c,c.parent);b.removeChild(a);this.renderAdd(c,b);return true}});Echo.Sync.Label=Core.extend(Echo.Render.ComponentSync,{$static:{_defaultIconTextMargin:5},$load:function(){Echo.Render.registerPeer("Label",this)},_node:null,_formatWhitespace:function(e,c){e=e.replace(/\t/g," \u00a0 \u00a0");e=e.replace(/ {2}/g," \u00a0");var b=e.split("\n");for(var d=0;d<b.length;d++){var a=b[d];if(d>0){c.appendChild(document.createElement("br"))}if(a.length>0){c.appendChild(document.createTextNode(a))}}},renderAdd:function(g,l){this._containerElement=l;var k=this.component.render("icon"),m=this.component.render("text"),i=this.component.render("foreground"),b=this.component.render("background"),a=this.component.render("toolTipText"),h;if(m!=null){var n=this.component.render("lineWrap",true);var f=this.component.render("formatWhitespace",false)&&(m.indexOf(" ")!=-1||m.indexOf("\n")!=-1||m.indexOf("\t")!=-1);if(k){var e=this.component.render("iconTextMargin",Echo.Sync.Label._defaultIconTextMargin);var c=Echo.Sync.TriCellTable.getOrientation(this.component,"textPosition");var j=new Echo.Sync.TriCellTable(c,Echo.Sync.Extent.toPixels(e));h=document.createElement("img");Echo.Sync.ImageReference.renderImg(k,h);if(f){this._formatWhitespace(m,j.tdElements[0])}else{j.tdElements[0].appendChild(document.createTextNode(m))}if(!n){j.tdElements[0].style.whiteSpace="nowrap"}j.tdElements[1].appendChild(h);this._node=j.tableElement;this._node.id=this.component.renderId;Echo.Sync.renderComponentDefaults(this.component,this._node)}else{var d=this.component.render("font");if(!this.client.designMode&&!a&&!d&&n&&!i&&!b&&!f&&!this.component.getLayoutDirection()){this._node=document.createTextNode(m)}else{this._node=document.createElement("span");this._node.id=this.component.renderId;if(f){this._formatWhitespace(m,this._node)}else{this._node.appendChild(document.createTextNode(m))}if(!n){this._node.style.whiteSpace="nowrap"}Echo.Sync.renderComponentDefaults(this.component,this._node)}}}else{if(k){h=document.createElement("img");Echo.Sync.ImageReference.renderImg(k,h);this._node=document.createElement("span");this._node.id=this.component.renderId;this._node.appendChild(h);Echo.Sync.Color.render(this.component.render("background"),this._node,"backgroundColor")}else{if(this.client.designMode){this._node=document.createElement("span");this._node.id=this.component.renderId}else{this._node=null}}}if(a){this._node.title=a}if(this._node){l.appendChild(this._node)}},renderDispose:function(a){this._containerElement=null;this._node=null},renderUpdate:function(a){if(this._node){this._node.parentNode.removeChild(this._node)}this.renderAdd(a,this._containerElement);return false}});Echo.Sync.ListComponent=Core.extend(Echo.Render.ComponentSync,{$static:{DEFAULT_DIV_BORDER:"1px solid #7f7f7f",DEFAULT_SELECTED_BACKGROUND:"#0a246a",DEFAULT_SELECTED_FOREGROUND:"#ffffff"},$abstract:{listBox:null},_hasRenderedSelectedItems:false,_multipleSelect:false,_selectedIdPriority:false,_alternateRender:false,_element:null,_div:null,_focused:false,_getSelection:function(){var d=this._selectedIdPriority?null:this.component.get("selection");if(d==null){var b=this.component.get("selectedId");if(b){var a=this.component.get("items");for(var c=0;c<a.length;++c){if(a[c].id==b){d=c;break}}}if(d==null){d=this.listBox?[]:0}}return d},_processBlur:function(a){this._focused=false},_processClick:function(d){if(!this.client||!this.client.verifyInput(this.component)){Core.Web.DOM.preventEventDefault(d);this._renderSelection();return true}var f=this._div.firstChild;var b=0;while(f){if(f==d.target){break}f=f.nextSibling;++b}if(f==null){return}if(this._multipleSelect&&d.ctrlKey){var c=this._getSelection();if(c==null){c=[]}else{if(typeof(c)=="number"){c=[c]}}var a=Core.Arrays.indexOf(c,b);if(a==-1){c.push(b)}else{c.splice(a,1)}}else{c=b}this._setSelection(c);this.component.doAction();this._renderSelection()},_processChange:function(c){if(!this.client||!this.client.verifyInput(this.component)){Core.Web.DOM.preventEventDefault(c);this._renderSelection();return false}var b;if(this._multipleSelect){b=[];for(var a=0;a<this._element.options.length;++a){if(this._element.options[a].selected){b.push(a)}}}else{if(this._element.selectedIndex!=-1){b=this._element.selectedIndex}}this._setSelection(b);this.component.doAction()},_processFocus:function(a){this._focused=true;if(!this.client||!this.client.verifyInput(this.component)){return true}this.client.application.setFocusedComponent(this.component)},_processSelectStart:function(a){Core.Web.DOM.preventEventDefault(a)},renderAdd:function(b,a){this._multipleSelect=this.component.get("selectionMode")==Echo.ListBox.MULTIPLE_SELECTION;if(this.listBox&&Core.Web.Env.QUIRK_IE_SELECT_LIST_DOM_UPDATE){this._alternateRender=true}this._enabled=this.component.isRenderEnabled();if(this._alternateRender){this._renderMainAsDiv(b,a)}else{this._renderMainAsSelect(b,a)}},renderDisplay:function(){this._renderSelection()},renderDispose:function(a){Core.Web.Event.removeAll(this._element);this._element=null;if(this._div){Core.Web.Event.removeAll(this._div);this._div=null}},renderFocus:function(){if(this._focused){return}this._focused=true;Core.Web.DOM.focusElement(this._element)},_renderMainAsDiv:function(e,j){this._element=document.createElement("table");this._element.id=this.component.renderId;var a=document.createElement("tbody");this._element.appendChild(a);var g=document.createElement("tr");a.appendChild(g);var c=document.createElement("td");g.appendChild(c);this._div=document.createElement("div");c.appendChild(this._div);this._div.style.cssText="cursor:default;overflow:auto;";this._div.style.height=Echo.Sync.Extent.toCssValue(this.component.render("height","6em"),false,false);var b=this.component.render("width");if(!Echo.Sync.Extent.isPercent(b)){this._div.style.width=Echo.Sync.Extent.toCssValue(b,true,false)}if(this._enabled){Echo.Sync.renderComponentDefaults(this.component,this._element)}else{Echo.Sync.LayoutDirection.render(this.component.getLayoutDirection(),this._element);Echo.Sync.Color.render(Echo.Sync.getEffectProperty(this.component,"foreground","disabledForeground",true),this._div,"color");Echo.Sync.Color.render(Echo.Sync.getEffectProperty(this.component,"background","disabledBackground",true),this._div,"backgroundColor");Echo.Sync.Font.render(Echo.Sync.getEffectProperty(this.component,"font","disabledFont",true),this._div)}Echo.Sync.Border.render(Echo.Sync.getEffectProperty(this.component,"border","disabledBorder",!this._enabled,Echo.Sync.ListComponent.DEFAULT_DIV_BORDER,null),this._div);Echo.Sync.Insets.render(this.component.render("insets"),this._div,"padding");var h=this.component.get("items");if(h){for(var f=0;f<h.length;++f){var d=document.createElement("div");if(h[f].text){d.appendChild(document.createTextNode(h[f].text))}else{d.appendChild(document.createTextNode(h[f].toString()))}if(h[f].foreground){Echo.Sync.Color.render(h[f].foreground,d,"color")}if(h[f].background){Echo.Sync.Color.render(h[f].background,d,"backgroundColor")}if(h[f].font){Echo.Sync.Font.render(h[f].font,d)}this._div.appendChild(d)}}if(this._enabled){Core.Web.Event.add(this._element,"blur",Core.method(this,this._processBlur),false);Core.Web.Event.add(this._element,"focus",Core.method(this,this._processFocus),false);Core.Web.Event.add(this._div,"click",Core.method(this,this._processClick),false);Core.Web.Event.add(this._div,"selectstart",Core.method(this,this._processSelectStart),false)}j.appendChild(this._element)},_renderMainAsSelect:function(f,b){this._div=document.createElement("div");this._element=document.createElement("select");this._element.id=this.component.renderId;this._element.size=this.listBox?6:1;if(!this._enabled){this._element.disabled=true}if(this._multipleSelect){this._element.multiple="multiple"}this._element.style.height=Echo.Sync.Extent.toCssValue(this.component.render("height"),false,false);var e=this.component.render("width");if(e){if(Echo.Sync.Extent.isPercent(e)){if(!Core.Web.Env.QUIRK_IE_SELECT_PERCENT_WIDTH){this._div.style.width=e;this._element.style.width="100%"}}else{this._element.style.width=Echo.Sync.Extent.toCssValue(e,true,false)}}if(this._enabled){Echo.Sync.renderComponentDefaults(this.component,this._element)}else{Echo.Sync.LayoutDirection.render(this.component.getLayoutDirection(),this._element);Echo.Sync.Color.render(Echo.Sync.getEffectProperty(this.component,"foreground","disabledForeground",true),this._element,"color");Echo.Sync.Color.render(Echo.Sync.getEffectProperty(this.component,"background","disabledBackground",true),this._element,"backgroundColor");Echo.Sync.Font.render(Echo.Sync.getEffectProperty(this.component,"font","disabledFont",true),this._element)}Echo.Sync.Border.render(Echo.Sync.getEffectProperty(this.component,"border","disabledBorder",!this._enabled),this._element);Echo.Sync.Insets.render(this.component.render("insets"),this._element,"padding");var c=this.component.get("items");if(c){for(var d=0;d<c.length;++d){var a=document.createElement("option");if(c[d].text==null){a.appendChild(document.createTextNode(c[d].toString()))}else{a.appendChild(document.createTextNode(c[d].text))}if(c[d].foreground){Echo.Sync.Color.render(c[d].foreground,a,"color")}if(c[d].background){Echo.Sync.Color.render(c[d].background,a,"backgroundColor")}if(c[d].font){Echo.Sync.Font.render(c[d].font,a)}this._element.appendChild(a)}}if(this._enabled){Core.Web.Event.add(this._element,"change",Core.method(this,this._processChange),false);Core.Web.Event.add(this._element,"blur",Core.method(this,this._processBlur),false);Core.Web.Event.add(this._element,"focus",Core.method(this,this._processFocus),false)}this._div.appendChild(this._element);b.appendChild(this._div)},_renderSelection:function(){var c=this._getSelection(),b;if(this._alternateRender){if(this._hasRenderedSelectedItems){var a=this.component.get("items");for(b=0;b<a.length;++b){Echo.Sync.Color.renderClear(a[b].foreground,this._div.childNodes[b],"color");Echo.Sync.Color.renderClear(a[b].background,this._div.childNodes[b],"backgroundColor")}}if(c instanceof Array){for(b=0;b<c.length;++b){if(c[b]>=0&&c[b]<this._div.childNodes.length){Echo.Sync.Color.render(Echo.Sync.ListComponent.DEFAULT_SELECTED_FOREGROUND,this._div.childNodes[c[b]],"color");Echo.Sync.Color.render(Echo.Sync.ListComponent.DEFAULT_SELECTED_BACKGROUND,this._div.childNodes[c[b]],"backgroundColor")}}}else{if(c>=0&&c<this._div.childNodes.length){Echo.Sync.Color.render(Echo.Sync.ListComponent.DEFAULT_SELECTED_FOREGROUND,this._div.childNodes[c],"color");Echo.Sync.Color.render(Echo.Sync.ListComponent.DEFAULT_SELECTED_BACKGROUND,this._div.childNodes[c],"backgroundColor")}}}else{if(this._hasRenderedSelectedItems){this._element.selectedIndex=-1}if(c instanceof Array){for(b=0;b<c.length;++b){if(c[b]>=0&&c[b]<this._element.options.length){this._element.options[c[b]].selected=true}}}else{if(c>=0&&c<this._element.options.length){this._element.options[c].selected=true}}}this._hasRenderedSelectedItems=true},renderUpdate:function(c){if(c.getUpdatedProperty("selectedId")&&!c.getUpdatedProperty("selection")){this._selectedIdPriority=true}var a=this._element;var b=a.parentNode;this.renderDispose(c);b.removeChild(a);this.renderAdd(c,b);return false},_setSelection:function(e){this._selectedIdPriority=false;var c=null;if(e instanceof Array&&e.length==1){e=e[0]}var b=this.component.get("items");if(e instanceof Array){c=[];for(var d=0;d<e.length;++d){var a=e[d];if(a<b.length){if(b[a].id!=null){c.push(b[a].id)}}}}else{if(e<b.length){if(b[e].id!=null){c=b[e].id}}}this.component.set("selection",e);this.component.set("selectedId",c)}});Echo.Sync.ListBox=Core.extend(Echo.Sync.ListComponent,{listBox:true,$load:function(){Echo.Render.registerPeer("ListBox",this)}});Echo.Sync.SelectField=Core.extend(Echo.Sync.ListComponent,{listBox:false,$load:function(){Echo.Render.registerPeer("SelectField",this)}});Echo.Sync.SplitPane=Core.extend(Echo.Render.ComponentSync,{$static:{ChildPane:Core.extend({minimumSize:0,maximumSize:null,component:null,layoutData:null,scrollLeft:0,scrollTop:0,scrollRequired:false,_permanentSizes:false,_peer:null,$construct:function(b,a){this._peer=b;this.component=a;this.layoutData=a.render("layoutData")},loadDisplayData:function(){if(this._permanentSizes){return}var a;this._permanentSizes=true;if(this.layoutData){if(this.layoutData.minimumSize){if(Echo.Sync.Extent.isPercent(this.layoutData.minimumSize)){a=this._peer._getSize();this.minimumSize=Math.round((this._peer._orientationVertical?a.height:a.width)*parseInt(this.layoutData.minimumSize,10)/100);this._permanentSizes=false}else{this.minimumSize=Math.round(Echo.Sync.Extent.toPixels(this.layoutData.minimumSize,!this._peer._orientationVertical))}}if(this.layoutData.maximumSize){if(Echo.Sync.Extent.isPercent(this.layoutData.maximumSize)){a=this._peer._getSize();this.maximumSize=Math.round((this._peer._orientationVertical?a.height:a.width)*parseInt(this.layoutData.maximumSize,10)/100);this._permanentSizes=false}else{this.maximumSize=Math.round(Echo.Sync.Extent.toPixels(this.layoutData.maximumSize,!this._peer._orientationVertical))}}}},loadScrollPositions:function(a){a.scrollLeft=this.scrollLeft;a.scrollTop=this.scrollTop},storeScrollPositions:function(a){this.scrollLeft=a.scrollLeft;this.scrollTop=a.scrollTop}})},$load:function(){Echo.Render.registerPeer("SplitPane",this)},_childPanes:null,_paneDivs:null,_separatorDiv:null,_autoPositioned:false,_overlay:null,_redisplayRequired:false,_requested:null,_rendered:null,_processSeparatorMouseMoveRef:null,_processSeparatorMouseUpRef:null,_initialAutoSizeComplete:false,_size:null,$construct:function(){this._childPanes=[];this._paneDivs=[];this._processSeparatorMouseMoveRef=Core.method(this,this._processSeparatorMouseMove);this._processSeparatorMouseUpRef=Core.method(this,this._processSeparatorMouseUp)},_getBoundedSeparatorPosition:function(a){if(this._childPanes[1]){var b=this._orientationVertical?this._getSize().height:this._getSize().width;if(a>b-this._childPanes[1].minimumSize-this._separatorSize){a=b-this._childPanes[1].minimumSize-this._separatorSize}else{if(this._childPanes[1].maximumSize!=null&&a<b-this._childPanes[1].maximumSize-this._separatorSize){a=b-this._childPanes[1].maximumSize-this._separatorSize}}}if(this._childPanes[0]){if(a<this._childPanes[0].minimumSize){a=this._childPanes[0].minimumSize}else{if(this._childPanes[0].maximumSize!=null&&a>this._childPanes[0].maximumSize){a=this._childPanes[0].maximumSize}}}return a},_getInsetsSizeAdjustment:function(a,d){if(!d||d.insets==null){return 0}var c=Echo.Sync.Insets.toPixels(d.insets);var b;if(this._orientationVertical){b=c.top+c.bottom}else{b=c.left+c.right}if(a!=null&&b>a){b=a}return b},getPreferredSize:function(h){if(this.component.children.length===0){return null}var e,b,g;h=h||(Echo.Render.ComponentSync.SIZE_WIDTH|Echo.Render.ComponentSync.SIZE_HEIGHT);var f;if(this.component.children[0].peer.getPreferredSize){f=this.component.children[0].peer.getPreferredSize(h)}else{if(!this.component.children[0].pane&&(h&Echo.Render.ComponentSync.SIZE_HEIGHT)&&this._paneDivs[0].firstChild){e=new Core.Web.Measure.Bounds(this._paneDivs[0].firstChild);f={height:e.height===0?null:e.height};if(f.height){g=this.component.children[0].render("layoutData");if(g&&g.insets){b=Echo.Sync.Insets.toPixels(g.insets);f.height+=b.top+b.bottom}}}else{f={}}}var d;if(this.component.children.length==1){d={width:0,height:0}}else{if(this.component.children[1].peer.getPreferredSize){d=this.component.children[1].peer.getPreferredSize(h)}else{if(!this.component.children[1].pane&&(h&Echo.Render.ComponentSync.SIZE_HEIGHT)&&this._paneDivs[1].firstChild){e=new Core.Web.Measure.Bounds(this._paneDivs[1].firstChild);d={height:e.height===0?null:e.height};if(d.height){g=this.component.children[1].render("layoutData");if(g&&g.insets){b=Echo.Sync.Insets.toPixels(g.insets);d.height+=b.top+b.bottom}}}else{d={}}}}var a=null;if((h&Echo.Render.ComponentSync.SIZE_HEIGHT)&&f.height!=null&&d.height!=null){if(this._orientationVertical){a=f.height+d.height+this._separatorSize}else{a=f.height>d.height?f.height:d.height}}var c=null;if((h&Echo.Render.ComponentSync.SIZE_WIDTH)&&f.width!=null&&d.width!=null){if(this._orientationVertical){c=f.width>d.width?f.width:d.width}else{c=f.width+d.width+this._separatorSize}}return{height:a,width:c}},_getSize:function(){if(!this._size){this._size=new Core.Web.Measure.Bounds(this._splitPaneDiv)}return this._size},_hasRelocatedChildren:function(f){var c=this._childPanes[0]?this._childPanes[0].component:null;var b=this._childPanes[1]?this._childPanes[1].component:null;var a=this.component.getComponentCount();var e=a>0?this.component.getComponent(0):null;var d=a>1?this.component.getComponent(1):null;return(c!=null&&c==d)||(b!=null&&b==e)},_loadRenderData:function(){var a=this.component.render("orientation",Echo.SplitPane.ORIENTATION_HORIZONTAL_LEADING_TRAILING);switch(a){case Echo.SplitPane.ORIENTATION_HORIZONTAL_LEADING_TRAILING:this._orientationTopLeft=this.component.getRenderLayoutDirection().isLeftToRight();this._orientationVertical=false;break;case Echo.SplitPane.ORIENTATION_HORIZONTAL_TRAILING_LEADING:this._orientationTopLeft=!this.component.getRenderLayoutDirection().isLeftToRight();this._orientationVertical=false;break;case Echo.SplitPane.ORIENTATION_HORIZONTAL_LEFT_RIGHT:this._orientationTopLeft=true;this._orientationVertical=false;break;case Echo.SplitPane.ORIENTATION_HORIZONTAL_RIGHT_LEFT:this._orientationTopLeft=false;this._orientationVertical=false;break;case Echo.SplitPane.ORIENTATION_VERTICAL_TOP_BOTTOM:this._orientationTopLeft=true;this._orientationVertical=true;break;case Echo.SplitPane.ORIENTATION_VERTICAL_BOTTOM_TOP:this._orientationTopLeft=false;this._orientationVertical=true;break;default:throw new Error("Invalid orientation: "+a)}this._resizable=this.component.render("resizable");this._autoPositioned=this.component.render("autoPositioned");this._requested=this.component.render("separatorPosition");var b=this._resizable?Echo.SplitPane.DEFAULT_SEPARATOR_SIZE_RESIZABLE:Echo.SplitPane.DEFAULT_SEPARATOR_SIZE_FIXED;var c=this.component.render(this._orientationVertical?"separatorHeight":"separatorWidth",b);this._separatorSize=Echo.Sync.Extent.toPixels(c,this._orientationVertical);if(this._separatorSize==null){this._separatorSize=b}this._separatorVisible=this._resizable||(this.component.render("separatorVisible",true)&&this._separatorSize>0);if(!this._separatorVisible){this._separatorSize=0}if(this._separatorSize>0){this._separatorColor=this.component.render("separatorColor",Echo.SplitPane.DEFAULT_SEPARATOR_COLOR);this._separatorRolloverColor=this.component.render("separatorRolloverColor")||Echo.Sync.Color.adjust(this._separatorColor,32,32,32);this._separatorImage=this.component.render(this._orientationVertical?"separatorVerticalImage":"separatorHorizontalImage");this._separatorRolloverImage=this.component.render(this._orientationVertical?"separatorVerticalRolloverImage":"separatorHorizontalRolloverImage")}},_overlayAdd:function(){if(this._overlay){return}this._overlay=document.createElement("div");this._overlay.style.cssText="position:absolute;z-index:32767;width:100%;height:100%;";Echo.Sync.FillImage.render(this.client.getResourceUrl("Echo","resource/Transparent.gif"),this._overlay);document.body.appendChild(this._overlay)},_overlayRemove:function(){if(!this._overlay){return}document.body.removeChild(this._overlay);this._overlay=null},_processKeyPress:function(f){if(!this.client){return}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);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);return false}}}}break}return true},_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);Core.Web.Event.add(this._splitPaneDiv,Core.Web.Env.QUIRK_IE_KEY_DOWN_EVENT_REPEAT?"keydown":"keypress",Core.method(this,this._processKeyPress),false);if(this._resizable){Core.Web.Event.add(this._separatorDiv,"mousedown",Core.method(this,this._processSeparatorMouseDown),false);Core.Web.Event.add(this._separatorDiv,"mouseover",Core.method(this,this._processSeparatorRolloverEnter),false);Core.Web.Event.add(this._separatorDiv,"mouseout",Core.method(this,this._processSeparatorRolloverExit),false)}},_renderAddChild:function(f,e,b){var d=this.component.indexOf(e);var a=document.createElement("div");this._paneDivs[b]=a;a.style.cssText="position: absolute; overflow: auto; z-index: 1;";var c=e.render("layoutData");if(c){Echo.Sync.Alignment.render(c.alignment,a,false,this.component);Echo.Sync.Color.render(c.background,a,"backgroundColor");Echo.Sync.FillImage.render(c.backgroundImage,a);if(!e.pane){Echo.Sync.Insets.render(c.insets,a,"padding");switch(c.overflow){case Echo.SplitPane.OVERFLOW_HIDDEN:a.style.overflow="hidden";break;case Echo.SplitPane.OVERFLOW_SCROLL:a.style.overflow="scroll";break}}}if(e.pane){a.style.overflow="hidden"}if(this._orientationVertical){a.style.left=0;a.style.right=0;if((this._orientationTopLeft&&b===0)||(!this._orientationTopLeft&&b==1)){a.style.top=0}else{a.style.bottom=0}}else{a.style.top="0";a.style.bottom="0";if((this._orientationTopLeft&&b===0)||(!this._orientationTopLeft&&b==1)){a.style.left=0}else{a.style.right=0}}Echo.Render.renderComponentAdd(f,e,a);this._splitPaneDiv.appendChild(a);if(this._childPanes[b]&&this._childPanes[b].component==e){this._childPanes[b].scrollRequired=true}else{this._childPanes[b]=new Echo.Sync.SplitPane.ChildPane(this,e)}},renderDisplay:function(){Core.Web.VirtualPosition.redraw(this._splitPaneDiv);Core.Web.VirtualPosition.redraw(this._paneDivs[0]);Core.Web.VirtualPosition.redraw(this._paneDivs[1]);this._size=null;if(this._childPanes[0]){this._childPanes[0].loadDisplayData()}if(this._childPanes[1]){this._childPanes[1].loadDisplayData()}var a=this._requested;if(a==null&&this._autoPositioned&&this._paneDivs[0]){if(this.component.children[0].peer.getPreferredSize){var c=this.component.children[0].peer.getPreferredSize(this._orientationVertical?Echo.Render.ComponentSync.SIZE_HEIGHT:Echo.Render.ComponentSync.SIZE_WIDTH);a=c?(this._orientationVertical?c.height:c.width):null}if(a==null&&this._orientationVertical&&!this.component.children[0].pane){this._paneDivs[0].style.height="";var d=new Core.Web.Measure.Bounds(this._paneDivs[0]);a=d.height}if(a!=null&&!this._initialAutoSizeComplete){this._initialAutoSizeComplete=true;var f=Core.method(this,function(){if(this.component){Echo.Render.renderComponentDisplay(this.component)}});Core.Web.Image.monitor(this._paneDivs[0],f)}}if(a==null){a=Echo.SplitPane.DEFAULT_SEPARATOR_POSITION}if(Echo.Sync.Extent.isPercent(a)){var b=this._orientationVertical?this._getSize().height:this._getSize().width;a=Math.round((parseInt(a,10)/100)*b)}else{a=Math.round(Echo.Sync.Extent.toPixels(a,!this._orientationVertical))}this._rendered=this._getBoundedSeparatorPosition(a);this._redraw(this._rendered);Core.Web.VirtualPosition.redraw(this._paneDivs[0]);Core.Web.VirtualPosition.redraw(this._paneDivs[1]);for(var e=0;e<this._childPanes.length;++e){if(this._childPanes[e]&&this._childPanes[e].scrollRequired&&this._paneDivs[e]){this._childPanes[e].loadScrollPositions(this._paneDivs[e]);this._childPanes[e].scrollRequired=false}}},renderDispose:function(b){this._overlayRemove();for(var a=0;a<2;++a){if(this._paneDivs[a]){if(this._childPanes[a]){this._childPanes[a].storeScrollPositions(this._paneDivs[a])}this._paneDivs[a]=null}}if(this._separatorDiv){Core.Web.Event.removeAll(this._separatorDiv);this._separatorDiv=null}Core.Web.Event.removeAll(this._splitPaneDiv);this._splitPaneDiv=null},_renderRemoveChild:function(c,b){var a;if(this._childPanes[0]&&this._childPanes[0].component==b){a=0}else{if(this._childPanes[1]&&this._childPanes[1].component==b){a=1}else{return}}this._childPanes[a]=null;Core.Web.DOM.removeNode(this._paneDivs[a]);this._paneDivs[a]=null},renderUpdate:function(g){var d=false,c;if(this._hasRelocatedChildren()){d=true}else{if(g.hasUpdatedProperties()||g.hasUpdatedLayoutDataChildren()){if(g.isUpdatedPropertySetIn({separatorPosition:true})){this._requested=this.component.render("separatorPosition")}else{d=true}}}if(!d&&(g.hasAddedChildren()||g.hasRemovedChildren())){var a=g.getRemovedChildren();if(a){for(c=0;c<a.length;++c){this._renderRemoveChild(g,a[c])}}var e=g.getAddedChildren();if(e){for(c=0;c<e.length;++c){this._renderAddChild(g,e[c],this.component.indexOf(e[c]))}}}if(d){var b=this._splitPaneDiv;var f=b.parentNode;Echo.Render.renderComponentDispose(g,g.parent);f.removeChild(b);this.renderAdd(g,f)}return d}});Echo.Sync.TextComponent=Core.extend(Echo.Render.ComponentSync,{$abstract:true,$virtual:{getSupportedPartialProperties:function(){return["text","editable","selectionStart","selectionEnd"]},processBlur:function(a){this._focused=false;this._storeSelection();return this._storeValue()},sanitizeInput:function(){var a=this.component.render("maximumLength",-1);if(a>=0){if(this.input.value&&this.input.value.length>a){this.input.value=this.input.value.substring(0,a)}}}},input:null,container:null,_focused:false,_lastProcessedValue:null,percentWidth:false,_selectionStart:0,_selectionEnd:0,_renderStyle:function(){if(this.component.isRenderEnabled()){Echo.Sync.renderComponentDefaults(this.component,this.input);Echo.Sync.Border.render(this.component.render("border"),this.input);Echo.Sync.FillImage.render(this.component.render("backgroundImage"),this.input)}else{Echo.Sync.LayoutDirection.render(this.component.getLayoutDirection(),this.input);Echo.Sync.Color.render(Echo.Sync.getEffectProperty(this.component,"foreground","disabledForeground",true),this.input,"color");Echo.Sync.Color.render(Echo.Sync.getEffectProperty(this.component,"background","disabledBackground",true),this.input,"backgroundColor");Echo.Sync.Border.render(Echo.Sync.getEffectProperty(this.component,"border","disabledBorder",true),this.input);Echo.Sync.Font.render(Echo.Sync.getEffectProperty(this.component,"font","disabledFont",true),this.input);Echo.Sync.FillImage.render(Echo.Sync.getEffectProperty(this.component,"backgroundImage","disabledBackgroundImage",true),this.input)}Echo.Sync.Alignment.render(this.component.render("alignment"),this.input,false,null);Echo.Sync.Insets.render(this.component.render("insets"),this.input,"padding");var b=this.component.render("width");this.percentWidth=Echo.Sync.Extent.isPercent(b);if(b){if(this.percentWidth){this.input.style.width="5px"}else{this.input.style.width=Echo.Sync.Extent.toCssValue(b,true)}}var a=this.component.render("height");if(a){this.input.style.height=Echo.Sync.Extent.toCssValue(a,false)}var c=this.component.render("toolTipText");if(c){this.input.title=c}},_addEventHandlers:function(){Core.Web.Event.add(this.input,"click",Core.method(this,this._processClick),false);Core.Web.Event.add(this.input,"focus",Core.method(this,this._processFocus),false);Core.Web.Event.add(this.input,"blur",Core.method(this,this.processBlur),false);Core.Web.Event.add(this.input,"keyup",Core.method(this,this._processKeyUp),false)},_adjustPercentWidth:function(a,d,b){var c=(100-Math.ceil(100*d/b))*a/100;return c>0?c:0},_processClick:function(a){if(!this.client||!this.component.isActive()){return true}this.client.application.setFocusedComponent(this.component);this._storeSelection()},_processFocus:function(a){this._focused=true;if(!this.client||!this.component.isActive()){return true}this.client.application.setFocusedComponent(this.component)},clientKeyDown:function(a){this._storeValue(a);if(this.client&&this.component.isActive()){if(!this.component.doKeyDown(a.keyCode)){Core.Web.DOM.preventEventDefault(a.domEvent)}}return true},clientKeyPress:function(a){this._storeValue(a);if(this.client&&this.component.isActive()){if(!this.component.doKeyPress(a.keyCode,a.charCode)){Core.Web.DOM.preventEventDefault(a.domEvent)}}return true},_processKeyUp:function(a){this._storeSelection();return this._storeValue(a)},_processRestrictionsClear:function(){if(!this.client){return}if(!this.client.verifyInput(this.component)||this.input.readOnly){this.input.value=this.component.get("text");return}this.component.set("text",this.input.value,true)},renderAddToParent:function(a){if(Core.Web.Env.BROWSER_INTERNET_EXPLORER&&this.percentWidth){this.container=document.createElement("div");this.container.appendChild(this.input);a.appendChild(this.container)}else{a.appendChild(this.input)}},renderDisplay:function(){var c=this.component.render("width");if(c&&Echo.Sync.Extent.isPercent(c)&&this.input.parentNode.offsetWidth){var a=this.component.render("border");var b=Echo.Sync.Border.getPixelSize(this.component.render("border","2px solid #000000"),"left")+Echo.Sync.Border.getPixelSize(this.component.render("border","2px solid #000000"),"right")+1;if(Core.Web.Env.BROWSER_INTERNET_EXPLORER){if(this.container){this.container.style.width=this._adjustPercentWidth(100,Core.Web.Measure.SCROLL_WIDTH,this.input.parentNode.offsetWidth)+"%"}else{b+=Core.Web.Measure.SCROLL_WIDTH}}this.input.style.width=this._adjustPercentWidth(parseInt(c,10),b,this.input.parentNode.offsetWidth)+"%"}},renderDispose:function(a){Core.Web.Event.removeAll(this.input);this._focused=false;this.input=null;this.container=null},renderFocus:function(){if(this._focused){return}this._focused=true;Core.Web.DOM.focusElement(this.input)},renderUpdate:function(g){var c=!Core.Arrays.containsAll(this.getSupportedPartialProperties(),g.getUpdatedPropertyNames(),true);if(c){var a=this.container?this.container:this.input;var f=a.parentNode;this.renderDispose(g);f.removeChild(a);this.renderAdd(g,f)}else{if(g.hasUpdatedProperties()){var e=g.getUpdatedProperty("text");if(e){var d=e.newValue==null?"":e.newValue;if(d!=this._lastProcessedValue){this.input.value=d;this._lastProcessedValue=d}}var b=g.getUpdatedProperty("editable");if(b!=null){this.input.readOnly=!b.newValue}}}return false},_storeSelection:function(){if(!this.component){return}var a,b;if(Core.Web.Env.BROWSER_INTERNET_EXPLORER){a=document.selection.createRange();if(a.parentElement()!=this.input){return}b=a.duplicate();if(this.input.nodeName.toLowerCase()=="textarea"){b.moveToElementText(this.input)}else{b.expand("textedit")}b.setEndPoint("EndToEnd",a);this._selectionStart=b.text.length-a.text.length;this._selectionEnd=this._selectionStart+a.text.length}else{this._selectionStart=this.input.selectionStart;this._selectionEnd=this.input.selectionEnd}this.component.set("selectionStart",this._selectionStart,true);this.component.set("selectionEnd",this._selectionEnd,true)},_storeValue:function(a){if(!this.client||!this.component.isActive()){if(a){Core.Web.DOM.preventEventDefault(a)}return true}this.sanitizeInput();if(!this.client.verifyInput(this.component)){this.client.registerRestrictionListener(this.component,Core.method(this,this._processRestrictionsClear));return true}this.component.set("text",this.input.value,true);this._lastProcessedValue=this.input.value;if(a&&a.keyCode==13&&a.type=="keydown"){this.component.doAction()}return true}});Echo.Sync.TextArea=Core.extend(Echo.Sync.TextComponent,{$load:function(){Echo.Render.registerPeer("TextArea",this)},renderAdd:function(b,a){this.input=document.createElement("textarea");this.input.id=this.component.renderId;if(!this.component.render("editable",true)){this.input.readOnly=true}this._renderStyle(this.input);this.input.style.overflow="auto";this._addEventHandlers(this.input);if(this.component.get("text")){this.input.value=this.component.get("text")}this.renderAddToParent(a)}});Echo.Sync.TextField=Core.extend(Echo.Sync.TextComponent,{$load:function(){Echo.Render.registerPeer("TextField",this)},$virtual:{_type:"text"},getFocusFlags:function(){return Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_UP|Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_DOWN},renderAdd:function(c,a){this.input=document.createElement("input");this.input.id=this.component.renderId;if(!this.component.render("editable",true)){this.input.readOnly=true}this.input.type=this._type;var b=this.component.render("maximumLength",-1);if(b>=0){this.input.maxLength=b}this._renderStyle(this.input);this._addEventHandlers(this.input);if(this.component.get("text")){this.input.value=this.component.get("text")}this.renderAddToParent(a)},sanitizeInput:function(){}});Echo.Sync.PasswordField=Core.extend(Echo.Sync.TextField,{$load:function(){Echo.Render.registerPeer("PasswordField",this)},_type:"password"});Echo.Sync.WindowPane=Core.extend(Echo.Render.ComponentSync,{$static:{CURSORS:["n-resize","ne-resize","e-resize","se-resize","s-resize","sw-resize","w-resize","nw-resize"],PARTIAL_PROPERTIES:{background:true,backgroundImage:true,border:true,closable:true,closeIcon:true,closeIconInsets:true,controlsInsets:true,font:true,foreground:true,height:true,icon:true,iconInsets:true,insets:true,maximizeEnabled:true,maximizeIcon:true,maximumHeight:true,maximumWidth:true,minimizeEnabled:true,minimizeIcon:true,minimumHeight:true,minimumWidth:true,movable:true,positionX:true,positionY:true,resizable:true,title:true,titleBackground:true,titleBackgroundImage:true,titleFont:true,titleForeground:true,titleHeight:true,titleInsets:true,width:true},NON_RENDERED_PROPERTIES:{zIndex:true},PARTIAL_PROPERTIES_POSITION_SIZE:{positionX:true,positionY:true,width:true,height:true}},$load:function(){Echo.Render.registerPeer("WindowPane",this)},_initialAutoSizeComplete:false,_requested:null,_rendered:null,_dragInit:null,_dragOrigin:null,_resizeIncrement:null,_containerSize:null,_processBorderMouseMoveRef:null,_processBorderMouseUpRef:null,_processTitleBarMouseMoveRef:null,_processTitleBarMouseUpRef:null,_controlIcons:null,_overlay:null,$construct:function(){this._processBorderMouseMoveRef=Core.method(this,this._processBorderMouseMove);this._processBorderMouseUpRef=Core.method(this,this._processBorderMouseUp);this._processTitleBarMouseMoveRef=Core.method(this,this._processTitleBarMouseMove);this._processTitleBarMouseUpRef=Core.method(this,this._processTitleBarMouseUp)},_loadPositionAndSize:function(){this._requested={x:this.component.render("positionX","50%"),y:this.component.render("positionY","50%"),contentWidth:this.component.render("contentWidth"),contentHeight:this.component.render("contentHeight")};this._requested.width=this.component.render("width",this._requested.contentWidth?null:Echo.WindowPane.DEFAULT_WIDTH);this._requested.height=this.component.render("height")},_loadContainerSize:function(){this._containerSize=this.component.parent.peer.getSize()},_overlayAdd:function(){if(this._overlay){return}this._overlay=document.createElement("div");this._overlay.style.cssText="position:absolute;z-index:32767;width:100%;height:100%;";Echo.Sync.FillImage.render(this.client.getResourceUrl("Echo","resource/Transparent.gif"),this._overlay);document.body.appendChild(this._overlay)},_overlayRemove:function(){if(!this._overlay){return}document.body.removeChild(this._overlay);this._overlay=null},_processBorderMouseDown:function(a){if(!this.client||!this.client.verifyInput(this.component)){return true}Core.Web.dragInProgress=true;Core.Web.DOM.preventEventDefault(a);this._overlayAdd();this._loadContainerSize();this._dragInit={x:this._rendered.x,y:this._rendered.y,width:this._rendered.width,height:this._rendered.height};this._dragOrigin={x:a.clientX,y:a.clientY};switch(a.target){case this._borderDivs[0]:this._resizeIncrement={x:0,y:-1};break;case this._borderDivs[1]:this._resizeIncrement={x:1,y:-1};break;case this._borderDivs[2]:this._resizeIncrement={x:1,y:0};break;case this._borderDivs[3]:this._resizeIncrement={x:1,y:1};break;case this._borderDivs[4]:this._resizeIncrement={x:0,y:1};break;case this._borderDivs[5]:this._resizeIncrement={x:-1,y:1};break;case this._borderDivs[6]:this._resizeIncrement={x:-1,y:0};break;case this._borderDivs[7]:this._resizeIncrement={x:-1,y:-1};break}Core.Web.Event.add(document.body,"mousemove",this._processBorderMouseMoveRef,true);Core.Web.Event.add(document.body,"mouseup",this._processBorderMouseUpRef,true)},_processBorderMouseMove:function(a){this._setBounds({x:this._resizeIncrement.x==-1?this._dragInit.x+a.clientX-this._dragOrigin.x:null,y:this._resizeIncrement.y==-1?this._dragInit.y+a.clientY-this._dragOrigin.y:null,width:this._dragInit.width+(this._resizeIncrement.x*(a.clientX-this._dragOrigin.x)),height:this._dragInit.height+(this._resizeIncrement.y*(a.clientY-this._dragOrigin.y))},true);Echo.Sync.FillImageBorder.renderContainerDisplay(this._div)},_processBorderMouseUp:function(a){Core.Web.DOM.preventEventDefault(a);Core.Web.dragInProgress=false;this._overlayRemove();this._removeBorderListeners();this.component.set("positionX",this._rendered.x);this.component.set("positionY",this._rendered.y);this.component.set("width",this._rendered.width);this.component.set("height",this._rendered.height);this._requested={x:this._rendered.x,y:this._rendered.y,width:this._rendered.width,height:this._rendered.height};Echo.Sync.FillImageBorder.renderContainerDisplay(this._div);Core.Web.VirtualPosition.redraw(this._contentDiv);Core.Web.VirtualPosition.redraw(this._maskDiv);Echo.Render.notifyResize(this.component)},_processControlClick:function(a){if(!this.client||!this.client.verifyInput(this.component)){return true}switch(a.registeredTarget._controlData.name){case"close":this.component.userClose();break;case"maximize":this.component.userMaximize();Echo.Render.processUpdates(this.client);break;case"minimize":this.component.userMinimize();break}},_processControlRolloverEnter:function(a){if(!this.client||!this.client.verifyInput(this.component)){return true}Echo.Sync.ImageReference.renderImg(a.registeredTarget._controlData.rolloverIcon,a.registeredTarget.firstChild)},_processControlRolloverExit:function(a){Echo.Sync.ImageReference.renderImg(a.registeredTarget._controlData.icon,a.registeredTarget.firstChild)},_processKeyDown:function(a){if(a.keyCode==27){this.component.userClose();Core.Web.DOM.preventEventDefault(a);return false}return true},_processKeyPress:function(a){if(a.keyCode==27){Core.Web.DOM.preventEventDefault(a);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]");Core.Web.Event.add(this._div,"keydown",Core.method(this,this._processKeyDown),false);Core.Web.Event.add(this._div,"keypress",Core.method(this,this._processKeyPress),false)}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.Sync.FadeRunnable=Core.extend(Core.Web.Scheduler.Runnable,{timeInterval:10,repeat:true,_runTime:null,_element:null,_fadeIn:null,_fullOpacity:null,_startTime:null,$construct:function(d,a,b,c){this._element=d;this._fullOpacity=b;this._fadeIn=a;this._runTime=c;this._startTime=new Date().getTime()},run:function(){var b=new Date().getTime();if(b<this._startTime+this._runTime){var a=((b-this._startTime)/this._runTime)*this._fullOpacity;this._element.style.opacity=this._fadeIn?a:this._fullOpacity-a}else{if(this._fadeIn){this._element.style.opacity=this._fullOpacity}else{if(this._element.parentNode){this._element.parentNode.removeChild(this._element)}}Core.Web.Scheduler.remove(this)}}});Extras.AccordionPane=Core.extend(Echo.Component,{$static:{DEFAULT_ANIMATION_TIME:350},$load:function(){Echo.ComponentFactory.registerType("Extras.AccordionPane",this)},componentType:"Extras.AccordionPane",pane:true});Extras.Sync.AccordionPane=Core.extend(Echo.Render.ComponentSync,{$static:{_defaultTabBackground:"#cfcfcf",_defaultTabBorder:"1px outset #cfcfcf",_defaultTabForeground:"#000000",_defaultTabInsets:"2px 5px",_defaultTabContentInsets:0},$load:function(){Echo.Render.registerPeer("Extras.AccordionPane",this)},_animationTime:0,_div:null,_activeTabId:null,_rotation:null,_animationEnabled:true,_tabs:null,_resetOverflowForAnimation:false,$construct:function(){this._tabs=[];this._resetOverflowForAnimation=Core.Web.Env.BROWSER_MOZILLA||Core.Web.Env.BROWSER_INTERNET_EXPLORER},renderAdd:function(f,a){this._animationTime=this.component.render("animationTime",Extras.AccordionPane.DEFAULT_ANIMATION_TIME);this._activeTabId=this.component.get("activeTab");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(this.client,f);this._div.appendChild(d._tabDiv);this._div.appendChild(d._containerDiv)}a.appendChild(this._div)},renderDisplay:function(){if(!this._rotation){this._redrawTabs(false)}for(var a=0;a<this._tabs.length;++a){this._tabs[a]._renderDisplay()}},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]=="activeTab"){this._selectTab(e.getUpdatedProperty("activeTab").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},renderDispose:function(b){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},_selectTab:function(a){if(a==this._activeTabId){return}this.component.set("activeTab",a);var b=this._activeTabId;this._activeTabId=a;if(b!=null&&this._animationEnabled){this._rotateTabs(b,a)}else{this._redrawTabs(true)}},_removeTab:function(b){var a=Core.Arrays.indexOf(this._tabs,b);this._tabs.splice(a,1);b._tabDiv.parentNode.removeChild(b._tabDiv);b._containerDiv.parentNode.removeChild(b._containerDiv);b._dispose()},_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.renderComponentDisplay(this.component)}},_rotateTabs:function(d,a){if(this._animationTime<1){this._redrawTabs(true);return}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()}},_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},_getTabBackground:function(){var a=this.component.render("tabBackground");return a?a:Extras.Sync.AccordionPane._defaultTabBackground},_getTabBorder:function(){var a=this.component.render("tabBorder");return a?a:Extras.Sync.AccordionPane._defaultTabBorder},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}},_getTabInsets:function(){var a=this.component.render("tabInsets");return a?a:Extras.Sync.AccordionPane._defaultTabInsets}});Extras.Sync.AccordionPane.Tab=Core.extend({_rendered:false,_tabDiv:null,_parent:null,_containerDiv:null,_childComponent:null,$construct:function(a,b){this._childComponent=a;this._parent=b},_dispose:function(){Core.Web.Event.removeAll(this._tabDiv);this._parent=null;this._childComponent=null;this._tabDiv=null;this._containerDiv=null},_highlight:function(g){var d=this._tabDiv,b,f,a;if(g){var c=this._parent.component.render("tabRolloverBackground");if(!c){c=Echo.Sync.Color.adjust(this._parent._getTabBackground(),20,20,20)}Echo.Sync.Color.render(c,d,"backgroundColor");var h=this._parent.component.render("tabRolloverBackgroundImage");if(h){d.style.backgroundImage="";d.style.backgroundPosition="";d.style.backgroundRepeat="";Echo.Sync.FillImage.render(h,d,null)}var e=this._parent.component.render("tabRolloverForeground");if(e){Echo.Sync.Color.render(e,d,"color")}b=this._parent.component.render("tabRolloverBorder");if(!b){b=this._parent._getTabBorder();if(Echo.Sync.Border.isMultisided(b)){f=Echo.Sync.Border.parse(b.top);a=Echo.Sync.Border.parse(b.bottom);b={top:Echo.Sync.Border.compose(f.size,f.style,Echo.Sync.Color.adjust(f.color,20,20,20)),bottom:Echo.Sync.Border.compose(a.size,a.style,Echo.Sync.Color.adjust(a.color,20,20,20))}}else{f=Echo.Sync.Border.parse(b);b=Echo.Sync.Border.compose(f.size,f.style,Echo.Sync.Color.adjust(f.color,20,20,20))}}}else{b=this._parent._getTabBorder();Echo.Sync.Color.render(this._parent._getTabBackground(),d,"backgroundColor");Echo.Sync.Color.render(this._parent.component.render("tabForeground",Extras.Sync.AccordionPane._defaultTabForeground),d,"color");d.style.backgroundImage="";d.style.backgroundPosition="";d.style.backgroundRepeat="";Echo.Sync.FillImage.render(this._parent.component.render("tabBackgroundImage"),d)}if(Echo.Sync.Border.isMultisided(b)){Echo.Sync.Border.render(b.top,d,"borderTop");Echo.Sync.Border.render(b.bottom,d,"borderBottom")}else{Echo.Sync.Border.render(b,d,"borderTop");Echo.Sync.Border.render(b,d,"borderBottom")}},_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)},_getContentInsets:function(){if(this._childComponent.pane){return 0}else{var a=this._parent.component.render("defaultContentInsets");return a?a:Extras.Sync.AccordionPane._defaultTabContentInsets}},_processClick:function(a){if(!this._parent||!this._parent.client||!this._parent.client.verifyInput(this._parent.component)){return}this._parent._selectTab(this._childComponent.renderId)},_processEnter:function(a){if(!this._parent||!this._parent.client||!this._parent.client.verifyInput(this._parent.component)){return}this._highlight(true)},_processExit:function(a){if(!this._parent||!this._parent.client||!this._parent.client.verifyInput(this._parent.component)){return}this._highlight(false)},_render:function(a,d){var c=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._getTabInsets(),this._tabDiv,"padding");if(c.icon){var b=document.createElement("img");Echo.Sync.ImageReference.renderImg(c.icon,b);b.style.paddingRight="3px";this._tabDiv.appendChild(b)}if(c.title){this._tabDiv.appendChild(document.createTextNode(c.title))}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(d,this._childComponent,this._contentDiv);this._containerDiv.appendChild(this._contentDiv);this._highlight(false);this._addEventListeners()},_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,$construct:function(a,b,c){this._parent=a;this._oldTab=b;this._newTab=c;this._oldTabIndex=Core.Arrays.indexOf(this._parent._tabs,this._oldTab);this._newTabIndex=Core.Arrays.indexOf(this._parent._tabs,this._newTab);this._directionDown=this._newTabIndex<this._oldTabIndex;this._rotatingTabCount=Math.abs(this._newTabIndex-this._oldTabIndex);this._regionHeight=this._newTab._tabDiv.parentNode.offsetHeight;if(this._directionDown){this._numberOfTabsAbove=this._newTabIndex+1;this._numberOfTabsBelow=this._parent._tabs.length-1-this._newTabIndex;this._startTopPosition=this._parent.getTabHeight(0,this._newTabIndex+1);this._endTopPosition=this._regionHeight-this._parent.getTabHeight(this._newTabIndex+1,this._parent._tabs.length);this._animationDistance=this._endTopPosition-this._startTopPosition}else{this._numberOfTabsAbove=this._newTabIndex;this._numberOfTabsBelow=this._parent._tabs.length-1-this._newTabIndex;this._startBottomPosition=this._parent.getTabHeight(this._newTabIndex+1,this._parent._tabs.length);this._endBottomPosition=this._regionHeight-this._parent.getTabHeight(0,this._newTabIndex+1);this._animationDistance=this._endBottomPosition-this._startBottomPosition}},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;var 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._startTopPosition+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._startTopPosition+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._startBottomPosition+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"}},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)}});Extras.ContextMenu=Core.extend(Echo.Component,{$static:{ACTIVATION_MODE_CLICK:1,ACTIVATION_MODE_CONTEXT_CLICK:2},$load:function(){Echo.ComponentFactory.registerType("Extras.ContextMenu",this)},componentType:"Extras.ContextMenu",modalSupport:true,doAction:function(a){var b=a.getItemPositionPath().join(".");this.fireEvent({type:"action",source:this,data:b,modelId:a.modelId})}});Extras.DropDownMenu=Core.extend(Echo.Component,{$load:function(){Echo.ComponentFactory.registerType("Extras.DropDownMenu",this)},componentType:"Extras.DropDownMenu",modalSupport:true,doAction:function(a){var b=a.getItemPositionPath().join(".");this.fireEvent({type:"action",source:this,data:b,modelId:a.modelId})}});Extras.MenuBarPane=Core.extend(Echo.Component,{$load:function(){Echo.ComponentFactory.registerType("Extras.MenuBarPane",this)},$static:{DEFAULT_INSETS:"3px 0px"},componentType:"Extras.MenuBarPane",modalSupport:true,doAction:function(a){var b=a.getItemPositionPath().join(".");this.fireEvent({type:"action",source:this,data:b,modelId:a.modelId})}});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},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(c,b,a){Extras.OptionModel.call(this,c,b,null);this.selected=a}});Extras.RadioOptionModel=Core.extend(Extras.ToggleOptionModel,{$construct:function(c,b,a){Extras.ToggleOptionModel.call(this,c,b,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:{DEFAULT_FOREGROUND:"#000000",DEFAULT_BACKGROUND:"#cfcfcf",DEFAULT_DISABLED_FOREGROUND:"#7f7f7f",DEFAULT_SELECTION_FOREGROUND:"#ffffff",DEFAULT_SELECTION_BACKGROUND:"#3f3f3f",DEFAULT_BORDER:"1px outset #cfcfcf",MAX_Z_INDEX:65535},menuModel:null,stateModel:null,element:null,active:false,_openMenuPath:null,_maskDeployed:false,_processMaskClickRef:null,_processKeyPressRef:null,_overlay:null,$construct:function(){this._processMaskClickRef=Core.method(this,this._processMaskClick);this._processKeyPressRef=Core.method(this,this.processKeyPress);this._openMenuPath=[]},$abstract:{getSubMenuPosition:function(c,b,a){},renderMain:function(a){}},$virtual:{activate:function(){if(this.active){return false}this.component.set("modal",true);this.active=true;this.addMask();Core.Web.DOM.focusElement(this.element);Core.Web.Event.add(this.element,Core.Web.Env.QUIRK_IE_KEY_DOWN_EVENT_REPEAT?"keydown":"keypress",this._processKeyPressRef,true);return true},activateItem:function(a){if(this.stateModel&&!this.stateModel.isEnabled(a.modelId)){return}if(a instanceof Extras.OptionModel){this.deactivate();this.processAction(a)}else{if(a instanceof Extras.MenuModel){this._openMenu(a)}}},processAction:function(a){this.component.doAction(a)},processKeyPress:function(a){if(a.keyCode==27){this.deactivate();return false}return true}},addMenu:function(a){this._openMenuPath.push(a)},addMask:function(){if(this.maskDeployed){return}this.maskDeployed=true;this._overlayAdd(new Core.Web.Measure.Bounds(this.element));Core.Web.Event.add(document.body,"click",this._processMaskClickRef,false);Core.Web.Event.add(document.body,"contextmenu",this._processMaskClickRef,false)},closeAll:function(){while(this._openMenuPath.length>0){var a=this._openMenuPath.pop();a.close()}},closeDescendants:function(a){while(a!=this._openMenuPath[this._openMenuPath.length-1]){var b=this._openMenuPath.pop();b.close()}},deactivate:function(){this.component.set("modal",false);if(!this.active){return}this.active=false;Core.Web.Event.remove(this.element,Core.Web.Env.QUIRK_IE_KEY_DOWN_EVENT_REPEAT?"keydown":"keypress",this._processKeyPressRef,true);this.closeAll();this.removeMask()},isOpen:function(b){for(var a=0;a<this._openMenuPath.length;++a){if(this._openMenuPath[a].menuModel==b){return true}}return false},_overlayAdd:function(e){this._overlayRemove();var b=e.top+e.height,d=e.left+e.width,a=new Core.Web.Measure.Bounds(this.client.domainElement);this._overlay={};if(e.top>0){this._overlay.top=document.createElement("div");this._overlay.top.style.cssText="position:absolute;z-index:32767;top:0;left:0;width:100%;height:"+e.top+"px;";this.client.domainElement.appendChild(this._overlay.top)}if(b<a.height){this._overlay.bottom=document.createElement("div");this._overlay.bottom.style.cssText="position:absolute;z-index:32767;bottom:0;left:0;width:100%;top:"+b+"px;";this.client.domainElement.appendChild(this._overlay.bottom)}if(e.left>0){this._overlay.left=document.createElement("div");this._overlay.left.style.cssText="position:absolute;z-index:32767;left:0;width:"+e.left+"px;top:"+e.top+"px;height:"+e.height+"px;";this.client.domainElement.appendChild(this._overlay.left)}if(d<a.width){this._overlay.right=document.createElement("div");this._overlay.right.style.cssText="position:absolute;z-index:32767;right:0;left:"+d+"px;top:"+e.top+"px;height:"+e.height+"px;";this.client.domainElement.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])}},_overlayRemove:function(){if(!this._overlay){return}for(var a in this._overlay){this.client.domainElement.removeChild(this._overlay[a])}this._overlay=null},_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,b.width,b.height);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.add(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()},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:{defaultIconTextMargin:5,defaultMenuInsets:"2px",defaultMenuItemInsets:"1px 12px"},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={}},add: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){document.body.appendChild(this.element)}else{this.element.style.opacity=0;var b=new Extras.Sync.FadeRunnable(this.element,true,1,c);Core.Web.Scheduler.add(b);document.body.appendChild(this.element)}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)},close:function(){Core.Web.Event.removeAll(this.element);document.body.removeChild(this.element);this.element=null;this.itemElements=null;this._activeItem=null},create:function(){var w,B,E,x,t,C;this.element=document.createElement("div");this.element.style.position="absolute";this.element.style.zIndex=Extras.Sync.Menu.MAX_Z_INDEX;var d=(Core.Web.Env.NOT_SUPPORTED_CSS_OPACITY?100:this.component.render("menuOpacity",100))/100;var l=document.createElement("div");l.style.cssText="position:relative;z-index:10;";this.element.appendChild(l);Echo.Sync.LayoutDirection.render(this.component.getLayoutDirection(),l);Echo.Sync.Insets.render(Extras.Sync.Menu.RenderedMenu.defaultMenuInsets,l,"padding");Echo.Sync.Border.render(this.component.render("menuBorder",Extras.Sync.Menu.DEFAULT_BORDER),l);var a;var g=this.component.render("menuForeground");if(g){a=g}else{a=this.component.render("foreground",Extras.Sync.Menu.DEFAULT_FOREGROUND)}Echo.Sync.Color.render(a,l,"color");var n=this.component.render("menuFont");if(!n){n=this.component.render("font")}if(n){Echo.Sync.Font.render(n,l)}var u;if(d<1){u=document.createElement("div");u.style.cssText="position:absolute;z-index:1;width:100%;height:100%;top:0;bottom:0;";u.style.opacity=d;this.element.appendChild(u)}else{u=this.element}var y;var p=this.component.render("menuBackground");if(p){y=p}else{y=this.component.render("background",Extras.Sync.Menu.DEFAULT_BACKGROUND)}Echo.Sync.Color.render(y,u,"backgroundColor");var b;var s=this.component.render("menuBackgroundImage");if(s){b=s}else{if(p==null){b=this.component.render("backgroundImage")}}if(b){Echo.Sync.FillImage.render(b,u,null)}var e=document.createElement("table");e.style.borderCollapse="collapse";l.appendChild(e);var j=document.createElement("tbody");e.appendChild(j);var o=this.menuModel.items;var k=false;for(w=0;w<o.length;++w){B=o[w];if(B.icon||B instanceof Extras.ToggleOptionModel){k=true;break}}var v,q;if(k){var z=Echo.Sync.Insets.toPixels(Extras.Sync.Menu.RenderedMenu.defaultMenuItemInsets);q="0px 0px 0px "+z.left+"px";v=z.top+"px "+z.right+"px "+z.bottom+"px "+z.left+"px"}else{v=Extras.Sync.Menu.RenderedMenu.defaultMenuItemInsets}for(w=0;w<o.length;++w){B=o[w];if(B instanceof Extras.OptionModel||B instanceof Extras.MenuModel){C=document.createElement("tr");this.itemElements[B.id]=C;C.style.cursor="pointer";j.appendChild(C);if(k){t=document.createElement("td");Echo.Sync.Insets.render(q,t,"padding");if(B instanceof Extras.ToggleOptionModel){var m;var r=this.stateModel&&this.stateModel.isSelected(B.modelId);if(B instanceof Extras.RadioOptionModel){m=r?"image/menu/RadioOn.gif":"image/menu/RadioOff.gif"}else{m=r?"image/menu/ToggleOn.gif":"image/menu/ToggleOff.gif"}E=document.createElement("img");E.src=this.client.getResourceUrl("Extras",m);t.appendChild(E)}else{if(B.icon){E=document.createElement("img");Echo.Sync.ImageReference.renderImg(B.icon,E);t.appendChild(E)}}C.appendChild(t)}x=document.createElement("td");Echo.Sync.Insets.render(v,x,"padding");var c=this.component.render("lineWrap");if(c!=null&&!c){x.style.whiteSpace="nowrap"}if(this.stateModel&&!this.stateModel.isEnabled(B.modelId)){Echo.Sync.Color.render(this.component.render("disabledForeground",Extras.Sync.Menu.DEFAULT_DISABLED_FOREGROUND),x,"color")}x.appendChild(document.createTextNode(B.text));C.appendChild(x);if(B instanceof Extras.MenuModel){var h=document.createElement("td");h.style.textAlign="right";E=document.createElement("img");var A=this.component.render("menuExpandIcon",this.client.getResourceUrl("Extras","image/menu/ArrowRight.gif"));E.setAttribute("src",A.url?A.url:A);E.setAttribute("alt","");h.appendChild(E);C.appendChild(h)}else{x.colSpan=2}}else{if(B instanceof Extras.SeparatorModel){if(w===0||w===o.length-1||o[w-1] instanceof Extras.SeparatorModel||o[w+1] instanceof Extras.SeparatorModel){continue}C=document.createElement("tr");j.appendChild(C);x=document.createElement("td");x.colSpan=k?3:2;x.style.padding="3px 0px";var D=document.createElement("div");D.style.cssText="border-top:1px solid #a7a7a7;height:0;font-size:1px;line-height:0";x.appendChild(D);C.appendChild(x)}}}var f=new Core.Web.Measure.Bounds(this.element);this.width=f.width;this.height=f.height},_getItemElement:function(a){if(a==null){return null}while(a.nodeName.toLowerCase()!="tr"){if(a==this.element){return null}a=a.parentNode}return a},_getItemModel:function(c){var b=null;c=this._getItemElement(c);if(c==null){return null}for(var a in this.itemElements){if(this.itemElements[a]==c){b=a;break}}if(b==null){return null}else{return this.menuModel.findItem(b)}},getSubMenuPosition:function(e,d,a){var f=this.itemElements[e.id];var c=new Core.Web.Measure.Bounds(f);var b=new Core.Web.Measure.Bounds(this.element);return{x:b.left+b.width,y:c.top}},_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.DEFAULT_SELECTION_BACKGROUND),a,"backgroundColor");Echo.Sync.Color.render(this.component.render("selectionForeground",Extras.Sync.Menu.DEFAULT_SELECTION_FOREGROUND),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(c,b,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)},_containerDiv:null,_contentDiv:null,_selectedItem:null,_createContent: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(c,b,a){var d=new Core.Web.Measure.Bounds(this.element);return{x:d.left,y:d.top+d.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)},renderDisplay:function(){Core.Web.VirtualPosition.redraw(this._containerDiv)},renderDispose:function(a){Core.Web.Event.removeAll(this.element);this._containerDiv=null;Extras.Sync.Menu.prototype.renderDispose.call(this,a)},renderMain:function(){var h=document.createElement("div");h.id=this.component.renderId;h.style.cssText="overflow:hidden;cursor:pointer;";Echo.Sync.LayoutDirection.render(this.component.getLayoutDirection(),h);Echo.Sync.Color.render(this.component.render("foreground",Extras.Sync.Menu.DEFAULT_FOREGROUND),h,"color");Echo.Sync.Color.render(this.component.render("background",Extras.Sync.Menu.DEFAULT_BACKGROUND),h,"backgroundColor");Echo.Sync.FillImage.render(this.component.render("backgroundImage"),h);Echo.Sync.Border.render(this.component.render("border",Extras.Sync.Menu.DEFAULT_BORDER),h);var g=document.createElement("div");g.style.cssText="position:relative;overflow:hidden;";h.appendChild(g);Echo.Sync.Extent.render(this.component.render("width"),h,"width",true,true);Echo.Sync.Extent.render(this.component.render("height"),g,"height",false,true);var b=this.component.render("expandIcon",this.client.getResourceUrl("Extras","image/menu/ArrowDown.gif"));this._contentDiv=document.createElement("div");this._contentDiv.style.cssText="position:absolute;white-space:nowrap;";Echo.Sync.Insets.render(this.component.render("insets","2px 5px"),this._contentDiv,"padding");g.appendChild(this._contentDiv);var f=document.createElement("span");f.style.position="absolute";f.style.top="2px";f.style.right="2px";var c=document.createElement("img");c.style.verticalAlign="middle";Echo.Sync.ImageReference.renderImg(b,c);f.appendChild(c);g.appendChild(f);Core.Web.Event.add(h,"click",Core.method(this,this._processClick),false);Core.Web.Event.Selection.disable(h);if(this.component.render("selectionEnabled")){var e=this.component.render("selection");if(e){this._selectedItem=this.menuModel.getItemModelFromPositions(e.split("."))}}else{this._selectedItem=null}if(this._selectedItem){this._contentDiv.appendChild(this._createContent(this._selectedItem))}else{var d=this.component.render("selectionText");this._contentDiv.appendChild(document.createTextNode(d?d:"\u00a0"))}if(!this.component.render("height")){var a=new Core.Web.Measure.Bounds(this._contentDiv);g.style.height=a.height+"px"}return h},_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._createContent(b))}});Extras.Sync.MenuBarPane=Core.extend(Extras.Sync.Menu,{$static:{_defaultItemInsets:"0px 12px"},$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.MenuBarPane.DEFAULT_INSETS));return{height:new Core.Web.Measure.Bounds(this.element).height+a.top+a.bottom}},getSubMenuPosition:function(f,e,b){var c=this.itemElements[f.id];if(!c){throw new Error("Invalid menu: "+f)}var a=new Core.Web.Measure.Bounds(this.element);var d=new Core.Web.Measure.Bounds(c);return{x:d.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.DEFAULT_BORDER);this._menuBarBorderHeight=Echo.Sync.Border.getPixelSize(c,"top")+Echo.Sync.Border.getPixelSize(c,"bottom");Echo.Sync.Border.render(c,b,"borderTop");Echo.Sync.Border.render(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._defaultItemInsets,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.DEFAULT_SELECTION_BACKGROUND),a,"backgroundColor");Echo.Sync.Color.render(this.component.render("selectionForeground",Extras.Sync.Menu.DEFAULT_SELECTION_FOREGROUND),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,_duration:null,_transition:null,_transitionClass:null,_runnable:null,oldChildDiv:null,childDiv:null,_initialContentLoaded:false,$construct:function(){},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;this._duration=null}},removeOldContent:function(){if(this.oldChildDiv){this.contentDiv.removeChild(this.oldChildDiv);this.oldChildDiv=null}},_hideContent:function(){if(this.childDiv){this.childDiv.style.visibility="hidden"}},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._hideContent();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:{},$construct:function(a){this.transitionPane=a}});Extras.Sync.TransitionPane.BlindTransition=Core.extend(Extras.Sync.TransitionPane.Transition,{runTime:700,_maskDiv:null,_stepCount:14,_swapStep:null,_reverse:false,complete:function(a){this._maskDiv.parentNode.removeChild(this._maskDiv)},init:function(){this._swapStep=Math.floor(this._stepCount)/2+1;this._reverse=this.transitionPane.type===Extras.TransitionPane.TYPE_BLIND_BLACK_OUT;this._maskDiv=document.createElement("div");this._maskDiv.style.cssText="position:absolute;width:100%;height:100%;z-index:32767;";this.transitionPane.contentDiv.appendChild(this._maskDiv)},step:function(b){var c=Math.ceil(b*this._stepCount);if(c===0){c=1}if(c===this._renderedStep){return}var a=this.transitionPane.client.getResourceUrl("Extras","image/transitionpane/blindblack/Frame"+c+".gif");this._maskDiv.style.backgroundImage="url("+a+")";if(c<this._swapStep){if(this.transitionPane.oldChildDiv){if(this._reverse){this.transitionPane.oldChildDiv.style.top=c+"px"}else{this.transitionPane.oldChildDiv.style.top=(0-c)+"px"}}}else{if(this._renderedStep<this._swapStep){this.transitionPane.showContent();this.transitionPane.removeOldContent()}if(this.transitionPane.childDiv){if(this._reverse){this.transitionPane.childDiv.style.top=(c-this._stepCount)+"px"}else{this.transitionPane.childDiv.style.top=(this._stepCount-c)+"px"}}}this._renderedStep=c}});Extras.Sync.TransitionPane.CameraPanTransition=Core.extend(Extras.Sync.TransitionPane.Transition,{_newChildOnScreen:false,_travel:null,complete:function(a){if(this.transitionPane.childDiv){this.transitionPane.childDiv.style.zIndex=0;this.transitionPane.childDiv.style.top="0px";this.transitionPane.childDiv.style.left="0px"}},init:function(){var a=new Core.Web.Measure.Bounds(this.transitionPane.contentDiv);this._travel=(this.transitionPane.type==Extras.TransitionPane.TYPE_CAMERA_PAN_DOWN||this.transitionPane.type==Extras.TransitionPane.TYPE_CAMERA_PAN_UP)?a.height:a.width;if(this.transitionPane.oldChildDiv){this.transitionPane.oldChildDiv.style.zIndex=1}},step:function(a){switch(this.transitionPane.type){case Extras.TransitionPane.TYPE_CAMERA_PAN_DOWN:if(this.transitionPane.childDiv){this.transitionPane.childDiv.style.top=((1-a)*this._travel)+"px"}if(this.transitionPane.oldChildDiv){this.transitionPane.oldChildDiv.style.top=(0-(a*this._travel))+"px"}break;case Extras.TransitionPane.TYPE_CAMERA_PAN_UP:if(this.transitionPane.childDiv){this.transitionPane.childDiv.style.top=(0-((1-a)*this._travel))+"px"}if(this.transitionPane.oldChildDiv){this.transitionPane.oldChildDiv.style.top=(a*this._travel)+"px"}break;case Extras.TransitionPane.TYPE_CAMERA_PAN_RIGHT:if(this.transitionPane.childDiv){this.transitionPane.childDiv.style.left=((1-a)*this._travel)+"px"}if(this.transitionPane.oldChildDiv){this.transitionPane.oldChildDiv.style.left=(0-(a*this._travel))+"px"}break;default:if(this.transitionPane.childDiv){this.transitionPane.childDiv.style.left=(0-((1-a)*this._travel))+"px"}if(this.transitionPane.oldChildDiv){this.transitionPane.oldChildDiv.style.left=(a*this._travel)+"px"}break}if(!this._newChildOnScreen&&this.transitionPane.childDiv){this.transitionPane.showContent();this.transitionPane.childDiv.style.zIndex=2;this._newChildOnScreen=true}}});Extras.Sync.TransitionPane.FadeOpacityTransition=Core.extend(Extras.Sync.TransitionPane.Transition,{runTime:1000,complete:function(a){if(this.transitionPane.childDiv){this.transitionPane.childDiv.style.zIndex=0;if(Core.Web.Env.PROPRIETARY_IE_OPACITY_FILTER_REQUIRED){this.transitionPane.childDiv.style.filter=""}else{this.transitionPane.childDiv.style.opacity=1}}},init:function(){if(this.transitionPane.childDiv){if(Core.Web.Env.PROPRIETARY_IE_OPACITY_FILTER_REQUIRED){this.transitionPane.childDiv.style.filter="alpha(opacity=0)"}else{this.transitionPane.childDiv.style.opacity=0}}this.transitionPane.showContent()},step:function(a){var b;if(this.transitionPane.childDiv){if(Core.Web.Env.PROPRIETARY_IE_OPACITY_FILTER_REQUIRED){b=Math.floor(a*100);this.transitionPane.childDiv.style.filter="alpha(opacity="+b+")"}else{this.transitionPane.childDiv.style.opacity=a}}else{if(this.transitionPane.oldChildDiv){if(Core.Web.Env.PROPRIETARY_IE_OPACITY_FILTER_REQUIRED){b=Math.floor((1-a)*100);this.transitionPane.oldChildDiv.style.filter="alpha(opacity="+b+")"}else{this.transitionPane.oldChildDiv.style.opacity=1-a}}}}});Extras.Sync.TransitionPane.FadeOpacityColorTransition=Core.extend(Extras.Sync.TransitionPane.Transition,{runTime:1000,_maskDiv:null,_swapped:false,complete:function(a){this._maskDiv.parentNode.removeChild(this._maskDiv)},init:function(){this._maskDiv=document.createElement("div");this._maskDiv.style.cssText="position:absolute;width:100%;height:100%;z-index:32767;";if(Core.Web.Env.PROPRIETARY_IE_OPACITY_FILTER_REQUIRED){this._maskDiv.style.filter="alpha(opacity=0)"}else{this._maskDiv.style.opacity=0}if(this.transitionPane.type===Extras.TransitionPane.TYPE_FADE_TO_WHITE){this._maskDiv.style.backgroundColor="#ffffff"}else{this._maskDiv.style.backgroundColor="#000000"}this.transitionPane.contentDiv.appendChild(this._maskDiv)},step:function(b){var a=1-Math.abs(b*2-1);if(b>0.5&&!this._swapped){this.transitionPane.showContent();this.transitionPane.removeOldContent();this._swapped=true}if(Core.Web.Env.PROPRIETARY_IE_OPACITY_FILTER_REQUIRED){var c=Math.floor(a*100);this._maskDiv.style.filter="alpha(opacity="+c+")"}else{this._maskDiv.style.opacity=a}}});Extras.TabPane=Core.extend(Echo.Component,{$static:{BORDER_TYPE_NONE:0,BORDER_TYPE_ADJACENT_TO_TABS:1,BORDER_TYPE_PARALLEL_TO_TABS:2,BORDER_TYPE_SURROUND:3,TAB_POSITION_TOP:0,TAB_POSITION_BOTTOM:1},$load:function(){Echo.ComponentFactory.registerType("Extras.TabPane",this)},componentType:"Extras.TabPane",pane:true,doTabClose:function(a){this.fireEvent({type:"tabClose",source:this,tab:a,data:a.renderId})},doTabSelect:function(a){this.fireEvent({type:"tabSelect",source:this,tab:a,data:a.renderId})}});Extras.Sync.TabPane=Core.extend(Echo.Render.ComponentSync,{$static:{_supportedPartialProperties:["activeTab","activeTabIndex"],_paneInsets:0,_defaultBorderType:Extras.TabPane.BORDER_TYPE_ADJACENT_TO_TABS,_defaultForeground:"#000000",_defaultInsets:2,_defaultTabActiveBorder:"1px solid #00004f",_defaultTabActiveHeightIncrease:2,_defaultTabAlignment:"top",_defaultTabCloseIconTextMargin:5,_defaultTabContentInsets:0,_defaultTabIconTextMargin:5,_defaultTabInactiveBorder:"1px solid #7f7f7f",_defaultTabInset:10,_defaultTabInsets:"3px 8px",_defaultTabPosition:Extras.TabPane.TAB_POSITION_TOP,_defaultTabSpacing:0,ScrollRunnable:Core.extend(Core.Web.Scheduler.Runnable,{repeat:true,timeInterval:20,reverse:false,distance:0,clickDistance:50,pixelsPerSecond:400,initialPosition:null,disposed:false,peer:null,lastInvokeTime:null,$construct:function(b,a){this.peer=b;this.reverse=a;this.initialPosition=b.scrollPosition;this.lastInvokeTime=new Date().getTime()},dispose:function(){if(!this.disposed){Core.Web.Scheduler.remove(this)}this.disposed=true},finish:function(){if(this.distance<this.clickDistance){this.distance=this.clickDistance;this.updatePosition()}this.dispose()},run:function(){var a=new Date().getTime();this.distance+=Math.ceil(this.pixelsPerSecond*(a-this.lastInvokeTime)/1000);this.lastInvokeTime=a;this.updatePosition()},updatePosition:function(){var a=this.initialPosition+((this.reverse?-1:1)*this.distance);if(!this.peer.setScrollPosition(a)){this.dispose()}}})},$load:function(){Echo.Render.registerPeer("Extras.TabPane",this)},_icons:null,_div:null,_contentContainerDiv:null,_headerContainer:null,_activeTabId:null,_previousControlDiv:null,_nextControlDiv:null,_tabs:null,_totalTabWidth:0,_configureHeaderSizeRequired:false,_scrollRunnable:null,scrollPosition:0,$construct:function(){this._tabs=[]},_addTab:function(c,b,a){if(a==null||a==this._tabs.length){this._tabs.push(b);b._render(c);this._headerTabContainerTr.appendChild(b._headerTd);this._contentContainerDiv.appendChild(b._contentDiv)}else{this._tabs.splice(a,0,b);b._render(c);this._headerTabContainerTr.insertBefore(b._headerTd,this._headerTabContainerTr.childNodes[a]);this._contentContainerDiv.insertBefore(b._contentDiv,this._contentContainerDiv.childNodes[a])}},_configureHeaderSize:function(){var a=new Core.Web.Measure.Bounds(this._headerTabContainerDiv).height;if(a===0){return}this._configureHeaderSizeRequired=false;var c=Echo.Sync.Border.getPixelSize(this._tabActiveBorder);if(this._tabPosition==Extras.TabPane.TAB_POSITION_BOTTOM){this._contentContainerDiv.style.top="0";this._contentContainerDiv.style.bottom=(a-c)+"px"}else{this._contentContainerDiv.style.top=(a-c)+"px";this._contentContainerDiv.style.bottom="0"}this._contentContainerDiv.style.left="0";this._contentContainerDiv.style.right="0";Core.Web.VirtualPosition.redraw(this._contentContainerDiv);Core.Web.VirtualPosition.redraw(this._headerContainerDiv);for(var b=0;b<this._tabs.length;++b){this._tabs[b]._renderDisplay()}},_getActiveTabId:function(){var a=this.component.get("activeTab");if(!a){var b=this.component.get("activeTabIndex");if(b!=null&&b<this.component.children.length){a=this.component.children[b].renderId}}return a},_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},_processScrollStart:function(a){if(!this.client||!this.client.verifyInput(this.component)){return}this._scrollRunnable=new Extras.Sync.TabPane.ScrollRunnable(this,a.registeredTarget===this._previousControlDiv);Core.Web.Scheduler.add(this._scrollRunnable)},_processScrollStop:function(a){if(!this._scrollRunnable){return}this._scrollRunnable.finish();this._scrollRunnable=null},_removeTab:function(b){var a=Core.Arrays.indexOf(this._tabs,b);if(a==-1){return}if(b._childComponent.renderId==this._activeTabId){this._activeTabId=null}this._tabs.splice(a,1);Core.Web.DOM.removeNode(b._headerTd);Core.Web.DOM.removeNode(b._contentDiv);b._dispose()},renderAdd:function(d,j){this._icons={};this._activeTabId=this._getActiveTabId();this._borderType=this.component.render("borderType",Extras.Sync.TabPane._defaultBorderType);this._insets=this.component.render("insets",Extras.Sync.TabPane._defaultInsets);this._tabActiveBorder=this.component.render("tabActiveBorder",Extras.Sync.TabPane._defaultTabActiveBorder);this._tabActiveHeightIncreasePx=Echo.Sync.Extent.toPixels(this.component.render("tabActiveHeightIncrease",Extras.Sync.TabPane._defaultTabActiveHeightIncrease));this._tabInactiveBorder=this.component.render("tabInactiveBorder",Extras.Sync.TabPane._defaultTabInactiveBorder);this._tabInsetPx=Echo.Sync.Extent.toPixels(this.component.render("tabInset",Extras.Sync.TabPane._defaultTabInset));this._tabPosition=this.component.render("tabPosition",Extras.Sync.TabPane._defaultTabPosition);this._tabSpacing=this.component.render("tabSpacing",Extras.Sync.TabPane._defaultTabSpacing);this._tabCloseEnabled=this.component.render("tabCloseEnabled",false);if(this._tabCloseEnabled){this._icons.defaultIcon=this.component.render("tabCloseIcon");this._icons.disabledIcon=this.component.render("tabDisabledCloseIcon");this._icons.rolloverIcon=this.component.render("tabRolloverCloseIcon")}var h=Echo.Sync.Insets.toPixels(this._insets);if(this._borderType==Extras.TabPane.BORDER_TYPE_SURROUND){}else{if(this._borderType==Extras.TabPane.BORDER_TYPE_PARALLEL_TO_TABS){h.left=h.right=0}else{if(this._tabPosition==Extras.TabPane.TAB_POSITION_BOTTOM){h.left=h.right=h.top=0}else{h.left=h.right=h.bottom=0}}}this._div=document.createElement("div");this._div.id=this.component.renderId;this._div.style.cssText="position:absolute;overflow:hidden;top:"+h.top+"px;right:"+h.right+"px;bottom:"+h.bottom+"px;left:"+h.left+"px;";this._headerContainerDiv=document.createElement("div");this._headerContainerDiv.style.cssText="position:absolute;overflow:hidden;z-index:1;"+(this._tabPosition==Extras.TabPane.TAB_POSITION_BOTTOM?"bottom":"top")+":0;left:"+this._tabInsetPx+"px;right:"+this._tabInsetPx+"px;";this._headerTabContainerDiv=document.createElement("div");this._headerTabContainerTable=document.createElement("table");this._headerTabContainerTable.style.padding=0;this._headerTabContainerTable.cellPadding=0;this._headerTabContainerTable.cellSpacing=0;var f=document.createElement("tbody");this._headerTabContainerTr=document.createElement("tr");f.appendChild(this._headerTabContainerTr);this._headerTabContainerTable.appendChild(f);this._headerTabContainerDiv.appendChild(this._headerTabContainerTable);this._headerContainerDiv.appendChild(this._headerTabContainerDiv);Echo.Sync.Font.render(this.component.render("font"),this._headerContainerDiv);Echo.Sync.FillImage.render(this.component.render("tabBackgroundImage"),this._headerContainerDiv);this._div.appendChild(this._headerContainerDiv);this._contentContainerDiv=document.createElement("div");this._contentContainerDiv.style.position="absolute";this._contentContainerDiv.style.overflow="hidden";Echo.Sync.renderComponentDefaults(this.component,this._contentContainerDiv);var g=false;var c=this.component.getComponentCount();for(var e=0;e<c;++e){var a=this.component.getComponent(e);if(this._activeTabId==a.renderId){g=true}var b=new Extras.Sync.TabPane.Tab(a,this);this._addTab(d,b)}if(!g){this._activeTabId=null;if(c>0){this._selectTab(this.component.getComponent(0).renderId);this._setActiveTabId(this._activeTabId)}}this._configureHeaderSizeRequired=true;if(this._borderType==Extras.TabPane.BORDER_TYPE_NONE){this._contentContainerDiv.style.border="0 none"}else{if(this._borderType==Extras.TabPane.BORDER_TYPE_SURROUND){Echo.Sync.Border.render(this._tabActiveBorder,this._contentContainerDiv)}else{if(this._borderType==Extras.TabPane.BORDER_TYPE_PARALLEL_TO_TABS){Echo.Sync.Border.render(this._tabActiveBorder,this._contentContainerDiv,"borderTop");Echo.Sync.Border.render(this._tabActiveBorder,this._contentContainerDiv,"borderBottom")}else{if(this._tabPosition==Extras.TabPane.TAB_POSITION_BOTTOM){Echo.Sync.Border.render(this._tabActiveBorder,this._contentContainerDiv,"borderBottom")}else{Echo.Sync.Border.render(this._tabActiveBorder,this._contentContainerDiv,"borderTop")}}}}this._div.appendChild(this._contentContainerDiv);j.appendChild(this._div)},renderDisplay:function(){var b,a,c;this._tabContainerWidth=new Core.Web.Measure.Bounds(this._headerContainerDiv).width;this._totalTabWidth=new Core.Web.Measure.Bounds(this._headerTabContainerDiv.firstChild).width;Core.Web.VirtualPosition.redraw(this._div);Core.Web.VirtualPosition.redraw(this._contentContainerDiv);Core.Web.VirtualPosition.redraw(this._headerContainerDiv);this.setScrollPosition(this.scrollPosition);if(this._configureHeaderSizeRequired){this._configureHeaderSize();var d=Core.method(this,function(){if(this.component){this._configureHeaderSize()}});Core.Web.Image.monitor(this._headerContainerDiv,d)}else{for(c=0;c<this._tabs.length;++c){this._tabs[c]._renderDisplay()}}},renderDispose:function(b){this._activeTabId=null;for(var a=0;a<this._tabs.length;a++){this._tabs[a]._dispose()}this._tabs=[];this._div=null;this._headerContainerDiv=null;this._headerTabContainerDiv=null;this._headerTabContainerTable=null;this._headerTabContainerTr=null;this._contentContainerDiv=null;if(this._previousControlDiv){Core.Web.Event.removeAll(this._previousControlDiv);this._previousControlDiv=null}if(this._nextControlDiv){Core.Web.Event.removeAll(this._nextControlDiv);this._nextControlDiv=null}},renderUpdate:function(e){var l=false,d,f;if(e.hasUpdatedLayoutDataChildren()){l=true}if(!l){if(!Core.Arrays.containsAll(Extras.Sync.TabPane._supportedPartialProperties,e.getUpdatedPropertyNames(),true)){l=true}}if(!l){var c=false;var j=e.getRemovedChildren();if(j){for(f=0;f<j.length;++f){d=this._getTabById(j[f].renderId);if(!d){continue}if(d._childComponent.renderId==this._activeTabId){c=true}this._removeTab(d)}}var a=e.getAddedChildren();if(a){for(f=0;f<a.length;++f){d=new Extras.Sync.TabPane.Tab(a[f],this);this._addTab(e,d,this.component.indexOf(a[f]))}}if(e.hasUpdatedProperties()){var g=e.getUpdatedProperty("activeTab");if(g){c=false;this._selectTab(g.newValue)}else{var h=e.getUpdatedProperty("activeTabIndex");if(h&&h.newValue<this.component.children.length){c=false;this._selectTab(this.component.children[h.newValue].renderId)}}}if((c||this._activeTabId==null)&&this.component.children.length>0){this._selectTab(this.component.children[0].renderId)}this._configureHeaderSizeRequired=true}if(l){var b=this._div;var k=b.parentNode;Echo.Render.renderComponentDispose(e,e.parent);k.removeChild(b);this.renderAdd(e,k)}return l},_selectTab:function(a){if(a==this._activeTabId){return}var b;if(this._activeTabId){b=this._getTabById(this._activeTabId);if(b){b._renderActiveState(false)}}b=this._getTabById(a);if(b){this._activeTabId=a;b._renderActiveState(true)}else{this._activeTabId=null}},_setActiveTabId:function(a){this.component.set("activeTab",a);var c=false;for(var b=0;b<this.component.children.length;++b){if(this.component.children[b].renderId==a){this.component.set("activeTabIndex",b);c=true;break}}if(!c){this.component.set("activeTabIndex",null)}},_setOversizeEnabled:function(d,c){var a=d?this._previousControlDiv:this._nextControlDiv,b;if(c){if(a){a.style.display="block"}else{a=document.createElement("div");a.style.cssText="position:absolute;z-index:2;cursor:pointer;";a.style[this._tabPosition===Extras.TabPane.TAB_POSITION_BOTTOM?"bottom":"top"]="5px";a.style[d?"left":"right"]="2px";b=document.createElement("img");a.appendChild(b);Core.Web.Event.add(a,"mousedown",Core.method(this,this._processScrollStart));Core.Web.Event.add(a,"mouseup",Core.method(this,this._processScrollStop));Core.Web.Event.Selection.disable(a);if(d){b.src=this._icons.previous?this._icons.previous:this.client.getResourceUrl("Extras","image/tabpane/Previous.gif");b.alt="<";this._previousControlDiv=a}else{b.src=this._icons.next?this._icons.next:this.client.getResourceUrl("Extras","image/tabpane/Next.gif");b.alt=">";this._nextControlDiv=a}this._div.appendChild(a)}}else{if(a){a.style.display="none"}}},setScrollPosition:function(b){var a=false,c=this._totalTabWidth>this._tabContainerWidth;if(b<0){b=0;a=true}else{if(b>0&&b>this._totalTabWidth-this._tabContainerWidth){b=this._totalTabWidth-this._tabContainerWidth;a=true}}this.scrollPosition=b;this._headerTabContainerDiv.style.marginLeft=(0-b)+"px";if(c){this._setOversizeEnabled(true,b>0);this._setOversizeEnabled(false,b<this._totalTabWidth-this._tabContainerWidth)}else{this._setOversizeEnabled(true,false);this._setOversizeEnabled(false,false)}return !a}});Extras.Sync.TabPane.Tab=Core.extend({$construct:function(a,b){this._childComponent=a;this._parent=b;this._rendered=false;if(b._tabCloseEnabled){var c=this._childComponent.render("layoutData");this._tabCloseEnabled=c?c.closeEnabled:false}else{this._tabCloseEnabled=false}this._headerTd=null;this._headerContentTable=null;this._contentDiv=null;this._leftTd=null;this._centerTd=null;this._rightTd=null;this._closeImageTd=null},_addEventListeners:function(){Core.Web.Event.add(this._headerTd,"click",Core.method(this,this._processClick),false);Core.Web.Event.Selection.disable(this._headerTd);if(this._tabCloseEnabled){Core.Web.Event.add(this._headerTd,"mouseover",Core.method(this,this._processEnter),false);Core.Web.Event.add(this._headerTd,"mouseout",Core.method(this,this._processExit),false)}},_dispose:function(){Core.Web.Event.removeAll(this._headerTd);this._parent=null;this._childComponent=null;this._headerTd=null;this._headerContentTable=null;this._contentDiv=null;this._leftTd=null;this._centerTd=null;this._rightTd=null;this._closeImageTd=null},_getCloseImage:function(c){var a=this._parent._icons;var b;if(this._tabCloseEnabled){if(c&&this._parent.component.render("tabCloseIconRolloverEnabled")){b=a.rolloverIcon}}else{b=a.disabledIcon}return b?b:a.defaultIcon||this._parent.client.getResourceUrl("Extras","image/tabpane/Close.gif")},_getContentInsets:function(){if(this._childComponent.pane){return Extras.Sync.TabPane._paneInsets}else{return this._parent.component.render("defaultContentInsets",Extras.Sync.TabPane._defaultTabContentInsets)}},_getLeftImage:function(c){var a=c?"tabActiveLeftImage":"tabInactiveLeftImage";var d=this._parent.component.render(a);if(!d){return}var b={url:(d.url?d.url:d),repeat:"no-repeat",x:0,y:0};return{width:(d.width?d.width:null),fillImage:b}},_getRightImage:function(c){var a=c?"tabActiveRightImage":"tabInactiveRightImage";var d=this._parent.component.render(a);if(!d){return}var b={url:(d.url?d.url:d),repeat:"no-repeat",x:"100%",y:0};return{width:(d.width?d.width:null),fillImage:b}},_renderActiveState:function(a){var c=this._headerContentTable;var i=this._centerTd;var e=this._contentDiv;var k;var b;var g;if(a){k=this._parent.component.render("tabActiveForeground");b=this._parent.component.render("tabActiveBackground");g=this._parent._tabActiveBorder}else{k=this._parent.component.render("tabInactiveForeground");b=this._parent.component.render("tabInactiveBackground");g=this._parent._tabInactiveBorder}Echo.Sync.Color.renderClear(k,c,"color");Echo.Sync.Color.renderClear(b,c,"backgroundColor");c.style.cursor=a?"default":"pointer";var l;if(a){l=this._parent.component.render("tabActiveBackgroundImage")}else{l=this._parent.component.render("tabInactiveBackgroundImage")}Echo.Sync.FillImage.renderClear(l,i,null);var j=Echo.Sync.Border.getPixelSize(this._parent._tabActiveBorder);var f=Echo.Sync.Border.getPixelSize(this._parent._tabInactiveBorder);if(this._parent._tabPosition==Extras.TabPane.TAB_POSITION_BOTTOM){c.style.marginTop=a?0:j+"px";c.style.marginBottom=a?0:this._parent._tabActiveHeightIncreasePx+"px";i.style.paddingTop=a?(f+this._parent._tabActiveHeightIncreasePx)+"px":0;Echo.Sync.Border.render(g,c,"borderBottom")}else{c.style.marginBottom=a?0:j+"px";c.style.marginTop=a?0:this._parent._tabActiveHeightIncreasePx+"px";i.style.paddingBottom=a?(f+this._parent._tabActiveHeightIncreasePx)+"px":0;Echo.Sync.Border.render(g,c,"borderTop")}Echo.Sync.Border.render(g,c,"borderLeft");Echo.Sync.Border.render(g,c,"borderRight");var d;if(a){d=this._parent.component.render("tabActiveFont")}else{d=this._parent.component.render("tabInactiveFont")}Echo.Sync.Font.renderClear(d,c);if(this._leftTd){var h=this._getLeftImage(a);Echo.Sync.FillImage.renderClear(h?h.fillImage:null,this._leftTd,null);if(h&&h.width){this._leftTd.style.width=h.width.toString()}}if(this._rightTd){var m=this._getRightImage(a);Echo.Sync.FillImage.renderClear(m?m.fillImage:null,this._rightTd,null);if(m&&m.width){this._rightTd.style.width=m.width.toString()}}if(Core.Web.Env.BROWSER_MOZILLA&&!Core.Web.Env.BROWSER_FIREFOX){e.style.right=a?"0":"100%";e.style.bottom=a?"0":"100%"}else{e.style.display=a?"block":"none"}if(a){Echo.Render.renderComponentDisplay(this._childComponent)}},_processClick:function(a){if(!this._parent||!this._parent.client||!this._parent.client.verifyInput(this._parent.component)){return true}if(this._closeImageTd&&Core.Web.DOM.isAncestorOf(this._closeImageTd,a.target)){if(!this._tabCloseEnabled){return}this._parent.component.doTabClose(this._childComponent)}else{this._parent._selectTab(this._childComponent.renderId);this._parent._setActiveTabId(this._childComponent.renderId);this._parent.component.doTabSelect(this._childComponent)}},_processEnter:function(b){if(!this._parent||!this._parent.client||!this._parent.client.verifyInput(this._parent.component)){return true}var a=Core.Web.DOM.isAncestorOf(this._closeImageTd,b.target);this._closeImageTd.firstChild.src=Echo.Sync.ImageReference.getUrl(this._getCloseImage(a))},_processExit:function(b){var a=Core.Web.DOM.isAncestorOf(this._closeImageTd,b.target);this._closeImageTd.firstChild.src=Echo.Sync.ImageReference.getUrl(this._getCloseImage(false))},_render:function(a){this._headerTd=this._renderHeader();this._headerContentTable=this._headerTd.firstChild;this._contentDiv=this._renderContent(a);this._renderActiveState(this._childComponent.renderId==this._parent._activeTabId);this._addEventListeners()},_renderCloseIcon:function(){var b=document.createElement("td");Echo.Sync.Alignment.render(this._parent.component.render("tabAlignment",Extras.Sync.TabPane._defaultTabAlignment),b,true,this._parent.component);b.style.padding="0 0 0 "+this._parent.component.render("tabCloseIconTextMargin",Extras.Sync.TabPane._defaultTabCloseIconTextMargin+"px");b.style.cursor="pointer";var a=document.createElement("img");a.src=Echo.Sync.ImageReference.getUrl(this._getCloseImage(false));if(Core.Web.Env.BROWSER_INTERNET_EXPLORER){a.removeAttribute("width");a.removeAttribute("height")}b.appendChild(a);return b},_renderContent:function(b){var a=document.createElement("div");a.style.cssText="position:absolute;top:0;left:0;overflow:auto;";if(Core.Web.Env.BROWSER_MOZILLA&&!Core.Web.Env.BROWSER_FIREFOX){a.style.right="100%";a.style.bottom="100%"}else{a.style.display="none";a.style.right="0";a.style.bottom="0"}Echo.Sync.Insets.render(this._getContentInsets(),a,"padding");Echo.Render.renderComponentAdd(b,this._childComponent,a);return a},_renderDisplay:function(){Core.Web.VirtualPosition.redraw(this._contentDiv)},_renderHeader:function(){var g=this._childComponent.render("layoutData");var a=document.createElement("td");a.style.padding=0;a.style.border="0px none";a.vAlign=this._parent._tabPosition==Extras.TabPane.TAB_POSITION_BOTTOM?"top":"bottom";var j=document.createElement("table");j.cellPadding="0";j.cellSpacing="0";j.style.padding="0";j.style.marginRight=this._parent._tabSpacing.toString();var d=this._parent.component.render("tabWidth");if(d){j.style.width=d.toString()}var b=document.createElement("tbody");var m=document.createElement("tr");if(this._getLeftImage(true)!=null||this._getLeftImage(false)!=null){this._leftTd=document.createElement("td");this._leftTd.appendChild(document.createTextNode("\u00a0"));m.appendChild(this._leftTd)}var h=document.createElement("td");Echo.Sync.Insets.render(Extras.Sync.TabPane._defaultTabInsets,h,"padding");var i=document.createElement("div");h.appendChild(i);var l=g?g.icon:null;var n=g?(g.title?g.title:"*"):"*";var e=this._parent._tabCloseEnabled&&(this._tabCloseEnabled||this._parent._icons.disabledIcon);if(l||e){var o=document.createElement("table");o.style.padding="0";o.cellPadding="0";o.cellSpacing="0";var f=document.createElement("tbody");var k=document.createElement("tr");if(l){k.appendChild(this._renderIcon(l))}var c=document.createElement("td");c.style.whiteSpace="nowrap";Echo.Sync.Alignment.render(this._parent.component.render("tabAlignment",Extras.Sync.TabPane._defaultTabAlignment),c,true,this._parent.component);c.appendChild(document.createTextNode(n));o.appendChild(f);f.appendChild(k);k.appendChild(c);if(e){this._closeImageTd=this._renderCloseIcon();k.appendChild(this._closeImageTd)}i.appendChild(o)}else{i.style.whiteSpace="nowrap";Echo.Sync.Alignment.render(this._parent.component.render("tabAlignment",Extras.Sync.TabPane._defaultTabAlignment),i,true,this._parent.component);i.appendChild(document.createTextNode(n))}if(this._parent.component.render("tabHeight")){Echo.Sync.Extent.render(this._parent.component.render("tabHeight"),i,"height",false,false)}m.appendChild(h);this._centerTd=h;if(this._getRightImage(true)!=null||this._getRightImage(false)!=null){this._rightTd=document.createElement("td");this._rightTd.appendChild(document.createTextNode("\u00a0"));m.appendChild(this._rightTd)}b.appendChild(m);j.appendChild(b);a.appendChild(j);return a},_renderIcon:function(b){var c=document.createElement("td");Echo.Sync.Alignment.render(this._parent.component.render("tabAlignment",Extras.Sync.TabPane._defaultTabAlignment),c,true,this._parent.component);var a=document.createElement("img");a.src=Echo.Sync.ImageReference.getUrl(b);a.style.marginRight=this._parent.component.render("tabIconTextMargin",Extras.Sync.TabPane._defaultTabIconTextMargin+"px");c.appendChild(a);return c}});Extras.ColorSelect=Core.extend(Echo.Component,{$static:{DEFAULT_VALUE_WIDTH:"12em",DEFAULT_SATURATION_HEIGHT:"12em",DEFAULT_HUE_WIDTH:"2em"},$load:function(){Echo.ComponentFactory.registerType("Extras.ColorSelect",this)},componentType:"Extras.ColorSelect"});Extras.Sync.ColorSelect=Core.extend(Echo.Render.ComponentSync,{$load:function(){Echo.Render.registerPeer("Extras.ColorSelect",this)},_h:0,_s:0,_v:0,_processHMouseMoveRef:null,_processHMouseUpRef:null,_processSVMouseMoveRef:null,_processSVMouseUpRef:null,$construct:function(){this._processHMouseMoveRef=Core.method(this,this._processHMouseMove);this._processHMouseUpRef=Core.method(this,this._processHMouseUp);this._processSVMouseMoveRef=Core.method(this,this._processSVMouseMove);this._processSVMouseUpRef=Core.method(this,this._processSVMouseUp)},_hsvToRgb:function(j,u,n){var a,k,m;if(u===0){a=k=m=n}else{j/=60;var e=Math.floor(j);var l=j-e;var d=n*(1-u);var c=n*(1-u*l);var o=n*(1-u*(1-l));switch(e){case 0:a=n;k=o;m=d;break;case 1:a=c;k=n;m=d;break;case 2:a=d;k=n;m=o;break;case 3:a=d;k=c;m=n;break;case 4:a=o;k=d;m=n;break;default:a=n;k=d;m=c;break}}return new Extras.Sync.ColorSelect.RGB(Math.round(a*255),Math.round(k*255),Math.round(m*255))},_processHMouseDown:function(a){if(!this.client||!this.client.verifyInput(this.component)||Core.Web.dragInProgress){return}Core.Web.Event.add(this._hListenerDiv,"mousemove",this._processHMouseMoveRef,false);Core.Web.Event.add(this._hListenerDiv,"mouseup",this._processHMouseUpRef,false);this._processHUpdate(a)},_processHMouseMove:function(a){this._processHUpdate(a)},_processHMouseUp:function(a){Core.Web.Event.remove(this._hListenerDiv,"mousemove",this._processHMouseMoveRef,false);Core.Web.Event.remove(this._hListenerDiv,"mouseup",this._processHMouseUpRef,false);this._storeColor()},_processHUpdate:function(a){var b=Core.Web.DOM.getEventOffset(a);this._h=(this._saturationHeight-(b.y-7))*360/this._saturationHeight;this._updateDisplayedColor()},_processSVMouseDown:function(a){if(!this.client||!this.client.verifyInput(this.component)||Core.Web.dragInProgress){return}Core.Web.Event.add(this._svListenerDiv,"mousemove",this._processSVMouseMoveRef,false);Core.Web.Event.add(this._svListenerDiv,"mouseup",this._processSVMouseUpRef,false);this._processSVUpdate(a)},_processSVMouseMove:function(a){this._processSVUpdate(a)},_processSVMouseUp:function(a){Core.Web.Event.remove(this._svListenerDiv,"mousemove",this._processSVMouseMoveRef,false);Core.Web.Event.remove(this._svListenerDiv,"mouseup",this._processSVMouseUpRef,false);this._storeColor()},_processSVUpdate:function(a){var b=Core.Web.DOM.getEventOffset(a);this._v=(b.x-7)/this._valueWidth;this._s=1-((b.y-7)/this._saturationHeight);this._updateDisplayedColor()},renderAdd:function(m,g){this._valueWidth=Echo.Sync.Extent.toPixels(this.component.render("valueWidth",Extras.ColorSelect.DEFAULT_VALUE_WIDTH),true);this._saturationHeight=Echo.Sync.Extent.toPixels(this.component.render("saturationHeight",Extras.ColorSelect.DEFAULT_SATURATION_HEIGHT),false);this._hueWidth=Echo.Sync.Extent.toPixels(this.component.render("hueWidth",Extras.ColorSelect.DEFAULT_HUE_WIDTH),true);var e=Core.Web.Measure.extentToPixels("1em",false);var d=this.client.getResourceUrl("Extras","image/colorselect/ColorSelectSVGradient.png");var o=this.client.getResourceUrl("Extras","image/colorselect/ColorSelectHGradient.png");var i=this.client.getResourceUrl("Extras","image/colorselect/ColorSelectArrowDown.gif");var n=this.client.getResourceUrl("Extras","image/colorselect/ColorSelectArrowUp.gif");var r=this.client.getResourceUrl("Extras","image/colorselect/ColorSelectArrowRight.gif");var h=this.client.getResourceUrl("Extras","image/colorselect/ColorSelectArrowLeft.gif");this._div=document.createElement("div");this._div.id=this.component.renderId;this._div.style.cssText="position:relative;left:0;top:0;overflow:hidden;";this._div.style.width=(this._valueWidth+this._hueWidth+29)+"px";this._div.style.height=(this._saturationHeight+18+e)+"px";this._svDiv=document.createElement("div");this._svDiv.style.cssText="position:absolute;left:7px;top:7px;background-color:#ff0000";this._svDiv.style.width=this._valueWidth+"px";this._svDiv.style.height=this._saturationHeight+"px";this._div.appendChild(this._svDiv);if(d){if(Core.Web.Env.PROPRIETARY_IE_PNG_ALPHA_FILTER_REQUIRED){this._svDiv.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+d+"', sizingMethod='scale');"}else{var k=document.createElement("img");k.src=d;k.style.width=this._valueWidth+"px";k.style.height=this._saturationHeight+"px";this._svDiv.appendChild(k)}}this._vLineDiv=document.createElement("div");this._vLineDiv.style.cssText="position:absolute;left:2px;top:0;width:11px;overflow:hidden;";this._vLineDiv.style.height=(this._saturationHeight+14)+"px";this._div.appendChild(this._vLineDiv);if(i){var f=document.createElement("img");f.src=i;f.style.cssText="position:absolute;left:0;top:0;";this._vLineDiv.appendChild(f)}var q=document.createElement("div");q.style.cssText="position:absolute;top:7px;left:5px;width:1px;background-color:#000000;";q.style.height=this._saturationHeight+"px";this._vLineDiv.appendChild(q);if(n){var p=document.createElement("img");p.src=n;p.style.cssText="position:absolute;left:0;";p.style.top=(this._saturationHeight+7)+"px";this._vLineDiv.appendChild(p)}this._sLineDiv=document.createElement("div");this._sLineDiv.style.cssText="position:absolute;left:0;height:11px;overflow:hidden;";this._sLineDiv.style.top=(this._saturationHeight+2)+"px";this._sLineDiv.style.width=(this._valueWidth+14)+"px";this._div.appendChild(this._sLineDiv);if(r){var s=document.createElement("img");s.src=r;s.style.cssText="position:absolute;left:0;top:0;";this._sLineDiv.appendChild(s)}var c=document.createElement("div");c.style.cssText="position:absolute;left:7px;top:5px;height:1px;font-size:1px;border-top:1px #000000 solid;line-height:0;";c.style.width=this._valueWidth+"px";this._sLineDiv.appendChild(c);if(h){var l=document.createElement("img");l.src=h;l.style.cssText="position:absolute;top:0;";l.style.left=this._valueWidth+7+"px";this._sLineDiv.appendChild(l)}var j=document.createElement("div");j.style.cssText="position:absolute;top:7px;";j.style.left=(this._valueWidth+22)+"px";j.style.width=this._hueWidth+"px";j.style.height=this._saturationHeight+"px";this._div.appendChild(j);if(o){var b=document.createElement("img");b.src=o;b.style.cssText="position:absolute;left:0;top:0;";b.style.width=this._hueWidth+"px";b.style.height=this._saturationHeight+"px";j.appendChild(b)}this._hLineDiv=document.createElement("div");this._hLineDiv.style.cssText="position:absolute;height:11px;overflow:hidden;";this._hLineDiv.style.left=(this._valueWidth+15)+"px";this._hLineDiv.style.top=(this._saturationHeight+2)+"px";this._hLineDiv.style.width=(this._hueWidth+14)+"px";this._div.appendChild(this._hLineDiv);if(r){var u=document.createElement("img");u.src=r;u.style.cssText="position:absolute;left:0;top:0;";this._hLineDiv.appendChild(u)}if(h){var t=document.createElement("img");t.src=h;t.style.cssText="position:absolute;top:0;";t.style.left=(this._hueWidth+7)+"px";this._hLineDiv.appendChild(t)}var a=document.createElement("div");a.style.cssText="position:absolute;left:7px;top:5px;height:1px;font-size:1px;border-top:1px #000000 solid;line-height:0;";a.style.width=this._hueWidth+"px";this._hLineDiv.appendChild(a);this._colorDiv=document.createElement("div");this._colorDiv.style.cssText="position:absolute;left:7px;color:#ffffff;background-color:#000000;text-align:center;vertical-align:middle;overflow:hidden;border:1px #000000 outset;font-family:monospace;text-align:center;";this._colorDiv.style.height=e+"px";this._colorDiv.style.top=(this._saturationHeight+16)+"px";this._colorDiv.style.width=(this._valueWidth+this._hueWidth+13)+"px";if(this.component.render("displayValue")){this._colorDiv.appendChild(document.createTextNode("#000000"))}this._div.appendChild(this._colorDiv);this._svListenerDiv=document.createElement("div");this._svListenerDiv.style.cssText="position:absolute;z-index:1;left:0;top:0;cursor:crosshair;";this._svListenerDiv.style.width=(this._valueWidth+14)+"px";this._svListenerDiv.style.height=(this._saturationHeight+14)+"px";this._svListenerDiv.style.backgroundImage="url("+this.client.getResourceUrl("Echo","resource/Transparent.gif")+")";this._div.appendChild(this._svListenerDiv);this._hListenerDiv=document.createElement("div");this._hListenerDiv.style.cssText="position:absolute;z-index:1;top:0;cursor:crosshair;";this._hListenerDiv.style.left=(this._valueWidth+15)+"px";this._hListenerDiv.style.width=(this._hueWidth+14)+"px";this._hListenerDiv.style.height=(this._saturationHeight+16)+"px";this._hListenerDiv.style.backgroundImage="url("+this.client.getResourceUrl("Echo","resource/Transparent.gif")+")";this._div.appendChild(this._hListenerDiv);g.appendChild(this._div);Core.Web.Event.add(this._svListenerDiv,"mousedown",Core.method(this,this._processSVMouseDown),false);Core.Web.Event.add(this._hListenerDiv,"mousedown",Core.method(this,this._processHMouseDown),false);this._setColor(this.component.get("color"))},renderDispose:function(a){Core.Web.Event.removeAll(this._svListenerDiv);Core.Web.Event.removeAll(this._hListenerDiv);this._div=null;this._svDiv=null;this._svListenerDiv=null;this._hListenerDiv=null;this._hLineDiv=null;this._sLineDiv=null;this._vLineDiv=null},renderUpdate:function(c){var b=this._div;var a=b.parentNode;Echo.Render.renderComponentDispose(c,c.parent);a.removeChild(b);this.renderAdd(c,a);return false},_setColor:function(d){var h,f,c;if(d){d=d.substring(1);h=Math.floor(parseInt(d,16)/65536)/255;f=(Math.floor(parseInt(d,16)/256)%256)/255;c=(parseInt(d,16)%256)/255}else{h=f=c=0}var e=Math.min(h,f,c);var a=Math.max(h,f,c);this._v=a;var i=a-e;if(a===0||i===0){this._s=0}else{this._s=i/a;if(h==a){this._h=60*((f-c)/i)}else{if(f==a){this._h=60*(2+(c-h)/i)}else{this._h=60*(4+(h-f)/i)}}if(this._h<0){this._h+=360}}this._updateDisplayedColor()},_storeColor:function(){var a=this._hsvToRgb(this._h,this._s,this._v);var b=a.toHexTriplet();this.component.set("color",b)},_updateDisplayedColor:function(){var f;if(this.component.isRenderEnabled()){f=this._hsvToRgb(this._h,1,1)}else{f=this._hsvToRgb(this._h,0.3,0.7)}this._svDiv.style.backgroundColor=f.toHexTriplet();var b=this._hsvToRgb(this._h,this._s,this._v);var e=b.toHexTriplet();this._colorDiv.style.backgroundColor=e;this._colorDiv.style.borderColor=e;this._colorDiv.style.color=this._v<0.67?"#ffffff":"#000000";if(this.component.render("displayValue")){this._colorDiv.childNodes[0].nodeValue=e}var a=Math.floor((1-this._s)*this._saturationHeight)+2;if(a<2){a=2}else{if(a>this._saturationHeight+2){a=this._saturationHeight+2}}this._sLineDiv.style.top=a+"px";var d=Math.floor(this._v*this._valueWidth)+2;if(d<2){d=2}else{if(d>this._valueWidth+2){d=this._valueWidth+2}}this._vLineDiv.style.left=d+"px";var c=Math.floor((360-this._h)/360*this._saturationHeight)+2;if(c<2){c=2}else{if(c>this._saturationHeight+2){c=this._saturationHeight+2}}this._hLineDiv.style.top=c+"px"}});Extras.Sync.ColorSelect.RGB=Core.extend({$construct:function(d,c,a){this.r=this._clean(d);this.g=this._clean(c);this.b=this._clean(a)},_clean:function(a){a=a?parseInt(a,10):0;if(a<0){return 0}else{if(a>255){return 255}else{return a}}},toHexTriplet:function(){var b=this.r.toString(16);if(b.length==1){b="0"+b}var c=this.g.toString(16);if(c.length==1){c="0"+c}var a=this.b.toString(16);if(a.length==1){a="0"+a}return"#"+b+c+a},toString:function(){return this.toHexTriplet()}});Extras.RichTextArea=Core.extend(Echo.Component,{$static:{DEFAULT_BORDER:"1px inset #7f7f7f"},$load:function(){Echo.ComponentFactory.registerType("Extras.RichTextArea",this)},componentType:"Extras.RichTextArea",focusable:true,doAction:function(){this.fireEvent({source:this,type:"action"})},insertHtml:function(a){this.fireEvent({type:"insertHtml",source:this,html:a})}});Extras.Sync.RichTextArea=Core.extend(Echo.Arc.ComponentSync,{$static:{DEFAULT_CONTROL_PANE_SPLIT_PANE_STYLE:{orientation:Echo.SplitPane.ORIENTATION_VERTICAL_BOTTOM_TOP,separatorColor:"#dfdfef",separatorHeight:1,autoPositioned:true},DEFAULT_CONTROL_PANE_ROW_STYLE:{insets:"2px 10px",cellSpacing:3,layoutData:{overflow:Echo.SplitPane.OVERFLOW_HIDDEN,background:"#cfcfdf"}},DEFAULT_CONTROL_PANE_BUTTON_STYLE:{insets:"0px 8px",lineWrap:false,foreground:"#000000",rolloverEnabled:true,rolloverForeground:"#6f0f0f"},defaultFeatures:{menu:true,toolbar:true,undo:true,clipboard:true,alignment:true,foreground:true,background:true,list:true,table:true,image:true,horizontalRule:true,hyperlink:true,subscript:true,bold:true,italic:true,underline:true,strikethrough:true,paragraphStyle:true,indent:true},resource:new Core.ResourceBundle({"ColorDialog.Title.Foreground":"Text Color","ColorDialog.Title.Background":"Highlight Color","ColorDialog.PromptForeground":"Foreground:","ColorDialog.PromptBackground":"Background:","Error.ClipboardAccessDisabled":"This browser has clipboard access disabled. Use keyboard shortcuts or change your security settings.","Generic.Cancel":"Cancel","Generic.Error":"Error","Generic.Ok":"Ok","HyperlinkDialog.Title":"Insert Hyperlink","HyperlinkDialog.PromptURL":"URL:","HyperlinkDialog.PromptDescription":"Description Text:","HyperlinkDialog.ErrorDialogTitle":"Cannot Insert Hyperlink","HyperlinkDialog.ErrorDialog.URL":"The URL entered is not valid.","ImageDialog.Title":"Insert Image","ImageDialog.PromptURL":"URL:","ImageDialog.ErrorDialogTitle":"Cannot Insert Image","ImageDialog.ErrorDialog.URL":"The URL entered is not valid.","Menu.Edit":"Edit","Menu.Undo":"Undo","Menu.Redo":"Redo","Menu.Cut":"Cut","Menu.Copy":"Copy","Menu.Paste":"Paste","Menu.Delete":"Delete","Menu.SelectAll":"Select All","Menu.Insert":"Insert","Menu.InsertImage":"Image...","Menu.InsertHyperlink":"Hyperlink...","Menu.InsertHorizontalRule":"Horizontal Rule","Menu.InsertTable":"Table...","Menu.BulletedList":"Bulleted List","Menu.NumberedList":"Numbered List","Menu.Format":"Format","Menu.Bold":"Bold","Menu.Italic":"Italic","Menu.Underline":"Underline","Menu.Strikethrough":"Strikethrough","Menu.Superscript":"Superscript","Menu.Subscript":"Subscript","Menu.PlainText":"Plain Text","Menu.TextStyle":"Text Style","Menu.ParagraphStyle":"Paragraph Style","Menu.Alignment":"Alignment","Menu.Left":"Left","Menu.Right":"Right","Menu.Center":"Center","Menu.Justified":"Justified","Menu.Indent":"Indent","Menu.Outdent":"Outdent","Menu.SetForeground":"Set Text Color...","Menu.SetBackground":"Set Highlight Color...","Menu.Heading1":"Heading 1","Menu.Heading2":"Heading 2","Menu.Heading3":"Heading 3","Menu.Heading4":"Heading 4","Menu.Heading5":"Heading 5","Menu.Heading6":"Heading 6","Menu.Normal":"Normal","Menu.Preformatted":"Preformatted","TableDialog.Title":"Insert Table","TableDialog.PromptRows":"Rows:","TableDialog.PromptColumns":"Columns:","TableDialog.ErrorDialogTitle":"Cannot Insert Table","TableDialog.ErrorDialog.Columns":"The entered columns value is not valid.  Please specify a number between 1 and 50.","TableDialog.ErrorDialog.Rows":"The entered rows value is not valid.  Please specify a number between 1 and 50."})},_processDialogCloseRef:null,_processComponentInsertHtmlRef:null,$load:function(){Echo.Render.registerPeer("Extras.RichTextArea",this)},$virtual:{getIcons:function(){var c=this._getDefaultIcons();var b=this.component.get("icons");if(b){for(var a in b){c[a]=b[a]}}return c},processInsertHyperlink:function(b){var a=new Extras.Sync.RichTextArea.HyperlinkDialog(this.component);a.addListener("insertHyperlink",Core.method(this,function(c){this._richTextInput.peer._insertHtml('<a href="'+c.data.url+'">'+(c.data.description?c.data.description:c.data.url)+"</a>");this.focusDocument()}));this._openDialog(a)},processInsertImage:function(b){var a=new Extras.Sync.RichTextArea.ImageDialog(this.component);a.addListener("insertImage",Core.method(this,function(c){this._richTextInput.peer._insertHtml('<img src="'+c.data.url+'">');this.focusDocument()}));this._openDialog(a)},processInsertTable:function(b){var a=new Extras.Sync.RichTextArea.TableDialog(this.component);a.addListener("tableInsert",Core.method(this,function(c){this.insertTable(c.data.columns,c.data.rows);this.focusDocument()}));this._openDialog(a)},processSetBackground:function(b){var a=new Extras.Sync.RichTextArea.ColorDialog(this.component,true,this._toolbarButtons.background.get("color"));a.addListener("colorSelect",Core.method(this,function(c){if(Core.Web.Env.BROWSER_INTERNET_EXPLORER){Core.Web.Scheduler.run(Core.method(this,function(){this.execCommand("backcolor",c.data)}))}else{this.execCommand("hilitecolor",c.data)}this._toolbarButtons.background.set("color",c.data);this.focusDocument()}));this._openDialog(a)},processSetForeground:function(b){var a=new Extras.Sync.RichTextArea.ColorDialog(this.component,false,this._toolbarButtons.foreground.get("color"));a.addListener("colorSelect",Core.method(this,function(c){this.execCommand("forecolor",c.data);this._toolbarButtons.foreground.set("color",c.data);this.focusDocument()}));this._openDialog(a)}},_msg:null,_paneRender:false,_toolbarButtons:null,_styleSelect:null,$construct:function(){this._processComponentInsertHtmlRef=Core.method(this,this._processComponentInsertHtml);this._processDialogCloseRef=Core.method(this,this._processDialogClose);this._toolbarButtons={}},_addComponentListeners:function(){this.component.addListener("insertHtml",this._processComponentInsertHtmlRef)},createComponent:function(){var c=this.component.render("features",Extras.Sync.RichTextArea.defaultFeatures);var b=new Echo.ContentPane();var e=b;if(c.menu){var d=new Echo.SplitPane({orientation:Echo.SplitPane.ORIENTATION_VERTICAL_TOP_BOTTOM,autoPositioned:true,children:[this._createMenu()]});e.add(d);e=d}if(c.toolbar){var a=new Echo.SplitPane({orientation:Echo.SplitPane.ORIENTATION_VERTICAL_TOP_BOTTOM,autoPositioned:true,children:[this._createToolbar()]});e.add(a);e=a}this._richTextInput=new Extras.Sync.RichTextArea.InputComponent({layoutData:{overflow:Echo.SplitPane.OVERFLOW_HIDDEN}});this._richTextInput._richTextArea=this.component;e.add(this._richTextInput);return b},_createMainMenuBarModel:function(){var c=this.component.render("features",Extras.Sync.RichTextArea.defaultFeatures);var f=new Extras.MenuModel(null,null,null);if(c.undo||c.clipboard){var e=new Extras.MenuModel(null,this._msg["Menu.Edit"],null);if(c.undo){e.addItem(new Extras.OptionModel("/undo",this._msg["Menu.Undo"],this._icons.undo));e.addItem(new Extras.OptionModel("/redo",this._msg["Menu.Redo"],this._icons.redo))}if(c.undo&&c.clipboard){e.addItem(new Extras.SeparatorModel())}if(c.clipboard){e.addItem(new Extras.OptionModel("cut",this._msg["Menu.Cut"],this._icons.cut));e.addItem(new Extras.OptionModel("copy",this._msg["Menu.Copy"],this._icons.copy));e.addItem(new Extras.OptionModel("paste",this._msg["Menu.Paste"],this._icons.paste));e.addItem(new Extras.OptionModel("delete",this._msg["Menu.Delete"],this._icons["delete"]));e.addItem(new Extras.SeparatorModel());e.addItem(new Extras.OptionModel("/selectall",this._msg["Menu.SelectAll"],this._icons.selectAll))}f.addItem(e)}if(c.list||c.horizontalRule||c.image||c.hyperlink||c.table){var d=new Extras.MenuModel(null,this._msg["Menu.Insert"],null);if(c.list){d.addItem(new Extras.OptionModel("/insertunorderedlist",this._msg["Menu.BulletedList"],this._icons.bulletedList));d.addItem(new Extras.OptionModel("/insertorderedlist",this._msg["Menu.NumberedList"],this._icons.numberedList))}d.addItem(new Extras.SeparatorModel());if(c.horizontalRule){d.addItem(new Extras.OptionModel("/inserthorizontalrule",this._msg["Menu.InsertHorizontalRule"],this._icons.horizontalRule))}if(c.image){d.addItem(new Extras.OptionModel("insertimage",this._msg["Menu.InsertImage"],this._icons.image))}if(c.hyperlink){d.addItem(new Extras.OptionModel("inserthyperlink",this._msg["Menu.InsertHyperlink"],this._icons.hyperlink))}d.addItem(new Extras.SeparatorModel());if(c.table){d.addItem(new Extras.OptionModel("inserttable",this._msg["Menu.InsertTable"],this._icons.table))}f.addItem(d)}if(c.bold||c.italic||c.underline||c.strikeThrough||c.subscript||c.paragraphStyle||c.alignment||c.indent||c.foreground||c.background){var a=new Extras.MenuModel(null,this._msg["Menu.Format"],null);if(c.bold||c.italic||c.underline||c.strikeThrough||c.subscript){}if(c.paragraphStyle){a.addItem(new Extras.MenuModel(null,this._msg["Menu.ParagraphStyle"],this._icons.paragraphStyle,[new Extras.OptionModel("/formatblock/<p>",this._msg["Menu.Normal"],this._icons.styleNormal),new Extras.OptionModel("/formatblock/<pre>",this._msg["Menu.Preformatted"],this._icons.stylePreformatted),new Extras.OptionModel("/formatblock/<h1>",this._msg["Menu.Heading1"],this._icons.styleH1),new Extras.OptionModel("/formatblock/<h2>",this._msg["Menu.Heading2"],this._icons.styleH2),new Extras.OptionModel("/formatblock/<h3>",this._msg["Menu.Heading3"],this._icons.styleH3),new Extras.OptionModel("/formatblock/<h4>",this._msg["Menu.Heading4"],this._icons.styleH4),new Extras.OptionModel("/formatblock/<h5>",this._msg["Menu.Heading5"],this._icons.styleH5),new Extras.OptionModel("/formatblock/<h6>",this._msg["Menu.Heading6"],this._icons.styleH6)]))}if(c.bold||c.italic||c.underline||c.strikeThrough||c.subscript){var b=new Extras.MenuModel(null,this._msg["Menu.TextStyle"],this._icons.textStyle);b.addItem(new Extras.OptionModel("/removeformat",this._msg["Menu.PlainText"],this._icons.plainText));b.addItem(new Extras.SeparatorModel());if(c.bold){b.addItem(new Extras.OptionModel("/bold",this._msg["Menu.Bold"],this._icons.bold))}if(c.italic){b.addItem(new Extras.OptionModel("/italic",this._msg["Menu.Italic"],this._icons.italic))}if(c.underline){b.addItem(new Extras.OptionModel("/underline",this._msg["Menu.Underline"],this._icons.underline))}if(c.strikethrough){b.addItem(new Extras.OptionModel("/strikethrough",this._msg["Menu.Strikethrough"],this._icons.strikethrough))}b.addItem(new Extras.SeparatorModel());if(c.subscript){b.addItem(new Extras.OptionModel("/superscript",this._msg["Menu.Superscript"],this._icons.superscript));b.addItem(new Extras.OptionModel("/subscript",this._msg["Menu.Subscript"],this._icons.subscript))}a.addItem(b)}if(c.alignment){a.addItem(new Extras.MenuModel(null,this._msg["Menu.Alignment"],this._icons.alignment,[new Extras.OptionModel("/justifyleft",this._msg["Menu.Left"],this._icons.alignmentLeft),new Extras.OptionModel("/justifycenter",this._msg["Menu.Center"],this._icons.alignmentCenter),new Extras.OptionModel("/justifyright",this._msg["Menu.Right"],this._icons.alignmentRight),new Extras.OptionModel("/justifyfull",this._msg["Menu.Justified"],this._icons.alignmentJustify)]))}a.addItem(new Extras.SeparatorModel());if(c.indent){a.addItem(new Extras.OptionModel("/indent",this._msg["Menu.Indent"],this._icons.indent));a.addItem(new Extras.OptionModel("/outdent",this._msg["Menu.Outdent"],this._icons.outdent))}a.addItem(new Extras.SeparatorModel());if(c.foreground||c.background){if(c.foreground){a.addItem(new Extras.OptionModel("foreground",this._msg["Menu.SetForeground"],this._icons.foreground))}if(c.background){a.addItem(new Extras.OptionModel("background",this._msg["Menu.SetBackground"],this._icons.background))}}f.addItem(a)}return f},_createMenu:function(){return new Extras.MenuBarPane({styleName:this.component.render("menuStyleName"),model:this._createMainMenuBarModel(),events:{action:Core.method(this,this._processMenuAction)}})},_createToolbar:function(){var f,b;var c=this.component.render("features",Extras.Sync.RichTextArea.defaultFeatures);var e;var a=new Echo.Panel({styleName:this.component.render("toolbarPanelStyleName"),layoutData:{overflow:Echo.SplitPane.OVERFLOW_HIDDEN},insets:2,children:[e=new Echo.Row({styleName:this.component.render("toolbarRowStyleName"),cellSpacing:10})]});if(c.paragraphStyle){var d=Core.method(this,function(h){var g=this._styleSelect.get("selectedId");this._richTextInput.peer.execCommand("formatblock","<"+g+">")});this._styleSelect=new Echo.SelectField({items:[{id:"p",text:this._msg["Menu.Normal"]},{id:"pre",text:this._msg["Menu.Preformatted"]},{id:"h1",text:this._msg["Menu.Heading1"]},{id:"h2",text:this._msg["Menu.Heading2"]},{id:"h3",text:this._msg["Menu.Heading3"]},{id:"h4",text:this._msg["Menu.Heading4"]},{id:"h5",text:this._msg["Menu.Heading5"]},{id:"h6",text:this._msg["Menu.Heading6"]}],events:{action:d}});e.add(this._styleSelect)}if(c.undo){e.add(new Echo.Row({children:[this._createToolbarButton("<<<",this._icons.undo,this._msg["Menu.Undo"],this._processCommand,"undo"),this._createToolbarButton(">>>",this._icons.redo,this._msg["Menu.Redo"],this._processCommand,"redo")]}))}if(c.bold||c.italic||c.underline){f=new Echo.Row();if(c.bold){b=this._createToolbarButton("B",this._icons.bold,this._msg["Menu.Bold"],this._processCommand,"bold");b.set("toggle",true);f.add(b)}if(c.italic){b=this._createToolbarButton("I",this._icons.italic,this._msg["Menu.Italic"],this._processCommand,"italic");b.set("toggle",true);f.add(b)}if(c.underline){b=this._createToolbarButton("U",this._icons.underline,this._msg["Menu.Underline"],this._processCommand,"underline");b.set("toggle",true);f.add(b)}e.add(f)}if(c.subscript){e.add(new Echo.Row({children:[this._createToolbarButton("^",this._icons.superscript,this._msg["Menu.Superscript"],this._processCommand,"superscript"),this._createToolbarButton("v",this._icons.subscript,this._msg["Menu.Subscript"],this._processCommand,"subscript")]}))}if(c.alignment){e.add(new Echo.Row({children:[this._createToolbarButton("<-",this._icons.alignmentLeft,this._msg["Menu.Left"],this._processCommand,"justifyleft"),this._createToolbarButton("-|-",this._icons.alignmentCenter,this._msg["Menu.Center"],this._processCommand,"justifycenter"),this._createToolbarButton("->",this._icons.alignmentRight,this._msg["Menu.Right"],this._processCommand,"justifyright"),this._createToolbarButton("||",this._icons.alignmentJustify,this._msg["Menu.Justified"],this._processCommand,"justifyfull")]}))}if(c.foreground||c.background){f=new Echo.Row();if(c.foreground){f.add(this._createToolbarButton("FG",this._icons.foreground,this._msg["Menu.SetForeground"],this.processSetForeground,"foreground"))}if(c.background){f.add(this._createToolbarButton("BG",this._icons.background,this._msg["Menu.SetBackground"],this.processSetBackground,"background"))}e.add(f)}if(c.list||c.horizontalRule||c.image||c.hyperlink||c.table){f=new Echo.Row();if(c.list){f.add(this._createToolbarButton("Bulleted List",this._icons.bulletedList,this._msg["Menu.BulletedList"],this._processCommand,"insertunorderedlist"));f.add(this._createToolbarButton("Numbered List",this._icons.numberedList,this._msg["Menu.NumberedList"],this._processCommand,"insertorderedlist"))}if(c.horizontalRule){f.add(this._createToolbarButton("Horizontal Rule",this._icons.horizontalRule,this._msg["Menu.InsertHorizontalRule"],this._processCommand,"inserthorizontalrule"))}if(c.image){f.add(this._createToolbarButton("Image",this._icons.image,this._msg["Menu.InsertImage"],this.processInsertImage))}if(c.hyperlink){f.add(this._createToolbarButton("Hyperlink",this._icons.hyperlink,this._msg["Menu.InsertHyperlink"],this.processInsertHyperlink))}if(c.table){f.add(this._createToolbarButton("Table",this._icons.table,this._msg["Menu.InsertTable"],this.processInsertTable))}e.add(f)}return a},_createToolbarButton:function(f,c,d,e,a){var b=new Extras.Sync.RichTextArea.ToolbarButton({actionCommand:a,styleName:this.component.render("toolbarButtonStyleName"),text:c?null:f,icon:c,toolTipText:d});if(e){b.addListener("action",Core.method(this,e))}this._toolbarButtons[a]=b;return b},execCommand:function(a,b){this._richTextInput.peer.execCommand(a,b)},focusDocument:function(){this._richTextInput.peer.focusDocument()},getDomainElement:function(){return this._mainDiv},_getDefaultIcon:function(a){return this.client.getResourceUrl("Extras","image/richtext/"+a+".gif")},_getDefaultIcons:function(){var a=["alignmentCenter","alignmentJustify","alignmentLeft","alignmentRight","background","bold","bulletedList","cancel","copy","cut","foreground","horizontalRule","hyperlink","image","ident","italic","numberedList","ok","outdent","paste","redo","subscript","superscript","table","underline","undo"];var d={};for(var b=0;b<a.length;++b){var c=a[b].charAt(0).toUpperCase()+a[b].substring(1);d[a[b]]=this.client.getResourceUrl("Extras","image/richtext/"+c+".gif")}return d},insertHtml:function(a){this._richTextInput.peer._insertHtml(a)},insertImage:function(a){this.insertHtml('<img src="'+a+'">')},insertTable:function(d,e){var c="",b;for(b=0;b<d;++b){c+="<td></td>"}c="<tr>"+c+"</tr>";var a='<table width="100%" border="1" cellspacing="0" cellpadding="1"><tbody>';for(b=0;b<e;++b){a+=c}a+="</tbody></table>";this.insertHtml(a)},_markFocused:function(){this.client.application.setFocusedComponent(this)},_openDialog:function(b){var a;if(this._overlayPane==null){this._overlayPane=new Extras.Sync.RichTextArea.OverlayPane();this._overlayPane._richTextArea=this.component;a=new Echo.ContentPane();this._overlayPane.add(a);this.baseComponent.add(this._overlayPane)}else{a=this._overlayPane.children[0]}a.add(b);b.addListener("parent",this._processDialogCloseRef)},_processCommand:function(a){this.execCommand(a.actionCommand);this.focusDocument()},_processComponentInsertHtml:function(a){this._richTextInput.peer._insertHtml(a.html)},_processDialogClose:function(a){if(a.newValue!=null){return}if(this._overlayPane.children[0].children.length===0){this.baseComponent.remove(this._overlayPane);this._overlayPane=null}a.source.removeListener("parent",this._processDialogCloseRef)},_processMenuAction:function(b){if(b.modelId.charAt(0)=="/"){var c=b.modelId.indexOf("/",1);if(c==-1){this._richTextInput.peer.execCommand(b.modelId.substring(1))}else{this._richTextInput.peer.execCommand(b.modelId.substring(1,c),b.modelId.substring(c+1))}}else{switch(b.modelId){case"foreground":this.processSetForeground();break;case"background":this.processSetBackground();break;case"inserttable":this.processInsertTable();break;case"inserthyperlink":this.processInsertHyperlink();break;case"insertimage":this.processInsertImage();break;case"cut":case"copy":case"paste":case"delete":try{this._richTextInput.peer.execCommand(b.modelId)}catch(a){this._openDialog(new Extras.Sync.RichTextArea.MessageDialog(this.component,this._msg["Generic.Error"],this._msg["Error.ClipboardAccessDisabled"]))}}}},_removeComponentListeners:function(){this.component.removeListener("insertHtml",this._processComponentInsertHtmlRef)},renderAdd:function(b,a){this._addComponentListeners();this._msg=Extras.Sync.RichTextArea.resource.get(this.component.getRenderLocale());this._icons=this.getIcons();if(!this._icons){this._icons={}}this._paneRender=this.component.parent.pane;this._mainDiv=document.createElement("div");this._mainDiv.id=this.component.renderId;if(this._paneRender){this._mainDiv.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;"}else{this._mainDiv.style.position="relative";this._mainDiv.style.height="300px"}a.appendChild(this._mainDiv)},renderDispose:function(a){this._removeComponentListeners();Echo.Arc.ComponentSync.prototype.renderDispose.call(this,a);this._mainDiv=null},renderDisplay:function(){Core.Web.VirtualPosition.redraw(this._mainDiv);Echo.Arc.ComponentSync.prototype.renderDisplay.call(this)},renderUpdate:function(c){if(c.isUpdatedPropertySetIn({text:true})){this._richTextInput.peer._loadData();c.renderContext.displayRequired=[];return}var a=this._mainDiv;var b=a.parentNode;Echo.Render.renderComponentDispose(c,c.parent);b.removeChild(a);this.renderAdd(c,b)},_updateIndicators:function(){var a=this._richTextInput.peer._getCursorStyle();if(this._toolbarButtons.bold){this._toolbarButtons.bold.set("pressed",a.bold)}if(this._toolbarButtons.italic){this._toolbarButtons.italic.set("pressed",a.italic)}if(this._toolbarButtons.underline){this._toolbarButtons.underline.set("pressed",a.underline)}if(this._toolbarButtons.foreground){this._toolbarButtons.foreground.set("color",a.foreground||"#000000")}if(this._toolbarButtons.background){this._toolbarButtons.background.set("color",a.background||"#ffffff")}if(this._styleSelect){this._styleSelect.set("selectedId",a.paragraphStyle)}}});Extras.Sync.RichTextArea.AbstractDialog=Core.extend(Echo.WindowPane,{$static:{TYPE_OK:0,TYPE_OK_CANCEL:1},$construct:function(b,e,d,g){this._richTextArea=b;var c=b.render("controlPaneSplitPaneStyleName");var f=b.render("controlPaneRowStyleName");var h=b.render("controlPaneButtonStyleName");Echo.WindowPane.call(this,{styleName:b.render("windowPaneStyleName"),iconInsets:"6px 10px",contentWidth:"25em",contentHeight:"16em",modal:true,resizable:false,events:{close:Core.method(this,this.processCancel)},children:[new Echo.SplitPane({orientation:Echo.SplitPane.ORIENTATION_VERTICAL_BOTTOM_TOP,autoPositioned:true,styleName:c,style:c?null:Extras.Sync.RichTextArea.DEFAULT_CONTROL_PANE_SPLIT_PANE_STYLE,children:[this.controlsRow=new Echo.Row({styleName:f,style:f?null:Extras.Sync.RichTextArea.DEFAULT_CONTROL_PANE_ROW_STYLE}),g]})]});this.controlsRow.add(new Echo.Button({styleName:h,style:h?null:Extras.Sync.RichTextArea.DEFAULT_CONTROL_PANE_BUTTON_STYLE,text:b.peer._msg["Generic.Ok"],icon:b.peer._icons.ok,events:{action:Core.method(this,this.processOk)}}));if(e==Extras.Sync.RichTextArea.AbstractDialog.TYPE_OK_CANCEL){this.controlsRow.add(new Echo.Button({styleName:h,style:h?null:Extras.Sync.RichTextArea.DEFAULT_CONTROL_PANE_BUTTON_STYLE,text:b.peer._msg["Generic.Cancel"],icon:b.peer._icons.cancel,events:{action:Core.method(this,this.processCancel)}}))}for(var a in d){this.set(a,d[a])}},$virtual:{processCancel:function(a){this.parent.remove(this)},processOk:function(a){this.parent.remove(this)}}});Extras.Sync.RichTextArea.Html={_P_BLOCK_FIND:/<p\b[^>]*>(.*?)<\/p>/ig,_P_STANDALONE_FIND:/<p\/?>/ig,_LEADING_WHITESPACE:/^(\s|<br\/?>|&nbsp;)+/i,_TRAILING_WHITESPACE:/(\s|<br\/?>|&nbsp;)+$/i,_MSIE_INVALID_FONT_COLOR_REPL:/(<font .*?color\=)(#[0-9a-fA-F]{3,6})(.*?>)/ig,_MSIE_INVALID_FONT_BACKGROUND_REPL:/(<font .*?)(background-color)/ig,clean:function(a){a=a.replace(Extras.Sync.RichTextArea.Html._P_BLOCK_FIND,"$1<br/>");a=a.replace(Extras.Sync.RichTextArea.Html._P_STANDALONE_FIND,"<br/>");a=a.replace(Extras.Sync.RichTextArea.Html._LEADING_WHITESPACE,"");a=a.replace(Extras.Sync.RichTextArea.Html._TRAILING_WHITESPACE,"");if(Core.Web.Env.BROWSER_INTERNET_EXPLORER){a=a.replace(Extras.Sync.RichTextArea.Html._MSIE_INVALID_FONT_COLOR_REPL,'$1"$2"$3');a=a.replace(Extras.Sync.RichTextArea.Html._MSIE_INVALID_FONT_BACKGROUND_REPL,"$1background-color")}return a}};Extras.Sync.RichTextArea.ColorDialog=Core.extend(Extras.Sync.RichTextArea.AbstractDialog,{$static:{COLORS:["#fce94f","#edd400","#c4a000","#fcaf3e","#f57900","#e8b86e","#e9b96e","#c17d11","#8f5902","#8ae234","#73d216","#4e9a06","#729fcf","#3465a4","#204a87","#ad7fa8","#75507b","#5c3566","#ef2929","#cc0000","#a40000","#eeeeec","#d3d7cf","#babdb6","#888a85","#555753","#2e3436","#ffffff","#7f7f7f","#000000"]},$construct:function(b,a,c){Extras.Sync.RichTextArea.AbstractDialog.call(this,b,Extras.Sync.RichTextArea.AbstractDialog.TYPE_OK_CANCEL,{title:b.peer._msg[a?"ColorDialog.Title.Background":"ColorDialog.Title.Foreground"],icon:a?b.peer._icons.background:b.peer._icons.foreground,contentWidth:"32em",contentHeight:"22em"},new Echo.Row({cellSpacing:"1em",insets:"1em",children:[new Echo.Column({children:[new Echo.Label({text:b.peer._msg[a?"ColorDialog.PromptBackground":"ColorDialog.PromptForeground"]}),this._colorSelect=new Extras.ColorSelect({color:c,displayValue:true})]}),new Echo.Grid({insets:2,size:3,children:this._createSwatches()})]}))},_createSwatches:function(){var b=[];var d=Extras.Sync.RichTextArea.ColorDialog.COLORS;var c=Core.method(this,function(f){this._colorSelect.set("color",f.actionCommand)});for(var a=0;a<d.length;++a){b.push(new Echo.Button({height:"1em",width:"3em",background:d[a],border:"1px outset "+d[a],actionCommand:d[a],events:{action:c}}))}return b},processOk:function(b){var a=this._colorSelect.get("color");this.parent.remove(this);this.fireEvent({type:"colorSelect",source:this,data:a})}});Extras.Sync.RichTextArea.HyperlinkDialog=Core.extend(Extras.Sync.RichTextArea.AbstractDialog,{$construct:function(a){Extras.Sync.RichTextArea.AbstractDialog.call(this,a,Extras.Sync.RichTextArea.AbstractDialog.TYPE_OK_CANCEL,{title:a.peer._msg["HyperlinkDialog.Title"],icon:a.peer._icons.hyperlink},new Echo.Column({insets:10,children:[new Echo.Label({text:a.peer._msg["HyperlinkDialog.PromptURL"]}),this._urlField=new Echo.TextField({width:"100%"}),new Echo.Label({text:a.peer._msg["HyperlinkDialog.PromptDescription"]}),this._descriptionField=new Echo.TextField({width:"100%"})]}))},processOk:function(b){var a={url:this._urlField.get("text"),description:this._descriptionField.get("text")};if(!a.url){this.parent.add(new Extras.Sync.RichTextArea.MessageDialog(this._richTextArea,this._richTextArea.peer._msg["HyperlinkDialog.ErrorDialogTitle"],this._richTextArea.peer._msg["HyperlinkDialog.ErrorDialog.URL"]));return}this.parent.remove(this);this.fireEvent({type:"insertHyperlink",source:this,data:a})}});Extras.Sync.RichTextArea.ImageDialog=Core.extend(Extras.Sync.RichTextArea.AbstractDialog,{$construct:function(a){Extras.Sync.RichTextArea.AbstractDialog.call(this,a,Extras.Sync.RichTextArea.AbstractDialog.TYPE_OK_CANCEL,{title:a.peer._msg["ImageDialog.Title"],image:a.peer._icons.image},new Echo.Column({insets:10,children:[new Echo.Label({text:a.peer._msg["ImageDialog.PromptURL"]}),this._urlField=new Echo.TextField({width:"100%"})]}))},processOk:function(b){var a={url:this._urlField.get("text")};if(!a.url){this.parent.add(new Extras.Sync.RichTextArea.MessageDialog(this._richTextArea,this._richTextArea.peer._msg["ImageDialog.ErrorDialogTitle"],this._richTextArea.peer._msg["ImageDialog.ErrorDialog.URL"]));return}this.parent.remove(this);this.fireEvent({type:"insertImage",source:this,data:a})}});Extras.Sync.RichTextArea.OverlayPane=Core.extend(Echo.Component,{$load:function(){Echo.ComponentFactory.registerType("Extras.RichTextOverlayPane",this)},_richTextArea:null,componentType:"Extras.RichTextOverlayPane",floatingPane:true,pane:true});Extras.Sync.RichTextArea.OverlayPanePeer=Core.extend(Echo.Render.ComponentSync,{_div:null,$load:function(){Echo.Render.registerPeer("Extras.RichTextOverlayPane",this)},renderAdd:function(b,a){this._div=document.createElement("div");this._div.style.cssText="position:absolute;top:0;right:0;bottom:0;left:0;z-index:32767;";if(this.component.children.length==1){Echo.Render.renderComponentAdd(b,this.component.children[0],this._div)}else{if(this.component.children.length>1){throw new Error("Too many children added to OverlayPane.")}}this.component._richTextArea.peer.client.domainElement.appendChild(this._div)},renderDispose:function(a){if(this._div&&this._div.parentNode){this._div.parentNode.removeChild(this._div)}},renderDisplay:function(a){Core.Web.VirtualPosition.redraw(this._div)},renderUpdate:function(c){var a=this._div;var b=a.parentNode;Echo.Render.renderComponentDispose(c,c.parent);b.removeChild(a);this.renderAdd(c,b);return true}});Extras.Sync.RichTextArea.InputComponent=Core.extend(Echo.Component,{_richTextArea:null,$load:function(){Echo.ComponentFactory.registerType("Extras.RichTextInput",this)},componentType:"Extras.RichTextInput",focusable:true});Extras.Sync.RichTextArea.InputPeer=Core.extend(Echo.Render.ComponentSync,{$load:function(){Echo.Render.registerPeer("Extras.RichTextInput",this)},$static:{_CSS_BOLD:/font-weight\:\s*bold/i,_CSS_FOREGROUND_TEST:/^-?color\:/i,_CSS_FOREGROUND_RGB:/^-?color\:\s*rgb\s*\(\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})/i,_CSS_BACKGROUND_TEST:/background-color\:/i,_CSS_BACKGROUND_RGB:/background-color\:\s*rgb\s*\(\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})/i,_CSS_ITALIC:/font-style\:\s*italic/i,_CSS_UNDERLINE:/text-decoration\:\s*underline/i,_NAVIGATION_KEY_CODES:{38:1,40:1,37:1,39:1,33:1,34:1,36:1,35:1,8:1,46:1}},_cursorStyleUpdateRequired:false,_paneRender:false,_fireAction:false,_renderedHtml:null,_processPropertyRef:null,$construct:function(){this._processPropertyRef=Core.method(this,this._processProperty)},execCommand:function(a,b){this._loadRange();this._iframe.contentWindow.document.execCommand(a,false,b);this._storeData();this._forceIERedraw();this._cursorStyleUpdateRequired=true},focusDocument:function(){this.client.application.setFocusedComponent(this.component);this._forceIERedraw()},_forceIERedraw:function(){if(Core.Web.Env.BROWSER_INTERNET_EXPLORER){if(this._redrawScheduled||this.component._richTextArea.peer.client.domainElement.offsetHeight!==0){return}this._redrawScheduled=true;Core.Web.Scheduler.run(Core.method(this,function(){this._redrawScheduled=false;var a=document.documentElement.style.display;if(!a){a=""}document.documentElement.style.display="none";document.documentElement.style.display=a}))}},_getCursorStyle:function(){var d=this._getSelection();var c={};var a;var e=d.node;while(e){if(e.nodeType==1){switch(e.nodeName.toLowerCase()){case"b":case"strong":c.bold=true;break;case"i":case"em":c.italic=true;break;case"u":c.underline=true;break;case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":case"p":case"pre":if(!c.paragraphStyle){c.paragraphStyle=e.nodeName.toLowerCase()}break}var b=e.style.cssText;c.bold|=Extras.Sync.RichTextArea.InputPeer._CSS_BOLD.test(b);c.italic|=Extras.Sync.RichTextArea.InputPeer._CSS_ITALIC.test(b);c.underline|=Extras.Sync.RichTextArea.InputPeer._CSS_UNDERLINE.test(b);if(!c.foreground&&Extras.Sync.RichTextArea.InputPeer._CSS_FOREGROUND_TEST.test(b)){a=Extras.Sync.RichTextArea.InputPeer._CSS_FOREGROUND_RGB.exec(b);if(a){c.foreground=Echo.Sync.Color.toHex(parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10))}}if(!c.background&&Extras.Sync.RichTextArea.InputPeer._CSS_BACKGROUND_TEST.test(b)){a=Extras.Sync.RichTextArea.InputPeer._CSS_BACKGROUND_RGB.exec(b);if(a){c.background=Echo.Sync.Color.toHex(parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10))}}}e=e.parentNode}return c},_getSelection:function(){if(Core.Web.Env.BROWSER_INTERNET_EXPLORER){var b=this._iframe.contentWindow.document.selection.createRange();return{node:b.parentElement()}}else{var a=this._iframe.contentWindow.getSelection();return{node:a?a.anchorNode:null}}},_insertHtml:function(a){if(Core.Web.Env.BROWSER_INTERNET_EXPLORER){if(!this._selectionRange){this._selectionRange=this._iframe.contentWindow.document.body.createTextRange()}this._selectionRange.select();this._selectionRange.pasteHTML(a);this._notifyCursorStyleChange();this._storeData()}else{this.execCommand("inserthtml",a)}this.focusDocument();this._forceIERedraw()},_loadData:function(){var b=this.component._richTextArea.get("text");if(b==null){b=(Core.Web.Env.BROWSER_MOZILLA||Core.Web.Env.BROWSER_OPERA)?"<br/>":""}if(b==this._renderedHtml){return}var a=this._iframe.contentWindow.document;a.body.innerHTML=b;this._renderedHtml=b;this.renderFocus();this.component._richTextArea.peer._updateIndicators()},_loadRange:function(){if(Core.Web.Env.BROWSER_INTERNET_EXPLORER){if(this._selectionRange){this._selectionRange.select()}}},_notifyCursorStyleChange:function(){this._cursorStyleUpdateRequired=false;Core.Web.Scheduler.run(Core.method(this,function(){this.component._richTextArea.peer._updateIndicators()}))},_processProperty:function(a){if(a.propertyName=="text"){this._loadData()}},_processKeyPress:function(a){if(!this.client||!this.client.verifyInput(this.component)){Core.Web.DOM.preventEventDefault(a);return}if(a.keyCode==13){this._fireAction=true}},_processKeyUp:function(a){if(!this.client||!this.client.verifyInput(this.component)){Core.Web.DOM.preventEventDefault(a);return}this.component._richTextArea.peer._markFocused();this._storeData();this._storeRange();if(this._cursorStyleUpdateRequired||Extras.Sync.RichTextArea.InputPeer._NAVIGATION_KEY_CODES[a.keyCode]){this._notifyCursorStyleChange()}if(this._fireAction){this._fireAction=false;this.component._richTextArea.doAction()}},_processMouseDown:function(a){if(!this.client||!this.client.verifyInput(this.component)){Core.Web.DOM.preventEventDefault(a);return}},_processMouseUp:function(a){if(!this.client||!this.client.verifyInput(this.component)){Core.Web.DOM.preventEventDefault(a);return}this._storeRange();this._notifyCursorStyleChange()},renderAdd:function(b,a){this.component._richTextArea.addListener("property",this._processPropertyRef);this._mainDiv=document.createElement("div");Echo.Sync.Border.render(this.component._richTextArea.render("border",Extras.RichTextArea.DEFAULT_BORDER),this._mainDiv);this._iframe=document.createElement("iframe");this._iframe.style.width=this.width?this.width:"100%";this._paneRender=this.component._richTextArea.peer._paneRender;if(!this._paneRender){this._iframe.style.height=this.height?this.height:"200px"}this._iframe.style.border="0px none";this._iframe.frameBorder="0";this._mainDiv.appendChild(this._iframe);a.appendChild(this._mainDiv)},_renderContentDocument:function(){var g=this._iframe;while(g!=document.body){if(g==null){return}if(g.style.display=="none"){return}g=g.parentNode}var a="height:100%;width:100%;margin:0px;padding:0px;";var h=this.component._richTextArea.render("foreground");if(h){a+="color:"+h+";"}var b=this.component._richTextArea.render("background");if(b){a+="background-color:"+b+";"}var i=this.component._richTextArea.render("backgroundImage");if(i){a+="background-attachment: fixed;";a+="background-image:url("+Echo.Sync.FillImage.getUrl(i)+");";var f=Echo.Sync.FillImage.getRepeat(i);if(f){a+="background-repeat:"+f+";"}var d=Echo.Sync.FillImage.getPosition(i);if(d){a+="background-position:"+d+";"}}var j=this.component._richTextArea.get("text");var c=this._iframe.contentWindow.document;c.open();c.write('<html><body tabindex="0" width="100%" height="100%"'+(a?(' style="'+a+'"'):"")+">"+(j==null?"":j)+"</body></html>");c.close();if(Core.Web.Env.BROWSER_MOZILLA&&!Core.Web.Env.BROWSER_FIREFOX){var e=function(){c.designMode="on"};setTimeout(e,0)}else{c.designMode="on"}Core.Web.Event.add(this._iframe.contentWindow.document,"keypress",Core.method(this,this._processKeyPress),false);Core.Web.Event.add(this._iframe.contentWindow.document,"keyup",Core.method(this,this._processKeyUp),false);Core.Web.Event.add(this._iframe.contentWindow.document,"mousedown",Core.method(this,this._processMouseDown),false);Core.Web.Event.add(this._iframe.contentWindow.document,"mouseup",Core.method(this,this._processMouseUp),false);this._contentDocumentRendered=true},renderDispose:function(a){this.component._richTextArea.removeListener("property",this._processPropertyRef);Core.Web.Event.removeAll(this._iframe.contentWindow.document);this._mainDiv=null;this._iframe=null;this._contentDocumentRendered=false;this._selectionRange=null},renderDisplay:function(){if(!this._contentDocumentRendered){this._renderContentDocument()}var d=new Core.Web.Measure.Bounds(this._mainDiv.parentNode);if(d.height){var a=this.component._richTextArea.render("border",Extras.RichTextArea.DEFAULT_BORDER);var b=Echo.Sync.Border.getPixelSize(a,"top")+Echo.Sync.Border.getPixelSize(a,"bottom");var c=(d.height<100?100:d.height-b)+"px";if(this._iframe.style.height!=c){this._iframe.style.height=c}}},renderFocus:function(){if(Core.Web.Env.BROWSER_SAFARI){window.focus()}Core.Web.DOM.focusElement(this._iframe.contentWindow);this._forceIERedraw()},renderUpdate:function(a){},_storeData:function(){var a=this._iframe.contentWindow.document;var b=a.body.innerHTML;var c=Extras.Sync.RichTextArea.Html.clean(b);this._renderedHtml=c;this.component._richTextArea.set("text",c)},_storeRange:function(){if(Core.Web.Env.BROWSER_INTERNET_EXPLORER){this._selectionRange=this._iframe.contentWindow.document.selection.createRange()}}});Extras.Sync.RichTextArea.MessageDialog=Core.extend(Extras.Sync.RichTextArea.AbstractDialog,{$construct:function(a,c,b){Extras.Sync.RichTextArea.AbstractDialog.call(this,a,Extras.Sync.RichTextArea.AbstractDialog.TYPE_OK,{title:c},new Echo.Label({text:b,layoutData:{insets:30}}))}});Extras.Sync.RichTextArea.TableDialog=Core.extend(Extras.Sync.RichTextArea.AbstractDialog,{$construct:function(a){Extras.Sync.RichTextArea.AbstractDialog.call(this,a,Extras.Sync.RichTextArea.AbstractDialog.TYPE_OK_CANCEL,{title:a.peer._msg["TableDialog.Title"],icon:a.peer._icons.table},new Echo.Grid({insets:10,children:[new Echo.Label({text:a.peer._msg["TableDialog.PromptRows"],layoutData:{alignment:"trailing"}}),this._rowsField=new Echo.TextField({text:"2",width:100}),new Echo.Label({text:a.peer._msg["TableDialog.PromptColumns"],layoutData:{alignment:"trailing"}}),this._columnsField=new Echo.TextField({text:"3",width:100})]}))},processOk:function(b){var a={rows:parseInt(this._rowsField.get("text"),10),columns:parseInt(this._columnsField.get("text"),10)};if(isNaN(a.rows)||a.rows<1||a.rows>50){this.parent.add(new Extras.Sync.RichTextArea.MessageDialog(this._richTextArea,this._richTextArea.peer._msg["TableDialog.ErrorDialogTitle"],this._richTextArea.peer._msg["TableDialog.ErrorDialog.Rows"]));return}if(isNaN(a.columns)||a.columns<1||a.columns>50){this.parent.add(new Extras.Sync.RichTextArea.MessageDialog(this._richTextArea,this._richTextArea.peer._msg["TableDialog.ErrorDialogTitle"],this._richTextArea.peer._msg["TableDialog.ErrorDialog.Columns"]));return}this.parent.remove(this);this.fireEvent({type:"tableInsert",source:this,data:a})}});Extras.Sync.RichTextArea.ToolbarButton=Core.extend(Echo.Button,{$load:function(){Echo.ComponentFactory.registerType("Extras.RichTextToolbarButton",this)},componentType:"Extras.RichTextToolbarButton",doAction:function(){if(this.render("toggle")){this.set("pressed",!this.get("pressed"))}this.fireEvent({source:this,type:"action",actionCommand:this.render("actionCommand")})}});Extras.Sync.RichTextArea.ToolbarButtonPeer=Core.extend(Echo.Render.ComponentSync,{$load:function(){Echo.Render.registerPeer("Extras.RichTextToolbarButton",this)},_div:null,_processClick:function(a){if(!this.client||!this.client.verifyInput(this.component)){return true}this.client.application.setFocusedComponent(this.component);this.component.doAction()},_processRolloverEnter:function(a){if(!this.client||!this.client.verifyInput(this.component)){return true}this._renderButtonState(true)},_processRolloverExit:function(a){this._renderButtonState(false)},renderAdd:function(d,a){var b=this.component.render("icon");this._div=document.createElement("div");this._div.style.cssText="position:relative;";this._renderButtonState(false);if(this.component.render("color")){this._renderColor()}Echo.Sync.Insets.render(this.component.render("insets"),this._div,"padding");if(b){var c=document.createElement("img");Echo.Sync.ImageReference.renderImg(b,c);this._div.appendChild(c)}Core.Web.Event.add(this._div,"click",Core.method(this,this._processClick),false);Core.Web.Event.add(this._div,"mouseover",Core.method(this,this._processRolloverEnter),false);Core.Web.Event.add(this._div,"mouseout",Core.method(this,this._processRolloverExit),false);a.appendChild(this._div)},_renderButtonState:function(a){var d=this.component.render("foreground");var c=this.component.render("background");var b=this.component.render("border");var e=this.component.render("backgroundImage");if(this.component.render("pressed")){d=this.component.render("pressedForeground",d);c=this.component.render("presssedBackground",c);b=this.component.render("pressedBorder",b);e=this.component.render("pressedBackgroundImage",e)}if(a){d=this.component.render("rolloverForeground",d);c=this.component.render("rolloverBackground",c);e=this.component.render("rolloverBackgroundImage",e)}Echo.Sync.Color.renderClear(d,this._div,"color");Echo.Sync.Color.renderClear(c,this._div,"backgroundColor");Echo.Sync.Border.renderClear(b,this._div);Echo.Sync.FillImage.renderClear(e,this._div)},_renderColor:function(){var a=this.component.render("color");if(!this._colorDiv){this._colorDiv=document.createElement("div");this._colorDiv.style.cssText="position:absolute;bottom:0;left:0;right:0;height:5px;line-height:0px;font-size:1px;";if(Core.Web.Env.BROWSER_INTERNET_EXPLORER&&Core.Web.Env.BROWSER_VERSION_MAJOR===6){this._colorDiv.style.width="16px"}this._colorDiv.style.backgroundColor=a||"#ffffff";this._div.appendChild(this._colorDiv)}},renderDispose:function(a){Core.Web.Event.removeAll(this._div);this._div=null;this._colorDiv=null},renderUpdate:function(c){var a=this._div;var b=a.parentNode;Echo.Render.renderComponentDispose(c,c.parent);b.removeChild(a);this.renderAdd(c,b);return true}});Extras.ToolTipContainer=Core.extend(Echo.Component,{$load:function(){Echo.ComponentFactory.registerType("Extras.ToolTipContainer",this)},componentType:"Extras.ToolTipContainer"});Extras.Sync.ToolTipContainer=Core.extend(Echo.Render.ComponentSync,{$load:function(){Echo.Render.registerPeer("Extras.ToolTipContainer",this)},$construct:function(){this._div=null;this._applyDiv=null;this._toolTipDiv=null},renderAdd:function(c,a){this._div=document.createElement("div");this._div.id=this.component.renderId;var b=this.component.getComponentCount();if(b>0){this._applyDiv=this._createApplyTo(c);this._div.appendChild(this._applyDiv)}if(b>1){this._toolTipDiv=this._createToolTip(c)}a.appendChild(this._div)},renderUpdate:function(c){var a=this._div;var b=a.parentNode;Echo.Render.renderComponentDispose(c,c.parent);b.removeChild(a);this.renderAdd(c,b);return true},renderDispose:function(a){this._div=null;if(this._applyDiv){Core.Web.Event.removeAll(this._applyDiv);this._applyDiv=null}if(this._toolTipDiv&&this._toolTipDiv.parentNode===document.body){document.body.removeChild(this._toolTipDiv);this._toolTipDiv=null}},_createToolTip:function(c){var b=document.createElement("div");b.style.zIndex=32767;b.style.position="absolute";var a=this.component.render("width");if(a){b.style.width=Echo.Sync.Extent.toCssValue(a)}Echo.Render.renderComponentAdd(c,this.component.getComponent(1),b);return b},_createApplyTo:function(c){var a=this.component.getComponent(0);var b=document.createElement("div");b.style.cursor="default";Echo.Render.renderComponentAdd(c,a,b);if(this.component.getComponentCount()>1){Core.Web.Event.add(b,Core.Web.Env.PROPRIETARY_EVENT_MOUSE_ENTER_LEAVE_SUPPORTED?"mouseenter":"mouseover",Core.method(this,this._processRolloverEnter),true);Core.Web.Event.add(b,Core.Web.Env.PROPRIETARY_EVENT_MOUSE_ENTER_LEAVE_SUPPORTED?"mouseleave":"mouseout",Core.method(this,this._processRolloverExit),true);Core.Web.Event.add(b,"mousemove",Core.method(this,this._processMove),true)}return b},_positionToolTip:function(h){var b=(h.pageX||(h.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)));var a=(h.pageY||(h.clientY+(document.documentElement.scrollTop||document.body.scrollTop)));var f=new Core.Web.Measure.Bounds(document.body);var c=new Core.Web.Measure.Bounds(this._toolTipDiv);var g=b+10;var d=a+10;if(d+c.height>f.height){d=f.height-c.height;if(d<0){d=0}}if(a<d&&(g+c.width>f.width)){g=f.width-c.width;if(g<0){g=0}}this._toolTipDiv.style.left=g+"px";this._toolTipDiv.style.top=d+"px"},_processMove:function(a){if(!this.client||!this.client.verifyInput(this.component)||Core.Web.dragInProgress){return}this._positionToolTip(a);return true},_processRolloverEnter:function(a){if(!this.client||!this.client.verifyInput(this.component)||Core.Web.dragInProgress){return}if(this._toolTipDiv.parentNode!==document.body){document.body.appendChild(this._toolTipDiv);this._positionToolTip(a)}return true},_processRolloverExit:function(a){if(!this.client||!this.client.verifyInput(this.component)){return}if(this._toolTipDiv.parentNode===document.body){document.body.removeChild(this._toolTipDiv)}return true}});echopoint={uniqueId:20080623};echopoint.internal={uniqueId:20080627};echopoint.constants={uniqueId:20080624};echopoint.model={uniqueId:20080720,isUndefined:function(a){return typeof a=="undefined"},Date:Core.extend(Date,{$static:{ONE_DAY:24*60*60*1000,ONE_WEEK:7*this.ONE_DAY,DEFAULT_MINIMAL_DAYS_IN_FIRST_WEEK:1,newDateAtMidnight:function(b,c,a){var e=new Date(b,c,a,0,0,0);e.setMilliseconds(0);return new echopoint.model.Date(e)}},$construct:function(e,f,b,a,g,c,d){Date.call(e,f,b,a,g,c,d)},getDifference:function(a){return this.getTime()-a.getTime()},isBefore:function(a){return this.getTime()<a.getTime()},getUTCTime:function(){return Date.UTC(this.getFullYear(),this.getMonth(),this.getDate(),this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())},getTimeSince:function(a){return this.getUTCTime()-a.getUTCTime()},getPreviousSunday:function(){var b=new echopoint.model.Date(this.getFullYear(),this.getMonth(),this.getDate(),12,0,0);var a=new echopoint.model.Date(b.getTime()-this.getDay()*echopoint.model.Date.ONE_DAY);return echopoint.model.Date.newDateAtMidnight(a.getFullYear(),a.getMonth(),a.getDate())},getWeekInYear:function(f){if(echopoint.model.isUndefined(this.minimalDaysInFirstWeek)){f=echopoint.model.Date.DEFAULT_MINIMAL_DAYS_IN_FIRST_WEEK}var d=this.getPreviousSunday();var b=echopoint.model.Date.newDateAtMidnight(this.getFullYear(),0,1);var e=d.isBefore(b)?0:1+Math.floor(d.getTimeSince(b)/echopoint.model.Date.ONE_WEEK);var a=7-b.getDay();var c=e;if(a<f){c--}return c},getWeekInMonth:function(f){if(echopoint.model.isUndefined(this.minimalDaysInFirstWeek)){f=echopoint.model.Date.DEFAULT_MINIMAL_DAYS_IN_FIRST_WEEK}var b=this.getPreviousSunday();var e=echopoint.model.Date.newDateAtMidnight(this.getFullYear(),this.getMonth(),1);var d=b.isBefore(e)?0:1+Math.floor((b.getTimeSince(e))/echopoint.model.Date.ONE_WEEK);var a=7-e.getDay();var c=d;if(a>=f){c++}return c},getDayInYear:function(){var a=echopoint.model.Date.newDateAtMidnight(this.getFullYear(),0,1);return 1+Math.floor(this.getTimeSince(a)/echopoint.model.Date.ONE_DAY)}}),SimpleDateFormat:Core.extend({$static:{monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],TEXT2:0,TEXT3:1,NUMBER:2,YEAR:3,MONTH:4,TIMEZONE:5,types:{G:this.TEXT2,y:this.YEAR,M:this.MONTH,w:this.NUMBER,W:this.NUMBER,D:this.NUMBER,d:this.NUMBER,F:this.NUMBER,E:this.TEXT3,a:this.TEXT2,H:this.NUMBER,k:this.NUMBER,K:this.NUMBER,h:this.NUMBER,m:this.NUMBER,s:this.NUMBER,S:this.NUMBER,Z:this.TIMEZONE}},formatString:null,regex:/('[^']*')|(G+|y+|M+|w+|W+|D+|d+|F+|E+|a+|H+|k+|K+|h+|m+|s+|S+|Z+)|([a-zA-Z]+)|([^a-zA-Z']+)/,minimalDaysInFirstWeek:Date.DEFAULT_MINIMAL_DAYS_IN_FIRST_WEEK,$construct:function(a){this.formatString=a},setMinimalDaysInFirstWeek:function(a){this.minimalDaysInFirstWeek=a},getMinimalDaysInFirstWeek:function(){return echopoint.model.isUndefined(this.minimalDaysInFirstWeek)?echopoint.model.Date.DEFAULT_MINIMAL_DAYS_IN_FIRST_WEEK:this.minimalDaysInFirstWeek},format:function(m){var t=new echopoint.model.Date(m.getFullYear(),m.getMonth(),m.getDay(),m.getHours(),m.getMinutes(),m.getSeconds(),m.getMilliseconds());var a="";var k;var e=function(w,v){while(w.length<v){w="0"+w}return w};var c=function(x,w,v){return(w>=4)?x:x.substr(0,Math.max(v,w))};var i=function(x,w){var v=""+x;return e(v,w)};var h=this.formatString;while((k=this.regex.exec(h))){var j=k[1];var l=k[2];var g=k[3];var f=k[4];if(j){if(j=="''"){a+="'"}else{a+=j.substring(1,j.length-1)}}else{if(g){}else{if(f){a+=f}else{if(l){var b=l.charAt(0);var u=l.length;var n="";switch(b){case"G":n="AD";break;case"y":n=t.getFullYear();break;case"M":n=t.getMonth();break;case"w":n=t.getWeekInYear(this.getMinimalDaysInFirstWeek());break;case"W":n=t.getWeekInMonth(this.getMinimalDaysInFirstWeek());break;case"D":n=t.getDayInYear();break;case"d":n=t.getDate();break;case"F":n=1+Math.floor((t.getDate()-1)/7);break;case"E":n=echopoint.model.SimpleDateFormat.dayNames[t.getDay()];break;case"a":n=(t.getHours()>=12)?"PM":"AM";break;case"H":n=t.getHours();break;case"k":n=t.getHours()||24;break;case"K":n=t.getHours()%12;break;case"h":n=(t.getHours()%12)||12;break;case"m":n=t.getMinutes();break;case"s":n=t.getSeconds();break;case"S":n=t.getMilliseconds();break;case"Z":n=t.getTimezoneOffset();break}switch(echopoint.model.SimpleDateFormat.types[b]){case echopoint.model.SimpleDateFormat.TEXT2:a+=c(n,u,2);break;case echopoint.model.SimpleDateFormat.TEXT3:a+=c(n,u,3);break;case echopoint.model.SimpleDateFormat.NUMBER:a+=i(n,u);break;case echopoint.model.SimpleDateFormat.YEAR:if(u<=3){var d=""+n;a+=d.substr(2,2)}else{a+=i(n,u)}break;case echopoint.model.SimpleDateFormat.MONTH:if(u>=3){a+=c(echopoint.model.SimpleDateFormat.monthNames[n],u,u)}else{a+=i(n+1,u)}break;case echopoint.model.SimpleDateFormat.TIMEZONE:var s=(n>0);var p=s?"-":"+";var r=Math.abs(n);var q=""+Math.floor(r/60);q=e(q,2);var o=""+(r%60);o=e(o,2);a+=p+q+o;break}}}}}h=h.substr(k.index+k[0].length)}return a}})};echopoint.google={uniqueId:20080808};echopoint.google.chart={uniqueId:20080829};echopoint.google.chart.internal={uniqueId:200808091};echopoint.google.chart.model={uniqueId:200808092};echopoint.tucana={uniqueId:20081030};echopoint.constants.ABSTRACT_CONTAINER="echopoint.internal.AbstractContainer";echopoint.internal.AbstractContainer=Core.extend(Echo.Component,{$abstract:true,$static:{ALIGNMENT:"alignment",BACKGROUND_IMAGE:"backgroundImage",BACKGROUND:"background",BORDER:"border",FONT:"font",FOREGROUND:"foreground",INSETS:"insets",HEIGHT:"height",LAYOUT_DATA:"layoutData",WIDTH:"width"},$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.ABSTRACT_CONTAINER,this)}});echopoint.internal.AbstractContainerSync=Core.extend(Echo.Render.ComponentSync,{$abstract:true,$static:{DEFAULT_WIDTH:"100%",DEFAULT_HEIGHT:"100%"},$load:function(){Echo.Render.registerPeer(echopoint.constants.ABSTRACT_CONTAINER,this)},$virtual:{getDefaultWidth:function(){return echopoint.internal.AbstractContainerSync.DEFAULT_WIDTH},getWidth:function(){var a=this.component.render(echopoint.internal.AbstractContainer.WIDTH);return((a)?a:this.getDefaultWidth())},getDefaultHeight:function(){return echopoint.internal.AbstractContainerSync.DEFAULT_HEIGHT},getHeight:function(){var a=this.component.render(echopoint.internal.AbstractContainer.HEIGHT);return((a)?a:this.getDefaultHeight())},renderStyle:function(a,b){this.renderAlignment(a,b);this.renderBorder(a,b);this.renderFB(a,b);this.renderFont(a,b);this.renderBackgroundImage(a,b);this.renderInsets(a,b);this.renderWidth(a,b);this.renderHeight(a,b)},renderAlignment:function(a,c){if(c){var b=c.getUpdatedProperty(echopoint.internal.AbstractContainer.ALIGNMENT);if(b){Echo.Sync.Alignment.render(b.newValue,a,false,null)}}else{Echo.Sync.Alignment.render(this.component.render(echopoint.internal.AbstractContainer.ALIGNMENT),a,false,null)}},renderBackgroundImage:function(a,c){if(c){var b=c.getUpdatedProperty(echopoint.internal.AbstractContainer.BACKGROUND_IMAGE);if(b){Echo.Sync.FillImage.render(b.newValue,a)}}else{Echo.Sync.FillImage.render(this.component.render(echopoint.internal.AbstractContainer.BACKGROUND_IMAGE),a)}},renderBorder:function(a,c){if(c){var b=c.getUpdatedProperty(echopoint.internal.AbstractContainer.BORDER);if(b){Echo.Sync.Border.render(b.newValue,a)}}else{Echo.Sync.Border.render(this.component.render(echopoint.internal.AbstractContainer.BORDER),a)}},renderFB:function(a,d){if(d){var c=d.getUpdatedProperty(echopoint.internal.AbstractContainer.FOREGROUND);var b=d.getUpdatedProperty(echopoint.internal.AbstractContainer.BACKGROUND);if(c||b){Echo.Sync.Color.renderFB(this.component,a)}}else{Echo.Sync.Color.renderFB(this.component,a)}},renderFont:function(a,c){if(c){var b=c.getUpdatedProperty(echopoint.internal.AbstractContainer.FONT);if(b){Echo.Sync.Font.render(b.newValue,a)}}else{Echo.Sync.Font.render(this.component.render(echopoint.internal.AbstractContainer.FONT),a)}},renderInsets:function(a,c){if(c){var b=c.getUpdatedProperty(echopoint.internal.AbstractContainer.INSETS);if(b){Echo.Sync.Insets.render(b.newValue,a,"padding")}}else{Echo.Sync.Insets.render(this.component.render(echopoint.internal.AbstractContainer.INSETS),a,"padding")}},renderWidth:function(a,c){if(c){var b=c.getUpdatedProperty(echopoint.internal.AbstractContainer.WIDTH);if(b){a.style.width=Echo.Sync.Extent.toCssValue(b.newValue,true,true)}}else{a.style.width=Echo.Sync.Extent.toCssValue(this.getWidth(),true,true)}},renderHeight:function(a,c){if(c){var b=c.getUpdatedProperty(echopoint.internal.AbstractContainer.HEIGHT);if(b){a.style.height=Echo.Sync.Extent.toCssValue(b.newValue,false,true)}}else{a.style.height=Echo.Sync.Extent.toCssValue(this.getHeight(),false,true)}},renderLayoutData:function(a,b){if(b){Echo.Sync.Alignment.render(b.alignment,a,true,this.component);Echo.Sync.FillImage.render(b.backgroundImage,a);Echo.Sync.Insets.render(b.insets,a,"padding");Echo.Sync.Color.render(b.background,a,"backgroundColor")}}}});echopoint.constants.ABSTRACT_HTML_COMPONENT="echopoint.internal.AbstractHtmlComponent";echopoint.constants.DIRECT_HTML="echopoint.DirectHtml";echopoint.constants.HTML_LABEL="echopoint.HtmlLabel";echopoint.constants.HTML_LAYOUT="echopoint.HtmlLayout";echopoint.internal.AbstractHtmlComponent=Core.extend(echopoint.internal.AbstractContainer,{$abstract:true,$static:{TEXT:"text"},$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.ABSTRACT_HTML_COMPONENT,this)}});echopoint.DirectHtml=Core.extend(echopoint.internal.AbstractHtmlComponent,{$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.DIRECT_HTML,this)},componentType:echopoint.constants.DIRECT_HTML});echopoint.HtmlLabel=Core.extend(echopoint.internal.AbstractHtmlComponent,{$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.HTML_LABEL,this)},componentType:echopoint.constants.HTML_LABEL});echopoint.HtmlLayout=Core.extend(echopoint.internal.AbstractHtmlComponent,{$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.HTML_LAYOUT,this);Echo.ComponentFactory.registerType("HL",this)},componentType:echopoint.constants.HTML_LAYOUT});echopoint.internal.AbstractHtmlComponentSync=Core.extend(echopoint.internal.AbstractContainerSync,{$abstract:true,$load:function(){Echo.Render.registerPeer(echopoint.constants.ABSTRACT_HTML_COMPONENT,this)},$virtual:{containerType:null},_container:null,renderAdd:function(b,a){this._container=document.createElement(this.containerType);this._container.id=this.component.renderId;this.renderStyle(this._container);this._renderStyle();this._container.innerHTML=this.component.render(echopoint.internal.AbstractHtmlComponent.TEXT,"");this._processLinks();a.appendChild(this._container)},renderDispose:function(){this._container=null;this.containerType=null},renderUpdate:function(b){this.renderStyle(this._container,b);var a=b.getUpdatedProperty(echopoint.internal.AbstractHtmlComponent.TEXT);if(a){this._container.innerHTML=a.newValue;this._processLinks()}},_renderStyle:function(){this._container.style.overflow="auto"},_processLinks:function(){var f=this.component.get("target");if(f){try{var d=this._container.getElementsByTagName("a");for(var b=0;b<d.length;++b){var e=d[b].attributes.getNamedItem("target");if(!e){d[b].setAttribute("target",f)}}}catch(a){this._container.innerHTML=this.component.render(echopoint.internal.AbstractHtmlComponent.TEXT,"");var c="XML parsing error for html content: "+this.component.get(echopoint.internal.AbstractHtmlComponent.TEXT)+Core.Debug.toString(a);Core.Debug.consoleWrite(c)}}}});echopoint.constants.ANCHOR="echopoint.Anchor";echopoint.Anchor=Core.extend(Echo.Component,{$static:{BACKGROUND:"background",FONT:"font",FOREGROUND:"foreground",TARGET:"target",TEXT:"text",TOOL_TIP_TEXT:"toolTipText",URI:"uri"},$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.ANCHOR,this)},componentType:echopoint.constants.ANCHOR});echopoint.AnchorSync=Core.extend(Echo.Render.ComponentSync,{$load:function(){Echo.Render.registerPeer(echopoint.constants.ANCHOR,this)},_anchor:null,renderAdd:function(b,a){a.appendChild(this._createAnchor())},renderDispose:function(a){this._anchor=null},renderUpdate:function(b){var a=this._anchor.parentNode;Echo.Render.renderComponentDispose(b,b.parent);a.removeChild(this._anchor);this.renderAdd(b,a);return false},_createAnchor:function(){this._anchor=document.createElement("a");this._anchor.id=this.component.renderId;this._anchor.href=this._getUri();this._anchor.appendChild(document.createTextNode(this.component.render(echopoint.Anchor.TEXT)));this._anchor.style.cssText=this._renderStyle();this._renderTarget();this._renderToolTip();return this._anchor},_renderStyle:function(){var a=this._addForeground(echopoint.Anchor.FOREGROUND);a+=this._addBackground(echopoint.Anchor.BACKGROUND);a+=this._addFont(echopoint.Anchor.FONT);return a},_addForeground:function(b){var a=this.component.render(b);return(a)?" color: "+a+";":""},_addBackground:function(b){var a=this.component.render(b);return(a)?" background: "+a+";":""},_addFont:function(c){var a=this.component.render(c);if(!a){return""}var b="";if(a.typeface){b+=" font-family: "+(a.typeface instanceof Array)?a.typeface.join(","):a.typeface;b+=";"}if(a.size){b+=" font-size: "+Echo.Sync.Extent.toCssValue(a.size)+";"}if(a.bold){b+=" font-weight: bold;"}if(a.italic){b+=" font-style: italic;"}if(a.underline){b+=" text-decoration: underline;"}else{if(a.overline){b+=" text-decoration: overline;"}else{if(a.lineThrough){b+=" text-decoration: line-through;"}else{b+=" text-decoration: none;"}}}return b},_renderTarget:function(){var a=this.component.render(echopoint.Anchor.TARGET);if(a){this._anchor.target=a}},_renderToolTip:function(){var a=this.component.render(echopoint.Anchor.TOOL_TIP_TEXT);if(a){this._anchor.title=a}},_getUri:function(){return this.component.render(echopoint.Anchor.URI,"#")}});echopoint.constants.BORDER_LAYOUT="echopoint.BorderLayout";echopoint.BorderLayout=Core.extend(echopoint.internal.AbstractContainer,{$static:{NORTH:"north",WEST:"west",CENTER:"center",EAST:"east",SOUTH:"south"},$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.BORDER_LAYOUT,this)},$construct:function(){echopoint.internal.AbstractContainer.call(this);this._regionToIndex=new Array();this._indexToRegion=new Array()},componentType:echopoint.constants.BORDER_LAYOUT,_regionToIndex:null,_indexToRegion:null,addToRegion:function(c,b){if(this._regionToIndex[b]){throw"Attempt to add additional child to area: "+b}if(!b){b=echopoint.BorderLayout.CENTER}var a=this.getComponentCount();this.add(c);this._regionToIndex[b]=a;this._indexToRegion[a]=b},getChildAtRegion:function(a){return this.getComponent(this._regionToIndex[a])},getRegionForIndex:function(a){return this._indexToRegion[a]},setRegionToIndex:function(json){this._regionToIndex=new Array();var data=eval("("+json+")");for(var i=0;i<data.map.length;++i){var entry=data.map[i];this._regionToIndex[entry[0]]=entry[1]}},setIndexToRegion:function(json){this._indexToRegion=new Array();var data=eval("("+json+")");for(var i=0;i<data.map.length;++i){var entry=data.map[i];this._indexToRegion[entry[0]]=entry[1]}}});echopoint.BorderLayoutSync=Core.extend(echopoint.internal.AbstractContainerSync,{$static:{REGION_TO_INDEX:"regionToIndex",INDEX_TO_REGION:"indexToRegion"},$load:function(){Echo.Render.registerPeer(echopoint.constants.BORDER_LAYOUT,this)},container:null,north:null,west:null,centre:null,right:null,bottom:null,renderAdd:function(f,a){this._createContainers();a.appendChild(this.container);this._setMaps();var b=this.component.getComponentCount();if(b>5){throw"Too many children added to BorderLayout"}for(var c=0;c<b;++c){var d=this.component.getRegionForIndex(c);var e=this.component.getComponent(c);switch(d){case echopoint.BorderLayout.NORTH:Echo.Render.renderComponentAdd(f,e,this.north);this.renderLayoutData(this.north,e.render(echopoint.internal.AbstractContainer.LAYOUT_DATA));break;case echopoint.BorderLayout.WEST:Echo.Render.renderComponentAdd(f,e,this.west);this.renderLayoutData(this.west,e.render(echopoint.internal.AbstractContainer.LAYOUT_DATA));break;case echopoint.BorderLayout.CENTER:Echo.Render.renderComponentAdd(f,e,this.centre);this.renderLayoutData(this.centre,e.render(echopoint.internal.AbstractContainer.LAYOUT_DATA));break;case echopoint.BorderLayout.EAST:Echo.Render.renderComponentAdd(f,e,this.east);this.renderLayoutData(this.east,e.render(echopoint.internal.AbstractContainer.LAYOUT_DATA));break;case echopoint.BorderLayout.SOUTH:Echo.Render.renderComponentAdd(f,e,this.south);this.renderLayoutData(this.south,e.render(echopoint.internal.AbstractContainer.LAYOUT_DATA));break}}},renderDispose:function(a){this.north=null;this.west=null;this.centre=null;this.right=null;this.bottom=null;this.container=null},renderUpdate:function(b){var a=this.container.parent;Echo.Render.renderComponentDispose(b,b.parent);a.removeChild(this.container);this.renderAdd(b,a)},_setMaps:function(){var a=this.component.get(echopoint.BorderLayoutSync.REGION_TO_INDEX);if(a){this.component.setRegionToIndex(a)}var b=this.component.get(echopoint.BorderLayoutSync.INDEX_TO_REGION);if(b){this.component.setIndexToRegion(b)}},_createContainers:function(){this.container=document.createElement("table");this.container.id=this.component.renderId;this.container.style.emptyCells="hide";this.renderStyle(this.container);this._createNorth();var a=document.createElement("tr");this._createWest(a);this._createCenter(a);this._createEast(a);this.container.appendChild(a);this._createSouth()},_createNorth:function(){var a=document.createElement("tr");this.north=document.createElement("td");this.north.id=this.component.renderId+"|North";this.north.colSpan=3;a.appendChild(this.north);this.container.appendChild(a)},_createWest:function(a){this.west=document.createElement("td");this.west.id=this.component.renderId+"|West";a.appendChild(this.west)},_createCenter:function(a){this.centre=document.createElement("td");this.centre.id=this.component.renderId+"|Centre";this.centre.style.width="100%";a.appendChild(this.centre)},_createEast:function(a){this.east=document.createElement("td");this.east.id=this.component.renderId+"|East";a.appendChild(this.east)},_createSouth:function(){var a=document.createElement("tr");this.south=document.createElement("td");this.south.id=this.component.renderId+"|South";this.south.colSpan=3;a.appendChild(this.south);this.container.appendChild(a)}});echopoint.DirectHtmlSync=Core.extend(echopoint.internal.AbstractHtmlComponentSync,{$load:function(){Echo.Render.registerPeer(echopoint.constants.DIRECT_HTML,this)},containerType:"div"});echopoint.HtmlLabelSync=Core.extend(echopoint.internal.AbstractHtmlComponentSync,{$load:function(){Echo.Render.registerPeer(echopoint.constants.HTML_LABEL,this)},containerType:"span"});echopoint.HtmlLayoutSync=Core.extend(echopoint.internal.AbstractHtmlComponentSync,{$load:function(){Echo.Render.registerPeer(echopoint.constants.HTML_LAYOUT,this)},containerType:"div",_childToComponent:new Array(),_childToParent:new Array(),renderAdd:function(d,a){if(!this.component.render(echopoint.internal.AbstractHtmlComponent.TEXT)){throw new Error("HtmlLayout must have html layout definition!")}this.constructor.$super.prototype.renderAdd.call(this,d,a);var b=this.component.getComponentCount();for(var c=0;c<b;++c){this._renderAddChild(d,this.component.getComponent(c))}},_renderAddChild:function(e,d){var c=d.render(echopoint.internal.AbstractContainer.LAYOUT_DATA);if(!c){throw new Error("Children of HtmlLayout must specify HtmlLayoutData")}var b=c.containerId;var a=this._findChildById(this._container,b);if(!a){throw new Error("Cannot find any element named as "+b+" under the HTML text definition")}Echo.Render.renderComponentAdd(e,d,a);this._childToComponent[d.renderId]=a.lastChild;this._childToParent[d.renderId]=a},_findChildById:function(a,d){var b=a.firstChild;while(b){if((b.nodeType==1)&&(b.id==d)){return b}var c=this._findChildById(b,d);if(c){return c}b=b.nextSibling}return null},_renderRemoveChild:function(c){var a=this._childToParent[c.renderId];var b=this._childToComponent[c.renderId];if(a&&b){a.removeChild(b)}delete this._childToComponent[c.renderId];delete this._childToParent[c.renderId]},renderUpdate:function(h){var d=false;if(h.hasUpdatedProperties()||h.hasUpdatedLayoutDataChildren()){d=true}else{var a=h.getRemovedChildren();if(a){for(var c=0;c<a.length;++c){var g=a[c];this._renderRemoveChild(g)}}var e=h.getAddedChildren();if(e){for(var c=0;c<e.length;++c){this._renderAddChild(h,e[c])}}}if(d){var b=this._container;var f=b.parentNode;Echo.Render.renderComponentDispose(h,h.parent);f.removeChild(b);this.renderAdd(h,f)}return d},renderDispose:function(a){this.constructor.$super.prototype.renderDispose.call(this,a);this._childToComponent=null;this._childToParent=null}});echopoint.constants.HTTP_PANE="echopoint.HttpPane";echopoint.HttpPane=Core.extend(Echo.Component,{$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.HTTP_PANE,this)},$static:{URI:"uri"},componentType:echopoint.constants.HTTP_PANE});echopoint.HttpPaneSync=Core.extend(echopoint.internal.AbstractContainerSync,{$load:function(){Echo.Render.registerPeer(echopoint.constants.HTTP_PANE,this)},$static:{DEFAULT_HEIGHT:"100%",DEFAULT_WIDTH:"100%"},_container:null,_iframe:null,renderAdd:function(b,a){this._container=document.createElement("div");this._container.id=this.component.renderId;this.renderStyle(this._container);this._renderContainerStyle();this._container.appendChild(this._createIframe());a.appendChild(this._container)},renderDispose:function(a){this._iframe=null;this._container=null},renderUpdate:function(b){this.renderStyle(this._container,b);var a=b.getUpdatedProperty(echopoint.HttpPane.URI);if(a){this._iframe.src=a.newValue}},_createIframe:function(){this._iframe=document.createElement("iframe");this._iframe.allowtransparency="true";this._iframe.src=this.component.get(echopoint.HttpPane.URI);this._renderIframeStyle();return this._iframe},getDefaultHeight:function(){return echopoint.HttpPaneSync.DEFAULT_HEIGHT},getDefaultWidth:function(){return echopoint.HttpPaneSync.DEFAULT_WIDTH},_renderContainerStyle:function(){this._container.style.position="absolute";this._container.style.overflow="auto"},_renderIframeStyle:function(){this._iframe.style.position="relative";this._iframe.style.width="100%";this._iframe.style.height="100%";this._iframe.style.borderStyle="none"}});echopoint.constants.ABSTRACT_IMAGE="echopoint.internal.AbstractImage";echopoint.internal.AbstractImage=Core.extend(echopoint.internal.AbstractContainer,{$abstract:true,$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.ABSTRACT_IMAGE,this)},$static:{ACTION_COMPLETE:"action",ACTION_COMMAND:"actionCommand",TEXT:"alt",TOOL_TIP_TEXT:"toolTipText",CURSOR:"cursor",URL:"url"},$virtual:{doAction:function(){var a=this.get(echopoint.internal.AbstractImage.ACTION_COMMAND);this.fireEvent({type:echopoint.internal.AbstractImage.ACTION_COMPLETE,source:this,actionCommand:a})}},componentType:echopoint.constants.ABSTRACT_IMAGE});echopoint.internal.AbstractImageSync=Core.extend(echopoint.internal.AbstractContainerSync,{$abstract:true,$load:function(){Echo.Render.registerPeer(echopoint.constants.ABSTRACT_IMAGE,this)},$virtual:{image:null,createImage:function(){this.image=document.createElement("img");this.image.id=this.component.renderId;Echo.Sync.ImageReference.renderImg(this.component.render(echopoint.internal.AbstractImage.URL),this.image);Core.Web.Event.add(this.image,"click",Core.method(this,this.processClick),false);this.renderStyle(this.image);this.renderImageStyle();return this.image},renderImageStyle:function(b){if(!b){this.image.alt=this.component.render(echopoint.internal.AbstractImage.TEXT,echopoint.constants.ABSTRACT_IMAGE);this.image.title=this.component.render(echopoint.internal.AbstractImage.TOOL_TIP_TEXT,"");this.image.style.cursor=this.component.render(echopoint.internal.AbstractImage.CURSOR,"auto");return}var a=b.getUpdatedProperty(echopoint.internal.AbstractImage.TEXT);if(a){this.image.alt=a.newValue}a=b.getUpdatedProperty(echopoint.internal.AbstractImage.TOOL_TIP_TEXT);if(a){this.image.title=a.newValue}a=b.getUpdatedProperty(echopoint.internal.AbstractImage.CURSOR);if(a){this.image.style.cursor=a.newValue}},processClick:function(){if(!this.client||!this.client.verifyInput(this.component)){return true}this.component.application.setFocusedComponent(this.component);this.component.doAction()}}});echopoint.constants.IMAGE_ICON="echopoint.ImageIcon";echopoint.ImageIcon=Core.extend(echopoint.internal.AbstractImage,{$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.IMAGE_ICON,this)},componentType:echopoint.constants.IMAGE_ICON});echopoint.ImageIconSync=Core.extend(echopoint.internal.AbstractImageSync,{$load:function(){Echo.Render.registerPeer(echopoint.constants.IMAGE_ICON,this)},renderAdd:function(b,a){a.appendChild(this.createImage())},renderDispose:function(a){this.image=null},renderUpdate:function(a){this.renderStyle(this._image,a);this.renderImageStyle(a);return false}});echopoint.constants.IMAGE_MAP="echopoint.ImageMap";echopoint.ImageMap=Core.extend(echopoint.internal.AbstractImage,{$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.IMAGE_MAP,this)},$static:{SECTIONS:"sections"},$virtual:{addSection:function(a){if(!a instanceof echopoint.model.MapSection){throw"Section must be a sub-class of MapSection"}var b=this.get(echopoint.ImageMap.SECTIONS);if(b==null){b=new Core.Arrays.LargeMap();this.set(echopoint.ImageMap.SECTIONS,b)}b[a.actionCommand]=a},removeSection:function(a){var b=this.get(echopoint.ImageMap.SECTIONS);if(b==null){b=new Core.Arrays.LargeMap();this.set(echopoint.ImageMap.SECTIONS,b)}b.remove(a.actionCommand)},removeAllSections:function(){this.set(echopoint.ImageMap.SECTIONS,new Core.Arrays.LargeMap())}},componentType:echopoint.constants.IMAGE_MAP});echopoint.model.Point=Core.extend({x:0,y:0,$construct:function(b,a){this.x=b;this.y=a}});echopoint.model.MapSection=Core.extend({$abstract:true,$virtual:{actionCommand:null,altText:null}});echopoint.model.CircleSection=Core.extend(echopoint.model.MapSection,{centre:null,radius:0,$construct:function(b,a,d,c){this.centre=b;this.radius=a;this.actionCommand=d;this.altText=c},toString:function(){return(""+this.centre.x+","+this.centre.y+","+this.radius)}});echopoint.model.RectangleSection=Core.extend(echopoint.model.MapSection,{bottom:null,top:null,$construct:function(a,c,e,d){this.bottom=a;this.top=c;this.actionCommand=e;this.altText=d},toString:function(){return(""+this.bottom.x+","+this.bottom.y+","+this.top.x+","+this.top.y)}});echopoint.model.PolygonSection=Core.extend(echopoint.model.MapSection,{vertices:null,$construct:function(a,c,b){this.vertices=a;this.actionCommand=c;this.altText=b},toString:function(){var c="";var b=true;for(var a=0;a<this.vertices.length;++a){if(b){b=false}else{c+=","}c+=this.vertices[a].x+","+this.vertices[a].y}return c}});echopoint.ImageMapSync=Core.extend(echopoint.internal.AbstractImageSync,{$load:function(){Echo.Render.registerPeer(echopoint.constants.IMAGE_MAP,this)},$static:{CIRCLE:"circle",POLYGON:"poly",RECTANGLE:"rect",handleClick:function(b,a){Core.Debug.consoleWrite("actionCommand: "+a);echopoint.ImageMapSync.instances.map[b].doHandleClick(a)},instances:new Core.Arrays.LargeMap()},_map:null,_sections:null,renderAdd:function(b,a){echopoint.ImageMapSync.instances.map[this.component.renderId]=this;a.appendChild(this.createImage());a.appendChild(this._createMap());this._createAreas()},renderDispose:function(a){this.image=null;this._map=null;this._sections=null;echopoint.ImageMapSync.instances.remove(this.component.renderId)},renderUpdate:function(c){var b=c.getUpdatedProperty(echopoint.internal.AbstractImage.URL);if(b){Echo.Sync.ImageReference.renderImg(b.newValue,this.image);var a=this._image.parentNode;a.removeChild(this.image);a.removeChild(this._map);a.appendChild(this.image);a.appendChild(this._map)}this.renderStyle(this.image,c);this.renderImageStyle(c);this._createAreas(c);return false},doHandleClick:function(a){this.component.set(echopoint.internal.AbstractImage.ACTION_COMMAND,a);this.component.doAction()},_createMap:function(){this.image.useMap="#"+this._getName();this._map=document.createElement("map");this._map.id=this._getName();this._map.name=this._getName();return this._map},_createAreas:function(f){if(f){var c=f.getUpdatedProperty(echopoint.ImageMap.SECTIONS);if(!c){return}}var e=this._getSections(f);for(var a in e){if(e[a] instanceof echopoint.model.MapSection){var b=document.createElement("area");b.shape=this._getShape(e[a]);b.coords=e[a].toString();if(e[a].actionCommand!=null){b.href="javascript:echopoint.ImageMapSync.handleClick('"+this.component.renderId+"', '"+e[a].actionCommand+"');"}else{b.noHref="nohref"}var d=e[a].altText;if(d){b.title=d}this._map.appendChild(b)}}},_getName:function(){return(this.component.renderId+"|Map")},_getShape:function(b){var a=null;if(b instanceof echopoint.model.CircleSection){a=echopoint.ImageMapSync.CIRCLE}else{if(b instanceof echopoint.model.PolygonSection){a=echopoint.ImageMapSync.POLYGON}else{if(b instanceof echopoint.model.RectangleSection){a=echopoint.ImageMapSync.RECTANGLE}}}return a},_getSections:function(c){if(!c&&this._sections){return this._sections}var b=this.component.get(echopoint.ImageMap.SECTIONS);if(c){var a=c.getUpdatedProperty(echopoint.ImageMap.SECTIONS);if(a){b=a.newValue}else{if(this._sections){return this._sections}}}if(b instanceof Core.Arrays.LargeMap){this._sections=b}else{this._sections=this._parseJson(b)}return this._sections},_parseJson:function(json){var sections=new Core.Arrays.LargeMap();var data=eval("("+json+")");for(var i=0;i<data.list.length;++i){var map=data.list[i];var actionCommand=map[0];var mapSection=map[1];var section=null;if(mapSection.centre){section=new echopoint.model.CircleSection(mapSection.centre,mapSection.radius,actionCommand,mapSection.altText)}else{if(mapSection.bottom){section=new echopoint.model.RectangleSection(mapSection.bottom,mapSection.top,actionCommand,mapSection.altText)}else{if(mapSection.vertices){section=new echopoint.model.PolygonSection(mapSection.vertices,actionCommand,mapSection.altText)}}}sections[actionCommand]=section}return sections}});echopoint.constants.INFO_WINDOW="echopoint.InfoWindow";echopoint.InfoWindow=Core.extend(Echo.Component,{$static:{PREFIX:"prefix",POSTFIX:"postfix",TEXT:"text",TEXT_FONT:"textFont",TEXT_FOREGROUND:"textForeground",TEXT_BACKGROUND:"textBackground",TEXT_INSETS:"textInsets",OTHER_TEXT_FONT:"otherTextFont",OTHER_TEXT_FOREGROUND:"otherTextForeground",OTHER_TEXT_BACKGROUND:"otherTextBackground",OTHER_TEXT_INSETS:"otherTextInsets",TITLE:"title",TITLE_ALIGNMENT:"titleAlignment",TITLE_FONT:"titleFont",TITLE_FOREGROUND:"titleForeground",TITLE_BACKGROUND:"titleBackground",TITLE_INSETS:"titleInsets",CONTENT:"content",ALIGNMENT:"alignment",FONT:"font",INSETS:"insets",WIDTH:"width"},$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.INFO_WINDOW,this)},componentType:echopoint.constants.INFO_WINDOW});echopoint.InfoWindowSync=Core.extend(Echo.Render.ComponentSync,{$load:function(){Echo.Render.registerPeer(echopoint.constants.INFO_WINDOW,this)},$static:{DEFAULT_WIDTH:"300px",DEFAULT_BACKGROUND:"#c50101"},_span:null,_text:null,_infoWindow:null,_titleBar:null,_content:null,renderAdd:function(b,a){a.appendChild(this._createSpan());this._createInfoWindow();this._renderStyle()},renderDispose:function(){this._content=null;this._titleBar=null;this._infoWindow=null;this._text=null;this._span=null},renderUpdate:function(b){var a=this._text.parentNode;Echo.Render.renderComponentDispose(b,b.parent);a.removeChild(this._span);document.body.removeChild(this._infoWindow);this.renderAdd(b,a);return false},_createSpan:function(){this._span=document.createElement("span");this._span.id=this.component.renderId+"|Span";this._renderFont(this._span,echopoint.InfoWindow.OTHER_TEXT_FONT);this._renderForeground(this._span,echopoint.InfoWindow.OTHER_TEXT_FOREGROUND);this._renderBackground(this._span,echopoint.InfoWindow.OTHER_TEXT_BACKGROUND);this._renderInsets(this._span,echopoint.InfoWindow.OTHER_TEXT_INSETS);var a=this.component.render(echopoint.InfoWindow.PREFIX);if(a){this._span.appendChild(document.createTextNode(a))}this._span.appendChild(this._createText());var b=this.component.render(echopoint.InfoWindow.POSTFIX);if(b){this._span.appendChild(document.createTextNode(b))}Core.Web.Event.add(this._text,"mouseover",Core.method(this,this._processRolloverEnter),false);Core.Web.Event.add(this._text,"mouseout",Core.method(this,this._processRolloverExit),false);return this._span},_createText:function(){this._text=document.createElement("span");this._text.id=this.component.renderId+"|Span|Text";this._renderFont(this._text,echopoint.InfoWindow.TEXT_FONT);this._renderForeground(this._text,echopoint.InfoWindow.TEXT_FOREGROUND);this._renderBackground(this._text,echopoint.InfoWindow.TEXT_BACKGROUND);this._renderInsets(this._text,echopoint.InfoWindow.TEXT_INSETS);this._text.appendChild(document.createTextNode(this.component.render(echopoint.InfoWindow.TEXT)));return this._text},_createInfoWindow:function(){this._infoWindow=document.createElement("div");this._infoWindow.id=this.component.renderId;this._infoWindow.style.overflow="scroll";this._infoWindow.appendChild(this._createTop());this._infoWindow.appendChild(this._createTitleBar());this._infoWindow.appendChild(this._createContent());this._infoWindow.appendChild(this._createBottom());document.body.appendChild(this._infoWindow);return this._infoWindow},_renderWindowStyle:function(a){this._infoWindow.style.display="none";this._renderWidth(this._infoWindow,a);if(!a){this._infoWindow.style.position="absolute";this._infoWindow.style.zIndex=100000;this._infoWindow.style.opacity=1}},_createTop:function(){var b=document.createElement("div");var a=document.createElement("b");a.style.display="block";a.style.background="transparent";a.style.height="7px";a.appendChild(this._createR1());a.appendChild(this._createR2());a.appendChild(this._createR3());a.appendChild(this._createR4());a.appendChild(this._createR5());a.appendChild(this._createR6());a.appendChild(this._createR7());b.appendChild(a);return b},_createTitleBar:function(){this._titleBar=document.createElement("div");this._titleBar.id=this.component.renderId+"|TitleBar";this._titleBar.innerHTML=this.component.render(echopoint.InfoWindow.TITLE,"");return this._titleBar},_renderTitleStyle:function(b){this._titleBar.style.display="block";this._renderFont(this._titleBar,echopoint.InfoWindow.TITLE_FONT,b);this._renderInsets(this._titleBar,echopoint.InfoWindow.TITLE_INSETS,b);var a=this._getBackground();this._titleBar.style.background=a;this._titleBar.style.borderLeft="thin groove "+a;this._titleBar.style.borderRight="thin groove "+a;this._titleBar.style.color=this.component.render(echopoint.InfoWindow.TITLE_FOREGROUND,"white");this._renderFont(this._titleBar,echopoint.InfoWindow.TITLE_FONT,b);this._renderAlignment(this._titleBar,echopoint.InfoWindow.TITLE_ALIGNMENT,"center")},_createContent:function(){this._content=document.createElement("div");this._content.id=this.component.renderId+"|Content";this._content.innerHTML=this.component.render(echopoint.InfoWindow.CONTENT,"");return this._content},_renderContentStyle:function(b){this._content.style.display="block";this._content.style.overflow="auto";this._renderFont(this._content,echopoint.InfoWindow.FONT,b);Echo.Sync.Color.renderFB(this.component,this._content);this._renderInsets(this._content,echopoint.InfoWindow.INSETS,b);var a=this._getBackground();this._content.style.borderLeft="thin groove "+a;this._content.style.borderRight="thin groove "+a;this._renderAlignment(this._content,echopoint.InfoWindow.ALIGNMENT,"left")},_createBottom:function(){var b=document.createElement("div");var a=document.createElement("b");a.style.display="block";a.style.background="transparent";a.style.height="7px";a.appendChild(this._createR7());a.appendChild(this._createR6());a.appendChild(this._createR5());a.appendChild(this._createR4());a.appendChild(this._createR3());a.appendChild(this._createR2());a.appendChild(this._createR1());b.appendChild(a);return b},_createR1:function(){var a=document.createElement("b");a.style.display="block";a.style.height="1px";a.style.overflow="hidden";a.style.background=this._getBackground();a.style.margin="0 8px";return a},_createR2:function(){var a=document.createElement("b");a.style.display="block";a.style.height="1px";a.style.overflow="hidden";a.style.background=this._getBackground();a.style.margin="0 5px";return a},_createR3:function(){var a=document.createElement("b");a.style.display="block";a.style.height="1px";a.style.overflow="hidden";a.style.background=this._getBackground();a.style.margin="0 4.5px";return a},_createR4:function(){var a=document.createElement("b");a.style.display="block";a.style.height="1px";a.style.overflow="hidden";a.style.background=this._getBackground();a.style.margin="0 3.5px";return a},_createR5:function(){var a=document.createElement("b");a.style.display="block";a.style.height="1px";a.style.overflow="hidden";a.style.background=this._getBackground();a.style.margin="0 2px";return a},_createR6:function(){var a=document.createElement("b");a.style.display="block";a.style.height="1px";a.style.overflow="hidden";a.style.background=this._getBackground();a.style.margin="0 1.5px";return a},_createR7:function(){var a=document.createElement("b");a.style.display="block";a.style.height="1px";a.style.overflow="hidden";a.style.background=this._getBackground();a.style.margin="0 1px";return a},_renderStyle:function(a){this._renderWindowStyle(a);this._renderTitleStyle(a);this._renderContentStyle(a)},_renderFont:function(a,c,d){if(d){var b=d.getUpdatedProperty(c);if(b){Echo.Sync.Font.render(b.newValue,a)}}else{Echo.Sync.Font.render(this.component.render(c),a)}},_renderForeground:function(a,c,d){var b=null;if(d){b=d.getUpdatedProperty(c);if(b){a.style.color=b.newValue}}else{b=this.component.render(c);if(b){a.style.color=b}}},_renderBackground:function(a,c,d){var b=null;if(d){b=d.getUpdatedProperty(c);if(b){a.style.backgroundColor=b.newValue}}else{b=this.component.render(c);if(b){a.style.backgroundColor=b}}},_renderInsets:function(a,c,d){if(d){var b=d.getUpdatedProperty(c);if(b){Echo.Sync.Insets.render(b.newValue,a,"padding")}}else{Echo.Sync.Insets.render(this.component.render(c),a,"padding")}},_renderAlignment:function(b,d,a,e){if(e){var c=e.getUpdatedProperty(d);if(c){b.style.textAlign=c.newValue}}else{b.style.textAlign=this.component.render(d,a)}},_getBackground:function(){return this.component.render(echopoint.InfoWindow.TITLE_BACKGROUND,echopoint.InfoWindowSync.DEFAULT_BACKGROUND)},_getWidth:function(){return this.component.render(echopoint.InfoWindow.WIDTH,echopoint.InfoWindowSync.DEFAULT_WIDTH)},_renderWidth:function(a,c){if(c){var b=c.getUpdatedProperty(echopoint.InfoWindow.WIDTH);if(b){a.style.width=Echo.Sync.Extent.toCssValue(b.newValue,true,true)}}else{a.style.width=Echo.Sync.Extent.toCssValue(this._getWidth(),true,true)}},_processRolloverEnter:function(a){if(!this.client||!this.client.verifyInput(this.component)||Core.Web.dragInProgress){return true}this._setLocation(a)},_processRolloverExit:function(){if(!this.client||!this.client.verifyInput(this.component)){return true}this._infoWindow.style.display="none"},_setLocation:function(e){var a=0;var c=0;if(typeof(window.pageXOffset)=="number"){a=window.pageXOffset;c=window.pageYOffset}else{a=document.body.scrollLeft;c=document.body.scrollTop}var b=document.body.clientWidth?document.body.clientWidth:window.innerWidth;var f=document.body.clientHeight?document.body.clientHeight:window.innerHeight;var g=this._infoWindow;g.style.display="block";if(((e.clientX+g.offsetWidth)>b)&&(e.clientX>g.offsetWidth)){g.style.left=(e.clientX-g.offsetWidth+a)+"px"}else{g.style.left=(e.clientX+a)+"px"}if(((e.clientY+g.offsetHeight+25)>f)&&(e.clientY>(g.offsetHeight+25))){g.style.top=(e.clientY-(g.offsetHeight+15)+c)+"px"}else{g.style.top=(e.clientY+c+15)+"px"}}});echopoint.constants.LIGHT_BOX="echopoint.LightBox";echopoint.LightBox=Core.extend(Echo.Component,{$static:{HIDDEN:"hidden",PARENT_ONLY:"parentOnly",TRANSLUCENT_IMAGE:"translucentImage"},$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.LIGHT_BOX,this)},componentType:echopoint.constants.LIGHT_BOX,pane:true});echopoint.LightBoxSync=Core.extend(Echo.Render.ComponentSync,{$load:function(){Echo.Render.registerPeer(echopoint.constants.LIGHT_BOX,this)},$static:{IMAGE:"images/translucent_80_percent.png"},_container:null,_layoutContainer:null,renderAdd:function(e,a){this._createContainer();this._createLayoutContainer();var c=this.component.getComponentCount();for(var d=0;d<c;++d){Echo.Render.renderComponentAdd(e,this.component.getComponent(d),this._layoutContainer)}var b=this.component.render(echopoint.LightBox.PARENT_ONLY,false);if(b){a.appendChild(this._container)}else{document.body.appendChild(this._container)}},renderDispose:function(){var a=this.component.render(echopoint.LightBox.PARENT_ONLY,false);if(!a){document.body.removeChild(this._container)}this._container=null;this._layoutContainer=null},renderUpdate:function(b){var a=b.getUpdatedProperty(echopoint.LightBox.HIDDEN);if(a){this._toggle(a.newValue)}},_createContainer:function(){this._container=this._createDiv();this._container.id=this.component.renderId;this._container.style.cursor="wait";var b=document.createElement("img");b.style.width="100%";b.style.height="100%";b.style.left="0px";b.style.top="0px";b.src=this._getImage();this._container.appendChild(b);var a=this.component.render(echopoint.LightBox.HIDDEN,false);this._toggle(a);return this._container},_createLayoutContainer:function(){this._layoutContainer=this._createDiv();this._layoutContainer.id=this.component.renderId+"LayoutContainer";this._container.appendChild(this._layoutContainer);return this._layoutContainer},_createDiv:function(){var a=document.createElement("div");a.style.backgroundColor="transparent";a.style.position="absolute";a.style.left="0px";a.style.top="0px";a.style.margin="0px";a.style.padding="0px";return a},_getImage:function(){var a=this.component.render(echopoint.LightBox.TRANSLUCENT_IMAGE);if(!a){a=this.client.getResourceUrl("echopoint",echopoint.LightBoxSync.IMAGE)}return a},_toggle:function(a){if(!a){this._showLightBox()}else{this._hideLightBox()}},_showLightBox:function(){var b=this.component.render(echopoint.LightBox.PARENT_ONLY,false);if(!b){var a=document.body;if(this._container!=a.firstChild){a.insertBefore(this._container,a.firstChild)}}this._container.style.width="100%";this._container.style.height="100%";this._container.style.display=""},_hideLightBox:function(){this._container.style.display="none"}});echopoint.constants.PROGRESS_BAR="echopoint.ProgressBar";echopoint.ProgressBar=Core.extend(echopoint.internal.AbstractContainer,{$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.PROGRESS_BAR,this)},$static:{BAR_BACKGROUND:"barBackground",DEFAULT_BAR_BACKGROUND:"#68b8ff",PERCENTAGE:"percentage",TEXT:"text"},componentType:echopoint.constants.PROGRESS_BAR});echopoint.constants.PUSH_BUTTON="echopoint.PushButton";echopoint.PushButton=Core.extend(Echo.Component,{$static:{ACTION_COMPLETE:"action",ACTION_COMMAND:"actionCommand",ALIGNMENT:"alignment",BACKGROUND:"background",BORDER:"border",FONT:"font",FOREGROUND:"foreground",INSETS:"insets",HEIGHT:"height",WIDTH:"width",TEXT:"text",TOOL_TIP_TEXT:"toolTipText"},$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.PUSH_BUTTON,this)},doAction:function(){var a=this.get(echopoint.PushButton.ACTION_COMMAND);this.fireEvent({type:echopoint.PushButton.ACTION_COMPLETE,source:this,actionCommand:a})},componentType:echopoint.constants.PUSH_BUTTON});echopoint.ProgressBarSync=Core.extend(echopoint.internal.AbstractContainerSync,{$load:function(){Echo.Render.registerPeer(echopoint.constants.PROGRESS_BAR,this)},$static:{DEFAULT_HEIGHT:"15px",DEFAULT_WIDTH:"300px"},_div:null,_bar:null,_text:null,renderAdd:function(c,a){this._createParent(a);this._div.appendChild(this._createBar());var b=this.component.render(echopoint.ProgressBar.TEXT);this._createText((b)?b:"");this._renderStyle(c);this._renderBar(c)},renderDispose:function(a){this._text=null;this._bar=null;this._div=null},renderUpdate:function(a){this.renderStyle(this._div,a);this._renderStyle(a);this._renderBar(a);return false},getDefaultHeight:function(){return echopoint.ProgressBarSync.DEFAULT_HEIGHT},getDefaultWidth:function(){return echopoint.ProgressBarSync.DEFAULT_WIDTH},_createParent:function(a){this._div=document.createElement("div");this._div.id=this.component.renderId;this.renderStyle(this._div);a.appendChild(this._div);return this._div},_createBar:function(){var a=document.createElement("div");a.id=this.component.renderId+"|wrapper";a.style.position="absolute";a.style.height=this._div.style.height;a.style.width=this._div.style.width;a.style.offsetLeft=this._div.style.offsetLeft;a.style.offsetTop=this._div.style.offsetTop;a.style.zIndex=1;this._bar=document.createElement("div");this._bar.id=this.component.renderId+"|bar";this._bar.style.position="absolute";this._bar.style.height=a.style.height;this._bar.style.offsetLeft=a.style.offsetLeft;this._bar.style.offsetTop=a.style.offsetTop;this._bar.style.zIndex=2;this._renderStyle();a.appendChild(this._bar);return a},_createText:function(b){this._text=document.createElement("div");this._text.id=this.component.renderId+"|text";this._text.style.position="absolute";this._text.style.textAlign="center";this._text.style.verticalAlign="middle";this._text.style.color=this._div.style.color;this._text.style.height=this._div.style.height;this._text.style.width=this._div.style.width;this._text.style.offsetLeft=this._div.style.offsetLeft;this._text.style.offsetTop=this._div.style.offsetTop;this._text.style.zIndex=3;var a=this.component.render(echopoint.internal.AbstractContainer.FONT);if(a){this._text.style.font=a}this._text.appendChild(document.createTextNode(b));this._div.appendChild(this._text)},_renderStyle:function(d){var b=null;var a=echopoint.ProgressBar.BAR_BACKGROUND;if(d){var c=d.getUpdatedProperty(a);if(c){b=c.newValue}}else{b=this.component.render(a,echopoint.ProgressBar.DEFAULT_BAR_BACKGROUND)}if(b){this._bar.style.backgroundColor=b}},_renderBar:function(a){this._setPercentage(this.component.get(echopoint.ProgressBar.PERCENTAGE));this._setText(this.component.get(echopoint.ProgressBar.TEXT))},_setText:function(a){if(!a&&!this._text){return}if(!a){a=""}Core.Web.DOM.removeAllChildren(this._text);this._text.appendChild(document.createTextNode(a))},_setPercentage:function(a){this._bar.style.width=(!a)?"0px":parseInt(a)+"%"}});echopoint.PushButtonSync=Core.extend(echopoint.internal.AbstractContainerSync,{$load:function(){Echo.Render.registerPeer(echopoint.constants.PUSH_BUTTON,this)},$static:{DEFAULT_WIDTH:null,DEFAULT_HEIGHT:null},getDefaultWidth:function(){return echopoint.PushButtonSync.DEFAULT_WIDTH},getDefaultHeight:function(){return echopoint.PushButtonSync.DEFAULT_HEIGHT},_input:null,enabled:null,renderAdd:function(b,a){this.enabled=this.component.isRenderEnabled();a.appendChild(this._createInput())},renderDispose:function(){Core.Web.Event.removeAll(this._input);this._input=null},renderUpdate:function(b){if(b){var a=b.getUpdatedProperty("enabled");if(a!=null){if(a.newValue&&!this.enabled){Core.Web.Event.add(this._input,"click",Core.method(this,this._processClick),false)}else{Core.Web.Event.removeAll(this._input)}this._input.disabled=!this.enabled;this.enabled=a.newValue}}this.renderStyle(this._input,b);this._setText();return false},_createInput:function(){this._input=document.createElement("input");this._input.id=this.component.renderId;this._input.type="submit";if(this.enabled){Core.Web.Event.add(this._input,"click",Core.method(this,this._processClick),false)}this._input.disabled=!this.enabled;this._setText();this.renderStyle(this._input);return this._input},_setText:function(){this._input.value=this.component.render(echopoint.PushButton.TEXT,"Submit");var a=this.component.render(echopoint.PushButton.TOOL_TIP_TEXT);if(a){this._input.title=a}},_processClick:function(){if(!this.client||!this.client.verifyInput(this.component)){return true}this.component.application.setFocusedComponent(this.component);this.component.doAction()},renderWidth:function(a,d){if(d){var c=d.getUpdatedProperty(echopoint.internal.AbstractContainer.WIDTH);if(c){a.style.width=Echo.Sync.Extent.toCssValue(c.newValue,true,true)}}else{var b=this.getWidth();if(b){a.style.width=Echo.Sync.Extent.toCssValue(b,true,true)}}},renderHeight:function(b,d){if(d){var c=d.getUpdatedProperty(echopoint.internal.AbstractContainer.HEIGHT);if(c){b.style.height=Echo.Sync.Extent.toCssValue(c.newValue,false,true)}}else{var a=this.getHeight();if(a){b.style.height=Echo.Sync.Extent.toCssValue(a,false,true)}}}});echopoint.constants.STRUT="echopoint.Strut";echopoint.Strut=Core.extend(Echo.Component,{$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.STRUT,this)},componentType:echopoint.constants.STRUT});echopoint.StrutSync=Core.extend(echopoint.internal.AbstractContainerSync,{$load:function(){Echo.Render.registerPeer(echopoint.constants.STRUT,this)},$static:{IMAGE:"images/transparent1x1.gif",DEFAULT_WIDTH:"10px",DEFAULT_HEIGHT:"10px"},_image:null,renderAdd:function(b,a){a.appendChild(this._createImage())},renderDispose:function(){this._image=null},renderUpdate:function(a){this.renderStyle(this._image,a)},getDefaultWidth:function(){return echopoint.StrutSync.DEFAULT_WIDTH},getDefaultHeight:function(){return echopoint.StrutSync.DEFAULT_HEIGHT},_createImage:function(){this._image=document.createElement("img");this._image.id=this.component.renderId;this._image.src=this.client.getResourceUrl("echopoint",echopoint.StrutSync.IMAGE);this.renderStyle(this._image);return this._image}});echopoint.constants.TEXT_FIELD="echopoint.internal.TextField";echopoint.constants.NUMBER_TEXT_FIELD="echopoint.NumberTextField";echopoint.constants.REGEX_TEXT_FIELD="echopoint.RegexTextField";echopoint.constants.KEYSTROKE_TEXT_FIELD="echopoint.KeystrokeTextField";echopoint.internal.TextField=Core.extend(Echo.TextField,{$abstract:true,$static:{DEFAULT_TEXT:"defaultText"},$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.TEXT_FIELD,this)},componentType:echopoint.constants.TEXT_FIELD});echopoint.RegexTextField=Core.extend(echopoint.internal.TextField,{$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.REGEX_TEXT_FIELD,this)},$static:{REGEX:"regex"},componentType:echopoint.constants.REGEX_TEXT_FIELD});echopoint.NumberTextField=Core.extend(echopoint.RegexTextField,{$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.NUMBER_TEXT_FIELD,this)},$static:{NUMBER_REGEX:"^[\\d]+[.]{0,1}[\\d]*$",FRACTION_REGEX:"^[\\d]+[.]{0,1}[\\d]{0,",PRECISION:"precision"},componentType:echopoint.constants.NUMBER_TEXT_FIELD}),echopoint.KeystrokeTextField=Core.extend(echopoint.internal.TextField,{$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.KEYSTROKE_TEXT_FIELD,this)},componentType:echopoint.constants.KEYSTROKE_TEXT_FIELD});echopoint.internal.TextFieldSync=Core.extend(Echo.Sync.TextField,{$abstract:true,$load:function(){Echo.Render.registerPeer(echopoint.constants.TEXT_FIELD,this)},$virtual:{defaultText:null,processClick:function(a){if(this.input.value==this.defaultText){Echo.Sync.Color.render(Echo.Sync.getEffectProperty(this.component,"foreground","foreground",true),this.input,"color");this.input.value=""}this.defaultText=null;this._textFieldProcessClick(a)},processFocus:function(a){if(this.input.value==this.defaultText){Echo.Sync.Color.render(Echo.Sync.getEffectProperty(this.component,"foreground","foreground",true),this.input,"color");this.input.value="";this.defaultText=null}return Echo.Sync.TextField.prototype.processFocus.call(this,a)},processBlur:function(a){var b=this.component.render(echopoint.internal.TextField.DEFAULT_TEXT);if(b&&(this.input.value=="")){Echo.Sync.Color.render(Echo.Sync.getEffectProperty(this.component,"foreground","disabledForeground",true),this.input,"color");this.input.value=b;this.defaultText=b}return Echo.Sync.TextField.prototype.processBlur.call(this,a)},getCaretPosition:function(){var a=(this.input.value)?this.input.value.length:0;if(document.selection){this.input.focus();var b=document.selection.createRange();var c=document.selection.createRange().text.length;b.moveStart("character",-this.input.value.length);a=b.text.length-c}else{if(this.input.selectionStart||this.input.selectionStart=="0"){a=this.input.selectionStart}}return a},setDefaultText:function(){this.defaultText=this.component.render(echopoint.internal.TextField.DEFAULT_TEXT);var a=this.component.render("text");if(this.defaultText&&((!a)||(a==""))){Echo.Sync.Color.render(Echo.Sync.getEffectProperty(this.component,"foreground","disabledForeground",true),this.input,"color");this.input.setAttribute("value",this.defaultText)}else{this.defaultText=null}}},$construct:function(){Echo.Sync.TextField.call(this);this._textFieldProcessClick=this._processClick;this._processClick=this.processClick},renderAdd:function(b,a){Echo.Sync.TextField.prototype.renderAdd.call(this,b,a);this.setDefaultText()}});echopoint.RegexTextFieldSync=Core.extend(echopoint.internal.TextFieldSync,{regexp_filter:null,_val_bp:null,$load:function(){Echo.Render.registerPeer(echopoint.constants.REGEX_TEXT_FIELD,this)},clientKeyPress:function(c){c=c?c:window.event;var b=c.domEvent.charCode;if(!c.domEvent.metaKey&&!c.domEvent.ctrlKey&&!c.domEvent.altKey&&b>31&&b!=37&&b!=39&&this.regexp_filter){var a=this.getCaretPosition();var d=this.input.value.substring(0,a)+String.fromCharCode(b)+this.input.value.substring(a);if(!this.regexp_filter.test(d)){Core.Web.DOM.preventEventDefault(c.domEvent);return false}}return echopoint.internal.TextFieldSync.prototype.clientKeyPress.call(this,c)},processPaste:function(a){a=a?a:window.event;this._val_bp=this.input.value;Core.Web.Scheduler.run(Core.method(this,this._filterInput),50,false)},_filterInput:function(){if(!this.regexp_filter.test(this.input.value)){this.input.value=this._val_bp}},renderAdd:function(c,a){echopoint.internal.TextFieldSync.prototype.renderAdd.call(this,c,a);var b=this.component.render(echopoint.RegexTextField.REGEX);if(b){this.regexp_filter=new RegExp(b)}Core.Web.Event.add(this.input,"paste",Core.method(this,this.processPaste),false)},renderUpdate:function(b){var a=b.getUpdatedProperty(echopoint.RegexTextField.REGEX);if(a){this.regexp_filter=new RegExp(a.newValue)}return echopoint.internal.TextFieldSync.prototype.renderUpdate.call(this,b)},$construct:function(){echopoint.internal.TextFieldSync.call(this)}});echopoint.NumberTextFieldSync=Core.extend(echopoint.RegexTextFieldSync,{$load:function(){Echo.Render.registerPeer(echopoint.constants.NUMBER_TEXT_FIELD,this)},$construct:function(){echopoint.RegexTextFieldSync.call(this)},_initRegexpFilter:function(a){if(a){var b=echopoint.NumberTextField.FRACTION_REGEX+a+"}$";this.regexp_filter=new RegExp(b);this.component.set(echopoint.RegexTextField.REGEX,b)}else{this.regexp_filter=new RegExp(echopoint.NumberTextField.NUMBER_REGEX);this.component.set(echopoint.RegexTextField.REGEX,echopoint.NumberTextField.NUMBER_REGEX)}},renderAdd:function(b,a){echopoint.RegexTextFieldSync.prototype.renderAdd.call(this,b,a);this._initRegexpFilter(this.component.render(echopoint.NumberTextField.PRECISION))},renderUpdate:function(c){var b=echopoint.RegexTextFieldSync.prototype.renderUpdate.call(this,c);var a=c.getUpdatedProperty(echopoint.NumberTextField.PRECISION);if(a){this._initRegexpFilter(a.newValue)}return b}});echopoint.constants.TAG_CLOUD="echopoint.TagCloud";echopoint.TagCloud=Core.extend(echopoint.internal.AbstractContainer,{$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.TAG_CLOUD,this)},$static:{ACTION_COMPLETE:"action",ROLLOVER_ENABLED:"rolloverEnabled",ROLLOVER_BACKGROUND:"rolloverBackground",ROLLOVER_FOREGROUND:"rolloverForeground",TAGS:"tags"},componentType:echopoint.constants.TAG_CLOUD,doAction:function(a){this.fireEvent({type:echopoint.TagCloud.ACTION_COMPLETE,source:this,data:a.name})}});echopoint.model.Tag=Core.extend({name:null,count:0,$construct:function(b,a){this.name=b;this.count=a},toString:function(){return this.name}});echopoint.TagCloudSync=Core.extend(echopoint.internal.AbstractContainerSync,{$load:function(){Echo.Render.registerPeer(echopoint.constants.TAG_CLOUD,this)},_element:null,_tags:null,_getSpecificElement:function(d){var c=this._element.firstChild;var b=0;while(c){var a=this._getTags();if((c==d)&&a){return a[b]}c=c.nextSibling;++b}return null},_processRolloverEnter:function(a){if(a.target.nodeName.toLowerCase()!="span"){return}Echo.Sync.Color.renderClear(this.component.render(echopoint.TagCloud.ROLLOVER_FOREGROUND),a.target,"color");Echo.Sync.Color.renderClear(this.component.render(echopoint.TagCloud.ROLLOVER_BACKGROUND),a.target,"backgroundColor")},_processRolloverExit:function(a){if(a.target.nodeName.toLowerCase()!="span"){return}a.target.style.color="";a.target.style.backgroundColor=""},_processClick:function(b){var a=this._getSpecificElement(b.target);if(a){this.component.doAction(a)}},_getTags:function(){if(this._tags){return this._tags}var a=this.component.get(echopoint.TagCloud.TAGS);if(a instanceof Array){this._tags=a}else{this._tags=this._parseJson(a)}return this._tags},_parseJson:function(json){var tags=new Array();var data=eval("("+json+")");for(var i=0;i<data.list.length;++i){tags[i]=new echopoint.model.Tag(data.list[i].name,data.list[i].count)}return tags},_renderStyle:function(){this.renderStyle(this._element);if(this.component.render(echopoint.TagCloud.ROLLOVER_ENABLED)){Core.Web.Event.add(this._element,"mouseover",Core.method(this,this._processRolloverEnter),false);Core.Web.Event.add(this._element,"mouseout",Core.method(this,this._processRolloverExit),false)}},_renderTags:function(){var a=this._getTags();if(a){var f=1;var e=Number.MAX_VALUE;for(var b=0;b<a.length;++b){if(a[b].count<e){e=a[b].count}if(a[b].count>f){f=a[b].count}}for(b=0;b<a.length;++b){var d=Math.floor((a[b].count-e)/(f-e)*100)+100;var c=document.createElement("span");c.style.cssText="cursor:pointer;font-size: "+d+"%";c.appendChild(document.createTextNode(a[b].name));c.appendChild(document.createTextNode(" "));this._element.appendChild(c)}}},renderAdd:function(b,a){this._element=document.createElement("div");this._element.id=this.component.renderId;Core.Web.Event.add(this._element,"click",Core.method(this,this._processClick),false);this._renderTags();this._renderStyle();a.appendChild(this._element)},renderDispose:function(a){Core.Web.Event.removeAll(this._element);this._element=null;this._data=null},renderUpdate:function(b){var a=b.getUpdatedProperty(echopoint.TagCloud.TAGS);if(a){this._tags=null;if(this._element.hasChildNodes()){while(this._element.childNodes.length>=1){this._element.removeChild(this._element.firstChild)}}this._renderTags()}this._renderStyle()}});echopoint.constants.FILE_UPLOAD_SELECTOR="echopoint.tucana.FileUploadSelector";echopoint.tucana.FileUploadSelector=Core.extend(echopoint.internal.AbstractContainer,{$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.FILE_UPLOAD_SELECTOR,this)},$static:{ACTION_START:"start",ACTION_COMPLETE:"complete",BUTTON_TEXT_UPLOAD:"buttonTextUpload",BUTTON_TEXT_CANCEL:"buttonTextCancel",BUTTON_TEXT_WAIT:"buttonTextWait",BUTTON_IMAGE_UPLOAD:"buttonImageUpload",BUTTON_IMAGE_CANCEL:"buttonImageCancel",BUTTON_IMAGE_WAIT:"buttonImageWait",BUTTON_MODE:"buttonMode",BUTTON_DISPLAY:"buttonDisplay",CANCEL_ENABLED:"cancelEnabled",INPUT_SIZE:"inputSize",DEFAULT_INPUT_SIZE:"19",UPLOAD_INDEX:"uploadIndex",UPLOAD_CANCELLED:"uploadCancelled",DEFAULT_BUTTON_MODE:"submit",DEFAULT_BUTTON_DISPLAY:"auto",DEFAULT_CANCEL_ENABLED:true,DEFAULT_IMAGE_UPLOAD:"images/upload.png",DEFAULT_IMAGE_CANCEL:"images/cancel.png",DEFAULT_IMAGE_WAIT:"images/wait.png",DEFAULT_UPLOAD_TEXT:"Upload",DEFAULT_CANCEL_TEXT:"Cancel",DEFAULT_WAIT_TEXT:"Wait...",POLLING_INTERVAL:"pollingInterval",DEFAULT_POLLING_INTERVAL:250,PATTERN:"pattern"},notifyStart:function(a){this.fireEvent({source:this,type:echopoint.tucana.FileUploadSelector.ACTION_START,actionCommand:a})},notifyComplete:function(a){this.fireEvent({source:this,type:echopoint.tucana.FileUploadSelector.ACTION_COMPLETE,actionCommand:a})},componentType:echopoint.constants.FILE_UPLOAD_SELECTOR});echopoint.tucana.UploadProgress=Core.extend({bytesRead:0,contentLength:0,percentComplete:0,transferRate:0,estimatedTimeLeft:0,status:null,message:null,$construct:function(json){if(json){var data=eval("("+json+")");this.bytesRead=data.r;this.contentLength=data.cl;this.percentComplete=data.pc;this.transferRate=data.tr;this.estimatedTimeLeft=data.tl;this.status=data.s;var m=data.m;if(m&&(m!="null")&&(m!="")){this.message=m}}}});echopoint.tucana.FileUploadSelectorSync=Core.extend(echopoint.internal.AbstractContainerSync,{$load:function(){Echo.Render.registerPeer(echopoint.constants.FILE_UPLOAD_SELECTOR,this)},$static:{_STAGE_LOADED:1,_STAGE_QUEUED:2,_STAGE_UPLOADING:3,_PROGRESS_SERVICE:"?sid=echopoint.tucana.UploadProgressService",_RECEIVER_SERVICE:"?sid=echopoint.tucana.UploadReceiverService",DEFAULT_WIDTH:"300px",DEFAULT_HEIGHT:"42px"},_hidden:null,_div:null,_table:null,_uploadIndex:null,_frames:new Array(),_form:null,renderAdd:function(b,a){this._uploadIndex=this._createUploadIndex();this._createHidden();this._createFrame();a.appendChild(this._createParent(b));if(this.component.getComponentCount()>0){this.renderAddChild(b,this.component.getComponent(0))}},renderAddChild:function(b,a){Echo.Render.renderComponentAdd(b,a,this._div)},renderDispose:function(){for(var c in this._frames){if((c!="remove")&&(c!="contains")&&(c!="indexOf")){this._frames[c]._dispose()}}this._table._renderDispose();var a=this.component.getComponent(0);if(a){var b=a.peer._div;Core.Web.DOM.removeNode(b)}this._getBody().removeChild(this._hidden);this._hidden=null;this._div=null;this._table=null;this._frames=new Array();this._form=null},renderUpdate:function(g){if(g){var f=g.getUpdatedProperty(echopoint.tucana.FileUploadSelector.UPLOAD_CANCELLED);if(f){var c=f.newValue.split(",");for(var b=0;b<c.length;b++){var d=this._frames[c[b]];if(d){d._processCancel()}}return false}}var a=this._div;var e=a.parentNode;this.renderDispose(g);e.removeChild(a);this.renderAdd(g,e);return false},getDefaultHeight:function(){return echopoint.tucana.FileUploadSelectorSync.DEFAULT_HEIGHT},getDefaultWidth:function(){return echopoint.tucana.FileUploadSelectorSync.DEFAULT_WIDTH},_createUploadIndex:function(){return Math.floor(Math.random()*1073741824).toString(36)+new Date().getTime().toString(36)},_createHidden:function(){this._hidden=document.createElement("div");this._hidden.style.position="absolute";this._hidden.style.top="0";this._hidden.style.marginLeft="-10000px";this._getBody().appendChild(this._hidden)},_createFrame:function(){var a=new echopoint.tucana.FileUploadSelectorSync.Frame(this,this._uploadIndex);a._renderAdd(this._hidden);this._frames[this._uploadIndex]=a;return a},_createParent:function(){this._div=document.createElement("div");this._div.id=this.component.renderId;this.renderStyle(this._div);var a=this._createForm();this._createTable(a);this._div.appendChild(a);return this._div},_createForm:function(){if(Core.Web.Env.BROWSER_INTERNET_EXPLORER){this._form=document.createElement("<form enctype='multipart/form-data'/>")}else{this._form=document.createElement("form");this._form.enctype="multipart/form-data"}this._form.id=this.component.renderId+"|Form|"+this._uploadIndex;this._form.method="POST";this._form.style.margin="0px";this._form.style.padding="0px";this._form.style.position="relative";this._form.action=this._createUploadUrl();var a=this._frames[this._uploadIndex];Core.Web.Event.add(this._form,"submit",Core.method(a,a._processSubmit),false);return this._form},_createTable:function(a){this._table=new echopoint.tucana.FileUploadSelectorSync.Table(this);this._table._renderAdd(a);return this._table},_createUploadUrl:function(){return echopoint.tucana.FileUploadSelectorSync._RECEIVER_SERVICE+"&i="+this.component.renderId+"&x="+this._uploadIndex},_startNextUpload:function(){for(var b in this._frames){var a=this._frames[b];if(a._loadStage==echopoint.tucana.FileUploadSelectorSync._STAGE_QUEUED){a._startUpload();return true}}return false},_removeFrame:function(a){delete this._frames[a._uploadIndex];a._dispose()},_refreshFrame:function(c){this._removeFrame(c);this._table._renderDispose();this._div.removeChild(this._form);this._uploadIndex=this._createUploadIndex();this._createFrame();var b=this._createForm();this._createTable(b);this._div.appendChild(b);var a=this.component.getComponent(0);if(a){var d=a.peer._div;this._div.removeChild(d);a.peer.renderUpdate();this._div.appendChild(d)}},_getBody:function(){return document.getElementsByTagName("body").item(0)}});echopoint.tucana.FileUploadSelectorSync.Frame=Core.extend({peer:null,component:null,_uploadIndex:null,_loadStage:null,_frameElement:null,_connection:null,_pollingInterval:0,$construct:function(a,b){this.peer=a;this.component=a.component;this._uploadIndex=b;this._submitListenerBound=false;this._pollingInterval=this.component.render(echopoint.tucana.FileUploadSelector.POLLING_INTERVAL,echopoint.tucana.FileUploadSelector.DEFAULT_POLLING_INTERVAL)},_renderAdd:function(a){var b=this.component.renderId+"|Frame|"+this._uploadIndex;var c=this.peer.client.getResourceUrl("Echo","resource/Blank.html");if(Core.Web.Env.BROWSER_INTERNET_EXPLORER){a.innerHTML='<iframe id="'+b+'" name="'+b+'" src="'+c+'" scrolling="no" width="0" height="0"></iframe>';this._frameElement=a.firstChild}else{this._frameElement=document.createElement("iframe");this._frameElement.id=b;this._frameElement.name=b;this._frameElement.src=c;this._frameElement.scrolling="no";this._frameElement.style.width="0px";this._frameElement.style.height="0px";a.appendChild(this._frameElement)}},_startUpload:function(){this._loadStage=echopoint.tucana.FileUploadSelectorSync._STAGE_UPLOADING;this.peer._form.target=this._frameElement.id;this.peer._form.submit();if(this.peer._table._submit){this.peer._table._submit._renderButton(true,this.peer._table)}if(!Core.Web.Env.BROWSER_SAFARI){this.peer._table._input.disabled=true}this.component.notifyStart(this._uploadIndex);this._startProgressPoller()},_uploadEnded:function(){this._stopProgressPoller();this.component.notifyComplete(this._uploadIndex);if(this._connection){this._connection.dispose()}this.peer._refreshFrame(this)},_pollProgress:function(){if(!this._enableProgressPoll){return}this._connection=new Core.Web.HttpConnection(this._createProgressUrl(),"GET",null,null);this._connection.addResponseListener(Core.method(this,this._processProgressResponse));this._connection.connect()},_processProgressResponse:function(f){if(f.source.getStatus()!=200){Core.Debug.consoleWrite("Invalid response: "+f.source.getResponseText())}Core.Debug.consoleWrite("Response: "+f.source.getResponseText());var b=f.source.getResponseText();var h=new echopoint.tucana.UploadProgress(b);var g=parseInt(h.bytesRead/1000)+" of "+parseInt(h.contentLength/1000)+"Kb";if(this.component&&this.component.getComponentCount()>0){var d=this.component.getComponent(0);var c=d.render(echopoint.tucana.FileUploadSelector.PATTERN);if(c){c=c.replace("#bytes#",parseInt(h.bytesRead/1000));c=c.replace("#length#",parseInt(h.contentLength/1000));c=c.replace("#rate#",parseInt(h.transferRate/1000));c=c.replace("#percent#",h.percentComplete);c=c.replace("#time#",h.estimatedTimeLeft);d.set(echopoint.ProgressBar.TEXT,c)}else{d.set(echopoint.ProgressBar.TEXT,g)}d.set(echopoint.ProgressBar.PERCENTAGE,h.percentComplete);d.peer.renderUpdate()}else{Core.Debug.consoleWrite(g)}var a=h.status;if((a=="completed")||(a=="failed")||(a=="cancelled")||(a=="disallowed")){if(h.message){if(d){d.set(echopoint.ProgressBar.TEXT,h.message)}else{if(a!="completed"){alert(h.message)}}}this._uploadEnded()}if(this._enableProgressPoll){this._startProgressPoller()}},_startProgressPoller:function(){this._enableProgressPoll=true;Core.Web.Scheduler.run(Core.method(this,this._pollProgress),this._pollingInterval,false)},_stopProgressPoller:function(){this._enableProgressPoll=false},_processCancel:function(){Core.Debug.consoleWrite("File upload cancelled!");this._uploadEnded()},_processSubmit:function(a){if(a){Core.Web.DOM.preventEventDefault(a)}if(!this.peer._table._input){return}this._loadStage=echopoint.tucana.FileUploadSelectorSync._STAGE_QUEUED;Core.Web.Event.remove(this.peer._form,"submit",Core.method(this,this._processSubmit),false);this._submitListenerBound=false;if(this.component.render("queueEnabled")){this.component.peer._createFrame()}this.peer._startNextUpload()},_processLoad:function(){if(this._loadStage){this._uploadEnded();return}this._loadStage=echopoint.tucana.FileUploadSelectorSync._STAGE_LOADED},_createProgressUrl:function(){return echopoint.tucana.FileUploadSelectorSync._PROGRESS_SERVICE+"&i="+this.component.renderId+"&x="+this._uploadIndex},_dispose:function(){this._stopProgressPoller();if(this._submitListenerBound){Core.Web.Event.remove(this.peer._form,"submit",Core.method(this,this._processSubmit),false);this._submitListenerBound=false}if(this._loadStage==echopoint.tucana.FileUploadSelectorSync._STAGE_UPLOADING){var b=this._frameElement.contentWindow;if(b.stop){b.stop()}else{if(b.document&&b.document.execCommand){b.document.execCommand("Stop")}else{b.location.href=this.peer.client.getResourceUrl("Echo","resource/Blank.html")}}}if(Core.Web.Env.BROWSER_MOZILLA){var a=this._frameElement;setTimeout(function(){if(a&&a.parentNode){a.parentNode.removeChild(a)}else{Core.Debug.consoleWrite("No parent node for frame")}},0)}else{if(this._frameElement){Core.Web.DOM.removeNode(this._frameElement)}}this.component=null;this._uploadIndex=null;this._loadStage=null;this._frameElement=null}});echopoint.tucana.FileUploadSelectorSync.Table=Core.extend({_table:null,_tbody:null,_input:null,_submit:null,_tdSubmitLeft:null,_tdSubmitRight:null,$construct:function(a){this.peer=a;this.component=a.component},_renderAdd:function(a){a.appendChild(this._createTable());this._tbody=document.createElement("tbody");this._tbody.appendChild(this._createRow());this._table.appendChild(this._tbody)},_renderDispose:function(){if(this._submit){this._submit._renderDispose()}this._submit=null;this._input=null;this._tdSubmitLeft=null;this._tdSubmitRight=null;this._tbody=null;this._table=null},_createTable:function(){this._table=document.createElement("table");this._table.id=this.component.renderId+"|Table";this._table.style.borderCollapse="collapse";this._table.appendChild(document.createElement("thead"));return this._table},_createRow:function(){var b=document.createElement("tr");this._tdSubmitLeft=document.createElement("td");this._tdSubmitLeft.style.display="none";this._tdSubmitLeft.style.padding="0px 2px 0px 0px";b.appendChild(this._tdSubmitLeft);var a=document.createElement("td");a.style.padding="0px 2px 0px 2px";a.appendChild(this._createInput());b.appendChild(a);this._tdSubmitRight=document.createElement("td");this._tdSubmitRight.style.display="none";this._tdSubmitRight.style.padding="0px 0px 0px 2px";this._tdSubmitRight.style.padding="1px";b.appendChild(this._tdSubmitRight);this._createSubmit();return b},_createInput:function(){this._input=document.createElement("input");this._input.id=this.component.renderId+"|Input|"+this.peer._uploadIndex;this._input.type="file";this._input.name="$$file$$";var a=Echo.Sync.Extent.toPixels(this.component.render(echopoint.tucana.FileUploadSelector.INPUT_SIZE,echopoint.tucana.FileUploadSelector.DEFAULT_INPUT_SIZE));this._input.setAttribute("size",parseInt(a));Echo.Sync.Color.render(this.component.render(echopoint.internal.AbstractContainer.FOREGROUND),this._input,"color");this.peer.renderInsets(this._input);this.peer.renderFont(this._input);return this._input},_createSubmit:function(){var b=this.component.render(echopoint.tucana.FileUploadSelector.BUTTON_DISPLAY,echopoint.tucana.FileUploadSelector.DEFAULT_BUTTON_DISPLAY);if(b!="none"){this._submit=new echopoint.tucana.FileUploadSelectorSync.Button(this.peer);this._submit._renderAdd(this)}else{var a=this.peer;this._input.onchange=function(c){a._frames[a._uploadIndex]._processSubmit(c)}}return this._submit}});echopoint.tucana.FileUploadSelectorSync.Button=Core.extend({_submit:null,_mode:null,_uploadText:null,_cancelText:null,_waitText:null,_uploadImage:null,_cancelImage:null,_waitImage:null,_display:null,_cancel:true,$construct:function(a){this.peer=a;this.component=a.component},_renderAdd:function(a){this._submit=document.createElement("input");this._renderStyle();this._renderButton(false,a)},_renderDispose:function(){},_renderStyle:function(){this._setButtonMode();this._setUploadText();this._setCancelText();this._setWaitText();this._setUploadImage();this._setCancelImage();this._setWaitImage();this._setDisplay();this._setCancel();Echo.Sync.Font.render(this.component.render("font"),this._submit);Echo.Sync.Color.render(this.component.render("foreground"),this._submit,"color")},_setButtonMode:function(){this._mode=this.component.render(echopoint.tucana.FileUploadSelector.BUTTON_MODE,echopoint.tucana.FileUploadSelector.DEFAULT_BUTTON_MODE)},_setUploadText:function(){this._uploadText=this.component.render(echopoint.tucana.FileUploadSelector.BUTTON_TEXT_UPLOAD,echopoint.tucana.FileUploadSelector.DEFAULT_UPLOAD_TEXT)},_setCancelText:function(){this._cancelText=this.component.render(echopoint.tucana.FileUploadSelector.BUTTON_TEXT_CANCEL,echopoint.tucana.FileUploadSelector.DEFAULT_CANCEL_TEXT)},_setWaitText:function(){this._waitText=this.component.render(echopoint.tucana.FileUploadSelector.BUTTON_TEXT_WAIT,echopoint.tucana.FileUploadSelector.DEFAULT_WAIT_TEXT)},_setUploadImage:function(){this._uploadImage=this.component.render(echopoint.tucana.FileUploadSelector.BUTTON_IMAGE_UPLOAD,this.peer.client.getResourceUrl("echopoint",echopoint.tucana.FileUploadSelector.DEFAULT_IMAGE_UPLOAD))},_setCancelImage:function(){this._cancelImage=this.component.render(echopoint.tucana.FileUploadSelector.BUTTON_IMAGE_CANCEL,this.peer.client.getResourceUrl("echopoint",echopoint.tucana.FileUploadSelector.DEFAULT_IMAGE_CANCEL))},_setWaitImage:function(){this._waitImage=this.component.render(echopoint.tucana.FileUploadSelector.BUTTON_IMAGE_WAIT,this.peer.client.getResourceUrl("echopoint",echopoint.tucana.FileUploadSelector.DEFAULT_IMAGE_WAIT))},_setDisplay:function(){this._display=this.component.render(echopoint.tucana.FileUploadSelector.BUTTON_DISPLAY,echopoint.tucana.FileUploadSelector.DEFAULT_BUTTON_DISPLAY)},_setCancel:function(){this._cancel=this.component.render(echopoint.tucana.FileUploadSelector.CANCEL_ENABLED,echopoint.tucana.FileUploadSelector.DEFAULT_CANCEL_ENABLED)},_renderButton:function(d,a){var g=this._mode;if(Core.Web.Env.BROWSER_SAFARI){g="submit";Core.Debug.consoleWrite("Using text buttons for Safari as image does not seem to work!")}this._submit.setAttribute("type",g);if(g=="image"){var f=null;if(d){f=(this._cancel)?this._cancelImage:this._waitImage}else{f=this._uploadImage}this._submit.setAttribute("src",f)}else{var e;var c=false;if(d){if(this._cancel){e=this._cancelText}else{e=this._waitText;c=true}}else{e=this._uploadText}if(e==null){this._submit.removeAttribute("value")}else{this._submit.setAttribute("value",e)}Echo.Sync.Color.render(this.component.render(echopoint.internal.AbstractContainer.FOREGROUND),this._submit,"color");this.peer.renderFont(this._submit)}this._submit.disabled=c;this.peer.renderInsets(this._submit);var b=this._display;if(b=="auto"){b=(Core.Web.Env.BROWSER_SAFARI)?"left":"right"}Core.Web.DOM.removeAllChildren(a);switch(b){case"right":a._tdSubmitRight.appendChild(this._submit);a._tdSubmitRight.style.display="block";a._tdSubmitLeft.style.display="none";break;case"left":a._tdSubmitLeft.appendChild(this._submit);a._tdSubmitLeft.style.display="block";a._tdSubmitRight.style.display="none";break;default:a._tdSubmitLeft.style.display="none";a._tdSubmitRight.style.display="none";break}}});echopoint.google.chart.model.ChartData=Core.extend({xdata:null,xmax:null,ydata:null,ymax:null,size:null,color:null,legend:null,markers:null,$construct:function(a,b){this.xdata=a;this.xmax=b},getXMax:function(){if(this.xmax){return this.xmax}var c=-1;for(var a=0;a<this.xdata.length;++a){var b=this.xdata[a];if(b>c){c=b}}return c},getYMax:function(){if(this.ymax){return this.ymax}var c=-1;for(var a=0;a<this.ydata.length;++a){var b=this.ydata[a];if(b>c){c=b}}return c},getSizeMax:function(){var c=-1;for(var a=0;a<this.size.length;++a){var b=this.size[a];if(b>c){c=b}}return c}});echopoint.google.chart.model.Title=Core.extend({_title:null,$construct:function(a){this._title=new Array();if(a){this._title.push(a)}},add:function(a){this._title.push(a)},getText:function(){var a=this._title.join("|");return a.replace(/\s+/g,"+")},toString:function(){return this.getText()}});echopoint.google.chart.model.Range=Core.extend({minimum:null,maximum:null,$construct:function(b,a){this.minimum=b;this.maximum=a}});echopoint.google.chart.model.LineStyle=Core.extend({thickness:null,segmentLength:null,blankSegmentLength:null,$construct:function(c,a,b){this.thickness=(c)?c:1;this.segmentLength=(a)?a:1;this.blankSegmentLength=(b)?b:0}});echopoint.google.chart.internal.Marker=Core.extend({$abstract:true,$virtual:{markerType:null,color:null}});echopoint.google.chart.model.ShapeMarker=Core.extend(echopoint.google.chart.internal.Marker,{size:null,priority:null,$construct:function(b,d,c,a){this.markerType=b;this.color=d;this.size=c;this.priority=(a)?a:0}});echopoint.google.chart.model.RangeMarker=Core.extend(echopoint.google.chart.internal.Marker,{startPoint:null,endPoint:null,$construct:function(b,c,d,a){this.markerType=b;this.color=c;this.startPoint=d;this.endPoint=a}});echopoint.google.chart.model.FillArea=Core.extend(echopoint.google.chart.internal.Marker,{startIndex:null,endIndex:null,$construct:function(b,c,d,a){this.markerType=b;this.color=c;this.startIndex=d;this.endIndex=a}});echopoint.constants.ABSTRACT_CHART="echopoint.google.chart.internal.AbstractChart";echopoint.constants.SIMPLE_CHART="echopoint.google.chart.internal.SimpleChart";echopoint.constants.ADVANCED_CHART="echopoint.google.chart.internal.AdvancedChart";echopoint.constants.BAR_CHART="echopoint.google.chart.BarChart";echopoint.constants.LINE_CHART="echopoint.google.chart.LineChart";echopoint.constants.SPARKLINE="echopoint.google.chart.Sparkline";echopoint.constants.SCATTER_PLOT="echopoint.google.chart.ScatterPlot";echopoint.constants.RADAR_CHART="echopoint.google.chart.RadarChart";echopoint.constants.PIE_CHART="echopoint.google.chart.PieChart";echopoint.constants.VENN_DIAGRAM="echopoint.google.chart.VennDiagram";echopoint.constants.MAP="echopoint.google.chart.Map";echopoint.constants.METER="echopoint.google.chart.Meter";echopoint.constants.QRCODE="echopoint.google.chart.QRCode";echopoint.google.chart.internal.AbstractChart=Core.extend(echopoint.internal.AbstractContainer,{$abstract:true,$static:{ALT:"alt",FILL:"fill",DATA:"data",TITLE:"title"},$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.ABSTRACT_CHART,this)}});echopoint.google.chart.internal.SimpleChart=Core.extend(echopoint.google.chart.internal.AbstractChart,{$abstract:true,$static:{LEGEND_POSITION:"legendPosition"},$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.SIMPLE_CHART,this)}});echopoint.google.chart.internal.AdvancedChart=Core.extend(echopoint.google.chart.internal.SimpleChart,{$abstract:true,$static:{AXIS_TYPE:"axisType",AXIS_LABELS:"axisLabels",LABEL_POSITIONS:"labelPositions",AXIS_RANGES:"axisRanges",AXIS_STYLES:"axisStyles",LINE_STYLES:"lineStyles",GRID_LINES:"gridLines",RANGE_MARKERS:"rangeMarkers",FILL_AREA:"fillArea"},$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.ADVANCED_CHART,this)}});echopoint.google.chart.BarChart=Core.extend(echopoint.google.chart.internal.AdvancedChart,{$static:{HORIZONTAL:"bhs",HORIZONTAL_MULTI_COLOR:"bhg",VERTICAL:"bvs",VERTICAL_MULTI_COLOR:"bvg",ORIENTATION:"orientation",SIZE:"size",ZERO_LINE:"zeroLine"},$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.BAR_CHART,this)},componentType:echopoint.constants.BAR_CHART});echopoint.google.chart.LineChart=Core.extend(echopoint.google.chart.internal.AdvancedChart,{$static:{X_DATA:"lc",XY_DATA:"lxy"},$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.LINE_CHART,this)},componentType:echopoint.constants.LINE_CHART});echopoint.google.chart.Sparkline=Core.extend(echopoint.google.chart.internal.AdvancedChart,{$static:{CHART_TYPE:"ls"},$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.SPARKLINE,this)},componentType:echopoint.constants.SPARKLINE});echopoint.google.chart.ScatterPlot=Core.extend(echopoint.google.chart.internal.AdvancedChart,{$static:{CHART_TYPE:"s"},$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.SCATTER_PLOT,this)},componentType:echopoint.constants.SCATTER_PLOT});echopoint.google.chart.RadarChart=Core.extend(echopoint.google.chart.internal.AdvancedChart,{$static:{STRAIGHT_LINE:"r",SPLINE:"rs",LINE_STYLE:"lineStyle"},$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.RADAR_CHART,this)},componentType:echopoint.constants.RADAR_CHART});echopoint.google.chart.PieChart=Core.extend(echopoint.google.chart.internal.SimpleChart,{$static:{TWO_DIMENSIONAL:"p",THREE_DIMENSIONAL:"p3",DIMENSIONS:"dimensions",LABELS:"labels"},$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.PIE_CHART,this)},componentType:echopoint.constants.PIE_CHART});echopoint.google.chart.VennDiagram=Core.extend(echopoint.google.chart.internal.SimpleChart,{$static:{CHART_TYPE:"v"},$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.VENN_DIAGRAM,this)},componentType:echopoint.constants.VENN_DIAGRAM});echopoint.google.chart.Map=Core.extend(echopoint.google.chart.internal.AbstractChart,{$static:{AFRICA:"africa",ASIA:"asia",EUROPE:"europe",MIDDLE_EAST:"middle_east",SOUTH_AMERICA:"south_america",USA:"usa",WORLD:"world",CHART_TYPE:"t",MAX_SIZE:440*220,GEOGRAPHICAL_AREA:"region",COLORS:"colors",CODES:"codes"},$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.MAP,this)},componentType:echopoint.constants.MAP});echopoint.google.chart.Meter=Core.extend(echopoint.google.chart.internal.AbstractChart,{$static:{CHART_TYPE:"gom",LABEL:"label"},$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.METER,this)},componentType:echopoint.constants.METER});echopoint.google.chart.QRCode=Core.extend(echopoint.google.chart.internal.AbstractChart,{$static:{CHART_TYPE:"qr",TEXT:"text",ENCODING:"encoding"},$load:function(){Echo.ComponentFactory.registerType(echopoint.constants.QRCODE,this)},componentType:echopoint.constants.QRCODE});echopoint.google.chart.internal.AbstractChartSync=Core.extend(echopoint.internal.AbstractContainerSync,{$abstract:true,$static:{ALT_CONTENT:"Echopoint Chart",ALT:"alt",COLORS:["ff0033","66ffff","00ff33","ffcc00","ff00ff","3399ff","996666","ff3333","9933ff","ffff33"],DEFAULT_HEIGHT:"600",DEFAULT_WIDTH:"500"},$load:function(){Echo.Render.registerPeer(echopoint.constants.ABSTRACT_CHART,this)},$virtual:{_simpleEncoding:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",_chart:null,_objectMap:null,getChartType:function(){throw"getChartType must be implemented"},encode:function(b){if(!b){return""}var a=new Array();this._encodeXData(b,a);this._encodeYData(b,a);this.encodeSize(b,a);return a.join("")},encodeSize:function(b,a){},getData:function(){var key=echopoint.google.chart.internal.AbstractChart.DATA;var _data=this._objectMap[key];if(_data){return _data}var value=this.component.get(key);if(value instanceof Array){this._objectMap[key]=value}else{var json=eval("("+value+")");var array=new Array();for(var i=0;i<json.list.length;++i){var chartData=json.list[i];var data=new echopoint.google.chart.model.ChartData(chartData.xdata,chartData.xmax);if(chartData.ydata.length>0){data.ydata=chartData.ydata}var ymax=chartData.ymax;if(ymax){data.ymax=ymax}if(chartData.size&&chartData.size.length>0){data.size=chartData.size}data.color=chartData.color;data.legend=chartData.legend;var markers=new Array();var mks=chartData.markers;if(mks){for(var j=0;j<mks.length;++j){var marker=new echopoint.google.chart.model.ShapeMarker(mks[j].markerType,mks[j].color,mks[j].size);marker.priority=mks[j].priority;markers[j]=marker}}data.markers=markers;array[i]=data}this._objectMap[key]=array}return this._objectMap[key]},getHeight:function(){var a=this.component.render(echopoint.internal.AbstractContainer.HEIGHT);return((a)?this._stripPixels(a):this.getDefaultHeight())},getWidth:function(){var a=this.component.render(echopoint.internal.AbstractContainer.WIDTH);return((a)?this._stripPixels(a):this.getDefaultWidth())},getTitle:function(){var key=echopoint.google.chart.internal.AbstractChart.TITLE;var _title=this._objectMap[key];if(_title){return _title}var value=this.component.get(key);if(!value){return null}if(value instanceof echopoint.google.chart.model.Title){this._objectMap[key]=value}else{var json=eval("("+value+")");var title=new echopoint.google.chart.model.Title();for(var i=0;i<json.Title.title.length;++i){title.add(json.Title.title[i])}this._objectMap[key]=title}return this._objectMap[key]},getUrl:function(){var c=this.getData();var a="http://chart.apis.google.com/chart?chs=";a+=this.getWidth()+"x"+this.getHeight();a+="&cht="+this.getChartType();a+="&chd=s:";for(var b=0;b<c.length;++b){if(b>0){a+=","}a+=this.encode(c[b])}a=this.setColors(a);a=this.setFill(a);a=this.setTitle(a);a=this.setFont(a);a=this.setAltContent(a);a=this.setAdditionalParameters(a);return a},setAdditionalParameters:function(a){return a},getAltContent:function(){var a=this.component.get(echopoint.google.chart.internal.AbstractChart.ALT);return((a)?a:echopoint.google.chart.internal.AbstractChartSync.ALT_CONTENT)},setAltContent:function(a){a+="&alt="+this.getAltContent();return a},setColors:function(b){var e=this.getData();b+="&chco=";var a=0;var d=echopoint.google.chart.internal.AbstractChartSync.COLORS.length;for(var c=0;c<e.length;++c){if(e[c].color){b+=e[c].color}else{a=c%d;b+=echopoint.google.chart.internal.AbstractChartSync.COLORS[a]}if(c!=e.length-1){b+=","}}return b},setFill:function(a){var b=this.component.render(echopoint.google.chart.internal.AbstractChart.FILL);if(b){a+="&chf="+b}return a},setFont:function(b){b+="&chts=";var c=this.component.render(echopoint.internal.AbstractContainer.FOREGROUND);if(c&&c.charAt(0)=="#"){c=c.substr(1)}b+=(c)?c:"000000";var a=this.component.render(echopoint.internal.AbstractContainer.FONT);if(a){b+=","+a.size}return b},setTitle:function(a){var b=this.getTitle();if(b){a+="&chtt="+b.getText()}return a}},renderAdd:function(b,a){this._objectMap=new Array();this._chart=document.createElement("img");this._chart.id=this.component.renderId;this.renderStyle(this._chart);this._chart.setAttribute("src",this.getUrl());this._chart.setAttribute("alt",this.getAltContent());a.appendChild(this._chart)},renderDispose:function(a){this._chart=null;this._objectMap=null},renderUpdate:function(b){var a=this._chart.parentNode;this.renderDispose(b);this.renderAdd(b,a)},getDefaultHeight:function(){return echopoint.google.chart.internal.AbstractChartSync.DEFAULT_HEIGHT},getDefaultWidth:function(){return echopoint.google.chart.internal.AbstractChartSync.DEFAULT_WIDTH},_encodeXData:function(e,d){var a=e.getXMax();for(var b=0;b<e.xdata.length;b++){var c=e.xdata[b];if(!isNaN(c)&&c>=0){d.push(this._simpleEncoding.charAt(Math.round((this._simpleEncoding.length-1)*c/a)))}else{d.push("_")}}},_encodeYData:function(e,d){if(e.ydata){d.push(",");var a=e.getYMax();for(var b=0;b<e.ydata.length;b++){var c=e.ydata[b];if(!isNaN(c)&&c>=0){d.push(this._simpleEncoding.charAt(Math.round((this._simpleEncoding.length-1)*c/a)))}else{d.push("_")}}}},_stripPixels:function(b){var c=""+b;var a=c.indexOf("px");if(a!=-1){c=c.substring(0,a)}return c}});echopoint.google.chart.internal.SimpleChartSync=Core.extend(echopoint.google.chart.internal.AbstractChartSync,{$abstract:true,$load:function(){Echo.Render.registerPeer(echopoint.constants.SIMPLE_CHART,this)},$virtual:{setLegend:function(a){var c=this.getData();if(!c[0].legend){return a}a+="&chdl=";for(var b=0;b<c.length;++b){a+=c[b].legend;if(b!=c.length-1){a+="|"}}return a},setLegendPosition:function(b){var a=this.component.render(echopoint.google.chart.internal.SimpleChart.LEGEND_POSITION);if(a){b+="&chdlp="+a}return b},setAdditionalParameters:function(a){a=this.setLegend(a);a=this.setLegendPosition(a);return a}}});echopoint.google.chart.internal.AdvancedChartSync=Core.extend(echopoint.google.chart.internal.SimpleChartSync,{$abstract:true,$load:function(){Echo.Render.registerPeer(echopoint.constants.ADVANCED_CHART,this)},$virtual:{getAxisLabels:function(){return this._processArrays(echopoint.google.chart.internal.AdvancedChart.AXIS_LABELS)},getLabelPositions:function(){return this._processArrays(echopoint.google.chart.internal.AdvancedChart.LABEL_POSITIONS)},getAxisRanges:function(){var key=echopoint.google.chart.internal.AdvancedChart.AXIS_RANGES;var _ranges=this._objectMap[key];if(_ranges){return _ranges}var value=this.component.get(key);if(!value){return null}if(value instanceof Array){this._objectMap[key]=value}else{var json=eval("("+value+")");var array=new Array();for(var i=0;i<json.list.length;++i){array[i]=new echopoint.google.chart.model.Range(json.list[i].minimum,json.list[i].maximum)}this._objectMap[key]=array}return this._objectMap[key]},getLineStyles:function(){var key=echopoint.google.chart.internal.AdvancedChart.LINE_STYLES;var _styles=this._objectMap[key];if(_styles){return _styles}var value=this.component.get(key);if(!value){return null}if(value instanceof Array){this._objectMap[key]=value}else{var json=eval("("+value+")");var array=new Array();for(var i=0;i<json.list.length;++i){array[i]=new echopoint.google.chart.model.LineStyle(json.list[i].thickness,json.list[i].segmentLength,json.list[i].blankSegmentLength)}this._objectMap[key]=array}return this._objectMap[key]},getRangeMarkers:function(){var key=echopoint.google.chart.internal.AdvancedChart.RANGE_MARKERS;var _markers=this._objectMap[key];if(_markers){return _markers}var value=this.component.get(key);if(!value){return null}if(value instanceof Array){this._objectMap[key]=value}else{var json=eval("("+value+")");var array=new Array();for(var i=0;i<json.list.length;++i){array[0]=new echopoint.google.chart.model.RangeMarker(json.list[i].markerType,json.list[i].color,json.list[i].startPoint,json.list[i].endPoint)}this._objectMap[key]=array}return this._objectMap[key]},getFillArea:function(){var key=echopoint.google.chart.internal.AdvancedChart.FILL_AREA;var _fill=this._objectMap[key];if(_fill){return _fill}var value=this.component.get(key);if(!value){return null}if(value instanceof Array){this._objectMap[key]=value}else{var json=eval("("+value+")");var array=new Array();for(var i=0;i<json.list.length;++i){array[0]=new echopoint.google.chart.model.FillArea(json.list[i].markerType,json.list[i].color,json.list[i].startIndex,json.list[i].endIndex)}this._objectMap[key]=array}return this._objectMap[key]},setAdditionalParameters:function(a){a=this.setAxisType(a);a=this.setLabels(a);a=this.setLabelPositions(a);a=this.setLegend(a);a=this.setLegendPosition(a);a=this.setAxisRange(a);a=this.setAxisStyle(a);a=this.setLineStyles(a);a=this.setGridLines(a);a=this.setMarkers(a);return a},setAxisType:function(a){var b=this.component.render(echopoint.google.chart.internal.AdvancedChart.AXIS_TYPE);if(b){a+="&chxt="+b}return a},setLabels:function(b){var f=this.getAxisLabels();if(!f){return b}b+="&chxl=";var d="&chxl=";for(var c=0;c<f.length;++c){d+=c+":|";var e=f[c];for(var a=0;a<e.length;++a){d+=e[a]+"|"}}b+=d.substring(0,d.length-1);return b},setLabelPositions:function(c){var e=this.getLabelPositions();if(!e){return c}c+="&chxp=";for(var d=0;d<e.length;++d){var a=e[d];if(a.length>0){c+=d+","}for(var b=0;b<a.length;++b){c+=a[b];if(b<a.length-1){c+=","}else{if(d<e.length-1){c+="|"}}}}return this._trimPipes(c)},setAxisRange:function(b){var d=this.getAxisRanges();if(!d){return b}b+="&chxr=";for(var c=0;c<d.length;++c){var a=d[c];if(a){b+=c+",";b+=a.minimum+","+a.maximum+"|"}}return this._trimPipes(b)},setAxisStyle:function(a){var b=this.component.render(echopoint.google.chart.internal.AdvancedChart.AXIS_STYLES);if(b){a+="&chxs="+b}return a},setLineStyles:function(a){var d=this.getLineStyles();if(d){a+="&chls=";for(var b=0;b<d.length;++b){var c=d[b];a+=c.thickness+","+c.segmentLength+","+c.blankSegmentLength+"|"}}return this._trimPipes(a)},setGridLines:function(a){var b=this.component.render(echopoint.google.chart.internal.AdvancedChart.GRID_LINES);if(b){a+="&chg="+b}return a},setMarkers:function(c){var f=this.getData();var b=this.getRangeMarkers();var a=this.getFillArea();var e=false;if(b){e=true}if(a){e=true}var d;if(!e){for(d=0;d<f.length;++d){if(f[d].markers){e=true}}}if(!e){return c}c+="&chm=";for(d=0;d<f.length;++d){c=this.setShapeMarkers(c,f[d],d)}c=this.setRangeMarkers(c,b);c=this.setFillArea(c,a);return this._trimPipes(c)},setShapeMarkers:function(c,e,b){var f=e.markers;var a;if(f){if(f.length==1){a=f[0];c+=a.markerType+","+a.color+","+b+",-1,"+a.size+","+a.priority+"|"}else{for(var d=0;d<f.length;++d){a=f[d];if(a){c+=a.markerType+","+a.color+","+b+","+d+","+a.size+","+a.priority+"|"}}}}return c},setRangeMarkers:function(b,d){if(d){for(var c=0;c<d.length;++c){var a=d[c];b+=a.markerType+","+a.color+",0,"+a.startPoint+","+a.endPoint+"|"}}return b},setFillArea:function(b,d){if(d){for(var c=0;c<d.length;++c){var a=d[c];b+=a.markerType+","+a.color+","+a.startIndex+","+a.endIndex+",0|"}}return b}},_processArrays:function(key){var _labels=this._objectMap[key];if(_labels){return _labels}var value=this.component.get(key);if(!value){return null}if(value instanceof Array){this._objectMap[key]=value}else{var json=eval("("+value+")");var array=new Array();for(var i=0;i<json.list.length;++i){var labels=new Array();var jsonLabels=json.list[i];for(var j=0;j<jsonLabels.length;++j){labels[j]=jsonLabels[j]}array[i]=labels}this._objectMap[key]=array}return this._objectMap[key]},_trimPipes:function(a){return a.replace(/\|+$/g,"")}});echopoint.google.chart.BarChartSync=Core.extend(echopoint.google.chart.internal.AdvancedChartSync,{$load:function(){Echo.Render.registerPeer(echopoint.constants.BAR_CHART,this)},getChartType:function(){var a=this.component.render(echopoint.google.chart.BarChart.ORIENTATION);return(a)?a:echopoint.google.chart.BarChart.VERTICAL},setAdditionalParameters:function(a){a=this.setWidth(a);a=this.setZeroLine(a);return a},setWidth:function(a){var b=this.component.render(echopoint.google.chart.BarChart.SIZE);if(b){a+="&chbh="+b}return a},setZeroLine:function(b){var a=this.component.render(echopoint.google.chart.BarChart.ZERO_LINE);if(a){b+="&chp="+a}return b}});echopoint.google.chart.LineChartSync=Core.extend(echopoint.google.chart.internal.AdvancedChartSync,{$load:function(){Echo.Render.registerPeer(echopoint.constants.LINE_CHART,this)},getChartType:function(){var a=this.getData();return((a[0].ydata)?echopoint.google.chart.LineChart.XY_DATA:echopoint.google.chart.LineChart.X_DATA)}});echopoint.google.chart.SparklineSync=Core.extend(echopoint.google.chart.internal.AdvancedChartSync,{$load:function(){Echo.Render.registerPeer(echopoint.constants.SPARKLINE,this)},getChartType:function(){return echopoint.google.chart.Sparkline.CHART_TYPE}});echopoint.google.chart.ScatterPlotSync=Core.extend(echopoint.google.chart.internal.AdvancedChartSync,{$load:function(){Echo.Render.registerPeer(echopoint.constants.SCATTER_PLOT,this)},getChartType:function(){return echopoint.google.chart.ScatterPlot.CHART_TYPE},encodeSize:function(e,d){if(e.size){d.push(",");var a=e.getSizeMax();for(var b=0;b<e.size.length;b++){var c=e.size[b];if(!isNaN(c)&&c>=0){d.push(this._simpleEncoding.charAt(Math.round((this._simpleEncoding.length-1)*c/a)))}else{d.push("_")}}}}});echopoint.google.chart.RadarChartSync=Core.extend(echopoint.google.chart.internal.AdvancedChartSync,{$load:function(){Echo.Render.registerPeer(echopoint.constants.RADAR_CHART,this)},getChartType:function(){var a=this.component.render(echopoint.google.chart.RadarChart.LINE_STYLE);return(a)?a:echopoint.google.chart.RadarChart.STRAIGHT_LINE}});echopoint.google.chart.PieChartSync=Core.extend(echopoint.google.chart.internal.SimpleChartSync,{$load:function(){Echo.Render.registerPeer(echopoint.constants.PIE_CHART,this)},getChartType:function(){return this.component.render(echopoint.google.chart.PieChart.DIMENSIONS,echopoint.google.chart.PieChart.TWO_DIMENSIONAL)},setLabels:function(a){var b=this.component.get(echopoint.google.chart.PieChart.LABELS);if(!b){return a}a+="&chl=";if(b instanceof Array){a+=b.join("|")}else{a+=b}return a},setAdditionalParameters:function(a){return this.setLabels(a)},setLegend:function(a){return a},setLegendPosition:function(a){return a}});echopoint.google.chart.VennDiagramSync=Core.extend(echopoint.google.chart.internal.SimpleChartSync,{$load:function(){Echo.Render.registerPeer(echopoint.constants.VENN_DIAGRAM,this)},getChartType:function(){return echopoint.google.chart.VennDiagram.CHART_TYPE}});echopoint.google.chart.MapSync=Core.extend(echopoint.google.chart.internal.AbstractChartSync,{$static:{DEFAULT_HEIGHT:"220",DEFAULT_WIDTH:"440"},$load:function(){Echo.Render.registerPeer(echopoint.constants.MAP,this)},getChartType:function(){return echopoint.google.chart.Map.CHART_TYPE},setAdditionalParameters:function(a){a=this.setGeographicalArea(a);a=this.setColors(a);a=this.setCodes(a);return a},setGeographicalArea:function(a){var b=this.component.render(echopoint.google.chart.Map.GEOGRAPHICAL_AREA);a+="&chtm="+((b)?b:echopoint.google.chart.Map.WORLD);return a},setColors:function(b){var a=this.component.render(echopoint.google.chart.Map.COLORS);if(a){b+="&chco="+a}return b},setCodes:function(b){var a=this.component.render(echopoint.google.chart.Map.CODES);if(a){b+="&chld="+a}return b},getDefaultHeight:function(){return echopoint.google.chart.MapSync.DEFAULT_HEIGHT},getDefaultWidth:function(){return echopoint.google.chart.MapSync.DEFAULT_WIDTH}});echopoint.google.chart.MeterSync=Core.extend(echopoint.google.chart.internal.AbstractChartSync,{$load:function(){Echo.Render.registerPeer(echopoint.constants.METER,this)},getChartType:function(){return echopoint.google.chart.Meter.CHART_TYPE},setAdditionalParameters:function(a){a=this.setLabel(a);return a},setLabel:function(b){var a=this.component.render(echopoint.google.chart.Meter.LABEL);if(a){b+="&chl="+a}return b}});echopoint.google.chart.QRCodeSync=Core.extend(echopoint.google.chart.internal.AbstractChartSync,{$load:function(){Echo.Render.registerPeer(echopoint.constants.QRCODE,this)},getChartType:function(){return echopoint.google.chart.QRCode.CHART_TYPE},getUrl:function(){var a="http://chart.apis.google.com/chart?chs=";a+=this.getWidth()+"x"+this.getHeight();a+="&cht="+this.getChartType();a=this.setText(a);a=this.setEncoding(a);return a},setText:function(a){var b=this.component.get(echopoint.google.chart.QRCode.TEXT);a+="&chl="+escape(b);return a},setEncoding:function(a){var b=this.component.render(echopoint.google.chart.QRCode.ENCODING);if(b){a+="&choe="+b}return a}});echopoint.test={};echopoint.test.TestApp=Core.extend(Echo.Application,{_mainContent:null,$construct:function(){Echo.Application.call(this);this.rootComponent.removeAll();this._mainContent=new echopoint.test.MainContent();this.rootComponent.add(this._mainContent)},getMainContent:function(){return this._mainContent}});var testApp=null;function init(){Core.Web.init();testApp=new echopoint.test.TestApp();var a=new Echo.FreeClient(testApp,document.getElementById("rootArea"));a.addResourcePath("Echo","lib/echo/");a.addResourcePath("Extras","lib/extras/");a.addResourcePath("echopoint","resource/");testApp.setStyleSheet(echopoint.test.TestApp.StyleSheet);a.init()}echopoint.test.TestApp.StyleSheet=new Echo.StyleSheet({RowStrut:{"echopoint.Strut":{border:"1px outset #709bcd",width:"50px",height:"20px"}},ColumnStrut:{"echopoint.Strut":{border:"1px outset #709bcd",height:"100px",width:"100px"}},SimpleChart:{"echopoint.google.chart.BarChart":{axisType:"x,y,t,r",border:"2px groove #cfdfff",fill:"bg,s,efefef|c,lg,45,ffffff,0,76a4fb,0.75",foreground:"ff0000",font:{size:"10"},gridLines:"10,20,5,2",legendPosition:"l",width:"400",height:"400",insets:10,size:"10,5,15"},"echopoint.google.chart.LineChart":{axisType:"x,y",axisStyles:"0,00ff33,13,1|1,0033ff,13,-1",border:"2px groove #cfdfff",fill:"bg,s,efefef|c,s,00000080",font:{size:"12"},foreground:"ff0000",gridLines:"10,10,1,0",width:"600",height:"400",insets:10},"echopoint.google.chart.Sparkline":{axisType:"x,y",axisStyles:"0,00ff33,13,1|1,0033ff,13,-1",border:"2px groove #cfdfff",fill:"bg,s,efefef|c,s,00000080",font:{size:"12"},foreground:"ff0000",gridLines:"10,10,1,0",width:"600",height:"400",insets:10},"echopoint.google.chart.PieChart":{border:"2px groove #cfdfff",fill:"bg,s,efefef|c,s,00000080",font:{size:"12"},foreground:"ff0000",width:"600",height:"400",insets:10},"echopoint.google.chart.VennDiagram":{border:"2px groove #cfdfff",fill:"bg,s,efefef|c,s,00000080",font:{size:"12"},foreground:"ff0000",width:"600",height:"400",insets:10},"echopoint.google.chart.Map":{border:"2px groove #cfdfff",fill:"bg,s,efefef|c,lg,45,ffffff,0,76a4fb,0.75",foreground:"ff0000",font:{size:"10"},insets:10},"echopoint.google.chart.Meter":{border:"2px groove #cfdfff",fill:"bg,s,efefef|c,lg,45,ffffff,0,76a4fb,0.75",foreground:"ff0000",font:{size:"10"},insets:10,width:"400",height:"300",label:"70 %"},"echopoint.google.chart.QRCode":{border:"2px groove #cfdfff",fill:"bg,s,efefef|c,lg,45,ffffff,0,76a4fb,0.75",foreground:"ff0000",font:{size:"10"},insets:10,width:"400",height:"300",encoding:"ISO-8859-1"}},ComplexChart:{"echopoint.google.chart.LineChart":{axisType:"x,y,t,r",border:"2px groove #cfdfff",fill:"bg,s,efefef|c,lg,45,ffffff,0,76a4fb,0.75",foreground:"ff0000",font:{size:"10"},gridLines:"10,20,5,2",legendPosition:"l",width:"600",height:"400",insets:10},"echopoint.google.chart.ScatterPlot":{axisType:"x,y,t,r",border:"2px groove #cfdfff",foreground:"ff0000",font:{size:"10"},gridLines:"10,20,5,2",legendPosition:"l",width:"600",height:"400",insets:10},"echopoint.google.chart.Sparkline":{axisType:"x,y,t,r",border:"2px groove #cfdfff",fill:"bg,s,efefef|c,lg,45,ffffff,0,76a4fb,0.75",foreground:"ff0000",font:{size:"10"},gridLines:"10,20,5,2",legendPosition:"l",width:"600",height:"400",insets:10},"echopoint.google.chart.RadarChart":{axisType:"x",border:"2px groove #cfdfff",fill:"bg,s,efefef|c,lg,45,ffffff,0,76a4fb,0.75",foreground:"ff0000",font:{size:"10"},gridLines:"10,20,5,2",legendPosition:"l",width:"600",height:"400",insets:10},"echopoint.google.chart.Map":{border:"2px groove #cfdfff",fill:"bg,s,efefef|c,lg,45,ffffff,0,76a4fb,0.75",foreground:"ff0000",font:{size:"10"},insets:10,region:"africa",codes:"MGKETN"}},ControlPane:{Row:{layoutData:{backgroundImage:"image/ControlPaneFill.png",overflow:Echo.SplitPane.OVERFLOW_HIDDEN,insets:"2px 10px"},cellSpacing:20,insets:"2px 10px"}},"ControlPane.Button":{Button:{lineWrap:false,foreground:"#000000",rolloverForeground:"#6f0f0f",rolloverEnabled:true,insets:"0px 8px"}},"ControlPane.Container.Top":{SplitPane:{orientation:Echo.SplitPane.ORIENTATION_VERTICAL_TOP_BOTTOM,separatorPosition:"30px"}},"ControlPane.Container.Bottom":{SplitPane:{orientation:Echo.SplitPane.ORIENTATION_VERTICAL_BOTTOM_TOP,separatorPosition:"30px"}},Default:{AbstractButton:{border:"1px outset #709bcd",foreground:"#000000",backgroundImage:{url:"image/InputFieldBackground.png",y:"50%"},pressedBackgroundImage:{url:"image/InputFieldBackgroundPressed.png",y:"50%"},pressedBorder:"1px inset #709bcd",rolloverBackgroundImage:{url:"image/InputFieldBackgroundHighlight.png",y:"50%"},rolloverBorder:"1px outset #bcd6f4",pressedEnabled:true,rolloverEnabled:true,insets:"1px 4px",disabledForeground:"#93bed5"},AbstractListComponent:{border:"2px groove #cfdfff",background:"#cfdfff"},"Extras.AccordionPane":{tabBorder:"1px outset #272727",tabForeground:"#ffffff",tabBackground:"#514f58",tabBackgroundImage:"image/TabBackground.png",tabRolloverEnabled:true,tabRolloverBackground:"#86899a",tabRolloverBackgroundImage:"image/TabBackgroundRollover.png"},"Extras.MenuBarPane":{animationTime:150,border:"0px solid #000000",backgroundImage:"image/PulldownMenuBackground.png",foreground:"#ffffff",menuBackground:"#000000",menuOpacity:92,menuBackgroundImage:"image/GreyMenuBackground.png",menuBorder:{bottomy:"1px solid #3f3f3f",bottomx:"1px solid #3f3f3f",topx:"1px solid #1f1f1f",topy:"1px solid #1f1f1f"},selectionBackground:"#fffac1",selectionBackgroundImage:{url:"image/BeigeLightedBackground.png",x:"50%",y:"50%"},selectionForeground:"#000000"},"Extras.RichTextArea":{controlPaneSplitPaneStyleName:"ControlPane.Container.Bottom",controlPaneRowStyleName:"ControlPane",controlPaneButtonStyleName:"ControlPane.Button",menuStyleName:"RichTextArea.Menu",toolbarButtonStyleName:"RichTextArea.Toolbar",windowPaneStyleName:"GlassBlue2"},TextComponent:{background:"#cfdfff",border:"2px groove #cfdfff",foreground:"#000000",disabledForeground:"#999999",backgroundImage:{url:"image/InputFieldBackground.png",repeat:"repeat-x",y:"50%"}},WindowPane:{ieAlphaRenderBorder:true,titleForeground:"#ffffff",titleBackground:"#2f2f4f",titleInsets:"5px 10px",titleBackgroundImage:{url:"image/window/simple/Header.png",repeat:"repeat-x",y:"100%"},border:{contentInsets:"8px 14px 14px 8px",borderInsets:"17px 23px 23px 17px",topLeft:"image/window/simple/BorderTopLeft.png",bottomy:"image/window/simple/BorderTop.png",topRight:"image/window/simple/BorderTopRight.png",bottomx:"image/window/simple/BorderLeft.png",topx:"image/window/simple/BorderRight.png",bottomLeft:"image/window/simple/BorderBottomLeft.png",topy:"image/window/simple/BorderBottom.png",bottomRight:"image/window/simple/BorderBottomRight.png"}},"echopoint.Anchor":{foreground:"#2f2f4f",font:{bold:true,size:"10"},target:"_blank",text:"A HTML Anchor Tag",toolTipText:"Click the link",uri:"https://echopoint.dev.java.net/"},"echopoint.BorderLayout":{border:"2px groove #cfdfff",width:"500px"},"echopoint.DirectHtml":{background:"#cfdfff",border:"2px groove #cfdfff",backgroundImage:{url:"image/InputFieldBackground.png",repeat:"repeat-x",y:"50%"},width:"500px",height:"100px"},"echopoint.HtmlLabel":{background:"#cfdfff",border:"2px groove #cfdfff",backgroundImage:{url:"image/InputFieldBackground.png",repeat:"repeat-x",y:"100%"}},"echopoint.HttpPane":{border:"2px groove #cfdfff",backgroundImage:{url:"image/LoginBackground.png",repeat:"repeat"},insets:10},"echopoint.ImageIcon":{border:"2px groove #cfdfff",url:"image/imagemap.gif",width:"500px",height:"300px",toolTipText:"Image Map",cursor:"crosshair"},"echopoint.InfoWindow":{textForeground:"#2f2f4f",textBackground:"#cfdfff",textFont:{bold:true,size:"12"},textInsets:"3px 8px",otherTextForeground:"#000000",otherTextFont:{bold:false,size:"11"},otherTextInsets:"2px 5px",titleAlignment:"left",titleBackground:"#9f9f9f",titleForeground:"white",titleFont:{bold:true,size:"12"},alignment:"center",insets:10,font:{size:"11"},background:"#f9f9f9",foreground:"#a10202",width:"250px"},"echopoint.ProgressBar":{background:"#a1a1a1",foreground:"#ffffff",border:"2px inset #3d3d3d",barBackground:"#1a428a",insets:1,height:"25px",width:"500px"},"echopoint.PushButton":{text:"Click Me",toolTipText:"Click me to test"},"echopoint.TagCloud":{border:"2px inset #3d3d3d",insets:1,rolloverBackground:"#a1a1a1",rolloverForeground:"#c1c1c1",rolloverEnabled:true,width:"500px"}},DefaultResizableLarge:{SplitPane:{separatorHeight:12,separatorWidth:12,resizable:true,separatorHorizontalImage:{url:"image/SplitPaneHorizontalSeparatorLarge.png",y:"50%"},separatorVerticalImage:{url:"image/SplitPaneVerticalSeparatorLarge.png",x:"50%"}}},LaunchPanel:{Button:{alignment:"center",background:"#1f1f1f",textAlignment:"center",textPosition:"topy",rolloverEnabled:true,rolloverBackground:"#5c5c5c",foreground:"#ffffff",font:{size:"9pt"},iconTextMargin:2,insets:10,pressedBackground:"#4d4d4d",pressedEnabled:true,border:"2px groove #3d3d3d",pressedBorder:"2px inset #3d3d3d"},Column:{cellSpacing:8}},"LaunchPanel.Selected":{Button:{alignment:"center",textAlignment:"center",textPosition:"topy",foreground:"#ffffff",backgroundImage:"image/DemoSelectButtonSelectedBackground.png",font:{size:"9pt"},iconTextMargin:2,insets:10,border:"2px groove #3d3d3d"}},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",bottomy:"image/window/glassblue/BorderTop.png",topRight:"image/window/glassblue/BorderTopRight.png",bottomx:"image/window/glassblue/BorderLeft.png",topx:"image/window/glassblue/BorderRight.png",bottomLeft:"image/window/glassblue/BorderBottomLeft.png",topy:"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",bottomy:"image/window/glassblue2/BorderTop.png",topRight:"image/window/glassblue2/BorderTopRight.png",bottomx:"image/window/glassblue2/BorderLeft.png",topx:"image/window/glassblue2/BorderRight.png",bottomLeft:"image/window/glassblue2/BorderBottomLeft.png",topy:"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:"topy",iconTextMargin:1,layoutData:{alignment:"center"}}},PreferencesColumn:{Column:{border:{bottomx:"1px solid #afafaf",bottomy:"1px solid #afafaf",topx:"1px solid #dfdfdf",topy:"1px solid #dfdfdf"},cellSpacing:8,insets:"8px 20px"}},PreferencesTitle:{Label:{foreground:"#2f2faf",font:{bold:true}}},"RichTextArea.Menu":{"Extras.MenuBarPane":{backgroundImage:"image/BlueLineBackground.png",menuBackgroundIamge:"image/LightBlueLineBackground.png",selectionBackgroundImage:"image/ShadowBackgroundDarkBlue2.png"}},"RichTextArea.Toolbar":{Button:{background:"#cfcfdf",foreground:"#000000",border:"1px outset #cfcfdf",rolloverEnabled:true,rolloverBackground:"#efefff",rolloverBorder:"1px outset #efefff",pressedEnabled:true,pressedBackground:"#afafbf",pressedBorder:"1px inset #afafbf",insets:"1px 3px"}},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:"100%"},border:{contentInsets:"6px 15px 15px 12px",borderInsets:"34px 20px 20px 20px",topLeft:"image/window/transgreen/BorderTopLeft.png",bottomy:"image/window/transgreen/BorderTop.png",topRight:"image/window/transgreen/BorderTopRight.png",bottomx:"image/window/transgreen/BorderLeft.png",topx:"image/window/transgreen/BorderRight.png",bottomLeft:"image/window/transgreen/BorderBottomLeft.png",topy:"image/window/transgreen/BorderBottom.png",bottomRight:"image/window/transgreen/BorderBottomRight.png"}}}});echopoint.test.MainContent=Core.extend(Echo.ContentPane,{_componentList:null,_testArea:null,$construct:function(){this._testArea=new Echo.Column();this._componentList=new echopoint.test.ComponentList();Echo.ContentPane.call(this,{children:[this._createSplitPane()]})},_createSplitPane:function(){return new Echo.SplitPane({styleName:"DefaultResizableLarge",separatorPosition:300,children:[this._componentList,this._testArea]})},getComponentList:function(){return this._componentList},getTestArea:function(){return this._testArea}});echopoint.test.ComponentList=Core.extend(Echo.Column,{$static:{COMPONENTS:new Array("Anchor","DirectHtml","HtmlLabel","HttpPane","ImageIcon","ImageMap","InfoWindow","LightBox","ProgressBar","PushButton","Strut","TagCloud","NumberTextField","RegexTextField","KeystrokeTextField","BorderLayout","HtmlLayout","BarChart","LineChart","Sparkline","ScatterPlot","RadarChart","PieChart","VennDiagram","Map","Meter","QRCode","Clock","TooltipContainer")},$construct:function(){Echo.Column.call(this);for(var a=0;a<echopoint.test.ComponentList.COMPONENTS.length;++a){this.add(this._createButton(echopoint.test.ComponentList.COMPONENTS[a]))}},_createButton:function(a){return new echopoint.test.Button(a)}});echopoint.test.Button=Core.extend(Echo.Button,{_component:null,$construct:function(a){this._component=a;Echo.Button.call(this,{renderId:"echopointUnitTestButton"+a,styleName:"Default",text:a,events:{action:Core.method(this,this._actionPerformed)}})},_actionPerformed:function(){var mainContent=testApp.getMainContent();var testArea=mainContent.getTestArea();testArea.removeAll();new (eval("echopoint.test."+this._component+"Test"))(testArea)}});echopoint.test.AnchorTest=Core.extend({$construct:function(a){a.add(this._createAnchor())},_createAnchor:function(){return new echopoint.Anchor({renderId:"echopointUnitTestAnchor",styleName:"Default"})}});echopoint.test.DirectHtmlTest=Core.extend({$static:{CONTENT:"<h2>DirectHtml Without Target</h2><p><b>First</b> paragraph content.</p><p><b>Second</b> paragraph content.</p><ol><li><b>First</b> line.</li><li><b>Second</b> line.</li><li><b>Third</b> line.</li></ol><p>Clicking <a href='https://echopoint.dev.java.net/'>link</a> should open in the same browser window/tab.</p>",LINK_CONTENT:"<h2>DirectHtml With Target Set</h2><p>Clicking <a href='https://echopoint.dev.java.net/'>link</a> should open in a new browser window/tab.</p><p>Clicking <a href='https://echopoint.dev.java.net/' target=''>link</a> should open in the same browser window/tab.</p>"},$construct:function(b){var c=this._createRTA();var a=this._createComponent(echopoint.test.DirectHtmlTest.CONTENT,null);b.add(c);b.add(this._createButton(c,a));b.add(a);b.add(this._createComponent(echopoint.test.DirectHtmlTest.LINK_CONTENT,"_new"))},_createRTA:function(){return new Extras.RichTextArea({renderId:"echopointUnitTestDirectHtmlRTA",styleName:"Default",text:echopoint.test.DirectHtmlTest.CONTENT})},_createButton:function(c,a){var d=new Echo.Row({style:"Default"});var b=new Echo.Button({renderId:"echopointUnitTestDirectHtmlDisplay",styleName:"Default",text:"Save",events:{action:function(e){a.set("text",c.get("text"))}}});d.add(b);return d},_createComponent:function(b,c){var a="echopointUnitTestDirectHtml";a+=(c==null)?"NoTarget":"Target";return new echopoint.DirectHtml({renderId:a,styleName:"Default",text:b,target:c})}});echopoint.test.HtmlLabelTest=Core.extend({$static:{CONTENT:"<br/><br/><b>HtmlLabel</b> simple test content.<br/><br/>"},$construct:function(a){a.add(this._createComponent())},_createComponent:function(){return new echopoint.HtmlLabel({renderId:"echopointUnitTestHtmlLabel",styleName:"Default",text:echopoint.test.HtmlLabelTest.CONTENT})}});echopoint.test.HttpPaneTest=Core.extend({$static:{DEFAULT_URI:"https://echopoint.dev.java.net/"},$construct:function(c){var b=this._createComponent(echopoint.test.HttpPaneTest.DEFAULT_URI);var a=this._createTextField();c.add(a);c.add(this._createButton(a,b));c.add(b)},_createTextField:function(){return new Echo.TextField({renderId:"echopointUnitTestHttpPaneTextField",styleName:"Default",text:echopoint.test.HttpPaneTest.DEFAULT_URI})},_createButton:function(a,b){var d=new Echo.Row({style:"Default"});var c=new Echo.Button({renderId:"echopointUnitTestHttpPaneDisplay",styleName:"Default",text:"Load",events:{action:function(){b.set(echopoint.HttpPane.URI,a.get("text"))}}});d.add(c);return d},_createComponent:function(a){return new echopoint.HttpPane({renderId:"echopointUnitTestHttpPane",styleName:"Default",uri:a})}});echopoint.test.ImageIconTest=Core.extend({imageIcon:null,label:null,count:0,$construct:function(a){a.add(this._createImageIcon());a.add(this._createLabel())},_createImageIcon:function(){this.imageIcon=new echopoint.ImageIcon({renderId:"echopointUnitTestImageIcon",styleName:"Default",events:{action:Core.method(this,this._actionPerformed)}});return this.imageIcon},_createLabel:function(){this.label=new Echo.Label({renderId:"echopointUnitTestImageIconLabel",style:"Default",text:"Action Label"});return this.label},_actionPerformed:function(){this.label.set("text","Button clicked: "+ ++this.count)}});echopoint.test.ImageMapTest=Core.extend({imageMap:null,label:null,$construct:function(a){a.add(this._createImageMap());a.add(this._createLabel())},_createImageMap:function(){this.imageMap=new echopoint.ImageMap({renderId:"echopointUnitTestImageMap",url:"image/imagemap.gif",height:300,width:500,text:"Image Map",toolTipText:"Image Map",cursor:"crosshair",events:{action:Core.method(this,this._actionPerformed)}});this._createSections();return this.imageMap},_createSections:function(){var d=new echopoint.model.CircleSection(new echopoint.model.Point(70,84),51,"circle","Circular section");this.imageMap.addSection(d);var c=new echopoint.model.RectangleSection(new echopoint.model.Point(25,180),new echopoint.model.Point(125,280),"rectangle","Rectangular section");this.imageMap.addSection(c);var a=new Array(new echopoint.model.Point(153,106),new echopoint.model.Point(186,225),new echopoint.model.Point(340,193),new echopoint.model.Point(315,81),new echopoint.model.Point(304,167));var b=new echopoint.model.PolygonSection(a,"polygon","Polygon section");this.imageMap.addSection(b)},_createLabel:function(){this.label=new Echo.Label({renderId:"echopointUnitTestImageMapLabel",style:"Default",text:"Action Command Label"});return this.label},_actionPerformed:function(a){switch(a.actionCommand){case"circle":this.label.set("text","Selected cicle");break;case"rectangle":this.label.set("text","Selected rectangle");break;case"polygon":this.label.set("text","Selected polygon");break}}});echopoint.test.InfoWindowTest=Core.extend({infoWindow:null,$construct:function(a){a.add(this._createInfoWindow())},_createInfoWindow:function(){this.infoWindow=new echopoint.InfoWindow({renderId:"echopointUnitTestInfoWindow",styleName:"Default",prefix:"Integer in eros nec arcu blandit adipiscing. Phasellus tempor ligula et odio. Aliquam erat volutpat. Proin sed nisi. Phasellus pretium, ipsum ornare pellentesque pellentesque, quam enim consequat lectus, non consectetuer tortor risus quis neque. Nam eget odio. Cras gravida ipsum eu lectus. Duis vitae tortor in ante tincidunt volutpat. Maecenas interdum mollis mi. Proin feugiat purus sed elit. Ut in augue. Duis pede lectus, volutpat non, ullamcorper id, tincidunt sed, libero. Pellentesque luctus ligula vel dolor. Integer elementum lorem in ligula. Aliquam id dolor a leo laoreet egestas. In nec nibh porta eros consequat condimentum. Nam elementum magna vitae justo. Nam velit est, vestibulum a, aliquam non, sollicitudin vitae, risus. Curabitur interdum dictum sapien. Nulla faucibus tellus vel erat. Aliquam posuere mi et dolor faucibus gravida. In sit amet lorem at mi tempus egestas. Phasellus rhoncus erat id est. nibh, rutrum ac, imperdiet ac, elementum nec, ",text:"Hover over here",postfix:"orci. Proin a ipsum vitae dui luctus congue. Nullam viverra iaculis nulla. Duis sagittis eros eu quam. Nam elementum magna vitae justo. Nam velit est, vestibulum a, aliquam non, sollicitudin vitae, risus.",title:"Header",content:"Donec risus purus, elementum ut, porttitor sed, tincidunt at, neque. Sed gravida turpis ac neque. Nulla pede lorem, imperdiet bibendum, varius id, adipiscing ut, metus. Nulla tincidunt vehicula ipsum. Vestibulum a eros. Phasellus urna. Sed tempus, lectus eu vulputate tristique"});return this.infoWindow}});echopoint.test.LightBoxTest=Core.extend({$construct:function(a){var b=this._createComponent();b.add(this._createImage());b.add(new echopoint.Strut());b.add(this._createControl(b));b.add(new echopoint.Strut());b.add(this._createRemove(a,b));a.add(this._createLabel());a.add(new echopoint.Strut());a.add(this._createTextField());a.add(new echopoint.Strut());a.add(this._createOpen(b));a.add(b)},_createComponent:function(){return new echopoint.LightBox({renderId:"echopointUnitTestLightBox",parentOnly:true,hidden:false})},_createLabel:function(){return new Echo.Label({renderId:"echopointUnitTestLightBoxLabel",styleName:"Default",text:"Label 1"})},_createTextField:function(){return new Echo.TextField({renderId:"echopointUnitTestLightBoxTextField",styleName:"Default",text:"Sample TextField"})},_createImage:function(){return new echopoint.ImageIcon({renderId:"echopointUnitTestLightBoxImageIcon",styleName:"Default"})},_createControl:function(a){return new Echo.Button({renderId:"echopointUnitTestLightBoxClose",styleName:"Default",text:"Close",events:{action:function(){a.set(echopoint.LightBox.HIDDEN,true)}}})},_createOpen:function(a){return new Echo.Button({renderId:"echopointUnitTestLightBoxOpen",styleName:"Default",text:"Toggle",events:{action:function(){a.set(echopoint.LightBox.HIDDEN,false)}}})},_createRemove:function(a,b){return new Echo.Button({renderId:"echopointUnitTestLightBoxRemove",styleName:"Default",text:"Remove",events:{action:function(){a.remove(b)}}})}});echopoint.test.ProgressBarTest=Core.extend({progress:null,_pollingInterval:250,_width:0,$construct:function(a){a.add(this._createProgressBar())},_createProgressBar:function(){this.progress=new echopoint.ProgressBar({renderId:"echopointUnitTestProgressBar",styleName:"Default"});Core.Web.Scheduler.run(Core.method(this,this._poll),this._pollingInterval,false);return this.progress},_poll:function(){this._width+=10;if(this._width<=100){var a="Completed "+this._width+" of 100";this.progress.set(echopoint.ProgressBar.TEXT,a);this.progress.set(echopoint.ProgressBar.PERCENTAGE,this._width);this.progress.peer.renderUpdate();Core.Web.Scheduler.run(Core.method(this,this._poll),this._pollingInterval,false)}}});echopoint.test.PushButtonTest=Core.extend({button:null,label:null,select:null,count:0,$construct:function(a){a.add(this._createPushButton());a.add(this._createEnabled());a.add(this._createLabel())},_createPushButton:function(){this.button=new echopoint.PushButton({renderId:"echopointUnitTestPushButton",styleName:"Default",events:{action:Core.method(this,this._actionPerformed)}});return this.button},_createEnabled:function(){this.select=new Echo.SelectField({renderId:"echopointUnitTestPushButtonSelectField",style:"Default",items:["Enabled","Disabled"],events:{action:Core.method(this,this._enabled)}});return this.select},_createLabel:function(){this.label=new Echo.Label({renderId:"echopointUnitTestPushButtonLabel",style:"Default",text:"Action Label"});return this.label},_actionPerformed:function(){this.label.set("text","Button clicked: "+ ++this.count)},_enabled:function(){if(1==this.select.get("selection")){this.button.setEnabled(false)}else{this.button.setEnabled(true)}}});echopoint.test.StrutTest=Core.extend({$construct:function(a){a.add(this._createRow());a.add(this._createColumn())},_createRow:function(){var c=new Echo.Row({style:"Default"});c.add(new Echo.Label({renderId:"echopointUnitTestStrutRowLabel1",styleName:"Default",text:"Label 1"}));var b=new echopoint.Strut({renderId:"echopointUnitTestStrutRow",styleName:"RowStrut"});c.add(b);c.add(new Echo.Label({renderId:"echopointUnitTestStrutRowLabel2",styleName:"Default",text:"Label 2"}));c.add(new echopoint.Strut());var a=new Echo.TextField({renderId:"echopointUnitTestStrutRowTextField",styleName:"Default"});c.add(a);c.add(new echopoint.Strut());c.add(this._createButton("Change Width",echopoint.internal.AbstractContainer.WIDTH,b,a));return c},_createColumn:function(){var c=new Echo.Column({style:"Default"});c.add(new Echo.Label({renderId:"echopointUnitTestStrutColumnLabel3",styleName:"Default",text:"Label 3"}));var b=new echopoint.Strut({renderId:"echopointUnitTestStrutColumn",styleName:"ColumnStrut"});c.add(b);c.add(new Echo.Label({renderId:"echopointUnitTestStrutColumnLabel4",styleName:"Default",text:"Label 4"}));c.add(new echopoint.Strut());var a=new Echo.TextField({renderId:"echopointUnitTestStrutColumnTextField",styleName:"Default"});c.add(a);c.add(new echopoint.Strut());var d=new Echo.Row({style:"Default"});d.add(this._createButton("Change Height",echopoint.internal.AbstractContainer.HEIGHT,b,a));c.add(d);return c},_createButton:function(e,d,b,a){var c=new Echo.Button({renderId:"echopointUnitTestStrutButton"+d,styleName:"Default",text:e,events:{action:function(){b.set(d,a.get("text"))}}});return c}});echopoint.test.TagCloudTest=Core.extend({$construct:function(a){a.add(this._createRow());this.testArea=a},tagcloud:null,testArea:null,_createRow:function(){var b=new Echo.Row({style:"Default"});this.tagcloud=new echopoint.TagCloud({renderId:"echopointUnitTestTagCloud",styleName:"Default",tags:this._createTags(),events:{action:Core.method(this,this._tagAction)}});b.add(this.tagcloud);var a=new Echo.Column({styleName:"Default"});a.add(b);a.add(this._createUpdate());return a},_createTags:function(){var a=new Array();for(var b=0;b<10;++b){a[b]=new echopoint.model.Tag("Tag "+b,Math.floor((Math.random()*10)+1))}return a},_createUpdate:function(){var b=new Echo.Row({styleName:"Default"});var a=new Echo.Button({renderId:"echopointUnitTestTagCloudUpdate",styleName:"Default",text:"Update",events:{action:Core.method(this,this._buttonAction)}});b.add(a);return b},_tagAction:function(a){this.testArea.add(new Echo.Label({styleName:"Default",text:"Tag: "+a.data}))},_buttonAction:function(a){this.tagcloud.set(echopoint.TagCloud.TAGS,this._createTags())}});echopoint.test.NumberTextFieldTest=Core.extend({$construct:function(a){var b=new Echo.Row({styleName:"Default"});b.add(this._createLabel());b.add(new echopoint.Strut());b.add(this._createTextField());a.add(new echopoint.Strut());a.add(b);a.add(new echopoint.Strut());a.add(this._createNote())},_createLabel:function(){return new Echo.Label({renderId:"echopointUnitTestNumberTextFieldLabel",styleName:"Default",text:"Try entering characters"})},_createTextField:function(){return new echopoint.NumberTextField({renderId:"echopointUnitTestNumberTextField",styleName:"Default",precision:4})},_createNote:function(){return new echopoint.HtmlLabel({renderId:"echopointUnitTestNumberTextFieldNote",styleName:"Default",text:"Note that the field will allow only the number characters 0-9 and the period (.).  Also note that only one period character is allowed by the field."})}});echopoint.test.RegexTextFieldTest=Core.extend({$construct:function(a){var b=new Echo.Row({styleName:"Default"});b.add(this._createLabel());b.add(new echopoint.Strut());b.add(this._createTextField());a.add(new echopoint.Strut());a.add(b);a.add(new echopoint.Strut());a.add(this._createNote())},_createLabel:function(){return new Echo.Label({renderId:"echopointUnitTestRegexTextFieldLabel",styleName:"Default",text:"Try entering characters"})},_createTextField:function(){return new echopoint.RegexTextField({renderId:"echopointUnitTestRegexTextField",styleName:"Default",defaultText:"1234.56",regex:"^[\\d]+[.]{0,1}[\\d]{0,2}$"})},_createNote:function(){return new echopoint.HtmlLabel({renderId:"echopointUnitTestRegexTextFieldNote",styleName:"Default",text:"Note that the field will allow only the number characters 0-9 and the period (.).  Also note that only one period character is allowed by the field.  You may enter up to two fractional digits."})}});echopoint.test.BorderLayoutTest=Core.extend({$construct:function(a){a.add(this._createFull());a.add(this._createCentre())},_createFull:function(){var f=new echopoint.BorderLayout({renderId:"echopointUnitTestBorderLayoutFull",styleName:"Default"});var g={alignment:"center",background:"#0000ff"};var i=new echopoint.HtmlLabel({renderId:"echopointUnitTestBoderLayoutFullNorth",layoutData:g,text:"<b>This is the north content.  Should stretch across area.</b>"});f.addToRegion(i,echopoint.BorderLayout.NORTH);g={background:"#00ff00"};var a=new echopoint.HtmlLabel({renderId:"echopointUnitTestBoderLayoutFullWest",layoutData:g,text:"<b>West region</b>"});f.addToRegion(a,echopoint.BorderLayout.WEST);g={alignment:"center",background:"#a1a1a1"};var d=new echopoint.HtmlLabel({renderId:"echopointUnitTestBoderLayoutFullCentre",layoutData:g,text:"<b>This is the centre content.  Should fill most of central area.</b>"});f.addToRegion(d,echopoint.BorderLayout.CENTER);g={background:"#ff0000"};var c=new echopoint.HtmlLabel({renderId:"echopointUnitTestBoderLayoutFullEast",layoutData:g,text:"<b>East region</b>"});f.addToRegion(c,echopoint.BorderLayout.EAST);g={alignment:"center",background:"#2f2f4f"};var b=new echopoint.HtmlLabel({renderId:"echopointUnitTestBoderLayoutFullSouth",layoutData:g,text:"<b>This is the south content.  Should stretch across area.</b>"});f.addToRegion(b,echopoint.BorderLayout.SOUTH);try{f.addToRegion(b,echopoint.BorderLayout.SOUTH);document.writeln("Illegal child exception should have been thrown!")}catch(h){}return f},_createCentre:function(){var b=new echopoint.HtmlLabel({renderId:"echopointUnitTestBoderLayoutPartialCentre",text:"<b>This is the centre content.  Should fill most of central area.</b>"});var a=new echopoint.BorderLayout({renderId:"echopointUnitTestBorderLayoutPartial",styleName:"Default"});a.addToRegion(b);return a}});echopoint.test.HtmlLayoutTest=Core.extend({$construct:function(a){var b=this._createHtmlContainer();b.add(this._createOne());b.add(this._createTwo());b.add(this._createThree());a.add(b)},_createHtmlContainer:function(){return new echopoint.HtmlLayout({renderId:"echopointUnitTestHtmlLayout",styleName:"Default",text:"<table border='1'><tr><td colspan='2'>This is regular HTML text in component!</td></tr><tr><td id='one' colspan='2'></td></tr><tr><td id='two'></td><td id='three'></td></tr><tr><td>A regular column.</td><td>Another regular column.</td></tr></table>"})},_createOne:function(){return new Echo.Button({renderId:"echopointUnitTestHtmlContainerOne",styleName:"Default",layoutData:{containerId:"one"},text:"Button One"})},_createTwo:function(){return new Echo.Label({renderId:"echopointUnitTestHtmlContainerTwo",styleName:"Default",layoutData:{containerId:"two"},text:"Label One"})},_createThree:function(){return new Echo.Label({renderId:"echopointUnitTestHtmlContainerThree",styleName:"Default",layoutData:{containerId:"three"},text:"Label Two"})}});echopoint.test.BarChartTest=Core.extend({$construct:function(a){a.add(this._createChart())},_createChart:function(){var f=new Array();f[0]=new echopoint.google.chart.model.ShapeMarker("a","00ff33",7);f[1]=new echopoint.google.chart.model.ShapeMarker("c","00ff33",7);f[2]=new echopoint.google.chart.model.ShapeMarker("d","00ff33",7);f[3]=new echopoint.google.chart.model.ShapeMarker("o","00ff33",7);f[4]=new echopoint.google.chart.model.ShapeMarker("s","00ff33",7);f[5]=new echopoint.google.chart.model.ShapeMarker("tValue+7","00ff33",7);f[6]=new echopoint.google.chart.model.ShapeMarker("x","00ff33",7);var d=new Array();d[0]=new echopoint.google.chart.model.ChartData([0,30,60,70,90,95,100],110);d[0].markers=f;var e=new echopoint.google.chart.model.Title("Bar Chart");var g=new Array();g[0]=[0,20,40,60,80,100];g[1]=[0,25,50,75,100];g[2]=["Min","One Third","Full"];g[3]=[0,50,100];var c=new Array();c[0]=[];c[1]=[];c[2]=[0,3,10];c[3]=[];var a=new Array();a[0]=new echopoint.google.chart.model.LineStyle(3,6,3);a[1]=new echopoint.google.chart.model.LineStyle(2,4,2);a[2]=new echopoint.google.chart.model.LineStyle(4);var b=new Array();b[0]=new echopoint.google.chart.model.RangeMarker("r","e5ecf9",0.35,0.25);b[1]=new echopoint.google.chart.model.RangeMarker("R","a0bae9",0.35,0.25);return new echopoint.google.chart.BarChart({renderId:"echopointUnitTestStrutComplexBarChart",styleName:"SimpleChart",data:d,title:e,axisLabels:g,labelPositions:c,lineStyles:a,rangeMarkers:b,zeroLine:"0.5"})}});echopoint.test.LineChartTest=Core.extend({$construct:function(a){a.add(this._createSimple());a.add(this._createComplex())},_createSimple:function(){var c=[30,60,70,90,95,110];var d=120;var g=new Array();g[0]=new echopoint.google.chart.model.ShapeMarker("o","ff3333",5);var e=new echopoint.google.chart.model.ChartData(c,d);e.color="00ff00";e.markers=g;var f=new echopoint.google.chart.model.Title();f.add("Simple Chart");var h=new Array();h[0]=["0","20","40","60","80","100"];h[1]=["0","25","50","75","100"];var b=new Array();b[0]=new echopoint.google.chart.model.Range(20,125);b[1]=new echopoint.google.chart.model.Range(25,150);var a=new Array();a[0]=new echopoint.google.chart.model.RangeMarker("r","ff0000",0.1,0.11);a[1]=new echopoint.google.chart.model.RangeMarker("R","0000ff",0.1,0.11);return new echopoint.google.chart.LineChart({renderId:"echopointUnitTestSimpleLineChart",styleName:"SimpleChart",data:[e],title:f,axisLabels:h,axisRanges:b,rangeMarkers:a})},_createComplex:function(){var d=new Array();d[0]=new echopoint.google.chart.model.ShapeMarker("a","00ff33",7);d[1]=new echopoint.google.chart.model.ShapeMarker("c","00ff33",7);d[2]=new echopoint.google.chart.model.ShapeMarker("d","00ff33",7);d[3]=new echopoint.google.chart.model.ShapeMarker("o","00ff33",7);d[4]=new echopoint.google.chart.model.ShapeMarker("s","00ff33",7);d[5]=new echopoint.google.chart.model.ShapeMarker("tValue+7","00ff33",7);d[6]=new echopoint.google.chart.model.ShapeMarker("x","00ff33",7);var e=new Array();e[0]=new echopoint.google.chart.model.ChartData([0,30,60,70,90,95,100],110);e[0].ydata=[20,30,40,50,60,70,80];e[0].ymax=100;e[0].legend="First";e[0].markers=d;var c=new Array();c[0]=new echopoint.google.chart.model.ShapeMarker("x","ff00ff",7);c[1]=new echopoint.google.chart.model.ShapeMarker("s","ff00ff",7);c[2]=new echopoint.google.chart.model.ShapeMarker("o","ff00ff",7);c[3]=new echopoint.google.chart.model.ShapeMarker("d","ff00ff",7);c[4]=new echopoint.google.chart.model.ShapeMarker("c","ff00ff",7);c[5]=new echopoint.google.chart.model.ShapeMarker("a","ff00ff",7);e[1]=new echopoint.google.chart.model.ChartData([10,30,40,45,52],60);e[1].ydata=[100,90,40,20,10];e[1].ymax=110;e[1].legend="Second";e[1].markers=c;var a=new Array();a[0]=new echopoint.google.chart.model.ShapeMarker("x","ff3300",7);a[1]=new echopoint.google.chart.model.ShapeMarker("a","ff3300",7);a[2]=new echopoint.google.chart.model.ShapeMarker("o","ff3300",7);a[3]=new echopoint.google.chart.model.ShapeMarker("c","ff3300",7);a[4]=new echopoint.google.chart.model.ShapeMarker("t","ff3300",7);e[2]=new echopoint.google.chart.model.ChartData([-1],0);e[2].ydata=[5,33,50,55,7];e[2].ymax=60;e[2].legend="Third";e[2].markers=a;var h=new echopoint.google.chart.model.Title("Complex Chart");h.add("Multiple Line Title");var g=new Array();g[0]=[0,20,40,60,80,100];g[1]=[0,25,50,75,100];g[2]=["Min","One Third","Full"];g[3]=[0,50,100];var f=new Array();f[0]=[];f[1]=[];f[2]=[0,3,10];f[3]=[];var j=new Array();j[0]=new echopoint.google.chart.model.LineStyle(3,6,3);j[1]=new echopoint.google.chart.model.LineStyle(2,4,2);j[2]=new echopoint.google.chart.model.LineStyle(4);var b=new Array();b[0]=new echopoint.google.chart.model.RangeMarker("r","e5ecf9",0.35,0.25);b[1]=new echopoint.google.chart.model.RangeMarker("R","a0bae9",0.35,0.25);var i=new Array();i[0]=new echopoint.google.chart.model.FillArea("b","224499",0,1);i[1]=new echopoint.google.chart.model.FillArea("b","76a4fb",1,2);return new echopoint.google.chart.LineChart({renderId:"echopointUnitTestStrutComplexLineChart",styleName:"ComplexChart",data:e,title:h,axisLabels:g,labelPositions:f,lineStyles:j,rangeMarkers:b,fillArea:i})}});echopoint.test.SparklineTest=Core.extend({$construct:function(a){a.add(this._createSimple());a.add(this._createComplex())},_createSimple:function(){var a=[30,60,70,90,95,110];var b=120;var e=new Array();e[0]=new echopoint.google.chart.model.ShapeMarker("o","ff3333",5);var c=new echopoint.google.chart.model.ChartData(a,b);c.color="00ff00";c.markers=e;var d=new echopoint.google.chart.model.Title();d.add("Simple Sparkline");return new echopoint.google.chart.Sparkline({renderId:"echopointUnitTestSimpleSparkline",styleName:"SimpleChart",data:[c],title:d})},_createComplex:function(){var f=new Array();f[0]=new echopoint.google.chart.model.ShapeMarker("a","00ff33",7);f[1]=new echopoint.google.chart.model.ShapeMarker("c","00ff33",7);f[2]=new echopoint.google.chart.model.ShapeMarker("d","00ff33",7);f[3]=new echopoint.google.chart.model.ShapeMarker("o","00ff33",7);f[4]=new echopoint.google.chart.model.ShapeMarker("s","00ff33",7);f[5]=new echopoint.google.chart.model.ShapeMarker("tValue+7","00ff33",7);f[6]=new echopoint.google.chart.model.ShapeMarker("x","00ff33",7);var c=new Array();c[0]=new echopoint.google.chart.model.ChartData([0,30,60,70,90,95,100],110);c[0].ydata=[20,30,40,50,60,70,80];c[0].ymax=100;c[0].legend="First";c[0].markers=f;var d=new Array();d[0]=new echopoint.google.chart.model.ShapeMarker("x","ff00ff",7);d[1]=new echopoint.google.chart.model.ShapeMarker("s","ff00ff",7);d[2]=new echopoint.google.chart.model.ShapeMarker("o","ff00ff",7);d[3]=new echopoint.google.chart.model.ShapeMarker("d","ff00ff",7);d[4]=new echopoint.google.chart.model.ShapeMarker("c","ff00ff",7);d[5]=new echopoint.google.chart.model.ShapeMarker("a","ff00ff",7);c[1]=new echopoint.google.chart.model.ChartData([10,30,40,45,52],60);c[1].ydata=[100,90,40,20,10];c[1].ymax=110;c[1].legend="Second";c[1].markers=d;var b=new Array();b[0]=new echopoint.google.chart.model.ShapeMarker("x","ff3300",7);b[1]=new echopoint.google.chart.model.ShapeMarker("a","ff3300",7);b[2]=new echopoint.google.chart.model.ShapeMarker("o","ff3300",7);b[3]=new echopoint.google.chart.model.ShapeMarker("c","ff3300",7);b[4]=new echopoint.google.chart.model.ShapeMarker("t","ff3300",7);c[2]=new echopoint.google.chart.model.ChartData([-1],0);c[2].ydata=[5,33,50,55,7];c[2].ymax=60;c[2].legend="Third";c[2].markers=b;var e=new echopoint.google.chart.model.Title("Complex Sparkline");e.add("Multiple Line Title");var a=new Array();a[0]=new echopoint.google.chart.model.LineStyle(3,6,3);a[1]=new echopoint.google.chart.model.LineStyle(2,4,2);a[2]=new echopoint.google.chart.model.LineStyle(4);return new echopoint.google.chart.Sparkline({renderId:"echopointUnitTestStrutComplexSparkline",styleName:"ComplexChart",data:c,title:e,lineStyles:a})}});echopoint.test.ScatterPlotTest=Core.extend({$construct:function(a){a.add(this._createChart())},_createChart:function(){var a=new Array();a[0]=new echopoint.google.chart.model.ChartData([0,30,60,70,90,95,100],110);a[0].ydata=[20,30,40,50,60,70,80];a[0].ymax=100;a[0].size=[1,2,3,4,5,6,7];var b=new echopoint.google.chart.model.Title("ScatterPlot");return new echopoint.google.chart.ScatterPlot({renderId:"echopointUnitTestStrutComplexScatterPlot",styleName:"ComplexChart",data:a,title:b})}});echopoint.test.RadarChartTest=Core.extend({$construct:function(a){a.add(this._createStraight());a.add(this._createSpline())},_createStraight:function(){var c=[30,60,70,90,95,110];var d=120;var g=new Array();g[0]=new echopoint.google.chart.model.ShapeMarker("o","ff3333",5);var e=new echopoint.google.chart.model.ChartData(c,d);e.color="00ff00";e.markers=g;var f=new echopoint.google.chart.model.Title();f.add("Simple Chart");var h=new Array();h[0]=["0","20","40","60","80","100"];h[1]=["0","25","50","75","100"];var b=new Array();b[0]=new echopoint.google.chart.model.Range(20,125);b[1]=new echopoint.google.chart.model.Range(25,150);var a=new Array();a[0]=new echopoint.google.chart.model.RangeMarker("r","ff0000",0.1,0.11);a[1]=new echopoint.google.chart.model.RangeMarker("R","0000ff",0.1,0.11);return new echopoint.google.chart.RadarChart({renderId:"echopointUnitTestSimpleRadarChart",styleName:"ComplexChart",lineStyle:"r",data:[e],title:f,axisLabels:h,axisRanges:b,rangeMarkers:a})},_createSpline:function(){var d=new Array();d[0]=new echopoint.google.chart.model.ShapeMarker("a","00ff33",7);d[1]=new echopoint.google.chart.model.ShapeMarker("c","00ff33",7);d[2]=new echopoint.google.chart.model.ShapeMarker("d","00ff33",7);d[3]=new echopoint.google.chart.model.ShapeMarker("o","00ff33",7);d[4]=new echopoint.google.chart.model.ShapeMarker("s","00ff33",7);d[5]=new echopoint.google.chart.model.ShapeMarker("tValue+7","00ff33",7);d[6]=new echopoint.google.chart.model.ShapeMarker("x","00ff33",7);var e=new Array();e[0]=new echopoint.google.chart.model.ChartData([0,30,60,70,90,95,100],110);e[0].ydata=[20,30,40,50,60,70,80];e[0].ymax=100;e[0].legend="First";e[0].markers=d;var c=new Array();c[0]=new echopoint.google.chart.model.ShapeMarker("x","ff00ff",7);c[1]=new echopoint.google.chart.model.ShapeMarker("s","ff00ff",7);c[2]=new echopoint.google.chart.model.ShapeMarker("o","ff00ff",7);c[3]=new echopoint.google.chart.model.ShapeMarker("d","ff00ff",7);c[4]=new echopoint.google.chart.model.ShapeMarker("c","ff00ff",7);c[5]=new echopoint.google.chart.model.ShapeMarker("a","ff00ff",7);e[1]=new echopoint.google.chart.model.ChartData([10,30,40,45,52],60);e[1].ydata=[100,90,40,20,10];e[1].ymax=110;e[1].legend="Second";e[1].markers=c;var a=new Array();a[0]=new echopoint.google.chart.model.ShapeMarker("x","ff3300",7);a[1]=new echopoint.google.chart.model.ShapeMarker("a","ff3300",7);a[2]=new echopoint.google.chart.model.ShapeMarker("o","ff3300",7);a[3]=new echopoint.google.chart.model.ShapeMarker("c","ff3300",7);a[4]=new echopoint.google.chart.model.ShapeMarker("t","ff3300",7);e[2]=new echopoint.google.chart.model.ChartData([-1],0);e[2].ydata=[5,33,50,55,7];e[2].ymax=60;e[2].legend="Third";e[2].markers=a;var h=new echopoint.google.chart.model.Title("Complex Chart");h.add("Multiple Line Title");var g=new Array();g[0]=[0,20,40,60,80,100];g[1]=[0,25,50,75,100];g[2]=["Min","One Third","Full"];g[3]=[0,50,100];var f=new Array();f[0]=[];f[1]=[];f[2]=[0,3,10];f[3]=[];var j=new Array();j[0]=new echopoint.google.chart.model.LineStyle(3,6,3);j[1]=new echopoint.google.chart.model.LineStyle(2,4,2);j[2]=new echopoint.google.chart.model.LineStyle(4);var b=new Array();b[0]=new echopoint.google.chart.model.RangeMarker("r","e5ecf9",0.35,0.25);b[1]=new echopoint.google.chart.model.RangeMarker("R","a0bae9",0.35,0.25);var i=new Array();i[0]=new echopoint.google.chart.model.FillArea("b","224499",0,1);i[1]=new echopoint.google.chart.model.FillArea("b","76a4fb",1,2);return new echopoint.google.chart.RadarChart({renderId:"echopointUnitTestStrutComplexRadarChart",styleName:"ComplexChart",lineStyle:"rs",data:e,title:h,axisLabels:g,labelPositions:f,lineStyles:j,rangeMarkers:b,fillArea:i})}});echopoint.test.PieChartTest=Core.extend({$construct:function(a){a.add(this._createChart())},_createChart:function(){var a=new Array();a[0]=new echopoint.google.chart.model.ChartData([31,28,31,30,31,31,31,31,30,31,30,31]);var b=new echopoint.google.chart.model.Title("Pie Chart");var c=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];return new echopoint.google.chart.PieChart({renderId:"echopointUnitTestStrutComplexPieChart",styleName:"SimpleChart",data:a,title:b,labels:c})}});echopoint.test.VennDiagramTest=Core.extend({$construct:function(a){a.add(this._createChart())},_createChart:function(){var a=new Array();a[0]=new echopoint.google.chart.model.ChartData([100,80,60,30,30,30,10]);var b=new echopoint.google.chart.model.Title("Venn Diagram");return new echopoint.google.chart.VennDiagram({renderId:"echopointUnitTestStrutComplexVennDiagram",styleName:"SimpleChart",data:a,title:b})}});echopoint.test.MapTest=Core.extend({$construct:function(a){a.add(this._createSimple());a.add(this._createComplex())},_createSimple:function(){var a=[-1];var b=new echopoint.google.chart.model.ChartData(a,0);var c=new echopoint.google.chart.model.Title();c.add("World");return new echopoint.google.chart.Map({renderId:"echopointUnitTestSimpleMap",styleName:"SimpleChart",data:[b],title:c})},_createComplex:function(){var a=[0,5,9];var b=new echopoint.google.chart.model.ChartData(a,9);var c=new echopoint.google.chart.model.Title("Africa");return new echopoint.google.chart.Map({renderId:"echopointUnitTestStrutComplexMap",styleName:"ComplexChart",data:[b],title:c})}});echopoint.test.MeterTest=Core.extend({$construct:function(a){a.add(this._createMeter())},_createMeter:function(){var a=[70];var b=new echopoint.google.chart.model.ChartData(a,100);var c=new echopoint.google.chart.model.Title();c.add("Google-o-meter");return new echopoint.google.chart.Meter({renderId:"echopointUnitTestSimpleMeter",styleName:"SimpleChart",data:[b],title:c})}});echopoint.test.QRCodeTest=Core.extend({$construct:function(a){a.add(this._createQRCode())},_createQRCode:function(){var b=new echopoint.google.chart.model.Title();b.add("QRCode");var a="EchoPoint text to be encoded.";return new echopoint.google.chart.QRCode({renderId:"echopointUnitTestSimpleQRCode",styleName:"SimpleChart",title:b,text:a})}});