rem: Ext.form.ComboBox=function(_1){Ext.form.ComboBox.superclass.constructor.call(this,_1);this.addEvents({"expand":true,"collapse":true,"beforeselect":true,"select":true,"beforequery":true});if(this.transform){this.allowDomMove=false;var s=Ext.getDom(this.transform);if(!this.hiddenName){this.hiddenName=s.name;}if(!this.store){this.mode="local";var d=[],_4=s.options;for(var i=0,_6=_4.length;i<_6;i++){var o=_4[i];var _8=(Ext.isIE?o.getAttributeNode("value").specified:o.hasAttribute("value"))?o.value:o.text;if(o.selected){this.value=_8;}d.push([_8,o.text]);}this.store=new Ext.data.SimpleStore({"id":0,fields:["value","text"],data:d});this.valueField="value";this.displayField="text";}s.name=Ext.id();if(!this.lazyRender){this.target=true;this.el=Ext.DomHelper.insertBefore(s,this.autoCreate||this.defaultAutoCreate);s.parentNode.removeChild(s);this.render(this.el.parentNode);}else{s.parentNode.removeChild(s);}}this.selectedIndex=-1;if(this.mode=="local"){if(_1.queryDelay===undefined){this.queryDelay=10;}if(_1.minChars===undefined){this.minChars=0;}}};Ext.extend(Ext.form.ComboBox,Ext.form.TriggerField,{defaultAutoCreate:{tag:"input",type:"text",size:"24",autocomplete:"off"},listWidth:undefined,displayField:undefined,valueField:undefined,hiddenName:undefined,listClass:"",selectedClass:"x-combo-selected",triggerClass:"x-form-arrow-trigger",shadow:"sides",listAlign:"tl-bl?",maxHeight:300,triggerAction:"query",minChars:4,typeAhead:false,queryDelay:500,pageSize:0,selectOnFocus:false,queryParam:"query",loadingText:"Loading...",resizable:false,handleHeight:8,editable:true,allQuery:"",mode:"remote",minListWidth:70,forceSelection:false,typeAheadDelay:250,valueNotFoundText:undefined,onRender:function(ct,_a){Ext.form.ComboBox.superclass.onRender.call(this,ct,_a);if(this.hiddenName){this.hiddenField=this.el.insertSibling({tag:"input",type:"hidden",name:this.hiddenName,id:(this.hiddenId||this.hiddenName)},"before",true);this.hiddenField.value=this.hiddenValue!==undefined?this.hiddenValue:this.value!==undefined?this.value:"";this.el.dom.removeAttribute("name");}if(Ext.isGecko){this.el.dom.setAttribute("autocomplete","off");}var _b="x-combo-list";this.list=new Ext.Layer({shadow:this.shadow,cls:[_b,this.listClass].join(" "),constrain:false});var lw=this.listWidth||Math.max(this.wrap.getWidth(),this.minListWidth);this.list.setWidth(lw);this.list.swallowEvent("mousewheel");this.assetHeight=0;if(this.title){this.header=this.list.createChild({cls:_b+"-hd",html:this.title});this.assetHeight+=this.header.getHeight();}this.innerList=this.list.createChild({cls:_b+"-inner"});this.innerList.on("mouseover",this.onViewOver,this);this.innerList.on("mousemove",this.onViewMove,this);this.innerList.setWidth(lw-this.list.getFrameWidth("lr"));if(this.pageSize){this.footer=this.list.createChild({cls:_b+"-ft"});this.pageTb=new Ext.PagingToolbar(this.footer,this.store,{pageSize:this.pageSize});this.assetHeight+=this.footer.getHeight();}if(!this.tpl){this.tpl="<div class=\""+_b+"-item\">{"+this.displayField+"}</div>";}this.view=new Ext.View(this.innerList,this.tpl,{singleSelect:true,store:this.store,selectedClass:this.selectedClass});this.view.on("click",this.onViewClick,this);this.store.on("beforeload",this.onBeforeLoad,this);this.store.on("load",this.onLoad,this);this.store.on("loadexception",this.collapse,this);if(this.resizable){this.resizer=new Ext.Resizable(this.list,{pinned:true,handles:"se"});this.resizer.on("resize",function(r,w,h){this.maxHeight=h-this.handleHeight-this.list.getFrameWidth("tb")-this.assetHeight;this.listWidth=w;this.innerList.setWidth(w-this.list.getFrameWidth("lr"));this.restrictHeight();},this);this[this.pageSize?"footer":"innerList"].setStyle("margin-bottom",this.handleHeight+"px");}if(!this.editable){this.editable=true;this.setEditable(false);}},initEvents:function(){Ext.form.ComboBox.superclass.initEvents.call(this);this.keyNav=new Ext.KeyNav(this.el,{"up":function(e){this.inKeyMode=true;this.selectPrev();},"down":function(e){if(!this.isExpanded()){this.onTriggerClick();}else{this.inKeyMode=true;this.selectNext();}},"enter":function(e){this.onViewClick();},"esc":function(e){this.collapse();},"tab":function(e){this.onViewClick(false);return true;},scope:this,doRelay:function(foo,bar,_17){if(_17=="down"||this.scope.isExpanded()){return Ext.KeyNav.prototype.doRelay.apply(this,arguments);}return true;},forceKeyDown:true});this.queryDelay=Math.max(this.queryDelay||10,this.mode=="local"?10:250);this.dqTask=new Ext.util.DelayedTask(this.initQuery,this);if(this.typeAhead){this.taTask=new Ext.util.DelayedTask(this.onTypeAhead,this);}if(this.editable!==false){this.el.on("keyup",this.onKeyUp,this);}if(this.forceSelection){this.on("blur",this.doForce,this);}},onDestroy:function(){if(this.view){this.view.setStore(null);this.view.el.removeAllListeners();this.view.el.remove();this.view.purgeListeners();}if(this.list){this.list.destroy();}if(this.store){this.store.un("beforeload",this.onBeforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("loadexception",this.collapse,this);}Ext.form.ComboBox.superclass.onDestroy.call(this);},fireKey:function(e){if(e.isNavKeyPress()&&!this.list.isVisible()){this.fireEvent("specialkey",this,e);}},onResize:function(w,h){Ext.form.ComboBox.superclass.onResize.apply(this,arguments);if(this.list&&this.listWidth===undefined){var lw=Math.max(w,this.minListWidth);this.list.setWidth(lw);this.innerList.setWidth(lw-this.list.getFrameWidth("lr"));}},setEditable:function(_1c){if(_1c==this.editable){return;}this.editable=_1c;if(!_1c){this.el.dom.setAttribute("readOnly",true);this.el.on("mousedown",this.onTriggerClick,this);this.el.addClass("x-combo-noedit");}else{this.el.dom.setAttribute("readOnly",false);this.el.un("mousedown",this.onTriggerClick,this);this.el.removeClass("x-combo-noedit");}},onBeforeLoad:function(){if(!this.hasFocus){return;}this.innerList.update(this.loadingText?"<div class=\"loading-indicator\">"+this.loadingText+"</div>":"");this.restrictHeight();this.selectedIndex=-1;},onLoad:function(){if(!this.hasFocus){return;}if(this.store.getCount()>0){this.expand();this.restrictHeight();if(this.lastQuery==this.allQuery){if(this.editable){this.el.dom.select();}if(!this.selectByValue(this.value,true)){this.select(0,true);}}else{this.selectNext();if(this.typeAhead&&this.lastKey!=Ext.EventObject.BACKSPACE&&this.lastKey!=Ext.EventObject.DELETE){this.taTask.delay(this.typeAheadDelay);}}}else{this.onEmptyResults();}},onTypeAhead:function(){if(this.store.getCount()>0){var r=this.store.getAt(0);var _1e=r.data[this.displayField];var len=_1e.length;var _20=this.getRawValue().length;if(_20!=len){this.setRawValue(_1e);this.selectText(_20,_1e.length);}}},onSelect:function(_21,_22){if(this.fireEvent("beforeselect",this,_21,_22)!==false){this.setValue(_21.data[this.valueField||this.displayField]);this.collapse();this.fireEvent("select",this,_21,_22);}},getValue:function(){if(this.valueField){return typeof this.value!="undefined"?this.value:"";}else{return Ext.form.ComboBox.superclass.getValue.call(this);}},clearValue:function(){if(this.hiddenField){this.hiddenField.value="";}this.setRawValue("");this.lastSelectionText="";this.applyEmptyText();},setValue:function(v){var _24=v;if(this.valueField){var r=this.findRecord(this.valueField,v);if(r){_24=r.data[this.displayField];}else{if(this.valueNotFoundText!==undefined){_24=this.valueNotFoundText;}}}this.lastSelectionText=_24;if(this.hiddenField){this.hiddenField.value=v;}Ext.form.ComboBox.superclass.setValue.call(this,_24);this.value=v;},findRecord:function(_26,_27){var _28;if(this.store.getCount()>0){this.store.each(function(r){if(r.data[_26]==_27){_28=r;return false;}});}return _28;},onViewMove:function(e,t){this.inKeyMode=false;},onViewOver:function(e,t){if(this.inKeyMode){return;}var _2e=this.view.findItemFromChild(t);if(_2e){var _2f=this.view.indexOf(_2e);this.select(_2f,false);}},onViewClick:function(_30){var _31=this.view.getSelectedIndexes()[0];var r=this.store.getAt(_31);if(r){this.onSelect(r,_31);}if(_30!==false){this.el.focus();}},restrictHeight:function(){this.innerList.dom.style.height="";var _33=this.innerList.dom;var h=Math.max(_33.clientHeight,_33.offsetHeight,_33.scrollHeight);this.innerList.setHeight(h<this.maxHeight?"auto":this.maxHeight);this.list.beginUpdate();this.list.setHeight(this.innerList.getHeight()+this.list.getFrameWidth("tb")+(this.resizable?this.handleHeight:0)+this.assetHeight);this.list.alignTo(this.el,this.listAlign);this.list.endUpdate();},onEmptyResults:function(){this.collapse();},isExpanded:function(){return this.list.isVisible();},selectByValue:function(v,_36){if(v!==undefined&&v!==null){var r=this.findRecord(this.valueField||this.displayField,v);if(r){this.select(this.store.indexOf(r),_36);return true;}}return false;},select:function(_38,_39){this.selectedIndex=_38;this.view.select(_38);if(_39!==false){var el=this.view.getNode(_38);if(el){this.innerList.scrollChildIntoView(el,false);}}},selectNext:function(){var ct=this.store.getCount();if(ct>0){if(this.selectedIndex==-1){this.select(0);}else{if(this.selectedIndex<ct-1){this.select(this.selectedIndex+1);}}}},selectPrev:function(){var ct=this.store.getCount();if(ct>0){if(this.selectedIndex==-1){this.select(0);}else{if(this.selectedIndex!=0){this.select(this.selectedIndex-1);}}}},onKeyUp:function(e){if(this.editable!==false&&!e.isSpecialKey()){this.lastKey=e.getKey();this.dqTask.delay(this.queryDelay);}},validateBlur:function(){return!this.list||!this.list.isVisible();},initQuery:function(){this.doQuery(this.getRawValue());},doForce:function(){if(this.el.dom.value.length>0){this.el.dom.value=this.lastSelectionText===undefined?"":this.lastSelectionText;this.applyEmptyText();}},doQuery:function(q,_3f){if(q===undefined||q===null){q="";}var qe={query:q,forceAll:_3f,combo:this,cancel:false};if(this.fireEvent("beforequery",qe)===false||qe.cancel){return false;}q=qe.query;_3f=qe.forceAll;if(_3f===true||(q.length>=this.minChars)){if(this.lastQuery!=q){this.lastQuery=q;if(this.mode=="local"){this.selectedIndex=-1;if(_3f){this.store.clearFilter();}else{this.store.filter(this.displayField,q);}this.onLoad();}else{this.store.baseParams[this.queryParam]=q;this.store.load({params:this.getParams(q)});this.expand();}}else{this.selectedIndex=-1;this.onLoad();}}},getParams:function(q){var p={};if(this.pageSize){p.start=0;p.limit=this.pageSize;}return p;},collapse:function(){if(!this.isExpanded()){return;}this.list.hide();Ext.get(document).un("mousedown",this.collapseIf,this);Ext.get(document).un("mousewheel",this.collapseIf,this);this.fireEvent("collapse",this);},collapseIf:function(e){if(!e.within(this.wrap)&&!e.within(this.list)){this.collapse();}},expand:function(){if(this.isExpanded()||!this.hasFocus){return;}this.list.alignTo(this.el,this.listAlign);this.list.show();Ext.get(document).on("mousedown",this.collapseIf,this);Ext.get(document).on("mousewheel",this.collapseIf,this);this.fireEvent("expand",this);},onTriggerClick:function(){if(this.disabled){return;}if(this.isExpanded()){this.collapse();this.el.focus();}else{this.hasFocus=true;if(this.triggerAction=="all"){this.doQuery(this.allQuery,true);}else{this.doQuery(this.getRawValue());}this.el.focus();}}}); 
add: Ext.form.HtmlEditor=Ext.extend(Ext.form.Field,{enableFormat:true,enableFontSize:true,enableColors:true,enableAlignments:true,enableLists:true,enableSourceEdit:true,enableLinks:true,enableFont:true,createLinkText:"Please enter the URL for the link:",defaultLinkValue:"http:/"+"/",fontFamilies:["Arial","Courier New","Tahoma","Times New Roman","Verdana"],defaultFont:"tahoma",validationEvent:false,deferHeight:true,initialized:false,activated:false,sourceEditMode:false,onFocus:Ext.emptyFn,iframePad:3,hideMode:"offsets",defaultAutoCreate:{tag:"textarea",style:"width:500px;height:300px;",autocomplete:"off"},initComponent:function(){this.addEvents({initialize:true,activate:true,beforesync:true,beforepush:true,sync:true,push:true,editmodechange:true});},createFontOptions:function(){var _1=[],fs=this.fontFamilies,ff,lc;for(var i=0,_6=fs.length;i<_6;i++){ff=fs[i];lc=ff.toLowerCase();_1.push("<option value=\"",lc,"\" style=\"font-family:",ff,";\"",(this.defaultFont==lc?" selected=\"true\">":">"),ff,"</option>");}return _1.join("");},createToolbar:function(_7){function btn(id,_9,_a){return{id:id,cls:"x-btn-icon x-edit-"+id,enableToggle:_9!==false,scope:_7,handler:_a||_7.relayBtnCmd,clickEvent:"mousedown",tooltip:_7.buttonTips[id]||undefined,tabIndex:-1};}var tb=new Ext.Toolbar(this.wrap.dom.firstChild);tb.el.on("click",function(e){e.preventDefault();});if(this.enableFont&&!Ext.isSafari){this.fontSelect=tb.el.createChild({tag:"select",tabIndex:-1,cls:"x-font-select",html:this.createFontOptions()});this.fontSelect.on("change",function(){var _d=this.fontSelect.dom.value;this.relayCmd("fontname",_d);this.deferFocus();},this);tb.add(this.fontSelect.dom,"-");}if(this.enableFormat){tb.add(btn("bold"),btn("italic"),btn("underline"));}if(this.enableFontSize){tb.add("-",btn("increasefontsize",false,this.adjustFont),btn("decreasefontsize",false,this.adjustFont));}if(this.enableColors){tb.add("-",{id:"forecolor",cls:"x-btn-icon x-edit-forecolor",clickEvent:"mousedown",tooltip:_7.buttonTips["forecolor"]||undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({allowReselect:true,focus:Ext.emptyFn,value:"000000",plain:true,selectHandler:function(cp,_f){this.execCmd("forecolor",Ext.isSafari||Ext.isIE?"#"+_f:_f);this.deferFocus();},scope:this,clickEvent:"mousedown"})},{id:"backcolor",cls:"x-btn-icon x-edit-backcolor",clickEvent:"mousedown",tooltip:_7.buttonTips["backcolor"]||undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({focus:Ext.emptyFn,value:"FFFFFF",plain:true,allowReselect:true,selectHandler:function(cp,_11){if(Ext.isGecko){this.execCmd("useCSS",false);this.execCmd("hilitecolor",_11);this.execCmd("useCSS",true);this.deferFocus();}else{this.execCmd(Ext.isOpera?"hilitecolor":"backcolor",Ext.isSafari||Ext.isIE?"#"+_11:_11);this.deferFocus();}},scope:this,clickEvent:"mousedown"})});}if(this.enableAlignments){tb.add("-",btn("justifyleft"),btn("justifycenter"),btn("justifyright"));}if(!Ext.isSafari){if(this.enableLinks){tb.add("-",btn("createlink",false,this.createLink));}if(this.enableLists){tb.add("-",btn("insertorderedlist"),btn("insertunorderedlist"));}if(this.enableSourceEdit){tb.add("-",btn("sourceedit",true,function(btn){this.toggleSourceEdit(btn.pressed);}));}}this.tb=tb;},getDocMarkup:function(){return"<html><head><style type=\"text/css\">body{border:0;margin:0;padding:3px;height:98%;cursor:text;}</style></head><body></body></html>";},onRender:function(ct,_14){Ext.form.HtmlEditor.superclass.onRender.call(this,ct,_14);this.el.dom.style.border="0 none";this.el.dom.setAttribute("tabIndex",-1);this.el.addClass("x-hidden");if(Ext.isIE){this.el.applyStyles("margin-top:-1px;margin-bottom:-1px;");}this.wrap=this.el.wrap({cls:"x-html-editor-wrap",cn:{cls:"x-html-editor-tb"}});this.createToolbar(this);this.tb.items.each(function(_15){if(_15.id!="sourceedit"){_15.disable();}});var _16=document.createElement("iframe");_16.name=Ext.id();_16.frameBorder="no";_16.src="javascript:false";this.wrap.dom.appendChild(_16);this.iframe=_16;if(Ext.isIE){this.doc=_16.contentWindow.document;this.win=_16.contentWindow;}else{this.doc=(_16.contentDocument||window.frames[_16.name].document);this.win=window.frames[_16.name];}this.doc.designMode="on";this.doc.open();this.doc.write(this.getDocMarkup());this.doc.close();var _17={run:function(){if(this.doc.body||this.doc.readyState=="complete"){this.doc.designMode="on";Ext.TaskMgr.stop(_17);this.initEditor.defer(10,this);}},interval:10,duration:10000,scope:this};Ext.TaskMgr.start(_17);if(!this.width){this.setSize(this.el.getSize());}},onResize:function(w,h){Ext.form.HtmlEditor.superclass.onResize.apply(this,arguments);if(this.el&&this.iframe){if(typeof w=="number"){var aw=w-this.wrap.getFrameWidth("lr");this.el.setWidth(this.adjustWidth("textarea",aw));this.iframe.style.width=aw+"px";}if(typeof h=="number"){var ah=h-this.wrap.getFrameWidth("tb")-this.tb.el.getHeight();this.el.setHeight(this.adjustWidth("textarea",ah));this.iframe.style.height=ah+"px";if(this.doc){(this.doc.body||this.doc.documentElement).style.height=(ah-(this.iframePad*2))+"px";}}}},toggleSourceEdit:function(_1c){if(_1c===undefined){_1c=!this.sourceEditMode;}this.sourceEditMode=_1c===true;var btn=this.tb.items.get("sourceedit");if(btn.pressed!==this.sourceEditMode){btn.toggle(this.sourceEditMode);return;}if(this.sourceEditMode){this.tb.items.each(function(_1e){if(_1e.id!="sourceedit"){_1e.disable();}});this.syncValue();this.iframe.className="x-hidden";this.el.removeClass("x-hidden");this.el.dom.removeAttribute("tabIndex");this.el.focus();}else{if(this.initialized){this.tb.items.each(function(_1f){_1f.enable();});}this.pushValue();this.iframe.className="";this.el.addClass("x-hidden");this.el.dom.setAttribute("tabIndex",-1);this.deferFocus();}this.setSize(this.wrap.getSize());this.fireEvent("editmodechange",this,this.sourceEditMode);},createLink:function(){var url=prompt(this.createLinkText,this.defaultLinkValue);if(url&&url!="http:/"+"/"){this.relayCmd("createlink",url);}},adjustSize:Ext.BoxComponent.prototype.adjustSize,getResizeEl:function(){return this.wrap;},getPositionEl:function(){return this.wrap;},initEvents:function(){this.originalValue=this.getValue();},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,setValue:function(v){Ext.form.HtmlEditor.superclass.setValue.call(this,v);this.pushValue();},cleanHtml:function(_22){_22=String(_22);if(_22.length>5){if(Ext.isSafari){_22=_22.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi,"");}}if(_22=="&nbsp;"){_22="";}return _22;},syncValue:function(){if(this.initialized){var bd=(this.doc.body||this.doc.documentElement);var _24=bd.innerHTML;if(Ext.isSafari){var bs=bd.getAttribute("style");var m=bs.match(/text-align:(.*?);/i);if(m&&m[1]){_24="<div style=\""+m[0]+"\">"+_24+"</div>";}}_24=this.cleanHtml(_24);if(this.fireEvent("beforesync",this,_24)!==false){this.el.dom.value=_24;this.fireEvent("sync",this,_24);}}},pushValue:function(){if(this.initialized){var v=this.el.dom.value;if(v.length<1){v="&nbsp;";}if(this.fireEvent("beforepush",this,v)!==false){(this.doc.body||this.doc.documentElement).innerHTML=v;this.fireEvent("push",this,v);}}},deferFocus:function(){this.focus.defer(10,this);},focus:function(){if(this.win&&!this.sourceEditMode){this.win.focus();}else{this.el.focus();}},initEditor:function(){var _28=(this.doc.body||this.doc.documentElement);var ss=this.el.getStyles("font-size","font-family","background-image","background-repeat");ss["background-attachment"]="fixed";_28.bgProperties="fixed";Ext.DomHelper.applyStyles(_28,ss);Ext.EventManager.on(this.doc,{"mousedown":this.onEditorEvent,"dblclick":this.onEditorEvent,"click":this.onEditorEvent,"keyup":this.onEditorEvent,buffer:100,scope:this});if(Ext.isGecko){Ext.EventManager.on(this.doc,"keypress",this.applyCommand,this);}if(Ext.isIE||Ext.isSafari||Ext.isOpera){Ext.EventManager.on(this.doc,"keydown",this.fixKeys,this);}this.initialized=true;this.fireEvent("initialize",this);this.pushValue();},onDestroy:function(){if(this.rendered){this.tb.items.each(function(_2a){if(_2a.menu){_2a.menu.removeAll();if(_2a.menu.el){_2a.menu.el.destroy();}}_2a.destroy();});this.wrap.dom.innerHTML="";this.wrap.remove();}},onFirstFocus:function(){this.activated=true;this.tb.items.each(function(_2b){_2b.enable();});if(Ext.isGecko){this.win.focus();var s=this.win.getSelection();if(!s.focusNode||s.focusNode.nodeType!=3){var r=s.getRangeAt(0);r.selectNodeContents((this.doc.body||this.doc.documentElement));r.collapse(true);this.deferFocus();}try{this.execCmd("useCSS",true);this.execCmd("styleWithCSS",false);}catch(e){}}this.fireEvent("activate",this);},adjustFont:function(btn){var _2f=btn.id=="increasefontsize"?1:-1;if(Ext.isSafari){_2f*=2;}var v=parseInt(this.doc.queryCommandValue("FontSize")||3,10);v=Math.max(1,v+_2f);this.execCmd("FontSize",v+(Ext.isSafari?"px":0));},onEditorEvent:function(e){this.updateToolbar();},updateToolbar:function(){if(!this.activated){this.onFirstFocus();return;}var _32=this.tb.items.map,doc=this.doc;if(this.enableFont&&!Ext.isSafari){var _34=(this.doc.queryCommandValue("FontName")||this.defaultFont).toLowerCase();if(_34!=this.fontSelect.dom.value){this.fontSelect.dom.value=_34;}}if(this.enableFormat){_32.bold.toggle(doc.queryCommandState("bold"));_32.italic.toggle(doc.queryCommandState("italic"));_32.underline.toggle(doc.queryCommandState("underline"));}if(this.enableAlignments){_32.justifyleft.toggle(doc.queryCommandState("justifyleft"));_32.justifycenter.toggle(doc.queryCommandState("justifycenter"));_32.justifyright.toggle(doc.queryCommandState("justifyright"));}if(!Ext.isSafari&&this.enableLists){_32.insertorderedlist.toggle(doc.queryCommandState("insertorderedlist"));_32.insertunorderedlist.toggle(doc.queryCommandState("insertunorderedlist"));}Ext.menu.MenuMgr.hideAll();this.syncValue();},relayBtnCmd:function(btn){this.relayCmd(btn.id);},relayCmd:function(cmd,_37){this.win.focus();this.execCmd(cmd,_37);this.updateToolbar();this.deferFocus();},execCmd:function(cmd,_39){this.doc.execCommand(cmd,false,_39===undefined?null:_39);this.syncValue();},applyCommand:function(e){if(e.ctrlKey){var c=e.getCharCode(),cmd;if(c>0){c=String.fromCharCode(c);switch(c){case"b":cmd="bold";break;case"i":cmd="italic";break;case"u":cmd="underline";break;}if(cmd){this.win.focus();this.execCmd(cmd);this.deferFocus();e.preventDefault();}}}},insertAtCursor:function(_3d){if(!this.activated){return;}if(Ext.isIE){this.win.focus();var r=this.doc.selection.createRange();if(r){r.collapse(true);r.pasteHTML(_3d);this.syncValue();this.deferFocus();}}else{if(Ext.isGecko||Ext.isOpera){this.win.focus();this.execCmd("InsertHTML",_3d);this.deferFocus();}else{if(Ext.isSafari){this.execCmd("InsertText",_3d);this.deferFocus();}}}},fixKeys:function(){if(Ext.isIE){return function(e){var k=e.getKey(),r;if(k==e.TAB){e.stopEvent();r=this.doc.selection.createRange();if(r){r.collapse(true);r.pasteHTML("&nbsp;&nbsp;&nbsp;&nbsp;");this.deferFocus();}}else{if(k==e.ENTER){r=this.doc.selection.createRange();if(r){var _42=r.parentElement();if(!_42||_42.tagName.toLowerCase()!="li"){e.stopEvent();r.pasteHTML("<br />");r.collapse(false);r.select();}}}}};}else{if(Ext.isOpera){return function(e){var k=e.getKey();if(k==e.TAB){e.stopEvent();this.win.focus();this.execCmd("InsertHTML","&nbsp;&nbsp;&nbsp;&nbsp;");this.deferFocus();}};}else{if(Ext.isSafari){return function(e){var k=e.getKey();if(k==e.TAB){e.stopEvent();this.execCmd("InsertText","\t");this.deferFocus();}};}}}}(),getToolbar:function(){return this.tb;},buttonTips:{bold:{title:"Bold (Ctrl+B)",text:"Make the selected text bold.",cls:"x-html-editor-tip"},italic:{title:"Italic (Ctrl+I)",text:"Make the selected text italic.",cls:"x-html-editor-tip"},underline:{title:"Underline (Ctrl+U)",text:"Underline the selected text.",cls:"x-html-editor-tip"},increasefontsize:{title:"Grow Text",text:"Increase the font size.",cls:"x-html-editor-tip"},decreasefontsize:{title:"Shrink Text",text:"Decrease the font size.",cls:"x-html-editor-tip"},backcolor:{title:"Text Highlight Color",text:"Change the background color of the selected text.",cls:"x-html-editor-tip"},forecolor:{title:"Font Color",text:"Change the color of the selected text.",cls:"x-html-editor-tip"},justifyleft:{title:"Align Text Left",text:"Align text to the left.",cls:"x-html-editor-tip"},justifycenter:{title:"Center Text",text:"Center text in the editor.",cls:"x-html-editor-tip"},justifyright:{title:"Align Text Right",text:"Align text to the right.",cls:"x-html-editor-tip"},insertunorderedlist:{title:"Bullet List",text:"Start a bulleted list.",cls:"x-html-editor-tip"},insertorderedlist:{title:"Numbered List",text:"Start a numbered list.",cls:"x-html-editor-tip"},createlink:{title:"Hyperlink",text:"Make the selected text a hyperlink.",cls:"x-html-editor-tip"},sourceedit:{title:"Source Edit",text:"Switch to source editing mode.",cls:"x-html-editor-tip"}}}); 
context: Ext.form.ComboBox=function(_1){Ext.form.ComboBox.superclass.constructor.call(this,_1);this.addEvents({"expand":true,"collapse":true,"beforeselect":true,"select":true,"beforequery":true});if(this.transform){this.allowDomMove=false;var s=Ext.getDom(this.transform);if(!this.hiddenName){this.hiddenName=s.name;}if(!this.store){this.mode="local";var d=[],_4=s.options;for(var i=0,_6=_4.length;i<_6;i++){var o=_4[i];var _8=(Ext.isIE?o.getAttributeNode("value").specified:o.hasAttribute("value"))?o.value:o.text;if(o.selected){this.value=_8;}d.push([_8,o.text]);}this.store=new Ext.data.SimpleStore({"id":0,fields:["value","text"],data:d});this.valueField="value";this.displayField="text";}s.name=Ext.id();if(!this.lazyRender){this.target=true;this.el=Ext.DomHelper.insertBefore(s,this.autoCreate||this.defaultAutoCreate);s.parentNode.removeChild(s);this.render(this.el.parentNode);}else{s.parentNode.removeChild(s);}}this.selectedIndex=-1;if(this.mode=="local"){if(_1.queryDelay===undefined){this.queryDelay=10;}if(_1.minChars===undefined){this.minChars=0;}}};Ext.extend(Ext.form.ComboBox,Ext.form.TriggerField,{defaultAutoCreate:{tag:"input",type:"text",size:"24",autocomplete:"off"},listWidth:undefined,displayField:undefined,valueField:undefined,hiddenName:undefined,listClass:"",selectedClass:"x-combo-selected",triggerClass:"x-form-arrow-trigger",shadow:"sides",listAlign:"tl-bl?",maxHeight:300,triggerAction:"query",minChars:4,typeAhead:false,queryDelay:500,pageSize:0,selectOnFocus:false,queryParam:"query",loadingText:"Loading...",resizable:false,handleHeight:8,editable:true,allQuery:"",mode:"remote",minListWidth:70,forceSelection:false,typeAheadDelay:250,valueNotFoundText:undefined,onRender:function(ct,_a){Ext.form.ComboBox.superclass.onRender.call(this,ct,_a);if(this.hiddenName){this.hiddenField=this.el.insertSibling({tag:"input",type:"hidden",name:this.hiddenName,id:(this.hiddenId||this.hiddenName)},"before",true);this.hiddenField.value=this.hiddenValue!==undefined?this.hiddenValue:this.value!==undefined?this.value:"";this.el.dom.removeAttribute("name");}if(Ext.isGecko){this.el.dom.setAttribute("autocomplete","off");}var _b="x-combo-list";this.list=new Ext.Layer({shadow:this.shadow,cls:[_b,this.listClass].join(" "),constrain:false});var lw=this.listWidth||Math.max(this.wrap.getWidth(),this.minListWidth);this.list.setWidth(lw);this.list.swallowEvent("mousewheel");this.assetHeight=0;if(this.title){this.header=this.list.createChild({cls:_b+"-hd",html:this.title});this.assetHeight+=this.header.getHeight();}this.innerList=this.list.createChild({cls:_b+"-inner"});this.innerList.on("mouseover",this.onViewOver,this);this.innerList.on("mousemove",this.onViewMove,this);this.innerList.setWidth(lw-this.list.getFrameWidth("lr"));if(this.pageSize){this.footer=this.list.createChild({cls:_b+"-ft"});this.pageTb=new Ext.PagingToolbar(this.footer,this.store,{pageSize:this.pageSize});this.assetHeight+=this.footer.getHeight();}if(!this.tpl){this.tpl="<div class=\""+_b+"-item\">{"+this.displayField+"}</div>";}this.view=new Ext.View(this.innerList,this.tpl,{singleSelect:true,store:this.store,selectedClass:this.selectedClass});this.view.on("click",this.onViewClick,this);this.store.on("beforeload",this.onBeforeLoad,this);this.store.on("load",this.onLoad,this);this.store.on("loadexception",this.collapse,this);if(this.resizable){this.resizer=new Ext.Resizable(this.list,{pinned:true,handles:"se"});this.resizer.on("resize",function(r,w,h){this.maxHeight=h-this.handleHeight-this.list.getFrameWidth("tb")-this.assetHeight;this.listWidth=w;this.innerList.setWidth(w-this.list.getFrameWidth("lr"));this.restrictHeight();},this);this[this.pageSize?"footer":"innerList"].setStyle("margin-bottom",this.handleHeight+"px");}if(!this.editable){this.editable=true;this.setEditable(false);}},initEvents:function(){Ext.form.ComboBox.superclass.initEvents.call(this);this.keyNav=new Ext.KeyNav(this.el,{"up":function(e){this.inKeyMode=true;this.selectPrev();},"down":function(e){if(!this.isExpanded()){this.onTriggerClick();}else{this.inKeyMode=true;this.selectNext();}},"enter":function(e){this.onViewClick();},"esc":function(e){this.collapse();},"tab":function(e){this.onViewClick(false);return true;},scope:this,doRelay:function(foo,bar,_17){if(_17=="down"||this.scope.isExpanded()){return Ext.KeyNav.prototype.doRelay.apply(this,arguments);}return true;},forceKeyDown:true});this.queryDelay=Math.max(this.queryDelay||10,this.mode=="local"?10:250);this.dqTask=new Ext.util.DelayedTask(this.initQuery,this);if(this.typeAhead){this.taTask=new Ext.util.DelayedTask(this.onTypeAhead,this);}if(this.editable!==false){this.el.on("keyup",this.onKeyUp,this);}if(this.forceSelection){this.on("blur",this.doForce,this);}},onDestroy:function(){if(this.view){this.view.setStore(null);this.view.el.removeAllListeners();this.view.el.remove();this.view.purgeListeners();}if(this.list){this.list.destroy();}if(this.store){this.store.un("beforeload",this.onBeforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("loadexception",this.collapse,this);}Ext.form.ComboBox.superclass.onDestroy.call(this);},fireKey:function(e){if(e.isNavKeyPress()&&!this.list.isVisible()){this.fireEvent("specialkey",this,e);}},onResize:function(w,h){Ext.form.ComboBox.superclass.onResize.apply(this,arguments);if(this.list&&this.listWidth===undefined){var lw=Math.max(w,this.minListWidth);this.list.setWidth(lw);this.innerList.setWidth(lw-this.list.getFrameWidth("lr"));}},setEditable:function(_1c){if(_1c==this.editable){return;}this.editable=_1c;if(!_1c){this.el.dom.setAttribute("readOnly",true);this.el.on("mousedown",this.onTriggerClick,this);this.el.addClass("x-combo-noedit");}else{this.el.dom.setAttribute("readOnly",false);this.el.un("mousedown",this.onTriggerClick,this);this.el.removeClass("x-combo-noedit");}},onBeforeLoad:function(){if(!this.hasFocus){return;}this.innerList.update(this.loadingText?"<div class=\"loading-indicator\">"+this.loadingText+"</div>":"");this.restrictHeight();this.selectedIndex=-1;},onLoad:function(){if(!this.hasFocus){return;}if(this.store.getCount()>0){this.expand();this.restrictHeight();if(this.lastQuery==this.allQuery){if(this.editable){this.el.dom.select();}if(!this.selectByValue(this.value,true)){this.select(0,true);}}else{this.selectNext();if(this.typeAhead&&this.lastKey!=Ext.EventObject.BACKSPACE&&this.lastKey!=Ext.EventObject.DELETE){this.taTask.delay(this.typeAheadDelay);}}}else{this.onEmptyResults();}},onTypeAhead:function(){if(this.store.getCount()>0){var r=this.store.getAt(0);var _1e=r.data[this.displayField];var len=_1e.length;var _20=this.getRawValue().length;if(_20!=len){this.setRawValue(_1e);this.selectText(_20,_1e.length);}}},onSelect:function(_21,_22){if(this.fireEvent("beforeselect",this,_21,_22)!==false){this.setValue(_21.data[this.valueField||this.displayField]);this.collapse();this.fireEvent("select",this,_21,_22);}},getValue:function(){if(this.valueField){return typeof this.value!="undefined"?this.value:"";}else{return Ext.form.ComboBox.superclass.getValue.call(this);}},clearValue:function(){if(this.hiddenField){this.hiddenField.value="";}this.setRawValue("");this.lastSelectionText="";this.applyEmptyText();},setValue:function(v){var _24=v;if(this.valueField){var r=this.findRecord(this.valueField,v);if(r){_24=r.data[this.displayField];}else{if(this.valueNotFoundText!==undefined){_24=this.valueNotFoundText;}}}this.lastSelectionText=_24;if(this.hiddenField){this.hiddenField.value=v;}Ext.form.ComboBox.superclass.setValue.call(this,_24);this.value=v;},findRecord:function(_26,_27){var _28;if(this.store.getCount()>0){this.store.each(function(r){if(r.data[_26]==_27){_28=r;return false;}});}return _28;},onViewMove:function(e,t){this.inKeyMode=false;},onViewOver:function(e,t){if(this.inKeyMode){return;}var _2e=this.view.findItemFromChild(t);if(_2e){var _2f=this.view.indexOf(_2e);this.select(_2f,false);}},onViewClick:function(_30){var _31=this.view.getSelectedIndexes()[0];var r=this.store.getAt(_31);if(r){this.onSelect(r,_31);}if(_30!==false){this.el.focus();}},restrictHeight:function(){this.innerList.dom.style.height="";var _33=this.innerList.dom;var h=Math.max(_33.clientHeight,_33.offsetHeight,_33.scrollHeight);this.innerList.setHeight(h<this.maxHeight?"auto":this.maxHeight);this.list.beginUpdate();this.list.setHeight(this.innerList.getHeight()+this.list.getFrameWidth("tb")+(this.resizable?this.handleHeight:0)+this.assetHeight);this.list.alignTo(this.el,this.listAlign);this.list.endUpdate();},onEmptyResults:function(){this.collapse();},isExpanded:function(){return this.list.isVisible();},selectByValue:function(v,_36){if(v!==undefined&&v!==null){var r=this.findRecord(this.valueField||this.displayField,v);if(r){this.select(this.store.indexOf(r),_36);return true;}}return false;},select:function(_38,_39){this.selectedIndex=_38;this.view.select(_38);if(_39!==false){var el=this.view.getNode(_38);if(el){this.innerList.scrollChildIntoView(el,false);}}},selectNext:function(){var ct=this.store.getCount();if(ct>0){if(this.selectedIndex==-1){this.select(0);}else{if(this.selectedIndex<ct-1){this.select(this.selectedIndex+1);}}}},selectPrev:function(){var ct=this.store.getCount();if(ct>0){if(this.selectedIndex==-1){this.select(0);}else{if(this.selectedIndex!=0){this.select(this.selectedIndex-1);}}}},onKeyUp:function(e){if(this.editable!==false&&!e.isSpecialKey()){this.lastKey=e.getKey();this.dqTask.delay(this.queryDelay);}},validateBlur:function(){return!this.list||!this.list.isVisible();},initQuery:function(){this.doQuery(this.getRawValue());},doForce:function(){if(this.el.dom.value.length>0){this.el.dom.value=this.lastSelectionText===undefined?"":this.lastSelectionText;this.applyEmptyText();}},doQuery:function(q,_3f){if(q===undefined||q===null){q="";}var qe={query:q,forceAll:_3f,combo:this,cancel:false};if(this.fireEvent("beforequery",qe)===false||qe.cancel){return false;}q=qe.query;_3f=qe.forceAll;if(_3f===true||(q.length>=this.minChars)){if(this.lastQuery!=q){this.lastQuery=q;if(this.mode=="local"){this.selectedIndex=-1;if(_3f){this.store.clearFilter();}else{this.store.filter(this.displayField,q);}this.onLoad();}else{this.store.baseParams[this.queryParam]=q;this.store.load({params:this.getParams(q)});this.expand();}}else{this.selectedIndex=-1;this.onLoad();}}},getParams:function(q){var p={};if(this.pageSize){p.start=0;p.limit=this.pageSize;}return p;},collapse:function(){if(!this.isExpanded()){return;}this.list.hide();Ext.get(document).un("mousedown",this.collapseIf,this);Ext.get(document).un("mousewheel",this.collapseIf,this);this.fireEvent("collapse",this);},collapseIf:function(e){if(!e.within(this.wrap)&&!e.within(this.list)){this.collapse();}},expand:function(){if(this.isExpanded()||!this.hasFocus){return;}this.list.alignTo(this.el,this.listAlign);this.list.show();Ext.get(document).on("mousedown",this.collapseIf,this);Ext.get(document).on("mousewheel",this.collapseIf,this);this.fireEvent("expand",this);},onTriggerClick:function(){if(this.disabled){return;}if(this.isExpanded()){this.collapse();this.el.focus();}else{this.hasFocus=true;if(this.triggerAction=="all"){this.doQuery(this.allQuery,true);}else{this.doQuery(this.getRawValue());}this.el.focus();}}});
meta: 5269	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5269/d6279c93dfac928173a95baee130443f46f50eb4/jsOut.js/buggy/Animator/dev/tmp/jsOut.js