Core={_copyFunction:function(a){return function(){a.apply(this,arguments)}},_createFunction:function(){return function(){}},extend:function(){var h=arguments.length==1?null:arguments[0];var g=arguments.length==1?arguments[0]:arguments[1];var b,e;if(arguments.length==2){if(typeof(h)!="function"){throw new Error("Base class is not a function, cannot derive.")}}if(!g){throw new Error("Object definition not provided.")}var a;if(g.$construct){a=g.$construct;delete g.$construct}else{if(h){a=Core._copyFunction(h)}else{a=Core._createFunction()}}a.$virtual={};a.$super=h;if(h){var f=Core._createFunction();f.prototype=h.prototype;a.prototype=new f()}a.prototype.constructor=a;if(g.$abstract){a.$abstract={};if(h&&h.$abstract){for(b in h.$abstract){a.$abstract[b]=h.$abstract[b]}}if(g.$abstract instanceof Object){for(b in g.$abstract){a.$abstract[b]=true;a.$virtual[b]=true}}delete g.$abstract}if(h){for(e in h.$virtual){a.$virtual[e]=h.$virtual[e]}}if(g.$virtual){Core._inherit(a.prototype,g.$virtual,a.$virtual);
for(e in g.$virtual){a.$virtual[e]=true}delete g.$virtual}if(g.hasOwnProperty("toString")){a.prototype.toString=g.toString}if(g.hasOwnProperty("valueOf")){a.prototype.valueOf=g.valueOf}delete g.toString;delete g.valueOf;if(g.$include){var c=g.$include.reverse();Core._processMixins(a,c);delete g.$include}var d=null;if(g.$load){d=g.$load;delete g.$load}if(g.$static){Core._inherit(a,g.$static);delete g.$static}Core._inherit(a.prototype,g,a.$virtual);if(!a.$abstract){this._verifyAbstractImpl(a)}if(d){d.call(a)}return a},get:function(a,c){for(var b=0;b<c.length;++b){a=a[c[b]];if(!a){return null}}return a},_isVirtual:function(b,a){switch(a){case"toString":case"valueOf":return true}return b[a]},_inherit:function(a,d,c){for(var b in d){if(c&&a[b]!==undefined&&!this._isVirtual(c,b)){throw new Error('Cannot override non-virtual property "'+b+'".')}else{a[b]=d[b]}}},method:function(a,b){return function(){return b.apply(a,arguments)}},_processMixins:function(b,c){for(var d=0;d<c.length;++d){for(var a in c[d]){if(b.prototype[a]){continue
}b.prototype[a]=c[d][a]}}},set:function(a,e,d){var c=null;for(var b=0;b<e.length-1;++b){c=a;a=a[e[b]];if(!a){a={};c[e[b]]=a}}a[e[e.length-1]]=d},_verifyAbstractImpl:function(b){var c=b.$super;if(!c||!c.$abstract||c.$abstract===true){return}for(var a in c.$abstract){if(b.prototype[a]==null){throw new Error('Concrete class does not provide implementation of abstract method "'+a+'".')}}}};Core.Debug={consoleElement:null,useAlertDialog:false,consoleWrite:function(b){if(Core.Debug.consoleElement){var a=document.createElement("div");a.appendChild(document.createTextNode(b));if(Core.Debug.consoleElement.childNodes.length===0){Core.Debug.consoleElement.appendChild(a)}else{Core.Debug.consoleElement.insertBefore(a,Core.Debug.consoleElement.firstChild)}}else{if(Core.Debug.useAlertDialog){alert("DEBUG:"+b)}}},toString:function(b){var c="";for(var a in b){if(typeof b[a]!="function"){c+=a+":"+b[a]+"\n"}}return c}};Core.Arrays={containsAll:function(f,d,g){if(g&&f.length<d.length){return false}if(d.length===0){return true
}var e,c;for(var b=0;b<d.length;++b){e=false;c=d[b];for(var a=0;a<f.length;++a){if(c==f[a]){e=true;break}}if(!e){return false}}return true},indexOf:function(c,b){for(var a=0;a<c.length;++a){if(b==c[a]){return a}}return -1},remove:function(c,b){for(var a=0;a<c.length;++a){if(b==c[a]){c.splice(a,1);return}}},removeDuplicates:function(c){c.sort();var b=0;for(var a=c.length-1;a>0;--a){if(c[a]==c[a-1]){c[a]=c[c.length-1-b];++b}}if(b>0){c.length=c.length-b}}};Core.Arrays.LargeMap=Core.extend({$static:{garbageCollectEnabled:false},_removeCount:0,garbageCollectionInterval:250,map:null,$construct:function(){this.map={}},_garbageCollect:function(){this._removeCount=0;var a={};for(var b in this.map){a[b]=this.map[b]}this.map=a},remove:function(a){delete this.map[a];if(Core.Arrays.LargeMap.garbageCollectEnabled){++this._removeCount;if(this._removeCount>=this.garbageCollectionInterval){this._garbageCollect()}}},toString:function(){return Core.Debug.toString(this.map)}});Core.ListenerList=Core.extend({_data:null,$construct:function(){this._data=[]
},addListener:function(a,b){this._data.push(a,b)},fireEvent:function(d){if(d.type==null){throw new Error("Cannot fire event, type property not set.")}var a,c=true,b=[];for(a=0;a<this._data.length;a+=2){if(this._data[a]==d.type){b.push(this._data[a+1])}}for(a=0;a<b.length;++a){c=b[a](d)&&c}return c},getListenerTypes:function(){var b=[];for(var a=0;a<this._data.length;a+=2){b.push(this._data[a])}Core.Arrays.removeDuplicates(b);return b},getListeners:function(b){var c=[];for(var a=0;a<this._data.length;a+=2){if(this._data[a]==b){c.push(this._data[a+1])}}return c},getListenerCount:function(b){var c=0;for(var a=0;a<this._data.length;a+=2){if(this._data[a]==b){++c}}return c},hasListeners:function(b){for(var a=0;a<this._data.length;a+=2){if(this._data[a]==b){return true}}return false},isEmpty:function(){return this._data.length===0},removeListener:function(b,d){for(var a=0;a<this._data.length;a+=2){if(this._data[a]==b&&d==this._data[a+1]){var c=this._data.length;this._data.splice(a,2);return}}},toString:function(){var a="";
for(var b=0;b<this._data.length;b+=2){if(b>0){a+=", "}a+=this._data[b]+":"+this._data[b+1]}return a}});Core.ResourceBundle=Core.extend({$static:{getParentLanguageCode:function(a){if(a.indexOf("-")==-1){return null}else{return a.substring(0,a.indexOf("-"))}}},_sourceMaps:null,_generatedMaps:null,_defaultMap:null,$construct:function(a){this._sourceMaps={};this._generatedMaps={};this._defaultMap=a},get:function(d){var c=d?this._generatedMaps[d]:this._defaultMap;if(c){return c}c={};var a;var e=this._sourceMaps[d];if(e){for(a in e){c[a]=e[a]}}var b=Core.ResourceBundle.getParentLanguageCode(d);if(b){e=this._sourceMaps[b];if(e){for(a in e){if(c[a]===undefined){c[a]=e[a]}}}}for(a in this._defaultMap){if(c[a]===undefined){c[a]=this._defaultMap[a]}}this._generatedMaps[d]=c;return c},set:function(b,a){this._generatedMaps={};this._sourceMaps[b]=a},toString:function(){var b="ResourceBundle: ";for(var a in this._sourceMaps){b+=" "+a}return b}});Core.Web={dragInProgress:false,init:function(){if(Core.Web.initialized){return
}Core.Web.Env._init();Core.Web.Measure._calculateExtentSizes();Core.Web.Measure.Bounds._initMeasureContainer();if(Core.Web.Env.QUIRK_CSS_POSITIONING_ONE_SIDE_ONLY){Core.Web.VirtualPosition._init()}if(Core.Web.Env.ENGINE_MSHTML){Core.Web.DOM.addEventListener(document,"selectstart",Core.Web._selectStartListener,false)}Core.Web.initialized=true},_selectStartListener:function(a){a=a?a:window.event;if(Core.Web.dragInProgress){Core.Web.DOM.preventEventDefault(a)}}};Core.Web.DOM={_focusPendingElement:null,_focusRunnable:null,addEventListener:function(d,c,b,a){if(d.addEventListener){d.addEventListener(c,b,a)}else{if(d.attachEvent){d.attachEvent("on"+c,b)}}},createDocument:function(a,d){if(document.implementation&&document.implementation.createDocument){var e;if(Core.Web.Env.BROWSER_FIREFOX&&Core.Web.Env.BROWSER_VERSION_MAJOR==3&&Core.Web.Env.BROWSER_VERSION_MINOR===0){e=new DOMParser().parseFromString("<?xml version='1.0' encoding='UTF-8'?><"+d+"/>","application/xml")}else{e=document.implementation.createDocument(a,d,null)
}if(!e.documentElement){e.appendChild(e.createElement(d))}return e}else{if(window.ActiveXObject){var b=new ActiveXObject("Microsoft.XMLDOM");var c=b.createElement(d);b.appendChild(c);return b}else{throw new Error("XML DOM creation not supported by browser environment.")}}},focusElement:function(a){if(Core.Web.Env.QUIRK_DELAYED_FOCUS_REQUIRED){if(!this._focusRunnable){this._focusRunnable=new Core.Web.Scheduler.MethodRunnable(this._focusElementImpl)}Core.Web.DOM._focusPendingElement=a;Core.Web.Scheduler.add(this._focusRunnable)}else{this._focusElementImpl(a)}},_focusElementImpl:function(b){if(!b){b=Core.Web.DOM._focusPendingElement;Core.Web.DOM._focusPendingElement=null}if(b&&b.focus){try{b.focus()}catch(a){}}},getChildElementByTagName:function(a,c){var b=a.firstChild;while(b){if(b.nodeType==1&&b.nodeName==c){return b}b=b.nextSibling}return null},getChildElementsByTagName:function(a,c){var d=[];var b=a.firstChild;while(b){if(b.nodeType==1&&b.nodeName==c){d.push(b)}b=b.nextSibling}return d
},getEventOffset:function(b){if(typeof b.offsetX=="number"){return{x:b.offsetX,y:b.offsetY}}else{var a=new Core.Web.Measure.Bounds(this.getEventTarget(b));return{x:b.clientX-a.left,y:b.clientY-a.top}}},getEventTarget:function(a){return a.target?a.target:a.srcElement},getEventRelatedTarget:function(a){return a.relatedTarget?a.relatedTarget:a.toElement},isAncestorOf:function(a,c){var b=c;while(b!==null){if(b==a){return true}b=b.parentNode}return false},preventEventDefault:function(a){if(a.preventDefault){a.preventDefault()}else{a.returnValue=false}},removeAllChildren:function(a){while(a.firstChild){a.removeChild(a.firstChild)}},removeEventListener:function(d,c,b,a){if(d.removeEventListener){d.removeEventListener(c,b,a)}else{if(d.detachEvent){d.detachEvent("on"+c,b)}}},removeNode:function(b){var a=b.parentNode;if(!a){return}if(Core.Web.Env.QUIRK_PERFORMANCE_LARGE_DOM_REMOVE){this._removeNodeRecursive(b)}else{a.removeChild(b)}},_removeNodeRecursive:function(c){var b=c.firstChild;while(b){var a=b.nextSibling;
this._removeNodeRecursive(b);b=a}c.parentNode.removeChild(c)},stopEventPropagation:function(a){if(a.stopPropagation){a.stopPropagation()}else{a.cancelBubble=true}}};Core.Web.Env={ENGINE_PRESTO:null,ENGINE_WEBKIT:null,ENGINE_KHTML:null,ENGINE_MSHTML:null,ENGINE_GECKO:null,BROWSER_MOZILLA:null,BROWSER_OPERA:null,BROWSER_KONQUEROR:null,BROWSER_FIREFOX:null,BROWSER_INTERNET_EXPLORER:null,BROWSER_CHROME:null,BROWSER_VERSION_MAJOR:null,BROWSER_VERSION_MINOR:null,ENGINE_VERSION_MAJOR:null,ENGINE_VERSION_MINOR:null,DECEPTIVE_USER_AGENT:null,CSS_FLOAT:"cssFloat",MEASURE_OFFSET_EXCLUDES_BORDER:null,NOT_SUPPORTED_CSS_OPACITY:null,NOT_SUPPORTED_RELATIVE_COLUMN_WIDTHS:null,NOT_SUPPORTED_INPUT_SELECTION:null,NOT_SUPPORTED_RANGE:null,PROPRIETARY_EVENT_MOUSE_ENTER_LEAVE_SUPPORTED:null,PROPRIETARY_EVENT_SELECT_START_SUPPORTED:null,PROPRIETARY_IE_OPACITY_FILTER_REQUIRED:null,PROPRIETARY_IE_PNG_ALPHA_FILTER_REQUIRED:null,PROPRIETARY_IE_RANGE:null,QUIRK_KEY_CODE_IS_CHAR_CODE:null,QUIRK_KEY_PRESS_FIRED_FOR_SPECIAL_KEYS:null,QUIRK_KEY_DOWN_NOT_FIRED_FOR_SPECIAL_KEYS:null,QUIRK_CSS_BORDER_COLLAPSE_INSIDE:null,QUIRK_CSS_POSITIONING_ONE_SIDE_ONLY:null,QUIRK_DELAYED_FOCUS_REQUIRED:null,QUIRK_IE_BLANK_SCREEN:null,QUIRK_IE_HAS_LAYOUT:null,QUIRK_IE_SELECT_LIST_DOM_UPDATE:null,QUIRK_IE_SELECT_PERCENT_WIDTH:null,QUIRK_IE_SELECT_Z_INDEX:null,QUIRK_IE_SECURE_ITEMS:null,QUIRK_IE_TABLE_PERCENT_WIDTH_SCROLLBAR_ERROR:null,QUIRK_MEASURE_OFFSET_HIDDEN_BORDER:null,QUIRK_OPERA_CSS_POSITIONING:null,QUIRK_PERFORMANCE_LARGE_DOM_REMOVE:null,QUIRK_WEBKIT_DOM_TEXT_ESCAPE:null,QUIRK_TABLE_CELL_WIDTH_EXCLUDES_PADDING:null,QUIRK_UNLOADED_IMAGE_HAS_SIZE:null,_ua:null,_uaAlpha:null,_init:function(){var b=null,c=null,a=false;
this._ua=navigator.userAgent.toLowerCase();this._uaAlpha="/"+this._ua.replace(/[^a-z]+/g,"/")+"/";if(this._testUAString("opera")){this.BROWSER_OPERA=a=this.ENGINE_PRESTO=true;b=this._parseVersionInfo("opera/")}else{if(this._testUAString("chrome")){this.BROWSER_CHROME=a=this.ENGINE_WEBKIT=true;b=this._parseVersionInfo("chrome/")}else{if(this._testUAString("safari")){this.BROWSER_SAFARI=a=this.ENGINE_WEBKIT=true;b=this._parseVersionInfo("version/")}else{if(this._testUAString("konqueror")){this.BROWSER_KONQUEROR=a=this.ENGINE_KHTML=true;b=this._parseVersionInfo("konqueror/")}else{if(this._testUAString("firefox")){this.BROWSER_FIREFOX=this.BROWSER_MOZILLA=a=this.ENGINE_GECKO=true;b=this._parseVersionInfo("firefox/")}else{if(this._testUAString("msie")){this.BROWSER_INTERNET_EXPLORER=a=this.ENGINE_MSHTML=true;c=b=this._parseVersionInfo("msie ")}}}}}}if(!a){if(this._testUAString("presto")){this.ENGINE_PRESTO=true}else{if(this._testUAString("webkit")){this.ENGINE_WEBKIT=true}else{if(this._testUAString("khtml")){this.ENGINE_KHTML=true
}else{if(this._testUAString("trident")){this.ENGINE_MSHTML=true}else{if(this._testUAString("gecko")){this.BROWSER_MOZILLA=this.ENGINE_GECKO=true}}}}}}if(!c){if(this.ENGINE_PRESTO){c=this._parseVersionInfo("presto/")}else{if(this.ENGINE_WEBKIT){c=this._parseVersionInfo("webkit/")}else{if(this.ENGINE_GECKO){c=this._parseVersionInfo("rv:");if(!b){b=c}}}}}if(b){this.BROWSER_VERSION_MAJOR=b.major;this.BROWSER_VERSION_MINOR=b.minor}if(c){this.ENGINE_VERSION_MAJOR=c.major;this.ENGINE_VERSION_MINOR=c.minor}this.DECEPTIVE_USER_AGENT=this.BROWSER_OPERA||this.BROWSER_SAFARI||this.BROWSER_CHROME||this.BROWSER_KONQUEROR;this.MEASURE_OFFSET_EXCLUDES_BORDER=false;if(this.BROWSER_INTERNET_EXPLORER){this.CSS_FLOAT="styleFloat";this.QUIRK_KEY_CODE_IS_CHAR_CODE=true;this.QUIRK_IE_SECURE_ITEMS=true;this.NOT_SUPPORTED_RANGE=true;this.NOT_SUPPORTED_INPUT_SELECTION=true;this.PROPRIETARY_IE_RANGE=true;this.PROPRIETARY_EVENT_MOUSE_ENTER_LEAVE_SUPPORTED=true;this.PROPRIETARY_EVENT_SELECT_START_SUPPORTED=true;this.QUIRK_DELAYED_FOCUS_REQUIRED=true;
this.QUIRK_UNLOADED_IMAGE_HAS_SIZE=true;this.MEASURE_OFFSET_EXCLUDES_BORDER=true;this.QUIRK_IE_BLANK_SCREEN=true;this.QUIRK_IE_HAS_LAYOUT=true;if(this.BROWSER_VERSION_MAJOR<8){this.QUIRK_TABLE_CELL_WIDTH_EXCLUDES_PADDING=true;this.NOT_SUPPORTED_RELATIVE_COLUMN_WIDTHS=true;this.QUIRK_CSS_BORDER_COLLAPSE_INSIDE=true;this.NOT_SUPPORTED_CSS_OPACITY=true;this.PROPRIETARY_IE_OPACITY_FILTER_REQUIRED=true;this.QUIRK_IE_TABLE_PERCENT_WIDTH_SCROLLBAR_ERROR=true;this.QUIRK_IE_SELECT_PERCENT_WIDTH=true;if(this.BROWSER_VERSION_MAJOR<7){this.QUIRK_IE_SELECT_LIST_DOM_UPDATE=true;this.QUIRK_CSS_POSITIONING_ONE_SIDE_ONLY=true;this.PROPRIETARY_IE_PNG_ALPHA_FILTER_REQUIRED=true;this.QUIRK_IE_SELECT_Z_INDEX=true;Core.Arrays.LargeMap.garbageCollectEnabled=true}}}else{if(this.ENGINE_GECKO){this.QUIRK_KEY_PRESS_FIRED_FOR_SPECIAL_KEYS=true;this.MEASURE_OFFSET_EXCLUDES_BORDER=true;this.QUIRK_MEASURE_OFFSET_HIDDEN_BORDER=true;if(this.BROWSER_FIREFOX){if(this.BROWSER_VERSION_MAJOR<2){this.QUIRK_DELAYED_FOCUS_REQUIRED=true
}}else{this.QUIRK_PERFORMANCE_LARGE_DOM_REMOVE=true;this.QUIRK_DELAYED_FOCUS_REQUIRED=true}}else{if(this.ENGINE_PRESTO){this.QUIRK_KEY_CODE_IS_CHAR_CODE=true;this.QUIRK_TABLE_CELL_WIDTH_EXCLUDES_PADDING=true;if(this.BROWSER_VERSION_MAJOR==9&&this.BROWSER_VERSION_MINOR>=50){this.QUIRK_OPERA_CSS_POSITIONING=true}this.NOT_SUPPORTED_RELATIVE_COLUMN_WIDTHS=true}else{if(this.ENGINE_WEBKIT){this.MEASURE_OFFSET_EXCLUDES_BORDER=true;if(this.ENGINE_VERSION_MAJOR<526||(this.ENGINE_VERSION_MAJOR==526&&this.ENGINE_VERSION_MINOR<8)){this.QUIRK_WEBKIT_DOM_TEXT_ESCAPE=true}}}}}},_parseVersionInfo:function(e){var d={};var b=this._ua.indexOf(e);if(b==-1){return}var a=this._ua.indexOf(".",b);var h=this._ua.length;if(a==-1){a=this._ua.length}else{for(var f=a+1;f<this._ua.length;f++){var g=this._ua.charAt(f);if(isNaN(g)){h=f;break}}}d.major=parseInt(this._ua.substring(b+e.length,a),10);if(a==this._ua.length){d.minor=0}else{d.minor=parseInt(this._ua.substring(a+1,h),10)}return d},_testUAString:function(a){return this._uaAlpha.indexOf("/"+a+"/")!=-1
}};Core.Web.Event={Selection:{disable:function(a){Core.Web.Event.add(a,"mousedown",Core.Web.Event.Selection._disposeEvent,false);if(Core.Web.Env.PROPRIETARY_EVENT_SELECT_START_SUPPORTED){Core.Web.Event.add(a,"selectstart",Core.Web.Event.Selection._disposeEvent,false)}},_disposeEvent:function(a){Core.Web.DOM.preventEventDefault(a)},enable:function(a){Core.Web.Event.remove(a,"mousedown",Core.Web.Event.Selection._disposeEvent,false);if(Core.Web.Env.PROPRIETARY_EVENT_SELECT_START_SUPPORTED){Core.Web.Event.remove(a,"selectstart",Core.Web.Event.Selection._disposeEvent,false)}}},_nextId:0,_listenerCount:0,debugListenerCount:false,_capturingListenerMap:new Core.Arrays.LargeMap(),_bubblingListenerMap:new Core.Arrays.LargeMap(),add:function(c,b,d,a){if(!c.__eventProcessorId){c.__eventProcessorId=++Core.Web.Event._nextId}var f;if(c.__eventProcessorId==Core.Web.Event._lastId&&a==Core.Web.Event._lastCapture){f=Core.Web.Event._lastListenerList}else{var e=a?Core.Web.Event._capturingListenerMap:Core.Web.Event._bubblingListenerMap;
f=e.map[c.__eventProcessorId];if(!f){f=new Core.ListenerList();e.map[c.__eventProcessorId]=f}Core.Web.Event._lastId=c.__eventProcessorId;Core.Web.Event._lastCapture=a;Core.Web.Event._lastListenerList=f}if(!f.hasListeners(b)){Core.Web.DOM.addEventListener(c,b,Core.Web.Event._processEvent,false);++Core.Web.Event._listenerCount}f.addListener(b,d)},_processEvent:function(d){if(Core.Web.Event.debugListenerCount){Core.Debug.consoleWrite("Core.Web.Event listener count: "+Core.Web.Event._listenerCount)}d=d?d:window.event;if(!d.target&&d.srcElement){d.target=d.srcElement}var f=[];var b=d.target;while(b){if(b.__eventProcessorId){f.push(b)}b=b.parentNode}var g,c,a=true;for(c=f.length-1;c>=0;--c){g=Core.Web.Event._capturingListenerMap.map[f[c].__eventProcessorId];if(g){d.registeredTarget=f[c];if(!g.fireEvent(d)){a=false;break}}}if(a){for(c=0;c<f.length;++c){g=Core.Web.Event._bubblingListenerMap.map[f[c].__eventProcessorId];if(g){d.registeredTarget=f[c];if(!g.fireEvent(d)){break}}}}Core.Web.DOM.stopEventPropagation(d)
},remove:function(c,b,d,a){Core.Web.Event._lastId=null;if(!c.__eventProcessorId){return}var e=a?Core.Web.Event._capturingListenerMap:Core.Web.Event._bubblingListenerMap;var f=e.map[c.__eventProcessorId];if(f){f.removeListener(b,d);if(f.isEmpty()){e.remove(c.__eventProcessorId)}if(!f.hasListeners(b)){Core.Web.DOM.removeEventListener(c,b,Core.Web.Event._processEvent,false);--Core.Web.Event._listenerCount}}},removeAll:function(a){Core.Web.Event._lastId=null;if(!a.__eventProcessorId){return}Core.Web.Event._removeAllImpl(a,Core.Web.Event._capturingListenerMap);Core.Web.Event._removeAllImpl(a,Core.Web.Event._bubblingListenerMap)},_removeAllImpl:function(c,d){var e=d.map[c.__eventProcessorId];if(!e){return}var b=e.getListenerTypes();for(var a=0;a<b.length;++a){Core.Web.DOM.removeEventListener(c,b[a],Core.Web.Event._processEvent,false);--Core.Web.Event._listenerCount}d.remove(c.__eventProcessorId)},toString:function(){return"Capturing: "+Core.Web.Event._capturingListenerMap+"\nBubbling: "+Core.Web.Event._bubblingListenerMap
}};Core.Web.HttpConnection=Core.extend({_url:null,_contentType:null,_method:null,_messageObject:null,_listenerList:null,_disposed:false,_xmlHttpRequest:null,_requestHeaders:null,$construct:function(a,d,b,c){this._url=a;this._contentType=c;this._method=d;if(Core.Web.Env.QUIRK_WEBKIT_DOM_TEXT_ESCAPE&&b instanceof Document){this._preprocessWebkitDOM(b.documentElement)}this._messageObject=b;this._listenerList=new Core.ListenerList()},_preprocessWebkitDOM:function(a){if(a.nodeType==3){var b=a.data;b=b.replace(/&/g,"&amp;");b=b.replace(/</g,"&lt;");b=b.replace(/>/g,"&gt;");a.data=b}else{var c=a.firstChild;while(c){this._preprocessWebkitDOM(c);c=c.nextSibling}}},addResponseListener:function(a){this._listenerList.addListener("response",a)},connect:function(){var b=false;if(window.XMLHttpRequest){this._xmlHttpRequest=new XMLHttpRequest()}else{if(window.ActiveXObject){b=true;this._xmlHttpRequest=new ActiveXObject("Microsoft.XMLHTTP")}else{throw"Connect failed: Cannot create XMLHttpRequest."}}var a=this;
this._xmlHttpRequest.onreadystatechange=function(){if(!a){return}try{a._processReadyStateChange()}finally{if(a._disposed){a=null}}};this._xmlHttpRequest.open(this._method,this._url,true);if(this._requestHeaders&&(b||this._xmlHttpRequest.setRequestHeader)){for(var c in this._requestHeaders){try{this._xmlHttpRequest.setRequestHeader(c,this._requestHeaders[c])}catch(d){throw new Error('Failed to set header "'+c+'"')}}}if(this._contentType&&(b||this._xmlHttpRequest.setRequestHeader)){this._xmlHttpRequest.setRequestHeader("Content-Type",this._contentType)}this._xmlHttpRequest.send(this._messageObject?this._messageObject:null)},dispose:function(){this._listenerList=null;this._messageObject=null;this._xmlHttpRequest=null;this._disposed=true;this._requestHeaders=null},getResponseHeader:function(a){return this._xmlHttpRequest?this._xmlHttpRequest.getResponseHeader(a):null},getAllResponseHeaders:function(){return this._xmlHttpRequest?this._xmlHttpRequest.getAllResponseHeaders():null},getStatus:function(){return this._xmlHttpRequest?this._xmlHttpRequest.status:null
},getResponseText:function(){return this._xmlHttpRequest?this._xmlHttpRequest.responseText:null},getResponseXml:function(){return this._xmlHttpRequest?this._xmlHttpRequest.responseXML:null},_processReadyStateChange:function(){if(this._disposed){return}if(this._xmlHttpRequest.readyState==4){var c;try{var b=!this._xmlHttpRequest.status||(this._xmlHttpRequest.status>=200&&this._xmlHttpRequest.status<=299);c={type:"response",source:this,valid:b}}catch(a){c={type:"response",source:this,valid:false,exception:a}}Core.Web.Scheduler.run(Core.method(this,function(){this._listenerList.fireEvent(c);this.dispose()}))}},removeResponseListener:function(a){this._listenerList.removeListener("response",a)},setRequestHeader:function(b,a){if(!this._requestHeaders){this._requestHeaders={}}this._requestHeaders[b]=a}});Core.Web.Image={_Monitor:Core.extend({_processImageLoadRef:null,_queuedRunnable:null,_listener:null,_interval:null,_count:0,$construct:function(c,d,a){this._listener=d;this._interval=a||250;this._processImageLoadRef=Core.method(this,this._processImageLoad);
var e=c.getElementsByTagName("img");this._count=e.length;for(var b=0;b<this._count;++b){if(!e[b].complete&&(Core.Web.Env.QUIRK_UNLOADED_IMAGE_HAS_SIZE||(!e[b].height&&!e[b].style.height))){Core.Web.DOM.addEventListener(e[b],"load",this._processImageLoadRef,false)}}},_processImageLoad:function(a){a=a?a:window.event;Core.Web.DOM.removeEventListener(Core.Web.DOM.getEventTarget(a),"load",this._processImageLoadRef,false);--this._count;if(this._queuedRunnable&&this._count===0){Core.Web.Scheduler.remove(this._queuedRunnable);this._queuedRunnable=null}if(!this._queuedRunnable){this._queuedRunnable=Core.Web.Scheduler.run(Core.method(this,function(){this._queuedRunnable=null;this._listener()}),this._count===0?0:this._interval)}}}),monitor:function(d,b,c){var a=new Core.Web.Image._Monitor(d,b,c)}};Core.Web.Key={_KEY_TABLES:{GECKO:{59:186,61:187,109:189},MAC_GECKO:{},PRESTO:{59:186,61:187,44:188,45:189,46:190,47:191,96:192,91:219,92:220,93:221,39:222},WEBKIT:{}},_keyTable:null,_loadKeyTable:function(){if(Core.Web.Env.ENGINE_GECKO){this._keyTable=this._KEY_TABLES.GECKO
}else{if(Core.Web.Env.ENGINE_PRESTO){this._keyTable=this._KEY_TABLES.PRESTO}else{this._keyTable={}}}},translateKeyCode:function(a){if(!this._keyTable){this._loadKeyTable()}return this._keyTable[a]||a}};Core.Web.Library={_loadedLibraries:{},evalLine:null,Group:Core.extend({_listenerList:null,_libraries:null,_loadedCount:0,_totalCount:0,$construct:function(){this._listenerList=new Core.ListenerList();this._libraries=[]},add:function(b){if(Core.Web.Library._loadedLibraries[b]){return}var a=new Core.Web.Library._Item(this,b);this._libraries.push(a)},addLoadListener:function(a){this._listenerList.addListener("load",a)},hasNewLibraries:function(){return this._libraries.length>0},_install:function(){for(var b=0;b<this._libraries.length;++b){try{this._libraries[b]._install()}catch(a){var c={type:"load",source:this,success:false,ex:a,url:this._libraries[b]._url,cancel:false};try{this._listenerList.fireEvent(c)}finally{if(!c.cancel){throw new Error('Exception installing library "'+this._libraries[b]._url+'"; '+a)
}}}}this._listenerList.fireEvent({type:"load",source:this,success:true})},_notifyRetrieved:function(){++this._loadedCount;if(this._loadedCount==this._totalCount){this._install()}},load:function(){this._totalCount=this._libraries.length;for(var a=0;a<this._libraries.length;++a){this._libraries[a]._retrieve()}},removeLoadListener:function(a){this._listenerList.removeListener("load",a)}}),_Item:Core.extend({_url:null,_group:null,_content:null,$construct:function(b,a){this._url=a;this._group=b},_retrieveListener:function(a){if(!a.valid){throw new Error('Invalid HTTP response retrieving library "'+this._url+'", received status: '+a.source.getStatus())}this._content=a.source.getResponseText();this._group._notifyRetrieved()},_install:function(){if(Core.Web.Library._loadedLibraries[this._url]){return}Core.Web.Library._loadedLibraries[this._url]=true;if(this._content==null){throw new Error("Attempt to install library when no content has been loaded.")}Core.Web.Library.evalLine=new Error().lineNumber+1;
eval(this._content)},_retrieve:function(){var a=new Core.Web.HttpConnection(this._url,"GET");a.addResponseListener(Core.method(this,this._retrieveListener));a.connect()}}),exec:function(b,c){var d=null;for(var a=0;a<b.length;++a){if(!Core.Web.Library._loadedLibraries[b[a]]){if(d==null){d=new Core.Web.Library.Group()}d.add(b[a])}}if(d==null){Core.Web.Scheduler.run(c);return}d.addLoadListener(c);d.load()}};Core.Web.Measure={_scrollElements:["div","body"],_hInch:96,_vInch:96,_hEx:7,_vEx:7,_hEm:13.3333,_vEm:13.3333,SCROLL_WIDTH:17,SCROLL_HEIGHT:17,_PARSER:/^(-?\d+(?:\.\d+)?)(.+)?$/,extentToPixels:function(d,a){var f=this._PARSER.exec(d);if(!f){throw new Error("Invalid Extent: "+d)}var e=parseFloat(f[1]);var b=f[2]?f[2]:"px";if(!b||b=="px"){return e}var c=a?Core.Web.Measure._hInch:Core.Web.Measure._vInch;switch(b){case"%":return null;case"in":return e*(a?Core.Web.Measure._hInch:Core.Web.Measure._vInch);case"cm":return e*(a?Core.Web.Measure._hInch:Core.Web.Measure._vInch)/2.54;case"mm":return e*(a?Core.Web.Measure._hInch:Core.Web.Measure._vInch)/25.4;
case"pt":return e*(a?Core.Web.Measure._hInch:Core.Web.Measure._vInch)/72;case"pc":return e*(a?Core.Web.Measure._hInch:Core.Web.Measure._vInch)/6;case"em":return e*(a?Core.Web.Measure._hEm:Core.Web.Measure._vEm);case"ex":return e*(a?Core.Web.Measure._hEx:Core.Web.Measure._vEx)}},_calculateExtentSizes:function(){var h=document.getElementsByTagName("body")[0];var f=document.createElement("div");f.style.width="4in";f.style.height="4in";h.appendChild(f);Core.Web.Measure._hInch=f.offsetWidth/4;Core.Web.Measure._vInch=f.offsetHeight/4;h.removeChild(f);var b=document.createElement("div");b.style.width="24em";b.style.height="24em";h.appendChild(b);Core.Web.Measure._hEm=b.offsetWidth/24;Core.Web.Measure._vEm=b.offsetHeight/24;h.removeChild(b);var a=document.createElement("div");a.style.width="24ex";a.style.height="24ex";h.appendChild(a);Core.Web.Measure._hEx=a.offsetWidth/24;Core.Web.Measure._vEx=a.offsetHeight/24;h.removeChild(a);var g=document.createElement("div");g.style.cssText="width:500px;height:100px;overflow:auto;";
var d=document.createElement("div");d.style.cssText="width:100px;height:200px;";g.appendChild(d);var e=document.createElement("div");e.style.cssText="width:100%;height:10px;";g.appendChild(e);h.appendChild(g);var c=500-e.offsetWidth;if(c){Core.Web.Measure.SCROLL_WIDTH=Core.Web.Measure.SCROLL_HEIGHT=c}h.removeChild(g)},_getScrollOffset:function(b){var a=0,c=0;do{if(b.scrollLeft||b.scrollTop){a+=b.scrollTop||0;c+=b.scrollLeft||0}b=b.offsetParent}while(b);return{left:c,top:a}},_getCumulativeOffset:function(b){var a=0,d=0,e=true;do{a+=b.offsetTop||0;d+=b.offsetLeft||0;if(!e&&Core.Web.Env.MEASURE_OFFSET_EXCLUDES_BORDER){if(b.style.borderLeftWidth&&b.style.borderLeftStyle!="none"){var c=Core.Web.Measure.extentToPixels(b.style.borderLeftWidth,true);d+=c;if(Core.Web.Env.QUIRK_MEASURE_OFFSET_HIDDEN_BORDER&&b.style.overflow=="hidden"){d+=c}}if(b.style.borderTopWidth&&b.style.borderTopStyle!="none"){var f=Core.Web.Measure.extentToPixels(b.style.borderTopWidth,false);a+=f;if(Core.Web.Env.QUIRK_MEASURE_OFFSET_HIDDEN_BORDER&&b.style.overflow=="hidden"){a+=f
}}}e=false;b=b.offsetParent}while(b);return{left:d,top:a}},Bounds:Core.extend({$static:{FLAG_MEASURE_DIMENSION:1,FLAG_MEASURE_POSITION:2,_initMeasureContainer:function(){this._offscreenDiv=document.createElement("div");this._offscreenDiv.style.cssText="position: absolute; top: -1300px; left: -1700px; width: 1600px; height: 1200px;";document.body.appendChild(this._offscreenDiv)}},width:null,height:null,top:null,left:null,$construct:function(g,e){var b=(e&&e.flags)||(Core.Web.Measure.Bounds.FLAG_MEASURE_DIMENSION|Core.Web.Measure.Bounds.FLAG_MEASURE_POSITION);if(g===document.body){return{x:0,y:0,height:window.innerHeight||document.documentElement.clientHeight,width:window.innerWidth||document.documentElement.clientWidth}}var a=g;while(a&&a!=document){a=a.parentNode}var c=a==document;var i,f;if(b&Core.Web.Measure.Bounds.FLAG_MEASURE_DIMENSION){if(!c){i=g.parentNode;f=g.nextSibling;if(i){i.removeChild(g)}if(e){if(e.width){Core.Web.Measure.Bounds._offscreenDiv.width=e.width}if(e.height){Core.Web.Measure.Bounds._offscreenDiv.height=e.height
}}Core.Web.Measure.Bounds._offscreenDiv.appendChild(g);if(e){Core.Web.Measure.Bounds._offscreenDiv.width="1600px";Core.Web.Measure.Bounds._offscreenDiv.height="1200px"}}this.width=g.offsetWidth;this.height=g.offsetHeight;if(!c){Core.Web.Measure.Bounds._offscreenDiv.removeChild(g);if(i){i.insertBefore(g,f)}}}if(c&&(b&Core.Web.Measure.Bounds.FLAG_MEASURE_POSITION)){var d=Core.Web.Measure._getCumulativeOffset(g);var h=Core.Web.Measure._getScrollOffset(g);this.top=d.top-h.top;this.left=d.left-h.left}},toString:function(){return(this.left!=null?(this.left+","+this.top+" : "):"")+(this.width!=null?("["+this.width+"x"+this.height+"]"):"")}})};Core.Web.Scheduler={_runnables:[],_threadHandle:null,_nextExecution:null,add:function(a){Core.Arrays.remove(Core.Web.Scheduler._runnables,a);a._nextExecution=new Date().getTime()+(a.timeInterval?a.timeInterval:0);Core.Web.Scheduler._runnables.push(a);Core.Web.Scheduler._setTimeout(a._nextExecution)},_execute:function(){Core.Web.Scheduler._threadHandle=null;
var d=new Date().getTime();var f=Number.MAX_VALUE;var c,e;for(c=0;c<Core.Web.Scheduler._runnables.length;++c){e=Core.Web.Scheduler._runnables[c];if(e&&e._nextExecution&&e._nextExecution<=d){e._nextExecution=null;try{e.run()}catch(b){throw (b)}}}var g=[];for(c=0;c<Core.Web.Scheduler._runnables.length;++c){e=Core.Web.Scheduler._runnables[c];if(e==null){continue}if(e._nextExecution){g.push(e);var a=e._nextExecution-d;if(a<f){f=a}continue}if(e.timeInterval!=null&&e.repeat){e._nextExecution=d+e.timeInterval;g.push(e);if(e.timeInterval<f){f=e.timeInterval}}}Core.Web.Scheduler._runnables=g;if(f<Number.MAX_VALUE){Core.Web.Scheduler._setTimeout(d+f)}},remove:function(b){var a=Core.Arrays.indexOf(Core.Web.Scheduler._runnables,b);Core.Web.Scheduler._runnables[a]=null},run:function(d,a,c){var b=new Core.Web.Scheduler.MethodRunnable(d,a,c);Core.Web.Scheduler.add(b);return b},_setTimeout:function(c){if(Core.Web.Scheduler._threadHandle!=null&&Core.Web.Scheduler._nextExecution<c){return}if(Core.Web.Scheduler._threadHandle!=null){window.clearTimeout(Core.Web.Scheduler._threadHandle)
}var a=new Date().getTime();Core.Web.Scheduler._nextExecution=c;var b=c-a>0?c-a:0;Core.Web.Scheduler._threadHandle=window.setTimeout(Core.Web.Scheduler._execute,b)},update:function(c){if(Core.Arrays.indexOf(Core.Web.Scheduler._runnables,c)==-1){return}var b=new Date().getTime();var a=c.timeInterval?c.timeInterval:0;c._nextExecution=b+a;Core.Web.Scheduler._setTimeout(c._nextExecution)}};Core.Web.Scheduler.Runnable=Core.extend({_nextExecution:null,$virtual:{timeInterval:null,repeat:false},$abstract:{run:function(){}}});Core.Web.Scheduler.MethodRunnable=Core.extend(Core.Web.Scheduler.Runnable,{f:null,$construct:function(c,a,b){if(!a&&b){throw new Error("Cannot create repeating runnable without time delay:"+c)}this.f=c;this.timeInterval=a;this.repeat=!!b},$virtual:{run:function(){this.f()}}});Core.Web.VirtualPosition={_OFFSETS_VERTICAL:["paddingTop","paddingBottom","marginTop","marginBottom","borderTopWidth","borderBottomWidth"],_OFFSETS_HORIZONTAL:["paddingLeft","paddingRight","marginLeft","marginRight","borderLeftWidth","borderRightWidth"],enabled:false,_calculateOffsets:function(e,b){var c=0;
for(var a=0;a<e.length;++a){var d=b[e[a]];if(d){if(d.toString().indexOf("px")==-1){return -1}c+=parseInt(d,10)}}return c},_init:function(){this.enabled=true},redraw:function(c){if(!this.enabled){return}if(!c||!c.parentNode){return}var f;if(this._verifyPixelValue(c.style.top)&&this._verifyPixelValue(c.style.bottom)){var b=c.parentNode.offsetHeight;if(!isNaN(b)){f=this._calculateOffsets(this._OFFSETS_VERTICAL,c.style);if(f!=-1){var e=b-parseInt(c.style.top,10)-parseInt(c.style.bottom,10)-f;if(e<=0){c.style.height=0}else{if(c.style.height!=e+"px"){c.style.height=e+"px"}}}}}if(this._verifyPixelValue(c.style.left)&&this._verifyPixelValue(c.style.right)){var d=c.parentNode.offsetWidth;if(!isNaN(d)){f=this._calculateOffsets(this._OFFSETS_HORIZONTAL,c.style);if(f!=-1){var a=d-parseInt(c.style.left,10)-parseInt(c.style.right,10)-f;if(a<=0){c.style.width=0}else{if(c.style.width!=a+"px"){c.style.width=a+"px"}}}}}},_verifyPixelValue:function(b){if(b==null||b===""){return false}var a=b.toString();return a=="0"||a.indexOf("px")!=-1
}};Echo={};Echo.Application=Core.extend({$static:{_nextUid:1,generateUid:function(){return this._nextUid++}},$abstract:true,$virtual:{init:function(){},dispose:function(){},isActive:function(){return true}},client:null,_idToComponentMap:null,_listenerList:null,_locale:null,_modalComponents:null,_styleSheet:null,_focusedComponent:null,rootComponent:null,updateManager:null,focusManager:null,$construct:function(){this._idToComponentMap=new Core.Arrays.LargeMap();this._listenerList=new Core.ListenerList();this.rootComponent=new Echo.Component();this.rootComponent.componentType="Root";this.rootComponent.register(this);this._modalComponents=[];this.updateManager=new Echo.Update.Manager(this);this.focusManager=new Echo.FocusManager(this)},addListener:function(a,b){this._listenerList.addListener(a,b)},doDispose:function(){this.updateManager.dispose();this.dispose()},doInit:function(){this.init()},_findModalContextRoot:function(a){a=a?a:this.rootComponent;for(var c=a.children.length-1;c>=0;--c){var b=this._findModalContextRoot(a.children[c]);
if(b){return b}}if(a.modalSupport&&a.get("modal")){return a}return null},fireEvent:function(a){if(this._listenerList==null){return}this._listenerList.fireEvent(a)},focusNext:function(a){var b=this.focusManager.find(null,a);if(b!=null){this.setFocusedComponent(b)}},getComponentByRenderId:function(a){return this._idToComponentMap.map[a]},getFocusedComponent:function(){return this._focusedComponent},getLayoutDirection:function(){return this._layoutDirection?this._layoutDirection:Echo.LayoutDirection.LTR},getLocale:function(){return this._locale},getModalContextRoot:function(){if(this._modalComponents.length===0){return null}else{if(this._modalComponents.length==1){return this._modalComponents[0]}}return this._findModalContextRoot()},getStyleSheet:function(){return this._styleSheet},notifyComponentUpdate:function(c,a,b,d,e){if(c.modalSupport&&a=="modal"){this._setModal(c,d)}if(this._listenerList.hasListeners("componentUpdate")){this._listenerList.fireEvent({type:"componentUpdate",parent:c,propertyName:a,oldValue:b,newValue:d})
}if(!e){this.updateManager._processComponentUpdate(c,a,b,d)}},_registerComponent:function(a){if(this._idToComponentMap.map[a.renderId]){throw new Error("Component already exists with id: "+a.renderId)}this._idToComponentMap.map[a.renderId]=a;if(a.modalSupport&&a.get("modal")){this._setModal(a,true)}},removeListener:function(a,b){this._listenerList.removeListener(a,b)},setFocusedComponent:function(c){var a=this._focusedComponent;while(c!=null&&!c.focusable){c=c.parent}if(this._modalComponents.length>0){var b=this.getModalContextRoot();if(!b.isAncestorOf(c)){return}}if(this._focusedComponent==c){return}this._focusedComponent=c;this._listenerList.fireEvent({type:"focus",source:this,oldValue:a,newValue:c})},setLayoutDirection:function(a){this._layoutDirection=a;this.updateManager._processFullRefresh()},setLocale:function(a){this._locale=a;this.updateManager._processFullRefresh()},_setModal:function(a,b){Core.Arrays.remove(this._modalComponents,a);if(b){this._modalComponents.push(a)}if(this._modalComponents.length>0&&this._focusedComponent){var c=this.getModalContextRoot();
if(!c.isAncestorOf(this._focusedComponent)){if(c.focusable){this.setFocusedComponent(c)}else{this.setFocusedComponent(this.focusManager.findInParent(c,false))}}}this.fireEvent({source:this,type:"modal",modal:this._modalComponents.length>0})},setStyleSheet:function(a){this._styleSheet=a;this.updateManager._processFullRefresh()},_unregisterComponent:function(a){this._idToComponentMap.remove(a.renderId);if(a.modalSupport){this._setModal(a,false)}}});Echo.ComponentFactory={_typeToConstructorMap:{},newInstance:function(a,c){var d=this._typeToConstructorMap[a];if(!d){throw new Error("Type not registered with ComponentFactory: "+a)}var b=new d();b.renderId=c;return b},getConstructor:function(a){return this._typeToConstructorMap[a]},getSuperType:function(a){var b=this._typeToConstructorMap[a];if(!b){return"Component"}if(b.$super){return b.$super.prototype.componentType}else{return null}},registerType:function(a,b){if(this._typeToConstructorMap[a]){throw new Error("Type already registered: "+a)}this._typeToConstructorMap[a]=b
}};Echo.Component=Core.extend({$static:{_nextRenderId:0},$load:function(){Echo.ComponentFactory.registerType("Component",this)},$abstract:true,$virtual:{componentType:"Component",focusable:false,getFocusComponent:function(a){return this.children[a]},pane:false},_layoutDirection:null,_locale:null,renderId:null,parent:null,application:null,_listenerList:null,_style:null,_styleName:null,_enabled:true,children:null,focusNextId:null,focusPreviousId:null,_localStyle:null,$construct:function(d){this.children=[];this._localStyle={};if(d){for(var a in d){switch(a){case"style":this._style=d.style;break;case"styleName":this._styleName=d.styleName;break;case"renderId":this.renderId=d.renderId;break;case"children":for(var c=0;c<d.children.length;++c){this.add(d.children[c])}break;case"events":for(var b in d.events){this.addListener(b,d.events[b])}break;default:this._localStyle[a]=d[a]}}}},add:function(b,a){if(!(b instanceof Echo.Component)){throw new Error("Cannot add child: specified component object is not derived from Echo.Component. Parent: "+this+", Child: "+b)
}if(!b.componentType){throw new Error("Cannot add child: specified component object does not have a componentType property. Parent: "+this+", Child: "+b)}if(b.parent){b.parent.remove(b)}b.parent=this;if(a==null||a==this.children.length){this.children.push(b)}else{this.children.splice(a,0,b)}if(this.application){b.register(this.application);this.application.notifyComponentUpdate(this,"children",null,b)}if(b._listenerList&&b._listenerList.hasListeners("parent")){b._listenerList.fireEvent({type:"parent",source:b,oldValue:null,newValue:this})}if(this._listenerList&&this._listenerList.hasListeners("children")){this._listenerList.fireEvent({type:"children",source:this,add:b,index:a})}},addListener:function(a,b){if(this._listenerList==null){this._listenerList=new Core.ListenerList()}this._listenerList.addListener(a,b);if(this.application){this.application.notifyComponentUpdate(this,"listeners",null,a)}},fireEvent:function(a){if(this._listenerList==null){return}this._listenerList.fireEvent(a)},get:function(a){return this._localStyle[a]
},getComponent:function(a){return this.children[a]},getComponentCount:function(){return this.children.length},getIndex:function(b,a){var c=this._localStyle[b];return c?c[a]:null},getLayoutDirection:function(){return this._layoutDirection},getLocale:function(){return this._locale},getLocalStyleData:function(){return this._localStyle},getRenderLayoutDirection:function(){var a=this;while(a){if(a._layoutDirection){return a._layoutDirection}a=a.parent}if(this.application){return this.application.getLayoutDirection()}return null},getRenderLocale:function(){var a=this;while(a){if(a._locale){return a._locale}a=a.parent}if(this.application){return this.application.getLocale()}return null},getStyle:function(){return this._style},getStyleName:function(){return this._styleName},indexOf:function(a){for(var b=0;b<this.children.length;++b){if(this.children[b]==a){return b}}return -1},isActive:function(){if(!this.isRenderEnabled()){return false}if(!this.application||!this.application.isActive()){return false
}var a=this.application.getModalContextRoot();if(a!=null&&!a.isAncestorOf(this)){return false}return true},isAncestorOf:function(a){while(a!=null&&a!=this){a=a.parent}return a==this},isEnabled:function(){return this._enabled},isRenderEnabled:function(){var a=this;while(a!=null){if(!a._enabled){return false}a=a.parent}return true},register:function(a){if(a&&this.application){throw new Error("Attempt to re-register or change registered application of component.")}var b;if(!a){if(this.children!=null){for(b=0;b<this.children.length;++b){this.children[b].register(false)}}this.application._unregisterComponent(this);if(this.application._focusedComponent==this){this.application.setFocusedComponent(this.parent)}if(this._listenerList!=null&&this._listenerList.hasListeners("dispose")){this._listenerList.fireEvent({type:"dispose",source:this})}}this.application=a;if(a){if(this.renderId==null){this.renderId="CL."+(++Echo.Component._nextRenderId)}this.application._registerComponent(this);if(this._listenerList!=null&&this._listenerList.hasListeners("init")){this._listenerList.fireEvent({type:"init",source:this})
}if(this.children!=null){for(b=0;b<this.children.length;++b){this.children[b].register(a)}}}},render:function(b,a){var d=this._localStyle[b];if(d==null){if(this._style!=null){d=this._style[b]}if(d==null&&this.application&&this.application._styleSheet){var c=this.application._styleSheet.getRenderStyle(this._styleName!=null?this._styleName:"",this.componentType);if(c){d=c[b]}}}return d==null?a:d},renderIndex:function(c,b,a){var e=this._localStyle[c];var f=e?e[b]:null;if(f==null){if(this._style!=null){e=this._style[c];f=e?e[b]:null}if(f==null&&this._styleName&&this.application&&this.application._styleSheet){var d=this.application._styleSheet.getRenderStyle(this._styleName!=null?this._styleName:"",this.componentType);if(d){e=d[c];f=e?e[b]:null}}}return f==null?a:f},remove:function(c){var b;var a;if(typeof c=="number"){a=c;b=this.children[a];if(!b){throw new Error("Component.remove(): index out of bounds: "+a+", parent: "+this)}}else{b=c;a=this.indexOf(b);if(a==-1){return}}if(this.application){b.register(null)
}this.children.splice(a,1);b.parent=null;if(this.application){this.application.notifyComponentUpdate(this,"children",b,null)}if(b._listenerList&&b._listenerList.hasListeners("parent")){b._listenerList.fireEvent({type:"parent",source:b,oldValue:this,newValue:null})}if(this._listenerList&&this._listenerList.hasListeners("children")){this._listenerList.fireEvent({type:"children",source:this,remove:b,index:a})}},removeAll:function(){while(this.children.length>0){this.remove(this.children.length-1)}},removeListener:function(a,b){if(this._listenerList==null){return}this._listenerList.removeListener(a,b);if(this.application){this.application.notifyComponentUpdate(this,"listeners",a,null)}},set:function(b,c,d){var a=this._localStyle[b];if(a===c){return}this._localStyle[b]=c;if(this._listenerList&&this._listenerList.hasListeners("property")){this._listenerList.fireEvent({type:"property",source:this,propertyName:b,oldValue:a,newValue:c})}if(this.application){this.application.notifyComponentUpdate(this,b,a,c,d)
}},setEnabled:function(b){var a=this._enabled;this._enabled=b;if(this.application){this.application.notifyComponentUpdate(this,"enabled",a,b)}},setIndex:function(c,b,e,f){var d=this._localStyle[c];var a=null;if(d){a=d[b];if(a===e){return}}else{d=[];this._localStyle[c]=d}d[b]=e;if(this.application){this.application.notifyComponentUpdate(this,c,a,e,f)}if(this._listenerList&&this._listenerList.hasListeners("property")){this._listenerList.fireEvent({type:"property",source:this,propertyName:c,index:b,oldValue:a,newValue:e})}},setLayoutDirection:function(b){var a=this._layoutDirection;this._layoutDirection=b;if(this.application){this.application.notifyComponentUpdate(this,"layoutDirection",a,b)}},setLocale:function(b){var a=this._locale;this._locale=b;if(this.application){this.application.notifyComponentUpdate(this,"locale",a,b)}},setStyle:function(b){var a=this._style;this._style=b;if(this.application){this.application.notifyComponentUpdate(this,"style",a,b)}},setStyleName:function(b){var a=this._styleName;
this._styleName=b;if(this.application){this.application.notifyComponentUpdate(this,"styleName",a,b)}},toString:function(e){var c=this.renderId+"/"+this.componentType;if(e){c+="\n";var b=this.getComponentCount();c+=this.renderId+"/properties:"+this._localStyle+"\n";for(var d=0;d<b;++d){var a=this.getComponent(d);c+=this.renderId+"/child:"+a.renderId+"\n";c+=a.toString(true)}}return c}});Echo.FocusManager=Core.extend({_application:null,$construct:function(a){this._application=a},find:function(i,h){if(!i){i=this._application.getFocusedComponent();if(!i){i=this._application.rootComponent}}var g=h?i.focusPreviousId:i.focusNextId;if(g){var j=this._application.getComponentByRenderId(g);if(j&&j.isActive()&&j.focusable){return j}}var b=i;var c={};var a=null;while(true){var d=null,f;if((h&&i==b)||(a&&a.parent==i)){}else{var e=i.getComponentCount();if(e>0){d=i.getComponent(h?e-1:0);if(c[d.renderId]){d=null}}}if(d==null){if(i.parent){if(h){f=i.parent.indexOf(i);if(f>0){d=i.parent.getComponent(f-1)}}else{f=i.parent.indexOf(i);
if(f<i.parent.getComponentCount()-1){d=i.parent.getComponent(f+1)}}}}if(d==null){d=i.parent}if(d==null){return null}a=i;i=d;c[i.renderId]=true;if(i!=b&&i.isActive()&&i.focusable){return i}}},findInParent:function(g,d,c){if(!c){c=1}var h={},e=this._application.getFocusedComponent();if(!e){return null}h[e.renderId]=true;var f=this._getDescendantIndex(g,e);if(f==-1){return null}var a=f;var b=e;do{b=this.find(b,d,h);if(b==null||h[b.renderId]){return null}a=this._getDescendantIndex(g,b);h[b.renderId]=true}while(Math.abs(a-f)<c&&b!=e);if(b==e){return null}this._application.setFocusedComponent(b);return b},_getDescendantIndex:function(b,a){while(a.parent!=b&&a.parent!=null){a=a.parent}if(a.parent==null){return -1}return b.indexOf(a)}});Echo.LayoutDirection=Core.extend({_ltr:false,$construct:function(a){this._ltr=a},isLeftToRight:function(){return this._ltr}});Echo.LayoutDirection.LTR=new Echo.LayoutDirection(true);Echo.LayoutDirection.RTL=new Echo.LayoutDirection(false);Echo.StyleSheet=Core.extend({_nameToStyleMap:null,_renderCache:null,$construct:function(c){this._renderCache={};
this._nameToStyleMap={};if(c){for(var b in c){for(var a in c[b]){this.setStyle(b,a,c[b][a])}}}},getRenderStyle:function(b,a){var d=this._renderCache[b];if(!d){return null}var c=d[a];if(c!==undefined){return c}else{return this._loadRenderStyle(b,a)}},_loadRenderStyle:function(c,b){var e=this._nameToStyleMap[c];if(e==null){this._renderCache[c][b]=null;return null}var d=e[b];if(d==null){var a=b;while(d==null){a=Echo.ComponentFactory.getSuperType(a);if(a==null){this._renderCache[c][a]=null;return null}d=e[a]}}this._renderCache[c][b]=d;return d},getStyle:function(b,a){var c=this._nameToStyleMap[b];if(c==null){return null}return c[a]},setStyle:function(b,a,c){this._renderCache[b]={};var d=this._nameToStyleMap[b];if(d==null){d={};this._nameToStyleMap[b]=d}d[a]=c}});Echo.Update={};Echo.Update.ComponentUpdate=Core.extend({$static:{PropertyUpdate:function(a,b){this.oldValue=a;this.newValue=b}},_manager:null,parent:null,renderContext:null,_addedChildIds:null,_propertyUpdates:null,_removedChildIds:null,_removedDescendantIds:null,_updatedLayoutDataChildIds:null,_listenerUpdates:null,$construct:function(a,b){this._manager=a;
this.parent=b},_addChild:function(a){if(!this._addedChildIds){this._addedChildIds=[]}this._addedChildIds.push(a.renderId);this._manager._idMap[a.renderId]=a},_appendRemovedDescendants:function(b){var a;if(b._removedDescendantIds!=null){if(this._removedDescendantIds==null){this._removedDescendantIds=[]}for(a=0;a<b._removedDescendantIds.length;++a){this._removedDescendantIds.push(b._removedDescendantIds[a])}}if(b._removedChildIds!=null){if(this._removedDescendantIds==null){this._removedDescendantIds=[]}for(a=0;a<b._removedChildIds.length;++a){this._removedDescendantIds.push(b._removedChildIds[a])}}if(this._removedDescendantIds!=null){Core.Arrays.removeDuplicates(this._removedDescendantIds)}},getAddedChildren:function(){if(!this._addedChildIds){return null}var b=[];for(var a=0;a<this._addedChildIds.length;++a){b[a]=this._manager._idMap[this._addedChildIds[a]]}return b},getRemovedChildren:function(){if(!this._removedChildIds){return null}var b=[];for(var a=0;a<this._removedChildIds.length;++a){b[a]=this._manager._removedIdMap[this._removedChildIds[a]]
}return b},getRemovedDescendants:function(){if(!this._removedDescendantIds){return null}var b=[];for(var a=0;a<this._removedDescendantIds.length;++a){b[a]=this._manager._removedIdMap[this._removedDescendantIds[a]]}return b},getUpdatedLayoutDataChildren:function(){if(!this._updatedLayoutDataChildIds){return null}var b=[];for(var a=0;a<this._updatedLayoutDataChildIds.length;++a){b[a]=this._manager._idMap[this._updatedLayoutDataChildIds[a]]}return b},hasAddedChildren:function(){return this._addedChildIds!=null},hasRemovedChildren:function(){return this._removedChildIds!=null},hasUpdatedLayoutDataChildren:function(){return this._updatedLayoutDataChildIds!=null},hasUpdatedProperties:function(){return this._propertyUpdates!=null},getUpdatedProperty:function(a){if(this._propertyUpdates==null){return null}return this._propertyUpdates[a]},isListenerTypeUpdated:function(a){return this._listenerUpdates==null?false:this._listenerUpdates[a]},getUpdatedPropertyNames:function(){if(this._propertyUpdates==null){return[]
}var b=[];for(var a in this._propertyUpdates){b.push(a)}return b},hasUpdatedPropertyIn:function(b){for(var a in this._propertyUpdates){if(b[a]){return true}}return false},isUpdatedPropertySetIn:function(b){for(var a in this._propertyUpdates){if(!b[a]){return false}}return true},_removeChild:function(b){this._manager._removedIdMap[b.renderId]=b;if(this._addedChildIds){Core.Arrays.remove(this._addedChildIds,b.renderId)}if(this._updatedLayoutDataChildIds){Core.Arrays.remove(this._updatedLayoutDataChildIds,b.renderId)}if(!this._removedChildIds){this._removedChildIds=[]}this._removedChildIds.push(b.renderId);for(var a=0;a<b.children.length;++a){this._removeDescendant(b.children[a])}},_removeDescendant:function(b){this._manager._removedIdMap[b.renderId]=b;if(!this._removedDescendantIds){this._removedDescendantIds=[]}this._removedDescendantIds.push(b.renderId);for(var a=0;a<b.children.length;++a){this._removeDescendant(b.children[a])}},toString:function(){var a="ComponentUpdate\n";a+="- Parent: "+this.parent+"\n";
a+="- Adds: "+this._addedChildIds+"\n";a+="- Removes: "+this._removedChildIds+"\n";a+="- DescendantRemoves: "+this._removedDescendantIds+"\n";a+="- Properties: "+Core.Debug.toString(this._propertyUpdates)+"\n";a+="- LayoutDatas: "+this._updatedLayoutDataChildIds+"\n";return a},_updateLayoutData:function(a){this._manager._idMap[a.renderId]=a;if(this._updatedLayoutDataChildIds==null){this._updatedLayoutDataChildIds=[]}this._updatedLayoutDataChildIds.push(a.renderId)},_updateListener:function(a){if(this._listenerUpdates==null){this._listenerUpdates={}}this._listenerUpdates[a]=true},_updateProperty:function(a,b,d){if(this._propertyUpdates==null){this._propertyUpdates={}}var c=new Echo.Update.ComponentUpdate.PropertyUpdate(b,d);this._propertyUpdates[a]=c}});Echo.Update.Manager=Core.extend({_componentUpdateMap:null,fullRefreshRequired:false,application:null,_hasUpdates:false,_listenerList:null,_idMap:null,_removedIdMap:null,_lastAncestorTestParentId:null,$construct:function(a){this._componentUpdateMap={};
this.application=a;this._listenerList=new Core.ListenerList();this._idMap={};this._removedIdMap={}},addUpdateListener:function(a){this._listenerList.addListener("update",a)},_createComponentUpdate:function(a){this._hasUpdates=true;var b=this._componentUpdateMap[a.renderId];if(!b){b=new Echo.Update.ComponentUpdate(this,a);this._componentUpdateMap[a.renderId]=b}return b},dispose:function(){this.application=null},_fireUpdate:function(){if(!this._listenerList.isEmpty()){this._listenerList.fireEvent({type:"update",source:this})}},getUpdates:function(){var b=[];for(var a in this._componentUpdateMap){b.push(this._componentUpdateMap[a])}return b},hasUpdates:function(){return this._hasUpdates},_isAncestorBeingAdded:function(a){var f=a;var d=a.parent;var c=d?d.renderId:null;if(c&&this._lastAncestorTestParentId==c){return false}while(d){var e=this._componentUpdateMap[d.renderId];if(e&&e._addedChildIds){for(var b=0;b<e._addedChildIds.length;++b){if(e._addedChildIds[b]==f.renderId){return true}}}f=d;
d=d.parent}this._lastAncestorTestParentId=c;return false},_processComponentAdd:function(a,c){if(this.fullRefreshRequired){return}if(this._isAncestorBeingAdded(c)){return}var b=this._createComponentUpdate(a);b._addChild(c)},_processComponentLayoutDataUpdate:function(a){if(this.fullRefreshRequired){return}var b=a.parent;if(b==null||this._isAncestorBeingAdded(b)){return}var c=this._createComponentUpdate(b);c._updateLayoutData(a)},_processComponentListenerUpdate:function(a,b){if(this.fullRefreshRequired){return}if(this._isAncestorBeingAdded(a)){return}var c=this._createComponentUpdate(a);c._updateListener(b)},_processComponentRemove:function(d,g){if(this.fullRefreshRequired){return}if(this._isAncestorBeingAdded(d)){return}var f=this._createComponentUpdate(d);f._removeChild(g);var b=null;for(var a in this._componentUpdateMap){var e=this._componentUpdateMap[a];if(g.isAncestorOf(e.parent)){f._appendRemovedDescendants(e);if(b==null){b=[]}b.push(a)}}if(b!=null){for(var c=0;c<b.length;++c){delete this._componentUpdateMap[b[c]]
}}},_processComponentPropertyUpdate:function(c,a,b,d){if(this.fullRefreshRequired){return}if(this._isAncestorBeingAdded(c)){return}var e=this._createComponentUpdate(c);e._updateProperty(a,b,d)},_processFullRefresh:function(){for(var a=0;a<this.application.rootComponent.children.length;++a){this._processComponentRemove(this.application.rootComponent,this.application.rootComponent.children[a])}this.fullRefreshRequired=true;var b=this._createComponentUpdate(this.application.rootComponent);b.fullRefresh=true;this._fireUpdate()},_processComponentUpdate:function(c,a,b,d){if(a=="children"){if(d==null){this._processComponentRemove(c,b)}else{this._processComponentAdd(c,d)}}else{if(a=="layoutData"){this._processComponentLayoutDataUpdate(c)}else{if(a=="listeners"){this._processComponentListenerUpdate(c,b||d)}else{this._processComponentPropertyUpdate(c,a,b,d)}}}this._fireUpdate()},purge:function(){this.fullRefreshRequired=false;this._componentUpdateMap={};this._idMap={};this._removedIdMap={};this._hasUpdates=false;
this._lastAncestorTestParentId=null},removeUpdateListener:function(a){this._listenerList.removeListener("update",a)},toString:function(){var b="[ UpdateManager ]\n";if(this.fullRefreshRequired){b+="fullRefresh"}else{for(var a in this._componentUpdateMap){b+=this._componentUpdateMap[a]}}return b}});Echo.AbstractButton=Core.extend(Echo.Component,{$abstract:true,$load:function(){Echo.ComponentFactory.registerType("AbstractButton",this);Echo.ComponentFactory.registerType("AB",this)},componentType:"AbstractButton",focusable:true,$virtual:{doAction:function(){this.fireEvent({type:"action",source:this,actionCommand:this.get("actionCommand")})}}});Echo.Button=Core.extend(Echo.AbstractButton,{$load:function(){Echo.ComponentFactory.registerType("Button",this);Echo.ComponentFactory.registerType("B",this)},componentType:"Button"});Echo.ToggleButton=Core.extend(Echo.AbstractButton,{$load:function(){Echo.ComponentFactory.registerType("ToggleButton",this);Echo.ComponentFactory.registerType("TB",this)},$abstract:true,componentType:"ToggleButton"});
Echo.CheckBox=Core.extend(Echo.ToggleButton,{$load:function(){Echo.ComponentFactory.registerType("CheckBox",this);Echo.ComponentFactory.registerType("CB",this)},componentType:"CheckBox"});Echo.RadioButton=Core.extend(Echo.ToggleButton,{$load:function(){Echo.ComponentFactory.registerType("RadioButton",this);Echo.ComponentFactory.registerType("RB",this)},componentType:"RadioButton"});Echo.AbstractListComponent=Core.extend(Echo.Component,{$abstract:true,$load:function(){Echo.ComponentFactory.registerType("AbstractListComponent",this);Echo.ComponentFactory.registerType("LC",this)},componentType:"AbstractListComponent",focusable:true,$virtual:{doAction:function(){this.fireEvent({type:"action",source:this,actionCommand:this.get("actionCommand")})}}});Echo.ListBox=Core.extend(Echo.AbstractListComponent,{$static:{SINGLE_SELECTION:0,MULTIPLE_SELECTION:2},$load:function(){Echo.ComponentFactory.registerType("ListBox",this);Echo.ComponentFactory.registerType("LB",this)},componentType:"ListBox"});Echo.SelectField=Core.extend(Echo.AbstractListComponent,{$load:function(){Echo.ComponentFactory.registerType("SelectField",this);
Echo.ComponentFactory.registerType("SF",this)},componentType:"SelectField"});Echo.Column=Core.extend(Echo.Component,{$load:function(){Echo.ComponentFactory.registerType("Column",this);Echo.ComponentFactory.registerType("C",this)},componentType:"Column"});Echo.Composite=Core.extend(Echo.Component,{$abstract:true,$load:function(){Echo.ComponentFactory.registerType("Composite",this);Echo.ComponentFactory.registerType("CM",this)},componentType:"Composite"});Echo.Panel=Core.extend(Echo.Composite,{$load:function(){Echo.ComponentFactory.registerType("Panel",this);Echo.ComponentFactory.registerType("P",this)},componentType:"Panel"});Echo.ContentPane=Core.extend(Echo.Component,{$static:{OVERFLOW_AUTO:0,OVERFLOW_HIDDEN:1,OVERFLOW_SCROLL:2},$load:function(){Echo.ComponentFactory.registerType("ContentPane",this);Echo.ComponentFactory.registerType("CP",this)},componentType:"ContentPane",pane:true});Echo.Grid=Core.extend(Echo.Component,{$static:{ORIENTATION_HORIZONTAL:0,ORIENTATION_VERTICAL:1,SPAN_FILL:-1},$load:function(){Echo.ComponentFactory.registerType("Grid",this);
Echo.ComponentFactory.registerType("G",this)},componentType:"Grid"});Echo.Label=Core.extend(Echo.Component,{$load:function(){Echo.ComponentFactory.registerType("Label",this);Echo.ComponentFactory.registerType("L",this)},componentType:"Label"});Echo.Row=Core.extend(Echo.Component,{$load:function(){Echo.ComponentFactory.registerType("Row",this);Echo.ComponentFactory.registerType("R",this)},componentType:"Row"});Echo.SplitPane=Core.extend(Echo.Component,{$static:{ORIENTATION_HORIZONTAL_LEADING_TRAILING:0,ORIENTATION_HORIZONTAL_TRAILING_LEADING:1,ORIENTATION_HORIZONTAL_LEFT_RIGHT:2,ORIENTATION_HORIZONTAL_RIGHT_LEFT:3,ORIENTATION_VERTICAL_TOP_BOTTOM:4,ORIENTATION_VERTICAL_BOTTOM_TOP:5,DEFAULT_SEPARATOR_POSITION:"50%",DEFAULT_SEPARATOR_SIZE_FIXED:0,DEFAULT_SEPARATOR_SIZE_RESIZABLE:4,DEFAULT_SEPARATOR_COLOR:"#3f3f4f",OVERFLOW_AUTO:0,OVERFLOW_HIDDEN:1,OVERFLOW_SCROLL:2},$load:function(){Echo.ComponentFactory.registerType("SplitPane",this);Echo.ComponentFactory.registerType("SP",this)},componentType:"SplitPane",pane:true});
Echo.TextComponent=Core.extend(Echo.Component,{$abstract:true,$load:function(){Echo.ComponentFactory.registerType("TextComponent",this);Echo.ComponentFactory.registerType("TC",this)},$virtual:{doAction:function(){this.fireEvent({type:"action",source:this,actionCommand:this.get("actionCommand")})},doKeyDown:function(b){var a={type:"keyDown",source:this,keyCode:b};this.fireEvent(a);return !a.veto},doKeyPress:function(c,a){var b={type:"keyPress",source:this,keyCode:c,charCode:a};this.fireEvent(b);return !b.veto}},componentType:"TextComponent",focusable:true});Echo.TextArea=Core.extend(Echo.TextComponent,{$load:function(){Echo.ComponentFactory.registerType("TextArea",this);Echo.ComponentFactory.registerType("TA",this)},componentType:"TextArea"});Echo.TextField=Core.extend(Echo.TextComponent,{$load:function(){Echo.ComponentFactory.registerType("TextField",this);Echo.ComponentFactory.registerType("TF",this)},componentType:"TextField"});Echo.PasswordField=Core.extend(Echo.TextField,{$load:function(){Echo.ComponentFactory.registerType("PasswordField",this);
Echo.ComponentFactory.registerType("PF",this)},componentType:"PasswordField"});Echo.WindowPane=Core.extend(Echo.Component,{$load:function(){Echo.ComponentFactory.registerType("WindowPane",this);Echo.ComponentFactory.registerType("WP",this)},$static:{DEFAULT_BORDER:{color:"#36537a",borderInsets:20,contentInsets:3},DEFAULT_BACKGROUND:"#ffffff",DEFAULT_FOREGROUND:"#000000",DEFAULT_CONTROLS_INSETS:4,DEFAULT_CONTROLS_SPACING:4,DEFAULT_HEIGHT:"15em",DEFAULT_MINIMUM_WIDTH:100,DEFAULT_MINIMUM_HEIGHT:100,DEFAULT_TITLE_BACKGROUND:"#becafe",DEFAULT_TITLE_HEIGHT:30,DEFAULT_TITLE_INSETS:"5px 10px",DEFAULT_WIDTH:"30em"},componentType:"WindowPane",modalSupport:true,floatingPane:true,pane:true,focusable:true,_preMaximizedState:null,userClose:function(){this.fireEvent({type:"close",source:this})},userMaximize:function(){if(this.render("width")=="100%"&&this.render("height")=="100%"){if(this._preMaximizedState){this.set("width",this._preMaximizedState.width);this.set("height",this._preMaximizedState.height);
this.set("positionX",this._preMaximizedState.x);this.set("positionY",this._preMaximizedState.y)}}else{this._preMaximizedState={x:this.get("positionX"),y:this.get("positionY"),width:this.get("width"),height:this.get("height")};this.set("width","100%");this.set("height","100%")}this.fireEvent({type:"maximize",source:this})},userMinimize:function(){this.fireEvent({type:"minimize",source:this})}});Echo.Render={_loadedPeerCount:0,_nextPeerId:0,_peers:{},_disposedComponents:null,_componentDepthArraySort:function(d,c){return Echo.Render._getComponentDepth(d.parent)-Echo.Render._getComponentDepth(c.parent)},_doRenderDisplay:function(b,a){var d,c=b;var e=c.parent;while(e){if(e.peer.isChildVisible&&!e.peer.isChildVisible(c)){return}c=e;e=e.parent}if(a){Echo.Render._doRenderDisplayImpl(b)}else{if(b.peer.isChildVisible){for(d=0;d<b.children.length;++d){if(b.peer.isChildVisible(b.children[d])){Echo.Render._doRenderDisplayImpl(b.children[d])}}}else{for(d=0;d<b.children.length;++d){Echo.Render._doRenderDisplayImpl(b.children[d])
}}}},_doRenderDisplayImpl:function(a){if(!a.peer){return}if(a.peer.renderDisplay){a.peer.renderDisplay()}a.peer.displayed=true;var b;if(a.peer.isChildVisible){for(b=0;b<a.children.length;++b){if(a.peer.isChildVisible(a.children[b])){Echo.Render._doRenderDisplayImpl(a.children[b])}}}else{for(b=0;b<a.children.length;++b){Echo.Render._doRenderDisplayImpl(a.children[b])}}},_getComponentDepth:function(a){var b=-1;while(a!=null){a=a.parent;++b}return b},_loadPeer:function(a,b){if(b.peer){return}var c=Echo.Render._peers[b.componentType];if(!c){throw new Error("Peer not found for: "+b.componentType)}++this._loadedPeerCount;b.peer=new c();b.peer._peerId=this._nextPeerId++;b.peer.component=b;b.peer.client=a},notifyResize:function(a){Echo.Render._doRenderDisplay(a,false)},_processDispose:function(c){var a,b=c.getRemovedDescendants();if(b){for(a=0;a<b.length;++a){Echo.Render._renderComponentDisposeImpl(c,b[a])}}b=c.getRemovedChildren();if(b){for(a=0;a<b.length;++a){Echo.Render._renderComponentDisposeImpl(c,b[a])
}}},processUpdates:function(c){var g=c.application.updateManager;if(!g.hasUpdates()){return}Echo.Render._disposedComponents={};var l=g.getUpdates();l.sort(Echo.Render._componentDepthArraySort);var h,f,e;for(f=0;f<l.length;++f){l[f].renderContext={};h=l[f].parent.peer;if(h==null&&l[f].parent.componentType=="Root"){Echo.Render._loadPeer(c,l[f].parent)}}for(f=l.length-1;f>=0;--f){if(l[f]==null){continue}h=l[f].parent.peer;Echo.Render._processDispose(l[f])}if(Echo.Client.profilingTimer){Echo.Client.profilingTimer.mark("rem")}for(f=0;f<l.length;++f){if(l[f]==null){continue}h=l[f].parent.peer;var m=h.renderUpdate(l[f]);if(m){for(e=f+1;e<l.length;++e){if(l[e]!=null&&l[f].parent.isAncestorOf(l[e].parent)){l[e]=null}}}Echo.Render._setPeerDisposedState(l[f].parent,false)}if(Echo.Client.profilingTimer){Echo.Client.profilingTimer.mark("up")}var d=[];for(f=0;f<l.length;++f){if(l[f]==null){continue}var b=false;for(e=0;e<d.length;++e){if(d[e].isAncestorOf(l[f].parent)){b=true;break}}if(b){continue}if(l[f].renderContext.displayRequired){for(e=0;
e<l[f].renderContext.displayRequired.length;++e){d.push(l[f].renderContext.displayRequired[e]);Echo.Render._doRenderDisplay(l[f].renderContext.displayRequired[e],true)}}else{d.push(l[f].parent);Echo.Render._doRenderDisplay(l[f].parent,true)}}if(Echo.Client.profilingTimer){Echo.Client.profilingTimer.mark("disp")}for(var a in Echo.Render._disposedComponents){var k=Echo.Render._disposedComponents[a];Echo.Render._unloadPeer(k)}Echo.Render._disposedComponents=null;g.purge();Echo.Render.updateFocus(c)},registerPeer:function(a,b){if(this._peers[a]){throw new Error("Peer already registered: "+a)}this._peers[a]=b},renderComponentAdd:function(c,b,a){if(!b.parent||!b.parent.peer||!b.parent.peer.client){throw new Error("Cannot find reference to the Client with which this component should be associated: cannot load peer.  This is due to the component's parent's peer not being associated with a Client. Component = "+b+", Parent = "+b.parent+", Parent Peer = "+(b.parent?b.parent.peer:"N/A")+", Parent Peer Client = "+((b.parent&&b.parent.peer)?b.parent.peer.client:"N/A"))
}Echo.Render._loadPeer(b.parent.peer.client,b);Echo.Render._setPeerDisposedState(b,false);b.peer.renderAdd(c,a)},renderComponentDisplay:function(a){this._doRenderDisplay(a,true)},renderComponentDispose:function(b,a){this._renderComponentDisposeImpl(b,a)},_renderComponentDisposeImpl:function(c,a){if(!a.peer||a.peer.disposed){return}Echo.Render._setPeerDisposedState(a,true);a.peer.renderDispose(c);for(var b=0;b<a.children.length;++b){Echo.Render._renderComponentDisposeImpl(c,a.children[b])}},renderComponentHide:function(a){if(!a.peer||a.peer.disposed){return}if(a.peer.displayed){if(a.peer.renderHide){a.peer.renderHide()}a.peer.displayed=false;for(var b=0;b<a.children.length;++b){Echo.Render.renderComponentHide(a.children[b])}}},_setPeerDisposedState:function(a,b){if(b){a.peer.disposed=true;Echo.Render._disposedComponents[a.peer._peerId]=a}else{a.peer.disposed=false;delete Echo.Render._disposedComponents[a.peer._peerId]}},_unloadPeer:function(a){a.peer.client=null;a.peer.component=null;a.peer=null;
--this._loadedPeerCount},updateFocus:function(a){var b=a.application.getFocusedComponent();if(b&&b.peer){if(!b.peer.renderFocus){throw new Error("Cannot focus component: "+b+", peer does not provide renderFocus() implementation.")}b.peer.renderFocus()}}};Echo.Render.ComponentSync=Core.extend({$static:{FOCUS_PERMIT_ARROW_UP:1,FOCUS_PERMIT_ARROW_DOWN:2,FOCUS_PERMIT_ARROW_LEFT:4,FOCUS_PERMIT_ARROW_RIGHT:8,FOCUS_PERMIT_ARROW_ALL:15,SIZE_HEIGHT:1,SIZE_WIDTH:2},_peerId:null,client:null,component:null,displayed:false,disposed:false,$construct:function(){},$abstract:{renderAdd:function(b,a){},renderDispose:function(a){},renderUpdate:function(a){}},$virtual:{clientKeyDown:null,clientKeyPress:null,clientKeyUp:null,getFocusFlags:null,getPreferredSize:null,isChildVisible:null,renderFocus:null,renderHide:null,renderDisplay:null}});Echo.Render.RootSync=Core.extend(Echo.Render.ComponentSync,{$load:function(){Echo.Render.registerPeer("Root",this)},renderAdd:function(b,a){throw new Error("Unsupported operation: renderAdd().")
},_renderContent:function(b){Echo.Render.renderComponentDispose(b,b.parent);Core.Web.DOM.removeAllChildren(this.client.domainElement);for(var a=0;a<b.parent.children.length;++a){Echo.Render.renderComponentAdd(b,b.parent.children[a],this.client.domainElement)}},renderDispose:function(a){},renderUpdate:function(d){var b,a=false;if(d.fullRefresh||d.hasAddedChildren()||d.hasRemovedChildren()){Echo.Sync.renderComponentDefaults(this.component,this.client.domainElement);var c=this.component.render("title");if(c){document.title=c}this._renderContent(d);a=true}else{this.client.domainElement.dir=this.client.application.getLayoutDirection().isLeftToRight()?"ltr":"rtl";if(d.hasUpdatedProperties()){b=d.getUpdatedProperty("title");if(b){document.title=b.newValue}b=d.getUpdatedProperty("background");if(b){Echo.Sync.Color.renderClear(b.newValue,this.client.domainElement,"backgroundColor")}b=d.getUpdatedProperty("foreground");if(b){Echo.Sync.Color.renderClear(b.newValue,this.client.domainElement,"foreground")
}b=d.getUpdatedProperty("font");if(b){Echo.Sync.Font.renderClear(b.newValue,this.client.domainElement)}Echo.Sync.LayoutDirection.render(this.component.getLayoutDirection(),this.client.domainElement)}}return a}});Echo.Sync={getEffectProperty:function(b,g,f,c,a,e){var d;if(c){d=b.render(f,e)}if(!d){d=b.render(g,a)}return d},renderComponentDefaults:function(c,d){var b;if((b=c.render("foreground"))){d.style.color=b}if((b=c.render("background"))){d.style.backgroundColor=b}var a=c.render("font");if(a){Echo.Sync.Font.render(a,d)}if(c.getLayoutDirection()){d.dir=c.getLayoutDirection().isLeftToRight()?"ltr":"rtl"}}};Echo.Sync.Alignment={_HORIZONTALS:{left:true,center:true,right:true,leading:true,trailing:true},_VERTICALS:{top:true,middle:true,bottom:true},getRenderedHorizontal:function(d,b){if(d==null){return null}var c=b?b.getRenderLayoutDirection():Echo.LayoutDirection.LTR;var a=typeof(d)=="object"?d.horizontal:d;switch(a){case"leading":return c.isLeftToRight()?"left":"right";case"trailing":return c.isLeftToRight()?"right":"left";
default:return a in this._HORIZONTALS?a:null}},getHorizontal:function(a){if(a==null){return null}if(typeof(a=="string")){return a in this._HORIZONTALS?a:null}else{return a.horizontal}},getVertical:function(a){if(a==null){return null}if(typeof(a=="string")){return a in this._VERTICALS?a:null}else{return a.vertical}},render:function(h,e,d,g){if(h==null){return}var b=Echo.Sync.Alignment.getRenderedHorizontal(h,g);var c=typeof(h)=="object"?h.vertical:h;var a;switch(b){case"left":a="left";break;case"center":a="center";break;case"right":a="right";break;default:a="";break}var f;switch(c){case"top":f="top";break;case"middle":f="middle";break;case"bottom":f="bottom";break;default:f="";break}if(d){e.align=a;e.vAlign=f}else{e.style.textAlign=a;e.style.verticalAlign=f}}};Echo.Sync.Border={_PARSER_PX:new RegExp("^(-?\\d+px)?(?:^|$|(?= )) ?(none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset)?(?:^|$|(?= )) ?(#[0-9a-fA-F]{6})?$"),_PARSER:new RegExp("^(-?\\d+(?:px|pt|pc|cm|mm|in|em|ex))?(?:^|$|(?= )) ?(none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset)?(?:^|$|(?= )) ?(#[0-9a-fA-F]{6})?$"),_TEST_EXTENT_PX:/^-?\d+px$/,compose:function(c,d,a){if(typeof c=="number"){c+="px"
}var b=[];if(c){b.push(c)}if(d){b.push(d)}if(a){b.push(a)}return b.join(" ")},isMultisided:function(a){return(a&&(a.top||a.bottom||a.left||a.right))?true:false},parse:function(a){if(!a){return{}}if(typeof(a)=="string"){var b=this._PARSER.exec(a);return{size:b[1],style:b[2],color:b[3]}}else{return Echo.Sync.Border.parse(a.top||a.right||a.bottom||a.left)}},render:function(a,b,d){if(!a){return}d=d?d:"border";if(typeof(a)=="string"){if(this._PARSER_PX.test(a)){b.style[d]=a}else{var c=this._PARSER.exec(a);if(c==null){throw new Error('Invalid border: "'+a+'"')}this.render(Echo.Sync.Extent.toPixels(c[1])+"px "+c[2]+" "+c[3],b,d)}}else{this.render(a.top,b,d+"Top");if(a.right!==null){this.render(a.right||a.top,b,d+"Right")}if(a.bottom!==null){this.render(a.bottom||a.top,b,d+"Bottom")}if(a.left!==null){this.render(a.left||a.right||a.top,b,d+"Left")}}},renderClear:function(a,b){if(a){if(a instanceof Object){b.style.border=""}this.render(a,b)}else{b.style.border=""}},getPixelSize:function(b,a){if(!b){return 0
}if(typeof(b)=="string"){var d=this._PARSER.exec(b)[1];if(d==null){return 0}else{if(this._TEST_EXTENT_PX.test(d)){return parseInt(d,10)}else{return Echo.Sync.Extent.toPixels(d)}}}else{if(typeof(b)=="object"){while(true){var c=this.getPixelSize(b[a]);if(c==null){switch(a){case"left":a="right";continue;case"right":case"bottom":a="top";continue}}return c}}}}};Echo.Sync.Color={adjust:function(h,e,d,c){var j=parseInt(h.substring(1),16);var i=Math.floor(j/65536)+e;var f=Math.floor(j/256)%256+d;var a=j%256+c;return this.toHex(i,f,a)},blend:function(c,b,d){d=d<0?0:(d>1?1:d);var g=parseInt(c.substring(1),16);var e=parseInt(b.substring(1),16);var h=Math.round(Math.floor(g/65536)*(1-d)+Math.floor(e/65536)*d);var f=Math.round(Math.floor(g/256)%256*(1-d)+Math.floor(e/256)%256*d);var a=Math.round((g%256)*(1-d)+(e%256)*d);return this.toHex(h,f,a)},render:function(a,b,c){if(a){b.style[c]=a}},renderClear:function(a,b,c){b.style[c]=a?a:""},renderFB:function(b,c){var a;if((a=b.render("foreground"))){c.style.color=a
}if((a=b.render("background"))){c.style.backgroundColor=a}},toHex:function(c,b,a){if(c<0){c=0}else{if(c>255){c=255}}if(b<0){b=0}else{if(b>255){b=255}}if(a<0){a=0}else{if(a>255){a=255}}return"#"+(c<16?"0":"")+c.toString(16)+(b<16?"0":"")+b.toString(16)+(a<16?"0":"")+a.toString(16)}};Echo.Sync.Extent={_PARSER:/^(-?\d+(?:\.\d+)?)(.+)?$/,_FORMATTED_INT_PIXEL_TEST:/^(-?\d+px *)$/,_FORMATTED_DECIMAL_PIXEL_TEST:/^(-?\d+(.\d+)?px *)$/,isPercent:function(a){if(a==null||typeof(a)=="number"){return false}else{var b=this._PARSER.exec(a);if(!b){return false}return b[2]=="%"}},render:function(e,c,f,b,d){var a=Echo.Sync.Extent.toCssValue(e,b,d);if(a!==""){c.style[f]=a}},toCssValue:function(c,a,b){switch(typeof(c)){case"number":return Math.round(c)+"px";case"string":if(this._FORMATTED_INT_PIXEL_TEST.test(c)){return c}else{if(this._FORMATTED_DECIMAL_PIXEL_TEST.test(c)){return Math.round(parseFloat(c))+"px"}else{if(this.isPercent(c)){return b?c:""}else{var d=this.toPixels(c,a);return d==null?"":this.toPixels(c,a)+"px"
}}}break}return""},toPixels:function(b,a){if(b==null){return 0}else{if(typeof(b)=="number"){return Math.round(b)}else{return Math.round(Core.Web.Measure.extentToPixels(b,a))}}}};Echo.Sync.FillImage={_REPEAT_VALUES:{"0":"no-repeat",x:"repeat-x",y:"repeat-y",xy:"repeat","no-repeat":"no-repeat","repeat-x":"repeat-x","repeat-y":"repeat-y",repeat:"repeat"},FLAG_ENABLE_IE_PNG_ALPHA_FILTER:1,getPosition:function(b){if(b.x||b.y){var a,c;if(Echo.Sync.Extent.isPercent(b.x)){a=b.x}else{a=Echo.Sync.Extent.toPixels(b.x,true)+"px"}if(Echo.Sync.Extent.isPercent(b.y)){c=b.y}else{c=Echo.Sync.Extent.toPixels(b.y,false)+"px"}return a+" "+c}else{return null}},getRepeat:function(a){if(this._REPEAT_VALUES[a.repeat]){return this._REPEAT_VALUES[a.repeat]}else{return null}},getUrl:function(a){if(a==null){return null}return typeof(a)=="object"?a.url:a},render:function(f,e,c){if(f==null){return}var b=typeof(f)=="object";var d=b?f.url:f;if(Core.Web.Env.QUIRK_IE_SECURE_ITEMS&&document.location.protocol=="https:"){if(d.substring(0,5)!="http:"&&d.substring(0,6)!="https:"){d=document.location.protocol+"//"+document.location.hostname+(document.location.port?(":"+document.location.port):"")+d
}}if(Core.Web.Env.PROPRIETARY_IE_PNG_ALPHA_FILTER_REQUIRED&&c&&(c&this.FLAG_ENABLE_IE_PNG_ALPHA_FILTER)){e.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+d+"', sizingMethod='scale')"}else{e.style.backgroundImage="url("+d+")"}if(b){var a=Echo.Sync.FillImage.getPosition(f);e.style.backgroundPosition=a?a:"";e.style.backgroundRepeat=this._REPEAT_VALUES[f.repeat]?this._REPEAT_VALUES[f.repeat]:""}},renderClear:function(c,b,a){if(c){this.render(c,b,a)}else{if(Core.Web.Env.PROPRIETARY_IE_PNG_ALPHA_FILTER_REQUIRED){b.style.filter=""}b.style.backgroundImage="";b.style.backgroundPosition="";b.style.backgroundRepeat=""}}};Echo.Sync.FillImageBorder={_NAMES:["top","topRight","right","bottomRight","bottom","bottomLeft","left","topLeft"],_MAP:[[0,0,0,0,0,0,0,0],[1,0,0,0,0,0,0,0],[0,0,1,0,0,0,0,0],[1,1,1,0,0,0,0,0],[0,0,0,0,1,0,0,0],[1,0,0,0,1,0,0,0],[0,0,1,1,1,0,0,0],[1,1,1,1,1,0,0,0],[0,0,0,0,0,0,1,0],[1,0,0,0,0,0,1,1],[0,0,1,0,0,0,1,0],[1,1,1,0,0,0,1,1],[0,0,0,0,1,1,1,0],[1,0,0,0,1,1,1,1],[0,0,1,1,1,1,1,0],[1,1,1,1,1,1,1,1]],_PROTOTYPES:[],_createSegment:function(b,a){var c=document.createElement("div");
c.style.cssText="font-size:1px;line-height:0;position:absolute;"+a;b.appendChild(c)},_createPrototype:function(a){var b=document.createElement("div");if(Core.Web.Env.QUIRK_IE_HAS_LAYOUT){b.style.zoom=1}if(a&1){this._createSegment(b,"top:0;");if(a&2){this._createSegment(b,"top:0;right:0;")}}if(a&2){this._createSegment(b,"right:0;");if(a&4){this._createSegment(b,"bottom:0;right:0;")}}if(a&4){this._createSegment(b,"bottom:0;");if(a&8){this._createSegment(b,"bottom:0;left:0;")}}if(a&8){this._createSegment(b,"left:0;");if(a&1){this._createSegment(b,"top:0;left:0;")}}return b},getBorder:function(c){var a=[];var b=c.firstChild;while(b){if(b.__FIB_segment!=null){a[b.__FIB_segment]=b}b=b.nextSibling}return a},getContainerContent:function(b){if(!b.__FIB_hasContent){return null}var a=b.firstChild;while(a){if(a.__FIB_content){return a}a=a.nextSibling}return null},renderContainer:function(a,e){a=a||{};e=e||{};var j=Echo.Sync.Insets.toPixels(a.borderInsets);var p=(j.left&&8)|(j.bottom&&4)|(j.right&&2)|(j.top&&1);
var c=this._MAP[p];var h=this._PROTOTYPES[p]?this._PROTOTYPES[p]:this._PROTOTYPES[p]=this._createPrototype(p);var b,d,l,o,k,n=null,g=[],m=null,r,f;if(e.update){b=e.update;d=b.firstChild;while(d){r=d;d=d.nextSibling;if(r.__FIB_segment!=null){m=d;b.removeChild(r)}if(r.__FIB_content){n=r}}d=h.firstChild;while(d){l=d.cloneNode(true);if(!o){o=l}if(m){b.insertBefore(l,m)}else{b.appendChild(l)}d=d.nextSibling}}else{b=h.cloneNode(true);o=b.firstChild;if(e.content||e.child){n=document.createElement("div");n.__FIB_content=true;if(e.child){n.appendChild(e.child)}b.__FIB_hasContent=true;b.appendChild(n)}if(e.absolute){b.__FIB_absolute=true;b.style.position="absolute"}else{b.style.position="relative";if(n){n.style.position="relative";if(Core.Web.Env.QUIRK_IE_HAS_LAYOUT){n.style.zoom=1}}}}b.__key=p;d=o;for(k=0;k<8;++k){if(!c[k]){continue}d.__FIB_segment=k;g[k]=d;if(a.color){d.style.backgroundColor=a.color}if(k===0||k===1||k===7){d.style.height=j.top+"px"}else{if(k>=3&&k<=5){d.style.height=j.bottom+"px"
}}if(k>=1&&k<=3){d.style.width=j.right+"px"}else{if(k>=5){d.style.width=j.left+"px"}}Echo.Sync.FillImage.render(a[this._NAMES[k]],d,Echo.Sync.FillImage.FLAG_ENABLE_IE_PNG_ALPHA_FILTER);d=d.nextSibling}if(j.top){g[0].style.left=j.left+"px";g[0].style.right=j.right+"px"}if(j.right){g[2].style.top=j.top+"px";g[2].style.bottom=j.bottom+"px"}if(j.bottom){g[4].style.left=j.left+"px";g[4].style.right=j.right+"px"}if(j.left){g[6].style.top=j.top+"px";g[6].style.bottom=j.bottom+"px"}if(b.__FIB_absolute){if(n){var q=Echo.Sync.Insets.toPixels(a.contentInsets);n.style.position="absolute";n.style.overflow="auto";n.style.top=q.top+"px";n.style.right=q.right+"px";n.style.bottom=q.bottom+"px";n.style.left=q.left+"px"}}else{if(n){Echo.Sync.Insets.render(a.contentInsets,n,"padding")}if(!e.update){b.style.position="relative";if(n){n.style.position="relative"}}}return b},renderContainerDisplay:function(d){var c;if(Core.Web.VirtualPosition.enabled){if(d.__FIB_absolute){Core.Web.VirtualPosition.redraw(d);if((c=this.getContainerContent(d))){Core.Web.VirtualPosition.redraw(c)
}}var a=this.getBorder(d);for(var b=0;b<8;b+=2){if(a[b]){Core.Web.VirtualPosition.redraw(a[b])}}}}};Echo.Sync.Font={render:function(a,b){if(!a){return}if(a.typeface){if(a.typeface instanceof Array){b.style.fontFamily=a.typeface.join(",")}else{b.style.fontFamily=a.typeface}}if(a.size){b.style.fontSize=Echo.Sync.Extent.toCssValue(a.size)}if(a.bold){b.style.fontWeight="bold"}if(a.italic){b.style.fontStyle="italic"}if(a.underline){b.style.textDecoration="underline"}else{if(a.overline){b.style.textDecoration="overline"}else{if(a.lineThrough){b.style.textDecoration="line-through"}}}},renderClear:function(a,b){if(a){this.render(a,b);if(!a.typeface){b.style.fontFamily=""}if(!a.underline){b.style.textDecoration=""}if(!a.bold){b.style.fontWeight=""}if(!a.size){b.style.fontSize=""}if(!a.italic){b.style.fontStyle=""}}else{b.style.fontFamily="";b.style.fontSize="";b.style.fontWeight="";b.style.fontStyle="";b.style.textDecoration=""}}};Echo.Sync.ImageReference={getUrl:function(a){return a?(typeof(a)=="string"?a:a.url):null
},renderImg:function(a,b){if(!a){return}if(typeof(a)=="string"){b.src=a}else{b.src=a.url;if(a.width){b.style.width=Echo.Sync.Extent.toCssValue(a.width,true)}if(a.height){b.style.height=Echo.Sync.Extent.toCssValue(a.height,false)}}}};Echo.Sync.Insets={_FORMATTED_PIXEL_INSETS:/^(-?\d+px *){1,4}$/,_ZERO:{top:0,right:0,bottom:0,left:0},_INDEX_MAPS:{1:[0,0,0,0],2:[0,1,0,1],3:[0,1,2,1],4:[0,1,2,3]},render:function(a,b,d){switch(typeof(a)){case"number":b.style[d]=Math.round(a)+"px";break;case"string":if(this._FORMATTED_PIXEL_INSETS.test(a)){b.style[d]=a}else{var c=this.toPixels(a);b.style[d]=c.top+"px "+c.right+"px "+c.bottom+"px "+c.left+"px"}break}},renderPosition:function(a,b){var c=this.toPixels(a);b.style.top=c.top+"px";b.style.right=c.right+"px";b.style.bottom=c.bottom+"px";b.style.left=c.left+"px"},toCssValue:function(a){switch(typeof(a)){case"number":return a+"px";case"string":if(this._FORMATTED_PIXEL_INSETS.test(a)){return a}else{var b=this.toPixels(a);return b.top+"px "+b.right+"px "+b.bottom+"px "+b.left+"px"
}break}return""},toPixels:function(a){if(a==null){return this._ZERO}else{if(typeof(a)=="number"){a=Math.round(a);return{top:a,right:a,bottom:a,left:a}}}a=a.split(" ");var b=this._INDEX_MAPS[a.length];return{top:Echo.Sync.Extent.toPixels(a[b[0]],false),right:Echo.Sync.Extent.toPixels(a[b[1]],true),bottom:Echo.Sync.Extent.toPixels(a[b[2]],false),left:Echo.Sync.Extent.toPixels(a[b[3]],true)}}};Echo.Sync.LayoutDirection={render:function(b,a){if(b){a.dir=b.isLeftToRight()?"ltr":"rtl"}}};Echo.Sync.TriCellTable=Core.extend({$static:{INVERTED:1,VERTICAL:2,LEADING_TRAILING:0,TRAILING_LEADING:1,TOP_BOTTOM:2,BOTTOM_TOP:3,_createTablePrototype:function(){var b=document.createElement("table");b.style.borderCollapse="collapse";b.style.padding="0";var a=document.createElement("tbody");b.appendChild(a);return b},getInvertedOrientation:function(c,b,a){return this.getOrientation(c,b,a)^this.INVERTED},getOrientation:function(e,d,b){var a=e.render(d,b);var c;if(a){switch(Echo.Sync.Alignment.getRenderedHorizontal(a,e)){case"left":return this.LEADING_TRAILING;
case"right":return this.TRAILING_LEADING}switch(Echo.Sync.Alignment.getVertical(a,e)){case"top":return this.TOP_BOTTOM;case"bottom":return this.BOTTOM_TOP}}return e.getRenderLayoutDirection().isLeftToRight()?this.TRAILING_LEADING:this.LEADING_TRAILING}},$load:function(){this._tablePrototype=this._createTablePrototype()},tableElement:null,tbodyElement:null,$construct:function(c,b,a,d){this.tableElement=Echo.Sync.TriCellTable._tablePrototype.cloneNode(true);this.tbodyElement=this.tableElement.firstChild;if(a==null){this._configure2(c,b)}else{this._configure3(c,b,a,d)}},_addColumn:function(a,b){if(b!=null){a.appendChild(b)}},_addRow:function(b){if(b==null){return}var a=document.createElement("tr");a.appendChild(b);this.tbodyElement.appendChild(a)},_addSpacer:function(b,d,c){var a=document.createElement("div");if(c){a.style.cssText="width:1px;height:"+d+"px;font-size:1px;line-height:0;"}else{a.style.cssText="width:"+d+"px;height:1px;font-size:1px;line-height:0;"}b.appendChild(a)},_configure2:function(c,a){this.tdElements=[document.createElement("td"),document.createElement("td")];
this.tdElements[0].style.padding="0";this.tdElements[1].style.padding="0";this.marginTdElements=[];if(a){this.marginTdElements[0]=document.createElement("td");this.marginTdElements[0].style.padding="0";if((c&Echo.Sync.TriCellTable.VERTICAL)===0){this.marginTdElements[0].style.width=a+"px";this._addSpacer(this.marginTdElements[0],a,false)}else{this.marginTdElements[0].style.height=a+"px";this._addSpacer(this.marginTdElements[0],a,true)}}if(c&Echo.Sync.TriCellTable.VERTICAL){if(c&Echo.Sync.TriCellTable.INVERTED){this._addRow(this.tdElements[1]);this._addRow(this.marginTdElements[0]);this._addRow(this.tdElements[0])}else{this._addRow(this.tdElements[0]);this._addRow(this.marginTdElements[0]);this._addRow(this.tdElements[1])}}else{var b=document.createElement("tr");if(c&Echo.Sync.TriCellTable.INVERTED){this._addColumn(b,this.tdElements[1]);this._addColumn(b,this.marginTdElements[0]);this._addColumn(b,this.tdElements[0])}else{this._addColumn(b,this.tdElements[0]);this._addColumn(b,this.marginTdElements[0]);
this._addColumn(b,this.tdElements[1])}this.tbodyElement.appendChild(b)}},_configure3:function(g,d,c,h){this.tdElements=[];for(var b=0;b<3;++b){this.tdElements[b]=document.createElement("td");this.tdElements[b].style.padding="0"}this.marginTdElements=[];if(d||h!=null){if(d&&d>0){this.marginTdElements[0]=document.createElement("td");if(g&Echo.Sync.TriCellTable.VERTICAL){this.marginTdElements[0].style.height=d+"px";this._addSpacer(this.marginTdElements[0],d,true)}else{this.marginTdElements[0].style.width=d+"px";this._addSpacer(this.marginTdElements[0],d,false)}}if(h!=null&&h>0){this.marginTdElements[1]=document.createElement("td");if(g&Echo.Sync.TriCellTable.VERTICAL){this.marginTdElements[1].style.height=h+"px";this._addSpacer(this.marginTdElements[1],h,true)}else{this.marginTdElements[1].style.width=h+"px";this._addSpacer(this.marginTdElements[1],h,false)}}}if(g&Echo.Sync.TriCellTable.VERTICAL){if(c&Echo.Sync.TriCellTable.VERTICAL){if(c&Echo.Sync.TriCellTable.INVERTED){this._addRow(this.tdElements[2]);
this._addRow(this.marginTdElements[1])}if(g&Echo.Sync.TriCellTable.INVERTED){this._addRow(this.tdElements[1]);this._addRow(this.marginTdElements[0]);this._addRow(this.tdElements[0])}else{this._addRow(this.tdElements[0]);this._addRow(this.marginTdElements[0]);this._addRow(this.tdElements[1])}if(!(c&Echo.Sync.TriCellTable.INVERTED)){this._addRow(this.marginTdElements[1]);this._addRow(this.tdElements[2])}}else{var f=(d&&d>0)?3:2;this.tdElements[2].rowSpan=f;if(this.marginTdElements[1]){this.marginTdElements[1].rowSpan=f}var e=document.createElement("tr");if(c&Echo.Sync.TriCellTable.INVERTED){this._addColumn(e,this.tdElements[2]);this._addColumn(e,this.marginTdElements[1]);if(g&Echo.Sync.TriCellTable.INVERTED){this._addColumn(e,this.tdElements[1])}else{this._addColumn(e,this.tdElements[0])}}else{if(g&Echo.Sync.TriCellTable.INVERTED){this._addColumn(e,this.tdElements[1])}else{this._addColumn(e,this.tdElements[0])}this._addColumn(e,this.marginTdElements[1]);this._addColumn(e,this.tdElements[2])
}this.tbodyElement.appendChild(e);this._addRow(this.marginTdElements[0]);if(g&Echo.Sync.TriCellTable.INVERTED){this._addRow(this.tdElements[0])}else{this._addRow(this.tdElements[1])}}}else{if(c&Echo.Sync.TriCellTable.VERTICAL){var a=d?3:2;this.tdElements[2].setAttribute("colspan",a);if(this.marginTdElements[1]!=null){this.marginTdElements[1].setAttribute("colspan",a)}if(c&Echo.Sync.TriCellTable.INVERTED){this._addRow(this.tdElements[2]);this._addRow(this.marginTdElements[1])}e=document.createElement("tr");if((g&Echo.Sync.TriCellTable.INVERTED)===0){this._addColumn(e,this.tdElements[0]);this._addColumn(e,this.marginTdElements[0]);this._addColumn(e,this.tdElements[1])}else{this._addColumn(e,this.tdElements[1]);this._addColumn(e,this.marginTdElements[0]);this._addColumn(e,this.tdElements[0])}this.tbodyElement.appendChild(e);if(!(c&Echo.Sync.TriCellTable.INVERTED)){this._addRow(this.marginTdElements[1]);this._addRow(this.tdElements[2])}}else{e=document.createElement("tr");if(c&Echo.Sync.TriCellTable.INVERTED){this._addColumn(e,this.tdElements[2]);
this._addColumn(e,this.marginTdElements[1])}if(g&Echo.Sync.TriCellTable.INVERTED){this._addColumn(e,this.tdElements[1]);this._addColumn(e,this.marginTdElements[0]);this._addColumn(e,this.tdElements[0])}else{this._addColumn(e,this.tdElements[0]);this._addColumn(e,this.marginTdElements[0]);this._addColumn(e,this.tdElements[1])}if(!(c&Echo.Sync.TriCellTable.INVERTED)){this._addColumn(e,this.marginTdElements[1]);this._addColumn(e,this.tdElements[2])}this.tbodyElement.appendChild(e)}}}});Echo.Serial={_translatorMap:{},_translatorTypeData:[],addPropertyTranslator:function(b,a){this._translatorMap[b]=a},addPropertyTranslatorByType:function(b,a){this._translatorTypeData.push(b,a)},getPropertyTranslator:function(a){return this._translatorMap[a]},getPropertyTranslatorByType:function(b){for(var a=0;a<this._translatorTypeData.length;a+=2){if(this._translatorTypeData[a]==b){return this._translatorTypeData[a+1]}}return null},loadComponent:function(d,c,g,h){if(!c.nodeName=="c"){throw new Error("Element is not a component.")
}var i=c.getAttribute("t");var b=c.getAttribute("i");var j=Echo.ComponentFactory.newInstance(i,b);var f=j.getLocalStyleData();var e=c.firstChild;while(e){if(e.nodeType==1){switch(e.nodeName){case"c":var a=this.loadComponent(d,e,g,h);j.add(a);break;case"p":this.loadProperty(d,e,j,f,g);break;case"s":j.setStyleName(e.firstChild?e.firstChild.nodeValue:null);break;case"sr":j.setStyle(h?h[e.firstChild.nodeValue]:null);break;case"e":this._loadComponentEvent(d,e,j);break;case"en":j.setEnabled(e.firstChild.nodeValue=="true");break;case"locale":j.setLocale(e.firstChild?e.firstChild.nodeValue:null);break;case"dir":j.setLayoutDirection(e.firstChild?(e.firstChild.nodeValue=="rtl"?Echo.LayoutDirection.RTL:Echo.LayoutDirection.LTR):null);break;case"f":if(e.getAttribute("n")){j.focusNextId=e.getAttribute("n")}if(e.getAttribute("p")){j.focusPreviousId=e.getAttribute("p")}}}e=e.nextSibling}return j},_loadComponentEvent:function(a,c,b){if(a.addComponentListener){var d=c.getAttribute("t");a.addComponentListener(b,d)
}},loadProperty:function(d,k,e,h,i){var a=k.getAttribute("n");var j=k.getAttribute("t");var g=k.getAttribute("x");var l;if(j){var f=Echo.Serial._translatorMap[j];if(!f){throw new Error("Translator not available for property type: "+j)}l=f.toProperty(d,k)}else{if(i){var c=k.getAttribute("r");if(c){l=i[c]}else{l=Echo.Serial.String.toProperty(d,k)}}else{l=Echo.Serial.String.toProperty(d,k)}}if(a){if(h){if(g==null){h[a]=l}else{var m=h[a];if(!m){m=[];h[a]=m}m[g]=l}}else{if(g==null){e.set(a,l)}else{e.setIndex(a,g,l)}}}else{var b=k.getAttribute("m");if(g==null){e[b](l)}else{e[b](g,l)}}},loadStyleSheet:function(c,b,a){var g=new Echo.StyleSheet();var f=b.firstChild;while(f){if(f.nodeType==1){if(f.nodeName=="s"){var e={};var d=f.firstChild;while(d){if(d.nodeType==1){if(d.nodeName=="p"){this.loadProperty(c,d,null,e,a)}}d=d.nextSibling}g.setStyle(f.getAttribute("n")||"",f.getAttribute("t"),e)}}f=f.nextSibling}return g},storeProperty:function(a,b,d){if(d==null){}else{if(typeof(d)=="object"){var c=null;
if(d.className){c=this._translatorMap[d.className]}else{c=this.getPropertyTranslatorByType(d.constructor)}if(!c||!c.toXml){return}c.toXml(a,b,d)}else{b.appendChild(b.ownerDocument.createTextNode(d.toString()))}}}};Echo.Serial.PropertyTranslator=Core.extend({$abstract:true,$static:{toProperty:function(a,b){return null},toXml:null}});Echo.Serial.Null=Core.extend(Echo.Serial.PropertyTranslator,{$static:{toProperty:function(a,b){return null}},$load:function(){Echo.Serial.addPropertyTranslator("0",this)}});Echo.Serial.Boolean=Core.extend(Echo.Serial.PropertyTranslator,{$static:{toProperty:function(a,b){return b.firstChild.data=="true"}},$load:function(){Echo.Serial.addPropertyTranslator("b",this)}});Echo.Serial.Integer=Core.extend(Echo.Serial.PropertyTranslator,{$static:{toProperty:function(a,b){return parseInt(b.firstChild.data,10)}},$load:function(){Echo.Serial.addPropertyTranslator("i",this)}});Echo.Serial.Number=Core.extend(Echo.Serial.PropertyTranslator,{$static:{toProperty:function(a,b){return parseFloat(b.firstChild.data)
}},$load:function(){Echo.Serial.addPropertyTranslator("n",this)}});Echo.Serial.String=Core.extend(Echo.Serial.PropertyTranslator,{$static:{toProperty:function(a,b){var d=b.firstChild;if(!d){return""}var c=d.data;while(d.nextSibling){d=d.nextSibling;c+=d.data}return c}},$load:function(){Echo.Serial.addPropertyTranslator("s",this)}});Echo.Serial.Date=Core.extend(Echo.Serial.PropertyTranslator,{$static:{_expr:/(\d{4})\.(\d{2}).(\d{2})/,toProperty:function(b,c){var d=Echo.Serial.String.toProperty(b,c);var a=this._expr.exec(d);if(!a){return null}return new Date(a[1],parseInt(a[2],10)-1,a[3])},toXml:function(a,b,c){b.appendChild(b.ownerDocument.createTextNode(c.getFullYear()+"."+(c.getMonth()+1)+"."+c.getDate()))}},$load:function(){Echo.Serial.addPropertyTranslator("d",this);Echo.Serial.addPropertyTranslatorByType(Date,this)}});Echo.Serial.Map=Core.extend(Echo.Serial.PropertyTranslator,{$static:{toProperty:function(a,b){var d={};var c=b.firstChild;while(c){if(c.nodeType!=1){continue}Echo.Serial.loadProperty(a,c,null,d,null);
c=c.nextSibling}return d}},$load:function(){Echo.Serial.addPropertyTranslator("m",this)}});Echo.Serial.Alignment=Core.extend(Echo.Serial.PropertyTranslator,{$static:{_HORIZONTAL_MAP:{leading:"leading",trailing:"trailing",left:"left",center:"center",right:"right"},_VERTICAL_MAP:{top:"top",center:"middle",bottom:"bottom"},toProperty:function(a,c){var d=Core.Web.DOM.getChildElementByTagName(c,"a");var e=this._HORIZONTAL_MAP[d.getAttribute("h")];var b=this._VERTICAL_MAP[d.getAttribute("v")];if(e){if(b){return{horizontal:e,vertical:b}}return e}if(b){return b}return null}},$load:function(){Echo.Serial.addPropertyTranslator("Alignment",this);Echo.Serial.addPropertyTranslator("AL",this)}});Echo.Serial.Border=Core.extend(Echo.Serial.PropertyTranslator,{$static:{toProperty:function(a,b){if(b.firstChild.nodeType==3){return b.firstChild.data}else{if(b.getAttribute("v")){return b.getAttribute("v")}else{var d=Core.Web.DOM.getChildElementByTagName(b,"b");var c={};var e=d.getAttribute("t");if(e){c.top=e;
e=d.getAttribute("r");if(e){c.right=e;e=d.getAttribute("b");if(e){c.bottom=e;e=d.getAttribute("l");if(e){c.left=e}}}}else{throw new Error("Invalid multi-sided border: no sides set.")}return c}}}},$load:function(){Echo.Serial.addPropertyTranslator("Border",this);Echo.Serial.addPropertyTranslator("BO",this)}});Echo.Serial.FillImage=Core.extend(Echo.Serial.PropertyTranslator,{$static:{parseElement:function(b,c){var d=c.getAttribute("u");if(b.decompressUrl){d=b.decompressUrl(d)}var e=c.getAttribute("r");var a=c.getAttribute("x");var f=c.getAttribute("y");if(e||a||f){return{url:d,repeat:e,x:a,y:f}}else{return d}},toProperty:function(a,b){var c=Core.Web.DOM.getChildElementByTagName(b,"fi");return this.parseElement(a,c)}},$load:function(){Echo.Serial.addPropertyTranslator("FillImage",this);Echo.Serial.addPropertyTranslator("FI",this)}});Echo.Serial.FillImageBorder=Core.extend(Echo.Serial.PropertyTranslator,{$static:{_NAMES:["topLeft","top","topRight","left","right","bottomLeft","bottom","bottomRight"],_parseElement:function(a,e){var d={contentInsets:e.getAttribute("ci")?e.getAttribute("ci"):null,borderInsets:e.getAttribute("bi")?e.getAttribute("bi"):null,color:e.getAttribute("bc")};
var c=e.firstChild;var b=0;while(c){if(c.nodeType==1){if(c.nodeName=="fi"){d[this._NAMES[b]]=Echo.Serial.FillImage.parseElement(a,c);++b}else{if(c.nodeName=="null-fi"){++b}}}c=c.nextSibling}if(!(b===0||b==8)){throw new Error("Invalid FillImageBorder image count: "+b)}return d},toProperty:function(a,b){var c=Core.Web.DOM.getChildElementByTagName(b,"fib");return Echo.Serial.FillImageBorder._parseElement(a,c)}},$load:function(){Echo.Serial.addPropertyTranslator("FillImageBorder",this);Echo.Serial.addPropertyTranslator("FIB",this)}});Echo.Serial.Font=Core.extend(Echo.Serial.PropertyTranslator,{$static:{toProperty:function(b,d){var g=Core.Web.DOM.getChildElementByTagName(d,"f");var a=Core.Web.DOM.getChildElementsByTagName(g,"tf");var c={};if(a.length>1){c.typeface=[];for(var f=0;f<a.length;++f){c.typeface[f]=a[f].firstChild.data}}else{if(a.length==1){c.typeface=a[0].firstChild.data}}var e=g.getAttribute("sz");if(e){c.size=e}if(g.getAttribute("bo")){c.bold=true}if(g.getAttribute("it")){c.italic=true
}if(g.getAttribute("un")){c.underline=true}if(g.getAttribute("ov")){c.overline=true}if(g.getAttribute("lt")){c.lineThrough=true}return c}},$load:function(){Echo.Serial.addPropertyTranslator("Font",this);Echo.Serial.addPropertyTranslator("F",this)}});Echo.Serial.ImageReference=Core.extend(Echo.Serial.PropertyTranslator,{$static:{toProperty:function(b,c){var d;if(c.firstChild.nodeType==1){var f=c.firstChild;d=f.firstChild.data;if(b.decompressUrl){d=b.decompressUrl(d)}var e=f.getAttribute("w");e=e?e:null;var a=f.getAttribute("h");a=a?a:null;if(e||a){return{url:d,width:e,height:a}}else{return d}}else{d=c.firstChild.data;return b.decompressUrl?b.decompressUrl(d):d}}},$load:function(){Echo.Serial.addPropertyTranslator("ImageReference",this);Echo.Serial.addPropertyTranslator("I",this)}});Echo.Serial.LayoutData=Core.extend(Echo.Serial.PropertyTranslator,{$static:{toProperty:function(a,b){var d={};var c=b.firstChild;while(c){if(c.nodeType==1){if(c.nodeName=="p"){Echo.Serial.loadProperty(a,c,null,d)
}}c=c.nextSibling}return d}},$load:function(){Echo.Serial.addPropertyTranslator("LayoutData",this);Echo.Serial.addPropertyTranslator("L",this)}});Echo.Client=Core.extend({$static:{DEFAULT_CONFIGURATION:{"StopError.Message":"This application has been stopped due to an error.","WaitIndicator.Text":"Please wait...","Action.Continue":"Continue","Action.Restart":"Restart Application"},STYLE_CRITICAL:0,STYLE_MESSAGE:1,_activeClients:[],_globalWindowResizeListener:function(b){for(var a=0;a<Echo.Client._activeClients.length;++a){Echo.Client._activeClients[a]._windowResizeListener(b)}}},$load:function(){Core.Web.DOM.addEventListener(window,"resize",this._globalWindowResizeListener,false)},configuration:null,designMode:false,domainElement:null,application:null,_lastInputRestrictionId:0,_inputRestrictionCount:0,_inputRestrictionListeners:null,_inputRescriptionMap:null,_keyFocusedComponentId:null,_lastKeyCode:null,_processKeyRef:null,_waitIndicatorActive:false,_processApplicationFocusRef:null,parent:null,_waitIndicator:null,_preWaitIndicatorDelay:500,_waitIndicatorRunnable:null,$construct:function(){this.configuration={};
for(var a in Echo.Client.DEFAULT_CONFIGURATION){this.configuration[a]=Echo.Client.DEFAULT_CONFIGURATION[a]}this._inputRestrictionMap={};this._processKeyRef=Core.method(this,this._processKey);this._processApplicationFocusRef=Core.method(this,this._processApplicationFocus);this._waitIndicator=new Echo.Client.DefaultWaitIndicator();this._waitIndicatorRunnable=new Core.Web.Scheduler.MethodRunnable(Core.method(this,this._waitIndicatorActivate),this._preWaitIndicatorDelay,false)},$abstract:true,$virtual:{getResourceUrl:function(a,b){if(this.parent){return this.parent.getResourceUrl(a,b)}else{return null}},verifyInput:function(a){if(this._inputRestrictionCount!==0){return false}if(a){return a.isActive()}else{return this.application.isActive()}},dispose:function(){this.configure(null,null);this._setWaitVisible(false)}},addElement:function(a){Core.Web.Event.add(a,"keypress",this._processKeyRef,false);Core.Web.Event.add(a,"keydown",this._processKeyRef,false);Core.Web.Event.add(a,"keyup",this._processKeyRef,false)
},configure:function(a,b){if(this.application){Core.Arrays.remove(Echo.Client._activeClients,this);this.removeElement(this.domainElement);this.application.removeListener("focus",this._processApplicationFocusRef);this.application.doDispose();this.application.client=null}this.application=a;this.domainElement=b;if(this.application){this.application.client=this;this.application.doInit();this.application.addListener("focus",this._processApplicationFocusRef);this.addElement(this.domainElement);Echo.Client._activeClients.push(this)}},createInputRestriction:function(){this._setWaitVisible(true);var a=(++this._lastInputRestrictionId).toString();++this._inputRestrictionCount;this._inputRestrictionMap[a]=true;return a},displayError:function(m,n,i,h,g,b){m=m||document.body;var f=this.createInputRestriction();this._setWaitVisible(false);var j=document.createElement("div");j.style.cssText="position:absolute;z-index:32766;width:100%;height:100%;background-color:#000000;opacity:0.75";if(Core.Web.Env.PROPRIETARY_IE_OPACITY_FILTER_REQUIRED){j.style.filter="alpha(opacity=75)"
}m.appendChild(j);var a=document.createElement("div");a.style.cssText="position:absolute;z-index:32767;width:100%;height:100%;overflow:hidden;";m.appendChild(a);var e=document.createElement("div");e.style.cssText="color:#ffffff;padding:20px 40px 0px;"+(b===Echo.Client.STYLE_MESSAGE?"border-bottom:4px solid #1f1faf;background-color:#1f1f5f":"border-bottom:4px solid #af1f1f;background-color:#5f1f1f");if(n){var l=document.createElement("div");l.style.cssText="font-weight: bold; margin-bottom:20px;";l.appendChild(document.createTextNode(n));e.appendChild(l)}if(i){var k=document.createElement("div");k.style.cssText="max-height:10em;overflow:auto;margin-bottom:20px;";k.appendChild(document.createTextNode(i));e.appendChild(k)}a.appendChild(e);if(h){var d=document.createElement("div");d.tabIndex="0";d.style.cssText="margin-bottom:20px;cursor:pointer;font-weight:bold;padding:2px 10px;"+(b===Echo.Client.STYLE_MESSAGE?"border: 1px outset #2f2faf;background-color:#2f2faf;":"border: 1px outset #af2f2f;background-color:#af2f2f;");
d.appendChild(document.createTextNode(h));e.appendChild(d);var c=Core.method(this,function(o){if(o.type!="keypress"||o.keyCode==13){try{Core.Web.DOM.removeEventListener(d,"click",c,false);Core.Web.DOM.removeEventListener(d,"keypress",c,false);a.parentNode.removeChild(a);j.parentNode.removeChild(j);this.removeInputRestriction(f)}finally{if(g){g()}}}});Core.Web.DOM.addEventListener(d,"click",c,false);Core.Web.DOM.addEventListener(d,"keypress",c,false);Core.Web.DOM.focusElement(d)}},exec:function(b,c){var a=this.createInputRestriction();Core.Web.Library.exec(b,Core.method(this,function(d){if(d&&!d.success){this.fail("Cannot install library: "+d.url+" Exception: "+d.ex);return}this.removeInputRestriction(a);c()}))},fail:function(b){var a=this.domainElement;try{this.dispose()}finally{if(this.configuration["StopError.URI"]){window.location.href=this.configuration["StopError.URI"]}else{this.displayError(a,this.configuration["StopError.Message"],b,this.configuration["Action.Restart"],function(){window.location.reload()
})}}},forceRedraw:function(){if(this.parent){this.parent.forceRedraw()}else{if(Core.Web.Env.QUIRK_IE_BLANK_SCREEN){if(this.domainElement&&this.domainElement.offsetHeight===0){var a=document.documentElement.style.display||"";document.documentElement.style.display="none";document.documentElement.style.display=a}}}},getWaitIndicator:function(){return this._waitIndicator},_processApplicationFocus:function(b){var a=this.application.getFocusedComponent();if(a&&a.peer&&a.peer.renderFocus){a.peer.renderFocus()}},_processKey:function(c){var a=c.type=="keyup",b=c.type=="keypress",g=this.application.getFocusedComponent(),f=true,d=null,i;if(b){i=this._lastKeyCode}else{i=this._lastKeyCode=Core.Web.Key.translateKeyCode(c.keyCode)}if(!a){if(i==8){var h=c.target.nodeName?c.target.nodeName.toLowerCase():null;if(h!="input"&&h!="textarea"){Core.Web.DOM.preventEventDefault(c)}}else{if(!b&&i==9){this.application.focusNext(c.shiftKey);Core.Web.DOM.preventEventDefault(c)}}if(b&&Core.Web.Env.QUIRK_KEY_PRESS_FIRED_FOR_SPECIAL_KEYS&&!c.charCode){return true
}}if(!g){return true}if(a||b){if(this._keyFocusedComponentId!=g.renderId){return true}}else{this._keyFocusedComponentId=g.renderId}var j=b?"clientKeyPress":(a?"clientKeyUp":"clientKeyDown");while(g&&f){if(g.peer&&g.peer[j]){if(!d){d={type:c.type,source:this,keyCode:i,domEvent:c};if(b){d.charCode=Core.Web.Env.QUIRK_KEY_CODE_IS_CHAR_CODE?c.keyCode:c.charCode}}f=g.peer[j](d)}g=g.parent}return true},processUpdates:function(){var b=null;try{b=this.createInputRestriction();Echo.Render.processUpdates(this);this.removeInputRestriction(b);this.forceRedraw()}catch(a){if(a.lineNumber){Core.Debug.consoleWrite("Reported Line #: "+a.lineNumber);Core.Debug.consoleWrite("Evaluated Line #: "+(a.lineNumber-Core.Web.Library.evalLine)+" (if evaluated script)")}if(a.stack){Core.Debug.consoleWrite("Exception: "+a+", Stack Trace: "+a.stack)}this.fail("Exception during Client.processUpdates(): "+a.message);throw (a)}},registerRestrictionListener:function(b,a){if(!this._inputRestrictionListeners){this._inputRestrictionListeners={}
}this._inputRestrictionListeners[b.renderId]=a},removeInputRestriction:function(c){if(this._inputRestrictionMap[c]===undefined){return}delete this._inputRestrictionMap[c];--this._inputRestrictionCount;if(this._inputRestrictionCount===0){this._setWaitVisible(false);if(this._inputRestrictionListeners){var b=this._inputRestrictionListeners;this._inputRestrictionListeners=null;for(var a in b){b[a]()}}}},_setWaitVisible:function(a){if(a){if(!this._waitIndicatorActive){this._waitIndicatorActive=true;Core.Web.Scheduler.add(this._waitIndicatorRunnable)}}else{if(this._waitIndicatorActive){this._waitIndicatorActive=false;Core.Web.Scheduler.remove(this._waitIndicatorRunnable);this._waitIndicator.deactivate(this);this.forceRedraw()}}},setWaitIndicator:function(a){if(this._waitIndicator){this._setWaitVisible(false);if(this._waitIndicator.dispose){this._waitIndicator.dispose(this)}}this._waitIndicator=a},removeElement:function(a){Core.Web.Event.remove(a,"keypress",this._processKeyRef,false);Core.Web.Event.remove(a,"keydown",this._processKeyRef,false);
Core.Web.Event.remove(a,"keyup",this._processKeyRef,false)},_waitIndicatorActivate:function(){this._waitIndicator.activate(this)},_windowResizeListener:function(a){if(this.application.rootComponent.peer){Echo.Render.notifyResize(this.application.rootComponent)}}});Echo.Client.Timer=Core.extend({_times:null,_labels:null,$construct:function(){this._times=[new Date().getTime()];this._labels=["Start"]},mark:function(a){this._times.push(new Date().getTime());this._labels.push(a)},toString:function(){var a="";for(var b=1;b<this._times.length;++b){var c=this._times[b]-this._times[b-1];a+=this._labels[b]+":"+c+" "}a+="TOT:"+(this._times[this._times.length-1]-this._times[0])+"ms";return a}});Echo.Client.WaitIndicator=Core.extend({$abstract:{activate:function(a){},deactivate:function(a){}},$virtual:{dispose:null}});Echo.Client.DefaultWaitIndicator=Core.extend(Echo.Client.WaitIndicator,{$construct:function(){this._divElement=document.createElement("div");this._divElement.style.cssText="display: none;z-index:32000;position:absolute;top:30px;right:30px;width:200px;padding:20px;border:1px outset #abcdef;background-color:#abcdef;color:#000000;text-align:center;";
this._textNode=document.createTextNode("");this._divElement.appendChild(this._textNode);this._fadeRunnable=new Core.Web.Scheduler.MethodRunnable(Core.method(this,this._tick),50,true);document.body.appendChild(this._divElement)},activate:function(a){if(a.configuration["WaitIndicator.Background"]){this._divElement.style.backgroundColor=a.configuration["WaitIndicator.Background"];this._divElement.style.borderColor=a.configuration["WaitIndicator.Background"]}if(a.configuration["WaitIndicator.Foreground"]){this._divElement.style.color=a.configuration["WaitIndicator.Foreground"]}this._textNode.nodeValue=a.configuration["WaitIndicator.Text"];this._divElement.style.display="block";Core.Web.Scheduler.add(this._fadeRunnable);this._opacity=0},deactivate:function(a){this._divElement.style.display="none";Core.Web.Scheduler.remove(this._fadeRunnable)},dispose:function(a){if(this._divElement&&this._divElement.parentNode){this._divElement.parentNode.removeChild(this._divElement)}this._divElement=null;this._textNode=null
},_tick:function(){++this._opacity;var a=1-(Math.abs((this._opacity%40)-20)/30);if(!Core.Web.Env.PROPRIETARY_IE_OPACITY_FILTER_REQUIRED){this._divElement.style.opacity=a}}});Echo.FreeClient=Core.extend(Echo.Client,{_processUpdateRef:null,_doRenderRef:null,_resourcePaths:null,_renderPending:false,$construct:function(a,b){Echo.Client.call(this);this._doRenderRef=Core.method(this,this._doRender);this._processUpdateRef=Core.method(this,this._processUpdate);this.configure(a,b);this._processUpdate()},addResourcePath:function(a,b){if(!this._resourcePaths){this._resourcePaths={}}this._resourcePaths[a]=b},dispose:function(){this.application.updateManager.removeUpdateListener(this._processUpdateRef);Echo.Render.renderComponentDispose(null,this.application.rootComponent);Echo.Client.prototype.dispose.call(this)},_doRender:function(){if(this.application){this.processUpdates();this._renderPending=false}},getResourceUrl:function(a,b){if(this._resourcePaths&&this._resourcePaths[a]){return this._resourcePaths[a]+b
}else{return Echo.Client.prototype.getResourceUrl.call(this,a,b)}},init:function(){Core.Web.init();this.application.updateManager.addUpdateListener(this._processUpdateRef)},loadStyleSheet:function(a){var b=new Core.Web.HttpConnection(a,"GET");b.addResponseListener(Core.method(this,this._processStyleSheet));b.connect()},_processStyleSheet:function(b){if(!b.valid){throw new Error("Received invalid response from StyleSheet HTTP request.")}var a=b.source.getResponseXml().documentElement;var c=Echo.Serial.loadStyleSheet(this,a);this.application.setStyleSheet(c)},_processUpdate:function(a){if(!this._renderPending){this._renderPending=true;Core.Web.Scheduler.run(this._doRenderRef)}}});Echo.Sync.ArrayContainer=Core.extend(Echo.Render.ComponentSync,{$abstract:{cellElementNodeName:null,renderChildLayoutData:function(b,a){}},$virtual:{prevFocusKey:null,prevFocusFlag:null,nextFocusKey:null,nextFocusFlag:null,invertFocusRtl:false},element:null,containerElement:null,spacingPrototype:null,cellSpacing:null,_childIdToElementMap:null,clientKeyDown:function(f){switch(f.keyCode){case this.prevFocusKey:case this.nextFocusKey:var a=f.keyCode==this.prevFocusKey;
if(this.invertFocusRtl&&!this.component.getRenderLayoutDirection().isLeftToRight()){a=!a}var c=this.client.application.getFocusedComponent();if(c&&c.peer&&c.peer.getFocusFlags){var d=c.peer.getFocusFlags();if((a&&d&this.prevFocusFlag)||(!a&&d&this.nextFocusFlag)){var b=this.client.application.focusManager.findInParent(this.component,a);if(b){this.client.application.setFocusedComponent(b);Core.Web.DOM.preventEventDefault(f.domEvent);return false}}}break}return true},_renderAddChild:function(g,f,b){var a=document.createElement(this.cellElementNodeName);this._childIdToElementMap[f.renderId]=a;Echo.Render.renderComponentAdd(g,f,a);this.renderChildLayoutData(f,a);if(b!=null){var d;if(this.containerElement.childNodes.length>=3&&this.cellSpacing){d=(this.containerElement.childNodes.length+1)/2}else{d=this.containerElement.childNodes.length}if(b==d){b=null}}if(b==null||!this.containerElement.firstChild){if(this.cellSpacing&&this.containerElement.firstChild){this.containerElement.appendChild(this.spacingPrototype.cloneNode(false))
}this.containerElement.appendChild(a)}else{var e=this.cellSpacing?b*2:b;var c=this.containerElement.childNodes[e];this.containerElement.insertBefore(a,c);if(this.cellSpacing){this.containerElement.insertBefore(this.spacingPrototype.cloneNode(false),c)}}},renderAddChildren:function(d){this._childIdToElementMap={};var a=this.component.getComponentCount();for(var b=0;b<a;++b){var c=this.component.getComponent(b);this._renderAddChild(d,c)}},renderDispose:function(a){this.element=null;this.containerElement=null;this._childIdToElementMap=null;this.spacingPrototype=null},_renderRemoveChild:function(c,b){var a=this._childIdToElementMap[b.renderId];if(!a){return}if(this.cellSpacing){if(a.previousSibling){this.containerElement.removeChild(a.previousSibling)}else{if(a.nextSibling){this.containerElement.removeChild(a.nextSibling)}}}this.containerElement.removeChild(a);delete this._childIdToElementMap[b.renderId]},renderUpdate:function(g){var c,d=false;if(g.hasUpdatedProperties()||g.hasUpdatedLayoutDataChildren()){d=true
}else{var a=g.getRemovedChildren();if(a){for(c=0;c<a.length;++c){this._renderRemoveChild(g,a[c])}}var e=g.getAddedChildren();if(e){for(c=0;c<e.length;++c){this._renderAddChild(g,e[c],this.component.indexOf(e[c]))}}}if(d){var b=this.element;var f=b.parentNode;Echo.Render.renderComponentDispose(g,g.parent);f.removeChild(b);this.renderAdd(g,f)}return d}});Echo.Sync.Column=Core.extend(Echo.Sync.ArrayContainer,{$load:function(){Echo.Render.registerPeer("Column",this)},cellElementNodeName:"div",prevFocusKey:38,prevFocusFlag:Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_UP,nextFocusKey:40,nextFocusFlag:Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_DOWN,renderAdd:function(b,a){this.element=this.containerElement=document.createElement("div");this.element.id=this.component.renderId;this.element.style.outlineStyle="none";this.element.tabIndex="-1";Echo.Sync.renderComponentDefaults(this.component,this.element);Echo.Sync.Border.render(this.component.render("border"),this.element);Echo.Sync.Insets.render(this.component.render("insets"),this.element,"padding");
this.cellSpacing=Echo.Sync.Extent.toPixels(this.component.render("cellSpacing"),false);if(this.cellSpacing){this.spacingPrototype=document.createElement("div");this.spacingPrototype.style.height=this.cellSpacing+"px";this.spacingPrototype.style.fontSize="1px";this.spacingPrototype.style.lineHeight="0"}this.renderAddChildren(b);a.appendChild(this.element)},renderChildLayoutData:function(c,a){var b=c.render("layoutData");if(b){Echo.Sync.Color.render(b.background,a,"backgroundColor");Echo.Sync.FillImage.render(b.backgroundImage,a);Echo.Sync.Insets.render(b.insets,a,"padding");Echo.Sync.Alignment.render(b.alignment,a,true,this.component);if(b.height){a.style.height=Echo.Sync.Extent.toPixels(b.height,false)+"px"}}}});Echo.Sync.Row=Core.extend(Echo.Sync.ArrayContainer,{$static:{_createRowPrototype:function(){var c=document.createElement("div");c.style.outlineStyle="none";c.tabIndex="-1";var b=document.createElement("table");b.style.borderCollapse="collapse";c.appendChild(b);var a=document.createElement("tbody");
b.appendChild(a);a.appendChild(document.createElement("tr"));return c},_rowPrototype:null},$load:function(){this._rowPrototype=this._createRowPrototype();Echo.Render.registerPeer("Row",this)},cellElementNodeName:"td",prevFocusKey:37,prevFocusFlag:Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_LEFT,nextFocusKey:39,nextFocusFlag:Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_RIGHT,invertFocusRtl:true,renderAdd:function(b,a){this.element=Echo.Sync.Row._rowPrototype.cloneNode(true);this.element.id=this.component.renderId;Echo.Sync.renderComponentDefaults(this.component,this.element);Echo.Sync.Border.render(this.component.render("border"),this.element);Echo.Sync.Insets.render(this.component.render("insets"),this.element,"padding");Echo.Sync.Alignment.render(this.component.render("alignment"),this.element,true,this.component);this.containerElement=this.element.firstChild.firstChild.firstChild;this.cellSpacing=Echo.Sync.Extent.toPixels(this.component.render("cellSpacing"),false);if(this.cellSpacing){this.spacingPrototype=document.createElement("td");
this.spacingPrototype.style.padding=0;this.spacingPrototype.style.width=this.cellSpacing+"px"}this.renderAddChildren(b);a.appendChild(this.element)},renderChildLayoutData:function(d,b){var c=d.render("layoutData");var a;if(c){a=c.insets;Echo.Sync.Color.render(c.background,b,"backgroundColor");Echo.Sync.FillImage.render(c.backgroundImage,b);Echo.Sync.Alignment.render(c.alignment,b,true,this.component);if(c.width){if(Echo.Sync.Extent.isPercent(c.width)){b.style.width=c.width;if(this.element.firstChild.style.width!="100%"){this.element.firstChild.style.width="100%"}}else{b.style.width=Echo.Sync.Extent.toPixels(c.width,true)+"px"}}}if(!a){a=0}Echo.Sync.Insets.render(a,b,"padding")}});Echo.Sync.Button=Core.extend(Echo.Render.ComponentSync,{$static:{_defaultIconTextMargin:5,_prototypeButton:null,_createPrototypeButton:function(){var a=document.createElement("div");a.tabIndex="0";a.style.outlineStyle="none";a.style.cursor="pointer";return a}},$load:function(){this._prototypeButton=this._createPrototypeButton();
Echo.Render.registerPeer("Button",this)},enabled:null,div:null,_textElement:null,iconImg:null,_processRolloverExitRef:null,_processInitEventRef:null,_focused:false,$construct:function(){this._processInitEventRef=Core.method(this,this._processInitEvent)},$virtual:{doAction:function(){this.component.doAction()},renderContent:function(){var e=this.component.render("text");var d=Echo.Sync.getEffectProperty(this.component,"icon","disabledIcon",!this.enabled);if(e!=null){if(d){var a=this.component.render("iconTextMargin",Echo.Sync.Button._defaultIconTextMargin);var c=Echo.Sync.TriCellTable.getOrientation(this.component,"textPosition");var b=new Echo.Sync.TriCellTable(c,Echo.Sync.Extent.toPixels(a));this.renderButtonText(b.tdElements[0],e);this.iconImg=this.renderButtonIcon(b.tdElements[1],d);this.div.appendChild(b.tableElement)}else{this.renderButtonText(this.div,e)}}else{if(d){this.iconImg=this.renderButtonIcon(this.div,d)}}},setPressedState:function(a){var f=Echo.Sync.getEffectProperty(this.component,"foreground","pressedForeground",a);
var d=Echo.Sync.getEffectProperty(this.component,"background","pressedBackground",a);var g=Echo.Sync.getEffectProperty(this.component,"backgroundImage","pressedBackgroundImage",a);var b=Echo.Sync.getEffectProperty(this.component,"font","pressedFont",a);var c=Echo.Sync.getEffectProperty(this.component,"border","pressedBorder",a);Echo.Sync.Color.renderClear(f,this.div,"color");Echo.Sync.Color.renderClear(d,this.div,"backgroundColor");Echo.Sync.FillImage.renderClear(g,this.div,"backgroundColor");Echo.Sync.Border.renderClear(c,this.div);if(this._textElement){Echo.Sync.Font.renderClear(b,this._textElement)}if(this.iconImg){var e=Echo.Sync.ImageReference.getUrl(Echo.Sync.getEffectProperty(this.component,"icon","pressedIcon",a));if(e!=this.iconImg.src){this.iconImg.src=e}}},setRolloverState:function(a){var f=Echo.Sync.getEffectProperty(this.component,"foreground","rolloverForeground",a);var d=Echo.Sync.getEffectProperty(this.component,"background","rolloverBackground",a);var g=Echo.Sync.getEffectProperty(this.component,"backgroundImage","rolloverBackgroundImage",a);
var b=Echo.Sync.getEffectProperty(this.component,"font","rolloverFont",a);var c=Echo.Sync.getEffectProperty(this.component,"border","rolloverBorder",a);Echo.Sync.Color.renderClear(f,this.div,"color");Echo.Sync.Color.renderClear(d,this.div,"backgroundColor");Echo.Sync.FillImage.renderClear(g,this.div,"backgroundColor");Echo.Sync.Border.renderClear(c,this.div);if(this._textElement){Echo.Sync.Font.renderClear(b,this._textElement)}if(this.iconImg){var e=Echo.Sync.ImageReference.getUrl(Echo.Sync.getEffectProperty(this.component,"icon","rolloverIcon",a));if(e!=this.iconImg.src){this.iconImg.src=e}}}},_addEventListeners:function(){this._processRolloverExitRef=Core.method(this,this._processRolloverExit);Core.Web.Event.remove(this.div,"focus",this._processInitEventRef);Core.Web.Event.remove(this.div,"mouseover",this._processInitEventRef);Core.Web.Event.add(this.div,"click",Core.method(this,this._processClick),false);if(this.component.render("rolloverEnabled")){Core.Web.Event.add(this.div,Core.Web.Env.PROPRIETARY_EVENT_MOUSE_ENTER_LEAVE_SUPPORTED?"mouseenter":"mouseover",Core.method(this,this._processRolloverEnter),false);
Core.Web.Event.add(this.div,Core.Web.Env.PROPRIETARY_EVENT_MOUSE_ENTER_LEAVE_SUPPORTED?"mouseleave":"mouseout",Core.method(this,this._processRolloverExit),false)}if(this.component.render("pressedEnabled")){Core.Web.Event.add(this.div,"mousedown",Core.method(this,this._processPress),false);Core.Web.Event.add(this.div,"mouseup",Core.method(this,this._processRelease),false)}Core.Web.Event.add(this.div,"focus",Core.method(this,this._processFocus),false);Core.Web.Event.add(this.div,"blur",Core.method(this,this._processBlur),false);Core.Web.Event.Selection.disable(this.div)},clientKeyDown:function(a){if(!this.client||!this.client.verifyInput(this.component)){return true}if(a.keyCode==13){this.doAction();return false}else{return true}},getFocusFlags:function(){return Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_ALL},_processBlur:function(a){this._renderFocusStyle(false)},_processClick:function(a){if(!this.client||!this.client.verifyInput(this.component)){return true}this.client.application.setFocusedComponent(this.component);
this.doAction()},_processFocus:function(a){if(!this.client||!this.client.verifyInput(this.component)){return true}this.client.application.setFocusedComponent(this.component)},_processInitEvent:function(a){this._addEventListeners();switch(a.type){case"focus":this._processFocus(a);break;case"mouseover":if(this.component.render("rolloverEnabled")){this._processRolloverEnter(a)}break}},_processPress:function(a){if(!this.client||!this.client.verifyInput(this.component)){return true}Core.Web.DOM.preventEventDefault(a);this.setPressedState(true)},_processRelease:function(a){if(!this.client){return true}this.setPressedState(false)},_processRolloverEnter:function(a){if(!this.client||!this.client.verifyInput(this.component)||Core.Web.dragInProgress){return true}this.client.application.addListener("focus",this._processRolloverExitRef);this.setRolloverState(true);return true},_processRolloverExit:function(a){if(!this.client||!this.client.application){return true}if(this._processRolloverExitRef){this.client.application.removeListener("focus",this._processRolloverExitRef)
}this.setRolloverState(false);return true},renderAdd:function(e,b){this.enabled=this.component.isRenderEnabled();this.div=Echo.Sync.Button._prototypeButton.cloneNode(false);this.div.id=this.component.renderId;Echo.Sync.LayoutDirection.render(this.component.getLayoutDirection(),this.div);if(this.enabled){Echo.Sync.Color.renderFB(this.component,this.div);Echo.Sync.Border.render(this.component.render("border"),this.div);Echo.Sync.FillImage.render(this.component.render("backgroundImage"),this.div)}else{Echo.Sync.Color.render(Echo.Sync.getEffectProperty(this.component,"foreground","disabledForeground",true),this.div,"color");Echo.Sync.Color.render(Echo.Sync.getEffectProperty(this.component,"background","disabledBackground",true),this.div,"backgroundColor");Echo.Sync.Border.render(Echo.Sync.getEffectProperty(this.component,"border","disabledBorder",true),this.div);Echo.Sync.FillImage.render(Echo.Sync.getEffectProperty(this.component,"backgroundImage","disabledBackgroundImage",true),this.div)}Echo.Sync.Insets.render(this.component.render("insets"),this.div,"padding");
Echo.Sync.Alignment.render(this.component.render("alignment"),this.div,true,this.component);var d=this.component.render("toolTipText");if(d){this.div.title=d}var c=this.component.render("width");if(c){this.div.style.width=Echo.Sync.Extent.toCssValue(c,true,true)}var a=this.component.render("height");if(a){this.div.style.height=Echo.Sync.Extent.toCssValue(a,false);this.div.style.overflow="hidden"}this.renderContent();if(this.enabled){Core.Web.Event.add(this.div,"focus",this._processInitEventRef,false);Core.Web.Event.add(this.div,"mouseover",this._processInitEventRef,false)}b.appendChild(this.div)},renderButtonText:function(a,c){this._textElement=a;var b=this.component.render("textAlignment");if(b){Echo.Sync.Alignment.render(b,a,true,this.component)}if(this.enabled){Echo.Sync.Font.render(this.component.render("font"),this._textElement)}else{Echo.Sync.Font.render(Echo.Sync.getEffectProperty(this.component,"font","disabledFont",true),this._textElement)}a.appendChild(document.createTextNode(c));
if(!this.component.render("lineWrap",true)){a.style.whiteSpace="nowrap"}},renderButtonIcon:function(a,b){var d=this.component.render("alignment");if(d){Echo.Sync.Alignment.render(d,a,true,this.component)}var c=document.createElement("img");Echo.Sync.ImageReference.renderImg(b,c);a.appendChild(c);return c},renderDispose:function(a){if(this._processRolloverExitRef){this.client.application.removeListener("focus",this._processRolloverExitRef)}Core.Web.Event.removeAll(this.div);this._focused=false;this.div=null;this._textElement=null;this.iconImg=null},renderFocus:function(){if(this._focused){return}this._renderFocusStyle(true);Core.Web.DOM.focusElement(this.div)},renderUpdate:function(c){var a=this.div;var b=a.parentNode;this.renderDispose(c);b.removeChild(a);this.renderAdd(c,b);return false},_renderFocusStyle:function(d){if(this._focused==d){return}this._focused=d;var e;if(!this.component.render("focusedEnabled")){e=this.component.render("background");if(e!=null){var a=d?Echo.Sync.Color.adjust(e,32,32,32):e;
Echo.Sync.Color.render(a,this.div,"backgroundColor")}return}else{var g=Echo.Sync.getEffectProperty(this.component,"foreground","focusedForeground",d);e=Echo.Sync.getEffectProperty(this.component,"background","focusedBackground",d);var h=Echo.Sync.getEffectProperty(this.component,"backgroundImage","focusedBackgroundImage",d);var b=Echo.Sync.getEffectProperty(this.component,"font","focusedFont",d);var c=Echo.Sync.getEffectProperty(this.component,"border","focusedBorder",d);Echo.Sync.Color.renderClear(g,this.div,"color");Echo.Sync.Color.renderClear(e,this.div,"backgroundColor");Echo.Sync.FillImage.renderClear(h,this.div,"backgroundColor");Echo.Sync.Border.renderClear(c,this.div);if(this._textElement){Echo.Sync.Font.renderClear(b,this._textElement)}if(this.iconImg){var f=Echo.Sync.ImageReference.getUrl(Echo.Sync.getEffectProperty(this.component,"icon","focusedIcon",d));if(f!=this.iconImg.src){this.iconImg.src=f}}}}});Echo.Sync.ContentPane=Core.extend(Echo.Render.ComponentSync,{$load:function(){Echo.Render.registerPeer("ContentPane",this)
},_floatingPaneStack:null,_zIndexRenderRequired:false,$construct:function(){this._floatingPaneStack=[]},getSize:function(){return new Core.Web.Measure.Bounds(this._div)},raise:function(a){if(this._floatingPaneStack[this._floatingPaneStack.length-1]==a){return}Core.Arrays.remove(this._floatingPaneStack,a);this._floatingPaneStack.push(a);this._renderFloatingPaneZIndices();this._storeFloatingPaneZIndices()},renderAdd:function(g,a){var d;this._div=document.createElement("div");this._div.id=this.component.renderId;this._div.style.position="absolute";this._div.style.width="100%";this._div.style.height="100%";this._div.style.overflow="hidden";this._div.style.zIndex="0";Echo.Sync.renderComponentDefaults(this.component,this._div);var c=this.component.render("background");var e=this.component.render("backgroundImage");Echo.Sync.FillImage.render(e,this._div);if(!c&&!e){Echo.Sync.FillImage.render(this.client.getResourceUrl("Echo","resource/Transparent.gif"),this._div)}this._childIdToElementMap={};var b=this.component.getComponentCount();
for(d=0;d<b;++d){var f=this.component.getComponent(d);this._renderAddChild(g,f)}this._pendingScrollX=this.component.render("horizontalScroll");this._pendingScrollY=this.component.render("verticalScroll");a.appendChild(this._div);if(this._zIndexRenderRequired){this._renderFloatingPaneZIndices()}},_renderAddChild:function(c,a){var e=document.createElement("div");this._childIdToElementMap[a.renderId]=e;e.style.position="absolute";if(a.floatingPane){var h=a.render("zIndex");if(h!=null){var j=false;var d=0;while(d<this._floatingPaneStack.length&&!j){var f=this._floatingPaneStack[d].render("zIndex");if(f!=null&&f>h){this._floatingPaneStack.splice(d,0,a);j=true}++d}if(!j){this._floatingPaneStack.push(a)}}else{this._floatingPaneStack.push(a)}e.style.zIndex="1";e.style.left=e.style.top=0;this._zIndexRenderRequired=true}else{var b=this.component.render("insets",0);var g=Echo.Sync.Insets.toPixels(b);e.style.zIndex="0";e.style.left=g.left+"px";e.style.top=g.top+"px";e.style.bottom=g.bottom+"px";e.style.right=g.right+"px";
if(a.pane){e.style.overflow="hidden"}else{switch(this.component.render("overflow")){case Echo.ContentPane.OVERFLOW_HIDDEN:e.style.overflow="hidden";break;case Echo.ContentPane.OVERFLOW_SCROLL:e.style.overflow="scroll";break;default:e.style.overflow="auto";break}}}Echo.Render.renderComponentAdd(c,a,e);this._div.appendChild(e)},renderDisplay:function(){var h=this._div.firstChild;while(h){Core.Web.VirtualPosition.redraw(h);h=h.nextSibling}if(this._pendingScrollX||this._pendingScrollY){var c=this.component.getComponentCount();for(var d=0;d<c;++d){h=this.component.getComponent(d);if(!h.floatingPane){var f=this._childIdToElementMap[h.renderId];var b,e;if(this._pendingScrollX){var a=Echo.Sync.Extent.toPixels(this._pendingScrollX);if(Echo.Sync.Extent.isPercent(this._pendingScrollX)||a<0){e=a<0?100:parseInt(this._pendingScrollX,10);b=Math.round((f.scrollWidth-f.offsetWidth)*e/100);if(b>0){f.scrollLeft=b;if(Core.Web.Env.ENGINE_MSHTML){b=Math.round((f.scrollWidth-f.offsetWidth)*e/100);f.scrollLeft=b
}}}else{f.scrollLeft=a}this._pendingScrollX=null}if(this._pendingScrollY){var g=Echo.Sync.Extent.toPixels(this._pendingScrollY);if(Echo.Sync.Extent.isPercent(this._pendingScrollY)||g<0){e=g<0?100:parseInt(this._pendingScrollY,10);b=Math.round((f.scrollHeight-f.offsetHeight)*e/100);if(b>0){f.scrollTop=b;if(Core.Web.Env.ENGINE_MSHTML){b=Math.round((f.scrollHeight-f.offsetHeight)*e/100);f.scrollTop=b}}}else{f.scrollTop=g}this._pendingScrollY=null}break}}}},renderDispose:function(a){this._childIdToElementMap=null;this._div=null},_renderFloatingPaneZIndices:function(){for(var b=0;b<this._floatingPaneStack.length;++b){var a=this._childIdToElementMap[this._floatingPaneStack[b].renderId];a.style.zIndex=2+b}this._zIndexRenderRequired=false},_renderRemoveChild:function(c,b){if(b.floatingPane){Core.Arrays.remove(this._floatingPaneStack,b)}var a=this._childIdToElementMap[b.renderId];if(!a){return}a.parentNode.removeChild(a);delete this._childIdToElementMap[b.renderId]},renderUpdate:function(g){var c,d=false;
if(g.hasUpdatedProperties()||g.hasUpdatedLayoutDataChildren()){d=true}else{var a=g.getRemovedChildren();if(a){for(c=0;c<a.length;++c){this._renderRemoveChild(g,a[c])}}var e=g.getAddedChildren();g.renderContext.displayRequired=[];if(e){for(c=0;c<e.length;++c){if(!e[c].floatingPane){g.renderContext.displayRequired=null}this._renderAddChild(g,e[c],this.component.indexOf(e[c]));if(g.renderContext.displayRequired){g.renderContext.displayRequired.push(e[c])}}if(this._zIndexRenderRequired){this._renderFloatingPaneZIndices()}}}if(d){this._floatingPaneStack=[];var b=this._div;var f=b.parentNode;Echo.Render.renderComponentDispose(g,g.parent);f.removeChild(b);this.renderAdd(g,f)}return d},_storeFloatingPaneZIndices:function(){for(var a=0;a<this._floatingPaneStack.length;++a){this._floatingPaneStack[a].set("zIndex",a)}}});Echo.Sync.Label=Core.extend(Echo.Render.ComponentSync,{$static:{_defaultIconTextMargin:5},$load:function(){Echo.Render.registerPeer("Label",this)},_node:null,_formatWhitespace:function(e,c){e=e.replace(/\t/g," \u00a0 \u00a0");
e=e.replace(/ {2}/g," \u00a0");var b=e.split("\n");for(var d=0;d<b.length;d++){var a=b[d];if(d>0){c.appendChild(document.createElement("br"))}if(a.length>0){c.appendChild(document.createTextNode(a))}}},renderAdd:function(g,l){this._containerElement=l;var k=this.component.render("icon"),m=this.component.render("text"),i=this.component.render("foreground"),b=this.component.render("background"),a=this.component.render("toolTipText"),h;if(m!=null){var n=this.component.render("lineWrap",true);var f=this.component.render("formatWhitespace",false)&&(m.indexOf(" ")!=-1||m.indexOf("\n")!=-1||m.indexOf("\t")!=-1);if(k){var e=this.component.render("iconTextMargin",Echo.Sync.Label._defaultIconTextMargin);var c=Echo.Sync.TriCellTable.getOrientation(this.component,"textPosition");var j=new Echo.Sync.TriCellTable(c,Echo.Sync.Extent.toPixels(e));h=document.createElement("img");Echo.Sync.ImageReference.renderImg(k,h);if(f){this._formatWhitespace(m,j.tdElements[0])}else{j.tdElements[0].appendChild(document.createTextNode(m))
}if(!n){j.tdElements[0].style.whiteSpace="nowrap"}j.tdElements[1].appendChild(h);this._node=j.tableElement;this._node.id=this.component.renderId;Echo.Sync.renderComponentDefaults(this.component,this._node)}else{var d=this.component.render("font");if(!this.client.designMode&&!a&&!d&&n&&!i&&!b&&!f&&!this.component.getLayoutDirection()){this._node=document.createTextNode(m)}else{this._node=document.createElement("span");this._node.id=this.component.renderId;if(f){this._formatWhitespace(m,this._node)}else{this._node.appendChild(document.createTextNode(m))}if(!n){this._node.style.whiteSpace="nowrap"}Echo.Sync.renderComponentDefaults(this.component,this._node)}}}else{if(k){h=document.createElement("img");Echo.Sync.ImageReference.renderImg(k,h);this._node=document.createElement("span");this._node.id=this.component.renderId;this._node.appendChild(h);Echo.Sync.Color.render(this.component.render("background"),this._node,"backgroundColor")}else{if(this.client.designMode){this._node=document.createElement("span");
this._node.id=this.component.renderId}else{this._node=null}}}if(this._node){if(a){this._node.title=a}l.appendChild(this._node)}},renderDispose:function(a){this._containerElement=null;this._node=null},renderUpdate:function(a){if(this._node){this._node.parentNode.removeChild(this._node)}this.renderAdd(a,this._containerElement);return false}});Echo.Sync.TextComponent=Core.extend(Echo.Render.ComponentSync,{$abstract:true,$virtual:{getSupportedPartialProperties:function(){return["text","editable","selectionStart","selectionEnd"]},processBlur:function(a){this._focused=false;this._storeSelection();this._storeValue();return true},processFocus:function(a){this._focused=true;if(this.client){if(this.component.isActive()){this.client.application.setFocusedComponent(this.component)}else{this._resetFocus()}}return false},sanitizeInput:function(){var a=this.component.render("maximumLength",-1);if(a>=0){if(this.input.value&&this.input.value.length>a){this.input.value=this.input.value.substring(0,a)}}}},input:null,container:null,_focused:false,_lastProcessedValue:null,percentWidth:false,_selectionStart:0,_selectionEnd:0,_renderStyle:function(){if(this.component.isRenderEnabled()){Echo.Sync.renderComponentDefaults(this.component,this.input);
Echo.Sync.Border.render(this.component.render("border"),this.input);Echo.Sync.FillImage.render(this.component.render("backgroundImage"),this.input)}else{Echo.Sync.LayoutDirection.render(this.component.getLayoutDirection(),this.input);Echo.Sync.Color.render(Echo.Sync.getEffectProperty(this.component,"foreground","disabledForeground",true),this.input,"color");Echo.Sync.Color.render(Echo.Sync.getEffectProperty(this.component,"background","disabledBackground",true),this.input,"backgroundColor");Echo.Sync.Border.render(Echo.Sync.getEffectProperty(this.component,"border","disabledBorder",true),this.input);Echo.Sync.Font.render(Echo.Sync.getEffectProperty(this.component,"font","disabledFont",true),this.input);Echo.Sync.FillImage.render(Echo.Sync.getEffectProperty(this.component,"backgroundImage","disabledBackgroundImage",true),this.input)}Echo.Sync.Alignment.render(this.component.render("alignment"),this.input,false,null);Echo.Sync.Insets.render(this.component.render("insets"),this.input,"padding");
var b=this.component.render("width");this.percentWidth=Echo.Sync.Extent.isPercent(b);if(b){if(this.percentWidth){this.input.style.width="5px"}else{this.input.style.width=Echo.Sync.Extent.toCssValue(b,true)}}var a=this.component.render("height");if(a){this.input.style.height=Echo.Sync.Extent.toCssValue(a,false)}var c=this.component.render("toolTipText");if(c){this.input.title=c}},_addEventHandlers:function(){Core.Web.Event.add(this.input,"keydown",Core.method(this,this._processKeyDown),false);Core.Web.Event.add(this.input,"click",Core.method(this,this._processClick),false);Core.Web.Event.add(this.input,"focus",Core.method(this,this.processFocus),false);Core.Web.Event.add(this.input,"blur",Core.method(this,this.processBlur),false)},_adjustPercentWidth:function(a,d,b){var c=(100-(100*d/b))*a/100;return c>0?c:0},clientKeyDown:function(a){this._storeValue(a);if(this.client&&this.component.isActive()){if(!this.component.doKeyDown(a.keyCode)){Core.Web.DOM.preventEventDefault(a.domEvent)}}return true
},clientKeyPress:function(a){this._storeValue(a);if(this.client&&this.component.isActive()){if(!this.component.doKeyPress(a.keyCode,a.charCode)){Core.Web.DOM.preventEventDefault(a.domEvent)}}return true},clientKeyUp:function(a){this._storeSelection();this._storeValue(a);return true},_processClick:function(a){if(!this.client||!this.component.isActive()){Core.Web.DOM.preventEventDefault(a);return true}this.client.application.setFocusedComponent(this.component);this._storeSelection();return false},_processKeyDown:function(a){if(!this.component.isActive()){Core.Web.DOM.preventEventDefault(a)}return true},_processRestrictionsClear:function(){if(!this.client){return}if(!this.client.verifyInput(this.component)||this.input.readOnly){this.input.value=this.component.get("text");return}this.component.set("text",this.input.value,true)},_resetFocus:function(){var b=document.createElement("div");b.style.cssText="position:absolute;width:0;height:0;overflow:hidden;";var a=document.createElement("input");
a.type="text";b.appendChild(a);document.body.appendChild(b);a.focus();document.body.removeChild(b);b=null;a=null;this.client.forceRedraw();Echo.Render.updateFocus(this.client)},renderAddToParent:function(a){if(Core.Web.Env.ENGINE_MSHTML&&this.percentWidth){this.container=document.createElement("div");this.container.appendChild(this.input);a.appendChild(this.container)}else{a.appendChild(this.input)}},renderDisplay:function(){var d=this.component.render("width");if(d&&Echo.Sync.Extent.isPercent(d)&&this.input.parentNode.offsetWidth){var b=this.component.render("border");var c=b?(Echo.Sync.Border.getPixelSize(b,"left")+Echo.Sync.Border.getPixelSize(b,"right")):4;var a=this.component.render("insets");if(a){var e=Echo.Sync.Insets.toPixels(a);c+=e.left+e.right}if(Core.Web.Env.ENGINE_MSHTML){c+=1;if(this.container){this.container.style.width=this._adjustPercentWidth(100,Core.Web.Measure.SCROLL_WIDTH,this.input.parentNode.offsetWidth)+"%"}else{c+=Core.Web.Measure.SCROLL_WIDTH}}else{if(Core.Web.Env.BROWSER_CHROME&&this.input.nodeName.toLowerCase()=="textarea"){c+=3
}else{if(Core.Web.Env.BROWSER_SAFARI&&this.input.nodeName.toLowerCase()=="input"){c+=1}else{if(Core.Web.Env.ENGINE_PRESTO){c+=1}}}}this.input.style.width=this._adjustPercentWidth(parseInt(d,10),c,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(){var a,b;if(!this.component){return}if(!Core.Web.Env.NOT_SUPPORTED_INPUT_SELECTION){this._selectionStart=this.input.selectionStart;this._selectionEnd=this.input.selectionEnd}else{if(Core.Web.Env.PROPRIETARY_IE_RANGE){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{return}}this.component.set("selectionStart",this._selectionStart,true);this.component.set("selectionEnd",this._selectionEnd,true)},_storeValue:function(a){if(!this.client||!this.component.isActive()){if(a){Core.Web.DOM.preventEventDefault(a)}return}this.sanitizeInput();if(!this.client.verifyInput(this.component)){this.client.registerRestrictionListener(this.component,Core.method(this,this._processRestrictionsClear));
return}this.component.set("text",this.input.value,true);this._lastProcessedValue=this.input.value;if(a&&a.keyCode==13&&a.type=="keydown"){this.component.doAction()}}});Echo.Sync.TextArea=Core.extend(Echo.Sync.TextComponent,{$load:function(){Echo.Render.registerPeer("TextArea",this)},renderAdd:function(b,a){this.input=document.createElement("textarea");this.input.id=this.component.renderId;if(!this.component.render("editable",true)){this.input.readOnly=true}this._renderStyle(this.input);this.input.style.overflow="auto";this._addEventHandlers(this.input);if(this.component.get("text")){this.input.value=this.component.get("text")}this.renderAddToParent(a)}});Echo.Sync.TextField=Core.extend(Echo.Sync.TextComponent,{$load:function(){Echo.Render.registerPeer("TextField",this)},$virtual:{_type:"text"},getFocusFlags:function(){return Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_UP|Echo.Render.ComponentSync.FOCUS_PERMIT_ARROW_DOWN},renderAdd:function(c,a){this.input=document.createElement("input");
this.input.id=this.component.renderId;if(!this.component.render("editable",true)){this.input.readOnly=true}this.input.type=this._type;var b=this.component.render("maximumLength",-1);if(b>=0){this.input.maxLength=b}this._renderStyle(this.input);this._addEventHandlers(this.input);if(this.component.get("text")){this.input.value=this.component.get("text")}this.renderAddToParent(a)},sanitizeInput:function(){}});Echo.Sync.PasswordField=Core.extend(Echo.Sync.TextField,{$load:function(){Echo.Render.registerPeer("PasswordField",this)},_type:"password"});Echo.Sync.ToggleButton=Core.extend(Echo.Sync.Button,{$load:function(){Echo.Render.registerPeer("ToggleButton",this)},$abstract:{inputType:null},_selected:false,_stateElement:null,doAction:function(){this.setSelected(!this._selected);Echo.Sync.Button.prototype.doAction.call(this)},getStateIcon:function(b,c){var a;if(this._selected){a=Echo.Sync.getEffectProperty(this.component,"selectedStateIcon","disabledSelectedStateIcon",!this.enabled);if(a){if(c){a=this.component.render("pressedSelectedStateIcon",a)
}else{if(b){a=this.component.render("rolloverSelectedStateIcon",a)}}}}if(!a){a=Echo.Sync.getEffectProperty(this.component,"stateIcon","disabledStateIcon",!this.enabled);if(a){if(c){a=this.component.render("pressedStateIcon",a)}else{if(b){a=this.component.render("rolloverStateIcon",a)}}}}return a},_processStateChange:function(a){this._updateStateElement()},renderAdd:function(b,a){this._selected=this.component.render("selected");Echo.Sync.Button.prototype.renderAdd.call(this,b,a)},renderContent:function(){var h=this.component.render("text");var d=this.component.render("icon");var c,e,b;var a=(h!=null?1:0)+(d?1:0)+1;if(a==1){if(h!=null){this.renderButtonText(this.div,h)}else{if(d){this.iconImg=this.renderButtonIcon(this.div,d)}else{this._stateElement=this._renderButtonState(this.div)}}}else{if(a==2){c=Echo.Sync.TriCellTable.getInvertedOrientation(this.component,"statePosition","leading");e=this.component.render("stateMargin",Echo.Sync.Button._defaultIconTextMargin);b=new Echo.Sync.TriCellTable(c,Echo.Sync.Extent.toPixels(e));
if(h!=null){this.renderButtonText(b.tdElements[0],h);if(d){this.iconImg=this.renderButtonIcon(b.tdElements[1],d)}else{this._stateElement=this._renderButtonState(b.tdElements[1])}}else{this.iconImg=this.renderButtonIcon(b.tdElements[0],d);this._stateElement=this._renderButtonState(b.tdElements[1])}this.div.appendChild(b.tableElement)}else{if(a==3){c=Echo.Sync.TriCellTable.getOrientation(this.component,"textPosition");e=this.component.render("iconTextMargin",Echo.Sync.Button._defaultIconTextMargin);var f=Echo.Sync.TriCellTable.getInvertedOrientation(this.component,"statePosition","leading");var g=this.component.render("stateMargin",Echo.Sync.Button._defaultIconTextMargin);b=new Echo.Sync.TriCellTable(c,Echo.Sync.Extent.toPixels(e),f,Echo.Sync.Extent.toPixels(g));this.renderButtonText(b.tdElements[0],h);this.iconImg=this.renderButtonIcon(b.tdElements[1],d);this._stateElement=this._renderButtonState(b.tdElements[2]);this.div.appendChild(b.tableElement)}}}},renderDispose:function(a){Echo.Sync.Button.prototype.renderDispose.call(this,a);
if(this._stateElement){Core.Web.Event.removeAll(this._stateElement);this._stateElement=null}},_renderButtonState:function(a){var c=this.getStateIcon();var b;if(c){b=document.createElement("img");Echo.Sync.ImageReference.renderImg(c,b)}else{b=document.createElement("input");b.type=this.inputType;if(this.inputType=="radio"){b.name="__echo_"+Echo.Sync.RadioButton._nextNameId++}b.defaultChecked=this._selected?true:false;Core.Web.Event.add(b,"change",Core.method(this,this._processStateChange),false);Core.Web.Event.add(this.div,"click",Core.method(this,this._processStateChange),false)}a.appendChild(b);var d=this.component.render("stateAlignment");if(d){Echo.Sync.Alignment.render(d,a,true,this.component)}return b},setPressedState:function(a){Echo.Sync.Button.prototype.setPressedState.call(this,a);var c=this.getStateIcon(false,a);if(c){var b=Echo.Sync.ImageReference.getUrl(c);if(this._stateElement.src!=b){this._stateElement.src=b}}},setRolloverState:function(a){Echo.Sync.Button.prototype.setRolloverState.call(this,a);
var c=this.getStateIcon(a,false);if(c){var b=Echo.Sync.ImageReference.getUrl(c);if(this._stateElement.src!=b){this._stateElement.src=b}}},setSelected:function(a){if(this._selected==a){return}this._selected=a;this.component.set("selected",a);this._updateStateElement()},_updateStateElement:function(){var a=this.getStateIcon();if(a){this._stateElement.src=Echo.Sync.ImageReference.getUrl(a)}else{this._stateElement.checked=this._selected?true:false}}});Echo.Sync.CheckBox=Core.extend(Echo.Sync.ToggleButton,{$load:function(){Echo.Render.registerPeer("CheckBox",this)},inputType:"checkbox"});Echo.Sync.RadioButton=Core.extend(Echo.Sync.ToggleButton,{$static:{_nextNameId:0,_groups:new Core.Arrays.LargeMap()},$load:function(){Echo.Render.registerPeer("RadioButton",this)},inputType:"radio",_group:null,doAction:function(){if(this._group){this._group.deselect()}Echo.Sync.ToggleButton.prototype.doAction.call(this)},renderAdd:function(d,a){var b=this.component.render("group");if(b!=null){var c=Echo.Sync.RadioButton._groups.map[b];
if(!c){c=new Echo.Sync.RadioButton.Group(b);Echo.Sync.RadioButton._groups.map[b]=c}c.add(this);this._group=c}Echo.Sync.ToggleButton.prototype.renderAdd.call(this,d,a)},renderDispose:function(a){Echo.Sync.ToggleButton.prototype.renderDispose.call(this,a);if(this._group){this._group.remove(this);if(this._group.size()===0){Echo.Sync.RadioButton._groups.remove(this._group.id)}this._group=null}}});Echo.Sync.RadioButton.Group=Core.extend({id:null,_buttons:null,$construct:function(a){this.id=a;this._buttons=[]},add:function(a){this._buttons.push(a)},deselect:function(){for(var a=0;a<this._buttons.length;++a){this._buttons[a].setSelected(false)}},remove:function(b){var c=-1;for(var a=0;a<this._buttons.length;++a){if(this._buttons[a]==b){c=a;break}}if(c==-1){throw new Error("No such button: "+b.component.renderId)}if(this._buttons.length==1){this._buttons=[]}else{this._buttons[c]=this._buttons[this._buttons.length-1];this._buttons.length=this._buttons.length-1}},size:function(){return this._buttons.length
}});Echo.Sync.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)}},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){if(!this._div){this._div=document.createElement("div");b.appendChild(this._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)},_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)}});if(!Core.get(window,["WebKit"])){Core.set(window,["WebKit"],{})}WebKit=Core.extend({$static:{hasWebKit:false,hasMobileWebKit:false,isIPhone:false,isIPod:false,isIPad:false,isMobile:false,isPhone:false,isFullScreen:false,hasLocalStorage:false,usesPlaceholder:false,usesMozStyles:false,setBackgroundColor:function(a){var b=document.getElementsByTagName("body")[0].style;
b.backgroundImage="";b.backgroundRepeat="";b.backgroundColor=a},setBackgroundImage:function(a,c){var b=document.getElementsByTagName("body")[0].style;b.backgroundImage=a;b.backgroundRepeat=(c)?c:"repeat";b.backgroundColor=""},scrollToTop:function(){window.scrollTo(0,1)},isLandscape:function(){return(window.orientation==90)||(window.orientation==-90)},addDialog:function(b){var a=document.getElementsByTagName("body")[0];a.appendChild(b)}},$load:function(){var b=navigator.userAgent;this.hasWebKit=RegExp(" AppleWebKit/").test(b);this.isMobile=RegExp(" Mobile/").test(b);this.hasMobileWebKit=this.hasWebKit&&this.isMobile;this.isIPhone=RegExp("iPhone;").test(b)||RegExp("iPhone Simulator;").test(b);this.isIPod=RegExp("iPod;").test(b);this.isIPad=this.isMobile&&this.hasWebKit&&!(this.isIPhone||this.isIPod);this.isPhone=this.isIPhone;this.isFullScreen=!!window.navigator.standalone;this.hasLocalStorage=!!window.localStorage;var a=document.createElement("input");this.usesPlaceholder=("placeholder" in a);
this.usesMozStyles=RegExp(" Firefox/3").test(b)}});if(!Core.get(window,["WebKit","Sync"])){Core.set(window,["WebKit","Sync"],{})}WebKit.TopBar=Core.extend(Echo.Column,{$load:function(){Echo.ComponentFactory.registerType("WebKit.TopBar",this)},componentType:"WebKit.TopBar",title:null,setTitle:function(a){if(this.title===null){this.title=new WebKit.Title({text:a});this.add(this.title)}else{this.title.set("text",a)}}});WebKit.Sync.TopBar=Core.extend(Echo.Sync.Column,{$load:function(){Echo.Render.registerPeer("WebKit.TopBar",this)},$construct:function(){Echo.Sync.Column.call(this)},renderAdd:function(b,a){Echo.Sync.Column.prototype.renderAdd.call(this,b,a);this.element.className="WebKit-topbar"}});WebKit.Title=Core.extend(Echo.Column,{$load:function(){Echo.ComponentFactory.registerType("WebKit.Title",this)},componentType:"WebKit.Title"});WebKit.Sync.Title=Core.extend(Echo.Sync.Column,{_titleDiv:null,$load:function(){Echo.Render.registerPeer("WebKit.Title",this)},$construct:function(){Echo.Sync.Column.call(this)
},renderAdd:function(b,a){Echo.Sync.Column.prototype.renderAdd.call(this,b,a);this.element.className="title";this.renderUpdate(b)},renderUpdate:function(b){Core.Web.DOM.removeAllChildren(this.element);var a=document.createTextNode(this.component.render("text",""));this.element.appendChild(a);return false}});WebKit.NavigationBar=Core.extend(Echo.Column,{$load:function(){Echo.ComponentFactory.registerType("WebKit.NavigationBar",this)},componentType:"WebKit.NavigationBar"});WebKit.Sync.NavigationBar=Core.extend(Echo.Sync.Column,{$load:function(){Echo.Render.registerPeer("WebKit.NavigationBar",this)},$construct:function(){Echo.Sync.Column.call(this)},renderAdd:function(b,a){Echo.Sync.Column.prototype.renderAdd.call(this,b,a);this.element.className="WebKit-navigationbar"}});WebKit.NavigationButton=Core.extend(Echo.Button,{$abstract:true,$load:function(){Echo.ComponentFactory.registerType("WebKit.NavigationButton",this)},componentType:"WebKit.NavigationButton"});WebKit.Sync.NavigationButton=Core.extend(Echo.Sync.Button,{$load:function(){Echo.Render.registerPeer("WebKit.NavigationButton",this)
},renderContent:function(){var c=this.component.render("text");var a=this.component.render("icon");var b=this.component.render("pressed",false);if(a){this.iconImg=this.renderButtonIcon(this.div,a);this.iconImg.style.marginTop="4px"}if(c){this._textElement=document.createElement("span");this._textElement.appendChild(document.createTextNode(c));this.div.appendChild(this._textElement)}this.div.className=(b)?"pressed ":""}});WebKit.LeftButton=Core.extend(WebKit.NavigationButton,{$load:function(){Echo.ComponentFactory.registerType("WebKit.LeftButton",this)},componentType:"WebKit.LeftButton"});WebKit.Sync.LeftButton=Core.extend(WebKit.Sync.NavigationButton,{$load:function(){Echo.Render.registerPeer("WebKit.LeftButton",this)},renderContent:function(){WebKit.Sync.NavigationButton.prototype.renderContent.call(this);this.div.className+="WebKit-leftbutton";var a=this.div.style;a.cssFloat="left"}});WebKit.RightButton=Core.extend(WebKit.NavigationButton,{$load:function(){Echo.ComponentFactory.registerType("WebKit.RightButton",this)
},componentType:"WebKit.RightButton"});WebKit.Sync.RightButton=Core.extend(WebKit.Sync.NavigationButton,{$load:function(){Echo.Render.registerPeer("WebKit.RightButton",this)},renderContent:function(){WebKit.Sync.NavigationButton.prototype.renderContent.call(this);this.div.className+="WebKit-rightbutton";var a=this.div.style;a.cssFloat="right"}});WebKit.LeftNav=Core.extend(WebKit.NavigationButton,{$load:function(){Echo.ComponentFactory.registerType("WebKit.LeftNav",this)},componentType:"WebKit.LeftNav"});WebKit.Sync.LeftNav=Core.extend(WebKit.Sync.NavigationButton,{$load:function(){Echo.Render.registerPeer("WebKit.LeftNav",this)},renderContent:function(){WebKit.Sync.NavigationButton.prototype.renderContent.call(this);this.div.className="WebKit-leftnav";var a=this.div.style;a.cssFloat="left"}});WebKit.LeftLink=Core.extend(WebKit.NavigationButton,{$load:function(){Echo.ComponentFactory.registerType("WebKit.LeftLink",this)},componentType:"WebKit.LeftLink"});WebKit.Sync.LeftLink=Core.extend(WebKit.Sync.NavigationButton,{$load:function(){Echo.Render.registerPeer("WebKit.LeftLink",this)
},renderContent:function(){WebKit.Sync.NavigationButton.prototype.renderContent.call(this);this.div.className="WebKit-leftlink";var a=this.div.style;a.cssFloat="left"}});WebKit.RightNav=Core.extend(WebKit.NavigationButton,{$load:function(){Echo.ComponentFactory.registerType("WebKit.RightNav",this)},componentType:"WebKit.RightNav"});WebKit.Sync.RightNav=Core.extend(WebKit.Sync.NavigationButton,{$load:function(){Echo.Render.registerPeer("WebKit.RightNav",this)},renderContent:function(){WebKit.Sync.NavigationButton.prototype.renderContent.call(this);this.div.className="WebKit-rightnav";var a=this.div.style;a.cssFloat="right"}});WebKit.RightLink=Core.extend(WebKit.NavigationButton,{$load:function(){Echo.ComponentFactory.registerType("WebKit.RightLink",this)},componentType:"WebKit.RightLink"});WebKit.Sync.RightLink=Core.extend(WebKit.Sync.NavigationButton,{$load:function(){Echo.Render.registerPeer("WebKit.RightLink",this)},renderContent:function(){WebKit.Sync.NavigationButton.prototype.renderContent.call(this);
this.div.className="WebKit-rightlink";var a=this.div.style;a.cssFloat="right"}});WebKit.Box=Core.extend(Echo.Column,{$load:function(){Echo.ComponentFactory.registerType("WebKit.Box",this)},componentType:"WebKit.Box"});WebKit.Sync.Box=Core.extend(Echo.Sync.Column,{$load:function(){Echo.Render.registerPeer("WebKit.Box",this)},$construct:function(){Echo.Sync.Column.call(this)},renderAdd:function(c,a){Echo.Sync.Column.prototype.renderAdd.call(this,c,a);var b=this.component.render("background","#ffffff");this.element.style.backgroundColor=b;this.element.className="WebKit-box"}});WebKit.RoundedBox=Core.extend(WebKit.Box,{$load:function(){Echo.ComponentFactory.registerType("WebKit.RoundedBox",this)},componentType:"WebKit.RoundedBox"});WebKit.Sync.RoundedBox=Core.extend(WebKit.Sync.Box,{$load:function(){Echo.Render.registerPeer("WebKit.RoundedBox",this)},$construct:function(){WebKit.Sync.Box.call(this)},renderAdd:function(b,a){WebKit.Sync.Box.prototype.renderAdd.call(this,b,a);this.element.className="WebKit-roundedbox"
}});WebKit.GroupBox=Core.extend(WebKit.Box,{$load:function(){Echo.ComponentFactory.registerType("WebKit.GroupBox",this)},componentType:"WebKit.GroupBox"});WebKit.Sync.GroupBox=Core.extend(WebKit.Sync.Box,{$load:function(){Echo.Render.registerPeer("WebKit.GroupBox",this)},$construct:function(){WebKit.Sync.Box.call(this)},renderAdd:function(d,a){Echo.Sync.Column.prototype.renderAdd.call(this,d,a);var c=this.component.render("borderTop",false);var b=this.component.render("borderBottom",false);this.element.style.borderTop=(c)?"1px solid #878787":"";this.element.style.borderBottom=(b)?"1px solid #878787":"";this.element.className="WebKit-groupbox"}});WebKit.TextBox=Core.extend(Echo.Component,{$load:function(){Echo.ComponentFactory.registerType("WebKit.TextBox",this)},componentType:"WebKit.TextBox"});WebKit.Sync.TextBox=Core.extend(Echo.Render.ComponentSync,{divElement:null,headerDiv:null,htmlDiv:null,$load:function(){Echo.Render.registerPeer("WebKit.TextBox",this)},renderAdd:function(b,a){this.divElement=a;
this.divElement.id=this.component.renderId;this.divElement.className="WebKit-textbox";this.headerDiv=document.createElement("div");this.headerDiv.className="header";this.htmlDiv=document.createElement("div");this.htmlDiv.className="html";this.divElement.appendChild(this.headerDiv);this.divElement.appendChild(this.htmlDiv);this.renderUpdate(b)},renderUpdate:function(b){this.htmlDiv.innerHTML=this.component.render("text","");var a=this.component.render("header");if(a){Core.Web.DOM.removeAllChildren(this.headerDiv);this.headerDiv.appendChild(document.createTextNode(a))}return false},renderDispose:function(a){delete this.divElement}});WebKit.Heading=Core.extend(Echo.Label,{$load:function(){Echo.ComponentFactory.registerType("WebKit.Heading",this)},componentType:"WebKit.Heading",setText:function(a){this.set("text",a)}});WebKit.Sync.Heading=Core.extend(Echo.Sync.Label,{$load:function(){Echo.Render.registerPeer("WebKit.Heading",this)},renderAdd:function(b,a){Echo.Sync.Label.prototype.renderAdd.call(this,b,a);
a.className="WebKit-heading"}});WebKit.GroupTitle=Core.extend(Echo.Label,{$load:function(){Echo.ComponentFactory.registerType("WebKit.GroupTitle",this)},componentType:"WebKit.GroupTitle"});WebKit.Sync.GroupTitle=Core.extend(Echo.Sync.Label,{$load:function(){Echo.Render.registerPeer("WebKit.GroupTitle",this)},renderAdd:function(b,a){Echo.Sync.Label.prototype.renderAdd.call(this,b,a);a.className="WebKit-groupTitle"}});WebKit.Menu=Core.extend(Echo.Button,{$load:function(){Echo.ComponentFactory.registerType("WebKit.Menu",this)},componentType:"WebKit.Menu"});WebKit.Sync.Menu=Core.extend(Echo.Sync.Button,{$load:function(){Echo.Render.registerPeer("WebKit.Menu",this)},renderContent:function(){var j=this.component.render("text");var f=this.component.render("icon");var d=this.component.render("comment");var i=this.component.render("arrow",true);var a=this.component.render("borderTop",false);var e=this.component.render("borderBottom",true);var b;if(f){b=document.createElement("img");Echo.Sync.ImageReference.renderImg(f,b);
b.className="icon";this.div.appendChild(b)}this._textElement=document.createElement("span");this._textElement.className="name";this._textElement.appendChild(document.createTextNode(j));this.div.appendChild(this._textElement);if(d){var g=document.createElement("span");g.className="comment";g.appendChild(document.createTextNode(d));this.div.appendChild(g)}if(i){var h=document.createElement("span");var c=document.createElement("img");b=this.client.getResourceUrl("WebKit","images/arrow.png");Echo.Sync.ImageReference.renderImg(b,c);h.appendChild(c);h.className="arrow";this.div.appendChild(h)}this.div.style.borderTop=(a)?"1px solid #878787":"";this.div.style.borderBottom=(e)?"1px solid #878787":"";this.div.className="WebKit-menu"}});WebKit.Footer=Core.extend(Echo.Label,{$load:function(){Echo.ComponentFactory.registerType("WebKit.Footer",this)},componentType:"WebKit.Footer"});WebKit.Sync.Footer=Core.extend(Echo.Sync.Label,{$load:function(){Echo.Render.registerPeer("WebKit.Footer",this)},renderAdd:function(f,a){a.className="WebKit-footer";
var e=this.component.render("text","");var c=this.component.render("url");var d=document.createTextNode(e);if(c){var b=document.createElement("a");b.href=c;b.appendChild(d);a.appendChild(b)}else{a.appendChild(d)}}});WebKit.BigTextField=Core.extend(Echo.TextField,{$load:function(){Echo.ComponentFactory.registerType("WebKit.BigTextField",this)},componentType:"WebKit.BigTextField"});WebKit.Sync.BigTextField=Core.extend(Echo.Sync.TextField,{$load:function(){Echo.Render.registerPeer("WebKit.BigTextField",this)},renderAdd:function(f,a){Echo.Sync.TextField.prototype.renderAdd.call(this,f,a);var c=this.component.render("type",this._type);var e=this.component.render("borderTop",false);var b=this.component.render("borderBottom",true);var d=this.component.get("placeholder");if(!!d){this.input.setAttribute("placeholder",d)}a.className="WebKit-bigfield";this.input.setAttribute("type",c);a.style.borderTop=(e)?"1px solid #878787":"";a.style.borderBottom=(b)?"1px solid #878787":""}});WebKit.BigPasswordField=Core.extend(WebKit.BigTextField,{$load:function(){Echo.ComponentFactory.registerType("WebKit.BigPasswordField",this)
},componentType:"WebKit.BigPasswordField"});WebKit.Sync.BigPasswordField=Core.extend(WebKit.Sync.BigTextField,{_type:"password",$load:function(){Echo.Render.registerPeer("WebKit.BigPasswordField",this)}});WebKit.TextField=Core.extend(Echo.TextField,{$load:function(){Echo.ComponentFactory.registerType("WebKit.TextField",this)},componentType:"WebKit.TextField"});WebKit.Sync.TextField=Core.extend(Echo.Sync.TextField,{$load:function(){Echo.Render.registerPeer("WebKit.TextField",this)},renderAdd:function(h,a){var e=this.component.render("type",this._type);var g=this.component.render("borderTop",false);var c=this.component.render("borderBottom",true);var b=this.component.get("label");if(b){var d=document.createElement("span");d.className="label";d.appendChild(document.createTextNode(b));a.appendChild(d)}a.className="WebKit-narrow";Echo.Sync.TextField.prototype.renderAdd.call(this,h,a);var f=this.component.get("placeholder");if(!!f){this.input.setAttribute("placeholder",f)}a.style.borderTop=(g)?"1px solid #878787":"";
a.style.borderBottom=(c)?"1px solid #878787":""}});WebKit.PasswordField=Core.extend(WebKit.TextField,{$load:function(){Echo.ComponentFactory.registerType("WebKit.PasswordField",this)},componentType:"WebKit.PasswordField"});WebKit.Sync.PasswordField=Core.extend(WebKit.Sync.TextField,{_type:"password",$load:function(){Echo.Render.registerPeer("WebKit.PasswordField",this)}});WebKit.CheckBox=Core.extend(Echo.CheckBox,{$load:function(){Echo.ComponentFactory.registerType("WebKit.CheckBox",this)},componentType:"WebKit.CheckBox"});WebKit.Sync.CheckBox=Core.extend(Echo.Sync.CheckBox,{$load:function(){Echo.Render.registerPeer("WebKit.CheckBox",this)},renderContent:function(){this.component.set("stateIcon","./lib/WebKit/images/checkbox.png");this.component.set("selectedStateIcon","./lib/WebKit/images/checkbox-Selected.png");var c=this.component.render("text");var e=this.component.render("borderTop",false);var a=this.component.render("borderBottom",true);var d=document.createElement("div");d.className="WebKit-togglebutton";
if(c){var b=document.createElement("span");b.className="label";b.appendChild(document.createTextNode(c));d.appendChild(b)}this.div.style.borderTop=(e)?"1px solid #878787":"";this.div.style.borderBottom=(a)?"1px solid #878787":"";this._stateElement=this._renderButtonState(d);this.div.appendChild(d)}});WebKit.RadioButton=Core.extend(Echo.RadioButton,{$load:function(){Echo.ComponentFactory.registerType("WebKit.RadioButton",this)},componentType:"WebKit.RadioButton"});WebKit.Sync.RadioButton=Core.extend(Echo.Sync.RadioButton,{$load:function(){Echo.Render.registerPeer("WebKit.RadioButton",this)},renderContent:function(){this.component.set("stateIcon","./lib/WebKit/images/checkmark-off.png");this.component.set("selectedStateIcon","./lib/WebKit/images/checkmark-on.png");var c=this.component.render("text");var e=this.component.render("borderTop",false);var a=this.component.render("borderBottom",true);var d=document.createElement("div");d.className="WebKit-togglebutton";if(c){var b=document.createElement("span");
b.className="label";b.appendChild(document.createTextNode(c));d.appendChild(b)}this.div.style.borderTop=(e)?"1px solid #878787":"";this.div.style.borderBottom=(a)?"1px solid #878787":"";this._stateElement=this._renderButtonState(d);this.div.appendChild(d)}});WebKit.SelectField=Core.extend(Echo.SelectField,{$load:function(){Echo.ComponentFactory.registerType("WebKit.SelectField",this)},componentType:"WebKit.SelectField"});WebKit.Sync.SelectField=Core.extend(Echo.Sync.SelectField,{selectedSpan:null,arrowSpan:null,$load:function(){Echo.Render.registerPeer("WebKit.SelectField",this)},renderAdd:function(e,a){Echo.Sync.SelectField.prototype.renderAdd.call(this,e,a);this._div.className="WebKit-selectfield";this.selectedSpan=document.createElement("span");this.selectedSpan.className="select";var c=this._getSelection();var b=this.component.get("items");var d=(b[c].text)?b[c].text:b[c].toString();this.selectedSpan.appendChild(document.createTextNode(d));this._div.appendChild(this.selectedSpan);this.arrowSpan=document.createElement("span");
this.arrowSpan.className="arrow";this._div.appendChild(this.arrowSpan)},renderUpdate:function(a){this._div.removeChild(this.selectedSpan);this._div.removeChild(this.arrowSpan);Echo.Sync.SelectField.prototype.renderUpdate.call(this,a);return false},renderDispose:function(a){Echo.Sync.SelectField.prototype.renderDispose.call(this,a)}});WebKit.TextArea=Core.extend(Echo.TextArea,{$load:function(){Echo.ComponentFactory.registerType("WebKit.TextArea",this)},componentType:"WebKit.TextArea"});WebKit.Sync.TextArea=Core.extend(Echo.Sync.TextArea,{$load:function(){Echo.Render.registerPeer("WebKit.TextArea",this)},renderAdd:function(b,a){Echo.Sync.TextArea.prototype.renderAdd.call(this,b,a);a.className="WebKit-textarea"}});WebKit.Button=Core.extend(Echo.Button,{$load:function(){Echo.ComponentFactory.registerType("WebKit.Button",this)},componentType:"WebKit.Button"});WebKit.Sync.Button=Core.extend(Echo.Sync.Button,{$load:function(){Echo.Render.registerPeer("WebKit.Button",this)},renderContent:function(){var c=this.component.render("text");
var d=this.component.render("borderTop",false);var a=this.component.render("borderBottom",true);this._textElement=document.createElement("span");this._textElement.className="name";this._textElement.appendChild(document.createTextNode(c));this.div.appendChild(this._textElement);var b=this.div.style;b.borderTop=(d)?"1px solid #878787":"";b.borderBottom=(a)?"1px solid #878787":"";this.div.className="WebKit-button"}});WebKit.GlassButton=Core.extend(WebKit.Button,{$load:function(){Echo.ComponentFactory.registerType("WebKit.GlassButton",this)},componentType:"WebKit.GlassButton"});WebKit.Sync.GlassButton=Core.extend(WebKit.Sync.Button,{$load:function(){Echo.Render.registerPeer("WebKit.GlassButton",this)},renderContent:function(){var g=this.component.render("text");var f=this.component.render("glass");var c=this.component.render("anchor");var e=document.createTextNode(g);if(c){var b=document.createElement("a");b.href=c;b.appendChild(e);this._textElement=document.createElement("span");this._textElement.className="name";
this._textElement.appendChild(b)}else{this._textElement=document.createElement("span");this._textElement.className="name";this._textElement.appendChild(e)}var d=document.createElement("span");d.className=f;this.div.appendChild(d);d.appendChild(this._textElement);this.div.className="WebKit-glassbutton"}});WebKit.ActionSheet=Core.extend(Echo.Column,{$load:function(){Echo.ComponentFactory.registerType("WebKit.ActionSheet",this)},componentType:"WebKit.ActionSheet"});WebKit.Sync.ActionSheet=Core.extend(Echo.Sync.Column,{$load:function(){Echo.Render.registerPeer("WebKit.ActionSheet",this)},$construct:function(){Echo.Sync.Column.call(this)},renderAdd:function(b,a){Echo.Sync.Column.prototype.renderAdd.call(this,b,a);this.element.className="popup confirm-screen"}});WebKit.StaticImage=Core.extend(Echo.Component,{$load:function(){Echo.ComponentFactory.registerType("WebKit.StaticImage",this)},componentType:"WebKit.StaticImage",focusable:false});WebKit.Sync.StaticImage=Core.extend(Echo.Render.ComponentSync,{$load:function(){Echo.Render.registerPeer("WebKit.StaticImage",this)
},$virtual:{_divElement:null,_imgElement:null,_imageReference:null},renderAdd:function(b,a){this._divElement=document.createElement("div");this._divElement.id=this.component.renderId;a.appendChild(this._divElement);this.renderUpdate(b)},renderUpdate:function(b){Core.Web.DOM.removeAllChildren(this._divElement);var a=this.component.render("imageReference",null);if(a){this._imgElement=document.createElement("img");Echo.Sync.ImageReference.renderImg(a,this._imgElement);this._divElement.appendChild(this._imgElement)}this._divElement.className="logo";return false},renderDispose:function(a){this._divElement=null;this._imgElement=null}});
/*
 * Modernizr JavaScript library 1.0c
 * http://modernizr.com/
 *
 * Copyright (c) 2009 Faruk Ates - http://farukat.es/
 * Licensed under the MIT license.
 * http://modernizr.com/license/
 *
 * Featuring major contributions by
 * Paul Irish  - http://paulirish.com
 * Ben Alman   - http://benalman.com/
 */
window.Modernizr=(function(){var ret={},enableHTML5=true,enableNoClasses=true,fontfaceCheckDelay=50,doc=document,docElement=doc.documentElement,m=doc.createElement("modernizr"),m_style=m.style,f=doc.createElement("input"),canvas="canvas",canvastext="canvastext",rgba="rgba",hsla="hsla",multiplebgs="multiplebgs",borderimage="borderimage",borderradius="borderradius",boxshadow="boxshadow",opacity="opacity",cssanimations="cssanimations",csscolumns="csscolumns",cssgradients="cssgradients",cssreflections="cssreflections",csstransforms="csstransforms",csstransforms3d="csstransforms3d",csstransitions="csstransitions",fontface="fontface",geolocation="geolocation",video="video",audio="audio",inputtypes="inputtypes",background="background",backgroundColor=background+"Color",canPlayType="canPlayType",tests={},inputs={},elems,elem,i,feature,classes=[];
function set_css(str){m_style.cssText=str}function set_css_all(str1,str2){str1+=";";return set_css(str1+"-webkit-"+str1+"-moz-"+str1+"-o-"+str1+"-ms-"+str1+(str2||""))}function contains(str,substr){return str.indexOf(substr)!==-1}function test_props(props,callback){for(var i in props){if(m_style[props[i]]!==undefined&&(!callback||callback(props[i]))){return true}}}function test_props_all(prop,callback){var uc_prop=prop.replace(/./,function(a){return a.toUpperCase()}),props=[prop,"webkit"+uc_prop,"Moz"+uc_prop,"moz"+uc_prop,"o"+uc_prop,"ms"+uc_prop];return !!test_props(props,callback)}tests[canvas]=function(){return !!doc.createElement(canvas).getContext};tests[canvastext]=function(){return !!(tests[canvas]()&&typeof doc.createElement(canvas).getContext("2d").fillText=="function")};tests[geolocation]=function(){return !!navigator.geolocation};tests[rgba]=function(){set_css(background+"-color:rgba(150,255,150,.5)");return contains(m_style[backgroundColor],rgba)};tests[hsla]=function(){set_css(background+"-color:hsla(120,40%,100%,.5)");
return contains(m_style[backgroundColor],rgba)};tests[multiplebgs]=function(){set_css(background+":url(m.png),url(a.png),#f99 url(m.png)");return/(url\s*\(.*?){3}/.test(m_style[background])};tests[borderimage]=function(){set_css_all("border-image:url(m.png) 1 1 stretch");return test_props_all("borderImage")};tests[borderradius]=function(){set_css_all("border-radius:10px");return test_props_all("borderRadius","",function(prop){return contains(prop,"orderRadius")})};tests[boxshadow]=function(){set_css_all("box-shadow:#000 1px 1px 3px");return test_props_all("boxShadow")};tests[opacity]=function(){set_css("opacity:.5");return contains(m_style[opacity],"0.5")};tests[cssanimations]=function(){set_css_all('animation:"animate" 2s ease 2',"position:relative");return test_props_all("animationName")};tests[csscolumns]=function(){set_css_all("column-count:3");return test_props_all("columnCount")};tests[cssgradients]=function(){var str1=background+"-image:",str2="gradient(linear,left top,right bottom,from(#9f9),to(white));";
set_css(str1+str2+str1+"-webkit-"+str2+str1+"-moz-"+str2+str1+"-o-"+str2+str1+"-ms-"+str2);return contains(m_style.backgroundImage,"gradient")};tests[cssreflections]=function(){set_css_all("box-reflect:right 1px");return test_props_all("boxReflect")};tests[csstransforms]=function(){set_css_all("transform:rotate(3deg)");return !!test_props(["transformProperty","webkitTransform","MozTransform","mozTransform","oTransform","msTransform"])};tests[csstransforms3d]=function(){set_css_all("perspective:500");return !!test_props(["perspectiveProperty","webkitPerspective","MozPerspective","mozPerspective","oPerspective","msPerspective"])};tests[csstransitions]=function(){set_css_all("transition:all .5s linear");return test_props_all("transitionProperty")};tests[fontface]=(function(){var fontret;if(!(!
/*@cc_on@if(@_jscript_version>=5)!@end@*/
0)){fontret=true}else{var st=doc.createElement("style"),spn=doc.createElement("span"),wid,nwid,isFakeBody=false,body=doc.body,callback,isCallbackCalled;st.textContent="@font-face{font-family:testfont;src:url('data:font/ttf;base64,AAEAAAAMAIAAAwBAT1MvMliohmwAAADMAAAAVmNtYXCp5qrBAAABJAAAANhjdnQgACICiAAAAfwAAAAEZ2FzcP//AAMAAAIAAAAACGdseWYv5OZoAAACCAAAANxoZWFk69bnvwAAAuQAAAA2aGhlYQUJAt8AAAMcAAAAJGhtdHgGDgC4AAADQAAAABRsb2NhAIQAwgAAA1QAAAAMbWF4cABVANgAAANgAAAAIG5hbWUgXduAAAADgAAABPVwb3N03NkzmgAACHgAAAA4AAECBAEsAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAMDAAAAAAAAgAACbwAAAAoAAAAAAAAAAFBmRWQAAAAgqS8DM/8zAFwDMwDNAAAABQAAAAAAAAAAAAMAAAADAAAAHAABAAAAAABGAAMAAQAAAK4ABAAqAAAABgAEAAEAAgAuqQD//wAAAC6pAP///9ZXAwAAAAAAAAACAAAABgBoAAAAAAAvAAEAAAAAAAAAAAAAAAAAAAABAAIAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEACoAAAAGAAQAAQACAC6pAP//AAAALqkA////1lcDAAAAAAAAAAIAAAAiAogAAAAB//8AAgACACIAAAEyAqoAAwAHAC6xAQAvPLIHBADtMrEGBdw8sgMCAO0yALEDAC88sgUEAO0ysgcGAfw8sgECAO0yMxEhESczESMiARDuzMwCqv1WIgJmAAACAFUAAAIRAc0ADwAfAAATFRQWOwEyNj0BNCYrASIGARQGKwEiJj0BNDY7ATIWFX8aIvAiGhoi8CIaAZIoN/43KCg3/jcoAWD0JB4eJPQkHh7++EY2NkbVRjY2RgAAAAABAEH/+QCdAEEACQAANjQ2MzIWFAYjIkEeEA8fHw8QDxwWFhwWAAAAAQAAAAIAAIuYbWpfDzz1AAsEAAAAAADFn9IuAAAAAMWf0i797/8zA4gDMwAAAAgAAgAAAAAAAAABAAADM/8zAFwDx/3v/98DiAABAAAAAAAAAAAAAAAAAAAABQF2ACIAAAAAAVUAAAJmAFUA3QBBAAAAKgAqACoAWgBuAAEAAAAFAFAABwBUAAQAAgAAAAEAAQAAAEAALgADAAMAAAAQAMYAAQAAAAAAAACLAAAAAQAAAAAAAQAhAIsAAQAAAAAAAgAFAKwAAQAAAAAAAwBDALEAAQAAAAAABAAnAPQAAQAAAAAABQAKARsAAQAAAAAABgAmASUAAQAAAAAADgAaAUsAAwABBAkAAAEWAWUAAwABBAkAAQBCAnsAAwABBAkAAgAKAr0AAwABBAkAAwCGAscAAwABBAkABABOA00AAwABBAkABQAUA5sAAwABBAkABgBMA68AAwABBAkADgA0A/tDb3B5cmlnaHQgMjAwOSBieSBEYW5pZWwgSm9obnNvbi4gIFJlbGVhc2VkIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgT3BlbiBGb250IExpY2Vuc2UuIEtheWFoIExpIGdseXBocyBhcmUgcmVsZWFzZWQgdW5kZXIgdGhlIEdQTCB2ZXJzaW9uIDMuYmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhTGlnaHRiYWVjMmE5MmJmZmU1MDMyIC0gc3Vic2V0IG9mIEZvbnRGb3JnZSAyLjAgOiBKdXJhIExpZ2h0IDogMjMtMS0yMDA5YmFlYzJhOTJiZmZlNTAzMiAtIHN1YnNldCBvZiBKdXJhIExpZ2h0VmVyc2lvbiAyIGJhZWMyYTkyYmZmZTUwMzIgLSBzdWJzZXQgb2YgSnVyYUxpZ2h0aHR0cDovL3NjcmlwdHMuc2lsLm9yZy9PRkwAQwBvAHAAeQByAGkAZwBoAHQAIAAyADAAMAA5ACAAYgB5ACAARABhAG4AaQBlAGwAIABKAG8AaABuAHMAbwBuAC4AIAAgAFIAZQBsAGUAYQBzAGUAZAAgAHUAbgBkAGUAcgAgAHQAaABlACAAdABlAHIAbQBzACAAbwBmACAAdABoAGUAIABPAHAAZQBuACAARgBvAG4AdAAgAEwAaQBjAGUAbgBzAGUALgAgAEsAYQB5AGEAaAAgAEwAaQAgAGcAbAB5AHAAaABzACAAYQByAGUAIAByAGUAbABlAGEAcwBlAGQAIAB1AG4AZABlAHIAIAB0AGgAZQAgAEcAUABMACAAdgBlAHIAcwBpAG8AbgAgADMALgBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQBMAGkAZwBoAHQAYgBhAGUAYwAyAGEAOQAyAGIAZgBmAGUANQAwADMAMgAgAC0AIABzAHUAYgBzAGUAdAAgAG8AZgAgAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAASgB1AHIAYQAgAEwAaQBnAGgAdAAgADoAIAAyADMALQAxAC0AMgAwADAAOQBiAGEAZQBjADIAYQA5ADIAYgBmAGYAZQA1ADAAMwAyACAALQAgAHMAdQBiAHMAZQB0ACAAbwBmACAASgB1AHIAYQAgAEwAaQBnAGgAdABWAGUAcgBzAGkAbwBuACAAMgAgAGIAYQBlAGMAMgBhADkAMgBiAGYAZgBlADUAMAAzADIAIAAtACAAcwB1AGIAcwBlAHQAIABvAGYAIABKAHUAcgBhAEwAaQBnAGgAdABoAHQAdABwADoALwAvAHMAYwByAGkAcAB0AHMALgBzAGkAbAAuAG8AcgBnAC8ATwBGAEwAAAAAAgAAAAAAAP+BADMAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAQACAQIAEQt6ZXJva2F5YWhsaQ==')}";
doc.getElementsByTagName("head")[0].appendChild(st);spn.setAttribute("style","font:99px _,serif;position:absolute;visibility:hidden");if(!body){body=docElement.appendChild(doc.createElement(fontface));isFakeBody=true}spn.innerHTML="........";spn.id="fonttest";body.appendChild(spn);wid=spn.offsetWidth;spn.style.font="99px testfont,_,serif";fontret=wid!==spn.offsetWidth;var delayedCheck=function(){fontret=Modernizr[fontface]=wid!==spn.offsetWidth;docElement.className=docElement.className.replace(/(no-)?font.*?\b/,"")+(fontret?" ":" no-")+fontface;callback&&(isCallbackCalled=true)&&callback(fontret);isFakeBody&&setTimeout(function(){body.parentNode.removeChild(body)},50)};setTimeout(delayedCheck,fontfaceCheckDelay)}ret._fontfaceready=function(fn){(isCallbackCalled||fontret)?fn(fontret):(callback=fn)};return function(){return fontret||wid!==spn.offsetWidth}})();tests[video]=function(){return !!doc.createElement(video)[canPlayType]};tests[audio]=function(){return !!doc.createElement(audio)[canPlayType]
};for(feature in tests){if(tests.hasOwnProperty(feature)){classes.push((!(ret[feature]=tests[feature]())&&enableNoClasses?"no-":"")+feature)}}ret[inputtypes]=function(props){for(var i in props){f.setAttribute("type",props[i]);inputs[props[i]]=!!(f.type!=="text")}return inputs}("search tel url email datetime date month week time datetime-local number range color".split(" "));set_css("");m=f=null;if(enableHTML5&&!(!
/*@cc_on!@*/
0)){elems="abbr article aside audio bb canvas datagrid datalist details dialog figure footer header mark menu meter nav output progress section time video".split(" ");i=elems.length+1;while(--i){elem=doc.createElement(elems[i])}elem=null}ret._enableHTML5=enableHTML5;ret._enableNoClasses=enableNoClasses;(function(H,C){H[C]=H[C].replace(/\bno-js\b/,"js")})(docElement,"className");docElement.className+=" "+classes.join(" ");return ret})();Demo=Core.extend(Echo.Application,{$construct:function(){Echo.Application.call(this);Demo.app=this;var a=new Echo.FreeClient(this,document.getElementById("rootArea"));
a.addResourcePath("Echo","lib/echo/");a.addResourcePath("WebKit","lib/WebKit/");a.init();this.setStyleSheet(Demo.StyleSheet);Demo.contentPane=new Demo.ContentPane();Demo.contentPane.loadPage(Demo.Targets.pages.Home);this.rootComponent.add(Demo.contentPane)}});Demo.ContentPane=Core.extend(Echo.Column,{footer:null,$construct:function(){Echo.Column.call(this);var a=Demo.Targets.urls.Echo;this.footer=new WebKit.Footer({text:a.text,url:a.url})},createHomeButton:function(){var a=this;var b=new WebKit.LeftNav({icon:"./lib/WebKit/images/home.png"});b.set("actionCommand",Demo.Targets.pages.Home);b.addListener("action",Core.method(a,a.doAction));return b},doAction:function(a){var b=a.actionCommand;Demo.contentPane.loadPage(b)},loadPage:function(page){if(page.instance===undefined){page.instance=eval("new "+page.className+"()")}if(page.instance.setBackground!==undefined){page.instance.setBackground()}this.removeAll();this.add(page.instance);this.add(this.footer);WebKit.scrollToTop()}});Demo.Home=Core.extend(Echo.Column,{$construct:function(){Echo.Column.call(this);
this.buildTopBar();this.buildUI()},setBackground:function(){WebKit.setBackgroundImage("url('./lib/WebKit/images/background.png')")},buildTopBar:function(){var a=new WebKit.TopBar();a.setTitle("Echo WebKit");this.add(a)},buildUI:function(){var c=new WebKit.RoundedBox();var b=new WebKit.TextBox();b.set("header","Welcome");var a="Welcome to the Echo WebKit Demo site!  <p>";if(!WebKit.isMobile){a+=WebKit.hasWebKit?"Your browser uses <b>WebKit</b>! This should be a nice demo.":"However your browser doesn't use <b>WebKit</b>, so this might not look so good."}if(WebKit.hasMobileWebKit&&!WebKit.isFullScreen){a+="<p>You should consider running this WebApp in <strong>Full Screen Mode</strong>."}a+=WebKit.isIPhone?"<p>You are using an iPhone.</p>":"";a+=WebKit.isIPod?"<p>You are using an iPod Touch.</p>":"";b.set("text",a);c.add(b);if((WebKit.isIPhone||WebKit.isIPod)&&!WebKit.isFullScreen){c.add(this.createMenu("Full Screen Mode","./lib/WebKit/icons/iPhone.png","FullScreen","Cool!",true,false))}c.add(this.createMenu("What's New","./lib/WebKit/icons/help.png","Whats New","",true,false));
this.add(c);this.add(new WebKit.Heading({text:"Features"}));c=new WebKit.RoundedBox();b=new WebKit.TextBox();b.set("text","Here are some examples of the exciting things you can achieve building with Echo WebKit:");c.add(b);this.addMenuItems(c);this.add(c)},addMenuItems:function(a){a.add(this.createMenu("Edge to Edge Lists","./lib/WebKit/icons/contacts.png","Classic Lists","",true));a.add(this.createMenu("Prefixed Lists","./lib/WebKit/icons/other.png","Ordered Lists"));a.add(this.createMenu("Form Support","./lib/WebKit/icons/settings.png","FormSupport"));a.add(this.createMenu("Buttons","./lib/WebKit/icons/calculator.png","Buttons"));a.add(this.createMenu("Static Images","./lib/WebKit/icons/photos.png","Images"));a.add(this.createMenu("Navigation Links & Buttons","icons/yacht-icon.png","Breadcrumbs"));a.add(this.createMenu("Browser Capabilities","./lib/WebKit/icons/safari.png","Browser","Debug",false,false))},createMenu:function(h,g,e,d,f,a){var i=(e!==undefined&&e!==null);var b=(g)?g:null;
var c=new WebKit.Menu({icon:{url:b},text:h,comment:d,arrow:i,borderTop:f,borderBottom:a,actionCommand:Demo.Targets.pages[e]});if(e){c.addListener("action",Core.method(this,Demo.contentPane.doAction))}return c}});Demo.Targets=Core.extend({$static:{pages:{Home:{title:"Echo3 WebKit",className:"Demo.Home"},"Whats New":{title:"What's New!",className:"Demo.ChangeLog"},"Classic Lists":{title:"Classic Lists",className:"Demo.ClassicList"},"Ordered Lists":{title:"Prefixed Lists",className:"Demo.OrderedList"},FullScreen:{title:"Full Screen Mode",className:"Demo.FullScreen"},FormSupport:{title:"Form Support",className:"Demo.FormSupport"},Buttons:{title:"Buttons",className:"Demo.Buttons"},Popups:{title:"Popups",className:"Demo.Popups"},Browser:{title:"Browser",className:"Demo.Browser"},Breadcrumbs:{title:"Bread Crumbs",className:"Demo.Breadcrumbs"},"Nav Buttons":{title:"Nav Buttons",className:"Demo.NavButtons"},Images:{title:"Static Images",className:"Demo.StaticImage"}},urls:{Echo:{text:"Powered by Echo3 from NextApp",url:"http://echo.nextapp.com/site/"}}}});
Demo.ClassicList=Core.extend(Echo.Column,{actionListener:null,$construct:function(){Echo.Column.call(this);this.buildTopBar();this.buildUI()},buildTopBar:function(){var b=new WebKit.TopBar();b.setTitle("Classic List");var a=new WebKit.NavigationBar();a.add(Demo.contentPane.createHomeButton());b.add(a);this.add(b)},buildUI:function(){this.actionListener=Core.method(this,Demo.contentPane.doAction);var a=new WebKit.GroupBox({background:"#ffffff"});a.add(new WebKit.GroupTitle({text:"Navigation",fontSize:"24px",leftPadding:"10px"}));a.add(this.createMenu("Go Home","Home"));a.add(this.createMenu('Go to "What\'s New"',"Whats New"));a.add(new WebKit.GroupTitle({text:"Things to buy at the supermarket:"}));a.add(this.createMenu("Milk",undefined,"./images/milk.jpg"));a.add(this.createMenu("Eggs"));a.add(this.createMenu("Bread"));a.add(this.createMenu("Cheese"));this.add(a)},createMenu:function(b,e,c,g){var d=(e!==undefined);var a=(c===undefined)?null:c;var f=new WebKit.Menu({icon:{url:a},text:b,comment:g,arrow:d});
if(e){f.set("actionCommand",Demo.Targets.pages[e]);f.addListener("action",this.actionListener)}return f}});Demo.ChangeLog=Core.extend(Echo.Column,{actionListener:null,$construct:function(){Echo.Column.call(this);this.setBackground();this.buildTopBar();this.buildUI()},setBackground:function(){WebKit.setBackgroundImage("url('./lib/WebKit/images/background.png')")},buildTopBar:function(){var b=new WebKit.TopBar();b.setTitle("Change Log");var a=new WebKit.NavigationBar();a.add(Demo.contentPane.createHomeButton());b.add(a);this.add(b)},buildUI:function(){var b,a;b="30-May-2010";a=("<ul><li>Added SelectField'</li></ul>");this.addChangeLog(b,a);b="28-Jan-2010";a=("<ul><li>Prefix all CSS classnames with 'WebKit-'</li></ul>");this.addChangeLog(b,a);b="19-Dec-2009";a=("<ul><li>Implement navigation bar components</li><li>Add Bread crumbs demo panel</li><li>Add Navigation buttons demo panel</li></ul>");this.addChangeLog(b,a);b="05-Dec-2009";a=("<ul><li>Using 'Modernizr' JavaScript to detect browser capabilities instead of using browser version</li><li>Created 'Browser Capability' panel</li><li>Add 'Fullscreen Mode' detection; Add suggestion to home screen for iPhone/iPod Touch users</li></ul>");
this.addChangeLog(b,a);b="17-Nov-2009";a=("<ul><li>Implemented TextArea</li><li>Implemented Plain Button</li><li>Implemented Glass Buttons</li><li>Added GroupBox</li></ul>");this.addChangeLog(b,a);b="15-Nov-2009";a=("<ul><li>Started work on form elements</li><li>Implemented BigTextField</li><li>Implemented LabeledTextField</li><li>Implemented Checkboxes</li><li>Implemented RadioButtons</li><li>Implemented SelectField; found Echo bug; deferring development</li></ul>");this.addChangeLog(b,a);b="14-Nov-2009";a=("<ul><li>Implemented actionCommand handler for menu items</li><li>Implemented actionCommand handler for TopBar navigation</li><li>Added Edge-to-Edge demo</li><li>Implemented background color and image</li></ul>");this.addChangeLog(b,a);b="13-Nov-2009";a=("<ul><li>Started Framework based on iWebKit style and icons</li><li>Add TopBar, Navigation and Link buttons</li><li>Implemented RoundedBox and Box</li><li>Implemented TextBox</li><li>Implemented Menu</li><li>Implemented Footer</li></ul>");
this.addChangeLog(b,a)},addChangeLog:function(d,c){var b=new WebKit.RoundedBox();var a=new WebKit.TextBox({header:d,text:c});b.add(a);this.add(b)}});Demo.OrderedList=Core.extend(Echo.Column,{number:1,actionListener:null,$construct:function(){Echo.Column.call(this);this.buildTopBar();this.buildUI()},buildTopBar:function(){var b=new WebKit.TopBar();b.setTitle("Ordered List");var a=new WebKit.NavigationBar();a.add(Demo.contentPane.createHomeButton());b.add(a);this.add(b)},buildUI:function(){this.actionListener=Core.method(this,Demo.contentPane.doAction);this.add(this.createMenu("Home","Go to home screen","Home"));this.add(this.createMenu("Go to What's New",null,"Whats New"));this.add(this.createMenu("Buy Milk","(2 Gallons)"));this.add(this.createMenu("Eggs","(1 Dozen)"));this.add(this.createMenu("Bread"));this.add(this.createMenu("Cheese","(Swiss)"))},createMenu:function(a,e,c){var b=(c===undefined)?false:true;var d=new Extras.PrefixList({prefix:this.number++,text:a,comment:e,arrow:b});if(c){d.set("actionCommand",Demo.Targets.pages[c]);
d.addListener("action",this.actionListener)}return d}});Demo.FullScreen=Core.extend(Echo.Column,{actionListener:null,$construct:function(){Echo.Column.call(this);this.setBackground();this.buildTopBar();this.buildUI()},setBackground:function(){WebKit.setBackgroundImage("url('./lib/WebKit/images/background.png')")},buildTopBar:function(){var b=new WebKit.TopBar();b.setTitle("Full Screen Mode");var a=new WebKit.NavigationBar();a.add(Demo.contentPane.createHomeButton());b.add(a);this.add(b)},buildUI:function(){var b=new WebKit.RoundedBox();var a=new WebKit.TextBox();a.set("header","Full Screen Mode");a.set("text","<p>In order to recover valuable mobile Safari screen space (104 pixels vertical) you should consider adding this application to your home screen.</p><p>Simply tap the large plus '<b>+</b>' button below, then tap 'Add to Home Screen', finally tap 'Add' in the upper right.</p>  <p>Relauch the application by tapping it from your home screen.<p>The mobile Safari Navigation bar which contains the Back &amp; Forward buttons will be gone, as will the location and Google search bar at the top. <p>These areas are not used in AJAX Web applications, in fact, they actually cause problems and can be confusing to the user.<p>It even works in Landscape orientation!");
b.add(a);this.add(b)}});Demo.FormSupport=Core.extend(Echo.Column,{actionListener:null,$construct:function(){Echo.Column.call(this);this.setBackground();this.buildTopBar();this.buildUI()},setBackground:function(){WebKit.setBackgroundImage("url('./lib/WebKit/images/background.png')")},buildTopBar:function(){var b=new WebKit.TopBar();b.setTitle("Form Support");var a=new WebKit.NavigationBar();a.add(Demo.contentPane.createHomeButton());b.add(a);this.add(b)},buildUI:function(){var f,g;var e,c,b,a;f=new WebKit.RoundedBox();g=new WebKit.TextBox();g.set("header","Form Components");g.set("text","These can be used in any page within a &quot;RoundedBox or Box&quot;. Check 'em out!");f.add(g);this.add(f);this.add(new WebKit.Heading({text:"Big TextFields"}));f=new WebKit.RoundedBox();e=new WebKit.BigTextField({placeholder:"Username"});c=new WebKit.BigPasswordField({placeholder:"Password"});f.add(e);f.add(c);this.add(f);this.add(new WebKit.Heading({text:"Labeled TextFields"}));f=new WebKit.RoundedBox();
b=new WebKit.TextField({label:"First Name",placeholder:"Optional"});a=new WebKit.TextField({label:"Last Name",placeholder:"Required"});c=new WebKit.PasswordField({label:"Password",placeholder:"Required"});f.add(b);f.add(a);f.add(c);this.add(f);this.add(new WebKit.Heading({text:"Checkboxes"}));f=new WebKit.RoundedBox();var h=new WebKit.CheckBox({text:"Lettuce"});f.add(h);f.add(new WebKit.CheckBox({text:"Cheese"}));f.add(new WebKit.CheckBox({text:"Pickles",borderBottom:false}));this.add(f);h.set("selected",false);this.add(new WebKit.Heading({text:"Radio Buttons"}));f=new WebKit.RoundedBox();f.add(new WebKit.RadioButton({text:"Plastic",group:"material",selected:true}));f.add(new WebKit.RadioButton({text:"Wood",group:"material"}));f.add(new WebKit.RadioButton({text:"Metal",group:"material",borderBottom:false}));this.add(f);this.add(new WebKit.Heading({text:"Selection boxes"}));f=new WebKit.RoundedBox();var i=new WebKit.SelectField();var d=new Array();d.push({text:"Item One"});d.push({text:"Item Two"});
d.push({text:"Item Three"});i.set("items",d);f.add(i);this.add(f);this.add(new WebKit.Heading({text:"TextArea"}));f=new WebKit.RoundedBox();f.add(new WebKit.TextArea({text:"Free text goes here..."}));this.add(f)}});Demo.FormSupport=Core.extend(Echo.Column,{actionListener:null,$construct:function(){Echo.Column.call(this);this.setBackground();this.buildTopBar();this.buildUI()},setBackground:function(){WebKit.setBackgroundImage("url('./lib/WebKit/images/background.png')")},buildTopBar:function(){var b=new WebKit.TopBar();b.setTitle("Form Support");var a=new WebKit.NavigationBar();a.add(Demo.contentPane.createHomeButton());b.add(a);this.add(b)},buildUI:function(){var f,g;var e,c,b,a;f=new WebKit.RoundedBox();g=new WebKit.TextBox();g.set("header","Form Components");g.set("text","These can be used in any page within a &quot;RoundedBox or Box&quot;. Check 'em out!");f.add(g);this.add(f);this.add(new WebKit.Heading({text:"Big TextFields"}));f=new WebKit.RoundedBox();e=new WebKit.BigTextField({placeholder:"Username"});
c=new WebKit.BigPasswordField({placeholder:"Password"});f.add(e);f.add(c);this.add(f);this.add(new WebKit.Heading({text:"Labeled TextFields"}));f=new WebKit.RoundedBox();b=new WebKit.TextField({label:"First Name",placeholder:"Optional"});a=new WebKit.TextField({label:"Last Name",placeholder:"Required"});c=new WebKit.PasswordField({label:"Password",placeholder:"Required"});f.add(b);f.add(a);f.add(c);this.add(f);this.add(new WebKit.Heading({text:"Checkboxes"}));f=new WebKit.RoundedBox();var h=new WebKit.CheckBox({text:"Lettuce"});f.add(h);f.add(new WebKit.CheckBox({text:"Cheese"}));f.add(new WebKit.CheckBox({text:"Pickles",borderBottom:false}));this.add(f);h.set("selected",false);this.add(new WebKit.Heading({text:"Radio Buttons"}));f=new WebKit.RoundedBox();f.add(new WebKit.RadioButton({text:"Plastic",group:"material",selected:true}));f.add(new WebKit.RadioButton({text:"Wood",group:"material"}));f.add(new WebKit.RadioButton({text:"Metal",group:"material",borderBottom:false}));this.add(f);
this.add(new WebKit.Heading({text:"Selection boxes"}));f=new WebKit.RoundedBox();var i=new WebKit.SelectField();var d=new Array();d.push({text:"Item One"});d.push({text:"Item Two"});d.push({text:"Item Three"});i.set("items",d);f.add(i);this.add(f);this.add(new WebKit.Heading({text:"TextArea"}));f=new WebKit.RoundedBox();f.add(new WebKit.TextArea({text:"Free text goes here..."}));this.add(f)}});Demo.Buttons=Core.extend(Echo.Column,{actionListener:null,$construct:function(){Echo.Column.call(this);this.setBackground();this.buildTopBar();this.buildUI()},setBackground:function(){WebKit.setBackgroundImage("url('./lib/WebKit/images/background.png')")},buildTopBar:function(){var b=new WebKit.TopBar();b.setTitle("Buttons");var a=new WebKit.NavigationBar();a.add(Demo.contentPane.createHomeButton());b.add(a);this.add(b)},buildUI:function(){var g,f;var b,d,e,a;g=new WebKit.RoundedBox();f=new WebKit.TextBox();f.set("header","Buttons");f.set("text","<p>Plain buttons work best enclosed in a box. In most cases, you would probably want to use a 'WebKit.Menu' component instead.");
g.add(f);this.add(g);this.add(new WebKit.Heading({text:"Plain Buttons"}));g=new WebKit.RoundedBox();g.add(new WebKit.Button({text:"Plain Button"}));g.add(new WebKit.Button({text:"Middle Button"}));g.add(new WebKit.Button({text:"Another Button",borderBottom:false}));this.add(g);this.add(new WebKit.Heading({text:"Glass Buttons"}));var c=new WebKit.GroupBox({cellSpacing:"15px"});c.add(new WebKit.GlassButton({text:"Red Button",glass:"red"}));c.add(new WebKit.GlassButton({text:"Green Button",glass:"green"}));c.add(new WebKit.GlassButton({text:"Blue Button",glass:"blue"}));c.add(new WebKit.GlassButton({text:"Yellow Button",glass:"yellow"}));c.add(new WebKit.GlassButton({text:"Gray Button",glass:"gray"}));c.add(new WebKit.GlassButton({text:"Dark Red Button",glass:"darkred"}));c.add(new WebKit.GlassButton({text:"Black Button",glass:"black"}));this.add(c);this.add(new WebKit.Heading({text:"Glass Buttons in a Rounded Box"}));g=new WebKit.RoundedBox({background:"#dddddd",cellSpacing:"15px",insets:"15px 0px"});
g.add(new WebKit.GlassButton({text:"Red Button",glass:"red"}));g.add(new WebKit.GlassButton({text:"Green Button",glass:"green"}));g.add(new WebKit.GlassButton({text:"Blue Button",glass:"blue"}));g.add(new WebKit.GlassButton({text:"Yellow Button",glass:"yellow"}));g.add(new WebKit.GlassButton({text:"Gray Button",glass:"gray"}));g.add(new WebKit.GlassButton({text:"Dark Red Button",glass:"darkred"}));g.add(new WebKit.GlassButton({text:"Black Button",glass:"black"}));this.add(g)}});Demo.Popups=Core.extend(Echo.Column,{actionListener:null,$construct:function(){Echo.Column.call(this);this.setBackground();this.buildTopBar();this.buildUI()},setBackground:function(){WebKit.setBackgroundImage("url('./lib/WebKit/images/background.png')")},buildTopBar:function(){var b=new WebKit.TopBar();b.setTitle("Popup (Action Sheets)");var a=new WebKit.NavigationBar();a.add(Demo.contentPane.createHomeButton());b.add(a);this.add(b)},buildUI:function(){var g,f;var c,d,e,b;g=new WebKit.RoundedBox();f=new WebKit.TextBox();
f.set("header","Popups");f.set("text","<p><b>Popups</b> or more precisely <b>Active Sheets</b>...");g.add(f);this.add(g);g=new WebKit.RoundedBox();g.add(new WebKit.Button({text:"Popup Button"}));this.add(g);var a=new WebKit.ActionSheet();a.add(new WebKit.GlassButton({text:"Red Button",glass:"red"}));a.add(new WebKit.GlassButton({text:"Green Button",glass:"green"}));a.add(new WebKit.GlassButton({text:"Blue Button",glass:"blue"}));this.add(a)}});Demo.Browser=Core.extend(Echo.Column,{orientationTextBox:null,$construct:function(){Echo.Column.call(this);this.setBackground();this.buildTopBar();this.buildUI()},setBackground:function(){WebKit.setBackgroundImage("url('./lib/WebKit/images/background.png')")},buildTopBar:function(){var b=new WebKit.TopBar();b.setTitle("Browser Capability");var a=new WebKit.NavigationBar();a.add(Demo.contentPane.createHomeButton());b.add(a);this.add(b)},buildUI:function(){var b,a;b="User Agent";this.addPost(b,navigator.userAgent);b="Device";a="";a+="Has WebKit: "+WebKit.hasWebKit+"<br>";
a+="Uses MOZ Styles: "+WebKit.usesMozStyles+"<br>";a+="Is mobile device: "+WebKit.isMobile+"<br>";if(WebKit.isMobile){a+="Has Mobile WebKit: "+WebKit.hasMobileWebKit+"<br>";a+="Is iPhone: "+WebKit.isIPhone+"<br>";a+="Is iPod: "+WebKit.isIPod+"<br>";a+="Is iPad: "+WebKit.isIPad+"<br>";a+="Is phone: "+WebKit.isPhone+"<br>"}if(WebKit.hasMobileWebKit){a+="Full Screen Mode: "+WebKit.isFullScreen+"<br>"}this.addPost(b,a);if(WebKit.hasMobileWebKit){b="Orientation";this.orientationTextBox=this.addPost(b,a);this.updateOrientationTextBox();window.onorientationchange=Core.method(this,this.updateOrientationTextBox)}b="JavaScript";a="";a+="Canvas: "+Modernizr.canvas+"<br>";a+="Canvas Text: "+Modernizr.canvastext+"<br>";a+="Audio: "+Modernizr.audio+"<br>";a+="Video: "+Modernizr.video+"<br>";a+="GeoLocation: "+Modernizr.geolocation+"<br>";a+="Local Storage: "+WebKit.hasLocalStorage+"<br>";this.addPost(b,a);b="CSS3 Support";a="";a+="rgba: "+Modernizr.rgba+"<br>";a+="hsla: "+Modernizr.hsla+"<br>";a+="Font Face: "+Modernizr.fontface+"<br>";
a+="Border Image: "+Modernizr.borderimage+"<br>";a+="Border Radius: "+Modernizr.borderradius+"<br>";a+="Box Shadow: "+Modernizr.boxshadow+"<br>";a+="Opacity: "+Modernizr.opacity+"<br>";a+="Animations: "+Modernizr.cssanimations+"<br>";a+="Columns: "+Modernizr.csscolumns+"<br>";a+="Gradients: "+Modernizr.cssgradients+"<br>";a+="Reflections: "+Modernizr.cssreflections+"<br>";a+="Transforms: "+Modernizr.csstransforms+"<br>";a+="Transforms 3D: "+Modernizr.csstransforms3d+"<br>";a+="Transitions: "+Modernizr.csstransitions+"<br>";this.addPost(b,a);b="HTML5 Input Types";a="";a+="JS 'placeholder' attribute: "+WebKit.usesPlaceholder+"<br>";a+="search: "+Modernizr.inputtypes.search+"<br>";a+="tel: "+Modernizr.inputtypes.tel+"<br>";a+="url: "+Modernizr.inputtypes.url+"<br>";a+="email: "+Modernizr.inputtypes.email+"<br>";a+="datetime: "+Modernizr.inputtypes.datetime+"<br>";a+="date: "+Modernizr.inputtypes.date+"<br>";a+="month: "+Modernizr.inputtypes.month+"<br>";a+="week: "+Modernizr.inputtypes.week+"<br>";
a+="time: "+Modernizr.inputtypes.time+"<br>";a+="datetime-local: "+Modernizr.inputtypes["datetime-local"]+"<br>";a+="number: "+Modernizr.inputtypes.number+"<br>";a+="range: "+Modernizr.inputtypes.range+"<br>";a+="color: "+Modernizr.inputtypes.color+"<br>";this.addPost(b,a)},addPost:function(d,c){c=c.replace(/true/g,"Yes");c=c.replace(/false/g,"No");var b=new WebKit.RoundedBox();var a=new WebKit.TextBox({header:d,text:c});b.add(a);this.add(b);return a},updateOrientationTextBox:function(){var a="Orientation: ";if(window.orientation===undefined){a+="Not available"}else{a+=window.orientation+"&deg;<br>";switch(window.orientation){case 0:a+="Now in portrait orientation. Home button on the bottom.";break;case 90:a+="Now in landscape orientation and turned to the left. Home button to the right.";break;case -90:a+="Now in landscape orientation and turned to the right. Home button to the left.";break;case 180:a+="Now in portrait orientation. Home button on the top.";break;default:a=+"Orientation ngle not recognized.";
break}}this.orientationTextBox.set("text",a)}});Demo.StaticImage=Core.extend(Echo.Column,{actionListener:null,$construct:function(){Echo.Column.call(this);this.setBackground();this.buildTopBar();this.buildUI()},setBackground:function(){WebKit.setBackgroundImage("url('./lib/WebKit/images/background.png')")},buildTopBar:function(){var b=new WebKit.TopBar();b.setTitle("Images");var a=new WebKit.NavigationBar();a.add(Demo.contentPane.createHomeButton());b.add(a);this.add(b)},buildUI:function(){var c,b,a;this.add(new WebKit.Heading({text:"From the Internet"}));c=new WebKit.RoundedBox();b=new Echo.Row({height:"100%",layoutData:{alignment:"middle"}});a=new WebKit.StaticImage({imageReference:"http://echo.nextapp.com/site/files/farland_logo.png"});c.add(a);this.add(c);this.add(new WebKit.Heading({text:"From the file store"}));c=new WebKit.RoundedBox();b=new Echo.Row({height:"100%",layoutData:{alignment:"middle"}});a=new WebKit.StaticImage({imageReference:"images/homescreen.png"});c.add(a);this.add(c)
}});Demo.Breadcrumbs=Core.extend(Echo.Column,{theOne:null,topBar:null,navigationBar:null,title:null,count:1,$construct:function(){Echo.Column.call(this);this.setBackground();this.buildTopBar();this.buildUI()},setBackground:function(){WebKit.setBackgroundImage("url('./lib/WebKit/images/background.png')")},buildTopBar:function(){this.topBar=new WebKit.TopBar();this.title=new WebKit.Title({text:"Bread Crumbs"});this.topBar.add(this.title);this.navigationBar=new WebKit.NavigationBar();var a=Demo.contentPane.createHomeButton();this.navigationBar.add(a);this.topBar.add(this.navigationBar);a=new WebKit.RightNav({text:"Nav Buttons"});a.set("actionCommand",Demo.Targets.pages["Nav Buttons"]);a.addListener("action",Core.method(self,Demo.contentPane.doAction));this.navigationBar.add(a);this.add(this.topBar)},buildUI:function(){var b=new WebKit.Button({text:"Add a left text",actionCommand:"left",events:{action:Core.method(this,this.addTextCrumb)}});var c=new WebKit.Button({text:"Add a left icon",actionCommand:"left",events:{action:Core.method(this,this.addIconCrumb)}});
var d=new WebKit.Button({text:"Add a right text",actionCommand:"right",events:{action:Core.method(this,this.addTextCrumb)}});var g=new WebKit.Button({text:"Add a right icon",actionCommand:"right",events:{action:Core.method(this,this.addIconCrumb)}});var a=new WebKit.Button({text:"Toggle Title",events:{action:Core.method(this,this.toggleTitle)}});var f=new WebKit.RoundedBox();f.add(b);f.add(c);f.add(d);f.add(g);f.add(a);var e=new WebKit.TextBox({text:"<p>Bread crumbs can be used to provide a useful navigation trail. As well as provide 'previous' and 'next' navigation buttons.</p><p>'Crumbs' can contain either text for small (20x20) icons. The icon should be a white-ish silhouette for best results.</p><p>Use the buttons above to add a bread crumb, click on a bread crumb to remove it from the chain.</p><p>I can't think of a situation in which a right sided bread crumb trail would be applicable</p>"});f.add(e);this.add(f)},addTextCrumb:function(b){var a=(this.count++%2)?"Hello":"World";this.addCrumb(b.actionCommand,a)
},addIconCrumb:function(a){this.addCrumb(a.actionCommand)},toggleTitle:function(a){if(this.title===null){this.title=new WebKit.Title({text:"Bread Crumbs"});this.topBar.add(this.title)}else{this.topBar.remove(this.title);this.title=null}},addCrumb:function(b,a){var c=(b==="left")?new WebKit.LeftLink():new WebKit.RightLink();if(a!==undefined){c.set("text",a)}else{c.set("icon","./lib/WebKit/images/home.png")}c.addListener("action",Core.method(this,this.removeCrumb));this.navigationBar.add(c)},removeCrumb:function(a){this.navigationBar.remove(a.source)}});Demo.NavButtons=Core.extend(Echo.Column,{theOne:null,topBar:null,navigationBar:null,title:null,count:1,$construct:function(){Echo.Column.call(this);this.setBackground();this.buildTopBar();this.buildUI()},setBackground:function(){WebKit.setBackgroundImage("url('./lib/WebKit/images/background.png')")},buildTopBar:function(){this.topBar=new WebKit.TopBar();this.title=new WebKit.Title({text:"Nav Buttons"});this.topBar.add(this.title);this.navigationBar=new WebKit.NavigationBar();
var a=new WebKit.LeftNav({text:"Back"});a.set("actionCommand",Demo.Targets.pages.Breadcrumbs);a.addListener("action",Core.method(self,Demo.contentPane.doAction));this.navigationBar.add(a);this.topBar.add(this.navigationBar);this.add(this.topBar)},buildUI:function(){var b=new WebKit.Button({text:"Add a left text",actionCommand:"left",events:{action:Core.method(this,this.addTextCrumb)}});var c=new WebKit.Button({text:"Add a left icon",actionCommand:"left",events:{action:Core.method(this,this.addIconCrumb)}});var d=new WebKit.Button({text:"Add a right text",actionCommand:"right",events:{action:Core.method(this,this.addTextCrumb)}});var g=new WebKit.Button({text:"Add a right icon",actionCommand:"right",events:{action:Core.method(this,this.addIconCrumb)}});var a=new WebKit.Button({text:"Toggle Title",events:{action:Core.method(this,this.toggleTitle)}});var f=new WebKit.RoundedBox();f.add(b);f.add(c);f.add(d);f.add(g);f.add(a);var e=new WebKit.TextBox({text:"<p>Navigation buttons appear in the top bar and can also be used for navigation.</p><p>They can also be used like tabs or can be used to hide/show detail on a page.</p>"});
f.add(e);this.add(f)},addTextCrumb:function(b){var a=(this.count++%2)?"Hello":"World";this.addCrumb(b.actionCommand,a)},addIconCrumb:function(a){this.addCrumb(a.actionCommand)},toggleTitle:function(a){if(this.title===null){this.title=new WebKit.Title({text:"Bread Crumbs"});this.topBar.add(this.title)}else{this.topBar.remove(this.title);this.title=null}},addCrumb:function(b,a){var c=(b==="left")?new WebKit.LeftButton():new WebKit.RightButton();if(a!==undefined){c.set("text",a)}else{c.set("icon","./lib/WebKit/images/home.png")}c.addListener("action",Core.method(this,this.removeCrumb));this.navigationBar.add(c)},removeCrumb:function(a){this.navigationBar.remove(a.source)}});if(!Core.get(window,["Extras","Sync"])){Core.set(window,["Extras","Sync"],{})}Extras.PrefixList=Core.extend(Echo.Button,{$load:function(){Echo.ComponentFactory.registerType("Extras.PrefixList",this)},componentType:"Extras.PrefixList"});Extras.Sync.PrefixList=Core.extend(Echo.Sync.Button,{$load:function(){Echo.Render.registerPeer("Extras.PrefixList",this)
},renderContent:function(){var d=this.component.render("text");var c=this.component.render("prefix");var e=this.component.render("comment");var b=this.component.render("arrow");var a;if(c){a=document.createElement("span");a.className="prefix";a.appendChild(document.createTextNode(c));this.div.appendChild(a)}this._textElement=document.createElement("span");this._textElement.className="text";this._textElement.appendChild(document.createTextNode(d));this.div.appendChild(this._textElement);if(e){a=document.createElement("span");a.className="comment";a.appendChild(document.createTextNode(e));this.div.appendChild(a)}if(b){a=document.createElement("span");a.className="arrow";this.div.appendChild(a)}this.div.className="orderedlist"}});
