
var desktop;var Acm={};var containerPane;var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS";},searchString:function(data){for(var i=0;i<data.length;i++){var dataString=data[i].string;var dataProp=data[i].prop;this.versionSearchString=data[i].versionSearch||data[i].identity;if(dataString){if(dataString.indexOf(data[i].subString)!=-1){return data[i].identity;}}else if(dataProp){return data[i].identity;}}},searchVersion:function(dataString){var index=dataString.indexOf(this.versionSearchString);if(index==-1){return;}
return parseFloat(dataString.substring(index+this.versionSearchString.length+1));},dataBrowser:[{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};BrowserDetect.init();Acm.Browser=function(){};Acm.Browser.isMoz=BrowserDetect.browser=='Firefox'||BrowserDetect.browser=='Mozilla'||BrowserDetect.browser=='Camino'||BrowserDetect.browser=='iCab'||BrowserDetect.browser=='Netscape';Acm.Browser.isIe=BrowserDetect.browser=='Explorer';Acm.Browser.isMac=BrowserDetect.OS=='Mac';Acm.DomNode=function(){};Acm.DomNode.ELEMENT_NODE=1;Acm.DomNode.ATTRIBUTE_NODE=2;Acm.DomNode.TEXT_NODE=3;Acm.DomNode.CDATA_SECTION_NODE=4;Acm.DomNode.ENTITY_REFERENCE_NODE=5;Acm.DomNode.ENTITY_NODE=6;Acm.DomNode.PROCESSING_INSTRUCTION_NODE=7;Acm.DomNode.COMMENT_NODE=8;Acm.DomNode.DOCUMENT_NODE=9;Acm.DomNode.DOCUMENT_TYPE_NODE=10;Acm.DomNode.DOCUMENT_FRAGMENT_NODE=11;Acm.DomNode.NOTATION_NODE=12;if(!Acm.Browser.isIe){Node.prototype.__defineGetter__("text",function(){var cs=this.childNodes;var l=cs.length;var sb=new Array(l);for(var i=0;i<l;i++){sb[i]=cs[i].text;}
return sb.join("");});Node.prototype.selectNodes=function(sExpr){var doc=this.nodeType==Acm.DomNode.DOCUMENT_NODE?this:this.ownerDocument;var nsRes=doc.createNSResolver(this.nodeType==Acm.DomNode.DOCUMENT_NODE?this.documentElement:this);var xpRes=doc.evaluate(sExpr,this,nsRes,5,null);var res=[];var item;while((item=xpRes.iterateNext())){res.push(item);}
return res;};Node.prototype.selectSingleNode=function(sExpr){var doc=this.nodeType==Acm.DomNode.DOCUMENT_NODE?this:this.ownerDocument;var nsRes=doc.createNSResolver(this.nodeType==Acm.DomNode.DOCUMENT_NODE?this.documentElement:this);var xpRes=doc.evaluate(sExpr,this,nsRes,Acm.DomNode.DOCUMENT_NODE,null);return xpRes.singleNodeValue;};Node.prototype.transformNode=function(oXsltNode){var doc=this.nodeType==Acm.DomNode.DOCUMENT_NODE?this:this.ownerDocument;var processor=new XSLTProcessor();processor.importStylesheet(oXsltNode);var df=processor.transformToFragment(this,doc);return df.xml;};Node.prototype.transformNodeToObject=function(oXsltNode,oOutputDocument){var doc=this.nodeType==Acm.DomNode.DOCUMENT_NODE?this:this.ownerDocument;var outDoc=oOutputDocument.nodeType==Acm.DomNode.DOCUMENT_NODE?oOutputDocument:oOutputDocument.ownerDocument;var processor=new XSLTProcessor();processor.importStylesheet(oXsltNode);var df=processor.transformToFragment(this,doc);while(oOutputDocument.hasChildNodes()){oOutputDocument.removeChild(oOutputDocument.lastChild);}
var cs=df.childNodes;var l=cs.length;for(var i=0;i<l;i++){oOutputDocument.appendChild(outDoc.importNode(cs[i],true));}};}
Acm.Array=function(a){this._a=a||[];};var _AcmArray=Acm.Array.prototype;_AcmArray.indexOf=function(o){return Acm.Array.indexOf(this._a,o);};_AcmArray.insertBefore=function(o,o2){Acm.Array.insertBefore(this._a,o,o2);};_AcmArray.insertAfter=function(o,o2){Acm.Array.insertAfter(this._a,o,o2);};_AcmArray.insertAt=function(o,i){Acm.Array.insertAt(this._a,o,i);};_AcmArray.inspect=function(){return Acm.Array.inspect(this._a);};_AcmArray.removeAt=function(i){Acm.Array.removeAt(this._a,i);};_AcmArray.remove=function(o){return Acm.Array.remove(this._a,o);};_AcmArray.getArray=function(){return this._a;};Acm.Array.indexOf=function(a,b){if(a.indexOf){return a.indexOf(b);}else{for(var i=0,l=a.length;i<l;i++){if(a[i]===b){return i;}}
return-1;}};Acm.Array.insertBefore=function(a,o,o2){var i=Acm.Array.indexOf(a,o2);if(i==-1){a.push(o);}else{a.splice(i,0,o);}};Acm.Array.insertAfter=function(a,o,o2){var i=Acm.Array.indexOf(a,o2);if(i==-1||i==(a.length-1)){a.push(o);}else{a.splice(i+1,0,o);}};Acm.Array.insertAt=function(a,o,i){a.splice(i,0,o);};Acm.Array.inspect=function(a){return a.join(',');};Acm.Array.removeAt=function(a,i){a.splice(i,1);};Acm.Array.remove=function(a,o){if(a.length>0){var i=Acm.Array.indexOf(a,o);if(i!=-1){a.splice(i,1);return true;}}
return false;};Acm.String=function(s){this._s=s+'';};var _AcmString=Acm.String.prototype;_AcmString.urlEncode=function(){return Acm.String.urlEncode(this._s);};_AcmString.htmlEntities=function(){return Acm.String.htmlEntities(this._s);};_AcmString.unhtmlEntities=function(){return Acm.String.unhtmlEntities(this._s);};_AcmString.lTrim=function(){return Acm.String.lTrim(this._s);};_AcmString.rTrim=function(){return Acm.String.rTrim(this._s);};_AcmString.trim=function(){return Acm.String.trim(this._s);};_AcmString.ucFirst=function(){return Acm.String.ucFirst(this._s);};_AcmString.camelize=function(){return Acm.String.camelize(this._s);};_AcmString.deCamelize=function(){return Acm.String.deCamelize(this._s);};Acm.String.urlEncode=function(s){return escape(s).replace(/\+/g,'%2B');};Acm.String.htmlEntities=function(s){return s.replace(/</g,'&lt;').replace(/>/g,'&gt;');};Acm.String.unhtmlEntities=function(s){return s.replace(/\&lt;/g,'<').replace(/\&gt;/g,'>');};Acm.String.lTrim=function(s){return s.replace(/^\s+/gm,'');};Acm.String.rTrim=function(s){return s.replace(/\s+$/gm,'');};Acm.String.trim=function(s){return s.replace(/^\s+/gm,'').replace(/\s+$/gm,'');};Acm.String.ucFirst=function(s){return s.charAt(0).toUpperCase()+s.substr(1);};Acm.String.camelize=function(s){return s.replace(/-([a-z])/g,Acm.String._camelize);};Acm.String._camelize=function($0,$1){return $1.toUpperCase();};Acm.String.deCamelize=function(s){return s.replace(/[A-Z]/g,Acm.String._deCamelize);};Acm.String._deCamelize=function($0){return'-'+$0.toLowerCase();};Acm.String.escapeRegexp=function(text){if(!arguments.callee.sRE){var specials=['/','.','*','+','?','|','(',')','[',']','{','}','\\'];arguments.callee.sRE=new RegExp('(\\'+specials.join('|\\')+')','g');}
return text.replace(arguments.callee.sRE,'\\$1');};Acm.CastAttributeValue=function(sValue){switch(sValue.toLowerCase()){case"true":return true;case"false":return false;default:var fl=parseFloat(sValue);if(fl==sValue){return fl;}else{return sValue;}}};Acm.extend=function(childClass,parentClass){var childClassName;if(typeof(parentClass)=='string'){var a=childClass.split('.');var childNs;if(!a[1]){childNs='Acm';}else{childNs=a[0];childClass=a[1];}
a=parentClass.split('.');var parentNs;if(!a[1]){parentNs='Acm';}else{parentNs=a[0];parentClass=a[1];}
if(!window[childNs][childClass]&&!window[childNs][parentClass]){var missingClass=!window[childNs][childClass]?childClass:parentClass;throw new Acm.Exception('Class '+missingClass+' does not exist in Acm-namespace.');}
childClassName=childNs+'.'+childClass;childClass=window[childNs][childClass];parentClass=window[parentNs][parentClass];}else{childClassName=Acm.Browser.isIe?(childClass+'').match(/^function(\s*)([a-zA-Z_-]+)/i)[2]:childClass.name;}
if(parentClass.constructor==Function){var inlineSuper=function(){};inlineSuper.prototype=parentClass.prototype;childClass.prototype=new inlineSuper();childClass.prototype._className=childClassName;childClass.parent=parentClass.prototype;childClass.prototype.constructor=childClass;}else{childClass.prototype=parentClass;childClass.prototype._className=className;childClass.parent=parentClass.prototype;}
return childClass.prototype;};Acm.apply=function(destination,source){for(property in source){destination[property]=source[property];}
return destination;};Acm.Exception=function(message){this._message=message;};_AcmException=Acm.Exception.prototype;_AcmException._className='Exception';_AcmException.toString=function(){return this._className;};_AcmException.getMessage=function(){return this._message;};Acm.Object=function(){};var _AcmObject=Acm.Object.prototype;_AcmObject._className='Object';_AcmObject._hashCode=null;_AcmObject._disposed=false;_AcmObject.dispose=function(){this._hashCode=null;this._disposed=true;};_AcmObject.toString=function(){return'[object '+this._className+']';};_AcmObject.setAttribute=function(name,value){switch(value){case'true':value=true;break;case'false':value=false;break;default:var pf=parseFloat(value);if(pf==value){value=pf;}}
name='set'+name.charAt(0).toUpperCase()+name.substr(1);if(this[name]){this[name](value);}};_AcmObject.getHashCode=function(){return Acm.Object.hashCode(this);};Acm.Object.hashCodeCounter=0;Acm.Object.hashCode=function(obj){if(obj){if(obj._hashCode){return obj._hashCode;}else{++Acm.Object.hashCodeCounter;obj._hashCode='h'+Acm.Object.hashCodeCounter;return obj._hashCode;}}
return false;};Acm.EventTarget=function(){};_AcmEventTarget=Acm.extend('EventTarget','Object');_AcmEventTarget._listeners=null;_AcmEventTarget._hasListeners=null;_AcmEventTarget._enabled=true;_AcmEventTarget._isEventSource=null;_AcmEventTarget._isEventListener=null;_AcmEventTarget.dispose=function(){if(this._disposed){return;}
if(this._isEventSource){this.unregisterEventSource();}
if(this._isEventListener){Acm.EventCoordinator.instance().unregisterAllEventListeners(this);}
Acm.EventTarget.parent.dispose.call(this);if(this._listeners){for(var sType in this._listeners){if(Acm.EventGateway.objectEvents[sType]){if(Acm.Browser.isIe){this._element.detachEvent('on'+sType,this.getContainer().getEventGateway().onObjectEvent);}else{this._element.removeEventListener(sType,this.getContainer().getEventGateway().onObjectEvent,false);}}
this._listeners[sType]=null;}}
this._listeners=null;this._hasListeners=null;this._enabled=null;this._isEventSource=null;this._isEventListener=null;if(this._backReference){this._backReference.dispose();}
this.__backReference=null;this._backReference=null;};_AcmEventTarget.createBackReference=function(){this.__backReference=null;if(this._backReference){this._backReference.dispose();}
this._backReference=new Acm.XmlHttpBackReference(this);return this._backReference;};_AcmEventTarget.addBackReference=function(oComp){if(!this._backReference){this.createBackReference();}
this._backReference.setVar(oComp.getId(),oComp);};_AcmEventTarget.getBackReference=function(){if(this.__backReference){return this.__backReference;}else if(this._backReference){return this._backReference;}else if(this._parentComponent){return this._parentComponent.getBackReference();}};_AcmEventTarget.setBackReference=function(oBackReference){if(!this._backReference){this.__backReference=oBackReference;}};_AcmEventTarget.addXmlElement=function(element,backReferenceObject){var tagName=element.tagName;var json;var functionBody;var node;var eventType;if(tagName.substr(0,2)=='on'){eventType=tagName.charAt(2).toLowerCase()+tagName.substr(3);if(element.firstChild.nextSibling){if(element.firstChild.nextSibling.nodeType==Acm.DomNode.CDATA_SECTION_NODE){functionBody=element.firstChild.nextSibling.data;}}
if(!functionBody){functionBody=element.firstChild.nodeValue;}
this.addEventListener(eventType,new Function("event",functionBody));return true;}else if(tagName=='dispatch'){for(var i=0;i<element.childNodes.length;i++){node=element.childNodes[i];if(node.nodeType==Acm.DomNode.ELEMENT_NODE){if(node.tagName=='event'){var _e=new Acm.Event(node.getAttribute('type'));if(node.hasChildNodes()){if(node.firstChild.nodeType==Acm.DomNode.CDATA_SECTION_NODE){json=node.firstChild.data;}else if(node.firstChild.nextSibling.nodeType==Acm.DomNode.CDATA_SECTION_NODE){json=node.firstChild.nextSibling.data;}else{json=node.firstChild.nodeValue;}
eval("_e.setData({"+json+"})");}
this.dispatchEvent(_e);}}}
return true;}else if(tagName.substr(0,13)=='registerEvent'){if(tagName.substr(13,19)=='Source'){this.registerEventSource();}else{var sourceId,eventHandler;sourceId=element.getAttribute('sourceId');for(node=element.firstChild;node;node=node.nextSibling){if(!node.tagName){continue;}
if(node.tagName.substr(0,2)=='on'){eventType=node.tagName.charAt(2).toLowerCase()+node.tagName.substr(3);eventHandler=node.getAttribute('eventHandler');if(eventHandler){eventHandler=this[eventHandler];}else{if(node.hasChildNodes()){if(node.firstChild.nodeType==Acm.DomNode.CDATA_SECTION_NODE){functionBody=node.firstChild.data;}else if(node.firstChild.nextSibling&&node.firstChild.nextSibling.nodeType==Acm.DomNode.CDATA_SECTION_NODE){functionBody=node.firstChild.nextSibling.data;}else{functionBody=node.firstChild.nodeValue;}}
eventHandler=new Function("event",functionBody);}
this.registerEventListener(eventType,eventHandler,this,sourceId);}}}
return true;}};_AcmEventTarget.addComponentFromXml=function(comp,c,backReferenceObject){if(comp instanceof Acm.Component){this.addComponent(comp);}
backReferenceObject._xmlParser.processChildNodes(comp,c,backReferenceObject);};_AcmEventTarget.addEventListener=function(eventType,eventHandler,eventObject){if(!this._listeners){this._listeners={};}
if(!this._listeners[eventType]){this._listeners[eventType]={};}
var key=Acm.Object.hashCode(eventHandler)+(eventObject?Acm.Object.hashCode(eventObject):'');this._listeners[eventType][key]={'eventHandler':eventHandler,'eventObject':eventObject};this._hasListeners=true;};_AcmEventTarget.removeEventListener=function(eventType,eventHandler,eventObject){if(!this._listeners||this._listeners[eventType]==undefined){return;}
var key=Acm.Object.hashCode(eventHandler)+(eventObject?Acm.Object.hashCode(eventObject):'');delete this._listeners[eventType][key];if(!Acm.HasMembers(this._listeners[eventType])){delete this._listeners[eventType];}
if(!Acm.HasMembers(this._listeners)){this._hasListeners=false;}};_AcmEventTarget.getListeners=function(eventType){var arr=[];if(eventType){for(i in this._listeners){a=this._listeners[i];for(uniqeKey in a){arr.push(a[uniqeKey]);}}}else{a=this._listeners[eventType];for(uniqeKey in a){arr.push(a[uniqeKey]);}}
return arr;};_AcmEventTarget.dispatchEvent=function(eventObject,bubbles){if(typeof(eventObject)=='string'){eventObject=new Acm.Event(eventObject);}
if(!this._hasListeners&&!eventObject._bubbles){return;}
if(this._disposed){return;}
if(this instanceof Acm.Component){if(typeof(this.getContainer)!=="undefined"){this.getContainer().getEventGateway().setCurrentEvent(eventObject);}}
eventObject._dispatcher=this;this._dispatchEvent(eventObject);return eventObject._returnValue;};_AcmEventTarget.dispatchEventNonPropagating=function(eventObject){eventObject.setBubbles(false);this.dispatchEvent(eventObject);};_AcmEventTarget._dispatchEvent=function(eventObject){eventObject._currentTarget=this;if(this._enabled&&this._listeners){var li=this._listeners[eventObject._type];if(li){var i,f,o,v;for(i in li){f=li[i].eventHandler;o=li[i].eventObject;if(typeof f=="function"){if(typeof o=="object"){if(o._enabled){v=f.call(o,eventObject);}}else{v=f.call(this,eventObject);}}
if(typeof(v)!=="undefined"){eventObject._returnValue=v;}}}}
if(eventObject._bubbles&&!eventObject._propagationStopped&&this._parentComponent){this._parentComponent._dispatchEvent(eventObject);}};_AcmEventTarget.registerEventSource=function(id,obj){if(!id){id=this.getId();}
if(!obj){obj=this;}
obj._isEventSource=true;Acm.EventCoordinator.instance().registerEventSource(id,obj);};_AcmEventTarget.unregisterEventSource=function(id,obj){if(!id){id=this.getId();}
if(!obj){obj=this;}
obj._isEventSource=false;Acm.EventCoordinator.instance().unregisterEventSource(id,obj);};_AcmEventTarget.registerEventListener=function(eventType,eventHandler,eventObject,id){if(!eventObject){eventObject=this;}
if(!id){id=false;}
eventObject._isEventListener=true;Acm.EventCoordinator.instance().registerEventListener(id,eventType,eventHandler,eventObject);};_AcmEventTarget.unregisterEventListener=function(eventType,eventHandler,eventObject,id){if(!eventObject){eventObject=this;}
if(!id){id=false;}
eventObject._isEventListener=false;Acm.EventCoordinator.instance().unregisterEventListener(id,eventType,eventHandler,eventObject);};_AcmEventTarget.setEnabled=function(b){if(this._enabled!=b){this._enabled=b;this.dispatchEvent(new Acm.Event(b?'enabled':'disabled'));}};_AcmEventTarget.getEnabled=function(){return this._enabled;};_AcmEventTarget.setAttribute=function(name,value){if(name.substring(0,2)=='on'){var type=name.substring(2,3).toLowerCase()+name.substring(3);this.addEventListener(type,new Function('event',value));}else{Acm.EventTarget.parent.setAttribute.call(this,name,value);}};Acm.Event=function(type){this._type=type;};var _AcmEvent=Acm.extend('Event','Object');_AcmEvent._bubbles=false;_AcmEvent._propagationStopped=false;_AcmEvent._defaultPrevented=false;_AcmEvent._data=null;_AcmEvent._triggerHashCode=null;_AcmEvent._returnValue=true;_AcmEvent.dispose=function(){if(this._disposed){return;}
Acm.Event.parent.dispose.call(this);this._currentTarget=null;this._dispatcher=null;this._data=null;this._triggerHashCode=null;};_AcmEvent.getData=function(){return this._data;};_AcmEvent.setData=function(data){this._data=data;};_AcmEvent.setTriggerHashCode=function(hash){this._triggerHashCode=hash;};_AcmEvent.getTriggerHashCode=function(){return this._triggerHashCode;};_AcmEvent.getType=function(){return this._type;};_AcmEvent.getCurrentTarget=function(){return this._currentTarget;};_AcmEvent.getBubbles=function(){return this._bubbles;};_AcmEvent.setBubbles=function(b){this._bubbles=b;};_AcmEvent.stopPropagation=function(){this._propagationStopped=true;};_AcmEvent.preventDefault=function(){this._defaultPrevented=true;};_AcmEvent.getDefaultPrevented=function(){return this._defaultPrevented;};_AcmEvent.getDispatcher=function(){return this._dispatcher;};_AcmEvent.setDispatcher=function(dispatcher){this._dispatcher=dispatcher;};Acm.XmlParser=function(){};_AcmXmlParser=Acm.extend('XmlParser','EventTarget');_AcmXmlParser.processChildNodes=function(object,oNode,backReferenceObject){var localName;for(var id,c=oNode.firstChild,child;c;c=c.nextSibling){if(c.nodeType==1){child=this.createFromXml(object,c);if(!child){child=object.addXmlElement(c,backReferenceObject);if(!child){localName=c.baseName||c.localName;alert('Error!: Unrecognized XML element: '+localName);}}
if(child instanceof Acm.EventTarget){child.setBackReference(backReferenceObject);id=c.getAttribute('id');if(id){child.setId(id);}
child._parentComponent=object;object.addComponentFromXml(child,c,backReferenceObject);if(child._hasListeners){child.dispatchEvent(new Acm.Event('complete'));}
if(child._onXmlComplete){child._onXmlComplete();}}}else if(c.nodeType==3&&object._addTextNodesFromXML){if(c.nodeValue.length==4096&&Acm.Browser.isMoz){c.parentNode.normalize();}
var text=Acm.String.trim(c.nodeValue);if(text.length>0){object.setText(text);}}}};_AcmXmlParser.createFromXml=function(object,oNode){var ns=application._namespaces[oNode.namespaceURI]||'Acm';var localName=oNode.baseName||oNode.localName;var constr=window[ns][Acm.String.ucFirst(localName)]||window[ns][localName];if(constr&&constr.prototype){o=new constr;o._container=object._container;if(o.create){o.create();}
this.processAttributes(o,oNode);return o;}
return false;};_AcmXmlParser.parseId=function(id){var key=id.substr(0,id.indexOf('.'));id=id.substr(id.indexOf('.'));for(var i=0,l=arr.length;i<l;i++){}};_AcmXmlParser.processAttributes=function(comp,node){for(var no,n,i=0,a=node.attributes,l=a.length;i<l;i++){no=a[i];comp.setAttribute(no.nodeName,no.nodeValue);}};_AcmXmlParser.castAttributeValue=Acm.CastAttributeValue;Acm.ScriptLoader=function(){this._queue=[];};_AcmScriptLoader=Acm.extend('ScriptLoader','EventTarget');_AcmScriptLoader._queue=null;_AcmScriptLoader._queueCounter=0;_AcmScriptLoader._timeoutTimer=null;_AcmScriptLoader._ieIsComplete=null;Acm.ScriptLoader._includedScripts=[];_AcmScriptLoader.dispose=function(){if(this._disposed){return;}
Acm.ScriptLoader.parent.dispose.call(this);this._queue=null;this._queueCounter=0;this._timeoutTimer=null;this._ieIsComplete=null;};_AcmScriptLoader.addScript=function(sPath){this._queue.push(sPath);};_AcmScriptLoader.transferQueue=function(){var script=this._queue[0];if(script){this._writeScriptTag(script);}};_AcmScriptLoader._writeScriptTag=function(sSrc){if(Acm.XmlHttp.requestUrlPrefix!==""){sSrc=Acm.XmlHttp.requestUrlPrefix+sSrc;}
if(this._isIncluded(sSrc)){this._onLoad();return;}
this._timeoutTimer=new Acm.Timer(4000,this._onTimeout,this);this._timeoutTimer.start();var scriptElement=document.createElement('SCRIPT');var separator='?';scriptElement.type="text/javascript";if(Acm.Browser.isMoz){var self=this;scriptElement.addEventListener('load',function(evt){self._onLoad();},false);document.getElementsByTagName('HEAD')[0].appendChild(scriptElement);scriptElement.src=sSrc;}else{document.getElementsByTagName('HEAD')[0].appendChild(scriptElement);if(sSrc.indexOf('?')>-1){separator='&';}
scriptElement.src=sSrc+separator+'acmLoadRandomizer'+'='+Math.random().toString().split(".")[1];this._ieIsCompleteTimer=new Acm.Timer(20,this._ieIsCompleteCallback,this);this._ieIsCompleteTimer.start();}};_AcmScriptLoader._ieIsCompleteCallback=function(className){if(Acm.ScriptLoader._ieIsComplete){this._ieIsCompleteTimer.stop();Acm.ScriptLoader._ieIsComplete=false;this._onLoad();}};_AcmScriptLoader._isIncluded=function(sSrc){var i=0,arr=Acm.ScriptLoader._includedScripts,l=arr.length;for(i;i<l;i++){if(arr[i]==sSrc){return true;}}
return false;};_AcmScriptLoader._onLoad=function(){if(this._timeoutTimer)
this._timeoutTimer.stop();Acm.ScriptLoader._includedScripts.push(this._queue[this._queueCounter]);this._queueCounter++;if(this._queue[this._queueCounter]){this._writeScriptTag(this._queue[this._queueCounter]);if(this._queue){window.status=sprintf(t_("Loaded %s/%s files. (%s)."),(this._queueCounter+1),this._queue.length,this._queue[this._queueCounter]);}}else{this._onAllLoaded();}};_AcmScriptLoader._onAllLoaded=function(){this.dispatchEvent(new Acm.Event('loaded'));};_AcmScriptLoader._onTimeout=function(){if(Acm.Browser.isIe){this._ieIsCompleteTimer.stop();}};Acm.XmlLoader=function(oComponent,postData,readyStateWrapper,xmlLoadWrapper){this._xmlLoadWrapper=xmlLoadWrapper;this._xmlHttp=new Acm.XmlHttp(oComponent,readyStateWrapper);this._xmlParser=new Acm.XmlParser();this._oComponent=oComponent;var self=this;this._xmlHttp.addEventListener('loaded',function(){if(typeof(self._xmlLoadWrapper)=="function"){self._xmlLoadWrapper.call(self);}else{self._onXmlHttpLoad.call(self);}},this);oComponent.getBackReference()._xmlParser=this._xmlParser;this._postData=postData;};_AcmXmlLoader=Acm.extend('XmlLoader','EventTarget');_AcmXmlLoader._xmlHttp=null;_AcmXmlLoader._scriptLoader=null;_AcmXmlLoader._oComponent=null;_AcmXmlLoader._backReference=null;_AcmXmlLoader._persistant=null;_AcmXmlLoader._responses=null;_AcmXmlLoader._sUri=null;_AcmXmlLoader._xmlLoadWrapper=null;_AcmXmlLoader.dispose=function(){if(this._disposed){return;}
Acm.XmlLoader.parent.dispose.call(this);this._xmlHttp.dispose();this._xmlHttp=null;if(this._scriptLoader){this._scriptLoader.dispose();}
this._scriptLoader=null;this._oComponent=null;if(this._backReference){this._backReference.dispose();}
this._backReference=null;this._persistant=null;this._responses=null;this._sUri=null;};_AcmXmlLoader.loadXml=function(sUri){this._sUri=sUri;var data=this._postData;application.dispatchEvent(new Acm.XmlHttpEvent('request',this._oComponent,this._sUri));if(typeof data=='object'){var a=[];for(var key in data){a[a.length]=key+'='+Acm.String.urlEncode(data[key]);}
data=a.join('&');}
if(data){this._xmlHttp.send('POST',this._sUri,data,{'Content-Type':'application/x-www-form-urlencoded; charset=iso-8859-1'});}else{this._xmlHttp.send('GET',this._sUri);}};_AcmXmlLoader.setPersistant=function(b){this._persistant=b;};_AcmXmlLoader.getPersistant=function(){return this._persistant;};_AcmXmlLoader._onXmlHttpLoad=function(){application.dispatchEvent(new Acm.XmlHttpEvent('response',this._oComponent,this._sUri,this._xmlHttp.getResponseText()));var response=this._xmlHttp.getResponseXml();var responseAsText=this._xmlHttp.getResponseText();if(responseAsText.indexOf("EosErrorJson =")===0){top.HYPERGENE.StaleSessionHandler.handleError(responseAsText);}
if(!response){throw new Acm.NoXmlException(sprintf(t_("Acm.XmlLoader error: No responseXml. Response text: %s"),this._xmlHttp.getResponseText()));}
if(response&&typeof response==='object'){if(Acm.Browser.isIe||typeof response.selectSingleNode==='function'){if(!response.selectSingleNode('/acm')){throw new Acm.InvalidXmlException(t_("No XML returned")+' ('+this._xmlHttp.getUrl()+'): '+response+', '+this._xmlHttp.getResponseText());}}else{alert("Technical problem: Your browser does not support selectSingleNode(). Please report this. Thank you!");}}
this._responses=[];var responses=response.selectNodes('/acm/acm');if(responses.length>0){var mainDispatcher=this._oComponent;for(var i=0,l=responses.length;i<l;i++){if(mainDispatcher._xmlRequests){this._responses.push([responses[i],mainDispatcher._xmlRequests[i][0]]);}else{this._responses.push(responses[i]);}}
if(mainDispatcher._xmlRequests){mainDispatcher.clearRequests();}}else{this._responses.push(response.selectSingleNode('/acm'));}
this._parseNextResponse();};_AcmXmlLoader._parseNextResponse=function(){if(this._disposed){return;}
var response=this._responses[0];if(!response){return false;}
if(response[1]){response=response[0];}
var scriptsElement=response.selectSingleNode('scripts');if(scriptsElement){this._parseScripts(scriptsElement);}
if(this._scriptLoader){this._scriptLoader.transferQueue();}else{this._onScriptLoaderLoad();}
return true;};_AcmXmlLoader._parseScripts=function(scriptsElement){var scriptTags=scriptsElement.getElementsByTagName('script');var numberOfScripts=scriptTags.length;var script;var src;var sEval;for(var i=0;i<numberOfScripts;i++){script=scriptTags.item(i);src=script.getAttribute('src');if(src){if(!this._scriptLoader){this._scriptLoader=new Acm.ScriptLoader();this._scriptLoader.addEventListener('loaded',this._onScriptLoaderLoad,this);}
this._scriptLoader.addScript(src);}else{sEval=(script.firstChild.nodeType==Acm.DomNode.CDATA_SECTION_NODE)?script.firstChild.nodeValue:script.firstChild.nextSibling.nodeValue;try{if(Acm.Browser.isIe){window.execScript(sEval);}else{window.eval(sEval);}}catch(ex){alert(t_("Error in script")+"\n"+t_("Name")+": "+ex.name+"\n"+t_("Number")+": "+ex.number+"\n"+t_("Description")+": "+ex.description+"\n\n"+sEval);}}}};_AcmXmlLoader._parseBackReference=function(backReferenceElement,responseObject){var xmlParser=this._xmlParser,o,backRef=responseObject.getBackReference();backRef.setXmlParser(xmlParser);for(var node=backReferenceElement.firstChild;node;node=node.nextSibling){if(node.nodeType!=Acm.DomNode.ELEMENT_NODE){continue;}
o=backRef.getVar(node.tagName);if(o){o.setBackReference(backRef);xmlParser.processAttributes(o,node);xmlParser.processChildNodes(o,node,backRef);if(o instanceof Acm.Component){o.ieLayoutComponents();}
o.dispatchEvent(new Acm.Event('xmlUpdate'));}else{alert(sprintf(t_("The object %s does not exist in the backReference array."),node.tagName)+" "+responseObject);}}};_AcmXmlLoader._onScriptLoaderLoad=function(){var response=this._responses[0];var responseObject=this._oComponent;var isMultiResponse=false;if(response[1]){responseObject=response[1];response=response[0];isMultiResponse=true;}
var backReferenceElement=response.selectSingleNode('backReference');if(backReferenceElement){this._parseBackReference(backReferenceElement,responseObject);}
this.dispatchEvent(new Acm.Event('complete'));if(isMultiResponse){responseObject.dispatchEvent(new Acm.Event('xmlRequestComplete'));}else if(this._oComponent){this._oComponent.dispatchEvent(new Acm.Event('xmlRequestComplete'));}
if(this._responses){this._responses.splice(0,1);}
if(this._parseNextResponse()){return;}
if(!this._persistant){this.dispose();}};Acm.Application=function(path,controllerPath){this._path=path;this._controllerPath=controllerPath;this._containers={};this._baseIncludeFiles=[];this._namespaces={};this.addNamespace('Acm','http://acmtk.com');var files=[path+'acmUtils.js',path+'acmException.js',path+'acmEvent.js',path+'acmProfiler.js',path+'acmEventGateway.js',path+'acmEventCoordinator.js',path+'acmXmlHttp.js',path+'acmComponent.js',path+'acmTimer.js',path+'acmImage.js',path+'acmContainer.js',path+'acmLabel.js',path+'acmToolBar.js',path+'acmForm.js',path+'acmNodeContainer.js',path+'acmWindowManager.js',path+'acmGuiComponents.js',path+'acmWindow.js',path+'acmMenu.js',path+'acmToolTip.js',path+'acmFormGrid.js',path+'acmTaskBar.js',path+'acmNode.js',path+'acmSelectionManager.js',path+'acmListBox4.js',path+'acmSheet.js',path+'acmDropBox.js',path+'debug/acmDebugConsole.js',path+'acmProgressBar.js',path+'acmSplitPane.js',path+'acmTabPane.js',path+'acmActivityBar.js',path+'acmErrorWindow.js',path+'acmDesktopPane.js'];};_AcmApplication=Acm.extend('Application','EventTarget');_AcmApplication._scriptLoader=null;_AcmApplication._containerPane=null;_AcmApplication._path='';_AcmApplication._controllerPath=null;_AcmApplication._namespaces=null;_AcmApplication._baseIncludeFiles=null;_AcmApplication._containers=null;_AcmApplication.dispose=function(){if(this._disposed){return;}
Acm.Application.parent.dispose.call(this);if(this._scriptLoader){this._scriptLoader.dispose();}
this._scriptLoader=null;if(this._containerPane){this._containerPane.dispose();}
for(var i in this._containers){this._containers[i].dispose();delete this._containers[i];}
this._containerPane=null;this._path=null;};_AcmApplication.start=function(){this._containerPane=new Acm.Container(window);containerPane=this._containerPane;containerPane.create();this.dispatchEvent(new Acm.Event('start'));this._started=true;this._containerPane.addEventListener('unload',this.dispose,this);};_AcmApplication.addIncludeFiles=function(files){this._baseIncludeFiles=this._baseIncludeFiles.concat(files);};_AcmApplication.addNamespace=function(jsNamespace,namespaceURI){this._namespaces[namespaceURI]=jsNamespace;};_AcmApplication.getNamespaces=function(){return this._namespaces;};_AcmApplication.getPath=function(){return this._path;};_AcmApplication.getControllerPath=function(){return this._controllerPath;};_AcmApplication.getContainer=function(win,relPath){if(!win){return this._containerPane;}
return new Acm.Container(win,relPath);};_AcmApplication.getStarted=function(){return this._started;};_AcmApplication._onScriptLoaderLoaded=function(){var loc=window.location.href;this._containers[loc]=new Acm.Container(window);this._containerPane=this._containers[loc];containerPane=this._containerPane;containerPane.create();this.dispatchEvent(new Acm.Event('start'));this._started=true;this._containerPane.addEventListener('unload',this.dispose,this);};Acm.IsDefined=function(){for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])=='undefined'){return false;}}
return true;};Acm.HasMembers=function(obj){for(var i in obj){return true;}
return false;};Acm.buildQS=function(obj){var qs=[];for(var varName in obj){if(typeof(obj[varName])=="object"){try{var temp=obj[varName];for(var x in temp){qs.push(varName+"["+x+"]="+new Acm.String(temp[x]).urlEncode());}}catch(e){qs.push(varName+"="+new Acm.String(obj[varName]).urlEncode());}}else{qs.push(varName+"="+new Acm.String(escape(obj[varName])).urlEncode());}}
return qs.join("&");};Acm.ConnectionException=function(info){this.message=t_("Could not connect to the web server.");this.info=info.replace(/</g,"&lt;").replace(/>/g,"&gt;");};Acm.NoXmlException=function(info){this.message=t_("No XML data recieved from server.");this.info=info.replace(/</g,"&lt;").replace(/>/g,"&gt;");};Acm.InvalidXmlException=function(info){this.message=t_("The data recieved from the server is not valid XML.");this.info=info.replace(/</g,"&lt;").replace(/>/g,"&gt;");};Acm.CoordinatorEvent=function(sType,id,eventObject,eventType){Acm.Event.call(this,sType);};var _AcmCoordinatorEvent=Acm.extend('CoordinatorEvent','Event');_AcmCoordinatorEvent.dispose=function(){if(this._disposed){return;}
Acm.CoordinatorEvent.parent.dispose.call(this);this._id=null;this._eventObject=null;this._eventType=null;};_AcmCoordinatorEvent.getId=function(){return this._id;};_AcmCoordinatorEvent.getEventObject=function(){return this._eventObject;};_AcmCoordinatorEvent.getEventType=function(){return this._eventType;};Acm.FormFieldEvent=function(sType){Acm.Event.call(this,sType);};var _AcmFormFieldEvent=Acm.extend('FormFieldEvent','Event');_AcmFormFieldEvent._bubbles=true;Acm.ErrorEvent=function(sType,oEvent){Acm.Event.call(this,sType);this._event=oEvent;};var _AcmErrorEvent=Acm.extend('ErrorEvent','Event');_AcmErrorEvent._bubbles=false;if(Acm.Browser.isIe){Acm.ErrorEvent._errorNameMap={'ReferenceError':'ReferenceError'};}else{Acm.ErrorEvent._errorNameMap={'TypeError':'ReferenceError'};}
_AcmErrorEvent.getName=function(){return Acm.ErrorEvent._errorNameMap[this._event.name];};_AcmErrorEvent.getMessage=function(){return this._event.name;};Acm.BrowserEvent=function(sType,oEvent){Acm.Event.call(this,sType);this._event=oEvent;};var _AcmBrowserEvent=Acm.extend('BrowserEvent','Event');_AcmBrowserEvent._bubbles=true;_AcmBrowserEvent.getEvent=function(){return this._event;};if(Acm.Browser.isIe){_AcmBrowserEvent.preventDefault=function(){this._defaultPrevented=true;this._event.returnValue=false;};}else{_AcmBrowserEvent.preventDefault=function(){this._defaultPrevented=true;this._event.preventDefault();};}
_AcmBrowserEvent.getCtrlKey=function(){return this._event.ctrlKey;};_AcmBrowserEvent.getShiftKey=function(){return this._event.shiftKey;};_AcmBrowserEvent.getAltKey=function(){return this._event.altKey;};_AcmBrowserEvent.getMetaKey=function(){if(Acm.Browser.isMoz){return this._event.metaKey;}else{return false;}};if(Acm.Browser.isIe){_AcmBrowserEvent.getTarget=function(){return this._event.srcElement;};}else{_AcmBrowserEvent.getTarget=function(){return this._event.target;};}
Acm.MouseEvent=function(sType,oEvent){Acm.BrowserEvent.call(this,sType,oEvent);};var _AcmMouseEvent=Acm.extend('MouseEvent','BrowserEvent');Acm.MouseEvent._button=0;if(Acm.Browser.isIe){Acm.MouseEvent.LEFT=1;Acm.MouseEvent.RIGHT=2;Acm.MouseEvent.MIDDLE=4;}else{Acm.MouseEvent.LEFT=0;Acm.MouseEvent.MIDDLE=1;Acm.MouseEvent.RIGHT=2;Acm.MouseEvent._button=-1;}
_AcmMouseEvent.dispose=function(){if(this._disposed){return;}
Acm.MouseEvent.parent.dispose.call(this);this._event=null;};_AcmMouseEvent.getClientX=function(){return this._event.clientX+this._dispatcher._container._document.body.scrollLeft;};_AcmMouseEvent.getClientY=function(){return this._event.clientY+this._dispatcher._container._document.body.scrollTop;};_AcmMouseEvent.getScreenX=function(){return this._event.screenX;};_AcmMouseEvent.getScreenY=function(){return this._event.screenY;};_AcmMouseEvent.getOffsetX=function(){var el=this.getCurrentTarget();return this._event.clientX-el.getPageX();};_AcmMouseEvent.getOffsetY=function(){var el=this.getCurrentTarget();return this._event.clientY-el.getPageY();};_AcmMouseEvent.getRelatedTarget=function(){var relEl;if(Acm.Browser.isIe){if(this._type=='mouseover'){relEl=this._event.fromElement;}else if(this._type=='mouseout'){relEl=this._event.toElement;}}else{relEl=this._event.relatedTarget;}
try{while(relEl!=null&&relEl._acmComponent==null){relEl=relEl.parentNode;}}catch(ex){return null;}
if(relEl==null){return null;}
return relEl._acmComponent;};_AcmMouseEvent.getButton=function(){return Acm.MouseEvent._button;};Acm.XmlHttpEvent=function(sType,oComponent,sUri,sData){Acm.Event.call(this,sType);this._oComponent=oComponent;this._sUri=sUri;this._sData=sData;};var _AcmXmlHttpEvent=Acm.extend('XmlHttpEvent','Event');_AcmXmlHttpEvent._bubbles=false;_AcmXmlHttpEvent._oComponent=null;_AcmXmlHttpEvent._sUri=null;_AcmXmlHttpEvent._sData=null;_AcmXmlHttpEvent.dispose=function(){if(this._disposed){return;}
Acm.XmlHttpEvent.parent.dispose.call(this);this._oComponent=null;this._sUri=null;this._sData=null;};_AcmXmlHttpEvent.getComponent=function(){return this._oComponent;};_AcmXmlHttpEvent.getUri=function(){return this._sUri;};_AcmXmlHttpEvent.getData=function(){return this._sData;};Acm.MouseComponentEvent=function(sType,oEvent,oComp){Acm.MouseEvent.call(this,sType,oEvent);this._component=oComp;};var _AcmMouseComponentEvent=Acm.extend('MouseComponentEvent','MouseEvent');_AcmMouseComponentEvent._bubbles=true;_AcmMouseComponentEvent._component=null;_AcmMouseComponentEvent.getComponent=function(){return this._component;};_AcmMouseComponentEvent.dispose=function(){if(this._disposed){return;}
Acm.MouseComponentEvent.parent.dispose.call(this);this._component=null;};Acm.DragEvent=function(type,event,comp){Acm.MouseComponentEvent.call(this,type,event,comp);};var _AcmDragEvent=Acm.extend('DragEvent','MouseComponentEvent');_AcmDragEvent.getDragDistance=function(){var x=this.getClientX()-Acm.EventGateway._dragStartX;if(x<0){x*=-1;}
var y=this.getClientY()-Acm.EventGateway._dragStartY;if(y<0){y*=-1;}
return x>y?x:y;};Acm.ComponentEvent=function(sType,oComponent){Acm.Event.call(this,sType);this._component=oComponent;};var _AcmComponentEvent=Acm.extend('ComponentEvent','Event');_AcmComponentEvent._bubbles=true;_AcmComponentEvent.dispose=function(){if(this._disposed){return;}
Acm.ComponentEvent.parent.dispose.call(this);this._component=null;};_AcmComponentEvent.getComponent=function(){return this._component;};Acm.FocusEvent=function(sType,newFocused,prevFocused,prevEvent){Acm.Event.call(this,sType);this._newFocused=newFocused;this._prevFocused=prevFocused;this._prevEvent=prevEvent;};var _AcmFocusEvent=Acm.extend('FocusEvent','Event');_AcmFocusEvent._bubbles=true;_AcmFocusEvent._newFocused=null;_AcmFocusEvent._prevFocused=null;_AcmFocusEvent._prevEvent=null;_AcmFocusEvent.dispose=function(){if(this._disposed){return;}
Acm.FocusEvent.parent.dispose.call(this);this._newFocused=null;this._prevFocused=null;this._prevEvent=null;};_AcmFocusEvent.getNewFocused=function(){return this._newFocused;};_AcmFocusEvent.getPrevFocused=function(){return this._prevFocused;};_AcmFocusEvent.getPrevEvent=function(){return this._prevEvent;};Acm.KeyboardEvent=function(sType,oEvent){Acm.BrowserEvent.call(this,sType,oEvent);this._keyCode=oEvent.keyCode||oEvent.charCode;};var _AcmKeyboardEvent=Acm.extend('KeyboardEvent','BrowserEvent');Acm.KeyboardEvent.BACKSPACE=8;Acm.KeyboardEvent.TAB=9;Acm.KeyboardEvent.ENTER=13;Acm.KeyboardEvent.CTRL=17;Acm.KeyboardEvent.CONTROL=17;Acm.KeyboardEvent.LEFT=37;Acm.KeyboardEvent.UP=38;Acm.KeyboardEvent.DOWN=40;Acm.KeyboardEvent.RIGHT=39;Acm.KeyboardEvent.SPACE=32;Acm.KeyboardEvent.SHIFT=16;Acm.KeyboardEvent.ALT=18;Acm.KeyboardEvent.ESC=27;Acm.KeyboardEvent.F1=112;Acm.KeyboardEvent.F2=113;Acm.KeyboardEvent.F3=114;Acm.KeyboardEvent.F4=115;Acm.KeyboardEvent.F5=116;Acm.KeyboardEvent.F6=117;Acm.KeyboardEvent.F7=118;Acm.KeyboardEvent.F8=119;Acm.KeyboardEvent.F9=120;Acm.KeyboardEvent.F10=121;Acm.KeyboardEvent.F11=122;Acm.KeyboardEvent.F12=123;Acm.KeyboardEvent.INSERT=45;Acm.KeyboardEvent.DEL=46;Acm.KeyboardEvent.END=35;Acm.KeyboardEvent.HOME=36;Acm.KeyboardEvent.PAGE_UP=33;Acm.KeyboardEvent.PAGE_DOWN=34;Acm.KeyboardEvent.NUM_LOCK=144;Acm.KeyboardEvent.NUMPAD0=96;Acm.KeyboardEvent.NUMPAD1=97;Acm.KeyboardEvent.NUMPAD2=98;Acm.KeyboardEvent.NUMPAD3=99;Acm.KeyboardEvent.NUMPAD4=100;Acm.KeyboardEvent.NUMPAD5=101;Acm.KeyboardEvent.NUMPAD6=102;Acm.KeyboardEvent.NUMPAD7=103;Acm.KeyboardEvent.NUMPAD8=104;Acm.KeyboardEvent.NUMPAD9=105;Acm.KeyboardEvent.NUMPAD_DIVIDE=111;Acm.KeyboardEvent.NUMPAD_MULTIPLY=106;Acm.KeyboardEvent.NUMPAD_MINUS=109;Acm.KeyboardEvent.NUMPAD_PLUS=107;Acm.KeyboardEvent.SINGLE_QUOTE=39;Acm.KeyboardEvent.N7=55;Acm.KeyboardEvent.MINUS=45;Acm.KeyboardEvent.PLUS=43;Acm.KeyboardEvent.N=78;Acm.KeyboardEvent.S=83;Acm.KeyboardEvent.W=87;_AcmKeyboardEvent.dispose=function(){if(this._disposed){return;}
Acm.KeyboardEvent.parent.dispose.call(this);this._event=null;};_AcmKeyboardEvent.getKeyCode=function(){return this._keyCode;};Acm.Profiler=function(){this._originalMethods={};this._callStack=[];};var _AcmProfiler=Acm.Profiler.prototype;_AcmProfiler._hash=null;_AcmProfiler._originalMethods=null;_AcmProfiler._callStack=null;_AcmProfiler.startProfile=function(p,methodName){if(!p._className){return;}
var method=p[methodName];var className=p._className;if(!this._originalMethods[className]){this._originalMethods[className]={};}
this._originalMethods[className][methodName]={'method':method,'log':[]};var profiler=this;p[methodName]=function(){var stack=profiler._callStack;stack.push({subtract:0});var start=new Date().getTime();method.apply(this,arguments);var end=new Date().getTime();var total=end-start;var own=total-stack[stack.length-1].subtract;var o=profiler._originalMethods[className][methodName];o.log.push({'own':own,'total':total});stack.pop();if(stack.length>0){stack[stack.length-1].subtract+=total;}};};_AcmProfiler.addClass=function(objectClass){for(var i in objectClass){f=objectClass[i];if(typeof(f)!='function'){continue;}}};_AcmProfiler.stopProfile=function(objectClass,methodName){var p=objectClass.prototype;p[methodName]=this._originalMethods[objectClass._className][methodName].method;};_AcmProfiler.beginProfile=function(){var f,a=window,p;for(var i in a){f=a[i];if(typeof(f)!='function'||i.substring(0,3)!='acm'){continue;}
p=f.prototype;for(var j in p){if(typeof(p[j])!='function'){continue;}
this.startProfile(p,j);}}};_AcmProfiler.endProfile=function(){};_AcmProfiler.getLog=function(classProperty,methodName){return new Acm.ProfileLog(this._originalMethods[classProperty._className][methodName].log);};Acm.ProfileLog=function(arrLog){this._arrLog=arrLog;};var _AcmProfileLog=Acm.ProfileLog.prototype;_AcmProfileLog.getInvocations=function(){return this._arrLog.length;};_AcmProfileLog.getOwnTime=function(){for(var sum=0,i=0,a=this._arrLog,l=a.length;i<l;i++){sum+=a[i].own;}
if(sum){return parseInt(sum/l,10);}};_AcmProfileLog.getTotalTimeAvg=function(){for(var sum=0,i=0,a=this._arrLog,l=a.length;i<l;i++){sum+=a[i].total;}
if(sum){return parseInt(sum/l,10);}};_AcmProfileLog.getTotalTime=function(){for(var sum=0,i=0,a=this._arrLog,l=a.length;i<l;i++){sum+=a[i].total;}
return sum;};_AcmProfileLog.getOwnTime=function(){for(var sum=0,i=0,a=this._arrLog,l=a.length;i<l;i++){sum+=a[i].own;}
return sum;};Acm.EventGateway=function(win){Acm.Object.call(this);this._window=win;var self=this;this._onWindowEvent=function(e){return self.onWindowEvent(e);};this._onKeyEvent=function(e){return self.onKeyEvent(e);};this._onFormEvent=function(e){return self.onFormEvent(e);};this._onErrorEvent=function(e){return self.onErrorEvent(e);};this._onMouseEvent=function(e){return self.onMouseEvent(e);};this._onSelectEvent=function(e){return self.onSelectEvent(e);};this.registerEventListeners();};Acm.EventGateway.mouseEvents=['mouseover','mousemove','mousedown','mouseup','click','dblclick','contextmenu'];Acm.EventGateway.keyboardEvents=['keydown','keypress','keyup'];Acm.EventGateway.windowEvents=['resize','unload','load','scroll','beforeunload'];Acm.EventGateway.formEvents=['change'];Acm.EventGateway.objectEvents={};if(Acm.Browser.isIe){Acm.EventGateway.objectEvents.scroll=true;}
var _AcmEventGateway=Acm.extend('EventGateway','Object');_AcmEventGateway._window=null;_AcmEventGateway._dragComponent=null;_AcmEventGateway._cursorClientX=null;_AcmEventGateway._cursorClientY=null;_AcmEventGateway._ieMouseMovePreventDefault=null;_AcmEventGateway._focusedComponent=null;_AcmEventGateway._prevFocusedComponent=null;_AcmEventGateway._prevMouseOver=null;_AcmEventGateway._currentEvent=null;_AcmEventGateway.dispose=function(){if(this._disposed){return;}
Acm.EventGateway.parent.dispose.call(this);if(this._window){this.unregisterEventListeners();this._window=null;}
this._dragComponent=null;this._ieMouseMovePreventDefault=null;this._focusedComponent=null;this._prevFocusedComponent=null;this._prevMouseOver=null;this._currentEvent=null;};_AcmEventGateway.setCurrentEvent=function(currentEvent){this._currentEvent=currentEvent;};_AcmEventGateway.getCurrentEvent=function(){return this._currentEvent;};_AcmEventGateway.registerEventListeners=function(){var doc=this._window.document;var i,types=Acm.EventGateway.mouseEvents;if(Acm.Browser.isIe){Acm.EventGateway.mouseEvents.push("mousewheel");for(i=0;i<types.length;i++){doc.attachEvent('on'+types[i],this._onMouseEvent);}}else{Acm.EventGateway.mouseEvents.push("DOMMouseScroll");for(i=0;i<types.length;i++){doc.addEventListener(types[i],this._onMouseEvent,false);}}
types=Acm.EventGateway.keyboardEvents;if(Acm.Browser.isIe){for(i in types){doc.body.attachEvent('on'+types[i],this._onKeyEvent);}}else{for(i in types){doc.addEventListener(types[i],this._onKeyEvent,false);}}
types=Acm.EventGateway.formEvents;if(Acm.Browser.isIe){for(i in types){doc.body.attachEvent('on'+types[i],this._onFormEvent);}}else{for(i in types){doc.addEventListener(types[i],this._onFormEvent,false);}}
if(Acm.Browser.isIe){doc.body.onselect=this._onSelectEvent;doc.onselectstart=this._onSelectEvent;doc.onselectionchange=this._onSelectEvent;}
types=Acm.EventGateway.windowEvents;if(Acm.Browser.isIe){for(i in types){this._window.attachEvent('on'+types[i],this._onWindowEvent);}}else{for(i in types){this._window.addEventListener(types[i],this._onWindowEvent,false);}}};_AcmEventGateway.unregisterEventListeners=function(){var doc=this._window.document;var i,types=Acm.EventGateway.mouseEvents;if(Acm.Browser.isIe){Acm.EventGateway.mouseEvents.push("mousewheel");for(i=0;i<types.length;i++){doc.detachEvent('on'+types[i],this._onMouseEvent);}}else{Acm.EventGateway.mouseEvents.push("DOMMouseScroll");for(i=0;i<types.length;i++){doc.removeEventListener(types[i],this._onMouseEvent,false);}}
types=Acm.EventGateway.keyboardEvents;if(Acm.Browser.isIe){for(i in types){doc.body.detachEvent('on'+types[i],this._onKeyEvent);}}else{for(i in types){doc.removeEventListener(types[i],this._onKeyEvent,false);}}
if(Acm.Browser.isIe){doc.body.onselect=doc.onselectstart=doc.onselectionchange=this._onSelectEvent=null;}
types=Acm.EventGateway.windowEvents;if(Acm.Browser.isIe){for(i in types){this._window.detachEvent('on'+types[i],this._onWindowEvent);}}else{for(i in types){this._window.removeEventListener(types[i],this._onWindowEvent,false);}}};_AcmEventGateway.onObjectEvent=function(e){var type=e.type;var el=e.target||e.srcElement;var target=(el._acmComponent&&el._acmComponent._enabled)?el._acmComponent:false;if(!target){for(el;el!=null;el=el.parentNode){if(el._acmComponent&&el._acmComponent._enabled){target=el._acmComponent;}}}
if(target){target.dispatchEvent(new Acm.Event(type,e));}};_AcmEventGateway.onMouseEvent=function(e){var type=e.type;var el=e.target||e.srcElement;var tagName=el.tagName;var target=(el._acmComponent)?el._acmComponent:false;if(!target){for(var ele=el;ele;ele=ele.parentNode){if(ele._acmComponent&&ele._acmComponent._enabled&&!(ele._acmComponent instanceof Acm.ListBoxRow)){target=ele._acmComponent;break;}}}
if(!target){return;}
if(target.mapElement){target=target.mapElement(el);}
var mouseEvent=new Acm.MouseEvent(type,e);mouseEvent.setDispatcher(target);if(type!='mousemove'&&type!='mouseover'){if(target.getModalRoot()&&!(target instanceof Acm.Option)){mouseEvent.preventDefault();mouseEvent.dispose();return false;}}
var dropComponent;var dragMouseEvent;switch(type){case'mouseover':if(this._prevMouseOver){if((this._prevMouseOver._enabled&&target!=this._prevMouseOver)){this._prevMouseOver.dispatchEvent(new Acm.MouseEvent('mouseout',e));if(this._dragFlag){this._prevMouseOver.dispatchEvent(new Acm.MouseComponentEvent('dragOut',e,this._dragComponent));}
this._prevMouseOver=target;}else if(this._prevMouseOver==target){return;}else{this._prevMouseOver=target;}}else{this._prevMouseOver=target;}
break;case'click':if(Acm.Browser.isMoz&&mouseEvent.getButton()!=Acm.MouseEvent.LEFT){return false;}
break;case'contextmenu':if(typeof target.useBrowserContextmenu!=='undefined'&&target.useBrowserContextmenu){mouseEvent.dispose();return true;}else{mouseEvent.preventDefault();mouseEvent.dispose();return false;}
break;case'mousedown':this._preDragFlag=true;this._dragComponent=target;Acm.MouseEvent._button=e.button;Acm.EventGateway._noContextMenu=false;var targetElement=e.target||e.srcElement;if(tagName=='IMG'){mouseEvent.preventDefault();}
this.setFocusedComponent(target,true,mouseEvent);break;case'mouseup':if(this._dragFlag){if(mouseEvent.getButton()==Acm.MouseEvent.RIGHT){Acm.EventGateway._noContextMenu=true;}
dragMouseEvent=new Acm.MouseEvent('dragEnd',e);this._dragComponent.dispatchEvent(dragMouseEvent);if(target._dropOnPoint){this._dragComponent.setEnabled(false);dropComponent=application.getContainer().getComponentFromPoint(dragMouseEvent.getClientX(),dragMouseEvent.getClientY());this._dragComponent.setEnabled(true);}else{dropComponent=target;}
var eventName='drop';var dropMouseEvent=new Acm.MouseComponentEvent(eventName,e,this._dragComponent);dropComponent.dispatchEvent(dropMouseEvent);dragMouseEvent.dispose();dropMouseEvent.dispose();}
this._dragComponent=null;this._dragFlag=false;this._preDragFlag=false;break;case'mousemove':if(mouseEvent.getClientX()){this._cursorClientX=mouseEvent.getClientX();this._cursorClientY=mouseEvent.getClientY();}
if(this._preDragFlag){if(!this._dragFlag){this._dragFlag=true;this._dragComponent.dispatchEvent(new Acm.MouseEvent('dragStart',e));Acm.EventGateway._dragStartX=mouseEvent.getClientX();Acm.EventGateway._dragStartY=mouseEvent.getClientY();}else{dragMouseEvent=new Acm.DragEvent('drag',e,target);this._dragComponent.dispatchEvent(dragMouseEvent);dragMouseEvent.dispose();}}
if(tagName=='IMG'){mouseEvent.preventDefault();}
break;case'dblclick':if(mouseEvent.getButton()==Acm.MouseEvent.RIGHT){return false;}
break;}
target.dispatchEvent(mouseEvent);if(type=='mouseup'&&mouseEvent.getButton()==Acm.MouseEvent.RIGHT){var contextMenuEvent=new Acm.MouseEvent('contextmenu',e);target.dispatchEvent(contextMenuEvent);Acm.MouseEvent._button=-1;}
if(type=='mouseover'&&this._dragFlag){target.dispatchEvent(new Acm.MouseComponentEvent('dragOver',e,this._dragComponent));}
return true;};_AcmEventGateway.onSelectEvent=function(anEvent){var e=anEvent||this._window.event;if(!e){return true;}
var el=e.srcElement;if(el){var tagName=el.tagName?el.tagName.toUpperCase():null;if(tagName=='TEXTAREA'||tagName.toUpperCase()=='INPUT'){return true;}}
while(el!=null){if(el._acmComponent){if(el._acmComponent._enabled){break;}}
el=el.parentNode;}
if(el==null){return true;}
var target=el._acmComponent;if(!target.getTextSelectable()||(this._dragComponent&&!this._dragComponent.getTextSelectable())||el.tagName.toUpperCase()=='IMG'){e.returnValue=false;return false;}
return true;};_AcmEventGateway.onKeyEvent=function(e){var type=e.type;var target=this.getFocusedComponent()||this.getContainer();if(target.mapElement){target=target.mapElement(el);}
if(Acm.Browser.isIe&&type=='keypress'){return;}
var ev=new Acm.KeyboardEvent(type,e);this._currentEvent=ev;target.dispatchEvent(ev);if(Acm.Browser.isIe&&type=='keydown'){var keypressEv=new Acm.KeyboardEvent('keypress',e);this._currentEvent=keypressEv;target.dispatchEvent(keypressEv);}};_AcmEventGateway.onFormEvent=function(e){var type=e.type;var el=e.target||e.srcElement;while(el!=null&&el._acmComponent==null){el=el.parentNode;}
if(el==null){return;}
target=el._acmComponent;var ev=new Acm.Event(type,e);this._currentEvent=ev;target.dispatchEvent(ev);};_AcmEventGateway.onErrorEvent=function(e){dl('onErrorEvent!');var el=e.target||e.srcElement;while(el!=null&&el._acmComponent==null){el=el.parentNode;}
if(el==null){return;}
target=el._acmComponent;var ev=new Acm.ErrorEvent('error',e);this._currentEvent=ev;target.dispatchEvent(ev);};_AcmEventGateway.onWindowEvent=function(e){var type=e.type.toLowerCase();var target=e.target||e.srcElement||this._window.document.body;target=type=='scroll'?target._acmComponent:this._window.document.body._acmComponent;if(target){target.dispatchEvent(new Acm.Event(type,e));}};_AcmEventGateway.setFocusedComponent=function(oComp,bHideFocus,prevEvent){if(oComp==null){return;}
var newFocused=oComp;while(newFocused!=null&&(!newFocused._enabled||!newFocused._canHaveFocus)){newFocused=newFocused._parentComponent;}
if(!newFocused||this._focusedComponent==newFocused){return;}
if(newFocused.getShowFocus()||!bHideFocus){try{newFocused._element.focus();}
catch(e){}}
var tm=newFocused.getTabManager();if(tm){tm.setFocusedComponent(newFocused);}
var prevFocused=this._focusedComponent;if(prevFocused){if(!prevFocused._disposed){prevFocused._focused=false;if(prevFocused.getShowFocus()){prevFocused.hideFocus();}
prevFocused.dispatchFocusEvent(new Acm.FocusEvent('blurred',newFocused,prevFocused,prevEvent));}}
newFocused._focused=true;if(newFocused.getShowFocus()&&bHideFocus!=true&&bHideFocus!=undefined){newFocused.showFocus();}
this._prevFocusedComponent=this._focusedComponent;this._focusedComponent=newFocused;newFocused.dispatchFocusEvent(new Acm.FocusEvent('focused',newFocused,prevFocused,prevEvent));newFocused.dispatchEvent(new Acm.FocusEvent('focusChange',newFocused,prevFocused,prevEvent));};_AcmEventGateway.getFocusedComponent=function(){return this._focusedComponent;};_AcmEventGateway.getPrevFocusedComponent=function(){return this._prevFocusedComponent;};_AcmEventGateway.getContainer=function(){return this._container;};_AcmEventGateway.setContainer=function(oContainer){this._container=oContainer;};_AcmEventGateway.endDrag=function(){this._preDragFlag=this._dragFlag=false;this._dragComponent=null;};_AcmEventGateway.getDragFlag=function(){return this._dragFlag;};Acm.EventCoordinator=function(){this._listeners={};this._orphanListeners={};this._eventSources=[];};var _AcmEventCoordinator=Acm.extend('EventCoordinator','EventTarget');Acm.EventCoordinator._instance=null;_AcmEventCoordinator._orphanListeners=null;_AcmEventCoordinator._listeners=null;_AcmEventCoordinator._eventSources=null;_AcmEventCoordinator.dispose=function(){if(this._disposed){return;}
Acm.EventCoordinator.parent.dispose.call(this);this._listeners=null;this._orphanListeners=null;this._eventSources=null;};Acm.EventCoordinator.instance=function(){if(!Acm.EventCoordinator._instance){Acm.EventCoordinator._instance=new Acm.EventCoordinator();}
return Acm.EventCoordinator._instance;};_AcmEventCoordinator.addXmlElement=function(oNode){if(oNode.nodeType!=Acm.DomNode.ELEMENT_NODE){return oNode;}
var json;if(oNode.tagName=='dispatchOrphan'){for(var i=0;i<oNode.childNodes.length;i++){var node=oNode.childNodes[i];if(node.nodeType==Acm.DomNode.ELEMENT_NODE){if(node.tagName=='event'){var _e=new Acm.Event(node.getAttribute('type'));var triggerHashCode=node.getAttribute('hashCode');if(triggerHashCode.length){_e.setTriggerHashCode(triggerHashCode);}
if(node.hasChildNodes()){if(node.firstChild.nodeType==Acm.DomNode.CDATA_SECTION_NODE){json=node.firstChild.data;}else if(node.firstChild.nextSibling.nodeType==Acm.DomNode.CDATA_SECTION_NODE){json=node.firstChild.nextSibling.data;}else{json=node.firstChild.nodeValue;}
eval("_e.setData({"+json+"})");}
this.dispatchOrphan(_e);}}}
return true;}};_AcmEventCoordinator.dispatchOrphan=function(evt){var listeners=this._orphanListeners[evt.getType()];var triggerHashCode=evt.getTriggerHashCode();if(!listeners){return;}
for(var i=0,l=listeners.length;i<l;i++){var listenerData=listeners[i];if(triggerHashCode){if(triggerHashCode==listenerData.listenerObject.getHashCode()){listenerData.listenerObject.dispatchEvent(evt);}}else{listenerData.listenerObject.dispatchEvent(evt);}}};_AcmEventCoordinator.registerEventSource=function(sourceId,obj){var once=false;if(this._listeners[sourceId]){var sourceGroup=this._listeners[sourceId];for(var listeners in sourceGroup){once=false;for(var i=0;i<sourceGroup[listeners].length;i++){var listener=sourceGroup[listeners][i];if(once==false){listener.listenerObject.dispatchEvent(new Acm.CoordinatorEvent('registerEventSource',sourceId,obj));once=true;}
listener.listenerObject.dispatchEvent(new Acm.CoordinatorEvent('registerEventListener',listener.eventType));obj.addEventListener(listener.eventType,listener.eventHandler,listener.listenerObject);}}}
this._eventSources[sourceId]=obj;};_AcmEventCoordinator.unregisterEventSource=function(sourceId,obj){if(this._listeners[sourceId]){var once=false;if(this._listeners[sourceId]){var sourceGroup=this._listeners[sourceId];for(var listeners in sourceGroup){once=false;for(var listenerKey in sourceGroup[listeners]){var listener=sourceGroup[listeners][listenerKey];if(once==false){listener.listenerObject.dispatchEvent(new Acm.CoordinatorEvent('unregisterEventSource',sourceId,obj));once=true;}
listener.listenerObject.dispatchEvent(new Acm.CoordinatorEvent('unregisterEventListener',listener.eventType));obj.removeEventListener(listener.eventType,listener.eventHandler,listener.listenerObject);}}}}
delete this._eventSources[sourceId];};_AcmEventCoordinator.registerEventListener=function(sourceId,eventType,eventHandler,listenerObject){var listenerId=listenerObject.getId();var listenerData={'eventHandler':eventHandler,'listenerObject':listenerObject,'listenerId':listenerId,'eventType':eventType};if(!sourceId){if(!this._orphanListeners[eventType]){this._orphanListeners[eventType]=[];}
this._orphanListeners[eventType].push(listenerData);listenerObject.addEventListener(eventType,eventHandler,listenerObject);}else{if(!this._listeners[sourceId]){this._listeners[sourceId]={};}
if(!this._listeners[sourceId][listenerId]){this._listeners[sourceId][listenerId]=[];}
this._listeners[sourceId][listenerId].push(listenerData);}
if(sourceId){if(this._eventSources[sourceId]){this._eventSources[sourceId].dispatchEvent(new Acm.CoordinatorEvent('registerEventListener',sourceId,listenerObject,eventType));this._eventSources[sourceId].addEventListener(eventType,eventHandler,listenerObject);}}};_AcmEventCoordinator.unregisterEventListener=function(sourceId,eventType,eventHandler,listenerObject){var i;var listener;var listeners;if(sourceId){if(this._eventSources[sourceId]){this._eventSources[sourceId].dispatchEvent(new Acm.CoordinatorEvent('unregisterEventListener',sourceId,listenerObject,eventType));this._eventSources[sourceId].removeEventListener(eventType,eventHandler,listenerObject);for(i in this._listeners[sourceId][listenerObject.getId()]){listener=this._listeners[sourceId][listenerObject.getId()][i];if(listener.eventType==eventType){delete this._listeners[sourceId][listenerObject.getId()][i];}}}}else{if(this._orphanListeners[listenerObject.getId()]){listeners=this._orphanListeners[listenerObject.getId()];for(i in listeners){listener=listeners[i];if(listener.eventType==eventType){Acm.Array.removeAt(this._orphanListeners[listenerObject.getId()],i);}}}}};_AcmEventCoordinator.unregisterAllEventListeners=function(listenerObject){for(var eventType in this._orphanListeners){for(var i=0,a=this._orphanListeners[eventType],l=a.length;i<l;i++){if(a[i].listenerObject==listenerObject){Acm.Array.removeAt(this._orphanListeners[eventType],i);i--;l--;}}}
for(var sourceId in this._eventSources){if(listenerObject.getId()){delete this._listeners[sourceId][listenerObject.getId()];}}};Acm.XmlHttp=function(component,readyStateWrapper){this._component=component;this._readyStateWrapper=readyStateWrapper;if(!Acm.Browser.isIe){this._xmlHttpObject=new XMLHttpRequest();}else{this._xmlHttpObject=new ActiveXObject("Microsoft.XMLHTTP");}
var self=this;this._xmlHttpObject.onreadystatechange=function(){if(typeof(self._readyStateWrapper)=="function"){self._readyStateWrapper.call(self);}else{self.readyStateChange();}};};Acm.XmlHttp.requestUrlPrefix=Acm.XmlHttp.requestUrlPrefix||"";var _AcmXmlHttp=Acm.extend('XmlHttp','EventTarget');_AcmXmlHttp._xmlHttpObject=null;_AcmXmlHttp._requestMethod='GET';_AcmXmlHttp._url=null;_AcmXmlHttp._component=null;_AcmXmlHttp._readyStateWrapper=null;_AcmXmlHttp.dispose=function(){if(this._disposed){return;}
Acm.XmlHttp.parent.dispose.call(this);if(!Acm.Browser.isIe){this._xmlHttpObject.onreadystatechange=null;}
this._xmlHttpObject=null;this._url=null;this._component=null;};_AcmXmlHttp.abort=function(){this._xmlHttpObject.abort();};_AcmXmlHttp.send=function(requestMethod,url,data,headers){if(this._component&&!Acm.Browser.isIe){url=this._component.getContainer().getPath()+url;}
if(url.substr(0,1)=="?"){url=Acm.XmlHttp.requestUrlPrefix+"index.php"+url;}else{url=Acm.XmlHttp.requestUrlPrefix+url;}
this.setRequestMethod(requestMethod);this._url=url;this._xmlHttpObject.open(this._requestMethod,url,true);if(typeof(headers)=='object'){for(var i in headers){this.setRequestHeader(i,headers[i]);}}
this.setRequestHeader('X-Requested-With','XMLHttpRequest');var self=this;this._xmlHttpObject.onreadystatechange=function(){if(typeof(self._readyStateWrapper)=="function"){self._readyStateWrapper.call(self);}else{self.readyStateChange();}};this._xmlHttpObject.send(data||null);};_AcmXmlHttp.setRequestMethod=function(sMethod){this._requestMethod=sMethod;};_AcmXmlHttp.setRequestHeader=function(name,value){this._xmlHttpObject.setRequestHeader(name,value);};_AcmXmlHttp.getResponseText=function(){return this._xmlHttpObject.responseText;};_AcmXmlHttp.getResponseXml=function(){return this._xmlHttpObject.responseXML;};_AcmXmlHttp.getState=function(){return this._xmlHttpObject.readyState;};_AcmXmlHttp.getStatus=function(){return this._xmlHttpObject.status;};_AcmXmlHttp.getUrl=function(){return this._url;};_AcmXmlHttp.readyStateChange=function(){try{if(this._disposed){return;}
if(this.getState()==4){if(this.getStatus()=='200'||this.getStatus()=='0'){this.dispatchEvent(new Acm.Event('loaded'));}else{if(Acm.Browser.isIe&&this.getStatus()==12029){throw(new Acm.ConnectionException(t_("Could not connect to web server.")+" XHR Status "+this.getStatus()));}else{throw('Acm.XmlHttp error: '+this.getStatus()+'. URL: '+this._url+'. Response: '+this.getResponseText());}}}}catch(ex){if(typeof(ex)=="string"){throw(new Acm.NoXmlException(ex));}
if(typeof(ex.message)!="string"){ex.message=ex.toString();}
if(ex.message.indexOf("(NS_ERROR_NOT_AVAILABLE)")>=0){throw(new Acm.ConnectionException(ex.message));}else if(ex instanceof Acm.ConnectionException){throw(ex);}else{throw(ex);}}};Acm.XmlHttpBackReference=function(oComp){Acm.Object.call(this);this._dispatcher=oComp;this._properties=[];this.setVar('dispatcher',oComp);if(!desktop&&oComp.getContainer()){desktop=oComp.getContainer().getComponentById('theDesktop');}
this.setVar('desktop',desktop);this.setVar('eventCoordinator',Acm.EventCoordinator.instance());};var _AcmXmlHttpBackReference=Acm.extend('XmlHttpBackReference','Object');_AcmXmlHttpBackReference._dispatcher=null;_AcmXmlHttpBackReference._properties=null;_AcmXmlHttpBackReference._xmlParser=null;_AcmXmlHttpBackReference.dispose=function(){Acm.XmlHttpBackReference.parent.dispose.call(this);this._dispatcher=null;this._properties=null;this._xmlParser=null;};_AcmXmlHttpBackReference.setXmlParser=function(xmlParser){this._xmlParser=xmlParser;};_AcmXmlHttpBackReference.getXmlParser=function(){return this._xmlParser;};_AcmXmlHttpBackReference.getDispatcher=function(){return this._dispatcher;};_AcmXmlHttpBackReference.setVar=function(key,val){this._properties[key]=val;};_AcmXmlHttpBackReference.getVar=function(key){return this._properties[key];};var glob=0;Acm.Component=function(){};var _AcmComponent=Acm.extend('Component','EventTarget');_AcmComponent._tagName='DIV';_AcmComponent._parentComponent=null;_AcmComponent._addTextNodesFromXML=false;_AcmComponent._visible=null;_AcmComponent._element=null;_AcmComponent._addToElement=null;_AcmComponent._created=false;_AcmComponent._canHaveFocus=false;_AcmComponent._ieLayoutComponents=true;_AcmComponent._id=null;_AcmComponent._zIndex=null;_AcmComponent._width=null;_AcmComponent._height=null;_AcmComponent._left=null;_AcmComponent._right=null;_AcmComponent._bottom=null;_AcmComponent._top=null;_AcmComponent._contextMenu=null;_AcmComponent._toolTip=null;_AcmComponent._toolTipEvents=null;_AcmComponent._focused=null;_AcmComponent._showFocus=false;_AcmComponent._tabIndex=null;_AcmComponent._tabManager=null;_AcmComponent._tabStop=null;_AcmComponent._value=null;_AcmComponent._isModalRoot=null;_AcmComponent._xmlLoader=null;_AcmComponent._backReference=null;_AcmComponent._textSelectable=null;_AcmComponent._modal=null;_AcmComponent._container=null;_AcmComponent._objectEventListeners=null;_AcmComponent._lazy=null;_AcmComponent._children=null;Acm.Component.activeContextMenu=null;Acm.Component.tabIndex=0;_AcmComponent.dispose=function(){if(this._disposed){return;}
Acm.Component.parent.dispose.call(this);if(this._children){for(var i=this._children.length-1;i>=0;i--){this._children[i].dispose();}}
this._children=null;this._componentsById=null;if(this._parentComponent&&this._parentComponent._element&&this._element){try{this._parentComponent._element.removeChild(this._element);}
catch(e){}}
var id=this.getId();if(id&&this._parentComponent&&this._parentComponent._componentsById){delete this._parentComponent._componentsById[id];}
if(this._focused){var p=this.getContainer().getEventGateway().getPrevFocusedComponent();if(p){p.setFocus(true);}}
this._id=null;this._tagName=null;this._addTextNodesFromXML=null;this._visible=null;if(this._element){this._element._acmComponent=null;}
this._element=null;this._created=null;this._container=null;this._canHaveFocus=null;this._ieLayoutComponents=null;this._zIndex=null;this._width=null;this._height=null;this._left=null;this._right=null;this._bottom=null;this._top=null;if(this._contextMenu){this._contextMenu.dispose();}
if(this._toolTip){this._toolTip.dispose();}
this._contextMenu=null;this._toolTip=null;this._toolTipEvents=null;this._focused=null;this._showFocus=null;this._tabIndex=null;var tabManager=this.getTabManager();if(tabManager&&(this._tabStop||this._tabIndex)){tabManager.removeTabStop(this);}
this._tabStop=null;if(this._tabManager){this._tabManager.dispose();}
this._value=null;this._isModalRoot=null;if(this._xmlLoader){this._xmlLoader.dispose();}
this._xmlLoader=null;if(this._xmlHttp){this._xmlHttp.dispose();}
this._xmlHttp=null;this._xmlLoader=null;this._textSelectable=null;if(this._modal){if(!this._modal._disposed){this._modal._isModalRoot=null;}}
this._parentComponent=null;this._objectEventListeners=null;};_AcmComponent.addEventListener=function(eventType,eventHandler,eventObject){if(Acm.EventGateway.objectEvents[eventType]){if(this._element){if(Acm.Browser.isIe){this._element.attachEvent('on'+eventType,this.getContainer().getEventGateway().onObjectEvent);}else{this._element.addEventListener(eventType,this.getContainer().getEventGateway().onObjectEvent,false);}}else{if(!this._objectEventListeners){this._objectEventListeners=[];}
this._objectEventListeners.push({'eventType':eventType,'eventHandler':eventHandler,'eventObject':eventObject});}}
Acm.Component.parent.addEventListener.call(this,eventType,eventHandler,eventObject);};_AcmComponent.setParentComponent=function(oComp){this._parentComponent=oComp;this._container=oComp._container;if(!this._container){alert('no cont:'+oComp+', this: '+this);}
this._document=this._container.getDocument();};_AcmComponent.getParentComponent=function(oComp){return this._parentComponent;};_AcmComponent.setContainer=function(oContainer){this._container=oContainer;this._document=oContainer.getDocument();};_AcmComponent.getContainer=function(){return this._container;};_AcmComponent.addElement=function(el){if(typeof(el)=='string'){el=this._container.createElement(el.toUpperCase());}
if(el&&this._element){this._element.appendChild(el);return el;}};_AcmComponent.appendChild=function(ele){return this._element.appendChild(ele);};_AcmComponent.addElementBefore=function(newElement,existing){if(typeof(newElement)=='string'){newElement=this._container.createElement(newElement.toUpperCase());}
if(existing._element){existing=existing._element;}
if(newElement&&this._element){this._element.insertBefore(newElement,existing);return newElement;}};_AcmComponent.addElementAfter=function(newElement,existing){if(typeof(newElement)=='string'){newElement=this._container.createElement(newElement.toUpperCase());}
var p=newElement.parentNode;if(!p||p.nodeType==11){if(this._element.lastChild==existing){this._element.appendChild(newElement);}else{try{this._element.insertBefore(newElement,existing.nextSibling);}catch(e){}}}};_AcmComponent.addElementFirst=function(newElement){if(typeof(newElement)=='string'){newElement=this._container.createElement(newElement.toUpperCase());}
if(newElement&&this._element){if(this._element.hasChildNodes()){this._element.insertBefore(newElement,this._element.childNodes[0]);}else{this._element.appendChild(newElement);}
return newElement;}};_AcmComponent.addTextNode=function(textNode){if(Acm.Browser.isIe){this._element.innerHTML+=textNode.nodeValue;return textNode;}else{return this._element.appendChild(textNode);}};_AcmComponent.addText=function(sText){sText=this._element.appendChild(this._container.createTextNode(sText));return sText;};_AcmComponent.setText=function(text){this.deleteAllComponents();while(this._element.hasChildNodes()){this._element.removeChild(this._element.firstChild);}
this.addText(text);};_AcmComponent.deleteElement=function(el){try{this._element.removeChild(el);}catch(e){alert('Error in Acm.Component::deleteElement. '+this._className);}
el=null;};_AcmComponent.addXmlElement=function(element,backReferenceObject){var xmlParser=backReferenceObject.getXmlParser();var param;switch(element.tagName){case'objects':this.addObjects(eval(new Array('[',element.firstChild.nodeValue,']').join('')));if(!this.toHtml){dl('this.toHtml: '+this);}
this.setInnerHtml(this.toHtml().join(''));return true;case'invoke':var methodName=element.getAttribute('method'),params=null;if(this[methodName]){params=[];if(element.firstChild){var i,paramNodes=element.getElementsByTagName('param');var noOfParamNodes=paramNodes.length;for(i=0;i<noOfParamNodes;++i){param=paramNodes.item(i);params.push(param.firstChild?Acm.CastAttributeValue(param.firstChild.nodeValue):null);}}
this[methodName].apply(this,params);}
return true;case'contextMenu':var cm=this.setContextMenu(new Acm.Menu());xmlParser.processAttributes(cm,element);xmlParser.processChildNodes(cm,element,backReferenceObject);cm.dispatchEvent(new Acm.Event('complete'));return true;case'toolTip':var tt=new Acm.ToolTip();tt.create();tt.setContainer(this.getContainer());this.processAttributes(tt,element);tt.processChildNodes(element);tt.dispatchEvent(new Acm.Event('complete',backReferenceObject));this.setToolTip(tt);return true;default:if(element.tagName.substr(0,3)=='get'){if(typeof this[element.tagName]=='function'){param=element.getAttribute('param');var oComp=this[element.tagName](param);if(oComp instanceof Acm.Component){xmlParser.processAttributes(oComp,element);xmlParser.processChildNodes(oComp,element,backReferenceObject);oComp.dispatchEvent(new Acm.Event('xmlUpdate'));}else{alert('The method "'+element.tagName+'" did not return an Acm.Component.');}}else{alert('The method "'+element.tagName+'" is not recognized by this object ('+this._className+').');}
return true;}}
return Acm.Component.parent.addXmlElement.call(this,element,backReferenceObject);};_AcmComponent.addComponent=function(oComp){if(oComp._lazy){if(!this._children){this._children=[];}
this._children.push(oComp);if(oComp._id){if(!this._componentsById){this._componentsById={};}
this._componentsById[oComp._id]=oComp;}
oComp._parentComponent=this;}else{if(!this._addComponent(oComp)){return oComp;}
if(!this._element){this.create();}
if(!oComp._created){oComp.create();}
if(Acm.Array.indexOf(this._children,oComp)==-1){this._children.push(oComp);}
if(oComp._noAppend){return oComp;}
var el=oComp._element;var p=el.parentNode;if(!p||p.nodeType==11){(this._addToElement||this._element).appendChild(el);}
this.dispatchEventNonPropagating(new Acm.ComponentEvent('componentAdd',oComp));return oComp;}};_AcmComponent.addComponentFromXml=function(comp,c,backReferenceObject,noAppend){if(comp instanceof Acm.Component){comp._noAppend=true;this.addComponent(comp);comp._noAppend=null;}else{comp._parentComponent=this;}
backReferenceObject._xmlParser.processChildNodes(comp,c,backReferenceObject);if(comp instanceof Acm.Component&&!noAppend){comp._parentComponent.appendComponent(comp);}};_AcmComponent.appendComponent=function(comp){var ele=this._addToElement||this._element;if(ele){ele.appendChild(comp._element);}};_AcmComponent.addComponentBefore=function(newComponent,existingComponent){if(newComponent==this||!newComponent||!existingComponent||newComponent==existingComponent){return false;}
if(!this._addComponent(newComponent)){return false;}
if(!newComponent._created){newComponent.create();}
Acm.Array.insertBefore(this._children,newComponent,existingComponent);var p=newComponent._element.parentNode;if(!p||p.nodeType==11){(this._addToElement||this._element).insertBefore(newComponent._element,existingComponent._element);}
this.dispatchEventNonPropagating(new Acm.ComponentEvent('componentAdd',newComponent));return newComponent;};_AcmComponent.addComponentAfter=function(newComponent,existingComponent){if(newComponent==this||!newComponent||!existingComponent||newComponent==existingComponent){return false;}
if(!this._addComponent(newComponent)){return false;}
if(!newComponent._created){newComponent.create();}
Acm.Array.insertAfter(this._children,newComponent,existingComponent);var p=newComponent._element.parentNode;if(!p||p.nodeType==11){if(this._element.lastChild==existingComponent._element){(this._addToElement||this._element).appendChild(newComponent._element);}else{try{(this._addToElement||this._element).insertBefore(newComponent._element,existingComponent._element.nextSibling);}catch(e){}}}
this.dispatchEventNonPropagating(new Acm.ComponentEvent('componentAdd',newComponent));return newComponent;};_AcmComponent.addComponentFirst=function(newComponent){if(!this._addComponent(newComponent)){return false;}
if(!newComponent._created){newComponent.create();}
Acm.Array.insertAt(this._children,newComponent,0);var ele=(this._addToElement||this._element);var p=newComponent._element.parentNode;if(!p||p.nodeType==11){ele.insertBefore(newComponent._element,ele.firstChild);}
this.dispatchEventNonPropagating(new Acm.ComponentEvent('componentAdd',newComponent));return newComponent;};_AcmComponent._addComponent=function(oComp){oComp._parentComponent=this;oComp._container=this._container;if(!this._children){this._children=[];}
if(oComp._id){if(!this._componentsById){this._componentsById={};}
this._componentsById[oComp._id]=oComp;}
if(oComp._tabStop){var tm=this.getTabManager();if(tm){tm.addTabIndex(oComp);}}
return true;};_AcmComponent.addObjects=function(children){for(var i=0,e,o,p,a=children,l=a.length;i<l;i++){e=a[i];o=new e[0];p=e[1];for(var j in p){o[j]=p[j];}
o._parentComponent=this;o._container=this._container;this._lazy=o._lazy=true;this.addComponent(o);if(e[2]){o.addObjects(e[2]);}}};_AcmComponent.removeComponent=function(oComp){this._removeComponent(oComp);this.dispatchEventNonPropagating(new Acm.ComponentEvent('componentRemove',oComp));};_AcmComponent.deleteComponent=function(oComp){if(oComp){this._removeComponent(oComp);oComp.dispose();this.dispatchEventNonPropagating(new Acm.ComponentEvent('componentDelete',oComp));}};_AcmComponent._removeComponent=function(oComp){if(this._children&&Acm.Array.indexOf(this._children,oComp)>=0){try{var ele=(oComp._element)?oComp._element:oComp.getElement();(this._addToElement||this._element).removeChild(ele);}catch(e){}
Acm.Array.remove(this._children,oComp);if(oComp.getId()){delete this._componentsById[oComp.getId()];}}};_AcmComponent.deleteAllComponents=function(){if(this._children){var children=this._children;while(children.length>0){this.deleteComponent(children[0]);}}
var ele=this._element;if(ele){while(ele.hasChildNodes()===true){ele.removeChild(ele.childNodes[0]);}}
this._children=null;};_AcmComponent.getPreviousSibling=function(){var c=this._parentComponent._children;var i=Acm.Array.indexOf(c,this);if(i>0){return c[i-1];}
return false;};_AcmComponent.getNextSibling=function(){var c=this._parentComponent._children;var i=Acm.Array.indexOf(c,this);if(i!=-1&&i+1<c.length){return c[(i+1)];}
return false;};_AcmComponent.getLastChild=function(){var c=this._children;if(c&&c.length>0){return c[c.length-1];}
return false;};_AcmComponent.createPrototype=function(){var prot=new this.constructor();prot.setContainer(this.getContainer());var ele=prot.setElement(this._container.createElement(prot._tagName));ele._acmComponent=this;return prot;};_AcmComponent.create=function(){var p=this._container._prototypes[this._className];var ele;if(!this._element){if(p){ele=p._element.cloneNode(true);}else{var prot=this.createPrototype();this._container._prototypes[this._className]=prot;ele=prot._element.cloneNode(true);}}else{ele=this._element;}
ele._acmComponent=this;this._element=ele;if(this._objectEventListeners){for(var i=0,a=this._objectEventListeners,l=a.length;i<l;i++){var o=a[i];this.addEventListener(o.eventType,o.eventHandler,o.eventObject);}}
this._created=true;};_AcmComponent.toString=function(){return'[object '+this._className+', hashCode: '+this.getHashCode()+', tagName: '+this._tagName+', id: '+this.getId()+']';};_AcmComponent.getPath=function(){return this.getContainer().getApplicationPath();};_AcmComponent.dispatchFocusEvent=function(eventObject){if(this._disposed){return;}
if(!this._listeners||this._listeners.length===0){return;}
if(this.getContainer){this.getContainer().getEventGateway().setCurrentEvent(eventObject);}
eventObject._dispatcher=this;this._dispatchFocusEvent(eventObject);};_AcmComponent._dispatchFocusEvent=function(eventObject){eventObject._currentTarget=this;if(eventObject._type=='blurred'&&eventObject._newFocused){if(eventObject._newFocused.isChildOf(this)){return;}}else if(eventObject._type=='focused'&&eventObject._prevFocused){if(eventObject._prevFocused.isChildOf(this)){return;}}
if(this._enabled&&this._listeners){var li=this._listeners[eventObject._type];if(li){var i,f,o;for(i in li){f=li[i].eventHandler;o=li[i].eventObject;if(typeof f=="function"){if(typeof o=="object"){if(o._enabled){f.call(o,eventObject);}}else{f.call(this,eventObject);}}}}}
if(eventObject._bubbles&&!eventObject._propagationStopped&&this._parentComponent){if(this instanceof Acm.Window){return;}
this._parentComponent._dispatchFocusEvent(eventObject);}};_AcmComponent.setIeLayoutComponents=function(b){this._ieLayoutComponents=b;};_AcmComponent.getIeLayoutComponents=function(){return this._ieLayoutComponents;};_AcmComponent.setModal=function(modal){if(this._modal==modal){return;}
if(!modal){if(this._modal){this._modal._isModalRoot=null;}
this._modal=null;}else{if(modal instanceof Acm.Component){this._modal=modal;}else if(modal===true){this._modal=this.getContainer();}
if(this._modal){this._modal._isModalRoot=true;}}};_AcmComponent.getModal=function(){return this._modal;};_AcmComponent.setTextSelectable=function(b){this.setStyleProperty('cursor',b?'text':'default');if(!Acm.Browser.isIe){this.setStyleProperty('MozUserSelect',b?'normal':'none');}
this._textSelectable=b;};_AcmComponent.getTextSelectable=function(b){if(this._textSelectable!==null){return this._textSelectable;}
for(var comp=this._parentComponent;comp;comp=comp._parentComponent){if(comp._textSelectable!==null){return comp._textSelectable;}}
return false;};_AcmComponent.setOpacity=function(iOpacity){if(Acm.Browser.isMoz){if(iOpacity===100){this.setStyleProperty('opacity','');}else{iOpacity=iOpacity/100;this.setStyleProperty('opacity',iOpacity);}}else{this.setStyleProperty('filter','alpha(opacity='+iOpacity+')');}};_AcmComponent.setValue=function(value){this._value=value;};_AcmComponent.getValue=function(){return this._value;};_AcmComponent._onSelectStart=function(e){e.preventDefault();e.stopPropagation();};_AcmComponent.getElement=function(){return this._element;};_AcmComponent.setElement=function(element){if(element){this._element=element;}
return this;};_AcmComponent.getAddToElement=function(){return this._addToElement;};_AcmComponent.setAddToElement=function(element){this._addToElement=element;};_AcmComponent.getFocus=function(){return this._focused;};_AcmComponent.getPageX=function(){var x=0,el=this._element;while(el){if(Acm.IsDefined(el.offsetLeft)){x+=el.offsetLeft;}
if(el.scrollLeft>0){x-=el.scrollLeft;}
el=Acm.IsDefined(el.offsetParent)?el.offsetParent:null;}
return x;};_AcmComponent.getPageY=function(){var y=0,el=this._element;while(el){if(Acm.IsDefined(el.offsetTop)){y+=el.offsetTop;}
if(el.scrollTop>0){y-=el.scrollTop;}
el=Acm.IsDefined(el.offsetParent)?el.offsetParent:null;}
return y;};_AcmComponent.getZIndex=function(){if(this._zIndex!==null){return this._zIndex;}
var z,c=this._parentComponent;while(c){z=c._zIndex;if(z!==null){return z;}
c=c._parentComponent;}
return(c!='undefined')?c:null;};_AcmComponent.setZIndex=function(iZIndex){this._zIndex=iZIndex;if(!this._element){alert('no element zindex: '+this._className);}
if(!this._element){alert('setZIndex error: no element, '+this._className);}else{this._element.style.zIndex=iZIndex;}};_AcmComponent.setInnerHtml=function(html){this._element.innerHTML=html;};_AcmComponent.appendInnerHtml=function(html){this._element.innerHTML+=html;};_AcmComponent.getInnerHtml=function(){return this._element.innerHTML;};_AcmComponent.contains=function(x,y){var pageX=this.getPageX(),pageY=this.getPageY(),w=this.getPixelWidth(),h=this.getPixelHeight();if(pageX<x&&(pageX+w)>x&&pageY<y&&(pageY+h)>y){return true;}
return false;};_AcmComponent.containsX=function(x){var pageX=this.getPageX();return(pageX<x&&(pageX+this.getPixelWidth())>x);};_AcmComponent.containsY=function(y){var pageY=this.getPageY();return(pageY<y&&(pageY+this.getPixelHeight())>y);};_AcmComponent.show=function(){if(this._visible==false){this._visible=true;this._element.style.display=this._styleOnHide;}};_AcmComponent.hide=function(){if(this._visible!==false){this._visible=false;var s=this._element.style;this._styleOnHide=s.display;s.display='none';}};_AcmComponent.setVisible=function(bVisible){this._visible=bVisible;this.setStyleProperty("visibility",bVisible?"inherit":"hidden");};_AcmComponent.getVisible=function(limit){for(var p=this;p;p=p._parentComponent){if(limit&&limit==p){return true;}
if(p.getStyleProperty('display')=='none'||p.getStyleProperty('visibility')=='hidden'){return false;}
var last=p;}
return true;};_AcmComponent.isVisible=function(){return this._visible;};_AcmComponent.resizeTo=function(w,h){this.setWidth(w);this.setHeight(h);};_AcmComponent.moveTo=function(left,top){this.setLeft(left);this.setTop(top);};_AcmComponent.setLeft=function(left){if(left===''){return;}
this._left=left;if(this._element){if(!this._element.style){alert(this+','+this._element);}else{this._element.style.left=(left===null||left==undefined||(isNaN(left)&&typeof(left)!='string'))?null:(typeof(left)=='number')?left+'px':left;}}};_AcmComponent.getLeft=function(){return this._left;};_AcmComponent.getPixelLeft=function(){return this._element.offsetLeft;};_AcmComponent.setTop=function(top){if(top===''){return;}
this._top=top;if(this._element){this._element.style.top=(top===null||top==undefined||(isNaN(top)&&typeof(top)!='string'))?null:(typeof(top)=='number')?top+'px':top;}};_AcmComponent.getTop=function(){return this._top;};_AcmComponent.getPixelTop=function(){return this._element.offsetTop;};_AcmComponent.setRight=function(right){if(right===''){return;}
this._right=right;if(this._element){this._element.style.right=(right===null||right==undefined||(isNaN(right)&&typeof(right)!='string'))?null:(typeof(right)=='number')?right+'px':right;}};_AcmComponent.getRight=function(){return this._right;};_AcmComponent.getPixelRight=function(){return this._element.offsetRight;};_AcmComponent.setBottom=function(bottom){if(bottom===''){return;}
this._bottom=bottom;if(this._element){this._element.style.bottom=(bottom===null||bottom==undefined||(isNaN(bottom)&&typeof(bottom)!='string'))?null:(typeof(bottom)=='number')?bottom+'px':bottom;}};_AcmComponent.getBottom=function(){return this._bottom;};_AcmComponent.getPixelBottom=function(){return this._element.offsetBottom;};_AcmComponent.setPosition=function(iLeft,iRight,iTop,iBottom){if(iLeft!==undefined){this.setLeft(iLeft);}
if(iRight!==undefined){this.setRight(iRight);}
if(iTop!==undefined){this.setTop(iTop);}
if(iBottom!==undefined){this.setBottom(iBottom);}};_AcmComponent.setWidth=function(width){if(width===''||width<0){return;}
this._width=width;if(this._element){this._element.style.width=(width===null||width==undefined||(isNaN(width)&&typeof(width)!='string'))?null:(typeof(width)=='number')?width+'px':width;}};_AcmComponent.getWidth=function(){return this._width||this._element.scrollWidth||this._element.style.width;};_AcmComponent.getPixelWidth=function(){if(this._element){return this._element.scrollWidth;}};_AcmComponent.setHeight=function(height){if(height===''||height<0){return;}
this._height=height;if(this._element){this._element.style.height=(height===null||height==undefined||(isNaN(height)&&typeof(height)!='string'))?null:(typeof(height)=='number')?height+'px':height;}};_AcmComponent.getHeight=function(){return this._height||this._element.scrollHeight;};_AcmComponent.getPixelHeight=function(){if(this._element){return this._element.scrollHeight;}};if(Acm.Browser.isIe){_AcmComponent.setStyle=function(style){var el=this._element;style=style.replace(/(\-moz-)?([a-zA-Z]+)(?:\-([a-zA-Z]+))?(?:\-([a-zA-Z]+))?:\s?([^;]+);?\w?/g,this._setStyleCallback);try{eval(style);}catch(e){dirtylog('a: '+Acm.Component._cssText+', '+style);}};_AcmComponent._setStyleCallback=function(m0,m1,m2,m3,m4,m5,offset,s){var str='el.style.';if(m2=='float'){m2='styleFloat';}
str+=m2;if(m3){str+=m3.charAt(0).toUpperCase()+m3.substr(1);if(m4){str+=m4.charAt(0).toUpperCase()+m4.substr(1);}}
return str+'="'+m5+'";';};}else{_AcmComponent.setStyle=function(style){var el=this._element;style=style.replace(/(\-moz-)?([a-zA-Z]+)(?:\-([a-zA-Z]+))?(?:\-([a-zA-Z]+))?:\s?([^;]+);?\w?/g,function(m0,m1,m2,m3,m4,m5,offset,s){var str='el.style.';if(m2=='float'){Acm.Component._cssText=el.style.cssText;var cssText=Acm.Component._cssText;el.style.cssText='float: '+m5;if(cssText.indexOf('float:')==-1){el._acmComponent.setStyle(cssText);}
return'';}
if(m1){str+='Moz';str+=m2.charAt(0).toUpperCase()+m2.substr(1);}else{str+=m2;}
if(m3){str+=m3.charAt(0).toUpperCase()+m3.substr(1);if(m4){str+=m4.charAt(0).toUpperCase()+m4.substr(1);}}
return str+'="'+m5+'";';});try{eval(style);}catch(e){dirtylog('a2: '+style+', mess: '+e.message);}};}
_AcmComponent.getStyle=function(){return this._element.style.cssText;};_AcmComponent.setBackgroundImage=function(sBg){if(Acm.Browser.isIe){this._element.runtimeStyle.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src=\''+sBg+'\', sizingMethod=\'scale\')';}else{this._element.style.backgroundImage='url('+sBg+')';}};_AcmComponent.setStyleProperty=function(sName,sValue){if(!this._element){this._element=this.getElement();}
if(!this._element){return;}
if(sName=='float'){sName=Acm.Browser.isIe?'styleFloat':'cssFloat';}
try{this._element.style[sName]=sValue;}catch(e){alert('Error in setStyleProperty for '+this+', '+e.message+', '+sName+'='+sValue);}};_AcmComponent.getStyleProperty=function(sName){var ele=this._element;if(!ele){return false;}
if(Acm.Browser.isIe){return ele.currentStyle[sName];}else{if(ele.style[sName]){return ele.style[sName];}else{return document.defaultView.getComputedStyle(ele,'').getPropertyValue(sName);}}};_AcmComponent.setClassName=function(sClassName){if(!this._element){this._element=this.getElement();}
if(!this._element){alert('no ele: '+this+','+sClassName+', '+this.getText());}
this._element.className=sClassName;};_AcmComponent.getClassName=function(){return this._element.className;};_AcmComponent.addClassName=function(className){if(!this._element){this._element=this.getElement();}
if(this._element.className.indexOf(className)==-1){this._element.className+=' '+className;}};_AcmComponent.removeClassName=function(className){if(!this._element){this._element=this.getElement();}
var reg=new RegExp(className+"\\s?");this._element.className=this._element.className.replace(reg,'');};_AcmComponent.toggleClassName=function(className,b){if(b){this.addClassName(className);}else{this.removeClassName(className);}};_AcmComponent.scrollIntoView=function(alignWithTop){var el=this._element;if(typeof(alignWithTop)==='undefined'&&el.offsetParent){var height=parseInt(el.offsetParent._acmComponent.getStyleProperty('height'),10);if(parseInt(el.offsetTop,10)<parseInt(el.offsetParent.offsetParent.scrollTop,10)){alignWithTop=true;}else if((parseInt(el.offsetTop,10)+parseInt(el.scrollHeight,10))>=(parseInt(el.offsetParent.scrollTop,10)+height)){alignWithTop=false;}else{return false;}}
this._element.scrollIntoView(alignWithTop);};_AcmComponent.scrollToTop=function(){this._element.scrollTop=0;};_AcmComponent.scrollToBottom=function(){if(Acm.Browser.isIe){this._element.scrollTop=0;this._element.scrollTop=0;}
this._element.scrollTop=this._element.scrollHeight;};_AcmComponent.hasChildren=function(){return(this._children&&this._children.length>0)?true:false;};_AcmComponent.ieLayoutComponents=function(){if(!Acm.Browser.isIe){return;}
if(this.hasChildren()&&this._ieLayoutComponents){var child,childEle,i=0,l=this._children.length;for(i=0;i<l;i++){child=this._children[i];childEle=child._element;var border,padding;if(!(border=parseInt(this._element.style.borderWidth,10)*2)){border=0;}
if(!(padding=parseInt(this._element.style.padding,10)*2)){padding=0;}
var cs=childEle.currentStyle;if(!cs){continue;}
if(cs.right!='auto'&&cs.left!='auto'){var width=this.getWidth()-(parseInt(cs.right,10)+parseInt(cs.left,10)+border+padding);child.setWidth(width);}
if(cs.bottom!='auto'&&cs.top!='auto'){child.setHeight(this.getHeight()-(parseInt(cs.bottom,10)+parseInt(cs.top,10)+border+padding));}
if(child.hasChildren()){child.ieLayoutComponents();}}}};_AcmComponent.ieLayoutComponentsHorizontal=function(a){if(!Acm.Browser.isIe){return;}
if(this.hasChildren()){var child,i=0,l=this._children.length;for(i=0;i<l;i++){child=this._children[i];var childEle=child._element;if(childEle.style.right!==''&&childEle.style.left!==''){child.setWidth(this.getWidth()-(childEle.style.pixelRight+childEle.style.pixelLeft));}
if(child.hasChildren()){child.ieLayoutComponents();}}}};_AcmComponent.ieLayoutComponentsVertical=function(a){if(!Acm.Browser.isIe){return;}
if(this.hasChildren()){var child,i=0,l=this._children.length;for(i=0;i<l;i++){child=this._children[i];var childEle=child._element;if(childEle.style.bottom!==''&&childEle.style.top!==''){child.setHeight(this.getHeight()-(childEle.style.pixelBottom+childEle.style.pixelTop));}
if(child.hasChildren()){child.ieLayoutComponents();}}}};_AcmComponent.setContextMenu=function(oMenu){if(this._contextMenu&&this._contextMenu!=oMenu){this._contextMenu.dispose();}else{this.addEventListener('contextmenu',this._onContextMenu,this);}
oMenu._owner=this;oMenu.setContainer(this.getContainer());oMenu.create();this._contextMenu=oMenu;oMenu.setOwner(this);return oMenu;};_AcmComponent.getContextMenu=function(){return this._contextMenu||false;};_AcmComponent._onContextMenu=function(e){if(this._contextMenu&&!Acm.EventGateway._noContextMenu){this._contextMenu.show(e.getClientX(),e.getClientY());e.stopPropagation();}};_AcmComponent.getModalRoot=function(){for(var c=this;c;c=c._parentComponent){if(c._isModalRoot){return c;}else if(c._modal){return false;}}
return false;};_AcmComponent.setToolTipEvents=function(b){if(b&&!this._toolTipEvents){this.addEventListener('mouseover',this._onToolTipMouseOver,this);this.addEventListener('mouseout',this._onToolTipMouseOut,this);this.addEventListener('mousemove',this._onToolTipMouseMove,this);}else if(this._toolTipEvents){this.removeEventListener('mouseover',this._onToolTipMouseOver,this);this.removeEventListener('mouseout',this._onToolTipMouseOut,this);this.removeEventListener('mousemove',this._onToolTipMouseMove,this);Acm.ToolTipManager.instance().stopTimer();}
this._toolTipEvents=b;};_AcmComponent.getToolTipEvents=function(b){return this._toolTipEvents;};_AcmComponent.setToolTip=function(toolTip){if(toolTip===null){if(!this._toolTip){return;}
this.setToolTipEvents(false);this._toolTip.dispose();this._toolTip=null;return;}
if(this._toolTip){this._toolTip.dispose();}else{this.setToolTipEvents(true);}
if(typeof(toolTip)=='string'){toolTip=new Acm.ToolTip(toolTip);}
toolTip.setContainer(this.getContainer());this._toolTip=toolTip;};_AcmComponent.getToolTip=function(){return this._toolTip;};_AcmComponent._onToolTipMouseOver=function(e){var manager=Acm.ToolTipManager.instance();manager.startTimer(this,e);e.stopPropagation();};_AcmComponent._onToolTipMouseOut=function(e){var manager=Acm.ToolTipManager.instance();manager.stopTimer();e.stopPropagation();if(manager.toolTipIsShowing()){this.dispatchEvent(new Acm.ComponentEvent('hideToolTip',e.getDispatcher()));}};_AcmComponent._onToolTipMouseMove=function(e){Acm.ToolTipManager.instance().resetTimer();};_AcmComponent.isChildOf=function(oComp){for(var node=this;node;node=node._parentComponent){if(node==oComp){return true;}}
return false;};_AcmComponent.showFocus=function(){if(Acm.Browser.isMoz){this._element.style.MozOutline='1px dotted invert';}else{this.setCanHaveFocus(true);try{this._element.focus();}catch(e){}}};_AcmComponent.hideFocus=function(){if(Acm.Browser.isMoz){this._element.style.MozOutline='none';}else{this._element.blur();}};_AcmComponent.setCanHaveFocus=function(bCanHaveFocus){this._canHaveFocus=Boolean(bCanHaveFocus);if(Acm.Browser.isIe&&this._element){this._element.hideFocus=this._canHaveFocus?false:true;this._element.tabIndex=this._canHaveFocus?1:-1;}};_AcmComponent.getCanHaveFocus=function(){return this._canHaveFocus;};_AcmComponent.setShowFocus=function(bShowFocus){this._showFocus=Boolean(bShowFocus);};_AcmComponent.getShowFocus=function(){return this._showFocus;};_AcmComponent.setFocus=function(bFocus,bShowFocus){if(this._focused==Boolean(bFocus)||!this._element){return;}
var eg=this.getContainer().getEventGateway();eg.setFocusedComponent((bFocus?this:null),!bShowFocus,eg.getCurrentEvent());};_AcmComponent.containsFocus=function(){var c=this.getContainer().getEventGateway().getFocusedComponent();while(c){if(c==this){return true;}
c=c._parentComponent;}
return false;};_AcmComponent.setTabIndex=function(iTabIndex){var tabManager;if(this._parentComponent){tabManager=this.getTabManager();if(tabManager){tabManager.setTabIndex(iTabIndex,this);}}
this.setCanHaveFocus(true);this._tabIndex=iTabIndex;};_AcmComponent.getTabIndex=function(){return this._tabIndex;};_AcmComponent.setTabRoot=function(bTabRoot){bTabRoot=Boolean(bTabRoot);if(bTabRoot){this._tabManager=new Acm.TabManager(this);}else{this._tabManager.dispose();this._tabManager=null;}
this._isTabRoot=bTabRoot;};_AcmComponent.getTabRoot=function(){return this._isTabRoot;};_AcmComponent.getTabManager=function(){var c=this;while(c!=null&&!c._isTabRoot){c=c._parentComponent;}
if(c&&c._isTabRoot){return c._tabManager;}else{return null;}};_AcmComponent.setTabStop=function(tabStop){this._tabStop=tabStop;};_AcmComponent.getTabStop=function(){return this._tabStop;};_AcmComponent.setId=function(id){var p=this._parentComponent;if(p){if(!p._componentsById){p._componentsById={};}else if(this.getId()){delete p._componentsById[this.getId()];}
p._componentsById[id]=this;}
if(this._element){this._element.id=id;}
this._id=id;};_AcmComponent.getId=function(){return this._id;};_AcmComponent.sendHttpRequest=function(uri,eventHandler,eventObject){if(this._xmlHttp){this._xmlHttp.dispose();}
if(!eventObject){eventObject=this;}
this._xmlHttp=new Acm.XmlHttp(this,this._readyStateWrapper);this._xmlHttp.addEventListener('loaded',eventHandler,eventObject);this._xmlHttp.send('GET',uri);};_AcmComponent.postHttpRequest=function(uri,data,eventHandler,eventObject){if(this._xmlHttp){this._xmlHttp.dispose();}
if(!eventObject){eventObject=this;}
this._xmlHttp=new Acm.XmlHttp(this,this._readyStateWrapper);this._xmlHttp.addEventListener('loaded',eventHandler,eventObject);if(typeof data=='object'){var a=[];for(var key in data){a[a.length]=key+'='+Acm.String.urlEncode(data[key]);}
data=a.join('&');}
this._xmlHttp.send('POST',uri,data,{'Content-Type':'application/x-www-form-urlencoded; charset=iso-8859-1'});};_AcmComponent._readyStateWrapper=function(){try{this.readyStateChange();}catch(ex){try{var winOwner=desktop?desktop:this._component.getContainer();if(ex instanceof Acm.ConnectionException){winOwner.addComponent(new Acm.ErrorWindow(t_("Could not connect to the web server.")+" "+t_("Please try again!"),ex.message+"<br><br>"+ex.info));}else{winOwner.addComponent(new Acm.ErrorWindow(t_("Error when processing XML Request.")+" "+t_("Please try again!"),ex.message));}
winOwner.ieLayoutComponents();}catch(exx){}}};_AcmComponent._loadXmlWrapper=function(){try{this._onXmlHttpLoad();}catch(ex){var winOwner=desktop?desktop:this._oComponent.getContainer();winOwner.addComponent(new Acm.ErrorWindow(ex.message,ex.info));throw ex;}};_AcmComponent._jsonParser=function(dataHandlerFunction){var tempJson=false;var rawString="";try{rawString=this._xmlHttp.getResponseText();if(rawString.indexOf("EosErrorJson =")===0){top.HYPERGENE.StaleSessionHandler.handleError(rawString);}
eval("tempJson = "+rawString);dataHandlerFunction.call(this,tempJson);}catch(ex){var winOwner=desktop?desktop:this.getContainer();rawString=rawString.replace(/</g,"&lt;").replace(/>/g,"&gt;");winOwner.addComponent(new Acm.ErrorWindow(t_("Failed to process data from the web server!"),t_("Unable to create JSON data structure.")+"<br><br>"+ex.message+"<br><br>"+rawString));}};_AcmComponent.getJson=function(uri,dataHandlerFunction){this.sendHttpRequest(uri,function(evt){this._jsonParser.call(this,dataHandlerFunction);},this);};_AcmComponent.postJson=function(uri,data,dataHandlerFunction,httpHeaders){this.sendHttpPost(uri,data,function(evt){this._jsonParser.call(this,dataHandlerFunction);},this,httpHeaders);};_AcmComponent.sendHttpPost=function(uri,data,eventHandler,eventObject,httpHeaders){if(this._xmlHttp){this._xmlHttp.dispose();}
if(!eventObject){eventObject=this;}
if(!httpHeaders){httpHeaders={'Content-Type':'application/x-www-form-urlencoded; charset=ISO-8859-1'};}
var str='';if(typeof(data)=='object'){for(var key in data){str+='&'+key+'='+Acm.String.urlEncode(data[key]);}
str=str.substr(1);}else{str=data;}
this._xmlHttp=new Acm.XmlHttp(this,this._readyStateWrapper);this._xmlHttp.addEventListener('loaded',eventHandler,eventObject);this._xmlHttp.send('POST',uri,str,httpHeaders);};_AcmComponent.sendXmlRequest=function(sUri,postData){this.createBackReference();var container=this.getContainer();if(container.getMultiRequest()){container.addXmlRequest(this,sUri);}else{this._xmlLoader=new Acm.XmlLoader(this,postData,this._readyStateWrapper,this._loadXmlWrapper);this._xmlLoader.loadXml(sUri);}
return this._xmlLoader;};_AcmComponent.postXmlRequest=function(uri,data){this.createBackReference();this._xmlLoader=new Acm.XmlLoader(this,data);this._xmlLoader.loadXml(uri,data);return this._xmlLoader;};_AcmComponent.addXmlRequest=function(sUri){this.getContainer().addXmlRequest(this,sUri);};_AcmComponent.sendXmlRequests=function(backReference){this.getContainer().sendXmlRequests(backReference);};_AcmComponent.getComponentById=function(id,depth){if(!depth){depth=false;}
return this._getComponentById(id,0,depth);};_AcmComponent._getComponentById=function(id,depth,maxDepth){if(this._componentsById&&this._componentsById[id]){return this._componentsById[id];}
var children=this._children;if((maxDepth===false||maxDepth<depth)&&children){for(var i=0,l=children.length,ret=false;i<l;i++){ret=children[i]._getComponentById(id,depth+1,maxDepth);if(ret){return ret;}}}
return false;};_AcmComponent.getComponentsById=function(id){var hits=[];this._getComponentsById(id,hits);return hits;};_AcmComponent._getComponentsById=function(id,hits){var children=this._children;if(children){if(this._componentsById&&this._componentsById[id]){hits.push(this._componentsById[id]);}
for(var i=0,l=children.length;i<l;i++){children[i]._getComponentsById(id,hits);}}};_AcmComponent.getParentComponentById=function(sId){var p=this._parentComponent;if(!p){return false;}else if(p._componentsById&&p._componentsById[sId]){return p._componentsById[sId];}else{return p.getParentComponentById(sId);}};_AcmComponent.getParentComponentByClass=function(classObject){for(var comp=this;!(comp instanceof classObject);comp=comp._parentComponent){if(!comp){return false;}}
return comp;};_AcmComponent.getComponentFromPoint=function(left,top){return this._getComponentFromPoint(left,top,this,this);};_AcmComponent._getComponentFromPoint=function(x,y,component,highest){if(!component._children){return highest;}
for(var i=0,child,a=component._children,l=a.length;i<l;i++){child=a[i];if(child._enabled==false||child.getStyleProperty('visibility')=='hidden'){continue;}
if(child.contains(x,y)){if(child.getZIndex()>=highest.getZIndex()){highest=child;}
if(child.hasChildren()){highest=this._getComponentFromPoint(x,y,child,highest);}}}
return highest;};_AcmComponent.getComponentFromPointX=function(x){if(this._children){for(var i=0,child,a=this._children,l=a.length;i<l;i++){child=a[i];if(child._enabled==false||child.getStyleProperty('visibility')=='hidden'){continue;}
if(child.containsX(x)){return child;}}}};_AcmComponent.getComponentFromPointY=function(y){if(this._children){for(var i=0,child,a=this._children,l=a.length;i<l;i++){child=a[i];if(child._enabled==false||child.getStyleProperty('visibility')=='hidden'){continue;}
if(child.containsY(y)){return child;}}}};_AcmComponent.getWindow=function(){for(var c=this;c;c=c._parentComponent){if(c instanceof Acm.Window){return c;}}
return false;};_AcmComponent.setUseBrowserContextmenu=function(b){this.useBrowserContextmenu=Boolean(b);};_AcmComponent.getUseBrowserContextmenu=function(){return this.useBrowserContextmenu;};Acm.TabManager=function(oComp){this._tabList=[];this._currentTabIndex=0;this._tabRootComponent=oComp;oComp.addEventListener('keypress',this.handleKeyEvent,this);};var _AcmTabManager=Acm.extend('TabManager','EventTarget');_AcmTabManager._tabList=null;_AcmTabManager._currentTabIndex=null;_AcmTabManager._tabRootComponent=null;_AcmTabManager.dispose=function(){if(this._disposed){return;}
if(!this._tabRootComponent._disposed){this._tabRootComponent.removeEventListener('keypress',this.handleKeyEvent,this);}
Acm.TabManager.parent.dispose.call(this);this._tabList=null;this._currentTabIndex=null;this._tabRootComponent=null;};_AcmTabManager.setTabIndex=function(iTabIndex,oComp){this._tabList[iTabIndex]=oComp;};_AcmTabManager.addTabIndex=function(comp){this._tabList.push(comp);};_AcmTabManager.addTabStop=function(comp){this._tabList.push(comp);};_AcmTabManager.removeTabStop=function(comp){if(this._currentTabIndex>0&&this._currentTabIndex<=Acm.Array.indexOf(this._tabList,comp)){this._currentTabIndex--;}
Acm.Array.remove(this._tabList,comp);};_AcmTabManager.insertTabIndexAt=function(tabIndex,comp){Acm.Array.insertAt(this._tabList,comp,tabIndex);};_AcmTabManager.getFocusedComponent=function(){return this._tabList[this._currentTabIndex];};_AcmTabManager.setFocusedComponent=function(comp){var i=Acm.Array.indexOf(this._tabList,comp);if(i!=-1){this._currentTabIndex=i;}};_AcmTabManager.getCurrentTabIndex=function(){return this._currentTabIndex;};_AcmTabManager.handleKeyEvent=function(e){if(e.getKeyCode()!=Acm.KeyboardEvent.TAB||e.getCtrlKey()||e.getMetaKey()){return;}
e.preventDefault();e.stopPropagation();var i=this._currentTabIndex+(e.getShiftKey()?-1:1);if(i<0){i=this._tabList.length-1;}else if(i>=this._tabList.length){i=0;}
var newFocused=this._tabList[i];if(newFocused&&!newFocused.getVisible()){newFocused=e.getShiftKey()?this._getPrevVisible(i):this._getNextVisible(i);}else{this._currentTabIndex=i;}
if(newFocused){newFocused.setFocus(true,true);}};_AcmTabManager._getPrevVisible=function(pos){var list=this._tabList;var i;for(i=pos-1;i>=0;i--){if(list[i].getVisible()){this._currentTabIndex=i;return list[i];}}
for(i=list.length-1;i>pos;i--){if(list[i].getVisible()){this._currentTabIndex=i;return list[i];}}
return false;};_AcmTabManager._getNextVisible=function(pos){var list=this._tabList;var i;for(i=pos+1,l=list.length;i<l;i++){if(list[i].getVisible()){this._currentTabIndex=i;return list[i];}}
for(i=0;i<pos;i++){if(list[i].getVisible()){this._currentTabIndex=i;return list[i];}}
return false;};Acm.Table=function(){Acm.Component.call(this);};var _AcmTable=Acm.extend('Table','Component');_AcmTable._tagName='TABLE';Acm.ColGroup=function(){Acm.Component.call(this);};var _AcmColGroup=Acm.extend('ColGroup','Component');_AcmColGroup._tagName='COLGROUP';Acm.THead=function(){Acm.Component.call(this);this._children=[];};var _AcmTHead=Acm.extend('THead','Component');_AcmTHead._tagName='THEAD';Acm.TBody=function(){Acm.Component.call(this);};var _AcmTBody=Acm.extend('TBody','Component');_AcmTBody._tagName='TBODY';Acm.Td=function(){Acm.Component.call(this);};var _AcmTd=Acm.extend('Td','Component');_AcmTd._tagName='TD';Acm.Tr=function(){Acm.Component.call(this);};_AcmTr=Acm.extend('Tr','Component');_AcmTr._tagName='TR';Acm.IFrame=function(){Acm.Component.call(this);};var _AcmIFrame=Acm.extend('IFrame','Component');_AcmIFrame._tagName='IFRAME';_AcmIFrame.setSrc=function(src){this._element.src=src;};Acm.FloatComponent=function(){Acm.Component.call(this);};var _AcmFloatComponent=Acm.extend('FloatComponent','Component');_AcmFloatComponent._trap=null;_AcmFloatComponent.dispose=function(){Acm.FloatComponent.parent.dispose.call(this);this._trap=null;};_AcmFloatComponent.setLeft=function(left){if(left=='undefined'){return;}
left+=this.getContainer().getPageX();if(this.getWidth()+left>containerPane.getWidth()){left-=(this.getWidth()+left)-containerPane.getWidth();}
Acm.FloatComponent.parent.setLeft.call(this,left);};_AcmFloatComponent.setTop=function(top){if(top=='undefined'){return;}
top+=this.getContainer().getPageY();if(this.getHeight()+top>containerPane.getHeight()){top-=(this.getHeight()+top)-containerPane.getHeight();}
Acm.FloatComponent.parent.setTop.call(this,top);};_AcmFloatComponent.setDropShadow=function(b){this._dropShadow=b;};_AcmFloatComponent.getDropShadow=function(){return this._dropShadow;};Acm.Timer=function(interval,handler,object){var self=this;this.__onTimeout=function(){self._onTimeout();};this._intervalHandle=null;if(interval){this._interval=interval;}
if(handler){this.addEventListener('timeout',handler,object||this);}};var _AcmTimer=Acm.extend('Timer','EventTarget');_AcmTimer._intervalHandle=null;_AcmTimer._interval=1000;_AcmTimer._isRunning=false;_AcmTimer.dispose=function(){if(this._isRunning){this.stop();}
Acm.Timer.parent.dispose.call(this);this._intervalHandle=null;this._interval=null;};_AcmTimer.setInterval=function(interval){this._interval=interval;};_AcmTimer.getInterval=function(iInterval){this._interval=iInterval;};_AcmTimer.start=function(){if(!this._interval){return;}
this._intervalHandle=window.setInterval(this.__onTimeout,this._interval);this._isRunning=true;};_AcmTimer.stop=function(){window.clearInterval(this._intervalHandle);this._intervalHandle=null;this._isRunning=false;};_AcmTimer.reset=function(){if(this._isRunning){this.stop();this.start();}};_AcmTimer.isRunning=function(){return this._isRunning;};_AcmTimer._onTimeout=function(){var e=new Acm.Event('timeout');e.timer=this;this.dispatchEvent(e);};Acm.Image=function(src){Acm.Component.call(this);this._src=src;};var _AcmImage=Acm.extend('Image','Component');_AcmImage._tagName='IMG';Acm.Image._ieFilters={'opacity':"progid:DXImageTransform.Microsoft.Alpha(opacity=[VALUE])",'transparency':"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='[VALUE]',sizingMethod='image')",'grayscale':"progid:DXImageTransform.Microsoft.Gray()"};_AcmImage._filters=null;_AcmImage.create=function(){Acm.Image.parent.create.call(this);if(this._src){this.setSrc(this._src);}};_AcmImage.setOpacity=function(opacity){this.setFilter('opacity',opacity);};_AcmImage.setFilter=function(name,value){this._setFilter(name,value);this._applyFilters();};_AcmImage._setFilter=function(name,value){if(!this._filters){this._filters={};}
this._filters[name]=Acm.Image._ieFilters[name].replace('[VALUE]',value);};_AcmImage.removeFilter=function(name){if(this._filters&&this._filters[name]){delete this._filters[name];this._applyFilters();}};_AcmImage._applyFilters=function(){var filters='';for(var i in this._filters){filters+=this._filters[i]+' ';}
this._element.style.filter=filters;};_AcmImage.setSrc=function(src){if(Acm.Browser.isIe&&src.substr(src.length-4)=='.png'){this._element.src=this.getPath()+'img/blank.gif';this.setFilter('transparency',src);}else{if(Acm.Browser.isIe){this.removeFilter('transparency');this._element.removeAttribute('width');this._element.removeAttribute('height');}
this._element.src=src;}
this._src=src;};_AcmImage.getSrc=function(){return this._src||this._element.src;};Acm.Container=function(win,path){Acm.Component.call(this);this._window=win;this._path=path||'';this._document=win.document;this._xmlRequests=[];this._prototypes={};this._container=this;var doc=win.document;this._element=doc.body;doc.body._acmComponent=this;this.expandFullSize();this._eventGateway=new Acm.EventGateway(win);this._eventGateway.setContainer(this);this.setTabRoot(true);this.addEventListener('resize',this._onWindowResize,this);this.addEventListener('unload',this._onWindowUnLoad,this);this.addEventListener('mousedown',this._onMouseDown,this);this.addEventListener('mouseup',this._onMouseUp,this);this.addEventListener('keydown',this._onKeyDown,this);this.addEventListener('keyup',this._onKeyDown,this);this.addEventListener('keypress',this._onKeyDown,this);this.setCanHaveFocus(true);this.setShowFocus(false);this._windowManager=new Acm.WindowManager(this)};var _AcmContainer=Acm.extend('Container','Component');_AcmContainer._tagName='BODY';_AcmContainer._window=null;_AcmContainer._document=null;_AcmContainer._eventGateway=null;_AcmContainer._activeMenu=null;_AcmContainer._xmlRequests=null;_AcmContainer._prototypes=null;_AcmContainer.dispose=function(){if(this._disposed){return;}
Acm.Container.parent.dispose.call(this);this._eventGateway.dispose();this._document.body._acmComponent=null;this._activeMenu=null;this._window=null;this._document=null;this._xmlRequests=null;for(var i in this._prototypes){if(this._prototypes[i]){this._prototypes[i].dispose();}}
this._prototypes=null;};_AcmContainer.addComponent=function(oComp){if(oComp instanceof Acm.Window){return this._windowManager.addWindow(oComp);}
else{Acm.Component.prototype.addComponent.call(this,oComp);return oComp;}};_AcmContainer.expandFullSize=function(){if(Acm.Browser.isIe){this.setWidth(this._window.document.body.clientWidth);this.setHeight(this._window.document.body.clientHeight);this.ieLayoutComponents(this._window.document.body.clientWidth);}};_AcmContainer.getPath=function(){return this._path;};_AcmContainer.getApplicationPath=function(){return this._path+application.getPath();};_AcmContainer.createElement=function(tagName){return this._document.createElement(tagName);};_AcmContainer.createTextNode=function(text){if(!text){text='';}
return this._document.createTextNode(text);};_AcmContainer.beginMultiRequest=function(){this._multiRequest=true;};_AcmContainer.getMultiRequest=function(){return this._multiRequest;};_AcmContainer.addXmlRequest=function(oComp,uri){this._xmlRequests.push([oComp,uri]);};_AcmContainer.sendXmlRequests=function(backReference){if(this._xmlRequests.length===0){return;}
var str='';for(var i=0,a=this._xmlRequests,l=a.length;i<l;i++){str+='&r[]='+Acm.String.urlEncode(a[i][1]);}
str='/interface.php?'+str.substr(1);this._multiRequest=false;this.sendXmlRequest(str,backReference);};_AcmContainer.clearRequests=function(){this._xmlRequests=[];};_AcmContainer.getEventGateway=function(){return this._eventGateway;};_AcmContainer.getWindow=function(){return this._window;};_AcmContainer.getDocument=function(){return this._document;};_AcmContainer._onKeyDown=function(e){var c=e.getKeyCode();var comp=e.getDispatcher();var tagName=e.getTarget().tagName.toUpperCase();var editableComponent=(tagName=='INPUT'||tagName=='TEXTAREA'||(comp&&!comp._disposed&&typeof comp.getEdit==='function'&&comp.getEdit()));if(e.getAltKey()&&(c==Acm.KeyboardEvent.LEFT||c==Acm.KeyboardEvent.RIGHT)){e.preventDefault();}
var menu=this.getActiveMenu();if(c==Acm.KeyboardEvent.ESC&&menu){var owner=menu.getOwner();this.getActiveMenu().hide();if(owner){owner.setFocus(true,true);}}
if(e.getCtrlKey()&&c==87){e.preventDefault();}
if(e.getCtrlKey()&&c==109){e.preventDefault();}
if(c==Acm.KeyboardEvent.TAB){e.preventDefault();}
if(!e.getCtrlKey()&&!e.getAltKey()&&!e.getShiftKey()&&!editableComponent){if(c==Acm.KeyboardEvent.BACKSPACE||(c>=48&&c<=192)){e.preventDefault();}}};_AcmContainer._onMouseDown=function(e){if(this.getActiveMenu()&&!e.fromMenu){this.getActiveMenu().hide();}
Acm.ToolTipManager.instance().hideToolTip();};_AcmContainer.setActiveMenu=function(menu){this._activeMenu=menu;};_AcmContainer.getActiveMenu=function(){if(this._activeMenu&&this._activeMenu.isShowing()){return this._activeMenu;}};_AcmContainer._onMouseUp=function(e){if(!(Acm.Browser.isMac&&e.getCtrlKey())&&this.getActiveMenu()){if(e.fromMenu){(new Acm.Timer(50,this.hideActiveMenu,this)).start();}else{this.getActiveMenu().hide();}}};_AcmContainer.hideActiveMenu=function(e){e.timer.dispose();this.getActiveMenu().hide();};_AcmContainer._onWindowResize=function(e){this.expandFullSize();};_AcmContainer._onWindowUnLoad=function(e){this.dispose();};Acm.Label=function(text,icon){Acm.Component.call(this);if(text){this._text=text;}
if(icon){this._icon=icon;}};var _AcmLabel=Acm.extend('Label','Component');_AcmLabel._tagName='SPAN';_AcmLabel._canHaveFocus=true;_AcmLabel._icon=null;_AcmLabel._iconSize=48;_AcmLabel._label=null;_AcmLabel._textSpacing=4;_AcmLabel._text=null;_AcmLabel._iconPosition='left';_AcmLabel._editable=null;_AcmLabel.dispose=function(){if(this._disposed){return;}
Acm.Label.parent.dispose.call(this);this._iconSize=null;this._text=null;this._textSpacing=null;this._iconPosition=null;this._editable=null;};_AcmLabel.createPrototype=function(){var o=Acm.Label.parent.createPrototype.call(this);o._label=o._element.appendChild(this._container.createTextNode(' '));o.setClassName('acmLabel');return o;};_AcmLabel.create=function(){Acm.Label.parent.create.call(this);this._label=this._element.childNodes[0];if(this._text){this.setText(this._text);}
if(this._icon){this.setIcon(this._icon);}};_AcmLabel.setEditable=function(bEditable){var text;var textbox;if(bEditable===true&&this._editable!==true){if(this._label){if(this._label instanceof Acm.Component){this.deleteComponent(this._label);}else{this.deleteElement(this._label);}}
textbox=this._label=this.addComponent(new Acm.TextBox());textbox.setClassName('acmLabel');if(this._text){textbox.setValue(this._text);}
this.addEventListener('blurred',this._onBlur);this._editable=true;this.setText(this._text);}else if(bEditable===false&&this._editable===true){text=this._label._element.value;this.deleteComponent(this._label);this._label=this.addText(text);this._text=text;this.removeEventListener('blurred',this._onBlur);this._editable=false;}};_AcmLabel.getEditable=function(){return this._editable;};_AcmLabel.setEnabled=function(enabled){Acm.Label.parent.setEnabled.call(this,enabled);this.toggleClassName('acmDisabled',!enabled);};_AcmLabel.getText=function(){if(this._editable){return this._label.getValue();}else{return this._text;}};_AcmLabel.setText=function(text){if(this._editable){if(this._textOnFocus!=this.getText()){this._label.setValue(text);}}else if(this._label){this._label.nodeValue=text;}
this._text=text;};_AcmLabel.getIcon=function(){return this._icon;};_AcmLabel.setIcon=function(oIcon){var matches;var size;if(oIcon===null){if(this._icon){this.deleteComponent(this._icon);}
this._icon=null;return;}
if(typeof oIcon=='string'){matches=oIcon.match(/([0-9]+)\.(?:png|gif)$/);size=matches?matches[1]:null;if(this._icon instanceof Acm.Image){this._icon.setSrc(oIcon,size,size);return;}else{oIcon=new Acm.Image(oIcon,size,size);}}
if(this._label){this._icon=this.addComponentFirst(oIcon);}else{this._icon=this.addComponent(oIcon);}
this._icon.setEnabled(false);this.setIconPosition(this._iconPosition);return oIcon;};_AcmLabel.setBusy=function(b){if(b){if(this._icon){this._orgIcon=this._icon.getSrc();}
this.setIcon(this.getPath()+'img/progressbar/loading-transparent-white-16.gif');}else{this.setIcon(this._orgIcon||null);}};_AcmLabel.getTextSpacing=function(){return this._textSpacing;};_AcmLabel.setTextSpacing=function(spacing){var marginStyleText;switch(this._iconPosition){case'left':marginStyleText='0 '+this._textSpacing+'px 0 0';break;case'top':marginStyleText='0 0 '+this._textSpacing+'px 0';break;}
this._icon.setStyleProperty('margin',marginStyleText);this._textSpacing=spacing;};_AcmLabel.setIconSize=function(size){var icon=this._icon;if(icon){icon.setSrc(icon._element.src.replace(/([0-9]+)\.(png|gif)/i,size+".$2"),size,size);}
this._iconSize=size;};_AcmLabel.setIconPosition=function(pos){var textSpacing;if(this._icon){textSpacing=!this._text?0:this._textSpacing;switch(pos){case'top':this.setStyleProperty('textAlign','center');this._icon._element.align='absmiddle';this._icon.setStyleProperty('margin','0px 0px '+textSpacing+'px 0px');this._icon.setStyleProperty('display','block');this._icon.setStyleProperty('marginLeft','18%');break;case'left':this.setStyleProperty('textAlign','');this._icon._element.align='absmiddle';this._icon.setStyleProperty('margin','0px '+textSpacing+'px 0px 0px');this._icon.setStyleProperty('display','inline');break;}}
this._iconPosition=pos;};_AcmLabel.setFocus=function(focus,showFocus){if(focus){this._textOnFocus=this.getText();}
Acm.Label.parent.setFocus.call(this,focus,showFocus);if(this._editable){try{this._label._element.focus();if(showFocus){this._label._element.select();}}catch(e){}}};_AcmLabel.selectAll=function(){if(this._editable){this._label._element.select();}};_AcmLabel._onBlur=function(){if(this.getText()!=this._textOnFocus){this.dispatchEvent(new Acm.FormFieldEvent('textChange'));}};Acm.DivLabel=function(text){Acm.Label.call(this,text);};var _AcmDivLabel=Acm.extend('DivLabel','Label');_AcmDivLabel._tagName='DIV';Acm.TableCellLabel=function(){Acm.Label.call(this);};var _AcmTableCellLabel=Acm.extend('TableCellLabel','Label');_AcmTableCellLabel._tagName='TD';Acm.ToolBar=function(){Acm.Component.call(this);this._buttons=[];};var _AcmToolBar=Acm.extend('ToolBar','Component');_AcmToolBar._canHaveFocus=true;_AcmToolBar._showFocus=false;_AcmToolBar._buttons=null;_AcmToolBar._orientation='horizontal';_AcmToolBar.dispose=function(){if(this._disposed){return;}
Acm.ToolBar.parent.dispose.call(this);this._buttons=null;this._orientation=null;};_AcmToolBar.create=function(){Acm.ToolBar.parent.create.call(this);this.addEventListener('keypress',this._onKeyPress,this);};_AcmToolBar.addComponent=function(oComp){Acm.ToolBar.parent.addComponent.call(this,oComp);if(oComp instanceof Acm.Button){oComp.setHover(true);this._buttons.push(oComp);}
var sfloat=this._orientation=='horizontal'?' float: left;':'display: block';oComp.setStyle(sfloat);return oComp;};_AcmToolBar.setOrientation=function(sOrient){this._orientation=sOrient;};_AcmToolBar.getOrientation=function(){return this._orientation;};_AcmToolBar._onKeyPress=function(e){if(e.getKeyCode()==Acm.KeyboardEvent.LEFT||e.getKeyCode()==Acm.KeyboardEvent.RIGHT){var fc=this.getContainer().getEventGateway().getFocusedComponent();var toBeFocused,index=Acm.Array.indexOf(this._children,fc),kc=e.getKeyCode();if(index==-1){this._children[0].setFocus(true,true);return;}
if(kc==Acm.KeyboardEvent.RIGHT){if(this._children.length>index+1){toBeFocused=this._children[(index+1)];}else{toBeFocused=this._children[0];}}else{if(index>0){toBeFocused=this._children[(index-1)];}else{toBeFocused=this._children[(this._children.length-1)];}}
if(toBeFocused instanceof Acm.Button){toBeFocused.setFocus(true,true);}else{if(kc==Acm.KeyboardEvent.LEFT){while(!(toBeFocused instanceof Acm.Button)&&toBeFocused!=this){toBeFocused=toBeFocused.getPreviousSibling();}}else if(kc==Acm.KeyboardEvent.RIGHT){while(!(toBeFocused instanceof Acm.Button)&&toBeFocused!=this){toBeFocused=toBeFocused.getNextSibling();}}
toBeFocused.setFocus(true,true);}}};_AcmToolBar.getButtons=function(){return this._buttons;};_AcmToolBar._handleFocus=function(e,oComp){};Acm.RadioGroup=function(){this._items=[];};var _AcmRadioGroup=Acm.extend('RadioGroup','EventTarget');_AcmRadioGroup._items=null;_AcmRadioGroup._selected=null;_AcmRadioGroup.dispose=function(){Acm.RadioGroup.parent.dispose.call(this);this._items=null;this._selected=null;};_AcmRadioGroup.getItems=function(){return this._items;};_AcmRadioGroup.addItem=function(oComp){if(oComp instanceof Acm.ToggleButton||oComp instanceof Acm.MenuRadioItem){this._items.push(oComp);oComp.addEventListener('change',this._onToggleButtonChange,this);if(oComp.getChecked()){this.setSelected(oComp);}}};_AcmRadioGroup.removeItem=function(oComp){if(oComp instanceof Acm.ToggleButton||oComp instanceof Acm.MenuRadioItem){Acm.Array.remove(this._items,oComp);oComp.removeEventListener('change',this._onToggleButtonChange,this);}};_AcmRadioGroup.addComponent=function(oComp){this.addItem(oComp);if(this._parentComponent){this._parentComponent.addComponent(oComp);}
return oComp;};_AcmRadioGroup.setSelected=function(oComp){var initialSelection=true;if(this._selected==oComp||Acm.Array.indexOf(this._items,oComp)==-1){return false;}
if(this._selected){this._selected.setChecked(false);initialSelection=false;}
oComp.setChecked(true);this._selected=oComp;if(!initialSelection){this.dispatchEvent(new Acm.Event('change'));}
return true;};_AcmRadioGroup.getSelected=function(){return this._selected;};_AcmRadioGroup.getSelectedIndex=function(){return Acm.Array.indexOf(this._items,this._selected);};_AcmRadioGroup.setSelectedIndex=function(index){return this.setSelected(this._items[index]);};_AcmRadioGroup._onToggleButtonChange=function(e){if(e.getDispatcher().getChecked()){this.setSelected(e.getDispatcher());}else{this._selected=null;}
this.dispatchEvent(new Acm.Event('change'));};Acm.OutlookBar=function(){Acm.ToolBar.call(this);};var _AcmOutlookBar=Acm.extend('OutlookBar','ToolBar');_AcmOutlookBar._radioGroup=null;_AcmOutlookBar.dispose=function(){if(this._disposed){return;}
Acm.OutlookBar.parent.dispose.call(this);this._radioGroup.dispose();this._radioGroup=null;};_AcmOutlookBar.create=function(){Acm.OutlookBar.parent.create.call(this);this._radioGroup=new Acm.RadioGroup();this._radioGroup.addEventListener('change',this._onRadioGroupChange,this);this.setStyle('border: 1px solid #AAAAAA; background-color: #F3F2EC;');this.setOrientation('vertical');};_AcmOutlookBar.addComponent=function(oComp){if(oComp instanceof Acm.ToggleButton){Acm.OutlookBar.parent.addComponent.call(this,oComp);this._radioGroup.addComponent(oComp);oComp.setIconPosition('top');oComp.setStyle('float: none; display: block; text-align: center;');oComp.setClassName('acmButtonNormal');return oComp;}};_AcmOutlookBar.getSelected=function(){return this._radioGroup.getSelected();};_AcmOutlookBar._onRadioGroupChange=function(e){this.dispatchEvent(new Acm.Event('change'));};Acm.MenuBar=function(){Acm.ToolBar.call(this);};var _AcmMenuBar=Acm.extend('MenuBar','ToolBar');_AcmMenuBar._radioGroup=null;_AcmMenuBar._activated=null;_AcmMenuBar._canHaveFocus=true;_AcmMenuBar._direction='down';_AcmMenuBar.dispose=function(){if(this._disposed){return;}
Acm.MenuBar.parent.dispose.call(this);if(this._radioGroup){this._radioGroup.dispose();}
this._radioGroup=null;this._activated=null;};_AcmMenuBar.create=function(){Acm.MenuBar.parent.create.call(this);this._radioGroup=new Acm.RadioGroup();};_AcmMenuBar.addComponent=function(oComp){if(oComp instanceof Acm.MenuBarButton){Acm.MenuBar.parent.addComponent.call(this,oComp);this._radioGroup.addComponent(oComp);oComp.setDirection(this._direction);oComp.setMenuBar(this);this._radioGroup.addEventListener('change',this._onRadioGroupChange,this);oComp.addEventListener('mouseover',this._onMenuButtonMouseOver,this);return oComp;}};_AcmMenuBar.setDirection=function(direction){if(this._children){for(var i=0,a=this._children,l=a.length;i<l;i++){a[i].setDirection(direction);}}
this._direction=direction;};_AcmMenuBar.getDirection=function(){return this._direction;};_AcmMenuBar._onRadioGroupChange=function(e){var sel=this._radioGroup.getSelected();this._activated=(sel);};_AcmMenuBar._onMenuButtonMouseOver=function(e){if(!this._activated){return;}
var button=e.getDispatcher();button.setChecked(true);};Acm.Form=function(){Acm.Component.call(this);};var _AcmForm=Acm.extend('Form','Component');_AcmForm._iframe=null;_AcmForm._xmlHttp=null;_AcmForm._method='POST';_AcmForm._action=null;_AcmForm._valueStack=null;_AcmForm.dispose=function(){if(this._disposed){return;}
Acm.Form.parent.dispose.call(this);this._iframe=null;if(this._xmlHttp){this._xmlHttp.dispose();}
this._xmlHttp=null;this._method=null;this._action=null;this._valueStack=null;};_AcmForm.create=function(){Acm.Form.parent.create.call(this);this.addEventListener('keypress',this._onKeyPress,this);this.createBackReference();this._xmlLoader=new Acm.XmlLoader(this);this._xmlLoader._xmlHttp.setRequestMethod('POST');this._xmlLoader.setPersistant(true);this._xmlLoader.addEventListener('complete',this._onPostComplete,this);this.setCanHaveFocus(true);};_AcmForm.setMethod=function(sMethod){this._method=sMethod;};_AcmForm.getMethod=function(){return this._method;};_AcmForm.setAction=function(sAction){this._action=sAction;};_AcmForm.getAction=function(sAction){return this._action;};_AcmForm.getFields=function(){var arr=[];this._getFields(this,arr);return arr;};_AcmForm._getFields=function(comp,arr){for(var a=this._children,l=a.length;i<l;i++){if(a[i]._children){this._getFields(a[i],arr);}else if(a[i]instanceof Acm.TextBox){arr.push(a[i]);}}};_AcmForm.submit=function(){this._valueStack='';var method;if(this._hasFileUpload){}else{this._collectValues(this);this._valueStack=this._valueStack.substr(1);method=this._method||'POST';if(this.dispatchEvent(new Acm.Event('beforeSubmit'))!==false){this._xmlLoader._xmlHttp.send('POST',this._action,this._valueStack,{'Content-type':'application/x-www-form-urlencoded'});}}};_AcmForm._collectValues=function(oComp){var i=0,c=null,v=null;var j;var id;var numComponentChildren=oComp._children.length;for(i=0;i<numComponentChildren;i++){c=oComp._children[i];id=c.getId();if(id){Acm.String.urlEncode(id);v=c.getValue();if(v!==null&&v!==undefined){if(typeof(v)=='object'){if(v.length>0){for(j=0;j<v.length;j++){this._valueStack+='&'+id+'[]='+(new Acm.String(v[j])).urlEncode();}}else{this._valueStack+='&'+id+'=';}}else{this._valueStack+='&'+id+'='+(new Acm.String(v)).urlEncode();}}}
if(c._children&&v===null){this._collectValues(c);}}};_AcmForm.getResponseText=function(e){return this._xmlLoader._xmlHttp.getResponseText();};_AcmForm.getResponseXml=function(e){return this._xmlLoader._xmlHttp.getResponseXml();};_AcmForm._onKeyPress=function(e){if(e.getKeyCode()==Acm.KeyboardEvent.ENTER){var disp=e.getDispatcher();if(disp instanceof Acm.TextBox&&!(disp instanceof Acm.TextArea)){this.submit();}}};_AcmForm._onPostComplete=function(){this.dispatchEvent(new Acm.Event('submit'));};Acm.TextBox=function(){Acm.Component.call(this);};var _AcmTextBox=Acm.extend('TextBox','Component');_AcmTextBox._tagName='INPUT';_AcmTextBox._textSelectable=true;_AcmTextBox._canHaveFocus=true;_AcmTextBox._showFocus=true;_AcmTextBox._tabStop=true;_AcmTextBox._type='text';_AcmTextBox._textOnFocus=null;_AcmTextBox.dispose=function(){if(this._disposed){return;}
Acm.TextBox.parent.dispose.call(this);this._textOnFocus=null;};_AcmTextBox.create=function(sText){Acm.TextBox.parent.create.call(this);this.addEventListener('focused',this._onFocus,this);this.addEventListener('blurred',this._onBlur,this);this.addEventListener('keyup',this._onKeyUp);this._element.type=this._type;this._element.setAttribute('autocomplete','off');};_AcmTextBox.setId=function(sId){Acm.TextBox.parent.setId.call(this,sId);this._element.name=sId;};_AcmTextBox.setAutoComplete=function(b){this._element.setAttribute('autocomplete',b?'on':'off');};_AcmTextBox.getAutoComplete=function(){return this._element.getAttribute('autocomplete').toLowerCase()=='on';};_AcmTextBox.setFocus=function(focus,showFocus){Acm.TextBox.parent.setFocus.call(this,focus,showFocus);if(focus&&showFocus&&this._className=='Acm.TextBox'){this._element.select();}};_AcmTextBox.setValue=function(value){this._element.value=value;};_AcmTextBox.getValue=function(){return this._element.value;};_AcmTextBox.setText=function(text){this._element.value=text;};_AcmTextBox.getText=function(){return this._element.value;};_AcmTextBox.setEnabled=function(b){Acm.TextBox.parent.setEnabled.call(this,b);this._element.disabled=!b;};_AcmTextBox.setAttribute=function(name,value){switch(value){case'true':value=true;break;case'false':value=false;break;}
name='set'+name.charAt(0).toUpperCase()+name.substr(1);if(this[name]){this[name](value);}};_AcmTextBox.selectAll=function(){this._element.select();};_AcmTextBox._onFocus=function(e){this._textOnFocus=this.getValue();try{this._element.focus();}catch(er){}};_AcmTextBox._onBlur=function(e){if(this.getValue()!=this._textOnFocus){this.dispatchEvent(new Acm.FormFieldEvent('textChange'));}
if(!(e.getNewFocused()instanceof Acm.TextBox)&&this.getElement()){this.getElement().blur();}};_AcmTextBox._onKeyUp=function(e){this.dispatchEvent(new Acm.FormFieldEvent('change'));};Acm.Hidden=function(){Acm.TextBox.call(this);};var _AcmHidden=Acm.extend('Hidden','TextBox');_AcmHidden._type='hidden';_AcmHidden._tabStop=false;Acm.Password=function(){Acm.TextBox.call(this);};var _AcmPassword=Acm.extend('Password','TextBox');_AcmPassword._type='password';Acm.TextArea=function(){Acm.Component.call(this);};var _AcmTextArea=Acm.extend('TextArea','TextBox');_AcmTextArea._tagName='TEXTAREA';_AcmTextArea._textSelectable=true;_AcmTextArea._addTextNodesFromXML=true;_AcmTextArea._textOnFocus=null;_AcmTextArea.dispose=function(){if(this._disposed){return;}
Acm.TextArea.parent.dispose.call(this);};_AcmTextArea.create=function(sText){Acm.Component.prototype.create.call(this);this.addEventListener('focused',this._onFocus,this);this.addEventListener('blurred',this._onBlur,this);this.addEventListener('keyup',this._onKeyUp);};_AcmTextArea.getText=_AcmTextArea.getValue=function(){if(Acm.Browser.isIe){return this._element.value.replace(/\r\n/g,'\n');}
return this._element.value;};Acm.File=function(){Acm.Component.call(this);};var _AcmFile=Acm.extend('File','TextBox');_AcmFile._textSelectable=true;_AcmFile._type='file';_AcmFile.dispose=function(){if(this._disposed){return;}
Acm.File.parent.dispose.call(this);};_AcmFile.create=function(sText){Acm.File.parent.create.call(this);};Acm.CheckBox=function(){Acm.Component.call(this);};var _AcmCheckBox=Acm.extend('CheckBox','Component');_AcmCheckBox._tagName='SPAN';_AcmCheckBox._value=1;_AcmCheckBox._tabStop=true;_AcmCheckBox._showFocus=true;_AcmCheckBox._checked=false;_AcmCheckBox._checkBox=null;_AcmCheckBox._label=null;_AcmCheckBox.dispose=function(){if(this._disposed){return;}
Acm.CheckBox.parent.dispose.call(this);this._checkBox=null;this._label=null;};_AcmCheckBox.create=function(sText){Acm.CheckBox.parent.create.call(this);this.setHeight(20);this.setCanHaveFocus(true);this.addEventListener('click',this._onClick,this);this.addEventListener('keypress',this._onKeyPress,this);this.addEventListener('mousedown',this._onMouseDown,this);this._checkBox=this.addComponent(new Acm.Image());var checkBox=this._checkBox;checkBox.setSrc(application.getPath()+'img/checkbox/checkbox-unchecked.gif',12,12);checkBox.setStyle('vertical-align: middle; margin-right: 4px; border: 1px solid #000000;');this._label=this.addComponent(new Acm.Label());var label=this._label;};_AcmCheckBox.setText=function(sText){this._label.setText(sText);};_AcmCheckBox.getText=function(){return this._label.getText();};_AcmCheckBox.setIcon=function(oImage){this._label.setIcon(oImage);};_AcmCheckBox.getIcon=function(){return this._label.getIcon();};_AcmCheckBox.setChecked=function(bChecked){this._checked=bChecked;this._checkBox.setSrc(application.getPath()+'img/checkbox/checkbox-'+(bChecked?'checked':'unchecked')+'.gif',12,12);this.dispatchEvent(new Acm.FormFieldEvent('change'));};_AcmCheckBox.getChecked=function(){return this._checked;};_AcmCheckBox._onClick=function(e){this.setChecked(!this._checked);};_AcmCheckBox._onKeyPress=function(e){if(e.getKeyCode()==Acm.KeyboardEvent.SPACE){this.setChecked(!this._checked);}};_AcmCheckBox._onMouseDown=function(e){this._checkBox.setSrc(application.getPath()+'img/checkbox/checkbox-'+(this._checked?'checked':'unchecked')+'-mousedown.gif',12,12);e.stopPropagation();};_AcmCheckBox.getValue=function(){return this.getChecked()?Acm.CheckBox.parent.getValue.call(this):'';};Acm.SingleSelectBox=function(){Acm.Component.call(this);};var _AcmSingleSelectBox=Acm.extend('SingleSelectBox','Component');_AcmSingleSelectBox._label=null;_AcmSingleSelectBox._dropDownImage=null;_AcmSingleSelectBox._selectedItem=null;_AcmSingleSelectBox._dropDownMenu=null;_AcmSingleSelectBox._tabStop=true;_AcmSingleSelectBox._showFocus=true;_AcmSingleSelectBox._editable=null;_AcmSingleSelectBox.dispose=function(){if(this._disposed){return;}
Acm.SingleSelectBox.parent.dispose.call(this);this._label=null;this._dropDownButton=null;if(this._dropDownMenu){this._dropDownMenu.dispose();}
this._dropDownMenu=null;};_AcmSingleSelectBox.createPrototype=function(){var p=Acm.SingleSelectBox.parent.createPrototype.call(this);p.setClassName('acmSingleSelectBox');p._dropDownButton=p.addComponent(new Acm.ToggleButton(''));var button=p._dropDownButton;button.addClassName('acmSingleSelectBoxButton');p._label=p.addComponent(new Acm.DivLabel());var label=p._label;label.addClassName('acmSingleSelectBoxLabel');if(Acm.Browser.isIe){label.setStyleProperty('width','100%');}
return p;};_AcmSingleSelectBox.create=function(sText){Acm.SingleSelectBox.parent.create.call(this);var cn=this._element.childNodes;this._dropDownButton=this.addComponent(new Acm.ToggleButton().setElement(cn[0]));var button=this._dropDownButton;button.setEnabled(false);button.setHover(true);this._label=this.addComponent(new Acm.Label().setElement(cn[1]));var label=this._label;this._dropDownMenu=new Acm.Menu();var menu=this._dropDownMenu;menu.setContainer(this.getContainer());menu.addEventListener('hide',this._onMenuHide,this);this.setCanHaveFocus(true);this._dropDownMenu.setCanHaveFocus(true);this._dropDownMenu.setShowFocus(true);this._dropDownMenu.setFocus(true);this.addEventListener('keypress',this._onKeyPress,this);this.addEventListener('mousedown',this._onMouseDown,this);this.addEventListener('mouseup',function(e){e.stopPropagation();});};_AcmSingleSelectBox.addComponent=function(oComp){var v;if(oComp instanceof Acm.Option){this._dropDownMenu.addComponent(oComp);oComp.addEventListener('action',this._onMenuItemAction,this);v=oComp.getValue();if(oComp.getSelected()||(v!==''&&v==this.getValue())){this.setSelectedItem(oComp);}
return oComp;}else{return Acm.SingleSelectBox.parent.addComponent.call(this,oComp);}};_AcmSingleSelectBox.setValue=function(value){var bingo=false;for(var i=0,arr=this._dropDownMenu._items,l=arr.length;i<l;i++){if(arr[i].getValue()==value){this.setSelectedItem(arr[i]);return Acm.Component.prototype.setValue.call(this,value);}}
this.setSelectedItem(null);if(this._editable){this.setText(value);return Acm.Component.prototype.setValue.call(this,value);}else{return false;}};_AcmSingleSelectBox.getValue=function(){var s=this._selectedItem;return s?s.getValue():Acm.SingleSelectBox.parent.getValue.call(this);};_AcmSingleSelectBox.getText=function(){return this._label.getText();};_AcmSingleSelectBox.setText=function(text){this._label.setText(text);};_AcmSingleSelectBox.setIcon=function(icon){this._label.setIcon(icon);};_AcmSingleSelectBox.getIcon=function(icon){this._label.getIcon(icon);};_AcmSingleSelectBox.clearContents=function(){this._dropDownMenu.clearContents();};_AcmSingleSelectBox.showDropDownMenu=function(){var menu=this._dropDownMenu;menu.showFor(this,'below');if(menu.getWidth()<this.getPixelWidth()){menu.setWidth(this.getPixelWidth());}
this._dropDownButton.setChecked(true);menu.setFocus(true);};_AcmSingleSelectBox.setEditable=function(bEditable){this._label.setEditable(bEditable);var textbox;if(bEditable){textbox=this._label._label;textbox.setCanHaveFocus(false);textbox.setStyle('width: 100%; border: none; background-color: transparent;');textbox.setPosition(18,0,0,0);this.removeEventListener('mousedown',this._onMouseDown,this);}
this._editable=bEditable;};_AcmSingleSelectBox.getSelectedItem=function(){return this._selectedItem;};_AcmSingleSelectBox.setSelectedItem=function(oItem){if(!oItem){this.setText(' ');this.setIcon(null);this._selectedItem=null;Acm.SingleSelectBox.parent.setValue.call(this,null);return;}
text=oItem.getText()||oItem.getValue();this.setText(text);if(oItem.getIcon()){this.setIcon(oItem.getIcon().getSrc());}
Acm.SingleSelectBox.parent.setValue.call(this,oItem.getValue());this._selectedItem=oItem;};_AcmSingleSelectBox.getDropDownMenu=function(){return this._dropDownMenu;};_AcmSingleSelectBox._onMouseDown=function(e){var menu=this._dropDownMenu;if(menu.isShowing()){menu.hide();}else{this.showDropDownMenu();}
e.stopPropagation();};_AcmSingleSelectBox._onMenuHide=function(){this.setFocus(true);this._dropDownButton.setChecked(false);this._dropDownMenu.setWidth(null);};_AcmSingleSelectBox._onMenuItemAction=function(e){var newSelected=e.getDispatcher();var currSelected=this._selectedItem;this.setSelectedItem(newSelected);this.dispatchEvent(new Acm.ComponentEvent('action',newSelected));if(newSelected!=currSelected){this.dispatchEvent(new Acm.FormFieldEvent('change'));}};_AcmSingleSelectBox._onKeyPress=function(e){if(e.getKeyCode()==Acm.KeyboardEvent.DOWN&&!e.getCtrlKey()&&!e.getShiftKey()&&!e.getAltKey()){if(!this._dropDownMenu._showing){this.showDropDownMenu();}}};Acm.NodeContainer=function(){Acm.Component.call(this);this._nodes=[];};var _AcmNodeContainer=Acm.extend('NodeContainer','Component');_AcmNodeContainer._nodes=null;_AcmNodeContainer._selectionManager=null;_AcmNodeContainer.dispose=function(){if(this._disposed){return;}
Acm.NodeContainer.parent.dispose.call(this);this._nodes=null;this._selectionManager.dispose();this._selectionManager=null;};_AcmNodeContainer.createPrototype=function(){var p=Acm.NodeContainer.parent.createPrototype.call(this);p.setClassName('acmNodeContainer');return p;};_AcmNodeContainer.create=function(){Acm.NodeContainer.parent.create.call(this);this.setCanHaveFocus(true);this._selectionManager=new Acm.SelectionManager();var selMan=this._selectionManager;selMan.setMultipleSelection(true);this.addEventListener('mousedown',this._onMouseDown,this);this.addEventListener('keypress',this._onKeyPress,this);this.addEventListener('dblclick',this._onDblClick,this);this.addEventListener('focused',this._onFocus,this);};_AcmNodeContainer.getSelectionManager=function(){return this._selectionManager;};_AcmNodeContainer.addNode=function(oNode){};_AcmNodeContainer.removeComponent=function(oComp){if(oComp instanceof Acm.Node){Acm.Array.remove(this._nodes,oComp);this._selectionManager.removeItem(oComp);}
return Acm.NodeContainer.parent.removeComponent.call(this,oComp);};_AcmNodeContainer.deleteSelectedNodes=function(){var item,items=this._selectionManager.getSelectedItems();for(var i in items){item=items[i];this.deleteComponent(item);}};_AcmNodeContainer.addComponent=function(oComp){Acm.NodeContainer.parent.addComponent.call(this,oComp);if(oComp instanceof Acm.Node){oComp._nodeContainer=this;this._nodes.push(oComp);this._selectionManager.addItem(oComp);}
return oComp;};_AcmNodeContainer.getXmlHttp=function(){return this._xmlHttp;};_AcmNodeContainer.clearContents=function(){this._selectionManager.reset();this.deleteAllComponents();this._nodes=[];};_AcmNodeContainer.getSelectedNodes=function(){return this._selectionManager.getSelectedItems();};_AcmNodeContainer._onDblClick=function(e){var comp=e.getDispatcher();if(comp instanceof Acm.Node){this.dispatchEvent(new Acm.NodeEvent('action',e,comp));}};_AcmNodeContainer._onKeyPress=function(e){if(this._nodes.length===0){return;}
if(e.getCtrlKey()||(e.getCtrlKey()&&e.getShiftKey())||e.getAltKey()){return;}
var selectedNodes=this.getSelectedNodes();var selectionManager=this._selectionManager;var key=e.getKeyCode();if(key==Acm.KeyboardEvent.ENTER){var l=selectedNodes.length;for(var i=0;i<l;i++){selectedNodes[i].dispatchEvent(new Acm.NodeEvent('action',e,selectedNodes[i]));}}else if(key==Acm.KeyboardEvent.LEFT||key==Acm.KeyboardEvent.RIGHT||key==Acm.KeyboardEvent.UP||key==Acm.KeyboardEvent.DOWN){if(selectedNodes.length===0){this._selectionManager.select(this._children[0]);}else{var comp=e.getDispatcher();if(comp instanceof Acm.Node){this._pageX=this.getPageX();this._pixelWidth=this.getPixelWidth();this._pageY=this.getPageY();this._pixelHeight=this.getPixelHeight();var node=this._findNode(comp.getPageX()+(comp.getPixelWidth()/2),comp.getPageY()+(comp.getPixelHeight()/2),e.getKeyCode(),comp,'point');if(node){if(e.getShiftKey()){selectionManager.addItemToSelection(node);e.preventDefault();}else{selectionManager.select(node);}}}}}};_AcmNodeContainer._findNode=function(left,top,keyCode,startNode,searchMode){switch(keyCode){case Acm.KeyboardEvent.LEFT:if(left>this._pageX){left-=80;}else{return false;}
break;case Acm.KeyboardEvent.RIGHT:if(left<this._pageX+this._pixelWidth){left+=80;}else{return false;}
break;case Acm.KeyboardEvent.UP:if(top>this._pageY){top-=80;}else{return false;}
break;case Acm.KeyboardEvent.DOWN:if(top<this._pageY+this._pixelHeight){top+=80;}else{return false;}
break;default:return false;}
var comp;if(searchMode=='point'){comp=this.getComponentFromPoint(left,top);if(comp instanceof Acm.Node&&comp!=startNode){return comp;}else{searchMode=(keyCode==Acm.KeyboardEvent.UP||keyCode==Acm.KeyboardEvent.DOWN)?'vertical':'horizontal';}}
if(searchMode=='horizontal'){comp=this.getComponentFromPointX(left);}else{comp=this.getComponentFromPointY(top);}
return(comp instanceof Acm.Node&&comp!=startNode)?comp:this._findNode(left,top,keyCode,startNode,searchMode);};_AcmNodeContainer._onMouseDown=function(e){var comp=e.getDispatcher();if(this._disabled){return;}
if(comp==this){this._selectionManager.unselectAllItems();}else if(comp instanceof Acm.Node){if(e.getCtrlKey()){this._selectionManager.toggleSelectionOnItem(comp);}else{this._selectionManager.unselectAllItems();this._selectionManager.addItemToSelection(comp,true);}}};_AcmNodeContainer._onFocus=function(){var item=this._selectionManager.getLastSelectedItem();if(item){item.setFocus(true,true);}else if(this._children&&this._children.length>0){this._selectionManager.select(this._children[0]);}};Acm.WindowManager=function(oComp){this._windows=[];this._windowContainer=oComp;oComp.addEventListener('keydown',this._onWindowContainerKeyDown,this);};var _AcmWindowManager=Acm.extend('WindowManager','EventTarget');_AcmWindowManager._windows=null;_AcmWindowManager._windowContainer=null;_AcmWindowManager._cursor=0;_AcmWindowManager._taskBar=null;_AcmWindowManager.dispose=function(){if(this.disposed){return;}
Acm.WindowManager.parent.dispose.call(this);this._windows=null;this._windowContainer=null;this._cursor=null;this._taskBar=null;};_AcmWindowManager.addWindow=function(oWindow){Acm.Component.prototype.addComponent.call(this._windowContainer,oWindow);oWindow.addEventListener('mousedown',this._onWindowMouseDown,this);oWindow.addEventListener('minimized',this._onWindowMinimized,this);oWindow.addEventListener('restored',this._onWindowRestored,this);oWindow.addEventListener('close',this._onWindowClose,this);oWindow._windowManager=this;oWindow.setZIndex(this._windows.length+1);this._windows.push(oWindow);this.setFocusedWindow(oWindow);this.dispatchEvent(new Acm.ComponentEvent('windowAdd',oWindow));this._cursor=this._windows.length-1;return oWindow;};_AcmWindowManager.deleteWindow=function(oComp){if(!(oComp instanceof Acm.Window)){return;}
Acm.Array.remove(this._windows,oComp);this._focusPreviousWindow();this.dispatchEvent(new Acm.ComponentEvent('windowRemove',oComp));};_AcmWindowManager.setFocusedWindow=function(oWindow,preventReorder){if(this._focusedWindow==oWindow){return;}
if(this._focusedWindow){this._focusedWindow.setBlurStyle();this.dispatchEvent(new Acm.ComponentEvent('windowBlur',oWindow));}
var focusComp=oWindow.getTabManager().getFocusedComponent();if(focusComp){focusComp.setFocus(true,true);}else{(focusComp||oWindow).setFocus(true,true);}
var i,j=0,wins=this._windows,l=wins.length;var z=oWindow.getZIndex();for(i=0;i<l;i++){if(wins[i].getZIndex()>z){wins[i].setZIndex(wins[i].getZIndex()-1);if(Acm.Browser.isIe){wins[i].setWidth(wins[i].getWidth()+1);wins[i].setWidth(wins[i].getWidth()-1);}
j++;}}
oWindow.setZIndex(z+j);if(Acm.Browser.isIe){oWindow.setWidth(oWindow.getWidth()+1);oWindow.setWidth(oWindow.getWidth()-1);}
var ws=this._windows;if(!preventReorder&&Acm.Array.indexOf(ws,oWindow)!=-1){Acm.Array.remove(ws,oWindow);ws.push(oWindow);}
oWindow.setFocusStyle();this._focusedWindow=oWindow;this.dispatchEvent(new Acm.ComponentEvent('windowFocus',oWindow));};_AcmWindowManager.getFocusedWindow=function(){return this._focusedWindow;};_AcmWindowManager.getWindows=function(){return this._windows;};_AcmWindowManager.getWindowById=function(id){var win=this._windowContainer.getComponentById(id,1);if(win instanceof Acm.Window){return win;}
return false;};_AcmWindowManager.getWindowContainer=function(){return this._windowContainer;};_AcmWindowManager._getPreviousWindow=function(){this._tmpCursor=this._cursor;return this._getXNextWindow(false);};_AcmWindowManager._getNextWindow=function(){this._tmpCursor=this._cursor;return this._getXNextWindow(true);};var glob=0;_AcmWindowManager._getXNextWindow=function(next){if(++glob>5){return false;}
var noWin=this._windows.length-1;var count=this._cursor;if(!next){count=(count>0)?count-1:noWin;}else{count=(count<noWin)?count+1:0;}
if(count==this._tmpCursor||noWin==0){return false;}
this._cursor=count;var oWindow=this._windows[count];if(oWindow){if(oWindow.getState()=='minimized'){return this._getXNextWindow(next);}}
return oWindow;};_AcmWindowManager._focusPreviousWindow=function(){var prev=this._getPreviousWindow();if(prev){this.setFocusedWindow(prev);}else{this._focusedWindow=null;this._windowContainer.setFocus(true);}};_AcmWindowManager.setTaskBar=function(oTaskBar){this._taskBar=oTaskBar;};_AcmWindowManager.getTaskBar=function(){return this._taskBar;};_AcmWindowManager._onWindowMouseDown=function(e){this.setFocusedWindow(e.getCurrentTarget());e.getDispatcher().setFocus(true);};_AcmWindowManager._onWindowMinimized=function(e){this._focusPreviousWindow();};_AcmWindowManager._onWindowRestored=function(e){this.setFocusedWidnow(e.getComponent());};_AcmWindowManager._onWindowClose=function(e){var oWindow=e.getComponent();if(oWindow==this._focusedWindow){this._focusedWindow=null;}
this.deleteWindow(oWindow);};_AcmWindowManager._onWindowContainerKeyDown=function(e){if(e.getAltKey()&&!e.getCtrlKey()){if(e.getKeyCode()==Acm.KeyboardEvent.LEFT||e.getKeyCode()==Acm.KeyboardEvent.RIGHT){if(e.getKeyCode()==Acm.KeyboardEvent.LEFT){oWindow=this._getPreviousWindow();}else{oWindow=this._getNextWindow();}
if(oWindow){this.setFocusedWindow(oWindow,true);}
e.preventDefault();}}else if(e.getCtrlKey()){if(e.getKeyCode()==Acm.KeyboardEvent.W){if(this._focusedWindow){this._focusedWindow.close();}
e.preventDefault();}}};Acm.Button=function(sText){Acm.Label.call(this,sText);};var _AcmButton=Acm.extend('Button','Label');_AcmButton._tagName='DIV';_AcmButton._hover=false;_AcmButton._canHaveFocus=true;_AcmButton._showFocus=true;_AcmButton._isPressed=null;_AcmButton.createPrototype=function(){var p=Acm.Button.parent.createPrototype.call(this);p.setClassName('acmLabel acmButton acmButtonSolid acmRaised acmButtonRaised');return p;};_AcmButton.create=function(){Acm.Button.parent.create.call(this);this.addEventListener("mousedown",this._onMouseDown);this.addEventListener("mouseup",this._onMouseUp);this.addEventListener("keypress",this._onKeyPress);};_AcmButton.setHover=function(bHover){if(this._hover===bHover){return;}
if(bHover===true){this.removeClassName('acmButtonSolid acmRaised acmButtonRaised');this.addEventListener("mouseover",this._onMouseOver);this.addEventListener("mouseout",this._onMouseOut);}else{this.addClassName('acmButtonSolid acmRaised acmButtonRaised');this.removeEventListener("mouseover",this._onMouseOver);this.removeEventListener("mouseout",this._onMouseOut);}
this._hover=bHover;};_AcmButton._makeNormal=function(){this.removeClassName('acmPressed acmButtonPressed');if(this._hover){this.removeClassName('acmRaised acmButtonRaised');}else{this.addClassName('acmRaised acmButtonRaised');}};_AcmButton._makeHover=function(){if(this._hover){this.removeClassName('acmPressed acmButtonPressed');this.addClassName('acmRaised acmButtonRaised');}};_AcmButton._makeActive=function(b){this.removeClassName('acmRaised acmButtonRaised');this.addClassName('acmPressed acmButtonPressed');};_AcmButton._onMouseDown=function(e){if(e.getButton()==Acm.MouseEvent.LEFT){this._makeActive();this.getContainer().addEventListener("mouseup",this._onContainerPaneMouseUp,this);if(!this._hover){this.addEventListener("mouseover",this._onMouseOver);this.addEventListener("mouseout",this._onMouseOut);}
this._isPressed=true;}};_AcmButton._onContainerPaneMouseUp=function(e){if(e.getButton()==Acm.MouseEvent.LEFT){this._makeNormal();this.getContainer().removeEventListener("mouseup",this._onContainerPaneMouseUp,this);if(!this._hover){this.removeEventListener("mouseover",this._onMouseOver);this.removeEventListener("mouseout",this._onMouseOut);}
this._isPressed=false;}};_AcmButton._onMouseUp=function(e){if(e.getButton()==Acm.MouseEvent.LEFT&&this._isPressed){this._makeNormal();this.dispatchEvent(new Acm.Event("action"));}};_AcmButton._onKeyPress=function(e){if(e.getKeyCode()==Acm.KeyboardEvent.ENTER||e.getKeyCode()==Acm.KeyboardEvent.SPACE){this.dispatchEvent(new Acm.Event('action'));}};_AcmButton._onMouseOver=function(e){if(this._isPressed){this._makeActive();}else{this._makeHover();}};_AcmButton._onMouseOut=function(e){this._makeNormal();};Acm.ButtonOnlyForIe=function(sText){Acm.Button.call(this,sText);};var _AcmButtonOnlyForIe=Acm.extend('ButtonOnlyForIe','Button');_AcmButtonOnlyForIe.dispose=function(){if(this._disposed){return;}
Acm.ButtonOnlyForIe.parent.dispose.call(this);};_AcmButtonOnlyForIe.create=function(sText){Acm.ButtonOnlyForIe.parent.create.call(this,sText);this.addEventListener("action",this._onAction);this.addEventListener("complete",this._onComplete);};_AcmButtonOnlyForIe._onComplete=function(){if(BrowserDetect.browser!=='Explorer'){this.getParentComponent().removeComponent(this);this.dispose();}};Acm.SubmitButton=function(sText){Acm.Button.call(this,sText);};var _AcmSubmitButton=Acm.extend('SubmitButton','Button');_AcmSubmitButton.dispose=function(){if(this._disposed){return;}
Acm.SubmitButton.parent.dispose.call(this);};_AcmSubmitButton.create=function(sText){Acm.SubmitButton.parent.create.call(this,sText);this.addEventListener("action",this._onAction);};_AcmSubmitButton._onAction=function(e){var comp=this;while(comp._parentComponent){if(comp instanceof Acm.Window){return false;}
if(comp instanceof Acm.Form){comp.submit();}
comp=comp._parentComponent;}};Acm.ToggleButton=function(sText){Acm.Button.call(this,sText);};var _AcmToggleButton=Acm.extend('ToggleButton','Button');_AcmToggleButton._checked=false;_AcmToggleButton.setChecked=function(bChecked){if(this._checked==bChecked){return;}
if(this._element){if(bChecked){this._makeActive();}else{this._makeNormal();}}
this._checked=bChecked;this.dispatchEvent(new Acm.Event('change'));};_AcmToggleButton.getChecked=function(){return this._checked;};_AcmToggleButton._onMouseUp=function(e){if(e.getButton()==Acm.MouseEvent.LEFT){this.setChecked(!this._checked);this.dispatchEvent(new Acm.Event('action'));e.stopPropagation();}};_AcmToggleButton._onMouseOver=function(e){if(!this._checked){this._makeHover();}};_AcmToggleButton._onMouseOut=function(e){if(!this._checked){this._makeNormal();}};_AcmToggleButton._onKeyPress=function(e){if(e.getKeyCode()==Acm.KeyboardEvent.ENTER||e.getKeyCode()==Acm.KeyboardEvent.SPACE){this.dispatchEvent(new Acm.Event('action'));this.setChecked(!this._checked);}};_AcmToggleButton._onContainerPaneMouseUp=function(e){this.getContainer().removeEventListener("mouseup",this._onContainerPaneMouseUp,this);this._isPressed=false;};Acm.MenuButton=function(sText){Acm.ToggleButton.call(this,sText);};var _AcmMenuButton=Acm.extend('MenuButton','ToggleButton');_AcmMenuButton._menu=null;_AcmMenuButton._direction='down';_AcmMenuButton.dispose=function(){if(this._disposed){return;}
Acm.MenuButton.parent.dispose.call(this);if(this._menu){this._menu.dispose();}
this._menu=null;};_AcmMenuButton.create=function(){Acm.MenuButton.parent.create.call(this);};_AcmMenuButton.addComponent=function(oComp){if(oComp instanceof Acm.Menu){this.setMenu(oComp);return oComp;}else{return Acm.MenuButton.parent.addComponent.call(this,oComp);}};_AcmMenuButton.appendComponent=function(){};_AcmMenuButton.setDirection=function(direction){this._direction=direction;};_AcmMenuButton.getDirection=function(){return this._direction;};_AcmMenuButton.setChecked=function(bChecked){if(Acm.MenuButton.parent.setChecked.call(this,bChecked)==false){return;}
var buttonHeight;if(bChecked&&this._menu&&!this._menu.isShowing()){this._menu.setDirection(this._direction);buttonHeight=this._direction=='down'?this.getHeight():0;this._menu.show(this.getPageX(),this.getPageY()+buttonHeight);}};_AcmMenuButton.getMenu=function(){return this._menu;};_AcmMenuButton.setMenu=function(menu){menu.setContainer(this.getContainer());menu.setOwner(this);this._menu=menu;menu.addEventListener('hide',this._onMenuHide,this);menu.addEventListener('action',this._onMenuAction,this);return menu;};_AcmMenuButton._onMouseUp=function(e){Acm.MenuButton.parent._onMouseUp.call(this,e);e.stopPropagation();};_AcmMenuButton._onMenuHide=function(e){this.setChecked(false);this.setFocus(true);};_AcmMenuButton._onMenuAction=function(e){this.dispatchEvent(new Acm.ComponentEvent('menuAction',e.getComponent()));};_AcmMenuButton._onKeyPress=function(e){Acm.MenuButton.parent._onKeyPress.call(this,e);if(e.getKeyCode()==Acm.KeyboardEvent.DOWN){this.setChecked(!this._checked);}};_AcmMenuButton._onMouseOut=function(){if(this._menu&&this._menu.isShowing()){return;}
Acm.MenuButton.parent._onMouseOut.call(this);};Acm.MenuBarButton=function(){Acm.MenuButton.call(this);};var _AcmMenuBarButton=Acm.extend('MenuBarButton','MenuButton');_AcmMenuBarButton._menuBar=null;_AcmMenuBarButton.dispose=function(){if(this._disposed){return;}
Acm.MenuBarButton.parent.dispose.call(this);this._menuBar=null;};_AcmMenuBarButton.createPrototype=function(){var p=Acm.MenuBarButton.parent.createPrototype.call(this);p.addClassName('acmMenuBarButton');return p;};_AcmMenuBarButton.create=function(){Acm.MenuBarButton.parent.create.call(this);};_AcmMenuBarButton.setMenuBar=function(oMenuBar){this._menuBar=oMenuBar;};_AcmMenuBarButton.getMenuBar=function(){return this._menuBar;};_AcmMenuBarButton._onMenuHide=function(e){if(this.getChecked()){this.setChecked(false);}};Acm.RadioButton=function(){Acm.ToggleButton.call(this);};var _AcmRadioButton=Acm.extend('RadioButton','ToggleButton');_AcmRadioButton._onMouseUp=function(e){if(this._checked){return;}
Acm.RadioButton.parent._onMouseUp.call(this,e);};_AcmRadioButton._onMouseDown=function(e){if(this._checked){return;}
Acm.RadioButton.parent._onMouseUp.call(this,e);};_AcmRadioButton._onKeyPress=function(e){if(this._checked){return;}
Acm.RadioButton.parent._onKeyPress.call(this,e);};Acm.Separator=function(){Acm.Component.call(this);};var _AcmSeparator=Acm.extend('Separator','Component');_AcmSeparator._canHaveFocus=false;_AcmSeparator.create=function(){Acm.Separator.parent.create.call(this);this.setClassName('acmSeparator');this.setWidth(2);this.setHeight(14);};Acm.HrLine=function(){Acm.Component.call(this);};var _AcmHrLine=Acm.extend('HrLine','Component');_AcmHrLine.dispose=function(){if(this._disposed){return;}
Acm.HrLine.parent.dispose.call(this);};_AcmHrLine.createPrototype=function(){var p=Acm.HrLine.parent.createPrototype.call(this);p.setClassName('acmHrLine');return p;};Acm.Window=function(){Acm.Component.call(this);};var _AcmWindow=Acm.extend('Window','Component');_AcmWindow._width=300;_AcmWindow._height=200;_AcmWindow._titleBar=null;_AcmWindow._startRight=0;_AcmWindow._offsetX=0;_AcmWindow._offsetY=0;_AcmWindow._backPlate=null;_AcmWindow._borderLeft=null;_AcmWindow._borderRight=null;_AcmWindow._borderBottom=null;_AcmWindow._borderLeftCorner=null;_AcmWindow._borderRightCorner=null;_AcmWindow._resize=null;_AcmWindow._resizable=true;_AcmWindow._state='restored';_AcmWindow._movable=true;_AcmWindow._closed=false;_AcmWindow._contentPane=null;_AcmWindow._windowManager=null;_AcmWindow._overflowAutoComponents=null;_AcmWindow._liveResize=null;_AcmWindow._uri=null;_AcmWindow._minimizable=true;_AcmWindow._maximizable=true;_AcmWindow._restore={width:0,height:0,left:0,top:0};_AcmWindow.dispose=function(){if(this._disposed){return;}
Acm.Window.parent.dispose.call(this);this._titleBar=null;this._startRight=null;this._offsetX=null;this._offsetY=null;this._backPlate=null;this._borderLeft=null;this._borderRight=null;this._borderBottom=null;this._borderLeftCorner=null;this._borderRightCorner=null;this._resize=null;this._resizable=null;this._movable=null;this._closed=null;this._contentPane=null;this._windowManager=null;this._overflowAutoComponents=null;this._uri=null;this._minimizable=null;this._maximizable=null;this._restore=null;this._state=null;};_AcmWindow.createPrototype=function(){var o=Acm.Window.parent.createPrototype.call(this);var c;o.setClassName('acmWindow');o._contentPane=Acm.Window.parent.addComponent.call(o,new Acm.Component());var contentPane=o._contentPane;contentPane.setClassName('acmWindowContentPane');contentPane.setPosition(7,7,23,10);o._borderLeft=Acm.Window.parent.addComponent.call(o,new Acm.Component());c=o._borderLeft;c.setClassName('acmWindowBorderLeft');c.setPosition(0,null,23,10);if(Acm.Browser.isIe){c.setStyleProperty("filter","progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='"+o.getPath()+"img/window/mid-left-ds.png', sizingMethod='scale')");}
o._borderRight=Acm.Window.parent.addComponent.call(o,new Acm.Component());c=o._borderRight;c.setClassName('acmWindowBorderRight');c.setPosition(null,0,23,10);if(Acm.Browser.isIe){c.setStyleProperty("filter","progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='"+o.getPath()+"img/window/mid-right-ds.png', sizingMethod='scale')");}
o._borderBottom=Acm.Window.parent.addComponent.call(o,new Acm.Component());c=o._borderBottom;c.setClassName('acmWindowBorderBottom');c.setPosition(14,14,null,0);if(Acm.Browser.isIe){c.setStyleProperty("filter","progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='"+o.getPath()+"img/window/bot-mid-ds.png', sizingMethod='scale')");}
o._borderLeftCorner=Acm.Window.parent.addComponent.call(o,new Acm.Image(o.getPath()+'img/window/bot-left-ds.png',14,10));c=o._borderLeftCorner;c.setClassName('acmWindowLeftCorner');o._borderRightCorner=Acm.Window.parent.addComponent.call(o,new Acm.Image(o.getPath()+'img/window/bot-right-ds.png',14,10));c=o._borderRightCorner;c.setClassName('acmWindowRightCorner');o._resize=Acm.Window.parent.addComponent.call(o,new Acm.Component());c=o._resize;c.setClassName('acmWindowResizeBottomRight');o._titleBar=Acm.Window.parent.addComponent.call(o,new Acm.WindowTitleBar(o));return o;};_AcmWindow.create=function(){Acm.Window.parent.create.call(this);if(!this._element.childNodes[0]){return;}
var c;this._contentPane=Acm.Window.parent.addComponent.call(this,new Acm.Component().setElement(this._element.childNodes[0]));var contentPane=this._contentPane;contentPane.setId('contentPane');contentPane.setPosition(7,7,23,10);contentPane.setCanHaveFocus(false);this._borderLeft=Acm.Window.parent.addComponent.call(this,new Acm.Component().setElement(this._element.childNodes[1]));c=this._borderLeft;c.setPosition(0,null,23,10);c.addEventListener('mousedown',this._onBorderLeftMouseDown,this);c.addEventListener('drag',this._onBorderLeftDrag,this);c.addEventListener('dragEnd',this._onBorderLeftDragEnd,this);this._borderRight=Acm.Window.parent.addComponent.call(this,new Acm.Component().setElement(this._element.childNodes[2]));c=this._borderRight;c.setPosition(null,0,23,10);c.addEventListener('drag',this._onBorderRightDrag,this);c.addEventListener('dragEnd',this._onBorderRightDragEnd,this);this._borderBottom=Acm.Window.parent.addComponent.call(this,new Acm.Component().setElement(this._element.childNodes[3]));c=this._borderBottom;c.setPosition(14,14,null,0);c.addEventListener('drag',this._onBorderBottomDrag,this);c.addEventListener('dragEnd',this._onBorderBottomDragEnd,this);this._borderLeftCorner=Acm.Window.parent.addComponent.call(this,new Acm.Image().setElement(this._element.childNodes[4]));this._borderRightCorner=Acm.Window.parent.addComponent.call(this,new Acm.Image().setElement(this._element.childNodes[5]));this._resize=Acm.Window.parent.addComponent.call(this,new Acm.Component().setElement(this._element.childNodes[6]));c=this._resize;c.addEventListener('dragStart',this._onResizeDragStart,this);c.addEventListener('drag',this._onResizeDrag,this);c.addEventListener('dragEnd',this._onResizeDragEnd,this);this._titleBar=Acm.Window.parent.addComponent.call(this,new Acm.WindowTitleBar(this).setElement(this._element.childNodes[7]));this.addEventListener('drop',function(e){e.stopPropagation();});this.addEventListener('keypress',this._onKeyPress,this);this.addEventListener('contextmenu',this._onContextMenu,this);this.setTabRoot(true);this.setCanHaveFocus(true);this.setShowFocus(false);this.resizeTo(this._width,this._height);this.moveTo(200,200);(new Acm.Timer(50,function(e){this.setFocusStyle();e.timer.stop();},this)).start();};_AcmWindow.addComponent=function(oComp){if(this._contentPane){return this._contentPane.addComponent(oComp);}else{return Acm.Window.parent.addComponent.call(this,oComp);}};_AcmWindow.clearContents=function(){this._contentPane.deleteAllComponents();};_AcmWindow.setMinimizable=function(b){if(this._minimizable!=b){this._minimizable=b;this._titleBar.setShowButton(this._titleBar._parts.minimize,b);}};_AcmWindow.getMinimizable=function(){return this._minimizable;};_AcmWindow.setMaximizable=function(b){if(this._maximizable!=b){this._maximizable=b;this._titleBar.setShowButton(this._titleBar._parts.maximize,b);}};_AcmWindow.getMaximizable=function(){return this._maximizable;};_AcmWindow.setShowClose=function(show){this._titleBar.setShowButton(this._titleBar._parts.close,show);};_AcmWindow.getShowClose=function(){alert('getShowClose is not impletemnted');};_AcmWindow.setUri=function(sUri){this._uri=sUri;};_AcmWindow.getUri=function(){return this._uri;};_AcmWindow.getContentPane=function(){return this._contentPane;};_AcmWindow.close=function(){if(this.dispatchEvent(new Acm.ComponentEvent('beforeClose',this))!==false){this.dispatchEvent(new Acm.ComponentEvent('close',this));this._parentComponent.deleteComponent(this);this._closed=true;}};_AcmWindow.setResizable=function(b,keepRestore){this._resizable=b;if(b==true){this._resize.show();this._enableBorders();}else{this._resize.hide();this._disableBorders();}
if(!keepRestore){this.setMaximizable(b);}};_AcmWindow.getResizable=function(){return this._resizable;};_AcmWindow._disableBorders=function(){this._borderLeft.setEnabled(false);this._borderBottom.setEnabled(false);this._borderRight.setEnabled(false);this._borderLeft.setStyleProperty('cursor','default');this._borderRight.setStyleProperty('cursor','default');this._borderBottom.setStyleProperty('cursor','default');};_AcmWindow._enableBorders=function(){this._borderLeft.setEnabled(true);this._borderBottom.setEnabled(true);this._borderRight.setEnabled(true);this._borderLeft.setStyleProperty('cursor','w-resize');this._borderRight.setStyleProperty('cursor','w-resize');this._borderBottom.setStyleProperty('cursor','n-resize');};_AcmWindow.focus=function(){this._windowManager.setFocusedWindow(this);};_AcmWindow.setTitle=function(title){this._titleBar.setTitle(title);this.dispatchEvent(new Acm.Event('titleChanged'));};_AcmWindow.getTitle=function(){return this._titleBar.getTitle();};_AcmWindow.setIcon=function(oImage){this._titleBar.setIcon(oImage);this.dispatchEvent(new Acm.Event('iconChanged'));};_AcmWindow.getIcon=function(){return this._titleBar.getIcon();};_AcmWindow.setState=function(sState,ignore){if(this._state==sState){return;}
var passed=false,eventObject=new Acm.ComponentEvent(sState.substr(0,sState.length-1),this);if(sState=='maximized'&&this._maximizable){if(!ignore){this._setRestoreCoords();}
if(Acm.Browser.isMoz){this._element.style.width=this._element.style.height=null;}
this.setPosition(-7,-7,0,15);this.setResizable(false,true);this.setMovable(false);passed=true;}else if(sState=='minimized'&&this._minimizable){this._setRestoreCoords();this.hide();passed=true;this.setResizable(this._restore.resizable);this.setMovable(this._restore.movable);}else if(sState=='restored'){if(this.getBottom()&&this._state=='minimized'){this.show();this.setResizable(true);this.setState('maximized',true);return;}else{this.setPosition(this._restore.left,null,this._restore.top,null);this.resizeTo(this._restore.width,this._restore.height);this.setResizable(this._restore.resizable);this.setMovable(this._restore.movable);}
this.show();passed=true;}
if(passed){this._state=sState;this._parentComponent.ieLayoutComponents();this.dispatchEvent(eventObject);this.ieLayoutComponents();}};_AcmWindow._setRestoreCoords=function(){if(this._state=='maximized'||this._state=='minimized'){return;}
this._restore.width=this.getWidth();this._restore.height=this.getHeight();this._restore.left=this.getLeft();this._restore.top=this.getTop();this._restore.movable=this._movable;this._restore.resizable=this._resizable;};_AcmWindow.getState=function(){return this._state;};_AcmWindow.toggleMaximize=function(){if(this._state=='maximized'){this.setState('restored');}else{this.setState('maximized');}};_AcmWindow.getWindowManager=function(){return this._windowManager;};_AcmWindow.setLiveResize=function(b){this._liveResize=b;};_AcmWindow.getLiveResize=function(){return this._liveResize;};_AcmWindow._hideContent=function(){if(!this._liveResize&&this._contentPane._children){for(var i=0,a=this._contentPane._children,l=a.length;i<l;i++){a[i].hide();}}};_AcmWindow._showContent=function(){if(!this._liveResize&&this._contentPane._children){for(var i=0,a=this._contentPane._children,l=a.length;i<l;i++){a[i].show();}}};_AcmWindow.setFocusStyle=function(e){if(Acm.Browser.isMac){this.removeClassName('hide-scrollbars');}
this._titleBar._parts.upLeft.setSrc(this.getPath()+'img/window/up-left-active.png',17,23);this._titleBar._cTitle.setStyle('color: #000000; background-image: url('+this.getPath()+'img/window/up-mid-active.gif)');this._titleBar._parts.upMid2.setSrc(this.getPath()+'img/window/up-mid2-active.gif');this._titleBar._cTitle.setClassName('acmLabel acmWindowTitleBarTitle');this._contentPane.setStyleProperty('backgroundImage','url('+this.getPath()+'img/window/mid-mid-active.gif)');if(Acm.Browser.isIe){this.setWidth(this.getWidth()+1);this.setWidth(this.getWidth()-1);}
this.ieLayoutComponents();};_AcmWindow.setBlurStyle=function(e){if(Acm.Browser.isMac){this.addClassName('hide-scrollbars');}
this._titleBar._parts.upLeft.setSrc(this.getPath()+'img/window/up-left.png',17,23);this._titleBar._cTitle.setStyle('color: #909090; background-image: url('+this.getPath()+'img/window/up-mid.gif)');this._titleBar._parts.upMid2.setSrc(this.getPath()+'img/window/up-mid2.gif');this._contentPane.setStyleProperty('backgroundImage','url('+this.getPath()+'img/window/mid-mid.gif)');this._titleBar._cTitle.setClassName('acmLabel acmWindowTitleBarTitle acmWindowTitleBarTitleBlur');};_AcmWindow._onTitleBarDragStart=function(e){this._offsetX=e.getOffsetX()+18;this._offsetY=e.getOffsetY();this._hideContent();};_AcmWindow._onTitleBarDrag=function(e){if(this._movable){this.setLeft(e.getClientX()-this._offsetX);this.setTop(e.getClientY()-this._offsetY);}};_AcmWindow._onTitleBarDragEnd=function(e){if(!this._movable){return;}
this._showContent();this.setLeft(e.getClientX()-this._offsetX);this.setTop(e.getClientY()-this._offsetY);};_AcmWindow._onBorderLeftMouseDown=function(e){this._startRight=this.getPageX()+parseInt(this._element.style.width.replace('px',''),10);};_AcmWindow._onBorderLeftDrag=function(e){this._hideContent();var w=this._startRight-e.getClientX();this.setLeft(e.getClientX());this.setWidth(w);this.ieLayoutComponents();};_AcmWindow._onBorderLeftDragEnd=function(e){this._showContent();};_AcmWindow._onBorderRightDrag=function(e){this._hideContent();var w=(e.getClientX()-this.getPageX());this.setWidth(w);this.ieLayoutComponents();};_AcmWindow._onBorderRightDragEnd=function(e){this._showContent();};_AcmWindow._onBorderBottomDrag=function(e){this._hideContent();var h=e.getClientY()-this.getPageY();this.setHeight(h);this.ieLayoutComponents();};_AcmWindow._onBorderBottomDragEnd=function(e){this._showContent();};_AcmWindow.setMovable=function(b){this._movable=b;};_AcmWindow._onResizeDragStart=function(e){this._hideContent();this._offsetX=e.getOffsetX();this._offsetY=e.getOffsetY();};_AcmWindow._onResizeDrag=function(e){this.setWidth(e.getClientX()-(this.getPageX()-this._offsetX));this.setHeight(e.getClientY()-(this.getPageY()-this._offsetY));this.ieLayoutComponents();};_AcmWindow._onResizeDragEnd=function(e){this._showContent();this.ieLayoutComponents();this.dispatchEvent(new Acm.Event('resizeEnd'));};_AcmWindow._onKeyPress=function(e){var hop=40;var c;if(e.getAltKey()&&e.getCtrlKey()){if(e.getShiftKey()){if(!this._resizable){return;}
switch(e.getKeyCode()){case Acm.KeyboardEvent.LEFT:this.setWidth(this.getWidth()-hop);break;case Acm.KeyboardEvent.RIGHT:this.setWidth(this.getWidth()+hop);break;case Acm.KeyboardEvent.UP:this.setHeight(this.getHeight()-hop);break;case Acm.KeyboardEvent.DOWN:this.setHeight(this.getHeight()+hop);break;}
this.ieLayoutComponents();}else{c=e.getKeyCode();if(this._resizable){switch(c){case Acm.KeyboardEvent.LEFT:this.setLeft(this.getLeft()-hop);break;case Acm.KeyboardEvent.RIGHT:this.setLeft(this.getLeft()+hop);break;case Acm.KeyboardEvent.UP:this.setTop(this.getTop()-hop);break;case Acm.KeyboardEvent.DOWN:this.setTop(this.getTop()+hop);break;}}
if(c==77||c==109){this.toggleMaximize();}else if(c==78||c==110){this.setState('minimized');}}}};_AcmWindow._onContextMenu=function(e){e.stopPropagation();};Acm.WindowTitleBar=function(oWindow){Acm.Component.call(this);this._window=oWindow;this._parts={};};var _AcmWindowTitleBar=Acm.extend('WindowTitleBar','Component');_AcmWindowTitleBar._window=null;_AcmWindowTitleBar._cTitle=null;_AcmWindowTitleBar._cButtonArea=null;_AcmWindowTitleBar._cMinimize=null;_AcmWindowTitleBar._cMaximize=null;_AcmWindowTitleBar._cClose=null;_AcmWindowTitleBar._parts=null;_AcmWindowTitleBar.dispose=function(){if(this._disposed){return;}
Acm.WindowTitleBar.parent.dispose.call(this);this._window=null;this._cTitle=null;this._cButtonArea=null;this._cMinimize=null;this._cMaximize=null;this._cClose=null;this._parts=null;};_AcmWindowTitleBar.createPrototype=function(){var o=Acm.WindowTitleBar.parent.createPrototype.call(this);o.setStyle('overflow: hidden;');o.setPosition(0,0,0);o.setHeight(23);var upLeft=o.addComponent(new Acm.Image(this.getPath()+'img/window/up-left.png',17,23));upLeft.setLeft(0);upLeft.setTop(0);o._cTitle=o.addComponent(new Acm.Label(' '));o._cTitle.setClassName('acmLabel acmWindowTitleBarTitle');o._cButtonArea=o.addComponent(new Acm.Component());var buttonArea=o._cButtonArea;buttonArea.setClassName('acmWindowButtonArea');o._parts.upMid2=buttonArea.addComponent(new Acm.Image(this.getPath()+'img/window/up-mid2.gif',13,22));o._parts.minimize=buttonArea.addComponent(new Acm.WindowButton('minimize'));o._parts.maximize=buttonArea.addComponent(new Acm.WindowButton('maximize'));o._parts.close=buttonArea.addComponent(new Acm.WindowButton('close'));o._parts.upRight=buttonArea.addComponent(new Acm.Image(this.getPath()+'img/window/up-right.png',10,23));return o;};_AcmWindowTitleBar.create=function(){Acm.WindowTitleBar.parent.create.call(this);if(!this._element.childNodes[0]){return;}
var p=this._window;this.addEventListener('dblclick',p.toggleMaximize,p);this._parts.upLeft=this.addComponent(new Acm.Image().setElement(this._element.childNodes[0]));this._cTitle=this.addComponent(new Acm.Label().setElement(this._element.childNodes[1]));this._cTitle.addEventListener('dragStart',p._onTitleBarDragStart,p);this._cTitle.addEventListener('dragEnd',p._onTitleBarDragEnd,p);this._cTitle.addEventListener('drag',p._onTitleBarDrag,p);if(Acm.Browser.isIe&&1==2){this._cTitle.setStyleProperty('right','97px');}
this._cButtonArea=this.addComponent(new Acm.Component().setElement(this._element.childNodes[2]));var buttonArea=this._cButtonArea;this._parts.upMid2=buttonArea.addComponent(new Acm.Image().setElement(buttonArea._element.childNodes[0]));this._parts.minimize=buttonArea.addComponent(new Acm.Image().setElement(buttonArea._element.childNodes[1]));this._parts.minimize.addEventListener('click',function(){this.setState('minimized');},p);this._parts.maximize=this.addComponent(new Acm.WindowButton('maximize').setElement(buttonArea._element.childNodes[2]));var maximize=this._parts.maximize;this._parts.maximize.addEventListener('click',p.toggleMaximize,p);this._parts.close=this.addComponent(new Acm.WindowButton('close').setElement(buttonArea._element.childNodes[3]));this._parts.close.addEventListener('click',p.close,p);this._parts.upRight=buttonArea.addComponent(new Acm.Image().setElement(buttonArea._element.childNodes[4]));p.addEventListener('maximize',function(){maximize.setSrc(this.getPath()+'img/window/up-mid-restore.gif');});p.addEventListener('restore',function(){maximize.setSrc(this.getPath()+'img/window/up-mid-maximize-enabled.gif');});this.show();this._cTitle.setId('myTitleBar');};_AcmWindowTitleBar.setShowButton=function(oButton,bShow){var src=oButton.getSrc();var i=src.lastIndexOf('-');src=src.substr(0,i+1)+(bShow?'enabled':'disabled')+'.gif';oButton.setEnabled(bShow);oButton.setSrc(src,19,22);};_AcmWindowTitleBar.setTitle=function(title){this._cTitle.setText(title);};_AcmWindowTitleBar.getTitle=function(){return this._cTitle.getText();};_AcmWindowTitleBar.setIcon=function(oImage){this._cTitle.setIcon(oImage);};_AcmWindowTitleBar.getIcon=function(){return this._cTitle.getIcon();};_AcmWindowTitleBar.show=function(){Acm.WindowTitleBar.parent.show.call(this);};_AcmWindowTitleBar.hide=function(){Acm.WindowTitleBar.parent.hide.call(this);};Acm.WindowButton=function(name){Acm.Button.call(this);this._name=name;};var _AcmWindowButton=Acm.extend('WindowButton','Image');_AcmWindowButton.create=function(){Acm.WindowButton.parent.create.call(this);this.setSrc(this.getPath()+'img/window/up-mid-'+this._name+'-enabled.gif',19,22);};_AcmWindowButton._makePressed=function(){this.setSrc(this.getPath()+'img/window/up-mid-'+this._name+'-mousedown.gif',19,22);};Acm.WindowStatusBar=function(oWindow){Acm.Component.call(this);this._window=oWindow;};var _AcmWindowStatusBar=Acm.extend('WindowStatusBar','Component');_AcmWindowStatusBar._text;_AcmWindowStatusBar.dispose=function(){if(this._disposed){return;}
Acm.WindowStatusBar.parent.dispose.call(this);this._text=null;this._window=null;};_AcmWindowStatusBar.create=function(){Acm.WindowStatusBar.parent.create.call(this);this.setClassName('acmWindowStatusBar');this.setHeight(16);this.setPosition(15,35,null,12);this._text=this.addComponent(new Acm.Component('span'));this._text.setClassName('acmWindowStatusBarText');var win=this._parentComponent;this._visible=false;this.show();};_AcmWindowStatusBar.show=function(){if(!this.isVisible()){Acm.WindowStatusBar.parent.show.call(this);}};_AcmWindowStatusBar.hide=function(){if(this.isVisible()){Acm.WindowStatusBar.parent.hide.call(this);}};_AcmWindowStatusBar.setText=function(text){this._text.setInnerHtml(text);};Acm.DialogWindow=function(){Acm.Window.call(this);this.addEventListener('complete',this._onComplete);};var _AcmDialogWindow=Acm.extend('DialogWindow','Window');_AcmDialogWindow._escClose=true;_AcmDialogWindow.create=function(){Acm.DialogWindow.parent.create.call(this);if(!this._element.childNodes[0]){return;}
this.setMinimizable(false);this.setMaximizable(false);};_AcmDialogWindow.setStyle=function(style){this._contentPane.setStyle(style);};_AcmDialogWindow.setEscClose=function(b){this._escClose=b;};_AcmDialogWindow.getEscClose=function(b){return this._escClose;};_AcmDialogWindow._onComplete=function(e){this.setLeft('40%');this.setTop('40%');};_AcmDialogWindow._onKeyPress=function(e){Acm.DialogWindow.parent._onKeyPress.call(this,e);if(e.getKeyCode()==Acm.KeyboardEvent.ESC&&this._escClose){this.close();}};Acm.InfoDialog=function(){Acm.DialogWindow.call(this);};var _AcmInfoDialog=Acm.extend('InfoDialog','DialogWindow');_AcmInfoDialog.createPrototype=function(){var p=Acm.InfoDialog.parent.createPrototype.call(this);p.addClassName('acmInfoDialog');var container=p.addComponent(new Acm.Component());container.setClassName('acmInfoDialogContainer');var icon=container.addComponent(new Acm.Image(this.getPath()+'img/icons/info-dialog-48.png',48,48));icon.setClassName('acmInfoDialogIcon');var text=container.addComponent(new Acm.Component());text.setClassName('acmInfoDialogText');var okButton=p.addComponent(new Acm.Button('OK'));okButton.addClassName('acmInfoDialogOkButton');return p;};_AcmInfoDialog.create=function(){Acm.InfoDialog.parent.create.call(this);if(!this._element.childNodes[0]){return;}
var cn=this._contentPane._element.childNodes;this._container2=this.addComponent(new Acm.Component().setElement(cn[0]));var cn2=this._container2._element.childNodes;this._container2.addComponent(new Acm.Image().setElement(cn2[0]));this._textContainer=this._container2.addComponent(new Acm.Component().setElement(cn2[1]));var okButton=this.addComponent(new Acm.Button().setElement(cn[1]));okButton.addEventListener('action',this._onOkButtonAction,this);okButton.addEventListener('keyup',this._onKeyUp,this);okButton.setFocus(true,true);this.setResizable(false);};_AcmInfoDialog.setMessage=function(text){this._textContainer.setInnerHtml(text);};_AcmInfoDialog.getMessage=function(){return this._textContainer.getInnerHtml();};_AcmInfoDialog._onOkButtonAction=function(){this.close();};_AcmInfoDialog._onKeyUp=function(e){if(e.getKeyCode()==Acm.KeyboardEvent.ESC){this.close();}};Acm.IframeWindow=function(){Acm.Window.call(this);};var _AcmIframeWindow=Acm.extend('IframeWindow','Window');_AcmIframeWindow._iframe=null;_AcmIframeWindow._blocker=null;Acm.IframeWindow._windows=[];_AcmIframeWindow.dispose=function(){if(this._disposed){return;}
Acm.IframeWindow.parent.dispose.call(this);this._iframe=null;this._blocker=null;};_AcmIframeWindow.create=function(){Acm.IframeWindow.parent.create.call(this);this._iframe=this.addComponent(new Acm.Component('iframe'));this._iframe._element.style.border='1px solid #000000';this._iframe._element.border=0;this._iframe._element.frameBorder=0;this._iframe.addEventListener('drop',this.dropOnIframe,this);this._iframe._element.src='blank.html';this._blocker=new Acm.Component('span');this._blocker.create();this._blocker._element.style.display='none';this._blocker.setZIndex(2);this.addEventListener('close',this.closed,this);var iframe=this._iframe;iframe._element.id='jopp';var self=this;if(Acm.Browser.isMoz){this._iframe._element.addEventListener('load',function(e){iframe._element.contentDocument.addEventListener('mousedown',function(e){},false);},false);}else{this._iframe._element.attachEvent('onload',function(e){document.frames.jopp.document.attachEvent('onmousedown',function(e){});});}
Acm.IframeWindow._windows.push(this);};_AcmIframeWindow.dropOnIframe=function(e){alert('Hello! You just dropped "'+e.getNode().getNodeName()+'" on this iframe.');};_AcmIframeWindow.closed=function(){Acm.Array.remove(Acm.IframeWindow._windows,this);};_AcmIframeWindow.disableAllBlockers=function(){var i=0,wins=Acm.IframeWindow._windows,l=wins.length;for(i=0;i<l;i++){if(wins[i].getState()!='minimized'){wins[i].disableBlocker();}}};_AcmIframeWindow.enableAllBlockers=function(){var i=0,wins=Acm.IframeWindow._windows,l=wins.length;for(i=0;i<l;i++){if(wins[i].getState()!='minimized'){wins[i].enableBlocker();}}};_AcmIframeWindow.enableBlocker=function(){this._blocker._element.style.display='block';this._blocker.setEnabled(true);this.addComponent(this._blocker);};_AcmIframeWindow.disableBlocker=function(){this._blocker._element.style.display='none';this._blocker.setEnabled(false);this.removeComponent(this._blocker);};_AcmIframeWindow.setSrc=function(url){this._iframe._element.src=url;};Acm.Menu=function(){Acm.FloatComponent.call(this);this._items=[];this.setShowFocus(false);this.addEventListener('mouseover',this._onMouseOver,this);this.addEventListener('mousedown',this._onMouseDown,this);this.addEventListener('mouseup',this._onMouseUp,this);this.addEventListener('mouseout',this._onMouseOut,this);this.addEventListener('keypress',this._onKeyPress,this);};var _AcmMenu=Acm.extend('Menu','FloatComponent');_AcmMenu._parentMenu=null;_AcmMenu._parentMenuItem=null;_AcmMenu._activeChildMenu=null;_AcmMenu._activeItem=null;_AcmMenu._items=null;_AcmMenu._owner=null;_AcmMenu._currDir='right';_AcmMenu._reachedBottom=false;_AcmMenu._showing=null;_AcmMenu.dispose=function(){if(this._disposed){return;}
Acm.Menu.parent.dispose.call(this);this._parentMenu=null;this._parentMenuItem=null;this._activeChildMenu=null;this._activeItem=null;this._items=null;this._owner=null;};_AcmMenu.createPrototype=function(){var prot=Acm.Menu.parent.createPrototype.call(this);prot.setClassName('acmMenu');return prot;};_AcmMenu.create=function(){Acm.Menu.parent.create.call(this);this.setCanHaveFocus(true);};_AcmMenu.setDirection=function(direction){this._direction=this._verticalDirection=direction;};_AcmMenu.getDirection=function(){return this._direction;};_AcmMenu.getParentMenuItem=function(){return this._parentMenuItem;};_AcmMenu.getOwner=function(){return this._owner;};_AcmMenu.setOwner=function(comp){this._owner=comp;};_AcmMenu.getItems=function(){return this._items;};_AcmMenu.show=function(left,top){this._show(left,top,1,1,'right');};_AcmMenu.setHeight=function(h){Acm.Menu.parent.setHeight.call(this,h);this.setStyleProperty(Acm.Browser.isIe?'overflowY':'overflow',h===null?'':'auto');};_AcmMenu._show=function(left,top,width,height,position){var container=this.getContainer();var c=container;var activeMenu=container.getActiveMenu();var root=this.getRootMenu();var isRoot=root==this;var unfold=false;var cWidth=container.getWidth();var cHeight=container.getHeight();var spaceLeft=left;var spaceRight=cWidth-(left+width);var spaceAbove=top;var spaceBelow=cHeight-(top+height);var spaceHorizontal=cHeight;if(isRoot&&activeMenu){activeMenu.hide();}
this._add();var menuWidth=this.getWidth();var menuHeight=this.getPixelHeight();switch(position){case'above':top-=(menuHeight+height);break;case'below':top+=height;break;case'left':left-=menuWidth;break;case'right':left+=width;break;}
if((position=='left'||position=='right')&&!isRoot){if(menuHeight>spaceHorizontal){this.setHeight(spaceHorizontal);menuHeight=spaceHorizontal;}}
if((position=='below'||isRoot)&&spaceBelow<menuHeight){if(spaceAbove>menuHeight){top-=menuHeight+height;}else{unfold=true;}}else if(position=='above'&&menuHeight>spaceAbove){if(menuHeight<spaceBelow){top-=menuHeight+height;}else{unfold=true;}}
if(unfold){top=spaceAbove>spaceBelow?0:top;menuHeight=spaceAbove>spaceBelow?spaceAbove:spaceBelow;this.setHeight(menuHeight);}
if(left<0){if(position=='left'){left+=menuWidth+width;root._currDir='right';}else{left=0;}}
if(left+menuWidth>cWidth){if(position=='right'){left-=(menuWidth+width);root._currDir='left';}else{left=cWidth-menuWidth;}}
if(top+menuHeight>cHeight){top-=((top+menuHeight)-cHeight);}
if(top<0){top=0;}
this.moveTo(left,top);this.setStyleProperty('visibility','visible');this.setFocus(true);this._showing=true;if(isRoot){container.setActiveMenu(this);}
this.dispatchEvent(new Acm.Event('show'));};_AcmMenu.showFor=function(comp,position){var left=comp.getPageX();var top=comp.getPageY();var width=comp.getPixelWidth();var height=comp.getPixelHeight();this._show(left,top,width,height,position);};_AcmMenu._add=function(){var p=this._element.parentNode;if(p&&p.nodeType!=11){return;}
if(!this._element){this.create();}
this._element.style.visibility='hidden';this.getContainer().addComponent(this);};_AcmMenu.hide=function(){if(this._activeChildMenu){this._activeChildMenu.hide();}
if(!this._items){return;}
var i=0,items=this._items,l=items.length;for(i;i<l;i++){items[i].setHighlight(false);items[i]._active=false;}
var container=this.getContainer();if(this._parentMenu){this._parentMenu.setFocus(true);}else{}
this._activeItem=null;this.dispatchEvent(new Acm.Event('hide'));container.removeComponent(this);this._showing=false;this._verticalDirection=this._direction;if(this.getRootMenu()==this){this._currDir='right';}
this.setHeight(null);};_AcmMenu.getRootMenu=function(){var m=this;while(m){if(!m._parentMenu){return m;}
m=m._parentMenu;}};_AcmMenu.addComponent=function(comp){Acm.Menu.parent.addComponent.call(this,comp);if(comp instanceof Acm.MenuItem){this._items.push(comp);comp._menu=this;}
return comp;};_AcmMenu.clearContents=function(oItem){this.deleteAllComponents();this._items=[];};_AcmMenu.isShowing=function(){return this._showing;};_AcmMenu.activateItem=function(oItem){if(this._activeItem){this._activeItem.setHighlight(false);}
this._activeItem=oItem;oItem.setHighlight(true);oItem.scrollIntoView();};_AcmMenu.activateFirstItem=function(){for(var i=0,a=this._items,l=a.length;i<l;i++){if(a[i].getEnabled()){this.activateItem(a[i]);return a[i];}}};_AcmMenu.activateNextItem=function(){var a=this._items,l=a.length,next;var i;if(l===0){return;}
var pos=Acm.Array.indexOf(a,this._activeItem);for(i=pos+1;i<l;i++){if(a[i].getEnabled()){next=a[i];break;}}
if(!next){for(i=0;i<pos;i++){if(a[i].getEnabled()){next=a[i];break;}}}
if(next){this.activateItem(next);}};_AcmMenu.activatePreviousItem=function(){var a=this._items,l=a.length,prev;if(l===0){return;}
var pos=Acm.Array.indexOf(a,this._activeItem);var i;for(i=pos-1;i>=0;i--){if(a[i].getEnabled()){prev=a[i];break;}}
if(!prev){for(i=l-1;i>pos;i--){if(a[i].getEnabled()){prev=a[i];break;}}}
if(prev){this.activateItem(prev);}};_AcmMenu._onKeyPress=function(e){if(!this._activeItem){this.activateFirstItem();return;}
var keyCode=e.getKeyCode();var i;var sm;if(keyCode==Acm.KeyboardEvent.DOWN||keyCode==Acm.KeyboardEvent.UP){i=Acm.Array.indexOf(this._items,this._activeItem);if(keyCode==Acm.KeyboardEvent.DOWN){this.activateNextItem();}else if(keyCode==Acm.KeyboardEvent.UP){this.activatePreviousItem();}}else if(keyCode==Acm.KeyboardEvent.RIGHT){sm=this._activeItem.getSubMenu();if(sm){this._activeItem.showSubMenu();sm.activateItem(sm._items[0]);}}else if(keyCode==Acm.KeyboardEvent.LEFT){if(this._parentMenu){this.hide();}}else if(keyCode==Acm.KeyboardEvent.ENTER||keyCode==Acm.KeyboardEvent.SPACE){this._activeItem.dispatchEvent(new Acm.ComponentEvent('action',this._activeItem));this.getRootMenu().dispatchEvent(new Acm.ComponentEvent('action',this._activeItem));this.hide();}
e.preventDefault();};_AcmMenu._onMouseDown=function(e){e.fromMenu=true;};_AcmMenu._onMouseUp=function(e){e.fromMenu=true;var ev;var dispatcher=e.getDispatcher();if(!(dispatcher instanceof Acm.MenuItem)){return;}
if(this._activeItem){if(!dispatcher._subMenu){ev=new Acm.ComponentEvent('action',this._activeItem);ev.setBubbles(false);dispatcher.dispatchEvent(ev);this.getRootMenu().dispatchEvent(ev);}}};_AcmMenu._onMouseOver=function(e){var menuItem=e.getDispatcher();if(!(menuItem instanceof Acm.MenuItem)){return;}
var ai=this._activeItem;if(ai!=menuItem&&ai){if(ai._subMenu){ai.hideSubMenu();}
ai.setHighlight(false);}
if(menuItem._subMenu){menuItem.showSubMenu();}
this.activateItem(menuItem);};_AcmMenu._onMouseOut=function(e){var item=this._activeItem;if(item){if(item._subMenu&&item._subMenu.isShowing()){return false;}
item.setHighlight(false);}};Acm.MenuSpacer=function(){Acm.Component.call(this);};var _AcmMenuSpacer=Acm.extend('MenuSpacer','Component');_AcmMenuSpacer.create=function(text,icon,subMenu){Acm.MenuSpacer.parent.create.call(this);this.setClassName('acmMenuSpacer');if(Acm.Browser.isIe){this.setInnerHtml('<span style="font-size: 7px">&nbsp;</span>');}else{this.setHeight(9);}};Acm.MenuItem=function(text,icon){Acm.Label.call(this,text,icon);};var _AcmMenuItem=Acm.extend('MenuItem','Label');_AcmMenuItem._tagName='DIV';_AcmMenuItem._menu=null;_AcmMenuItem._subMenu=null;_AcmMenuItem._highlight=null;_AcmMenuItem.dispose=function(){if(this._disposed){return;}
Acm.MenuItem.parent.dispose.call(this);this._menu=null;if(this._subMenu){this._subMenu.dispose();}
this._subMenu=null;};_AcmMenuItem.createPrototype=function(){var o=Acm.MenuItem.parent.createPrototype.call(this);o.addClassName('acmMenuItem');return o;};_AcmMenuItem.create=function(){Acm.MenuItem.parent.create.call(this);};_AcmMenuItem.getIcon=function(){if(Acm.Browser.isIe){if(this._icon&&this._icon.getSrc()&&this._icon.getSrc().indexOf('blank.gif')){return false;}}
return Acm.MenuItem.parent.getIcon.call(this);};_AcmMenuItem.setIcon=function(icon){if(icon===null){Acm.MenuItem.parent.setIcon.call(this,null);this.removeClassName('acmIconMenuItem');}else{if(!this._icon){this.addClassName('acmIconMenuItem');}
Acm.MenuItem.parent.setIcon.call(this,icon);this.setTextSpacing(5);}};_AcmMenuItem.setHighlight=function(b){if(this._highlight===b){return;}
if(b){this.addClassName('acmMenuItemHighlight');if(this._subMenu){this.addClassName('acmMenuItemArrowHighlight');}}else{this.removeClassName('acmMenuItemHighlight');if(this._subMenu){this.removeClassName('acmMenuItemArrowHighlight');}}
this._highlight=b;};_AcmMenuItem.getHighlight=function(){return this._highlight;};_AcmMenuItem.addComponentFromXml=function(comp,c,backReferenceObject,noAppend){if(comp instanceof Acm.Component){comp._noAppend=true;this.addComponent(comp);comp._noAppend=null;}else{comp._parentComponent=this;}
backReferenceObject._xmlParser.processChildNodes(comp,c,backReferenceObject);if(comp instanceof Acm.Component&&!noAppend&&!(comp instanceof Acm.Menu)){comp._parentComponent.appendComponent(comp);}};_AcmMenuItem.addComponent=function(oComp){var parentMenu;var subMenu;if(oComp instanceof Acm.MenuItem||oComp instanceof Acm.MenuSpacer){if(!this._subMenu){parentMenu=this._parentComponent;this._subMenu=new Acm.Menu();subMenu=this._subMenu;subMenu.setContainer(parentMenu.getContainer());subMenu.create();subMenu._parentMenu=this._parentComponent instanceof Acm.MenuItem?this._parentComponent._parentComponent:this._parentComponent;subMenu._parentMenuItem=this;this.addClassName('acmMenuItemArrow');}
return this._subMenu.addComponent(oComp);}else if(oComp instanceof Acm.Menu){parentMenu=this._parentComponent;this._subMenu=oComp;subMenu=this._subMenu;oComp._parentComponent=parentMenu.getContainer();subMenu.setContainer(parentMenu.getContainer());subMenu._parentMenu=this._parentComponent instanceof Acm.MenuItem?this._parentComponent._parentComponent:this._parentComponent;subMenu._parentMenuItem=this;this.addClassName('acmMenuItemArrow');return oComp;}else{}};_AcmMenuItem.getOwner=function(){return this._menu.getRootMenu().getOwner();};_AcmMenuItem.getMenu=function(){return this._menu;};_AcmMenuItem.getRootMenu=function(){return this._menu.getRootMenu();};_AcmMenuItem.getSubMenu=function(){return this._subMenu;};_AcmMenuItem.showSubMenu=function(){var subMenu=this._subMenu;if(!subMenu){return;}
this._menu._activeChildMenu=subMenu;var root=this.getRootMenu();subMenu.showFor(this,root._currDir);};_AcmMenuItem.hideSubMenu=function(){if(this._subMenu&&this._subMenu.isShowing()){this._subMenu.hide();}};Acm.Option=function(text,icon){Acm.MenuItem.call(this,text,icon);};var _AcmOption=Acm.extend('Option','MenuItem');_AcmOption._selected=null;_AcmOption._addTextNodesFromXML=true;_AcmOption.setSelected=function(bSelected){this._selected=bSelected;};_AcmOption.getSelected=function(){return this._selected;};Acm.MenuToggleItem=function(text){Acm.MenuItem.call(this,text);};var _AcmMenuToggleItem=Acm.extend('MenuToggleItem','MenuItem');_AcmMenuToggleItem._checked=false;_AcmMenuToggleItem.dispose=function(){if(this._disposed){return;}
Acm.MenuToggleItem.parent.dispose.call(this);this._checked=null;};_AcmMenuToggleItem.create=function(text){Acm.MenuToggleItem.parent.create.call(this,text);this.addEventListener('action',this._onAction,this);};_AcmMenuToggleItem.setChecked=function(bChecked){if(bChecked===this._checked){return;}
if(!this.dispatchEvent(new Acm.Event('beforeChange'))){return;}
if(bChecked){this.setIcon(this._getIcon());}else{this.setIcon(null);}
this._checked=bChecked;this.dispatchEvent(new Acm.Event('change'));};_AcmMenuToggleItem.getChecked=function(){return this._checked;};_AcmMenuToggleItem._onAction=function(){};_AcmMenuToggleItem._getIcon=function(){};Acm.MenuRadioItem=function(text){Acm.MenuToggleItem.call(this,text);};var _AcmMenuRadioItem=Acm.extend('MenuRadioItem','MenuToggleItem');_AcmMenuRadioItem._getIcon=function(){return new Acm.Image(application.getPath()+'img/menu/radio-16.gif',16,16);};_AcmMenuRadioItem._onAction=function(){if(this._checked){return;}
this.setChecked(true);};_AcmMenuRadioItem.setHighlight=function(b)
{Acm.MenuRadioItem.parent.setHighlight.call(this,b);if(this._icon){this._icon.setSrc(application.getPath()+'img/menu/radio'+(b?'-white':'')+'-16.gif',16,16);}
this._highlight=b;};Acm.MenuCheckItem=function(text){Acm.MenuToggleItem.call(this,text);};var _AcmMenuCheckItem=Acm.extend('MenuCheckItem','MenuToggleItem');_AcmMenuCheckItem._getIcon=function(){return new Acm.Image(application.getPath()+'img/menu/check-16.gif',16,16);};_AcmMenuCheckItem._onAction=function(){this.setChecked(!this.getChecked());};_AcmMenuCheckItem.setHighlight=function(b){Acm.MenuCheckItem.parent.setHighlight.call(this,b);if(this._icon){this._icon.setSrc(application.getPath()+'img/menu/check'+(b?'-white':'')+'-16.gif',16,16);}
this._highlight=b;};Acm.CopyToMenu=function(oNode,oFileContainer){Acm.Menu.call(this);this._node=oNode;this._fileContainer=oFileContainer;};var _AcmCopyToMenu=Acm.extend('CopyToMenu','Menu');_AcmCopyToMenu._node=null;_AcmCopyToMenu.dispose=function(){if(this._disposed){return;}
Acm.CopyToMenu.parent.dispose.call(this);this._node=null;};_AcmCopyToMenu.create=function(){Acm.CopyToMenu.parent.create.call(this);var self=this;var move=this.addItem(new Acm.MenuItem(t_("Move here")));var copy=this.addItem(new Acm.MenuItem(t_("Copy here")));var shortcut=this.addItem(new Acm.MenuItem(t_("Create shortcut here")));move.addEventListener('action',function(){alert(sprintf(t_("Move %s to %s"),self._node.getNodeName(),self._fileContainer._className));});copy.addEventListener('action',function(){alert(sprintf(t_("Copy %s to %s"),self._node.getNodeName(),self._fileContainer._className));});shortcut.addEventListener('action',function(){alert(sprintf(t_("Create shortcut to %s in %s"),self._node.getNodeName(),self._fileContainer._className));});this.addItem(new Acm.MenuSpacer());this.addItem(new Acm.MenuItem(t_("Cancel")));this.addEventListener('hide',this.deleteCloneWrapper,this);};_AcmCopyToMenu.deleteCloneWrapper=function(){this._node.deleteClone();};Acm.ToolTipManager=function(){this._timer=new Acm.Timer();var timer=this._timer;timer.setInterval(700);timer.addEventListener('timeout',this._onTimeout,this);};var _AcmToolTipManager=Acm.extend('ToolTipManager','EventTarget');_AcmToolTipManager._toolTip=null;_AcmToolTipManager._toolTipComponent=null;_AcmToolTipManager._toolTipEvent=null;Acm.ToolTipManager.instance=function(){if(!Acm.ToolTipManager._instance){Acm.ToolTipManager._instance=new Acm.ToolTipManager();}
return Acm.ToolTipManager._instance;};_AcmToolTipManager.dispose=function(){this._timer.stop();Acm.ToolTipManager.parent.dispose.call(this);this._toolTip=null;this._toolTipEvent=null;this._toolTipComponent=null;};_AcmToolTipManager.getToolTip=function(){return this._toolTip;};_AcmToolTipManager.toolTipIsShowing=function(){return this._toolTipIsShowing;};_AcmToolTipManager.showToolTip=function(toolTip){var container=toolTip.getContainer();if(!container){throw new Acm.Exception('Cannot show toolTip because container has not been set.');}
if(this._toolTip){container.removeComponent(this._toolTip);}
var eg=container.getEventGateway();container.addComponent(toolTip);toolTip.moveTo(eg._cursorClientX,eg._cursorClientY+17);toolTip.setStyleProperty('display','block');this._toolTip=toolTip;this._timer.stop();};_AcmToolTipManager.hideToolTip=function(){var t=this._toolTip;if(t&&t.getContainer()){t.getContainer().removeComponent(t);}
this._toolTipIsShowing=false;this._toolTip=null;this._timer.stop();};_AcmToolTipManager.startTimer=function(toolTipComponent,toolTipEvent){this._timer.stop();this._toolTipComponent=toolTipComponent;this._toolTipEvent=toolTipEvent;this._timer.start();};_AcmToolTipManager.stopTimer=function(){this._timer.stop();if(this._toolTip){this.hideToolTip();}};_AcmToolTipManager.resetTimer=function(){if(this._timer.isRunning()){this._timer.stop();this._timer.start();}};_AcmToolTipManager._onTimeout=function(e){this._timer.stop();var comp=this._toolTipComponent;if(comp.getContainer()&&comp.getContainer().getEventGateway().getDragFlag()){return;}
var toolTip=comp.getToolTip();if(toolTip){this.showToolTip(toolTip);}
this._toolTipIsShowing=true;comp.dispatchEvent(new Acm.ComponentEvent('showToolTip',this._toolTipEvent.getDispatcher()));};Acm.ToolTip=function(html){Acm.Component.call(this);this._html=html;};var _AcmToolTip=Acm.extend('ToolTip','FloatComponent');_AcmToolTip.create=function(){Acm.ToolTip.parent.create.call(this);this.setClassName('acmToolTip');if(this._html){this.setInnerHtml(this._html);}};_AcmToolTip.show=function(e){Acm.ToolTipManager.instance().showToolTip(this);};_AcmToolTip.hide=function(){Acm.ToolTipManager.instance().hideToolTip();};_AcmToolTip.dispose=function(){if(this._disposed){return;}
Acm.ToolTip.parent.dispose.call(this);Acm.ToolTipManager.instance().stopTimer();};Acm.FormGrid=function(){Acm.Component.call(this);this.addEventListener('mousedown',this._tmp);};var _AcmFormGrid=Acm.extend('FormGrid','Component');_AcmFormGrid._table=null;_AcmFormGrid._thead=null;_AcmFormGrid._tbody=null;_AcmFormGrid.dispose=function(){if(this._disposed){return;}
Acm.FormGrid.parent.dispose.call(this);this._thead=null;this._tbody=null;this._table=null;};_AcmFormGrid.createPrototype=function(){var o=Acm.FormGrid.parent.createPrototype.call(this);o.setClassName('acmFormGrid');o._table=Acm.FormGrid.parent.addComponent.call(o,new Acm.Table());o._table.setClassName('acmFormGrid');o._tbody=o._table.addComponent(new Acm.TBody());return o;};_AcmFormGrid.create=function(){Acm.FormGrid.parent.create.call(this);this._table=Acm.FormGrid.parent.addComponent.call(this,(new Acm.Table()).setElement(this._element.firstChild));this._tbody=this._table.addComponent((new Acm.TBody()).setElement(this._table._element.firstChild));};_AcmFormGrid.addComponent=function(oComp){if(oComp instanceof Acm.FormGridRow){this._tbody.addComponent(oComp);}else if(oComp instanceof Acm.FormGridHeader){if(!this._thead){this._thead=this._table.addComponentFirst(new Acm.THead());this._thead.setClassName('acmFormGridHead');}
this._thead.addComponent(oComp);}
return oComp;};_AcmFormGrid.setCellPadding=function(padding){this._table._element.cellPadding=padding;};_AcmFormGrid.getCellPadding=function(){return this._table._element.cellPadding;};Acm.FormGridHeader=function(){Acm.Component.call(this);};var _AcmFormGridHeader=Acm.extend('FormGridHeader','Component');_AcmFormGridHeader._tagName='TR';_AcmFormGridHeader._td=null;_AcmFormGridHeader.dispose=function(){if(this._disposed){return;}
Acm.FormGridHeader.parent.dispose.call(this);this._td=null;};_AcmFormGridHeader.create=function(){Acm.FormGridHeader.parent.create.call(this);this._td=Acm.FormGridHeader.parent.addComponent.call(this,new Acm.TableCellLabel());this._td._element.colSpan=2;};_AcmFormGridHeader.addComponent=function(comp){return this._td.addComponent(comp);};_AcmFormGridHeader.setTextSelectable=function(b){this._td.setStyleProperty('cursor',b?'text':'default');if(Acm.Browser.isMoz){this._td.setStyleProperty('MozUserSelect',b?'all':'none');}
this._textSelectable=b;};_AcmFormGridHeader.setText=function(text){this._td.setText(text);};_AcmFormGridHeader.getText=function(){return this._td.getText();};_AcmFormGridHeader.setIcon=function(icon){var dicon=this._td.setIcon(icon);dicon.setStyle('vertical-align: -30%; margin-right: 4px');};_AcmFormGridHeader.getIcon=function(){return this._td.getIcon();};Acm.FormGridRow=function(){Acm.Component.call(this);};var _AcmFormGridRow=Acm.extend('FormGridRow','Component');_AcmFormGridRow._tagName='TR';_AcmFormGridRow._leftCell=null;_AcmFormGridRow._leftCellWidth=null;_AcmFormGridRow._rightCell=null;_AcmFormGridRow._colSpan=null;_AcmFormGridRow._hasError=false;_AcmFormGridRow.dispose=function(){if(this._disposed){return;}
Acm.FormGridRow.parent.dispose.call(this);this._leftCell=null;this._rightCell=null;this._colSpan=null;this._leftCellWidth=null;};_AcmFormGridRow.create=function(){Acm.FormGridRow.parent.create.call(this);};_AcmFormGridRow.setLeftCellWidth=function(w){this._leftCellWidth=w;if(this._leftCell){this._leftCell.setWidth(w);}};_AcmFormGridRow.getLeftCellWidth=function(){return this._leftCellWidth;};_AcmFormGridRow.setColSpan=function(colSpan){this._colSpan=colSpan;};_AcmFormGridRow.getColSpan=function(){return this._colSpan;};_AcmFormGridRow.addComponent=function(oComp){if(!this._children){this._leftCell=Acm.FormGridRow.parent.addComponent.call(this,new Acm.Td());this._leftCell.setClassName('acmFormGridCell acmFormGridLeftCell');if(this._colSpan){this._leftCell._element.colSpan=2;}
if(this._leftCellWidth){this._leftCell.setWidth(this._leftCellWidth);}
this._leftCell.addComponent(oComp);if(this._leftCellWidth){this._leftCell.setWidth(this._leftCellWidth);}}else if(this._children.length==1){this._rightCell=Acm.FormGridRow.parent.addComponent.call(this,new Acm.Td());this._rightCell.setClassName('acmFormGridCell acmFormGridRightCell');this._rightCell.addComponent(oComp);if(oComp instanceof Acm.TextBox||oComp instanceof Acm.TextArea){oComp.setStyleProperty('border','none');oComp.setWidth('100%');}else if(oComp instanceof Acm.SingleSelectBox){oComp.setStyleProperty('border','none');this._rightCell.setStyleProperty('padding','0px');}}
return oComp;};_AcmFormGridRow.toggleError=function(){if(this._hasError){this.delError();}else{this.addError();}};_AcmFormGridRow.addError=function(){if(!this._leftCell.getComponentById('errorDisplay')){var comp=this._leftCell.addComponent(new Acm.Component());comp.setStyle('display:inline;');comp.setId('errorDisplay');comp.setText(' *');this._hasError=true;}};_AcmFormGridRow.delError=function(){if(this._leftCell.getComponentById('errorDisplay')){var comp=this._leftCell.getComponentById('errorDisplay');this._leftCell.deleteComponent(comp);this._hasError=false;}};Acm.TaskBar=function(oWindowManager){Acm.Component.call(this);if(oWindowManager){this.setWindowManager(oWindowManager);}};var _AcmTaskBar=Acm.extend('TaskBar','Component');_AcmTaskBar._tasks=[];_AcmTaskBar._windowManager=null;_AcmTaskBar._activeTask=null;_AcmTaskBar.dispose=function(){if(this._disposed){return;}
Acm.TaskBar.parent.dispose.call(this);this._tasks=null;this._windowManager=null;this._activeTask=null;};_AcmTaskBar.create=function(){Acm.TaskBar.parent.create.call(this);this.setClassName('acmTaskBar');this.setLeft(0);this.setRight(0);this.setHeight(29);this.setBottom(0);var cont=this.getContainer();cont.addEventListener('keypress',this._onContainerKeyPress,this);};_AcmTaskBar.setWindowManager=function(oWindowManager){if(this._windowManager==oWindowManager||!(oWindowManager instanceof Acm.WindowManager)){return;}
var i=0,wins=oWindowManager.getWindows(),l=wins.length;for(i;i<l;i++){this.addTask(wins[i]);}
this._windowManager=oWindowManager;this._windowManager.addEventListener('windowAdd',this._onWindowAdd,this);this._windowManager.addEventListener('windowRemove',this._onWindowRemove,this);this._windowManager.addEventListener('windowFocus',this._onWindowFocus,this);oWindowManager.setTaskBar(this);};_AcmTaskBar.getWindowManager=function(){return this._windowManager;};_AcmTaskBar.addTask=function(win){if(!(win instanceof Acm.Window)||win.getModal()){return;}
if(this._activeTask){this._activeTask.setChecked(false);}
var oTask=new Acm.Task(win);this.addComponent(oTask);this._tasks.push(oTask);this._activeTask=oTask;oTask.setChecked(true);this.redrawTaskBar();};_AcmTaskBar.removeTask=function(win){var oTask=this.getTaskByWindow(win);if(this._activeTask==oTask){this._activeTask=null;}
if(oTask){this.deleteComponent(oTask);}
Acm.Array.remove(this._tasks,oTask);this.redrawTaskBar();};_AcmTaskBar.activateTask=function(win){if(this._activeTask){this._activeTask.setChecked(false);}
this._activeTask=this.getTaskByWindow(win);if(this._activeTask){this._activeTask.setChecked(true);}};_AcmTaskBar.getTaskByWindow=function(oWindow){for(var i=0;i<this._tasks.length;i++){if(this._tasks[i].getWindow()==oWindow){return this._tasks[i];}}
return false;};_AcmTaskBar.redrawTaskBar=function(){var t=this._tasks;for(var i=0;i<t.length;i++){t[i].moveTo((i*144)+112,2);}
this.ieLayoutComponents();};_AcmTaskBar._onContainerKeyPress=function(e){if(e.getAltKey()&&e.getKeyCode()==Acm.KeyboardEvent.UP){this.showStartMenu();}};_AcmTaskBar._onWindowAdd=function(e){this.addTask(e.getComponent());};_AcmTaskBar._onWindowRemove=function(e){this.removeTask(e.getComponent());};_AcmTaskBar._onWindowFocus=function(e){this.activateTask(e.getComponent());};Acm.TaskBar2=function(windowManager){Acm.Component.call(this);if(windowManager){this.setWindowManager(windowManager);}};var _AcmTaskBar2=Acm.extend('TaskBar2','Component');_AcmTaskBar2._taskToolBar=null;_AcmTaskBar2._windowManager=null;_AcmTaskBar2.dispose=function(){if(this._disposed){return;}
Acm.TaskBar2.parent.dispose.call(this);this._taskToolBar=null;this._windowManager=null;};_AcmTaskBar2.create=function(){Acm.TaskBar2.parent.create.call(this);this.setClassName('acmTaskBar');};Acm.Task=function(oWindow){Acm.ToggleButton.call(this);this._window=oWindow;};var _AcmTask=Acm.extend('Task','ToggleButton');_AcmTask._window=null;_AcmTask._cleft=null;_AcmTask._cmid=null;_AcmTask._cright=null;_AcmTask._cLabel=null;_AcmTask.dispose=function(){if(this._disposed){return;}
Acm.Task.parent.dispose.call(this);this._window=null;};_AcmTask.create=function(){Acm.Task.parent.create.call(this);this.addClassName('acmTask');this.setTop(0);this.setWidth(144);this.setHeight(24);this.setStyle('float: left');this.setHover(true);this.setText(this._window.getTitle());var oImage=this._window.getIcon();if(oImage){this.setIcon(new Acm.Image(oImage.getSrc(),16,16));}
var self=this;this.addEventListener('click',this.click,this);this._window.addEventListener('titleChanged',this._onTitleChanged,this);this._window.addEventListener('iconChanged',this._onIconChanged,this);self=this;var menu=this.setContextMenu(new Acm.Menu());var restore=menu.addComponent(new Acm.MenuItem(t_("Restore")));restore.setIcon(new Acm.Image(application.getPath()+'img/window/restore.gif',16,16));restore.addEventListener('action',function(){self._window.setState('restored');});var minimize=menu.addComponent(new Acm.MenuItem(t_("Minimize")));minimize.setIcon(new Acm.Image(application.getPath()+'img/window/minimize.gif',16,16));minimize.addEventListener('action',function(){self._window.setState('minimized');});this._maximize=menu.addComponent(new Acm.MenuItem(t_("Maximize")));var maximize=this._maximize;maximize.setIcon(new Acm.Image(application.getPath()+'img/window/maximize.gif',16,16));maximize.addEventListener('action',function(){self._window.toggleMaximize();});menu.addComponent(new Acm.MenuSpacer());var close=menu.addComponent(new Acm.MenuItem(t_("Close")));close.addEventListener('action',function(){self._window.close();});close.setIcon(new Acm.Image(application.getPath()+'img/window/close.gif',16,16));};_AcmTask._onTitleChanged=function(e){this.setText(this._window.getTitle());};_AcmTask._onIconChanged=function(e){var oImage=this._window.getIcon();if(oImage){this.setIcon(new Acm.Image(oImage.getSrc(),16,16));}};_AcmTask.click=function(e){var windowManager=this._window.getWindowManager();if(e.getButton()==Acm.MouseEvent.LEFT||this._window.getState()!='minimized'){if(this._window.getState()=='minimized'){this._window.setState('restored');}else if(windowManager.getFocusedWindow()==this._window&&e.getButton()==Acm.MouseEvent.LEFT){this._window.setState('minimized');}else{windowContainer.setFocusedWindow(this._window);}}};_AcmTask.getWindow=function(){return this._window;};Acm.Node=function(nodeName,iconSrc,iconSize){Acm.Label.call(this,nodeName);this._nodeName=nodeName;this._iconSrc=iconSrc;this._iconSize=iconSize||48;};var _AcmNode=Acm.extend('Node','Label');_AcmNode._dropOnPoint=true;_AcmNode._nodeName=null;_AcmNode._iconSize=null;_AcmNode._listMode='icons';_AcmNode._copyToMenu=null;_AcmNode._nodeContainer=null;_AcmNode._uri=null;_AcmNode._textColor=null;_AcmNode._targetContainer=null;_AcmNode.mouseDown=function(e){this._preDragFlag=true;this._preDragX=e.getClientX();this._preDragY=e.getClientY();this._preDragOffsetX=e.getOffsetX();this._preDragOffsetY=e.getOffsetY();};_AcmNode.dispose=function(){if(this._disposed){return;}
Acm.Node.parent.dispose.call(this);this._nodeName=null;this._iconSize=null;this._listMode=null;this._copyToMenu=null;this._nodeContainer=null;this._uri=null;this._textColor=null;this._targetContainer=null;};_AcmNode.createPrototype=function(){var p=Acm.Node.parent.createPrototype.call(this);p.addClassName('acmNode');return p;};_AcmNode.create=function(){Acm.Node.parent.create.call(this);if(this._iconSrc){this.setIcon(new Acm.Image(this._iconSrc,this._iconSize,this._iconSize));}
this.setCanHaveFocus(true);this.setShowFocus(true);};_AcmNode.setTextColor=function(sColor){if(this._label){this.setStyleProperty('color',sColor);}
this._textColor=sColor;};_AcmNode.getTextColor=function(){return this._textColor;};_AcmNode.getNodeName=function(){return this._nodeName;};_AcmNode.setNodeName=function(sName){this._nodeName=sName;this.setText(sName);};_AcmNode.getUri=function(){return this._uri;};_AcmNode.setUri=function(uri){this._uri=uri;};_AcmNode.setOpenInNewWindow=function(uri){this._openInNewWindow=uri;};_AcmNode.getOpenInNewWindow=function(){return this._openInNewWindow;};_AcmNode.setOpenInSameWindow=function(uri){this._openInNewWindow=uri;};_AcmNode.getOpenInSameWindow=function(){return this._openInNewWindow;};_AcmNode.setHighlight=function(b){if(b){this.addClassName('acmNodeHighlight');}else{this.removeClassName('acmNodeHighlight');}};_AcmNode.doMove=function(left,right,top){this.getNodeContainer().removeComponent(this);if(this._targetContainer){this._targetContainer.addComponent(this);this._nodeContainer=this._targetContainer;}
this._element.style.left=this._element.style.right='';this.setLeft(left);this.setRight(right);this.setTop(top);};_AcmNode.setListMode=function(mode){this._listMode=mode;if(mode=='list'||mode=='icons'){if(mode=='icons'){this.setIconSize(48);this.setIconPosition('top');this.removeClassName('acmNodeList');this.addClassName('acmNodeIcon');}else{this.setIconSize(16);this.setIconPosition('left');this.removeClassName('acmNodeIcon');this.addClassName('acmNodeList');}}else{alert('Acm.Node error: "'+mode+'" is an invalid listMode.');}};_AcmNode.getNodeContainer=function(){return this._nodeContainer;};Acm.SelectionManager=function(comp){if(comp){this._component=comp;this._items=comp._children;comp.addEventListener('componentDelete',this._onComponentDelete,this);}else{this._items=[];}
this._selectedItems=[];};var _AcmSelectionManager=Acm.extend('SelectionManager','EventTarget');_AcmSelectionManager._component=null;_AcmSelectionManager._items=null;_AcmSelectionManager._selectedItems=null;_AcmSelectionManager._multipleSelection=false;_AcmSelectionManager._radioSelection=false;_AcmSelectionManager._focusedItem=null;_AcmSelectionManager._sequenceStart=null;_AcmSelectionManager._sequentOffset=null;_AcmSelectionManager.dispose=function(){if(this._disposed){return;}
Acm.SelectionManager.parent.dispose.call(this);this._items=null;this._selectedItems=null;this._multipleSelection=null;this._radioSelection=null;this._focusedItem=null;this._component=null;};_AcmSelectionManager.setComponent=function(comp){if(this._component){this._component.removeEventListener('componentDelete',this._onComponentDelete,this);}
comp.addEventListener('componentDelete',this._onComponentDelete,this);this._selectedItems=[];this.setItems(comp._children);this._component=comp;};_AcmSelectionManager.getComponent=function(comp){return this._component;};_AcmSelectionManager.addItem=function(oComp){this._items.push(oComp);};_AcmSelectionManager.setItems=function(items){this._selectedItems=[];this._items=items;};_AcmSelectionManager.removeItem=function(oComp){this.deselect(oComp);Acm.Array.remove(this._items,oComp);};_AcmSelectionManager.setSequenceItem=function(item){this.setSequenceStart(item);this.setSequenceOffset(item);};_AcmSelectionManager.setSequenceStart=function(item){this._sequenceStart=Acm.Array.indexOf(this._items,item);};_AcmSelectionManager.getSequenceStart=function(){return this._items[this._sequenceStart];};_AcmSelectionManager.setSequenceOffset=function(item){this._sequenceOffset=Acm.Array.indexOf(this._items,item);};_AcmSelectionManager.getSequenceOffset=function(){return this._items[this._sequenceOffset];};_AcmSelectionManager.selectRange=function(from,to){if(!from){from=0;}
if(!to){to=this._items.length-1;}
for(var i=from,a=this._items;i<to;i++){this.select(a[i]);}};_AcmSelectionManager.selectSequence=function(fromItem,toItem){var from,to;if(fromItem){from=Acm.Array.indexOf(this._items,fromItem);}
if(toItem){to=Acm.Array.indexOf(this._items,toItem);}};_AcmSelectionManager.selectSequenceTo=function(item){if(!this._sequenceStart){return;}
var items=this._items;var newpos=Acm.Array.indexOf(items,item);var start=this._sequenceStart;var offset=this._sequenceOffset===null?this._sequentStart:this._sequenceOffset;var after=newpos>start?1:-1;var i;if(newpos<offset){if(offset>start){newpos++;}
for(i=offset;i>=newpos;i--){if(i>start){this.deselect(items[i]);}else{this.select(items[i]);}}}else if(newpos>offset){if(offset<start){newpos--;}
for(i=offset;i<=newpos;i++){if(i<start){this.deselect(items[i]);}else{this.select(items[i]);}}}
this.setSequenceOffset(item);};_AcmSelectionManager.isSelected=function(item){return(Acm.Array.indexOf(this._selectedItems,item)!=-1);};_AcmSelectionManager.select=function(item){if(this._multipleSelection===false&&this._selectedItems.length>0){return false;}
if(!this.isSelected(item)){this._selectedItems.push(item);if(item.setSelected){item.setSelected(true);}
this.dispatchEvent(new Acm.ComponentEvent('change',item));this._sequenceOffset=Acm.Array.indexOf(this._items,item);return true;}
return false;};_AcmSelectionManager.selectSingle=function(item){this.deselectAll();this.setSequenceStart(item);this.select(item);};_AcmSelectionManager.selectAll=function(){for(var i=0,a=this._items,l=a.length;i<l;i++){this.select(a[i]);}};_AcmSelectionManager.deselect=function(item){if(this.isSelected(item)){Acm.Array.remove(this._selectedItems,item);if(item.setSelected&&!item._disposed){item.setSelected(false);}
this.dispatchEvent(new Acm.ComponentEvent('change',item));}};_AcmSelectionManager.deselectAll=function(){var a=this._selectedItems;while(a.length>0){this.deselect(a[a.length-1]);}
this._sequenceStart=null;this._sequenceOffset=null;};_AcmSelectionManager.invert=function(item){if(this.isSelected(item)){this.deselect(item);}else{this.select(item);}};_AcmSelectionManager.invertAll=function(){};_AcmSelectionManager.getSelectedItems=function(){return this._selectedItems;};_AcmSelectionManager.getLastSelectedItem=function(){if(this._selectedItems.length>0){return this._selectedItems[this._selectedItems.length-1];}};_AcmSelectionManager.setMultipleSelection=function(b){if(b!=this._multipleSelection){if(b===false){this.unselectAllItems();}
this._multipleSelection=b;}};_AcmSelectionManager.getMultipleSelection=function(){return this._multipleSelection;};_AcmSelectionManager.setRadioSelection=function(b){this._radioSelection=b;};_AcmSelectionManager.getRadioSelection=function(){return this._radioSelection;};_AcmSelectionManager.reset=function(){this.deselectAll();this._items=[];this._selectedItems=[];};_AcmSelectionManager._onComponentDelete=function(e){Acm.Array.remove(this._selectedItems,e.getComponent());};Acm.ListBox=function(){Acm.Component.call(this);this._childRows=[];this._allRows=[];this._selectionManager=new Acm.SelectionManager();this._selectionManager.addEventListener('change',this._onSelectionManagerChange,this);this.addEventListener('mousedown',this._onMouseDown);this.addEventListener('mouseup',this._onMouseUp);this.addEventListener('keydown',this._onKeyDown);if(!Acm.Browser.isIe){this.addEventListener('scroll',this._onScroll);}
this.addEventListener('complete',this._onListBoxComplete);};var _AcmListBox=Acm.extend('ListBox','Component');Acm.ListBox._dragRows=null;Acm.ListBox._dragStarted=null;_AcmListBox._canHaveFocus=true;_AcmListBox._ieLayoutComponents=false;_AcmListBox._table=null;_AcmListBox._thead=null;_AcmListBox._selectionManager=null;_AcmListBox._selectionMode='row';_AcmListBox._childRows=null;_AcmListBox._allRows=null;_AcmListBox._rowGroup=null;_AcmListBox._showGridLines=null;_AcmListBox._fixedWidth=null;_AcmListBox._showHeader=true;_AcmListBox._colgroup=null;_AcmListBox._lineResize=Acm.Browser.isIe;_AcmListBox._appendMode=null;_AcmListBox._stripes=null;_AcmListBox._reorderable=null;_AcmListBox._divider=null;_AcmListBox._busy=null;_AcmListBox._lastHighlightedRow=null;_AcmListBox._listBoxHeaders=[];_AcmListBox.dispose=function(){if(this._disposed){return;}
Acm.ListBox.parent.dispose.call(this);this._table=null;this._thead=null;this._selectionManager.dispose();this._selectionManager=null;this._selectionMode=null;this._childRows=null;this._showGridLines=null;this._fixedWidth=null;this._colgroup=null;this._lineResize=null;this._appendMode=null;this._divider=null;this._lastHighlightedRow=null;};_AcmListBox.createPrototype=function(){var o=Acm.ListBox.parent.createPrototype.call(this);o.setClassName('acmListBox');o._table=o.addComponent(new Acm.Table());o._table._element.cellPadding=o._table._element.cellSpacing=0;o._table._element.border=0;o._table.setClassName('acmListBox');o._divider=o.addComponent(new Acm.Component());o._divider.setClassName('acmListBoxDivider');o._colgroup=o._table.addComponent(new Acm.ColGroup());o._thead=o._table.addComponent(new Acm.THead());return o;};_AcmListBox.create=function(sText){this._listBoxHeaders=[];Acm.ListBox.parent.create.call(this);var t=this._table=this.addComponent(new Acm.Table().setElement(this._element.childNodes[0]));this._divider=this.addComponent(new Acm.Component().setElement(this._element.childNodes[1]));this._divider.setEnabled(false);var cn=t._element.childNodes;this._colgroup=t.addComponent(new Acm.ColGroup().setElement(cn[0]));this._thead=t.addComponent(new Acm.THead().setElement(cn[1]));this._rowGroup=t.addComponent(new Acm.ListBoxRowGroup());this._rowGroup._listBox=this;this._selectionManager.setComponent(this._rowGroup);};_AcmListBox.addXmlElement=function(element,backReferenceObject){switch(element.tagName){case'objects':this.addObjects(eval(new Array('[',element.firstChild.nodeValue,']').join('')));var html=this._rowGroup.toHtml(new Array()).join('');this._rowGroup.setInnerHtml(html);return true;case'html':this._rowGroup.setInnerHtml(element.firstChild.nodeValue);return true;}
return Acm.ListBox.parent.addXmlElement.call(this,element,backReferenceObject);};_AcmListBox._onListBoxComplete=function(){for(var r,i=0,a=this._childRows,l=a.length;i<l;i++){r=a[i];if(!r._lazy&&r.getExpanded()){r._expand();}}
this._isComplete=true;this._updateStripes();};_AcmListBox.addComponent=function(comp){if(comp instanceof Acm.ListBoxRow){comp._listBox=this;this._childRows.push(comp);this._allRows.push(comp);this._rowGroup.addComponent(comp);comp.setDepth(0);if(comp._expanded){comp.addAllChildRows();}}else if(comp instanceof Acm.ListBoxColumn){this._colgroup.addComponent(comp);comp.setListBox(this);}else if(comp instanceof Acm.ListBoxHeader){this._thead.addComponent(comp);comp._listBox=this;comp.setStyleProperty('display',this._showHeader?(Acm.Browser.isIe?'block':'table-row'):'none');}else{Acm.ListBox.parent.addComponent.call(this,comp);}
return comp;};_AcmListBox.addComponentBefore=function(comp,existing){if(comp instanceof Acm.ListBoxRow){comp._parentRow=null;comp._listBox=this;this._rowGroup.addComponentBefore(comp,existing);Acm.Array.insertBefore(this._childRows,comp,existing);comp.setDepth(0);if(comp._expanded){comp.addAllChildRows();}}else{Acm.ListBox.parent.addComponentAfter.call(this,comp,existing);}
return comp;};_AcmListBox.addComponentAfter=function(comp,existing){if(comp instanceof Acm.ListBoxRow){comp._parentRow=null;comp._listBox=this;this._rowGroup.addComponentAfter(comp,existing);Acm.Array.insertAfter(this._childRows,comp,existing);comp.setDepth(0);if(comp._expanded){comp.addAllChildRows();}}else{Acm.ListBox.parent.addComponentAfter.call(this,comp,existing);}
return comp;};_AcmListBox.removeComponent=function(comp){if(comp instanceof Acm.ListBoxRow){comp.removeAllChildRows();var p=comp._parentRow||this._rowGroup;p.removeComponent(comp);Acm.Array.remove(this._childRows,comp);}else{Acm.ListBox.parent.removeComponent.call(this,comp);}};_AcmListBox.deleteComponent=function(comp){if(comp instanceof Acm.ListBoxRow){comp.deleteAllChildRows();var p=this._rowGroup;p.deleteComponent(comp);Acm.Array.remove(this._childRows,comp);}else{Acm.ListBox.parent.deleteComponent.call(this,comp);}
return comp;};_AcmListBox.getComponentsById=function(id){return this._rowGroup.getComponentsById(id);};_AcmListBox._updateStripes=function(offset){if(!this._stripes){return;}
for(var j=0,i=offset||0,a=this._rowGroup._children,l=a.length;i<l;i++){var r=a[i];if(r._element&&r._element.style.display=='none'){continue;}
r.removeClassName(j%2!=0?'acmListBoxRowEven':'acmListBoxRowOdd');r.addClassName(j%2==0?'acmListBoxRowEven':'acmListBoxRowOdd');j++;}};_AcmListBox.getListBox=function(){return this;};_AcmListBox.getRowGroup=function(){return this._rowGroup;};_AcmListBox.getAllRows=function(){return this._allRows;}
_AcmListBox.getHeaderText=function(index){return this._listBoxHeaders[index].getText();}
Acm.ListBox.getDragRows=function(){return this._dragRows;};_AcmListBox.setStripes=function(stripes){this._table.setClassName('acmListBox'+(stripes?' acmListBoxStripes':''));this._stripes=stripes;};_AcmListBox.getStripes=function(){return this._stripes;};_AcmListBox.setLineResize=function(lineResize){this._lineResize=lineResize;};_AcmListBox.getLineResize=function(){return this._lineResize;};_AcmListBox.deleteAllRows=function(){this._rowGroup.deleteAllComponents();this._childRows=[];};_AcmListBox.setCellPadding=function(padding){this._table._element.cellPadding=padding;};_AcmListBox.getCellPadding=function(padding){return this._table._element.cellPadding;};_AcmListBox.setShowGridLines=function(b){this.setClassName('acmListBox'+(b?' acmListBoxGridLines':''));this._showGridLines=b;};_AcmListBox.getShowGridLines=function(){return this._showGridLines;};_AcmListBox.setShowHeader=function(b){for(var i=1,a=this._thead._children,l=a.length;i<l;i++){a[i].setStyleProperty('display',b?(Acm.Browser.isIe?'block':'table-row'):'none');}
this._showHeader=b;};_AcmListBox.getShowHeader=function(){return this._showHeader;};_AcmListBox.setReorderable=function(b){if(this._reorderable==b){return false;}
if(b){this._rowGroup.addEventListener('drag',this._onReorderDrag,this);this._rowGroup.addEventListener('mousemove',this._onReorderMouseMove,this);this._rowGroup.addEventListener('mouseover',this._onReorderMouseOver,this);this._rowGroup.addEventListener('mouseout',this._onReorderMouseOut,this);this._rowGroup.addEventListener('drop',this._onReorderDrop,this);}else{this._rowGroup.removeEventListener('drag',this._onReorderDrag,this);this._rowGroup.removeEventListener('mousemove',this._onReorderMouseMove,this);this._rowGroup.removeEventListener('mouseover',this._onReorderMouseOver,this);this._rowGroup.removeEventListener('mouseout',this._onReorderMouseOut,this);this._rowGroup.removeEventListener('drop',this._onReorderDrop,this);}
this._reorderable=b;};_AcmListBox._onReorderMouseOver=function(e){if(Acm.ListBox._dragStarted){this._divider.setStyleProperty('display','block');}};_AcmListBox._onReorderMouseOut=function(e){if(Acm.ListBox._dragStarted){this._divider.setStyleProperty('display','none');var row=e.getDispatcher().getParentComponentByClass(Acm.ListBoxRow);if(row){row.setHighlight(false);}}};_AcmListBox._onReorderDrop=function(e){var dropTarget=e.getDispatcher().getParentComponentByClass(Acm.ListBoxRow);if(!dropTarget){dropTarget=this._rowGroup.getComponentFromPoint(e.getClientX()+2,e.getClientY());dropTarget=dropTarget.getParentComponentByClass(Acm.ListBoxRow);}
var draggedComponent=e.getComponent().getParentComponentByClass(Acm.ListBoxRow);if((!dropTarget||!draggedComponent)||dropTarget==draggedComponent){this.endDrag();return;}
var headerHeight=(this._thead?this._thead.getPixelHeight():0);var scrollTop=this._rowGroup._element.scrollTop;var offsetY=(e.getOffsetY()+headerHeight)-(dropTarget.getPixelTop()-scrollTop);if(offsetY<7){var evt=new Acm.MouseComponentEvent('dropRowBefore',e,draggedComponent);if(dropTarget.dispatchEvent(evt)!==false){var parent=draggedComponent.getParentRow()?draggedComponent.getParentRow():this;parent.removeComponent(draggedComponent);var parent=dropTarget.getParentRow()?dropTarget.getParentRow():this;parent.addComponentBefore(draggedComponent,dropTarget);}}else if(offsetY>15){var evt=new Acm.MouseComponentEvent('dropRowAfter',e,draggedComponent);if(dropTarget.dispatchEvent(evt)!==false){var parent=draggedComponent.getParentRow()?draggedComponent.getParentRow():this;parent.removeComponent(draggedComponent);if(dropTarget.hasChildRows()&&dropTarget.getExpanded()){var firstChildRow=dropTarget.getChildRows()[0];dropTarget.addComponentBefore(draggedComponent,firstChildRow);draggedComponent.setDepth(dropTarget.getDepth()+1);}else{var parent=dropTarget.getParentRow()?dropTarget.getParentRow():this;parent.addComponentAfter(draggedComponent,dropTarget);}}}else{dropTarget.setHighlight(false);var evt=new Acm.MouseComponentEvent('dropRow',e,draggedComponent);if(dropTarget.dispatchEvent(evt)!==false){var parent=draggedComponent.getParentRow()?draggedComponent.getParentRow():this;parent.removeComponent(draggedComponent);dropTarget.addComponent(draggedComponent);}}
this.endDrag();};_AcmListBox._onReorderMouseMove=function(e){if(Acm.ListBox._dragStarted){var row=e.getDispatcher().getParentComponentByClass(Acm.ListBoxRow);if(!row){return;}
this._divider.setStyleProperty('zIndex','-100');var scrollTop=this._rowGroup._element.scrollTop;var offsetY=e.getClientY()-row.getPageY();if(this._lastHighlightedRow){this._lastHighlightedRow.setHighlight(false);}
if(offsetY<7){this._divider.setTop(row.getPixelTop()-scrollTop);this._divider.setStyleProperty('display','block');row.setHighlight(false);}else if(offsetY>15){this._divider.setTop((row.getPixelTop()+row.getPixelHeight())-scrollTop);this._divider.setStyleProperty('display','block');row.setHighlight(false);}else{this._divider.setStyleProperty('display','none');row.setHighlight(true);this._lastHighlightedRow=row;}}};_AcmListBox._onReorderDrag=function(e){if(e.getDragDistance()>4){var rows=[];var items=this._selectionManager.getSelectedItems();for(var i=0,l=items.length;i<l;i++){var item=items[i];if(item.getReorderable()){rows.push(this._selectionMode=='cell'?item.getRow():item);}}
if(rows.length==0){return;}
if(!Acm.ListBox._dragStarted){var dragComponent=Acm.ListBox._dragComponent=this.getContainer().addComponent(new Acm.Component());dragComponent.setStyle('position: absolute; z-index: 100');var html='<table style="border: 1px solid #909090">';for(var i=0,l=rows.length;i<l;i++){html+='<tr>'+rows[i].getInnerHtml()+'</tr>';}
html+='</table>';dragComponent.setInnerHtml(html);Acm.ListBox._dragStarted=true;Acm.ListBox._dragRows=rows;}
Acm.ListBox._dragComponent.moveTo(e.getClientX()+15,e.getClientY()+15);}};_AcmListBox.setSelectionMode=function(mode){if(this._selectionMode==mode){return;}
if(this._childRows&&this._childRows.length>0){alert('selectionMode changing after creation. Here I need to first reset (or recreate) the selectionManager, \n'+'then all existing rows or cells (depending on selectionMode) \n'+'needs to be re-added to the selectionManager');}
this._selectionMode=mode;};_AcmListBox.getSelectionMode=function(){return this._selectionMode;};_AcmListBox.setRadioSelection=function(b){this._selectionManager.setRadioSelection(b);};_AcmListBox.getRadioSelection=function(){return this._selectionManager.getRadioSelection();};_AcmListBox.setMultipleSelection=function(b){this._selectionManager.setMultipleSelection(b);};_AcmListBox.getMultipleSelection=function(){return this._selectionManager.getMultipleSelection();};_AcmListBox.getSelectionManager=function(){return this._selectionManager;};_AcmListBox.getSelectedItems=function(){return this._selectionManager.getSelectedItems();};_AcmListBox.setColumnWidth=function(columnIndex,width){var col;if(typeof(this._colgroup)!="undefined"&&typeof(this._colgroup._children)!="undefined"&&typeof(this._colgroup._children[columnIndex])!="undefined"){col=this._colgroup._children[columnIndex];}else{return;}
col.setWidth(width);if(Acm.Browser.isMoz){var rg=this._rowGroup._element;rg.removeChild(rg.appendChild(this._container.createElement('TR')));}};_AcmListBox.getColumnWidth=function(columnIndex){var col=this._colgroup._children[columnIndex];return col.getWidth();};_AcmListBox.getColumnPixelWidth=function(columnIndex){var col;if(typeof(this._colgroup)!="undefined"&&typeof(this._colgroup._children)!="undefined"&&typeof(this._colgroup._children[columnIndex])!="undefined"){col=this._colgroup._children[columnIndex];}else{return 0;}
return col.getPixelWidth();};_AcmListBox.setFocus=function(focus,showFocus){if(this._childRows&&this._childRows.length>0&&this._selectionMode!='none'){var item=this._selectionManager.getLastSelectedItem();if(!item){var row=this.getChildRow(0);item=this._selectionMode=='row'?row:row.getCells()[0];}
item.setFocus(focus,showFocus)}};_AcmListBox.getValue=function(){var rows=this._rowGroup._children,v=null,tmpArr=new Array(),tmpStr='',colNames=new Array();var columns=this.getColumns();if(rows){for(var i=0;i<rows.length;i++){var cells=rows[i]._children;v='',colName='';for(var j=0;j<cells.length;j++){if(i==0){colNames.push(columns[j].getId()||'col'+j);}
colName=colNames[j];if(cells[j].getValue()!==null){v+='&'+colName+'='+cells[j].getValue();}else if(cells[j]._children){var container=cells[j]._children[0];if(container._children[0]&&container._children[0].getValue()!==null){v+='&'+colName+'='+container._children[0].getValue();}}}
if(v){v=v.substr(1);v=Acm.String.urlEncode(v);tmpArr.push(v);}}
return tmpArr;}
return'';};_AcmListBox._px2float=function(px){return(px/this._rowGroup.getPixelWidth())*100;};_AcmListBox.getFixedWidth=function(){return this._fixedWidth;};_AcmListBox.setFixedWidth=function(b){if(this._fixedWidth==b){return;}
if(b==false){this._table.setWidth("100%");}
this._fixedWidth=b;};_AcmListBox.getColumn=function(index){if(this._colgroup._children){return this._colgroup._children[index];}};_AcmListBox.getColumns=function(){return this._colgroup._children;};_AcmListBox.getRowElement=function(index){index+=this._thead._children.length;return this._table._element.rows[index];};_AcmListBox.getChildRows=function(){return this._childRows;};_AcmListBox.hasChildRows=function(){return(this._childRows&&this._childRows.length>0);};_AcmListBox.getChildRow=function(index){return this._childRows[index];};_AcmListBox.setAppendMode=function(appendMode){this._appendMode=appendMode;};_AcmListBox.getAppendMode=function(){return this._appendMode;};_AcmListBox.getRowAfter=function(row){for(var a=this._rowGroup._children,i=Acm.Array.indexOf(a,row)+1,l=a.length;i<l;i++){if(a[i].getStyleProperty('display')!='none'){return a[i];}}
return false;};_AcmListBox.getRowBefore=function(row){for(var a=this._rowGroup._children,i=Acm.Array.indexOf(a,row)-1;i>=0;i--){if(a[i].getStyleProperty('display')!='none'){return a[i];}}
return false;};_AcmListBox.getRowIndex=function(row){return Acm.Array.indexOf(this._rowGroup._children,row);};_AcmListBox.endDrag=function(row){if(Acm.ListBox._dragStarted){this._divider.setStyleProperty('display','none');this.getContainer().deleteComponent(Acm.ListBox._dragComponent);if(this._lastHighlightedRow){this._lastHighlightedRow.setHighlight(false);}
Acm.ListBox._dragStarted=false;Acm.ListBox._dragRows=null;this.getContainer().getEventGateway().endDrag();}};_AcmListBox.autoExpandLevel=function(level){for(var i=0,a=this._childRows,l=a.length;i<l;i++){this._autoExpandLevel(a[i],level,1);}};_AcmListBox._autoExpandLevel=function(row,level,currentLevel){if(!row.getExpanded()){row.setExpanded(true);}
for(var i=0,a=row._childRows,l=a.length;i<l;i++){if(level==currentLevel&&a[i].getExpanded()){a[i].setExpanded(false);}else if(currentLevel<level&&a[i]._childRows){this._autoExpandLevel(a[i],level,currentLevel+1);}}};_AcmListBox.expandAll=function(row){if(!row){row=this;}
for(i in row._childRows){r=row._childRows[i];r.setExpanded(true);if(r._childRows){this.expandAll(r);}}};_AcmListBox.setBusy=function(busy){if(busy==this._busy){return;}
if(busy){this._busyIcon=this.addComponent(new Acm.Image(this.getPath()+'img/tree/busy-20.gif',20,20));this._busyIcon.setStyle('position: absolute; z-index: 10; left: 50%; top: 50%; margin-left: -10px; margin-top: -10px;');}else{this.deleteComponent(this._busyIcon);}
this._busy=busy;};_AcmListBox.getBusy=function(){return this._busy;};_AcmListBox._onSelectionManagerChange=function(e){this.dispatchEvent(new Acm.ComponentEvent('change',e.getComponent()));};_AcmListBox._onKeyDown=function(e){var c=e.getKeyCode();if(c==Acm.KeyboardEvent.ESC){this.endDrag();return;}
if(c==Acm.KeyboardEvent.UP||c==Acm.KeyboardEvent.DOWN){e.preventDefault();}
var row,cell=e.getDispatcher().getParentComponentByClass(Acm.ListBoxCell);if(!cell){row=e.getDispatcher().getParentComponentByClass(Acm.ListBoxRow);if(row){cell=row.getCells()[0];}}
var selectionManager=this._selectionManager;if(!cell){return;}
if(!row){row=cell.getRow();}
if(this._selectionMode=='row'){switch(c){case Acm.KeyboardEvent.UP:var prevRow=this.getRowBefore(row);if(!prevRow){break;}
prevRow.setFocus(true,true);if(!e.getCtrlKey()&&e.getShiftKey()){selectionManager.selectSequenceTo(prevRow);}else{selectionManager.selectSingle(prevRow);}
prevRow.scrollIntoView();break;case Acm.KeyboardEvent.DOWN:var nextRow=this.getRowAfter(row);if(!nextRow){break;}
nextRow.setFocus(true,true);if(!e.getCtrlKey()&&e.getShiftKey()){selectionManager.selectSequenceTo(nextRow);}else{selectionManager.selectSingle(nextRow);}
nextRow.scrollIntoView();break;case Acm.KeyboardEvent.LEFT:if(row.getExpanded()){row.setExpanded(false);}
break;case Acm.KeyboardEvent.RIGHT:if(!row.getExpanded()){row.setExpanded(true);}
break;case Acm.KeyboardEvent.SPACE:if(e.getCtrlKey()){selectionManager.invert(row);}else if(e.getShiftKey()){selectionManager.selectSequenceTo(row);}}}else if(this._selectionMode=='cell'){switch(c){case Acm.KeyboardEvent.LEFT:item=cell.getPreviousSibling();break;case Acm.KeyboardEvent.RIGHT:item=cell.getNextSibling();break;case Acm.KeyboardEvent.UP:case Acm.KeyboardEvent.DOWN:var cellIndex=cell.getCellIndex();var row=cell.getRow();if(c==Acm.KeyboardEvent.UP){if(row=this.getRowBefore(row)){item=row.getCell(cellIndex);}}else if(row=this.getRowAfter(row)){item=row.getCell(cellIndex);}}}};_AcmListBox._onMouseDown=function(e){var comp=e.getDispatcher().getParentComponentByClass(Acm.ListBoxCell);if(!comp||this._appendMode){return;}
var row=comp.getRow();if(comp instanceof Acm.AnchorCell&&e.getTarget().tagName=='IMG'&&e.getButton()==Acm.MouseEvent.LEFT){if(comp.getAnchor()=='blank'&&!row.getForceExpandable()){return;}
row.setExpanded(!row.getExpanded());return;}
if(this._selectionMode=='row'){if(e.getShiftKey()){this._selectionManager.selectSequenceTo(row);}else if(e.getCtrlKey()){this._selectionManager.invert(row);}
if(!row.getSelected()){this._selectionManager.selectSingle(row);this._ignoreMouseUp=true;}}else{if(e.getCtrlKey()){this._selectionManager.invert(comp);}else if(!comp.getSelected()){this._selectionManager.selectSingle(comp);this._ignoreMouseUp=true;}}};_AcmListBox._onMouseUp=function(e){var cell=e.getDispatcher().getParentComponentByClass(Acm.ListBoxCell);if(!cell){return;}
var row=cell.getRow();if(!e.getCtrlKey()&&!e.getShiftKey()&&e.getTarget().tagName!='IMG'&&!this._ignoreMouseUp){if(e.getButton()!=Acm.MouseEvent.RIGHT||!this._selectionManager.isSelected(row)){this._selectionManager.selectSingle(this._selectionMode=='row'?row:cell);}}};_AcmListBox._toggleSelection=function(e,comp){comp.setFocus(true);if(this._selectionMode=='row'){comp=comp._parentComponent;}
if(e.getCtrlKey()){this._selectionManager.invert(comp);}else{this._selectionManager.selectSingle(comp);}};_AcmListBox._onScroll=function(){for(var j=0,a=this._thead._element.getElementsByTagName('div'),l=a.length;j<l;j++){if(a[j].className=='acmListBoxHeaderDivider'){continue;}
a[j].style.top=this._element.scrollTop;}};Acm.ListBoxColumn=function(){Acm.Component.call(this);};var _AcmListBoxColumn=Acm.extend('ListBoxColumn','Component');_AcmListBoxColumn._tagName='COL';_AcmListBoxColumn._listBox=null;_AcmListBoxColumn._editable=null;_AcmListBoxColumn._cellClassName='';_AcmListBoxColumn._cellStyle='';_AcmListBoxColumn.dispose=function(){if(this._disposed){return;}
Acm.ListBoxColumn.parent.dispose.call(this);this._listBox=null;this._editable=null;this._columnStyle=null;};_AcmListBoxColumn.create=function(){Acm.ListBoxColumn.parent.create.call(this);};_AcmListBoxColumn.setListBox=function(listBox){this._listBox=listBox;};_AcmListBoxColumn.getListBox=function(){return this._listBox;};_AcmListBoxColumn.getIndex=function(){if(this._listBox){return Acm.Array.indexOf(this._listBox.getColumns(),this);}};_AcmListBoxColumn.setIndex=function(index){};_AcmListBoxColumn.setEditable=function(editable){if(this._listBox){var index=this.getIndex();for(var i=0,a=this._listBox.getRows(),l=a.length;i<l;i++){a[i].getCells()[index].setEditable(editable);}}
this._editable=editable;};_AcmListBoxColumn.getEditable=function(){return this._editable;};_AcmListBoxColumn.setCellStyle=function(cellStyle){if(this._listBox&&this._listBox.getRows().length>0){var index=this.getIndex();for(var i=0,a=this._listBox.getRows(),l=a.length;i<l;i++){a[i].getCell(index).setStyle(cellStyle);}}
this._cellStyle=cellStyle;};_AcmListBoxColumn.hasEmptyCells=function(){if(this._listBox&&this._listBox.getAllRows().length>0){var index=this.getIndex();var rows=this._listBox.getAllRows();var numRows=rows.length;for(var i=0;i<numRows;i++){cellValue=rows[i].getCell(index).getValue();if(cellValue.replace(/\s*/g,'')===''){return true;}}}
return false;};_AcmListBoxColumn.getCellStyle=function(){return this._cellStyle;};_AcmListBoxColumn.setCellClassName=function(cellClassName){if(this._listBox&&this._listBox.getRows().length>0){var index=this.getIndex();for(var i=0,a=this._listBox.getRows(),l=a.length;i<l;i++){a[i].getCell(index).setClassName(cellClassName);}}
this._cellClassName=cellClassName;};_AcmListBoxColumn.getCellClassName=function(){return this._cellClassName;};if(Acm.Browser.isIe){_AcmListBoxColumn.getPixelLeft=function(){for(var sum=0,a=this.getListBox().getColumns(),i=this.getIndex()-1;i>=0;i--){sum+=a[i].getPixelWidth();}
return sum;};}
Acm.ListBoxHeader=function(){Acm.Component.call(this);};var _AcmListBoxHeader=Acm.extend('ListBoxHeader','Component');_AcmListBoxHeader._tagName='TR';_AcmListBoxHeader.dispose=function(){if(this._disposed){return;}
Acm.ListBoxHeader.parent.dispose.call(this);};_AcmListBoxHeader.create=function(){Acm.ListBoxHeader.parent.create.call(this);}
_AcmListBoxHeader.addComponent=function(oComp){if(oComp instanceof Acm.ListBoxHeaderButton){this._listBox._listBoxHeaders.push(oComp);return Acm.ListBoxHeader.parent.addComponent.call(this,oComp);}
return oComp;};Acm.ListBoxColumnChooser=function(){Acm.ToggleButton.call(this);};var _AcmListBoxColumnChooser=Acm.extend('ListBoxColumnChooser','ToggleButton');_AcmListBoxColumnChooser.create=function(){this.setIcon(this.getPath()+'img/tree/column-chooser-16.gif');};_AcmListBoxColumnChooser.addComponent=function(comp){};Acm.ListBoxHeaderButton=function(text){Acm.Component.call(this);if(text){this._text=text;}};var _AcmListBoxHeaderButton=Acm.extend('ListBoxHeaderButton','Component');_AcmListBoxHeaderButton._tagName='TH';_AcmListBoxHeaderButton._listBox=null;_AcmListBoxHeaderButton._parentRow=null;_AcmListBoxHeaderButton._tmpTot=null;_AcmListBoxHeaderButton._text=null;_AcmListBoxHeaderButton._tmpLeft=null;_AcmListBoxHeaderButton._line=null;_AcmListBoxHeaderButton._comments=null;_AcmListBoxHeaderButton.dispose=function(){if(this._disposed){return;}
Acm.ListBoxHeaderButton.parent.dispose.call(this);this._listBox=null;this._parentRow=null;this._tmpTot=null;this._text=null;this._tmpLeft=null;this._line=null;this._comments=null;};_AcmListBoxHeaderButton.createPrototype=function(){var o=Acm.ListBoxHeaderButton.parent.createPrototype.call(this);o.setStyle('padding-right: 0px');o._button=o.addComponent(new Acm.ListBoxButton());o._button.setZIndex(1);if(Acm.Browser.isIe){o.setClassName('acmListBoxIeHeader');}
if(!Acm.Browser.isIe){o._button.setStyle('position: relative; height: 100%');}
o._divider=o._button.addComponent(new Acm.Component());var d=o._divider;d.setClassName('acmListBoxHeaderDivider');d.setHeight(13);d.setWidth(7);return o;};_AcmListBoxHeaderButton.create=function(){Acm.ListBoxHeaderButton.parent.create.call(this);;this._button=this.addComponent(new Acm.ListBoxButton().setElement(this._element.childNodes[0]));if(this._text){this.setText(this._text);}
this.setToolTipEvents(true);this.addEventListener("showToolTip",this._onShowToolTip);this.addEventListener("hideToolTip",this._onHideToolTip);this._divider=this._button.addComponent(new Acm.Component().setElement(this._element.childNodes[0].childNodes[1]));var d=this._divider;d.addEventListener('mousedown',this._onDividerMouseDown,this);d.addEventListener('dragStart',this._onDividerDragStart,this);d.addEventListener('drag',this._onDividerDrag,this);d.addEventListener('dragEnd',this._onDividerDragEnd,this);};_AcmListBoxHeaderButton.setText=function(text){if(!text){text='&nbsp;';}
this._button.setText(text);};_AcmListBoxHeaderButton.getText=function(){return this._button.getText();};_AcmListBoxHeaderButton.setIcon=function(icon){this._button.setIcon(icon);};_AcmListBoxHeaderButton.getIcon=function(){return this._button.getIcon();};_AcmListBoxHeaderButton.setColSpan=function(colSpan){this._element.colSpan=colSpan;};_AcmListBoxHeaderButton.getColSpan=function(){return this._element.colSpan;};_AcmListBoxHeaderButton.setComments=function(comments){if(typeof(comments)=="string"||typeof(comments)=="number"){comments=String(comments);if(comments==""){return;}
var arrWithComments=comments.split(' ');this._comments=arrWithComments;this.setCommentIndicators();}};_AcmListBoxHeaderButton.getComments=function(){return this._comments;};_AcmListBoxHeaderButton.setCommentIndicators=function(){if(this._comments.length>0){this._button.addClassName('cellCommentHeader');}};_AcmListBoxHeaderButton._onShowToolTip=function(e){var comments=this._comments;if(comments&&comments.length>0){var toolTipString='';if(comments.length==1){this.getJson('index.php?input/comment/'+comments[0].toString(),function(o){toolTipString=o.data.commentText;var toolTip=new Acm.ToolTip(toolTipString);toolTip.setContainer(this.getContainer());toolTip.show();},this);}else{toolTipString=comments.length+' '+t_("comments");var toolTip=new Acm.ToolTip(toolTipString);toolTip.setContainer(this.getContainer());toolTip.show();}}};_AcmListBoxHeaderButton._onHideToolTip=function(){Acm.ToolTipManager.instance().hideToolTip();};_AcmListBoxHeaderButton.getListBox=function(){if(!this._listBox){this._listBox=this._parentComponent._parentComponent._parentComponent._parentComponent;}
return this._listBox;};_AcmListBoxHeaderButton._onDividerMouseDown=function(e){e.stopPropagation();};_AcmListBoxHeaderButton._onDividerDragStart=function(e){var listBox=this.getListBox();for(var index=0,comp=this;comp;comp=comp.getPreviousSibling()){index+=comp.getColSpan();}
this._dividerDragIndex=index-1;var columnIndex=this._dividerDragIndex;if(!listBox.getFixedWidth()){this._tmpTot=listBox._px2float(parseFloat(listBox.getColumnPixelWidth(columnIndex))+parseFloat(listBox.getColumnPixelWidth(columnIndex+1)));}
this._tmpLeft=listBox.getColumn(columnIndex).getPixelLeft();if(listBox.getLineResize()){this._line=listBox.addComponentFirst(new Acm.Component());this._line.setStyle('width: 1px; height: 100%; background-color: blue; z-index: 400; position: absolute');}};_AcmListBoxHeaderButton._onDividerDrag=function(e){var lb=this.getListBox();var w=(e.getClientX()-lb.getPageX())+lb._element.scrollLeft;var i=this._dividerDragIndex;if(!lb.getFixedWidth()){var left=lb._px2float(w-this._tmpLeft);var right=this._tmpTot-left;}
if(left<1||right<1){return;}
if(lb.getLineResize()){this._line.setLeft(w);}else{lb.setColumnWidth(i,left+'%');lb.setColumnWidth(i+1,right+'%');}};_AcmListBoxHeaderButton._onDividerDragEnd=function(e){var lb=this.getListBox();if(lb.getLineResize()){var w=(e.getClientX()-lb.getPageX())+lb._element.scrollLeft;var i=this._dividerDragIndex;if(!lb.getFixedWidth()){var left=lb._px2float(w-this._tmpLeft);var right=this._tmpTot-left;}
lb.deleteComponent(this._line);if(left<1||right<1){left=left<1?1:left;right=right<1?1:right;}
lb.setColumnWidth(i,left+'%');lb.setColumnWidth(i+1,right+'%');}};Acm.ListBoxButton=function(text){Acm.Button.call(this,text);};var _AcmListBoxButton=Acm.extend('ListBoxButton','Button');_AcmListBoxButton.createPrototype=function(){var p=Acm.ListBoxButton.parent.createPrototype.call(this);p.setClassName('acmLabel acmListBoxHeaderButtonNormal');return p;};_AcmListBoxButton._makeNormal=function(){this.removeClassName('acmListBoxHeaderButtonPressed');this.addClassName('acmListBoxHeaderButtonNormal');};_AcmListBoxButton._makeActive=function(){this.removeClassName('acmListBoxHeaderButtonNormal');this.addClassName('acmListBoxHeaderButtonPressed');};Acm.ListBoxRowGroup=function(parentRow){Acm.Component.call(this);this._children=[];this._allRowsById={};if(parentRow){this._parentRow=parentRow;}};var _AcmListBoxRowGroup=Acm.extend('ListBoxRowGroup','Component');_AcmListBoxRowGroup._tagName='TBODY';_AcmListBoxRowGroup._parentRow=null;_AcmListBoxRowGroup._listBox=null;_AcmListBoxRowGroup._allRowsById=null;_AcmListBoxRowGroup.dispose=function(){Acm.ListBoxRowGroup.parent.dispose.call(this);this._parentRow=null;this._listBox=null;this._allRowsById=null;};_AcmListBoxRowGroup._addRowId=function(comp){var id;if(comp instanceof Acm.ListBoxRow){id=comp._id;if(!this._allRowsById[id]){this._allRowsById[id]=[];}
this._allRowsById[id].push(comp);}};_AcmListBoxRowGroup.addComponent=function(comp){if(comp._id){this._addRowId(comp);}
return Acm.ListBoxRowGroup.parent.addComponent.call(this,comp);};_AcmListBoxRowGroup.addComponentBefore=function(compNew,compExisting){if(compNew._id){this._addRowId(compNew);}
return Acm.ListBoxRowGroup.parent.addComponentBefore.call(this,compNew,compExisting);};_AcmListBoxRowGroup.addComponentAfter=function(compNew,compExisting){if(compNew._id){this._addRowId(compNew);}
return Acm.ListBoxRowGroup.parent.addComponentAfter.call(this,compNew,compExisting);};_AcmListBoxRowGroup._removeComponent=function(comp){if(this._selectionMode=='row'){this._selectionManager.deselect(comp);}
var a;if(comp._id){a=this._allRowsById[comp._id];if(a){Acm.Array.remove(a,comp);}}
return Acm.ListBoxRowGroup.parent._removeComponent.call(this,comp);};_AcmListBoxRowGroup._getComponentsById=function(id,hits){if(this._allRowsById[id]&&this._allRowsById[id].length>0){for(var i=0;a=this._allRowsById[id],l=a.length,i<l;i++){hits.push(a[i]);}}
var children=this._children;if(children){for(var i=0,l=children.length;i<l;i++){children[i]._getComponentsById(id,hits);}}};_AcmListBoxRowGroup.setInnerHtml=function(html){var tbl,tbody,doc,div;if(Acm.Browser.isIe){doc=this._container.getDocument();div=this._container.createElement('DIV');div.style.display='none';doc.body.appendChild(div);div.innerHTML=(new Array('<table><tbody id="tmp_tbody">',html,'</tbody></table>')).join('');tbody=doc.getElementById('tmp_tbody');this._element=tbody;tbody._acmComponent=this;tbl=this._parentComponent._element;try{tbl.removeChild(this._element);}catch(e){}
doc.body.removeChild(div);tbl.appendChild(tbody)}else{this._element.innerHTML=html;}};_AcmListBoxRowGroup.toHtml=function(arr){for(var i=0,a=this._listBox._childRows,l=a.length;i<l;i++){a[i].toHtml(arr);}
return arr;};_AcmListBoxRowGroup.mapElement=function(element){var tr,td;var row;var cell;if(element.tagName=='DIV'&&element.parentNode.tagName=='TD'){td=element.parentNode;tr=td.parentNode;}else if(element.tagName=='TD'&&element.parentNode.tagName=='TR'){td=element;tr=td.parentNode;}else if(element.tagName=='IMG'&&element.parentNode.tagName=='DIV'&&element.parentNode.parentNode.tagName=='TD'){td=element.parentNode.parentNode;tr=td.parentNode;}
if(tr){row=this._children[tr.sectionRowIndex];row._element=tr;cell=row.getCell(td.cellIndex);cell._element=td;td._acmComponent=cell;return cell;}
return this;};Acm.ListBoxRow=function(){this._children=[];};var _AcmListBoxRow=Acm.extend('ListBoxRow','Component');_AcmListBoxRow._tagName='TR';_AcmListBoxRow._canHaveFocus=true;_AcmListBoxRow._showFocus=true;Acm.ListBoxRow._dragRow=null;_AcmListBoxRow._listBox=null;_AcmListBoxRow._parentRow=null;_AcmListBoxRow._childRows=null;_AcmListBoxRow._depth=0;_AcmListBoxRow._expanded=false;_AcmListBoxRow._forceExpandable=null;_AcmListBoxRow._anchorCell=null;_AcmListBoxRow._reorderable=true;_AcmListBoxRow.dispose=function(){if(this._disposed){return;}
Acm.ListBoxRow.parent.dispose.call(this);this._listBox=null;this._parentRow=null;if(this._childRows){for(var i=0,a=this._childRows,l=a.length;i<l;i++){a[i].dispose();}}
this._childRows=null;this._depth=null;this._expanded=null;this._forceExpandable=null;this._anchorCell=null;};_AcmListBoxRow.scrollIntoView=function(alignWithTop){var el=this._element;if(typeof(alignWithTop)==='undefined'&&el.offsetParent){var height=parseInt(el.clientHeight,10);if(parseInt(el.offsetTop,10)<parseInt(el.offsetParent.offsetParent.scrollTop,10)){alignWithTop=true;}else if((parseInt(el.offsetTop,10)+parseInt(el.scrollHeight,10))>=(parseInt(el.offsetParent.scrollTop,10)+height)){alignWithTop=false;}else{return false;}}
this._element.scrollIntoView(alignWithTop);};_AcmListBoxRow.create=function(){Acm.ListBoxRow.parent.create.call(this);if(this._lazy&&this._element.childNodes.length<this._children.length){for(var i=0,a=this._children,l=a.length;i<l;i++){a[i]._lazy=false;this.addComponent(a[i]);}}
this._lazy=false;if(this._cssClassName){this.addClassName(this._cssClassName);}};_AcmListBoxRow.toHtml=function(arr,depth){if(!depth){depth=0;}
if(this._cssClassName){arr[arr.length]='<tr class="'+this._cssClassName+'">';}else{arr[arr.length]='<tr>';}
var hide=this._hideCellsOnExpand;for(var i=0,a=this._children,l=a.length;i<l;i++){a[i].toHtml(arr,depth,hide);}
arr[arr.length]='</tr>';if(this._expanded&&this._childRows){for(var i=0,a=this._childRows,l=a.length;i<l;i++){a[i].toHtml(arr,depth+1);}}};_AcmListBoxRow.getIndex=function(){return Acm.Array.indexOf(this.getListBox()._rowGroup._children,this);};_AcmListBoxRow.getElement=function(){if(this._disposed){return null;}
if(this._element){return this._element;}
var i=this.getIndex();if(i==-1){return false;}
return this.getListBox().getRowElement(i);};_AcmListBoxRow.getNextRow=function(){var parent=this._parentRow||this._listBox;for(var a=parent._childRows,i=Acm.Array.indexOf(a,this)+1,l=a.length;i<l;i++){if(a[i].getStyleProperty('display')!='none'){return a[i];}}
return false;};_AcmListBoxRow.setReorderable=function(b){this._reorderable=b;};_AcmListBoxRow.getReorderable=function(){return this._reorderable;};_AcmListBoxRow.getPreviousRow=function(){var parent=this._parentRow||this._listBox;for(var a=parent._childRows,i=Acm.Array.indexOf(a,this)-1;i>=0;i--){if(a[i].getStyleProperty('display')!='none'){return a[i];}}
return false;};_AcmListBoxRow.getParentRow=function(){return this._parentRow;};_AcmListBoxRow.getChildRows=function(){return this._childRows;};_AcmListBoxRow.hasChildRows=function(){return(this._childRows&&this._childRows.length>0);};_AcmListBoxRow.getListBox=function(){if(!this._listBox){this._listBox=this.getParentComponentByClass(Acm.ListBox);}
return this._listBox;};_AcmListBoxRow.getAnchorCell=function(){return this._anchorCell;};_AcmListBoxRow.addComponent=function(oComp){if(oComp instanceof Acm.ListBoxCell){Acm.ListBoxRow.parent.addComponent.call(this,oComp);if(oComp instanceof Acm.AnchorCell){this._anchorCell=oComp;if(!oComp._lazy){oComp.setAnchor(this.getForceExpandable()?(this._expanded?'minus':'plus'):'blank');if(this._busy){oComp.setBusy(true);}
if(!oComp._lazy&&this._parentRow){this.setDepth(this._parentRow.getDepth()+1);}}}}else if(oComp instanceof Acm.ListBoxRow){if(!this._childRows){this._childRows=[];}
oComp._parentRow=this;oComp._listBox=this._listBox;if(this._expanded){var listBox=this._listBox;var rg=listBox.getRowGroup();if(this._lazy){if(!listBox._isComplete){rg.addComponent(oComp);}else{var a=this._childRows;var l=a.length;var after=l>0?a[l-1]:this;rg.addComponentAfter(oComp,after,true);}}else if(listBox._isComplete){rg.addComponentAfter(oComp,this.getAppendRow());if(oComp._anchorCell){oComp.setDepth(this.getDepth()+1);}}}
if(oComp._expanded&&oComp.hasChildRows()&&!oComp._lazy){oComp.addAllChildRows();}
this._childRows.push(oComp);this._listBox._allRows.push(oComp);if(!this._lazy&&!oComp._lazy){this.setAnchor(this._expanded?'minus':'plus');}}else{Acm.ListBoxRow.parent.addComponent.call(this,oComp);}
return oComp;};_AcmListBoxRow.getAppendRow=function(){if(this.hasChildRows()){var after=this._childRows[this._childRows.length-1];if(after.hasChildRows()&&after.getExpanded()){return after.getAppendRow();}else{return after;}}else{return this;}};_AcmListBoxRow._addComponentBeforeAfter=function(comp,existingComp,before){if(comp instanceof Acm.ListBoxRow){if(!this._childRows){this._childRows=new Array();}
comp._parentRow=this;comp._listBox=this._listBox;if(this._expanded){var listBox=this._listBox;var rg=listBox.getRowGroup();if(listBox._isComplete){rg[before?'addComponentBefore':'addComponentAfter'](comp,existingComp);if(comp._anchorCell){comp.setDepth(this.getDepth()+1);}}
if(comp.hasChildRows()){comp.addAllChildRows();}}
this._childRows[before?'insertBefore':'insertAfter'](comp,existingComp);this.setAnchor(this._expanded?'minus':'plus');return comp;}else{Acm.ListBoxRow.parent[before?'addComponentBefore':'addComponentAfter'].call(this,comp);}};_AcmListBoxRow.addComponentBefore=function(comp,existingComp){return this._addComponentBeforeAfter(comp,existingComp,true);};_AcmListBoxRow.addComponentAfter=function(comp,existingComp){return this._addComponentBeforeAfter(comp,existingComp);};_AcmListBoxRow.addComponentFromXml=function(comp,c,backReferenceObject){if(comp instanceof Acm.ListBoxRow){Acm.ListBoxRow.parent.addComponentFromXml.call(this,comp,c,backReferenceObject,true);}else{Acm.ListBoxRow.parent.addComponentFromXml.call(this,comp,c,backReferenceObject);}};_AcmListBoxRow._removeComponent=function(comp){if(comp instanceof Acm.ListBoxRow){comp.removeAllChildRows();if(this._parentComponent){this._parentComponent.removeComponent(comp);}
Acm.Array.remove(this._childRows,comp);if(this._childRows.length==0){this.setAnchor(this._forceExpandable?'plus':'blank');}}else{Acm.ListBoxRow.parent.removeComponent.call(this,comp);}
return comp;};_AcmListBoxRow.deleteComponent=function(comp){if(comp instanceof Acm.ListBoxRow){Acm.Array.remove(this._childRows,comp);comp.deleteAllChildRows();if(this._parentComponent){this._parentComponent.deleteComponent(comp);}
if(this._childRows.length==0){this.setAnchor(this._forceExpandable?'plus':'blank');}}else{Acm.ListBoxRow.parent.deleteComponent.call(this,comp);}
return comp;};_AcmListBoxRow.addAllChildRows=function(){if(!this._childRows){return;}
for(var depth=0,p=this;p;p=p._parentRow){depth++;}
var after,child,rowGroup=this._parentComponent;for(var a=this._childRows,i=0,l=a.length;i<l;i++){child=a[i];after=after?after:(i>0?a[i-1]:this);rowGroup.addComponentAfter(child,after);child.setStyleProperty('display',Acm.Browser.isIe?'block':'table-row');after=null;child.setDepth(depth);if(child._childRows||child._forceExpandable){if(child.getExpanded()){after=child.addAllChildRows();}else{child.setAnchor('plus');}}}
return child;};_AcmListBoxRow.removeAllChildRows=function(){var childRows=this._childRows;var rowGroup=this._parentComponent;var child;if(this._expanded&&childRows){for(var i=0,l=childRows.length;i<l;i++){child=childRows[i];this._listBox._rowGroup.mapElement(child.getElement())
if(child._childRows&&child.getExpanded()){child.removeAllChildRows();}
child.setStyleProperty('display','none');}}};_AcmListBoxRow.deleteAllChildRows=function(){var childRows=this._childRows;if(childRows){while(childRows.length>0){this.deleteComponent(childRows[0]);}}};_AcmListBoxRow.getCell=function(index){return this._children[index];};_AcmListBoxRow.getCellElement=function(colIndex){if(!this._element){this._element=this.getElement();}
if(!this._element){return;}
return this._element.cells[colIndex];};_AcmListBoxRow.getCells=function(){return this._children;};_AcmListBoxRow.setAnchor=function(anchor){this._anchorCell.setAnchor(anchor);};_AcmListBoxRow.setDepth=function(depth){var anchorCellEle;if(this._anchorCell){anchorCellEle=this._anchorCell.getElement();if(!anchorCellEle){this._anchorCell.setContainer(this.getContainer());this._anchorCell.create();}
this._anchorCell.setStyleProperty('paddingLeft',((depth)*16)+'px');}
this._depth=depth;};_AcmListBoxRow.getDepth=function(){return this._depth;};_AcmListBoxRow.setForceExpandable=function(b){if(this._anchorCell){if(b){this._anchorCell.setAnchor(this._expanded?'minus':'plus');}else if(!b&&((this._childRows&&this._childRows.length==0)||!this._childRows)){this._anchorCell.setAnchor('blank');}}
this._forceExpandable=b;};_AcmListBoxRow.getForceExpandable=function(){return this._forceExpandable;};_AcmListBoxRow.setHighlight=function(b){if(b==this._highlight){return;}
var cell,i=0,cells=this._children;for(i;cell=cells[i];i++){if(cell instanceof Acm.ListBoxCell){cell.setHighlight(b);}}
if(b){this.getListBox()._lastHighlightedRow=this;}
this._highlight=b;};_AcmListBoxRow.getHighlight=function(){return this._highlight;};_AcmListBoxRow.setSelected=function(b){if(b==this._selected){return;}
var cell,i=0,cells=this._children;for(i;cell=cells[i];i++){if(cell instanceof Acm.ListBoxCell){cell.setSelected(b);}}
this._selected=b;};_AcmListBoxRow.getSelected=function(){return this._selected;};_AcmListBoxRow.setExpanded=function(b){if(b==this._expanded){return;}
if(this._childRows||this._forceExpandable){if(b){if(this.dispatchEvent(new Acm.ComponentEvent('beforeExpand',this))===false){return;}
this._expand();}else{if(this.dispatchEvent(new Acm.ComponentEvent('beforeCollapse',this))===false){return;}
this._collapse();}}
this._expanded=b;this.dispatchEvent(new Acm.ComponentEvent(b?'expand':'collapse',this));};_AcmListBoxRow._expand=function(){this.setAnchor('minus');this.addAllChildRows();};_AcmListBoxRow._collapse=function(){this.setAnchor('plus');this.removeAllChildRows();};_AcmListBoxRow.getExpanded=function(){return this._expanded;};_AcmListBoxRow.toggle=function(){this.setExpanded(!this._expanded);};_AcmListBoxRow.setBusy=function(busy){if(this._anchorCell){this._anchorCell.setBusy(busy);}
this._busy=busy;};_AcmListBoxRow.getBusy=function(){return this._busy;};Acm.ListBoxCell=function(){};var _AcmListBoxCell=Acm.extend('ListBoxCell','Component');_AcmListBoxCell._tagName='TD';_AcmListBoxCell._addTextNodesFromXML=true;_AcmListBoxCell._canHaveFocus=true;_AcmListBoxCell._showFocus=true;_AcmListBoxCell._text=null;_AcmListBoxCell._textOnFocus=null;_AcmListBoxCell._editable=null;_AcmListBoxCell._anchor=null;_AcmListBoxCell._edit=null;_AcmListBoxCell.dispose=function(){if(this._disposed){return;}
Acm.ListBoxCell.parent.dispose.call(this);this._cellLabel=null;this._anchor=null;this._editable=null;};_AcmListBoxCell.createPrototype=function(){var o=Acm.ListBoxRow.parent.createPrototype.call(this);var container=this._container;var div=o._element.appendChild(container.createElement('DIV'));div.appendChild(container.createTextNode("\u00A0"));return o;};_AcmListBoxCell.create=function(){Acm.ListBoxCell.parent.create.call(this);if(this._text){this.setText(this._text);}
this._addToElement=this._element.firstChild;};_AcmListBoxCell.addComponent=function(comp){var div;if(!this._children){div=this.getDiv();if(!(comp instanceof Acm.AnchorCell)&&div){div.removeChild(div.firstChild);}}
Acm.ListBoxCell.parent.addComponent.call(this,comp);return comp;};_AcmListBoxCell.toHtml=function(arr,depth,hide){var a=['<td'];if(this._editable||this._comments.length>0){a[a.length]=' class="'+(this._comments.length>0?'cellComment ':'')+(this._editable?'cellEditable':'')+'"';}
a[a.length]='><div';if(hide){a[a.length]=' style="visibility: hidden;"';}
a[a.length]='>';arr[arr.length]=a.join('');arr[arr.length]=this._text||this._value||'&nbsp;';arr[arr.length]='</div></td>';};_AcmListBoxCell.getElement=function(){if(!this._element&&this._parentComponent){this._element=this._parentComponent.getCellElement(this.getCellIndex());}
return this._element;};_AcmListBoxCell.getDiv=function(){var ele=this.getElement();if(ele){return ele.firstChild;}};_AcmListBoxCell.getTextNode=function(test){var ele=this.getElement();var div=ele.firstChild;if(!div.firstChild){div.innerHtml="&nbsp;";}
return div.firstChild;};_AcmListBoxCell.getTextBox=function(){return this._textBox;};_AcmListBoxCell.getListBox=function(){if(this._parentComponent){return this._parentComponent._listBox;}};_AcmListBoxCell.scrollIntoView=function(){this.getElement();var listBox=this.getListBox();var rg=listBox.getRowGroup();var top=this._element.offsetTop-(this.getListBox()._thead.getPixelHeight()+this.getListBox()._element.scrollTop);var headerHeight=listBox._thead.getPixelHeight();if(top<0){listBox._element.scrollTop=this._element.offsetTop-(headerHeight+this.getPixelHeight());}
var visibleHeight=listBox._element.clientHeight-headerHeight;var height=visibleHeight+this.getListBox()._element.scrollTop;if(height<this._element.offsetTop-this.getPixelHeight()){listBox._element.scrollTop=this._element.offsetTop-(visibleHeight-headerHeight);}};_AcmListBoxCell.setHighlight=function(b){this.toggleClassName('acmListBoxCellHighlight',b);};_AcmListBoxCell.setSelected=function(b){this.toggleClassName('acmListBoxCellSelected',b);this._selected=b;};_AcmListBoxCell.getSelected=function(){return this._selected;};_AcmListBoxCell.getCellIndex=function(){return Acm.Array.indexOf(this._parentComponent._children,this);};_AcmListBoxCell.getColumn=function(){var listBox=this.getListBox();return listBox.getColumn(this.getCellIndex());};_AcmListBoxCell.getRow=function(){return this._parentComponent;};_AcmListBoxCell.getRowIndex=function(){return this._parentComponent.getIndex();};_AcmListBoxCell.setEdit=function(b){var tmpAddToElement;var t;var value;if(b==true&&this._edit!=true){this.getDiv().style.display='none';tmpAddToElement=this._addToElement;this._addToElement=null;t=this._textBox=this.addComponent(new Acm.TextBox());t.setValue(this.getValue()||'');this._addToElement=tmpAddToElement;t.setClassName('acmLabel');try{t._element.focus();}catch(e){}
this.addEventListener('blurred',this._onBlur);this._edit=true;}else if(b==false&&this._edit===true){value=this.getTextBox().getValue();this.deleteComponent(this._textBox);this.getDiv().innerHTML='&nbsp;';this.getDiv().style.display='block';this._edit=false;this.setValue(value);this.removeEventListener('blurred',this._onBlur);}};_AcmListBoxCell.getEdit=function(){return this._edit;};_AcmListBoxCell.setEditable=function(b){this._editable=b;};_AcmListBoxCell.getEditable=function(){return this._editable;};_AcmListBoxCell.getTextOnFocus=function(){return this._text;};_AcmListBoxCell.setValue=function(value){var a;if(this._edit){this.getTextBox().setValue(value);}else if(this._text==null){a=this.getTextNode(1);if(a){a.nodeValue=value?value:"\u00A0";}}
Acm.ListBoxCell.parent.setValue.call(this,value);};_AcmListBoxCell.getValue=function(){if(this._edit){return this.getTextBox().getValue();}else{return Acm.ListBoxCell.parent.getValue.call(this);}};_AcmListBoxCell.setText=function(text){var a;if(this.getDiv()){a=this.getTextNode(1);if(a){a.nodeValue=text?text:"\u00A0";}
a=null;}
this._text=text;};_AcmListBoxCell.getText=function(){if(this._edit){return this.getTextBox().getValue();}else{return this._text;}};_AcmListBoxCell.setFocus=function(focus,showFocus){if(focus){this._textOnFocus=this.getText();}
Acm.Label.parent.setFocus.call(this,focus,showFocus);if(this._edit){}};_AcmListBoxCell.selectAll=function(){if(this._edit){this.getTextBox().selectAll();}};_AcmListBoxCell._onBlur=function(e){if(this.getValue()!=this._textOnFocus){this.dispatchEvent(new Acm.FormFieldEvent('textChange'));}
if(this._edit){}};Acm.AnchorCell=function(){Acm.ListBoxCell.call(this);};var _AcmAnchorCell=Acm.extend('AnchorCell','ListBoxCell');_AcmAnchorCell._anchorImage=null;_AcmAnchorCell._anchorState=null;_AcmAnchorCell._comments=null;_AcmAnchorCell.createPrototype=function(){var o=Acm.AnchorCell.parent.createPrototype.call(this);o.setStyleProperty('padding','0px');o.setClassName('acmLabel acmListBoxAnchorCell');var img=this._container.createElement('IMG');img.style.height='20px';img.style.width='20px';img.src=this.getPath()+'img/tree/blank.gif';img.style.verticalAlign='middle';var div=o._element.firstChild;div.insertBefore(img,div.firstChild);o._anchorImage=img;return o;};_AcmAnchorCell.create=function(){Acm.AnchorCell.parent.create.call(this);this._anchorImage=this._element.firstChild.firstChild;this.setToolTipEvents(true);this.addEventListener("showToolTip",this._onShowToolTip);this.addEventListener("hideToolTip",this._onHideToolTip);};_AcmAnchorCell.dispose=function(){if(this._disposed){return;}
Acm.AnchorCell.parent.dispose.call(this);this._comments=null;};_AcmAnchorCell.addComponent=function(comp){if(!this._addToElement){this._addToElement=this.getElement().firstChild;}
return Acm.ListBoxCell.parent.addComponent.call(this,comp);};_AcmAnchorCell.getTextNode=function(){return this._element.firstChild.firstChild.nextSibling;};_AcmAnchorCell.getImg=function(){return this.getElement().firstChild.firstChild;};_AcmAnchorCell.toHtml=function(arr,depth){var row=this._parentComponent;if(this.getComments()){arr[arr.length]='<td class="cellCommentRow acmListBoxAnchorCell" style="padding-left: '+(16*depth)+'px;"><div><img src="'+this.getPath()+'img/tree/'+(row._childRows?(row._expanded?'minus':'plus'):'blank')+'.gif" style="width: 20px; height: 20px;" align="absmiddle">';}else{arr[arr.length]='<td class="acmListBoxAnchorCell" style="padding-left: '+(16*depth)+'px;"><div><img src="'+this.getPath()+'img/tree/'+(row._childRows?(row._expanded?'minus':'plus'):'blank')+'.gif" style="width: 20px; height: 20px;" align="absmiddle">';}
arr[arr.length]=this._text||this._value;arr[arr.length]='</div></td>';};_AcmAnchorCell.setAnchor=function(state){if(!this._busy){this.getImg().src=this.getPath()+'img/tree/'+state+'.gif';}
this._anchorState=state;};_AcmAnchorCell.getAnchor=function(){return this._anchorState;};_AcmAnchorCell.setBusy=function(busy){this._busy=busy;if(busy){this.getImg().src=this.getPath()+'img/tree/busy-20.gif';}else{this.setAnchor(this._anchorState);}};_AcmAnchorCell.getBusy=function(){return this._busy;};_AcmAnchorCell.setComments=function(comments){alert("setComments + "+comments);if(typeof(comments)=="string"||typeof(comments)=="number"){comments=String(comments);if(comments==""){return;}
var arrWithComments=comments.split(' ');this._comments=arrWithComments;this.setCommentIndicators();}};_AcmAnchorCell.getComments=function(){if(typeof(this._comments)=="string"||typeof(this._comments)=="number"){this._comments=String(this._comments);if(this._comments==""){return;}
var arrWithComments=this._comments.split(' ');this._comments=arrWithComments;}
return this._comments;};_AcmAnchorCell._onShowToolTip=function(e){var comments=this.getComments();if(comments&&comments.length>0){var toolTipString='';if(comments.length==1){this.getJson('index.php?input/comment/'+comments[0].toString(),function(o){toolTipString=o.data.commentText;var toolTip=new Acm.ToolTip(toolTipString);toolTip.setContainer(this.getContainer());toolTip.show();},this);}else{toolTipString=comments.length+' '+t_("comments");var toolTip=new Acm.ToolTip(toolTipString);toolTip.setContainer(this.getContainer());toolTip.show();}}};_AcmAnchorCell._onHideToolTip=function(){Acm.ToolTipManager.instance().hideToolTip();};Acm.Sheet=function(){Acm.ListBox.call(this);};var _AcmSheet=Acm.extend('Sheet','ListBox');_AcmSheet._enterDirection='down';_AcmSheet.dispose=function(){if(this._disposed){return;}
Acm.Sheet.parent.dispose.call(this);};_AcmSheet.create=function(){Acm.Sheet.parent.create.call(this);this.setSelectionMode('cell');this.addEventListener('focusChange',this._onFocusChange);this.addEventListener('dblclick',this._onDblClick);this._table.addClassName('acmSheet');};_AcmSheet.setEnterDirection=function(dir){this._enterDirection=dir;};_AcmSheet.getEnterDirection=function(){return this._enterDirection;};_AcmSheet._onDblClick=function(e){var cell=e.getDispatcher().getParentComponentByClass(Acm.SheetCell);if(cell&&cell.getEditable()&&!cell.getEdit()){this.getListBox().setAppendMode(true);cell.toggleTextBox();}};_AcmSheet._onKeyDown=function(e){var selectedItem=e.getDispatcher().getParentComponentByClass(Acm.ListBoxCell);var c=e.getKeyCode();var item;var cellIndex;var row;var nextRow;var clear;var rowIndex;if(c==Acm.KeyboardEvent.UP||c==Acm.KeyboardEvent.DOWN){e.preventDefault();}
if(this.getAppendMode()){if(c==Acm.KeyboardEvent.ENTER){selectedItem.toggleTextBox();if(selectedItem.getEdit()){return;}else{c=Acm.KeyboardEvent.DOWN;}}else{return;}}
if(selectedItem){switch(c){case Acm.KeyboardEvent.TAB:if(e.getShiftKey()){item=selectedItem.getPreviousSibling();}else{item=selectedItem.getNextSibling();}
break;case Acm.KeyboardEvent.LEFT:if(e.getCtrlKey()&&selectedItem.getRow().getChildRows()){selectedItem.getRow().setExpanded(false);}else if(selectedItem.getPreviousSibling()){item=selectedItem.getPreviousSibling();}
break;case Acm.KeyboardEvent.RIGHT:if(e.getCtrlKey()&&selectedItem.getRow().getChildRows()){selectedItem.getRow().setExpanded(true);}else if(selectedItem.getNextSibling()){item=selectedItem.getNextSibling();}
break;case Acm.KeyboardEvent.ESC:if(selectedItem.getEdit()){selectedItem.setValue(selectedItem._value);selectedItem.setEdit(false);}
break;default:if(c==Acm.KeyboardEvent.UP||c==Acm.KeyboardEvent.DOWN){cellIndex=Acm.Array.indexOf(selectedItem._parentComponent.getCells(),selectedItem);row=selectedItem.getRow();row=(c==Acm.KeyboardEvent.UP)?this.getRowBefore(row):this.getRowAfter(row);if(row){item=row.getCell(cellIndex);}
if(item){item.scrollIntoView();}}else if(c==Acm.KeyboardEvent.ENTER&&!e.getShiftKey()){cellIndex=Acm.Array.indexOf(selectedItem._parentComponent.getCells(),selectedItem);if(this._enterDirection=='down'){nextRow=this.getRowAfter(selectedItem.getRow());if(nextRow){item=nextRow.getCell(cellIndex);}}else{item=selectedItem.getNextSibling();if(!item){nextRow=this.getRowAfter(selectedItem.getRow());if(nextRow){item=nextRow._children[0];}}}}else if(c==Acm.KeyboardEvent.ENTER){if(e.getShiftKey()&&(selectedItem.getEditable()||selectedItem.getColumn().getEditable())){selectedItem.toggleTextBox();}else if(selectedItem.getEdit()){cellIndex=Acm.Array.indexOf(selectedItem._parentComponent.getCells(),selectedItem);rowIndex=Acm.Array.indexOf(this._rowGroup._children,selectedItem._parentComponent);rowIndex++;if(rowIndex<=this._rowGroup._children.length){item=this._rowGroup._children[rowIndex].getCell(cellIndex);}}
return true;}else if(e.getCtrlKey()&&c==67){if(Acm.Browser.isIe){window.clipboardData.setData('Text',selectedItem.getValue());}}else if(!selectedItem.getEdit()&&((c>=48&&c<=57)||(c>=96&&c<=105)||c==Acm.KeyboardEvent.F2||c==86||c==67||c==Acm.KeyboardEvent.NUMPAD_MINUS||c==Acm.KeyboardEvent.MINUS||c==46||c==189)){var edit=false;if(selectedItem.getEditable()!==null){edit=selectedItem.getEditable();}else if(selectedItem.getColumn().getEditable()){edit=true;}
if(edit){var clearVal=c==Acm.KeyboardEvent.F2?false:true;selectedItem.toggleTextBox(clearVal);}
return true;}
break;}
if(item){if(!this.getMultipleSelection()||!e.getShiftKey()){this._selectionManager.deselectAll();}
this._selectionManager.select(item);item.setFocus(true);}}};_AcmSheet._onFocusChange=function(e){var c=e.getPrevFocused();if(c&&!(e.getNewFocused()instanceof Acm.TextBox)&&(c=c.getParentComponentByClass(Acm.SheetCell))&&c.getEdit()){c._onBlur(e);c.toggleTextBox();}};Acm.SheetRow=function(){this._children=[];};var _AcmSheetRow=Acm.extend('SheetRow','ListBoxRow');_AcmSheetRow.dispose=function(){if(this._disposed){return;}
Acm.SheetRow.parent.dispose.call(this);this._listBox=null;this._editable=null;};_AcmSheetRow.create=function(){Acm.SheetRow.parent.create.call(this);};Acm.SheetColumn=function(){Acm.ListBoxColumn.call(this);};var _AcmSheetColumn=Acm.extend('SheetColumn','ListBoxColumn');_AcmSheetColumn.dispose=function(){if(this._disposed){return;}
Acm.SheetColumn.parent.dispose.call(this);this._listBox=null;this._editable=null;};_AcmSheetColumn.create=function(){Acm.SheetColumn.parent.create.call(this);};_AcmSheetColumn.setEditable=function(editable){this._editable=editable;};_AcmSheetColumn.getEditable=function(){return this._editable;};_AcmSheetColumn.getTargetTable=function(){return this._targetTable;};_AcmSheetColumn.setTargetTable=function(targetTable){this._targetTable=targetTable;};_AcmSheetColumn.getTargetContext=function(){return this._targetContext;};_AcmSheetColumn.setTargetContext=function(targetContext){this._targetContext=targetContext;};Acm.SheetCell=function(){};var _AcmSheetCell=Acm.extend('SheetCell','ListBoxCell');_AcmSheetCell.dispose=function(){if(this._disposed){return;}
Acm.SheetCell.parent.dispose.call(this);};_AcmSheetCell.getEditable=function(){if(this._editable===null){if(this.getColumn()){return this.getColumn().getEditable();}}else{return this._editable;}
return false;};_AcmSheetCell.toggleTextBox=function(clear){if(!this.getEditable()){this.setFocus(true);}
this.setEdit(!this.getEdit());if(this.getEdit()){if(clear){this.selectAll();this.getTextBox().setValue('');}else{this.getListBox().setAppendMode(true);}}else{this.getListBox().setAppendMode(false);}};Acm.DropBox=function(){Acm.Component.call(this);};var _AcmDropBox=Acm.extend('DropBox','Component');_AcmDropBox._listBox=null;_AcmDropBox._addButton=null;_AcmDropBox._removeButton=null;_AcmDropBox.dispose=function(){if(this._disposed){return;}
Acm.DropBox.parent.dispose.call(this);this._listBox=null;this._addButton=null;this._removeButton=null;};_AcmDropBox.create=function(){Acm.DropBox.parent.create.call(this);var buttons=Acm.DropBox.parent.addComponent.call(this,new Acm.Component());buttons.setStyle('position: relative; float: right; margin-left: 5px;');this._addButton=buttons.addComponent(new Acm.Button('+'));var button=this._addButton;button.addEventListener('action',this._onAddButtonAction,this);button.setWidth(21);button.setStyleProperty('padding','2px');button.setPosition(null,0,1);this._removeButton=buttons.addComponent(new Acm.Button('-'));button=this._removeButton;button.addEventListener('action',this._onRemoveButtonAction,this);button.setWidth(21);button.setStyleProperty('padding','2px');button.setPosition(null,0,21);this._listBox=Acm.DropBox.parent.addComponent.call(this,new Acm.ListBox());var listBox=this._listBox;listBox.setMultipleSelection(true);listBox.setHeight('100%');listBox.addEventListener('drop',this._onListBoxDrop,this);this.setHeight(50);};_AcmDropBox.addComponent=function(oComp){if(oComp instanceof Acm.ListBoxRow||oComp instanceof Acm.ListBoxHeader||oComp instanceof Acm.ListBoxColumn){return this._listBox.addComponent(oComp);}
return oComp;};_AcmDropBox.setShowHeader=function(b){this._listBox.setShowHeader(b);};_AcmDropBox.getShowHeader=function(){return this._listBox.getShowHeader();};_AcmDropBox.setHeight=function(h){if(h<50){h=50;}
Acm.DropBox.parent.setHeight.call(this,h);};_AcmDropBox.getValue=function(){return this._listBox.getValue();};_AcmDropBox._onAddButtonAction=function(e){this.dispatchEvent(new Acm.Event('addButtonAction',e));};_AcmDropBox._onRemoveButtonAction=function(e){var items=this._listBox.getSelectionManager().getSelectedItems();if(items){for(var i=0;i<items.length;i++){this._listBox.deleteComponent(items[i]);}}};_AcmDropBox._onListBoxDrop=function(e){e.stopPropagation();};Acm.ProgressBar=function(){Acm.Component.call(this);};var _AcmProgressBar=Acm.extend('ProgressBar','Component');_AcmProgressBar._progress=null;_AcmProgressBar.dispose=function(){if(this._disposed){return;}
Acm.ProgressBar.parent.dispose.call(this);this._progress=null;};_AcmProgressBar.create=function(){Acm.ProgressBar.parent.create.call(this);this.setHeight(18);this.setClassName('acmProgressBar');this._progress=this.addComponent(new Acm.Component());var progress=this._progress;progress.setClassName('acmProgressBarProgress');progress.setHeight(16);};_AcmProgressBar.setProgress=function(percentFloat){this._progress.setWidth(percentFloat+'%');};Acm.UnterminatedProgressBar=function(){Acm.ProgressBar.call(this);};var _AcmUnterminatedProgressBar=Acm.extend('UnterminatedProgressBar','ProgressBar');_AcmUnterminatedProgressBar._timer=null;_AcmUnterminatedProgressBar._progressWidth=0;_AcmUnterminatedProgressBar._floatLeft=true;_AcmUnterminatedProgressBar._widthInterval=-1;_AcmUnterminatedProgressBar.dispose=function(){if(this._disposed){return;}
Acm.UnterminatedProgressBar.parent.dispose.call(this);this._timer=null;this._progressWidth=null;this._floatLeft=null;this._widthInterval=null;};_AcmUnterminatedProgressBar.create=function(){Acm.UnterminatedProgressBar.parent.create.call(this);this._timer=new Acm.Timer();this._timer.setInterval(30);this._timer.addEventListener('timeout',this._onTimerTimeout,this);};_AcmUnterminatedProgressBar.start=function(){this._timer.start();};_AcmUnterminatedProgressBar.stop=function(){this._timer.stop();};_AcmUnterminatedProgressBar._onTimerTimeout=function(){if(parseInt(this._progressWidth,10)==100){this._progress.setStyleProperty(this._floatLeft?'right':'left','0px');this._progress.setStyleProperty(this._floatLeft?'left':'right',null);this._floatLeft=!this._floatLeft;this._widthInterval*=-1;}else if(parseInt(this._progressWidth,10)===0){this._widthInterval*=-1;}
this._progressWidth+=this._widthInterval;this._progress.setWidth(this._progressWidth+'%');};Acm.SplitPane=function(){Acm.Component.call(this);};var _AcmSplitPane=Acm.extend('SplitPane','Component');_AcmSplitPane._leftComponent=null;_AcmSplitPane._rightComponent=null;_AcmSplitPane._leftVisible=true;_AcmSplitPane._rightVisible=true;_AcmSplitPane._addComponentProgress=null;_AcmSplitPane._orientation='vertical';_AcmSplitPane._divider=null;_AcmSplitPane._dividerWidth=6;_AcmSplitPane._dividerPosition=100;_AcmSplitPane._liveResize=true;_AcmSplitPane._canHaveFocus=false;_AcmSplitPane.dispose=function(){if(this._disposed){return;}
Acm.SplitPane.parent.dispose.call(this);this._leftComponent=null;this._rightComponent=null;this._addComponentProgress=null;this._orientation=null;this._divider=null;this._dividerWidth=null;this._dividerPosition=null;this._liveResize=null;};_AcmSplitPane.create=function(cLeft,cRight){Acm.SplitPane.parent.create.call(this);this.setClassName('acmSplitPane');this._divider=Acm.SplitPane.parent.addComponent.call(this,new Acm.Component());var divider=this._divider;divider.setZIndex(1);divider.setClassName('acmSplitPaneDivider');divider.setWidth(this._dividerWidth);divider.setCanHaveFocus(false);divider.addEventListener('drag',this._onDividerDrag,this);divider.addEventListener('dragEnd',this._onDividerDragEnd,this);this.addEventListener('complete',this._onComplete,this);};_AcmSplitPane.addComponent=function(oComp){if(!this._addComponentProgress){this._addComponentProgress='right';return this.setLeftComponent(oComp);}else if(this._addComponentProgress=='right'){this._addComponentProgress=null;return this.setRightComponent(oComp);}};_AcmSplitPane._onDividerDrag=function(e){var pos=(this._orientation=='vertical')?e.getClientX()-this.getPageX():e.getClientY()-this.getPageY();if(this._liveResize){this.setDividerPosition(pos);}else{this._divider.setStyleProperty('backgroundImage','url('+application.getPath()+'img/raster.gif)');this._setDividerPosition(pos);}};_AcmSplitPane._onDividerDragEnd=function(e){if(this._liveResize){return;}
var pos=(this._orientation=='vertical')?e.getClientX()-this.getPageX():e.getClientY()-this.getPageY();this.setDividerPosition(pos);this._divider._element.style.backgroundImage='';this.ieLayoutComponents();};_AcmSplitPane._redraw=function(){var left=this._leftComponent;var right=this._rightComponent;if(!left||!right){return;}
if(!this._leftVisible){left.setStyleProperty('display','none');right.setPosition(0,0,0,0);right.setWidth(null);this._divider.setStyleProperty('display','none');}else if(!this._rightVisible){right.setStyleProperty('display','none');left.setPosition(0,0,0,0);left.setWidth(null);this._divider.setStyleProperty('display','none');}else{var divider=this._divider;divider.setStyleProperty('display','block');left.setStyleProperty('display','block');right.setStyleProperty('display','block');if(this._orientation=='vertical'){left.setPosition(0,null,0,0);left.resizeTo(this._dividerPosition,null);right.setPosition(this._dividerPosition+this._dividerWidth,0,0,0);divider.resizeTo(this._dividerWidth,null);divider.setPosition(this._dividerPosition,null,0,0);divider.setStyleProperty('cursor','w-resize');}else if(this._orientation=='horizontal'){left.setPosition(0,0,0,null);left.resizeTo(null,this._dividerPosition);right.setPosition(0,0,this._dividerPosition+this._dividerWidth,0);divider.resizeTo(null,this._dividerWidth);divider.setPosition(0,0,this._dividerPosition,null);divider.setStyleProperty('cursor','n-resize');}}
this.ieLayoutComponents();};_AcmSplitPane.setLeftComponent=function(oComp){if(this._leftComponent){this.deleteComponent(this._leftComponent);}
Acm.SplitPane.parent.addComponent.call(this,oComp);oComp.addClassName('acmSplitPaneComponent');this._leftComponent=oComp;this._redraw();return oComp;};_AcmSplitPane.getLeftComponent=function(){return this._leftComponent;};_AcmSplitPane.setRightComponent=function(oComp){if(this._rightComponent){this.deleteComponent(this._rightComponent);}
Acm.SplitPane.parent.addComponent.call(this,oComp);oComp.addClassName('acmSplitPaneComponent');this._rightComponent=oComp;this._redraw();return oComp;};_AcmSplitPane.getRightComponent=function(){return this._rightComponent;};_AcmSplitPane.setLeftVisible=function(b){this._leftVisible=b;this._redraw();};_AcmSplitPane.getLeftVisible=function(b){return this._leftVisible;};_AcmSplitPane.setRightVisible=function(b){this._rightVisible=b;this._redraw();};_AcmSplitPane.getRightVisible=function(b){return this._rightVisible;};_AcmSplitPane.setDividerPosition=function(iDividerPosition){iDividerPosition=parseInt(iDividerPosition,10);var d;if(this._leftComponent&&this._rightComponent){d=Math.round(this._dividerWidth/2);if(this._orientation=='vertical'){this._divider.setLeft(iDividerPosition-d);this._leftComponent.setWidth(iDividerPosition-d);this._rightComponent.setLeft(iDividerPosition+d);this.ieLayoutComponentsHorizontal();}else{this._divider.setTop(iDividerPosition-d);this._leftComponent.setHeight(iDividerPosition-d);this._rightComponent.setTop(iDividerPosition+d);this.ieLayoutComponentsVertical();}}
this._dividerPosition=iDividerPosition;};_AcmSplitPane._setDividerPosition=function(iDividerPosition){var d=Math.round(this._dividerWidth/2);if(this._orientation=='vertical'){this._divider.setLeft(iDividerPosition-d);}else{this._divider.setTop(iDividerPosition-d);}};_AcmSplitPane.getDividerPosition=function(){return this._dividerPosition;};_AcmSplitPane.setDividerWidth=function(iWidth){if(typeof(iWidth)=='number'){this._dividerWidth=iWidth;}};_AcmSplitPane.setOrientation=function(sOrientation){var pos;if(this._leftComponent&&this._rightComponent&&sOrientation!=this._orientation){if(this._orientation=='vertical'){pos=this.getDividerPosition()/this.getPixelWidth();pos=Math.round(pos*this.getPixelHeight());}else if(this._orientation=='horizontal'){pos=this.getDividerPosition()/this.getPixelHeight();pos=Math.round(pos*this.getPixelWidth());}
this._dividerPosition=pos;this._orientation=sOrientation;this._redraw();}else{this._orientation=sOrientation;}};_AcmSplitPane.getOrientation=function(){return this._orientation;};_AcmSplitPane.setLiveResize=function(bLiveResize){this._liveResize=bLiveResize;};_AcmSplitPane._onComplete=function(){this.setOrientation(this._orientation);};Acm.TabPane=function(){Acm.Component.call(this);this._tabPages=[];};var _AcmTabPane=Acm.extend('TabPane','Component');_AcmTabPane._tabPages=null;_AcmTabPane._tabBar=null;_AcmTabPane._canHaveFocus=true;_AcmTabPane.dispose=function(){if(this._disposed){return;}
Acm.TabPane.parent.dispose.call(this);for(var i=0,a=this._tabPages,l=a.length;i<l;i++){if(!a[i]._disposed){a[i].dispose();}}
this._tabPages=null;this._tabBar=null;};_AcmTabPane.create=function(){Acm.TabPane.parent.create.call(this);this.setClassName('acmTabPane');this._tabBar=this.addComponent(new Acm.TabBar());this._tabBar.addEventListener('change',this._onTabBarChange,this);this._toolBar=this.addComponent(new Acm.ToolBar());this._toolBar.setStyle('position: absolute; right: 0px; z-index: 1');this.addEventListener('keydown',this._onKeyDown,this);};_AcmTabPane.addComponent=function(oComp){if(oComp instanceof Acm.TabPage){this._tabPages.push(oComp);Acm.TabPane.parent.addComponent.call(this,oComp);oComp._tabPane=this;this._tabBar.addComponent(oComp._tabButton);if(this._tabPages.length==1||oComp.getSelected()){this.setSelectedTabPage(oComp);}
return oComp;}else if(oComp instanceof Acm.Button){return this._toolBar.addComponent(oComp);}else{return Acm.TabPane.parent.addComponent.call(this,oComp);}};_AcmTabPane.removeComponent=function(oComp){if(oComp instanceof Acm.TabPage){this._tabBar.deleteComponent(oComp._tabButton);Acm.Array.remove(this._tabPages,oComp);Acm.TabPane.parent.removeComponent.call(this,oComp);}};_AcmTabPane.setSelectedIndex=function(i){return this._tabBar.setSelectedIndex(i);};_AcmTabPane.getSelectedIndex=function(){return this._tabBar.getSelectedIndex();};_AcmTabPane.getSelectedTabPage=function(){return this._tabPages[this.getSelectedIndex()];};_AcmTabPane.setSelectedTabPage=function(oPage){this.setSelectedIndex(Acm.Array.indexOf(this._tabPages,oPage));};_AcmTabPane.getTabPageByIndex=function(i){return this._tabPages[i];};_AcmTabPane.getSelected=function(){return this._tabPages[this._tabBar.getSelectedIndex()]||false;};_AcmTabPane.setSelected=function(oTabPage){return this._tabBar.setSelected(oTabPage._tabButton);};_AcmTabPane._onTabBarChange=function(e){this.dispatchEvent(new Acm.Event('change'));};_AcmTabPane._onKeyDown=function(e){if(e.getKeyCode()==Acm.KeyboardEvent.TAB&&e.getCtrlKey()){var tabBar=this._tabBar;var selIndex=tabBar.getSelectedIndex();var len=tabBar._radioGroup.getItems().length-1;var i;if(e.getShiftKey()){i=tabBar.getSelectedIndex()-1;tabBar.setSelectedIndex(i<0?len:i);}else{i=tabBar.getSelectedIndex()+1;tabBar.setSelectedIndex(i>len?0:i);}
tabBar.setFocus(true);}};Acm.TabBar=function(){Acm.ToolBar.call(this);};var _AcmTabBar=Acm.extend('TabBar','ToolBar');_AcmTabBar._radioGroup=null;_AcmTabBar.dispose=function(){if(this._disposed){return;}
Acm.TabBar.parent.dispose.call(this);};_AcmTabBar.create=function(){Acm.TabBar.parent.create.call(this);this.setClassName('acmTabBar');this.setStyleProperty('width',700);this.setHeight(24);this.setPosition(0,null,0);this._radioGroup=new Acm.RadioGroup();this._radioGroup.addEventListener('change',this._onRadioGroupChange,this);this.addEventListener('focused',this._onFocus,this);};_AcmTabBar.addComponent=function(oComp){if(oComp instanceof Acm.TabButton){this._radioGroup.addItem(oComp);if(this._radioGroup._items.length==1){oComp.setStyle('border-left: #909090 1px solid; margin-left: 5px;');}}
return Acm.TabBar.parent.addComponent.call(this,oComp);};_AcmTabBar.removeComponent=function(comp){if(comp instanceof Acm.TabButton){this._radioGroup.removeItem(comp);}
return Acm.TabBar.parent.removeComponent.call(this,comp);};_AcmTabBar.getSelected=function(){return this._radioGroup.getSelected();};_AcmTabBar.setSelected=function(oComp){return this._radioGroup.setSelected(oComp);};_AcmTabBar.getSelectedIndex=function(){return this._radioGroup.getSelectedIndex();};_AcmTabBar.setSelectedIndex=function(index){return this._radioGroup.setSelectedIndex(index);};_AcmTabBar._onRadioGroupChange=function(){this.dispatchEvent(new Acm.Event('change'));};_AcmTabBar._onFocus=function(){if(this._radioGroup.getSelected()){this._radioGroup.getSelected().setFocus(true);}};Acm.TabButton=function(){Acm.ToggleButton.call(this);};var _AcmTabButton=Acm.extend('TabButton','RadioButton');_AcmTabButton._iconSize=16;_AcmTabButton.createPrototype=function(){var p=Acm.TabButton.parent.createPrototype.call(this);p.setClassName('acmLabel acmTabButtonNormal');return p;};_AcmTabButton.create=function(){Acm.TabButton.parent.create.call(this);};_AcmTabButton._makeHover=function(){};_AcmTabButton._makeNormal=function(){this.removeClassName('acmTabButtonActive');this.addClassName('acmTabButtonNormal');};_AcmTabButton._makeActive=function(){this.removeClassName('acmTabButtonNormal');this.addClassName('acmTabButtonActive');};Acm.TabPage=function(){Acm.Component.call(this);};var _AcmTabPage=Acm.extend('TabPage','Component');_AcmTabPage._tabButton=null;_AcmTabPage._tabPane=null;_AcmTabPage.dispose=function(){if(this._disposed){return;}
Acm.TabPage.parent.dispose.call(this);this._tabButton=null;this._tabPane=null;};_AcmTabPage.create=function(){Acm.TabPage.parent.create.call(this);this._tabButton=new Acm.TabButton();this._tabButton.setContainer(this.getContainer());this._tabButton.create();this._tabButton.addEventListener('change',this._onTabButtonChange,this);this.setClassName('acmTabPage');this.setPosition(0,0,23,0);};_AcmTabPage.setText=function(sText){this._tabButton.setText(sText);};_AcmTabPage.getText=function(sText){return this._tabButton.getText();};_AcmTabPage.setIcon=function(icon){this._tabButton.setIcon(icon);};_AcmTabPage.getIcon=function(){return this._tabButton.getIcon();};_AcmTabPage.getSelected=function(){return this._tabButton.getChecked();};_AcmTabPage.setSelected=function(bSelected){this._tabButton.setChecked(bSelected);};_AcmTabPage._onTabButtonChange=function(e){if(this._tabButton.getChecked()){this.setStyleProperty('display','block');}else{this.setStyleProperty('display','none');}
this.dispatchEvent(new Acm.Event("change"));};Acm.ActivityBar=function(){Acm.ToolBar.call(this);this._activities={};this._radioGroup=new Acm.RadioGroup();this._radioGroup.addEventListener('change',this._onRadioGroupChange,this);};var _p=Acm.extend('ActivityBar','ToolBar');_p._activities=null;_p._radioGroup=null;_p._windowManager=null;_p.dispose=function(){if(this._disposed){return;}
Acm.ActivityBar.parent.dispose.call(this);this._activities=null;this._radioGroup.dispose();this._radioGroup=null;this._windowManager=null;};_p.createPrototype=function(){var p=Acm.ActivityBar.parent.createPrototype.call(this);p.setClassName('acmActivityBar');return p;};_p.create=function(){Acm.ActivityBar.parent.create.call(this);};_p.setWindowManager=function(windowManager){windowManager.addEventListener('windowAdd',this._onWindowAdd,this);windowManager.addEventListener('windowRemove',this._onWindowRemove,this);windowManager.addEventListener('windowFocus',this._onWindowFocus,this);};_p._getButton=function(win){if(this._children){for(var i=0,button,a=this._children,l=a.length;i<l;i++){if(a[i]instanceof Acm.ActivityButton&&a[i].getWindow()==win){return a[i];}}}};_p._onWindowAdd=function(e){var win=e.getComponent();var button=this.addComponent(new Acm.ActivityButton(win.getTitle()));button.setWindow(win);if(win.getIcon()){button.setIcon(win.getIcon().getSrc());}
this._radioGroup.addItem(button);this._radioGroup.setSelected(button);};_p._onWindowRemove=function(e){var button=this._getButton(e.getComponent());if(button){this._radioGroup.removeItem(button);this.deleteComponent(button);}};_p._onWindowFocus=function(e){var button=this._getButton(e.getComponent());this._radioGroup.setSelected(button);};_p._onRadioGroupChange=function(e){var button=this._radioGroup.getSelected();if(!button){return;}
if(button.getWindow().containsFocus()){return;}
button.getWindow().focus();};Acm.ActivityButton=function(text,icon){Acm.ToggleButton.call(this,text,icon);this.addEventListener('action',this._onButtonAction,this);};_p=Acm.extend('ActivityButton','ToggleButton');_p._window=null;_p.dispose=function(){if(this._disposed){return;}
Acm.ActivityButton.parent.dispose.call(this);this._window=null;};_p.createPrototype=function(){var p=Acm.ActivityButton.parent.createPrototype.call(this);p.addClassName('acmActivityButton');return p;};_p.create=function(){Acm.ActivityButton.parent.create.call(this);var cm=this.setContextMenu(new Acm.Menu());var item=cm.addComponent(new Acm.MenuItem(t_("Restore")));item.setIcon(application.getPath()+'img/window/restore.gif');item.addEventListener('action',this._onRestoreAction,this);item=cm.addComponent(new Acm.MenuItem(t_("Maximize")));item.setIcon(application.getPath()+'img/window/maximize.gif');item.addEventListener('action',this._onMaximizeAction,this);item=cm.addComponent(new Acm.MenuItem(t_("Minimize")));item.setIcon(application.getPath()+'img/window/minimize.gif');item.addEventListener('action',this._onMinimizeAction,this);cm.addComponent(new Acm.MenuSpacer());item=cm.addComponent(new Acm.MenuItem(t_("Close")));item.setIcon(application.getPath()+'img/window/close.gif');item.addEventListener('action',this._onCloseAction,this);};_p.setWindow=function(window){window.addEventListener('minimize',this._onWindowMinimize,this);this._window=window;};_p.getWindow=function(){return this._window;};_p._onWindowMinimize=function(){this.setChecked(false);};_p._onButtonAction=function(){if(!this.getChecked()){this._window.setState('minimized');}else{this._window.setState('restored');}};_p._onRestoreAction=function(){this._window.setState('restored');};_p._onMaximizeAction=function(){this._window.setState('maximized');};_p._onMinimizeAction=function(){this._window.setState('minimized');};_p._onCloseAction=function(){this._window.close();};Acm.ErrorWindow=function(friendlyInfo,verboseInfo){Acm.Window.call(this);this.friendlyInfo=friendlyInfo;this.verboseInfo=verboseInfo;};var _AcmErrorWindow=Acm.extend('Acm.ErrorWindow','Acm.Window');_AcmErrorWindow._tabPane=null;_AcmErrorWindow._friendlyTab=null;_AcmErrorWindow._verboseTab=null;_AcmErrorWindow._friendlyComp=null;_AcmErrorWindow._verboseComp=null;_AcmErrorWindow.create=function(){Acm.ErrorWindow.parent.create.call(this);if(!this.getTitle()){this.setTitle(t_("An error occurred"));}
this._tabPane=this.addComponent(new Acm.TabPane());var tp=this._tabPane;tp.setStyle("top:10; left:10; bottom:10; right:10;");this._friendlyTab=tp.addComponent(new Acm.TabPage());var ft=this._friendlyTab;ft.setText(t_("Error Message"));this._verboseTab=tp.addComponent(new Acm.TabPage());var vt=this._verboseTab;vt.setText(t_("Details"));this._friendlyComp=ft.addComponent(new Acm.Component());var fc=this._friendlyComp;fc.setStyle("padding:10px;");fc.setTextSelectable(true);this._verboseComp=vt.addComponent(new Acm.Component());var vc=this._verboseComp;vc.setStyle("padding:10px; overflow:auto; position:absolute; top:0px; left:0px; right:0px; bottom:0px;");vc.setTextSelectable(true);fc.setText(this.friendlyInfo);vc.setInnerHtml(this.verboseInfo);this.ieLayoutComponents();};_AcmErrorWindow.setFriendlyInfo=function(v){this.friendlyInfo=v;}
_AcmErrorWindow.setVerboseInfo=function(v){this.verboseInfo=v;}
Acm.DesktopPane=function(){Acm.Component.call(this);this._windowManager=new Acm.WindowManager(this);};var _AcmDesktopPane=Acm.extend('DesktopPane','Component');_AcmDesktopPane.dispose=function(){if(this._disposed){return;}
Acm.DesktopPane.parent.dispose.call(this);this._windowManager.dispose();this._windowManager=null;};_AcmDesktopPane.createPrototype=function(){var p=Acm.DesktopPane.parent.createPrototype.call(this);p.setClassName('acmDesktopPane');return p;};_AcmDesktopPane.create=function(){Acm.DesktopPane.parent.create.call(this);this.setShowFocus(false);};_AcmDesktopPane.addComponent=function(oComp){if(oComp instanceof Acm.Window){this._windowManager.addWindow(oComp);return oComp;}else if(oComp instanceof Acm.ActivityBar){oComp.setWindowManager(this._windowManager);}
Acm.Component.prototype.addComponent.call(this,oComp);return oComp;};_AcmDesktopPane.setWallpaper=function(url){var width;if(screen.width<=800){width=800;}
if(screen.width<=1024){width=1024;}else if(screen.width<=1280){width=1280;}else if(screen.width<=1600){width=1600;}else if(screen.width<=1680){width=1680;}
this.setStyleProperty('background','url('+url+'-'+width+'.jpg) fixed center center');};_AcmDesktopPane.setWindowManager=function(oWindowManager){this._windowManager=oWindowManager;};_AcmDesktopPane.getWindowManager=function(){return this._windowManager;};var Eos={};Eos.Application=function(path,controllerPath){if(typeof path=='undefined'){path='scripts/tk/acmtk/';}
if(typeof controllerPath=='undefined'){controllerPath='';}
Acm.Application.call(this,path,controllerPath);this.addNamespace('Eos','http://hypergene.com/eostk');};var _EosApplication=Acm.extend('Eos.Application','Acm.Application');function dirtylog(v,doAlert,clear){if(!document.getElementById("dirtylogger")){var dl=document.createElement("TEXTAREA");dl.style.top="0px";dl.style.right="0px";dl.style.width="400px";dl.style.height="300px";dl.id="dirtylogger";dl.style.backgroundColor='white';dl.style.border="1px solid #909090";var dv=document.createElement("DIV");dv.style.top="0px";dv.style.right="0px";dv.style.width="400px";dv.style.height="330px";dv.style.overflow="auto";dv.style.position="absolute";dv.style.backgroundColor="white";dv.id="dirtyloggerdiv";dv.style.zIndex=200;dv.appendChild(dl);var html='<input type="button" onclick="dirtyselect();" value="select">';html+='<input type="button" onclick="dirtyclear();" value="clear">';html+='<input type="button" onclick="dirtyremove();" value="close">';dv.innerHTML+=html;document.body.appendChild(dv);}
if(clear){document.getElementById("dirtylogger").value=v+"\n";}else{document.getElementById("dirtylogger").value+=v+"\n";}
if(doAlert){alert("Break:\n"+v);}}
var dl=dirtylog;function dirtyfocus(){document.getElementById("dirtylogger").focus();}
function dirtyselect(){document.getElementById("dirtylogger").select();}
function dirtyclear(){if(document.getElementById("dirtylogger")){document.getElementById("dirtylogger").value="";}}
function dirtyremove(){document.body.removeChild(document.getElementById("dirtyloggerdiv"));}
Eos.ListBoxFactory=function(){};Eos.ListBoxFactory.prototype.createListBox=function(ownerElement,columns){var lb=ownerElement.addComponent(new Acm.ListBox());var lbh=lb.addComponent(new Acm.ListBoxHeader());for(var i in columns){lb.addComponent(new Acm.ListBoxColumn());var lbhb=lbh.addComponent(new Acm.ListBoxHeaderButton());if(typeof(columns[i])=='string'){lbhb.setText(columns[i]);}else if(typeof(columns[i])=='object'){lbhb.setText(columns[i].title);lbhb.setWidth(columns[i].width);}}
return lb;};Eos.NodeChooser=function(){Acm.Component.call(this);};var _EosNodeChooser=Acm.extend('Eos.NodeChooser','Acm.Component');_EosNodeChooser._maxNodes=null;_EosNodeChooser._rootNodeId='$0';_EosNodeChooser._lazyBehaviour=false;_EosNodeChooser._icon='img/node/tree/user-16.png';_EosNodeChooser.create=function(){Eos.NodeChooser.parent.create.call(this);this.setClassName('eosNodeChooser');this._listBox=this.addComponent(new Acm.ListBox());var c=this._listBox;c.setId('listBox');c._element.setAttribute('id','pane');c.addEventListener('drop',this._onDrop,this);var plus=this.addComponent(new Acm.Button('+'));plus.setPosition(null,0,0,null);plus.addEventListener('action',this._onPlusAction,this);var minus=this.addComponent(new Acm.Button('-'));minus.setPosition(null,0,20,null);minus.addEventListener('action',this._onMinusAction,this);};_EosNodeChooser.addComponent=function(comp){if(comp instanceof Eos.Node){if(this._lazyBehaviour&&this._listBox.getChildRows().length&&this._maxNodes==1){this._listBox.removeComponent(this._listBox.getChildRow(0));}
if(this._maxNodes!==null&&this._listBox.getChildRows().length>=this._maxNodes){return false;}
var row=this._listBox.addComponent(new Acm.ListBoxRow());var cell=row.addComponent(new Acm.ListBoxCell());cell.addComponent(comp);return comp;}else{return Eos.NodeChooser.parent.addComponent.call(this,comp);}};_EosNodeChooser.getValue=function(){var nodes=[];for(var i=0,a=this._listBox.getChildRows(),l=a.length;i<l;i++){var node=a[i]._children[0]._children[0];nodes.push(node.getNodeId());}
return nodes.join(',');};_EosNodeChooser.getFirstNode=function(){if(!this._listBox.getChildRows().length){return false;}
return this._listBox.getChildRow(0)._children[0]._children[0];};_EosNodeChooser.deleteSelected=function(){if(this._lazyBehaviour&&this._listBox.getChildRows().length&&this._maxNodes==1){this._listBox.removeComponent(this._listBox.getChildRow(0));return;}
var selected=this._listBox.getSelectionManager().getSelectedItems();while(selected[0]){this._listBox.deleteComponent(selected[0]);}};_EosNodeChooser.setRootNodeId=function(id){this._rootNodeId=id;};_EosNodeChooser.getRootNodeId=function(){return this._rootNodeId;};_EosNodeChooser.setMaxNodes=function(num){this._maxNodes=num;};_EosNodeChooser.getMaxNodes=function(){return this._maxNodes;};_EosNodeChooser.setLazyBehaviour=function(v){this._lazyBehaviour=v;};_EosNodeChooser.getLazyBehaviour=function(v){return this._lazyBehaviour;};_EosNodeChooser.setIcon=function(v){this._icon=v;};_EosNodeChooser.getIcon=function(v){return this._icon;};_EosNodeChooser._onDrop=function(e){var comp=e.getComponent();if(comp instanceof Acm.AnchorCell){var node=new Eos.Node();node.setNodeId(comp._parentComponent.getId());node.setTitle(comp.getText());if(this.addComponent(node)){node.setIcon(this._icon);}}};_EosNodeChooser._onPlusAction=function(e){this.sendXmlRequest(application.getControllerPath()+'?node/tree/browse/'+this._rootNodeId);};_EosNodeChooser._onMinusAction=function(e){this.deleteSelected();};Eos.ErrorWindow=function(friendlyInfo,verboseInfo){Acm.Window.call(this);this.friendlyInfo=friendlyInfo;this.verboseInfo=verboseInfo;};var _EosErrorWindow=Acm.extend('Eos.ErrorWindow','Acm.Window');_EosErrorWindow.tabPane=null;_EosErrorWindow.friendlyTab=null;_EosErrorWindow.verboseTab=null;_EosErrorWindow.friendlyComp=null;_EosErrorWindow.verboseComp=null;_EosErrorWindow.create=function(){Eos.ErrorWindow.parent.create.call(this);this.setTitle(t_("An error occurred"));this.tabPane=this.addComponent(new Acm.TabPane());var tp=this.tabPane;tp.setStyle("top:10; left:10; bottom:10; right:10;");this.friendlyTab=tp.addComponent(new Acm.TabPage());var ft=this.friendlyTab;ft.setText(t_("Error Message"));this.verboseTab=tp.addComponent(new Acm.TabPage());var vt=this.verboseTab;vt.setText(t_("Details"));this.friendlyComp=ft.addComponent(new Acm.Component());var fc=this.friendlyComp;fc.setStyle("padding:10px;");this.verboseComp=vt.addComponent(new Acm.Component());var vc=this.verboseComp;vc.setStyle("padding:10px; overflow:auto; position:absolute; top:0px; left:0px; right:0px; bottom:0px;");fc.setText(this.friendlyInfo);vc.setInnerHtml(this.verboseInfo);};Eos.Json=function(rawString){this.rawString=rawString;this.evalJson();};Eos.Json.prototype.rawString="";Eos.Json.prototype.data={};Eos.Json.prototype.evalJson=function(){try{var o;eval("o = "+this.rawString);this.data=o;}catch(e){this.data=false;this.rawString=this.rawString.replace(/</g,"&lt;").replace(/>/g,"&gt;");desktop.addComponent(new Acm.ErrorWindow(t_("Failed to process data from the web server!"),t_("Unable to create JSON data structure.")+"<br><br>"+e.message+"<br><br>"+this.rawString));}};Eos.Node=function(nodeId,title,icon){Acm.Label.call(this);if(nodeId){this._nodeId=nodeId;}
if(title){this.setTitle(title);}
if(icon){this._icon=icon;}};var _EosNode=Acm.extend('Eos.Node','Acm.Label');_EosNode._nodeId=null;_EosNode.setNodeId=function(nodeId){this._nodeId=nodeId;};_EosNode.getNodeId=function(){return this._nodeId;};_EosNode.setTitle=_EosNode.setText;_EosNode.getTitle=_EosNode.getText;Eos.TableColumnList=function(){Acm.Window.call(this);};var _EosTableColumnList=Acm.extend("Eos.TableColumnList","Window");_EosTableColumnList.listBox=null;_EosTableColumnList.textBox=null;_EosTableColumnList.timer=null;_EosTableColumnList.setTableNode=function(tableNode){this.tableNode=tableNode;};_EosTableColumnList.setTableDBName=function(tableDBName){this.tableDBName=tableDBName;};_EosTableColumnList.create=function(){Eos.TableColumnList.parent.create.call(this);var self=this;this.setStyle('top: 70px; left: 70px;');this.resizeTo(600,300);var c=this.addComponent(new Acm.Component());c.setStyle("position:absolute; left:5px; top:5px; right:5px; height:130px;");var br=c.addComponent(new Acm.Button());br.setStyle("position:absolute; right:5px; top:0px;");br.setIcon("images/node/tree/arrow-refresh-small-16.png");br.setHover(true);br.setToolTip(t_("Refresh List"));br.addEventListener("action",function(e){self.getList();});this.listBox=Eos.ListBoxFactory.prototype.createListBox(this,[t_("Registration"),t_("DBName"),t_("Type"),t_("DBType"),t_("DimId"),t_("Dimension"),t_("Consolidation"),t_("Reducible")]);var lb=this.listBox;lb.setStyle("position: absolute; top:30px; left:0; right:0; bottom:40px;");self.addEventListener("complete",self.getList);};_EosTableColumnList.getList=function(){var self=this;var url='?admin/table/listColumns/'+self.tableNode+'/'+self.tableDBName;this.listBox.getJson(url,function(data){this.deleteAllRows();for(var r in data){var dRow=data[r];var row=this.addComponent(new Acm.ListBoxRow());row.setId(dRow[0]);var c=row.addComponent(new Acm.ListBoxCell());c.setText(dRow[1]);var dbName=dRow[2];var regName=dRow[3];c=row.addComponent(new Acm.ListBoxCell());c.setText(regName?regName:dbName);if(regName&&regName!=dbName){c._element.firstChild.style.color="red";}
var eosType=dRow[4];var dbType=dRow[5];var typeConv=dRow[6];c=row.addComponent(new Acm.ListBoxCell());c.setText(eosType);if(eosType!=typeConv){c._element.firstChild.style.color="red";}
c=row.addComponent(new Acm.ListBoxCell());c.setText(dbType);var dimId=dRow[7];var dimNode=dRow[8];var dimTitle=dRow[9];c=row.addComponent(new Acm.ListBoxCell());c.setText(dimId);if(dimId&&!dimNode){c._element.firstChild.style.color="red";}
c=row.addComponent(new Acm.ListBoxCell());c.setText(dimTitle);var cons=dRow[10];c=row.addComponent(new Acm.ListBoxCell());c.setText(cons);var red=dRow[11];c=row.addComponent(new Acm.ListBoxCell());c.setText(red);}});};_EosTableColumnList.getListTimeout=function(){var self=this;self.timer=new Acm.Timer();var timer=self.timer;timer.addEventListener('timeout',function(e){self.getList();self.timer.stop();});timer.setInterval(100);timer.start();};Eos.TableManager=function(){Acm.Window.call(this);};var _EosTableManager=Acm.extend("Eos.TableManager","Window");_EosTableManager.listBox=null;_EosTableManager.textBox=null;_EosTableManager.timer=null;_EosTableManager.create=function(){Eos.TableManager.parent.create.call(this);var self=this;this.setStyle('top: 70px; left: 70px;');this.resizeTo(800,500);var c=this.addComponent(new Acm.Component());c.setStyle("position:absolute; left:5px; top:5px; right:5px; height:130px;");var l=c.addComponent(new Acm.Label());l.setText(t_("Filter"));l.setStyle("margin-right:10px;");l.setIcon("images/node/tree/search3-16.png");this.textBox=c.addComponent(new Acm.TextBox());var tb=this.textBox;tb.setStyle("margin-right: 15px");tb.addEventListener("change",this.filterOutRows,this);var br=c.addComponent(new Acm.Button());br.setStyle("position:absolute; right:5px; top:0px;");br.setIcon("images/node/tree/arrow-refresh-small-16.png");br.setHover(true);br.setToolTip(t_("Refresh List"));br.addEventListener("action",function(e){self.getList();});this.listBox=Eos.ListBoxFactory.prototype.createListBox(this,[t_("Registered name"),t_("Database name"),t_("Description"),{title:t_("Edit"),width:'10%'}]);var lb=this.listBox;lb.setStyle("position: absolute; top:30px; left:0; right:0; bottom:40px;");this.getList();};_EosTableManager.getList=function(){var self=this;this.listBox.getJson('?admin/tableManager/getList',function(data){this.deleteAllRows();for(var r in data){var dRow=data[r];var row=this.addComponent(new Acm.ListBoxRow());row.setId(dRow[0]);var c=row.addComponent(new Acm.ListBoxCell());c.setId(dRow[0]+'_registration');c.setText(dRow[1]);c=row.addComponent(new Acm.ListBoxCell());c.setId(dRow[0]+'_databasename');c.setText(dRow[2]);c=row.addComponent(new Acm.ListBoxCell());c.setId(dRow[0]+'_description');c.setText(dRow[3]);c=row.addComponent(new Acm.ListBoxCell());c.setId(dRow[0]+'_editdescr');var editButton=c.addComponent(new Acm.Button());editButton.setIcon("images/pencil.png");editButton.setToolTip(t_("Edit Table registration"));editButton.setStyle("height:10px; margin:0; padding:0;");editButton.setHover(false);editButton.addEventListener("action",function(e){var tableNodeId=this._parentComponent.getRow().getId();desktop.sendXmlRequest(application.getControllerPath()+'?node/tree/'+tableNodeId);});row.addEventListener("dblclick",function(e){var regNameComp=this.getComponentById(this.getId()+'_registration');var dbNameComp=this.getComponentById(this.getId()+'_databasename');desktop.sendXmlRequest("?admin/table/viewOne/"+this.getId()+"/"+dbNameComp.getText()+"/"+regNameComp.getText());self.getListTimeout();});}
self.filterOutRows();self.textBox.setFocus(true,true);});};_EosTableManager.getListTimeout=function(){var self=this;self.timer=new Acm.Timer();var timer=self.timer;timer.addEventListener('timeout',function(e){self.getList();self.timer.stop();});timer.setInterval(100);timer.start();};_EosTableManager.getSelectedTableNodeId=function(){var row=this.listBox.getSelectedItems()[0];return row.getId();};_EosTableManager.filterOutRows=function(e){var val=this.textBox.getText().toLowerCase();var lb=this.listBox;var rows=lb.getChildRows();var row;var chars=val.split("");chars=MochiKit.Base.map(Acm.String.escapeRegexp,chars);var re=new RegExp(chars.join('.*'),"i");for(var i=0,numRows=rows.length;i<numRows;++i){row=rows[i];var cellText=row.getCell(0).getText().toLowerCase();if(cellText.indexOf(val)>-1||val===""||re.test(cellText)){var display=Acm.Browser.isMoz?"table-row":"block";row.setStyleProperty("display",display);}else{row.setStyleProperty("display","none");}}};_EosTableManager._onKeyPress=function(e){Eos.TableManager.parent._onKeyPress.call(this,e);var rows;var row;var display;if(this.textBox.getFocus()&&e.getKeyCode()==Acm.KeyboardEvent.ESC){e.preventDefault();rows=this.listBox.getChildRows();for(var i=0,numRows=rows.length;i<numRows;++i){row=rows[i];display=Acm.Browser.isMoz?"table-row":"block";row.setStyleProperty("display",display);}
this.textBox.setText("");}}