window.undefined=window.undefined;Ext={version:"3.2.1",versionDetail:{major:3,minor:2,patch:1}};Ext.apply=function(o,c,defaults){if(defaults){Ext.apply(o,defaults)}if(o&&c&&typeofc=="object"){for(varpinc){o[p]=c[p]}}returno};(function(){varidSeed=0,toString=Object.prototype.toString,ua=navigator.userAgent.toLowerCase(),check=function(r){returnr.test(ua)},DOC=document,isStrict=DOC.compatMode=="CSS1Compat",isOpera=check(/opera/),isChrome=check(/\bchrome\b/),isWebKit=check(/webkit/),isSafari=!isChrome&&check(/safari/),isSafari2=isSafari&&check(/applewebkit\/4/),isSafari3=isSafari&&check(/version\/3/),isSafari4=isSafari&&check(/version\/4/),isIE=!isOpera&&check(/msie/),isIE7=isIE&&check(/msie 7/),isIE8=isIE&&check(/msie 8/),isIE6=isIE&&!isIE7&&!isIE8,isGecko=!isWebKit&&check(/gecko/),isGecko2=isGecko&&check(/rv:1\.8/),isGecko3=isGecko&&check(/rv:1\.9/),isBorderBox=isIE&&!isStrict,isWindows=check(/windows|win32/),isMac=check(/macintosh|mac os x/),isAir=check(/adobeair/),isLinux=check(/linux/),isSecure=/^https/i.test(window.location.protocol);if(isIE6){try{DOC.execCommand("BackgroundImageCache",false,true)}catch(e){}}Ext.apply(Ext,{SSL_SECURE_URL:isSecure&&isIE?'javascript:""':"about:blank",isStrict:isStrict,isSecure:isSecure,isReady:false,enableGarbageCollector:true,enableListenerCollection:false,enableNestedListenerRemoval:false,USE_NATIVE_JSON:false,applyIf:function(o,c){if(o){for(varpinc){if(!Ext.isDefined(o[p])){o[p]=c[p]}}}returno},id:function(el,prefix){el=Ext.getDom(el,true)||{};if(!el.id){el.id=(prefix||"ext-gen")+(++idSeed)}returnel.id},extend:function(){vario=function(o){for(varmino){this[m]=o[m]}};varoc=Object.prototype.constructor;returnfunction(sb,sp,overrides){if(typeofsp=="object"){overrides=sp;sp=sb;sb=overrides.constructor!=oc?overrides.constructor:function(){sp.apply(this,arguments)}}varF=function(){},sbp,spp=sp.prototype;F.prototype=spp;sbp=sb.prototype=newF();sbp.constructor=sb;sb.superclass=spp;if(spp.constructor==oc){spp.constructor=sp}sb.override=function(o){Ext.override(sb,o)};sbp.superclass=sbp.supr=(function(){returnspp});sbp.override=io;Ext.override(sb,overrides);sb.extend=function(o){returnExt.extend(sb,o)};returnsb}}(),override:function(origclass,overrides){if(overrides){varp=origclass.prototype;Ext.apply(p,overrides);if(Ext.isIE&&overrides.hasOwnProperty("toString")){p.toString=overrides.toString}}},namespace:function(){varo,d;Ext.each(arguments,function(v){d=v.split(".");o=window[d[0]]=window[d[0]]||{};Ext.each(d.slice(1),function(v2){o=o[v2]=o[v2]||{}})});returno},urlEncode:function(o,pre){varempty,buf=[],e=encodeURIComponent;Ext.iterate(o,function(key,item){empty=Ext.isEmpty(item);Ext.each(empty?key:item,function(val){buf.push("&",e(key),"=",(!Ext.isEmpty(val)&&(val!=key||!empty))?(Ext.isDate(val)?Ext.encode(val).replace(/"/g,""):e(val)):"")})});if(!pre){buf.shift();pre=""}returnpre+buf.join("")},urlDecode:function(string,overwrite){if(Ext.isEmpty(string)){return{}}varobj={},pairs=string.split("&"),d=decodeURIComponent,name,value;Ext.each(pairs,function(pair){pair=pair.split("=");name=d(pair[0]);value=d(pair[1]);obj[name]=overwrite||!obj[name]?value:[].concat(obj[name]).concat(value)});returnobj},urlAppend:function(url,s){if(!Ext.isEmpty(s)){returnurl+(url.indexOf("?")===-1?"?":"&")+s}returnurl},toArray:function(){returnisIE?function(a,i,j,res){res=[];for(varx=0,len=a.length;x<len;x++){res.push(a[x])}returnres.slice(i||0,j||res.length)}:function(a,i,j){returnArray.prototype.slice.call(a,i||0,j||a.length)}}(),isIterable:function(v){if(Ext.isArray(v)||v.callee){returntrue}if(/NodeList|HTMLCollection/.test(toString.call(v))){returntrue}return((typeofv.nextNode!="undefined"||v.item)&&Ext.isNumber(v.length))},each:function(array,fn,scope){if(Ext.isEmpty(array,true)){return}if(!Ext.isIterable(array)||Ext.isPrimitive(array)){array=[array]}for(vari=0,len=array.length;i<len;i++){if(fn.call(scope||array[i],array[i],i,array)===false){returni}}},iterate:function(obj,fn,scope){if(Ext.isEmpty(obj)){return}if(Ext.isIterable(obj)){Ext.each(obj,fn,scope);return}else{i
/*
*ExtJSLibrary3.2.1
*Copyright(c)2006-2010ExtJS,Inc.
*licensing@extjs.com
*http://www.extjs.com/license
*/
Ext.DomHelper=function(){vartempTableEl=null,emptyTags=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,tableRe=/^table|tbody|tr|td$/i,confRe=/tag|children|cn|html$/i,tableElRe=/td|tr|tbody/i,cssRe=/([a-z0-9-]+)\s*:\s*([^;\s]+(?:\s*[^;\s]+)*);?/gi,endRe=/end/i,pub,afterbegin="afterbegin",afterend="afterend",beforebegin="beforebegin",beforeend="beforeend",ts="<table>",te="</table>",tbs=ts+"<tbody>",tbe="</tbody>"+te,trs=tbs+"<tr>",tre="</tr>"+tbe;functiondoInsert(el,o,returnElement,pos,sibling,append){varnewNode=pub.insertHtml(pos,Ext.getDom(el),createHtml(o));returnreturnElement?Ext.get(newNode,true):newNode}functioncreateHtml(o){varb="",attr,val,key,keyVal,cn;if(typeofo=="string"){b=o}else{if(Ext.isArray(o)){for(vari=0;i<o.length;i++){if(o[i]){b+=createHtml(o[i])}}}else{b+="<"+(o.tag=o.tag||"div");for(attrino){val=o[attr];if(!confRe.test(attr)){if(typeofval=="object"){b+=" "+attr+'="';for(keyinval){b+=key+":"+val[key]+";"}b+='"'}else{b+=" "+({cls:"class",htmlFor:"for"}[attr]||attr)+'="'+val+'"'}}}if(emptyTags.test(o.tag)){b+="/>"}else{b+=">";if((cn=o.children||o.cn)){b+=createHtml(cn)}else{if(o.html){b+=o.html}}b+="</"+o.tag+">"}}}returnb}functionieTable(depth,s,h,e){tempTableEl.innerHTML=[s,h,e].join("");vari=-1,el=tempTableEl,ns;while(++i<depth){el=el.firstChild}if(ns=el.nextSibling){vardf=document.createDocumentFragment();while(el){ns=el.nextSibling;df.appendChild(el);el=ns}el=df}returnel}functioninsertIntoTable(tag,where,el,html){varnode,before;tempTableEl=tempTableEl||document.createElement("div");if(tag=="td"&&(where==afterbegin||where==beforeend)||!tableElRe.test(tag)&&(where==beforebegin||where==afterend)){return}before=where==beforebegin?el:where==afterend?el.nextSibling:where==afterbegin?el.firstChild:null;if(where==beforebegin||where==afterend){el=el.parentNode}if(tag=="td"||(tag=="tr"&&(where==beforeend||where==afterbegin))){node=ieTable(4,trs,html,tre)}else{if((tag=="tbody"&&(where==beforeend||where==afterbegin))||(tag=="tr"&&(where==beforebegin||where==afterend))){node=ieTable(3,tbs,html,tbe)}else{node=ieTable(2,ts,html,te)}}el.insertBefore(node,before);returnnode}pub={markup:function(o){returncreateHtml(o)},applyStyles:function(el,styles){if(styles){vari=0,len,style,matches;el=Ext.fly(el);if(typeofstyles=="function"){styles=styles.call()}if(typeofstyles=="string"){while((matches=cssRe.exec(styles))){el.setStyle(matches[1],matches[2])}}else{if(typeofstyles=="object"){el.setStyle(styles)}}}},insertHtml:function(where,el,html){varhash={},hashVal,setStart,range,frag,rangeEl,rs;where=where.toLowerCase();hash[beforebegin]=["BeforeBegin","previousSibling"];hash[afterend]=["AfterEnd","nextSibling"];if(el.insertAdjacentHTML){if(tableRe.test(el.tagName)&&(rs=insertIntoTable(el.tagName.toLowerCase(),where,el,html))){returnrs}hash[afterbegin]=["AfterBegin","firstChild"];hash[beforeend]=["BeforeEnd","lastChild"];if((hashVal=hash[where])){el.insertAdjacentHTML(hashVal[0],html);returnel[hashVal[1]]}}else{range=el.ownerDocument.createRange();setStart="setStart"+(endRe.test(where)?"After":"Before");if(hash[where]){range[setStart](el);frag=range.createContextualFragment(html);el.parentNode.insertBefore(frag,where==beforebegin?el:el.nextSibling);returnel[(where==beforebegin?"previous":"next")+"Sibling"]}else{rangeEl=(where==afterbegin?"first":"last")+"Child";if(el.firstChild){range[setStart](el[rangeEl]);frag=range.createContextualFragment(html);if(where==afterbegin){el.insertBefore(frag,el.firstChild)}else{el.appendChild(frag)}}else{el.innerHTML=html}returnel[rangeEl]}}throw'Illegal insertion point -> "'+where+'"'},insertBefore:function(el,o,returnElement){returndoInsert(el,o,returnElement,beforebegin)},insertAfter:function(el,o,returnElement){returndoInsert(el,o,returnElement,afterend,"nextSibling")},insertFirst:function(el,o,returnElement){returndoInsert(el,o,returnElement,afterbegin,"firstChild")},append:function(el,o,returnElement){returndoInsert(el,o,returnElement,beforeend,"",true)},overwrite:function(el,o,returnElement){el=Ext.getDom(el);el.innerHTML=create
Ext.data.Api=(function(){varvalidActions={};return{actions:{create:"create",read:"read",update:"update",destroy:"destroy"},restActions:{create:"POST",read:"GET",update:"PUT",destroy:"DELETE"},isAction:function(action){return(Ext.data.Api.actions[action])?true:false},getVerb:function(name){if(validActions[name]){returnvalidActions[name]}for(varverbinthis.actions){if(this.actions[verb]===name){validActions[name]=verb;break}}return(validActions[name]!==undefined)?validActions[name]:null},isValid:function(api){varinvalid=[];varcrud=this.actions;for(varactioninapi){if(!(actionincrud)){invalid.push(action)}}return(!invalid.length)?true:invalid},hasUniqueUrl:function(proxy,verb){varurl=(proxy.api[verb])?proxy.api[verb].url:null;varunique=true;for(varactioninproxy.api){if((unique=(action===verb)?true:(proxy.api[action].url!=url)?true:false)===false){break}}returnunique},prepare:function(proxy){if(!proxy.api){proxy.api={}}for(varverbinthis.actions){varaction=this.actions[verb];proxy.api[action]=proxy.api[action]||proxy.url||proxy.directFn;if(typeof(proxy.api[action])=="string"){proxy.api[action]={url:proxy.api[action],method:(proxy.restful===true)?Ext.data.Api.restActions[action]:undefined}}}},restify:function(proxy){proxy.restful=true;for(varverbinthis.restActions){proxy.api[this.actions[verb]].method||(proxy.api[this.actions[verb]].method=this.restActions[verb])}proxy.onWrite=proxy.onWrite.createInterceptor(function(action,o,response,rs){varreader=o.reader;varres=newExt.data.Response({action:action,raw:response});switch(response.status){case200:returntrue;break;case201:if(Ext.isEmpty(res.raw.responseText)){res.success=true}else{returntrue}break;case204:res.success=true;res.data=null;break;default:returntrue;break}if(res.success===true){this.fireEvent("write",this,action,res.data,res,rs,o.request.arg)}else{this.fireEvent("exception",this,"remote",action,o,res,rs)}o.request.callback.call(o.request.scope,res.data,res,res.success);returnfalse},proxy)}}})();Ext.data.Response=function(params,response){Ext.apply(this,params,{raw:response})};Ext.data.Response.prototype={message:null,success:false,status:null,root:null,raw:null,getMessage:function(){returnthis.message},getSuccess:function(){returnthis.success},getStatus:function(){returnthis.status},getRoot:function(){returnthis.root},getRawResponse:function(){returnthis.raw}};Ext.data.Api.Error=Ext.extend(Ext.Error,{constructor:function(message,arg){this.arg=arg;Ext.Error.call(this,message)},name:"Ext.data.Api"});Ext.apply(Ext.data.Api.Error.prototype,{lang:{"action-url-undefined":"No fallback url defined for this action. When defining a DataProxy api, please be sure to define an url for each CRUD action in Ext.data.Api.actions or define a default url in addition to your api-configuration.",invalid:"received an invalid API-configuration. Please ensure your proxy API-configuration contains only the actions defined in Ext.data.Api.actions","invalid-url":"Invalid url. Please review your proxy configuration.",execute:'Attempted to execute an unknown action. Valid API actions are defined in Ext.data.Api.actions"'}});Ext.data.SortTypes={none:function(s){returns},stripTagsRE:/<\/?[^>]+>/gi,asText:function(s){returnString(s).replace(this.stripTagsRE,"")},asUCText:function(s){returnString(s).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(s){returnString(s).toUpperCase()},asDate:function(s){if(!s){return0}if(Ext.isDate(s)){returns.getTime()}returnDate.parse(String(s))},asFloat:function(s){varval=parseFloat(String(s).replace(/,/g,""));returnisNaN(val)?0:val},asInt:function(s){varval=parseInt(String(s).replace(/,/g,""),10);returnisNaN(val)?0:val}};Ext.data.Record=function(data,id){this.id=(id||id===0)?id:Ext.data.Record.id(this);this.data=data||{}};Ext.data.Record.create=function(o){varf=Ext.extend(Ext.data.Record,{});varp=f.prototype;p.fields=newExt.util.MixedCollection(false,function(field){returnfield.name});for(vari=0,len=o.length;i<len;i++){p.fields.add(newExt.data.Field(o[i]))}f.getField=function(name){returnp.fi
/*
*ExtJSLibrary3.2.1
*Copyright(c)2006-2010ExtJS,Inc.
*licensing@extjs.com
*http://www.extjs.com/license
*/
Ext.data.JsonWriter=Ext.extend(Ext.data.DataWriter,{encode:true,encodeDelete:false,constructor:function(config){Ext.data.JsonWriter.superclass.constructor.call(this,config)},render:function(params,baseParams,data){if(this.encode===true){Ext.apply(params,baseParams);params[this.meta.root]=Ext.encode(data)}else{varjdata=Ext.apply({},baseParams);jdata[this.meta.root]=data;params.jsonData=jdata}},createRecord:function(rec){returnthis.toHash(rec)},updateRecord:function(rec){returnthis.toHash(rec)},destroyRecord:function(rec){if(this.encodeDelete){vardata={};data[this.meta.idProperty]=rec.id;returndata}else{returnrec.id}}});Ext.data.JsonReader=function(meta,recordType){meta=meta||{};Ext.applyIf(meta,{idProperty:"id",successProperty:"success",totalProperty:"total"});Ext.data.JsonReader.superclass.constructor.call(this,meta,recordType||meta.fields)};Ext.extend(Ext.data.JsonReader,Ext.data.DataReader,{read:function(response){varjson=response.responseText;varo=Ext.decode(json);if(!o){throw{message:"JsonReader.read: Json object not found"}}returnthis.readRecords(o)},readResponse:function(action,response){varo=(response.responseText!==undefined)?Ext.decode(response.responseText):response;if(!o){thrownewExt.data.JsonReader.Error("response")}varroot=this.getRoot(o);if(action===Ext.data.Api.actions.create){vardef=Ext.isDefined(root);if(def&&Ext.isEmpty(root)){thrownewExt.data.JsonReader.Error("root-empty",this.meta.root)}else{if(!def){thrownewExt.data.JsonReader.Error("root-undefined-response",this.meta.root)}}}varres=newExt.data.Response({action:action,success:this.getSuccess(o),data:(root)?this.extractData(root,false):[],message:this.getMessage(o),raw:o});if(Ext.isEmpty(res.success)){thrownewExt.data.JsonReader.Error("successProperty-response",this.meta.successProperty)}returnres},readRecords:function(o){this.jsonData=o;if(o.metaData){this.onMetaChange(o.metaData)}vars=this.meta,Record=this.recordType,f=Record.prototype.fields,fi=f.items,fl=f.length,v;varroot=this.getRoot(o),c=root.length,totalRecords=c,success=true;if(s.totalProperty){v=parseInt(this.getTotal(o),10);if(!isNaN(v)){totalRecords=v}}if(s.successProperty){v=this.getSuccess(o);if(v===false||v==="false"){success=false}}return{success:success,records:this.extractData(root,true),totalRecords:totalRecords}},buildExtractors:function(){if(this.ef){return}vars=this.meta,Record=this.recordType,f=Record.prototype.fields,fi=f.items,fl=f.length;if(s.totalProperty){this.getTotal=this.createAccessor(s.totalProperty)}if(s.successProperty){this.getSuccess=this.createAccessor(s.successProperty)}if(s.messageProperty){this.getMessage=this.createAccessor(s.messageProperty)}this.getRoot=s.root?this.createAccessor(s.root):function(p){returnp};if(s.id||s.idProperty){varg=this.createAccessor(s.id||s.idProperty);this.getId=function(rec){varr=g(rec);return(r===undefined||r==="")?null:r}}else{this.getId=function(){returnnull}}varef=[];for(vari=0;i<fl;i++){f=fi[i];varmap=(f.mapping!==undefined&&f.mapping!==null)?f.mapping:f.name;ef.push(this.createAccessor(map))}this.ef=ef},simpleAccess:function(obj,subsc){returnobj[subsc]},createAccessor:function(){varre=/[\[\.]/;returnfunction(expr){if(Ext.isEmpty(expr)){returnExt.emptyFn}if(Ext.isFunction(expr)){returnexpr}vari=String(expr).search(re);if(i>=0){returnnewFunction("obj","return obj"+(i>0?".":"")+expr)}returnfunction(obj){returnobj[expr]}}}(),extractValues:function(data,items,len){varf,values={};for(varj=0;j<len;j++){f=items[j];varv=this.ef[j](data);values[f.name]=f.convert((v!==undefined)?v:f.defaultValue,data)}returnvalues}});Ext.data.JsonReader.Error=Ext.extend(Ext.Error,{constructor:function(message,arg){this.arg=arg;Ext.Error.call(this,message)},name:"Ext.data.JsonReader"});Ext.apply(Ext.data.JsonReader.Error.prototype,{lang:{response:"An error occurred while json-decoding your server response","successProperty-response":'Couldnotlocateyour"successProperty"inyourserverresponse.PleasereviewyourJsonReaderconfigtoensuretheconfig-property"successProperty"matchesthepropertyinyo
Ext.Resizable=Ext.extend(Ext.util.Observable,{constructor:function(el,config){this.el=Ext.get(el);if(config&&config.wrap){config.resizeChild=this.el;this.el=this.el.wrap(typeofconfig.wrap=="object"?config.wrap:{cls:"xresizable-wrap"});this.el.id=this.el.dom.id=config.resizeChild.id+"-rzwrap";this.el.setStyle("overflow","hidden");this.el.setPositioning(config.resizeChild.getPositioning());config.resizeChild.clearPositioning();if(!config.width||!config.height){varcsize=config.resizeChild.getSize();this.el.setSize(csize.width,csize.height)}if(config.pinned&&!config.adjustments){config.adjustments="auto"}}this.proxy=this.el.createProxy({tag:"div",cls:"x-resizable-proxy",id:this.el.id+"-rzproxy"},Ext.getBody());this.proxy.unselectable();this.proxy.enableDisplayMode("block");Ext.apply(this,config);if(this.pinned){this.disableTrackOver=true;this.el.addClass("x-resizable-pinned")}varposition=this.el.getStyle("position");if(position!="absolute"&&position!="fixed"){this.el.setStyle("position","relative")}if(!this.handles){this.handles="s,e,se";if(this.multiDirectional){this.handles+=",n,w"}}if(this.handles=="all"){this.handles="n s e w ne nw se sw"}varhs=this.handles.split(/\s*?[,;]\s*?| /);varps=Ext.Resizable.positions;for(vari=0,len=hs.length;i<len;i++){if(hs[i]&&ps[hs[i]]){varpos=ps[hs[i]];this[pos]=newExt.Resizable.Handle(this,pos,this.disableTrackOver,this.transparent,this.handleCls)}}this.corner=this.southeast;if(this.handles.indexOf("n")!=-1||this.handles.indexOf("w")!=-1){this.updateBox=true}this.activeHandle=null;if(this.resizeChild){if(typeofthis.resizeChild=="boolean"){this.resizeChild=Ext.get(this.el.dom.firstChild,true)}else{this.resizeChild=Ext.get(this.resizeChild,true)}}if(this.adjustments=="auto"){varrc=this.resizeChild;varhw=this.west,he=this.east,hn=this.north,hs=this.south;if(rc&&(hw||hn)){rc.position("relative");rc.setLeft(hw?hw.el.getWidth():0);rc.setTop(hn?hn.el.getHeight():0)}this.adjustments=[(he?-he.el.getWidth():0)+(hw?-hw.el.getWidth():0),(hn?-hn.el.getHeight():0)+(hs?-hs.el.getHeight():0)-1]}if(this.draggable){this.dd=this.dynamic?this.el.initDD(null):this.el.initDDProxy(null,{dragElId:this.proxy.id});this.dd.setHandleElId(this.resizeChild?this.resizeChild.id:this.el.id);if(this.constrainTo){this.dd.constrainTo(this.constrainTo)}}this.addEvents("beforeresize","resize");if(this.width!==null&&this.height!==null){this.resizeTo(this.width,this.height)}else{this.updateChildSize()}if(Ext.isIE){this.el.dom.style.zoom=1}Ext.Resizable.superclass.constructor.call(this)},adjustments:[0,0],animate:false,disableTrackOver:false,draggable:false,duration:0.35,dynamic:false,easing:"easeOutStrong",enabled:true,handles:false,multiDirectional:false,height:null,width:null,heightIncrement:0,widthIncrement:0,minHeight:5,minWidth:5,maxHeight:10000,maxWidth:10000,minX:0,minY:0,pinned:false,preserveRatio:false,resizeChild:false,transparent:false,resizeTo:function(width,height){this.el.setSize(width,height);this.updateChildSize();this.fireEvent("resize",this,width,height,null)},startSizing:function(e,handle){this.fireEvent("beforeresize",this,e);if(this.enabled){if(!this.overlay){this.overlay=this.el.createProxy({tag:"div",cls:"x-resizable-overlay",html:" "},Ext.getBody());this.overlay.unselectable();this.overlay.enableDisplayMode("block");this.overlay.on({scope:this,mousemove:this.onMouseMove,mouseup:this.onMouseUp})}this.overlay.setStyle("cursor",handle.el.getStyle("cursor"));this.resizing=true;this.startBox=this.el.getBox();this.startPoint=e.getXY();this.offsets=[(this.startBox.x+this.startBox.width)-this.startPoint[0],(this.startBox.y+this.startBox.height)-this.startPoint[1]];this.overlay.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.overlay.show();if(this.constrainTo){varct=Ext.get(this.constrainTo);this.resizeRegion=ct.getRegion().adjust(ct.getFrameWidth("t"),ct.getFrameWidth("l"),-ct.getFrameWidth("b"),-ct.getFrameWidth("r"))}this.proxy.setStyle("visibility","hidden");this.proxy.show();this.proxy.setBox(this.startBox);if(!this.dynamic){this.proxy.setStyle("visibility","visi
Ext.form.Field=Ext.extend(Ext.BoxComponent,{invalidClass:"x-form-invalid",invalidText:"The value in this field is invalid",focusClass:"x-form-focus",validationEvent:"keyup",validateOnBlur:true,validationDelay:250,defaultAutoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off"},fieldClass:"x-form-field",msgTarget:"qtip",msgFx:"normal",readOnly:false,disabled:false,submitValue:true,isFormField:true,msgDisplay:"",hasFocus:false,initComponent:function(){Ext.form.Field.superclass.initComponent.call(this);this.addEvents("focus","blur","specialkey","change","invalid","valid")},getName:function(){returnthis.rendered&&this.el.dom.name?this.el.dom.name:this.name||this.id||""},onRender:function(ct,position){if(!this.el){varcfg=this.getAutoCreate();if(!cfg.name){cfg.name=this.name||this.id}if(this.inputType){cfg.type=this.inputType}this.autoEl=cfg}Ext.form.Field.superclass.onRender.call(this,ct,position);if(this.submitValue===false){this.el.dom.removeAttribute("name")}vartype=this.el.dom.type;if(type){if(type=="password"){type="text"}this.el.addClass("x-form-"+type)}if(this.readOnly){this.setReadOnly(true)}if(this.tabIndex!==undefined){this.el.dom.setAttribute("tabIndex",this.tabIndex)}this.el.addClass([this.fieldClass,this.cls])},getItemCt:function(){returnthis.itemCt},initValue:function(){if(this.value!==undefined){this.setValue(this.value)}else{if(!Ext.isEmpty(this.el.dom.value)&&this.el.dom.value!=this.emptyText){this.setValue(this.el.dom.value)}}this.originalValue=this.getValue()},isDirty:function(){if(this.disabled||!this.rendered){returnfalse}returnString(this.getValue())!==String(this.originalValue)},setReadOnly:function(readOnly){if(this.rendered){this.el.dom.readOnly=readOnly}this.readOnly=readOnly},afterRender:function(){Ext.form.Field.superclass.afterRender.call(this);this.initEvents();this.initValue()},fireKey:function(e){if(e.isSpecialKey()){this.fireEvent("specialkey",this,e)}},reset:function(){this.setValue(this.originalValue);this.clearInvalid()},initEvents:function(){this.mon(this.el,Ext.EventManager.useKeydown?"keydown":"keypress",this.fireKey,this);this.mon(this.el,"focus",this.onFocus,this);this.mon(this.el,"blur",this.onBlur,this,this.inEditor?{buffer:10}:null)},preFocus:Ext.emptyFn,onFocus:function(){this.preFocus();if(this.focusClass){this.el.addClass(this.focusClass)}if(!this.hasFocus){this.hasFocus=true;this.startValue=this.getValue();this.fireEvent("focus",this)}},beforeBlur:Ext.emptyFn,onBlur:function(){this.beforeBlur();if(this.focusClass){this.el.removeClass(this.focusClass)}this.hasFocus=false;if(this.validationEvent!==false&&(this.validateOnBlur||this.validationEvent=="blur")){this.validate()}varv=this.getValue();if(String(v)!==String(this.startValue)){this.fireEvent("change",this,v,this.startValue)}this.fireEvent("blur",this);this.postBlur()},postBlur:Ext.emptyFn,isValid:function(preventMark){if(this.disabled){returntrue}varrestore=this.preventMark;this.preventMark=preventMark===true;varv=this.validateValue(this.processValue(this.getRawValue()));this.preventMark=restore;returnv},validate:function(){if(this.disabled||this.validateValue(this.processValue(this.getRawValue()))){this.clearInvalid();returntrue}returnfalse},processValue:function(value){returnvalue},validateValue:function(value){varerror=this.getErrors(value)[0];if(error==undefined){returntrue}else{this.markInvalid(error);returnfalse}},getErrors:function(){return[]},getActiveError:function(){returnthis.activeError||""},markInvalid:function(msg){if(this.rendered&&!this.preventMark){msg=msg||this.invalidText;varmt=this.getMessageHandler();if(mt){mt.mark(this,msg)}else{if(this.msgTarget){this.el.addClass(this.invalidClass);vart=Ext.getDom(this.msgTarget);if(t){t.innerHTML=msg;t.style.display=this.msgDisplay}}}}this.setActiveError(msg)},clearInvalid:function(){if(this.rendered&&!this.preventMark){this.el.removeClass(this.invalidClass);varmt=this.getMessageHandler();if(mt){mt.clear(this)}else{if(this.msgTarget){this.el.removeClass(this.invalidClass);vart=Ext.getDom(this.msgTarget);if(t){t.innerHTML="";t.style.displa
if(typeofGENTICS=="undefined"||!GENTICS){varGENTICS={}}if(typeofGENTICS.Utils=="undefined"||!GENTICS){GENTICS.Utils={}}GENTICS.Utils.RangeObject=function(param){this.startContainer;this.startOffset;this.endContainer;this.endOffset;this.startParents=[];this.endParents=[];this.rangeTree=[];if(typeofparam==="object"){if(param.startContainer!==undefined){this.startContainer=param.startContainer}if(param.startOffset!==undefined){this.startOffset=param.startOffset}if(param.endContainer!==undefined){this.endContainer=param.endContainer}if(param.endOffset!==undefined){this.endOffset=param.endOffset}}else{if(param===true){this.initializeFromUserSelection()}}};GENTICS.Utils.RangeObject.prototype.log=function(message,obj){if(GENTICS&&GENTICS.Aloha&&GENTICS.Aloha.Log){GENTICS.Aloha.Log.debug(this,message);returnfalse}if(console){console.log(message);if(obj){console.log(obj)}}};GENTICS.Utils.RangeObject.prototype.isCollapsed=function(){return(!this.endContainer||(this.startContainer===this.endContainer&&this.startOffset===this.endOffset))};GENTICS.Utils.RangeObject.prototype.getCommonAncestorContainer=function(){if(this.commonAncestorContainer){returnthis.commonAncestorContainer}this.updateCommonAncestorContainer();returnthis.commonAncestorContainer};GENTICS.Utils.RangeObject.prototype.getContainerParents=function(limit,fromEnd){varcontainer=fromEnd?this.endContainer:this.startContainer;varparentStore=fromEnd?this.endParents:this.startParents;if(!container){returnfalse}if(typeoflimit=="undefined"){limit=jQuery("body")}if(!parentStore[limit.get(0)]){varparents;if(container.nodeType==3){parents=jQuery(container).parents()}else{parents=jQuery(container).parents();for(vari=parents.length;i>0;--i){parents[i]=parents[i-1]}parents[0]=container}varlimitIndex=parents.index(limit);if(limitIndex>=0){parents=parents.slice(0,limitIndex)}parentStore[limit.get(0)]=parents}returnparentStore[limit.get(0)]};GENTICS.Utils.RangeObject.prototype.getStartContainerParents=function(limit){returnthis.getContainerParents(limit,false)};GENTICS.Utils.RangeObject.prototype.getEndContainerParents=function(limit){returnthis.getContainerParents(limit,true)};GENTICS.Utils.RangeObject.prototype.updateCommonAncestorContainer=function(commonAncestorContainer){varparentsStartContainer=this.getStartContainerParents();varparentsEndContainer=this.getEndContainerParents();if(!commonAncestorContainer){if(!(parentsStartContainer.length>0&&parentsEndContainer.length>0)){GENTICS.Utils.RangeObject.prototype.log("could not find commonAncestorContainer");returnfalse}for(vari=0;i<parentsStartContainer.length;i++){if(parentsEndContainer.index(parentsStartContainer[i])!=-1){this.commonAncestorContainer=parentsStartContainer[i];break}}}else{this.commonAncestorContainer=commonAncestorContainer}GENTICS.Utils.RangeObject.prototype.log(commonAncestorContainer?"commonAncestorContainer was set successfully":"commonAncestorContainer was calculated successfully");returntrue};GENTICS.Utils.RangeObject.prototype.getCollapsedIERange=function(container,offset){varieRange=document.body.createTextRange();varleft=this.searchElementToLeft(container,offset);if(left.element){vartmpRange=document.body.createTextRange();tmpRange.moveToElementText(left.element);ieRange.setEndPoint("StartToEnd",tmpRange);if(left.characters!=0){ieRange.moveStart("character",left.characters)}else{ieRange.moveStart("character",1);ieRange.moveStart("character",-1)}}else{varright=this.searchElementToRight(container,offset);if(false&&right.element){vartmpRange=document.body.createTextRange();tmpRange.moveToElementText(right.element);ieRange.setEndPoint("StartToStart",tmpRange);if(right.characters!=0){ieRange.moveStart("character",-right.characters)}else{ieRange.moveStart("character",-1);ieRange.moveStart("character",1)}}else{varparent=container.nodeType==3?container.parentNode:container;vartmpRange=document.body.createTextRange();tmpRange.moveToElementText(parent);ieRange.setEndPoint("StartToStart",tmpRange);if(left.characters!=0){ieRange.moveStart("character",left.characters)}}}ieRange.collapse();r
if(typeofGENTICS=="undefined"||!GENTICS){varGENTICS={}}GENTICS.Aloha=function(){};GENTICS.Aloha.setAutobase=function(){varscriptTags=jQuery("script");varpath=scriptTags[scriptTags.length-1].src.split("?")[0];path=path.split("/");varsubstitute=1;if("core"===path[path.length-2]){substitute=2}GENTICS.Aloha.prototype.autobase=path.slice(0,substitute*-1).join("/")+"/"};GENTICS.Aloha.setAutobase();GENTICS.Aloha.prototype.version="nightly";GENTICS.Aloha.prototype.editables=[];GENTICS.Aloha.prototype.activeEditable=null;GENTICS.Aloha.prototype.ready=false;GENTICS.Aloha.prototype.dictionaries={};GENTICS.Aloha.prototype.settings={};GENTICS.Aloha.prototype.OSName="Unknown";GENTICS.Aloha.prototype.readyCallbacks=[];GENTICS.Aloha.prototype.init=function(){if(jQuery.browser.webkit&&parseFloat(jQuery.browser.version)<532.5||jQuery.browser.mozilla&&parseFloat(jQuery.browser.version)<1.9||jQuery.browser.msie&&jQuery.browser.version<7||jQuery.browser.opera){alert("Sorry, your browser is not supported at the moment.");return}varthat=this;jQuery("html").mousedown(function(){if(that.activeEditable&&!that.isMessageVisible()){that.activeEditable.blur();that.FloatingMenu.setScope("GENTICS.Aloha.empty");that.activeEditable=null}});if(typeofthis.settings.base=="undefined"||!this.settings.base){this.settings.base=GENTICS.Aloha.autobase;if(typeofGENTICS_Aloha_base!="undefined"){this.settings.base=GENTICS_Aloha_base}}this.Log.init();if(!(this.settings.errorhandling==false)){window.onerror=function(msg,url,linenumber){GENTICS.Aloha.Log.error(GENTICS.Aloha,"Error message: "+msg+"\nURL: "+url+"\nLine Number: "+linenumber);returntrue}}if(navigator.appVersion.indexOf("Win")!=-1){this.OSName="Win"}if(navigator.appVersion.indexOf("Mac")!=-1){this.OSName="Mac"}if(navigator.appVersion.indexOf("X11")!=-1){this.OSName="Unix"}if(navigator.appVersion.indexOf("Linux")!=-1){this.OSName="Linux"}this.initI18n();this.PluginRegistry.init();this.RepositoryManager.init();this.Ribbon.init();this.FloatingMenu.init();Ext.MessageBox.buttonText.yes=GENTICS.Aloha.i18n(this,"yes");Ext.MessageBox.buttonText.no=GENTICS.Aloha.i18n(this,"no");Ext.MessageBox.buttonText.cancel=GENTICS.Aloha.i18n(this,"cancel");Ext.ux.AlohaAttributeField.prototype.listEmptyText=GENTICS.Aloha.i18n(GENTICS.Aloha,"repository.no_item_found");Ext.ux.AlohaAttributeField.prototype.loadingText=GENTICS.Aloha.i18n(GENTICS.Aloha,"repository.loading")+"...";this.ready=true;for(vari=0;i<this.editables.length;i++){if(!this.editables[i].ready){this.editables[i].init()}}GENTICS.Aloha.EventRegistry.trigger(newGENTICS.Aloha.Event("ready",GENTICS.Aloha,null))};GENTICS.Aloha.prototype.activateEditable=function(editable){for(vari=0;i<this.editables.length;i++){if(this.editables[i]!=editable&&this.editables[i].isActive){varoldActive=this.editables[i];this.editables[i].blur()}}this.activeEditable=editable};GENTICS.Aloha.prototype.getActiveEditable=function(){returnthis.activeEditable};GENTICS.Aloha.prototype.deactivateEditable=function(){if(typeofthis.activeEditable=="undefined"||this.activeEditable==null){return}this.activeEditable.blur();this.FloatingMenu.setScope("GENTICS.Aloha.empty");this.activeEditable=null};GENTICS.Aloha.prototype.getEditableById=function(id){for(vari=0;i<GENTICS.Aloha.editables.length;i++){if(GENTICS.Aloha.editables[i].getId()==id){returnGENTICS.Aloha.editables[i]}}returnnull};GENTICS.Aloha.prototype.log=function(level,component,message){GENTICS.Aloha.Log.log(level,component,message)};GENTICS.Aloha.prototype.identStr=function(object){if(objectinstanceofjQuery){object=object[0]}if(!(objectinstanceofHTMLElement)){GENTICS.Aloha.Log.warn(this,"{"+object.toString()+"} provided is not an HTML element");returnobject.toString()}varout=object.tagName.toLowerCase();if(object.id){returnout+"#"+object.id}if(object.className){returnout+"."+object.className}returnout};GENTICS.Aloha.prototype.trim=function(str){str=str.replace(/^\s+/,"");for(vari=str.length-1;i>=0;i--){if(/\S/.test(str.charAt(i))){str=str.substring(0,i+1);break}}returnstr};GENTICS.Aloha.prototype.initI18n=function(){
GENTICS.Aloha.PluginRegistry=function(){this.plugins=[]};GENTICS.Aloha.PluginRegistry.prototype.register=function(plugin){if(plugininstanceofGENTICS.Aloha.Plugin){this.plugins.push(plugin)}};GENTICS.Aloha.PluginRegistry.prototype.init=function(){for(vari=0;i<this.plugins.length;i++){varplugin=this.plugins[i];if(GENTICS.Aloha.settings.plugins==undefined){GENTICS.Aloha.settings.plugins={}}plugin.settings=GENTICS.Aloha.settings.plugins[plugin.prefix];if(plugin.settings==undefined){plugin.settings={}}if(plugin.settings.enabled==undefined){plugin.settings.enabled=true}varactualLanguage=plugin.languages?GENTICS.Aloha.getLanguage(GENTICS.Aloha.settings.i18n.current,plugin.languages):null;if(!actualLanguage){GENTICS.Aloha.Log.warn(this,"Could not determine actual language, no languages available for plugin "+plugin)}else{varfileUrl=GENTICS.Aloha.settings.base+"plugins/"+plugin.basePath+"/i18n/"+actualLanguage+".dict";GENTICS.Aloha.loadI18nFile(fileUrl,plugin)}if(plugin.settings.enabled==true){this.plugins[i].init()}}};GENTICS.Aloha.PluginRegistry.prototype.makeClean=function(obj){for(vari=0;i<this.plugins.length;i++){varplugin=this.plugins[i];if(GENTICS.Aloha.Log.isDebugEnabled()){GENTICS.Aloha.Log.debug(this,"Passing contents of HTML Element with id { "+obj.attr("id")+" } for cleaning to plugin { "+plugin.prefix+" }")}plugin.makeClean(obj)}};GENTICS.Aloha.PluginRegistry=newGENTICS.Aloha.PluginRegistry();GENTICS.Aloha.PluginRegistry.toString=function(){return"com.gentics.aloha.PluginRegistry"};GENTICS.Aloha.Plugin=function(pluginPrefix,basePath){this.prefix=pluginPrefix;this.basePath=basePath?basePath:pluginPrefix;GENTICS.Aloha.PluginRegistry.register(this)};GENTICS.Aloha.Plugin.prototype.settings=null;GENTICS.Aloha.Plugin.prototype.init=function(){};GENTICS.Aloha.Plugin.prototype.getEditableConfig=function(obj){varconfig=[];varconfigSpecified=false;if(this.settings.editables){jQuery.each(this.settings.editables,function(selector,selectorConfig){if(obj.is(selector)){configSpecified=true;config=jQuery.merge(config,selectorConfig)}})}if(!configSpecified){if(typeofthis.settings.config=="undefined"||!this.settings.config){config=this.config}else{config=this.settings.config}}returnconfig};GENTICS.Aloha.Plugin.prototype.makeClean=function(obj){};GENTICS.Aloha.Plugin.prototype.getUID=function(id){returnthis.prefix+"."+id};GENTICS.Aloha.Plugin.prototype.i18n=function(key,replacements){returnGENTICS.Aloha.i18n(this,key,replacements)};GENTICS.Aloha.Plugin.prototype.toString=function(){returnthis.prefix};GENTICS.Aloha.Plugin.prototype.log=function(level,message){GENTICS.Aloha.Log.log(level,this,message)};
jQuery.fn.zap=function(){returnthis.each(function(){jQuery(this.childNodes).insertBefore(this)}).remove()};jQuery.fn.textNodes=function(excludeBreaks,includeEmptyTextNodes){varret=[];(function(el){if((el.nodeType==3&&jQuery.trim(el.data)!=""&&!includeEmptyTextNodes)||(el.nodeType==3&&includeEmptyTextNodes)||(el.nodeName=="BR"&&!excludeBreaks)){ret.push(el)}else{for(vari=0;i<el.childNodes.length;++i){arguments.callee(el.childNodes[i])}}})(this[0]);returnjQuery(ret)};GENTICS.Aloha.Selection=function(){this.rangeObject={};this.tagHierarchy={textNode:[],abbr:["textNode"],b:["textNode","b","i","em","sup","sub","br","span","img","a","del","ins","u","cite","q","code","abbr","strong"],pre:["textNode","b","i","em","sup","sub","br","span","img","a","del","ins","u","cite","q","code","abbr","code"],blockquote:["textNode","b","i","em","sup","sub","br","span","img","a","del","ins","u","cite","q","code","abbr","p","h1","h2","h3","h4","h5","h6"],ins:["textNode","b","i","em","sup","sub","br","span","img","a","u","p","h1","h2","h3","h4","h5","h6"],ul:["li"],ol:["li"],li:["textNode","b","i","em","sup","sub","br","span","img","ul","ol","h1","h2","h3","h4","h5","h6","del","ins","u"],tr:["td","th"],table:["tr"],div:["textNode","b","i","em","sup","sub","br","span","img","ul","ol","table","h1","h2","h3","h4","h5","h6","del","ins","u","p","div","pre","blockquote"],h1:["textNode","b","i","em","sup","sub","br","span","img","a","del","ins","u"]};this.tagHierarchy={textNode:this.tagHierarchy.textNode,abbr:this.tagHierarchy.abbr,br:this.tagHierarchy.textNode,img:this.tagHierarchy.textNode,b:this.tagHierarchy.b,strong:this.tagHierarchy.b,code:this.tagHierarchy.b,q:this.tagHierarchy.b,blockquote:this.tagHierarchy.blockquote,cite:this.tagHierarchy.b,i:this.tagHierarchy.b,em:this.tagHierarchy.b,sup:this.tagHierarchy.b,sub:this.tagHierarchy.b,span:this.tagHierarchy.b,del:this.tagHierarchy.del,ins:this.tagHierarchy.ins,u:this.tagHierarchy.b,p:this.tagHierarchy.b,pre:this.tagHierarchy.pre,a:this.tagHierarchy.b,ul:this.tagHierarchy.ul,ol:this.tagHierarchy.ol,li:this.tagHierarchy.li,td:this.tagHierarchy.li,div:this.tagHierarchy.div,h1:this.tagHierarchy.h1,h2:this.tagHierarchy.h1,h3:this.tagHierarchy.h1,h4:this.tagHierarchy.h1,h5:this.tagHierarchy.h1,h6:this.tagHierarchy.h1,table:this.tagHierarchy.table};this.replacingElements={h1:["p","h1","h2","h3","h4","h5","h6","pre"],blockquote:["blockquote"]};this.replacingElements={h1:this.replacingElements.h1,h2:this.replacingElements.h1,h3:this.replacingElements.h1,h4:this.replacingElements.h1,h5:this.replacingElements.h1,h6:this.replacingElements.h1,pre:this.replacingElements.h1,p:this.replacingElements.h1,blockquote:this.replacingElements.blockquote};this.allowedToStealElements={h1:["textNode"]};this.allowedToStealElements={h1:this.allowedToStealElements.h1,h2:this.allowedToStealElements.h1,h3:this.allowedToStealElements.h1,h4:this.allowedToStealElements.h1,h5:this.allowedToStealElements.h1,h6:this.allowedToStealElements.h1,p:this.tagHierarchy.b}};GENTICS.Aloha.Selection.prototype.SelectionTree=function(){this.domobj={};this.selection;this.children=[]};GENTICS.Aloha.Selection.prototype.onChange=function(objectClicked,event){if(this.updateSelectionTimeout){window.clearTimeout(this.updateSelectionTimeout);this.updateSelectionTimeout=undefined}this.updateSelectionTimeout=window.setTimeout(function(){GENTICS.Aloha.Selection.updateSelection(event)},5)};GENTICS.Aloha.Selection.prototype.updateSelection=function(event){varrangeObject=this.rangeObject=newGENTICS.Aloha.Selection.SelectionRange(true);rangeObject.update();GENTICS.Aloha.FloatingMenu.setScope("GENTICS.Aloha.continuoustext");GENTICS.Aloha.EventRegistry.trigger(newGENTICS.Aloha.Event("selectionChanged",GENTICS.Aloha,[rangeObject,event]));returntrue};GENTICS.Aloha.Selection.prototype.getSelectionTree=function(rangeObject){if(!rangeObject){returnthis.rangeObject.getSelectionTree()}if(!rangeObject.commonAncestorContainer){GENTICS.Aloha.Log.error(this,"the rangeObject is missing the commonAncestorContainer");returnfalse}this.inselection=false;if(GENTICS.Uti
GENTICS.Aloha.RepositoryManager=function(){this.repositories=[]};GENTICS.Aloha.RepositoryManager.prototype.openCallbacks=[];GENTICS.Aloha.RepositoryManager.prototype.init=function(){if(GENTICS.Aloha.settings.repositories==undefined){GENTICS.Aloha.settings.repositories={}}for(vari=0;i<this.repositories.length;i++){varrepository=this.repositories[i];if(repository.settings==undefined){repository.settings={}}if(GENTICS.Aloha.settings.repositories[repository.repositoryId]){jQuery.extend(repository.settings,GENTICS.Aloha.settings.repositories[repository.repositoryId])}repository.init()}};GENTICS.Aloha.RepositoryManager.prototype.register=function(repository){if(repositoryinstanceofGENTICS.Aloha.Repository){if(!this.getRepository(repository.repositoryId)){this.repositories.push(repository)}else{GENTICS.Aloha.Log.warn(this,"A repository with name { "+repository.repositoryId+" } already registerd. Ignoring this.")}}else{GENTICS.Aloha.Log.error(this,"Trying to register a repository which is not an instance of GENTICS.Aloha.Repository.")}};GENTICS.Aloha.RepositoryManager.prototype.getRepository=function(repositoryId){for(vari=0;i<this.repositories.length;i++){if(this.repositories[i].repositoryId==repositoryId){returnthis.repositories[i]}}returnnull};GENTICS.Aloha.RepositoryManager.prototype.query=function(params,callback){varthat=this;varallitems=[];varrepositories=[];this.openCallbacks=[];vartimer=setTimeout(function(){that.openCallbacks=[];that.queryCallback(callback,allitems,timer)},5000);if(params.repositoryId){repositories.push(this.getRepository(params.repositoryId))}else{repositories=this.repositories}for(vari=0;i<repositories.length;i++){this.openCallbacks.push(repositories[i].repositoryId);try{varnotImplemented=repositories[i].query(params,function(items){varid=that.openCallbacks.indexOf(this.repositoryId);if(id!=-1){that.openCallbacks.splice(id,1)}if(!items.length==0&&!items[0].repositoryId){for(varj=0;j<items.length;j++){items[j].repositoryId=this.repositoryId}}jQuery.merge(allitems,items);that.queryCallback(callback,allitems,timer)})}catch(e){notImplemented=true}if(notImplemented){varid=that.openCallbacks.indexOf(repositories[i].repositoryId);if(id!=-1){this.openCallbacks.splice(id,1);if(i==repositories.length-1){this.queryCallback(callback,allitems,timer)}}}}};GENTICS.Aloha.RepositoryManager.prototype.queryCallback=function(cb,items,timer){if(this.openCallbacks.length==0){clearTimeout(timer);items.sort(function(a,b){returnb.weight-a.weight});varresult={results:items.length,items:items};cb.call(this,result)}};GENTICS.Aloha.RepositoryManager.prototype.getChildren=function(params,callback){varthat=this;varallitems=[];varrepositories=[];this.openChildrenCallbacks=[];if(params.inFolderId=="aloha"&&this.repositories.length>0){varrepos=[];for(vari=0;i<this.repositories.length;i++){repos.push(newGENTICS.Aloha.Repository.Folder({id:this.repositories[i].repositoryId,name:this.repositories[i].repositoryName,repositoryId:this.repositories[i].repositoryId,type:"repository",hasMoreItems:true}))}that.getChildrenCallback(callback,repos,null);return}vartimer=setTimeout(function(){that.openChildrenCallbacks=[];that.getChildrenCallback(callback,allitems,timer)},5000);if(params.repositoryId){repositories.push(this.getRepository(params.repositoryId))}else{repositories=this.repositories}for(vari=0;i<repositories.length;i++){this.openChildrenCallbacks.push(repositories[i].repositoryId);try{varnotImplemented=repositories[i].getChildren(params,function(items){varid=that.openChildrenCallbacks.indexOf(this.repositoryId);if(id!=-1){that.openChildrenCallbacks.splice(id,1)}jQuery.merge(allitems,items);that.getChildrenCallback(callback,allitems,timer)})}catch(e){notImplemented=true}if(notImplemented){varid=that.openChildrenCallbacks.indexOf(repositories[i].repositoryId);if(id!=-1){this.openChildrenCallbacks.splice(id,1);if(i==repositories.length-1){this.getChildrenCallback(callback,allitems,timer)}}}}};GENTICS.Aloha.RepositoryManager.prototype.getChildrenCallback=function(cb,items,timer){if(this.openChildrenCallbacks.le