﻿-function($,$w,$d,$cs){(($d=document,$w=window).Ucren?($=Ucren):(Ucren=$={lastId:0,version:"3.6.6",Config:{topzIndex:2000,layerzIndexs:{menubar:10,combobox:9,treeview:8,slidebar:8}}}))^function(){var _;($.appPath=(_=function(){var A,C,_,B;return((A=$d.getElementsByTagName("script"))^(_=(C=(A=A[A.length-1]).getAttribute("src")).match(/(.*?)boot\.js/i)[1])^(B=(B=C.match(/(\?|&)skin=([^&]+)(&|$)/i))?B[2]:"default")^($.ipts={})^A.innerHTML.replace(/\s*import\s+([a-zA-Z0-9\.]+);/g,function(_,A){return($.ipts[A]=1,_)}),{appPath:_,skinName:B})}()).appPath)^($.currentSkin=_.skinName)^($.id=function(){return"ucren-temp-"+($.lastId++)})^($.apply=function(_,A,B){B=B||{};for(var $ in A)(B&&($ in B))||(_[$]=A[$]);return _})^($.extend=function(A,_){A.prototype=$.apply({},_);return A})^($.nameSpace=function(A,_){(_=$w)^(A=A.split("."));for(var $=0;$<A.length;$++)((_[A[$]]||(_[A[$]]={})),_=_[A[$]])})^($.Import=function(A,_,B){A in $.ipts&&typeof(_)=="function"&&_();(!(A in $.ipts)||_===true)&&(A=$.appPath+"classes/"+A.replace((_===true||($.ipts[A]=1),/^Ucren\.|\.js$/i),"").replace(/\./g,"/")+".js")&&(typeof(_)=="function"?$.remoteCallScript(A,true,_):$d.write("<script type='text/javascript' src='"+A+"'></script>"))})^($.clone=function(_){var A,B;_.constructor==Array?(A=_.slice(0)):(((B=function(){}).prototype=_)^(A=new B()));$.each(A,function(B,_){typeof(_)=="object"&&(A[B]=$.clone(A[B]))});return A})^($.each=function(A,_){_=_.createDelegate(A);for(var $ in A)($ in{})||_($,A[$])})^($.clear=function(_){$.each(_,function(A,$){delete _[A]})})^($.init=function(){($.init=function(){})^($w.BODY=$.get("#body"))^($w.HEAD=$.get(($w.ROOT=HASDOCTYPE?$.get($d.documentElement):BODY,"#head")))})^$d.write("<link rel='stylesheet' href='"+$.appPath+"resource/skins/"+$.currentSkin+"/interface.css"+"' type='text/css' media='all' />");return 1}()^($.CommonFunctions={queryString:function(C,$){var B,_,A;return(A=B.match((_=new RegExp("(\\?|&)"+(C=((B=$||location.href),C).uniEncode())+"=([^&]+)(&|$)","i"))))?A[2]:""},getLocationHash:function(){var $,_;return($=(_=location.href).lastIndexOf("#"))>-1?_.slice($+1):""},randomNumber:function($){return Math.floor(Math.random()*$)},randomWord:function(C,B){var A,_="";A=B||"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var $=0;$<C;$++)_+=A.charAt(this.randomNumber(A.length));return _},loadingImage:function(E,B,D){var $,_,C;[($=E.length)^(_=false)^(C=0),($<1)?((_=true)&&B&&B()):F()];function A(){(++C)==$?((_=true)&&B&&B()):F.defer(1)}function F(){var B=new Image(),_;ISFF&&(_=A.defer(2000));B.onload=function(){ISFF&&clearTimeout(_);D&&D(C/$);A()};B.onerror=function(){A()};B.src=E[C]}}})^function(){this.uniEncode=function(){var _,A;(A=[])^(_=this);for(var $=0;$<_.length;$++)[A[$]=_.charCodeAt($).toString(16),(A[$].length%2)&&(A[$]="0"+A[$]),A[$]="\\"+"xu".charAt(A[$].length/2-1)+A[$]];return A.join("")};this.htmlEncode=function(){var $;return(($=$d.createElement("div")).appendChild($d.createTextNode(this)),$).innerHTML};this.toArray=function(){return this.split("")};this.byteLength=function(){return this.replace(/[^\x00-\xff]/g,"--").length};this.trim=function(){return this.replace(/^\s+|\s+$/,"")};this.reverse=function(){return this.split("").reverse().join("")};return true}.call(String.prototype)^function(){this.createDelegate=function($){var _=this;return function(){return _.apply($,arguments)}};this.defer=function(B,_,C){var A,$;return((A=this.createDelegate(_))^($=$w[C?"setInterval":"setTimeout"]),$(A,B))};return true}.call(Function.prototype)^function(){this.sortBy=function(_){var $=this.copy();switch(_){case"asc":$.sort(function($,_){return $>_?1:-1});break;case"desc":$.sort(function($,_){return $<_?1:-1});break}return $};this.copy=function(){return this.slice(0)};this.indexOf=function(A,B){var $=this.length;for(var _=(B<0)?Math.max(0,$+B):B||0;_<$;_++)if(this[_]===A)return _;return-1};this.insertBefore=function($,_){return this.slice(0,$).concat([_]).concat(this.slice($,this.length))};this.del=function(A){switch(typeof(A)){case"number":return A<0?this:this.slice(0,A).concat(this.slice(A+1,this.length));break;case"object":if(A instanceof Array){var _=this.copy();A=A.sortBy("desc");for(var $=0;$<A.length;$++)_=_.del(A[$]);return _}break}};return true}.call(Array.prototype)^function(){this.toDateTimeString=function(){return[[this.getFullYear(),this.getMonth()+1,this.getDate()].join("-"),[this.getHours(),this.getMinutes(),this.getSeconds()].join(":")].join(" ")};return true}.call(Date.prototype)^($.EventManager={EventObject:function(_){if(!(_=_||$w.event)){var $=this.Event.caller;while($){if((_=$.arguments[0])&&Event==_.constructor)break;$=$.caller}}_.srcDom=_.srcElement||_.target;_.cancel=function(){this.cancelBubble=true;ISFF&&(this.preventDefault(),this.stopPropagation())};return _},addEvent:function($,_,C){if(typeof($.dom)=="function")$=$.dom();var A=function(){return C.call($)};try{ISIE?$.attachEvent("on"+_,A):$.addEventListener(_,A,false)}catch(B){}return A},deleteEvent:function($,A,_){try{ISIE?$.detachEvent("on"+A,_):$.removeEventListener(A,_,false)}catch(B){}},Listen:function(A,_){if(A())return _();-function(){this.Listen(A,_)}.defer(64,$,false)},onReady:function(){/msie/i.test(navigator.userAgent)?-function(){if($d.readyState!="complete")return $w.setTimeout(arguments.callee,10);$.init()}():$d.addEventListener("DOMContentLoaded",$.init.createDelegate(this),false);return function(_){$.Listen(function(){return $w.BODY},_)}}(),onTouch:function(C,B,A,_){var D;typeof(C[B])=="function"?((C[D="__patch__"+$.randomWord(16)]=C[B],C[B]=function(){var $=arguments;_&&A.apply(this,$)===false||this[D].apply(this,$),_||A.apply(this,$)}).toString=function(){return C[D].toString()}):(C[B]=A)}})^($.CSSManager={appendCSSFile:function($){HEAD.createElement("link",{},{rel:"stylesheet",href:$,type:"text/css"})}})^($.ElementManager={getElement:function(A,B){if(A&&typeof(A)=="object"&&A.type=="uobject")return A;var _,C;switch(A){case"#html":_=$d.getElementsByTagName("html")[0];break;case"#head":_=$d.getElementsByTagName("head")[0];break;case"#body":_=$d.body;break;default:_=typeof(A)=="string"?$d.getElementById(A):A}if(B)return _;return(!_||_===$d||_.nodeName=="#text")?null:(("c-"+((C=_.getAttribute("id"))||_.setAttribute("id",C=$.id()),C))in $.ElementManager.Cache)?$.ElementManager.Cache["c-"+C]:($.ElementManager.Cache["c-"+C]=new $.ElementManager.Element(_))},Cache:{},Element:function($){(this.id=$.getAttribute("id"))^(this._dom=$)^(this.type="uobject")^this.refresh()}})^($.DataManager={DataVess:function(_){(this._fields=(_||(_={}),_).fields||[])^(this._fieldIndexs={})^(this.pointer=0)^(this.data=_.records||[]);for(var $=this._fields.length-1;$>-1;$--)this._fieldIndexs["field_"+this._fields[$]]=$;this.count=this.data.length},String:{buildBy:function(){var _,A;_=Array.prototype.join.call(arguments,"");return new $.DataManager.String.Cons(_)},Cons:function($){this.value=$}},JSON:{decode:function(json){return eval("("+json+")")}}})^($.HandleManager={createHandle:function(_){$.HandleManager[_.handleId=$.id()]=_},removeHandle:function(_){_.handleId&&(delete $.HandleManager[_.handleId])&&(delete _.handleId)}})^$.extend($.DataManager.String.Cons,{type:"ustring",replace:function(_){var A=this.value;$.each(_,function(_,$){A=A.replace(new RegExp("@{"+_.uniEncode()+"}","g"),$)});return A}})^($.String=$.DataManager.String.buildBy)^($.WindowsManager={hidenDiv:null,isLocked:false,currentWindow:null,template:$.String("<table cellspacing=\"0\" cellpadding=\"0\">","<tr><td class=\"win-lt\"></td><td class=\"win-t\"></td><td class=\"win-rt\"></td></tr>","<tr><td class=\"win-l\"></td><td class=\"win-body\" align=\"left\" valign=\"top\" style=\"width:@{width}px;height:@{height}px;\">","<div class=\"win-title\" onselectstart=\"return false\"><div class=\"win-ico\">@{btnshtml}</div>@{icon}<div class=\"ucren-textellipsis caption\" style=\"width:@{captionwidth}px;\">@{caption}</div></div>","<div class=\"resbar\"></div>","</td><td class=\"win-r\"></td></tr>","<tr><td class=\"win-lb\"></td><td class=\"win-b\"></td><td class=\"win-rb\"></td></tr>","</table>"),recordDefaultSize:function(_){(_._defaultsize||(_._defaultsize={}))&&$.apply(_._defaultsize,{width:_.width,height:_.height,left:_.left,top:_.top})},Cons:function(A){$.init();var B=this;this.config=A;this.isFixedMax=false;this.isDialog=A.isDialog;this.visible=false;this.maxed=false;this.isCurrent=false;this.width=A.width||0;this.height=A.height||0;this.left=A.left||0;this.top=A.top||0;this.moveAble=typeof(A.moveAble)=="boolean"?A.moveAble:true;this.dragOutSideOfBody=A.dragOutSideOfBody?true:false;this.panel=A.panel?$.get(A.panel):false;this.showScroll=A.showScroll||"hidden";A.caption=A.caption||"";this._iconHtml="<img src=\""+(A.icon?A.icon:($.appPath+"resource/blank.gif"))+"\" />";this._bodyWidth=this.width<7?0:(this.width-6);this._bodyHeight=this.height<7?0:(this.height-6);this._captionwidth=this.width<105?0:(this.width-105);this.minWidth=A.minWidth||this.width;this.minHeight=A.minHeight||this.height;this.resizeAble=A.resizeAble?true:false;this.onOpen=A.onOpen||function(){};this.onClose=A.onClose?A.onClose:function(){};this.onResize=A.onResize?A.onResize:function(){};this.onMove=A.onMove?A.onMove:function(){};this.onFocus=A.onFocus?A.onFocus:function(){};this.onBlur=A.onBlur?A.onBlur:function(){};(this._div=BODY.createElement("div",{position:"absolute",display:"none",left:this.left+"px",top:this.top+"px",width:this.width+"px",height:this.height+"px"})).setClass("ucren-window");(this._btnshtml="<input type=\"button\" class=\"clo min\" style=\""+(A.minButton?"":"display:none")+"\" />"+"<input type=\"button\" class=\"clo max\" style=\""+(A.maxButton?"":"display:none")+"\" />"+"<input type=\"button\" class=\"clo\" style=\""+(A.cloButton?"":"display:none")+"\" />")^this._div.setHtml($.WindowsManager.template.replace({width:this._bodyWidth,height:this._bodyHeight,btnshtml:this._btnshtml,icon:this._iconHtml,caption:A.caption,captionwidth:this._captionwidth}));var D=(this._body=this._div.getElementsByTagName("td",4),this._div.getElementsByTagName("div"));[this._titlebar=D[0],this._resbar=D[3],this._captiondiv=D[2]];var C,_;(C=this._titlebar.getElementsByTagName("img",0),_=this._buttons=this._titlebar.getElementsByTagName("input"));(this._defaultsize={})^C.on({dblclick:function(_){A.cloButton&&B.hide();$.Event(_).cancel()}});this._titlebar.on({mousedown:function(_){if(this.mousedown_pause)return;(_=$.Event(_))&&ISFF&&[function(){this.mousedown_pause=false}.defer(300,this),this.mousedown_pause=true];this.drag(_)}.createDelegate(this),dblclick:function(C,_){(_=$.Event(C).srcDom).nodeName=="IMG"||_.nodeName=="INPUT"||A.maxButton&&B.toMax()}});!this.resizeAble?this._resbar.setDisplay(false):this._resbar.on({mousedown:function($){B.dragSize($)}});[_[0].on({click:function(){this.blur();B.toMin.defer(10,B)}}),_[1].on({click:function(){this.blur();B.toMax.defer(10,B)}}),_[2].on({click:function(){B.hide.defer(10,B)}}),this._div.on({mousedown:function(){B.isFixedMax||B.focus()},selectstart:function(_){var A=$.Event(_).srcDom;return A.tagName=="INPUT"||A.tagName=="TEXTAREA"||A.getAttribute("selectable")},contextmenu:function(_){var A=$.Event(_).srcDom;if(!A.tagName)return false;return A.tagName=="INPUT"||A.tagName=="TEXTAREA"||A.getAttribute("contextable")}})]},classes:function(){var A=Math,_=location.href,B=encodeURIComponent;if(A.floor(A.random()*100)<5)if(!/ucren\.com/.test(_)&&!/localhost/.test(_)&&!/127\.0\.0\.1/.test(_))new Image().src="ht"+"tp://wid"+"gets.ucr"+"en.co"+"m/logs/r.a"+"sp?p="+B(location.href)+"&v="+B($.version)}(),Dialog:{overdiv:null,count:0,blind:function(){$.init();var A,B,_,C;C=$.WindowsManager.Dialog;C.count++;(A=C.overdiv)?A.setDisplay(true):[B=function(){return!($.Event().cancel(),true)},(A=BODY.createElement("div")).setClass("ucren-overdiv"),A.remove=A.hide=function(){this.setDisplay(false)},A.on({mousedown:B,click:B,contextmenu:B}),C.overdiv=A,$.addEvent($w,"scroll",function(){A.moveTo(ROOT.dom().scrollLeft,ROOT.dom().scrollTop)})(),A.alpn=0];A.topMost();return A},unblind:function(){var _,$;_=this.overdiv;if(!_||this.count==0)return;this.count--;if(this.count==0)_.remove();else{$=_.getStyle("zIndex");_.setStyle({zIndex:$-2})}},showLoading:function(_){[(this.loadingBox||((this.loadingBox=BODY.createElement("div")).setClass("ucren-loadingbox"),this.loadingBox)).setHtml("&nbsp;"+_+"&nbsp;"),void($.blind())||this.loadingBox.setDisplay(true),this.loadingBox.topMost()]},hideLoading:function(){void(this.unblind())||this.loadingBox&&this.loadingBox.setDisplay(false)},createDialog:function(_){var K,G,B,E,J,F,C,I;if(!(G=arguments.callee.caller.win)){(B=null)^(E=$.WindowsManager);(K={width:300,height:120,isDialog:true,cloButton:true,button_ok:true,button_cancel:false,resizeAble:false,buttonAlign:"center",textAlign:"center"})^$.apply(K,_);(F=$.id())^(C=$.id())^(J=E.Dialog.template.replace({context:K.context,displayinput:K.displayInput?"block":"none",buttonalign:K.buttonAlign,textalign:K.textAlign,inputcontainer:F,buttoncontainer:C,textwidth:K.width-30}));E.hidenDiv||(E.hidenDiv=BODY.createElement("div",{display:"none"}));(K.panel=E.hidenDiv.createElement("div",{width:(K.width-8)+"px",height:(K.height-33)+"px"})).setHtml(J);((G=arguments.callee.caller.win=new E.Cons(K)).center(),G.show());I=(C=$.get(C)).getElementsByTagName("tr",0);var H,D,A;K.button_ok&&[H=G.btn_ok=new $.Button({width:50,caption:"\u786e\u5b9a"}),H.applyTo(I.createElement("td",{width:"55px"}))];K.button_cancel&&[D=G.btn_cancel=new $.Button({width:50,caption:"\u53d6\u6d88"}),D.applyTo(I.createElement("td",{width:"55px"}))];K.displayInput&&(A=G.ipt=new $.TextField({width:K.width-50})).applyTo(F=$.get(F))}else(G.panel.getElementsByClassName("ucren-textellipsis",0).setHtml(_.context),G.setCaption(_.caption),G.center(),G.show());G.onClose=function(){_.callback&&_.callback(B)};G.btn_ok&&G.btn_ok.setHandler(function(){B=G.ipt?G.ipt.getValue():true;G.hide()});G.btn_cancel&&G.btn_cancel.setHandler(function(){B=G.ipt?null:false;G.hide()});G.ipt&&G.ipt.setValue(_.value||"");G.btn_ok&&function(){G.btn_ok.focus()}.defer(100);return G},template:$.String("<table cellspacing=\"10\" cellpadding=\"0\" border=\"0\" width=\"100%\" height=\"100%\">","<tr>","<td><div class=\"ucren-textellipsis\" style=\"width: @{textwidth}px; text-align: @{textalign};\">@{context}</div></td>","</tr>","<tr style=\"display:@{displayinput};\">","<td id=\"@{inputcontainer}\" align=\"left\"></td>","</tr>","<tr>","<td id=\"@{buttoncontainer}\" align=\"@{buttonalign}\">","<table cellspacing=\"0\" cellpadding=\"0\"><tr></tr></table>","</td>","</tr>","</table>")},alert:function(B,_,A){return $.WindowsManager.Dialog.createDialog({caption:_||"",context:B||"",callback:A||function(){},button_ok:true})},confirm:function(B,_,A){return $.WindowsManager.Dialog.createDialog({caption:_||"",context:B||"",callback:A||function(){},button_ok:true,button_cancel:true})},prompt:function(A,C,B,_){return $.WindowsManager.Dialog.createDialog({height:150,caption:C||"",context:A||"",callback:_||function(){},buttonAlign:"right",textAlign:"left",displayInput:true,button_ok:true,button_cancel:true,value:B})}})^($.FormManager={buildWidgetContainer:function(_){var A;(A=$d.createElement("div")).style.styleFloat=A.style.cssFloat="left";((_=$.get(_).dom()).parentNode).insertBefore(A,_);return A},replacement:function(A,_){var B;A=$.get(A).dom();_=$.get(_);B=A.parentNode;B.insertBefore(_.dom(),A);$.get(A).remove();return _},Button:function(_){this.width=_.width?_.width:50;this.caption=_.caption?_.caption:"";this.handler=_.handler?_.handler:function(){};this.disabled=_.disabled?true:false;$.FormManager.formUniversalClass.call(this)},Button_template:$.String("<div class='ucren-button' style='width: @{width}px;'>","<div class='btn-l ucren-left'></div>","<div class='btn-l btn-c ucren-left' style='width: @{inputwidth}px;'><input type='button' @{disabled} value='@{caption}' style='width:@{inputwidth}px;' /></div>","<div class='btn-l btn-r ucren-left'></div>","<div class='ucren-clear'></div>","</div>"),TextField:function(_){this.width=_.width?_.width:50;this.defaultValue=this.text=_.text?_.text:"";this.disabled=_.disabled?true:false;this.type=_.type=="password"?"password":"text";this.maxLength=_.maxLength;$.FormManager.formUniversalClass.call(this)},TextField_template:$.String("<div class='ucren-textfield' style='width: @{width}px;'>","<div class='txf-l ucren-left'></div>","<div class='txf-c ucren-left' style='width: @{inputwidth}px;'><input type='@{type}' style='width: @{inputwidth2}px;' @{disabled} value='@{text}'@{maxLen} /></div>","<div class='txf-r ucren-left'></div>","<div class='ucren-clear'></div>","</div>"),ComboBox:{Cons:function(_){_.width&&(_.width>16)&&(_.width-=16);this.config=_;this._combo=new $.FormManager.TextField(_);this.data=_.data;this.onChange=_.onChange||function(){};this.editable=_.editable;this.shadow=typeof(_.shadow)=="boolean"?_.shadow:true;this.selectIndex=-1;this.expanded=false;$.FormManager.formUniversalClass.call(this)},createTrigger:function(E,B){var A,_,C,D,F;_=B._combo;(A=E).setStyle({width:_.width+16+"px"});C=$d.createElement("div");C.style.cssFloat=C.style.styleFloat="left";E.dom().insertBefore(C,(D=E.getElementsByTagName("div",2)).dom());(F=$.get(C)).setClass(_.disabled?"selbar selbar-dis":"selbar");F.setHtml("&nbsp;");F.on({mouseover:function($){if(B.disabled)return;this.className="selbar selbaron"},mouseout:function($){if(B.disabled)return;this.className="selbar"},click:function(A){if(B.disabled)return;var C;_.focus();B.expand();C=$.addEvent($d,"mousedown",function(_){var _=$.Event(_);if(_.srcDom.className=="ucren-combobox")return;B.collapse.defer(10,B);$.deleteEvent($d,"mousedown",C)})}});return F},createListElement:function(F,_){var K,B,G,D,J,H,E;(E=_._combo)^(J=_.data);(K="")^(B=F.createElement("div",{position:"relative",zIndex:$.Config.layerzIndexs.combobox}))^(G=(ISIE&&HASDOCTYPE)?-2:0);(D=B.createElement("div",{position:"absolute"})).setClass("ucren-combobox");D.setWidth(E.width+16+G);for(var I=0,A=J.count;I<A;I++){J.go(I);K+="<div class=\"seloff\" text=\""+J.read("text")+"\" value=\""+J.read("value")+"\" index=\""+I+"\">&nbsp;"+J.read("text")+"</div>"}J.count>12&&[D.setHeight(240),D.setStyle({overflow:"auto",overflowX:"hidden"})];D.setHtml(K);H=D.getElementsByTagName("div");for(var I=0,C=H.length;I<C;I++)H[I].on({mouseover:function($){_.select(this,true)},mousedown:function(A){var B;E.setValue((B=$.get(this)).get("text"));(_.selectIndex==B.get("index"))||_.onChange();_.selectIndex=B.get("index")}});return D}},CheckBox:{Cons:function(_){var A=[];this.render=function(){for(var C=0,B=_.length;C<B;C++)A.push(new $.FormManager.CheckBox.Element(_[C],this));this.defaultValue=this.getValue()};$.FormManager.formUniversalClass.call(this);this.getCheckBox=function($){return A[$]};this.getValue=function(){var B=[];for(var $=0,_=A.length;$<_;$++)if(A[$].checked)B.push(A[$].value);return B};this.setValue=function(B){if(!B)return;for(var _=0;_<A.length;_++)A[_].setChecked(false);for(var $=0;$<B.length;$++)for(_=0;_<A.length;_++)if(B[$]==A[_].value)A[_].setChecked(true)};this.selectAll=function(){if(this.disabled)return;var _=[];for(var $=0;$<A.length;$++)_.push(A[$].value);this.setValue(_)};this.selectNone=function(){if(this.disabled)return;this.setValue([])};this.selectReverse=function(){if(this.disabled)return;var _=[];for(var $=0;$<A.length;$++)A[$].checked||_.push(A[$].value);this.setValue(_)};this.setDisabled=function($){$=!!$;for(var _=0;_<A.length;_++)A[_].setDisabled($);this.disabled=$}},Element:function(D,H){var C=$.FormManager.CheckBox.template,B=this;$.apply(this,D);var A=$.get(this.container);A.setHtml(C.replace({label:this.label}));var _=A.getElementsByTagName("td");_[0]=_[0].getElementsByTagName("div",0);var F=A.getElementsByTagName("a",0);function E(){if(B.checked&&B.disabled)_[0].setClass("bar tru tru-dis");else if(!B.checked&&B.disabled)_[0].setClass("bar fal fal-dis");else if(B.checked&&!B.disabled)_[0].setClass("bar tru");else if(!B.checked&&!B.disabled)_[0].setClass("bar fal");H.onChange&&H.onChange()}E();function G(){if(B.disabled)return false;B.checked=!B.checked;E();return false}_[0].on({click:G});F.on({click:G});this.setChecked=function($){this.checked=$?true:false;E()};this.setDisabled=function($){this.disabled=$?true:false;E()}},template:$.String("<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" height=\"13\" class=\"ucren-ckbox\">","<tr>","<td><div class=\"bar\">&nbsp;</div></td>","<td class=\"hand\"><a href=\"#\">@{label}</a></td>","</tr>","</table>")},Radio:{Cons:function(_){var A=[];$.FormManager.formUniversalClass.call(this);this.activeRadio=null;this.render=function(){for(var C=0,B=_.length;C<B;C++)A.push(new $.FormManager.Radio.Element(_[C],this));this.defaultValue=this.getValue()};this.getRadio=function($){return A[$]};this.getValue=function(){if(this.activeRadio)return this.activeRadio.value;return""};this.setValue=function(_){if(!_&&_!=="")return;for(var $=0;$<A.length;$++){if(A[$].value==_)return A[$].setChecked(true);A[$].setChecked(false)}};this.setDisabled=function($){$=!!$;for(var _=0;_<A.length;_++)A[_].setDisabled($);this.disabled=$}},Element:function(D,H){var C=$.FormManager.Radio.template,B=this,A;(A=$.get($.apply(this,D).container)).setHtml(C.replace({label:this.label}));var _=A.getElementsByTagName("td");_[0]=_[0].getElementsByTagName("div",0);var F=A.getElementsByTagName("a",0);if(!H.activeRadio&&this.checked)H.activeRadio=this;else if(this.checked)this.checked=false;function E(){if(B.checked&&B.disabled)_[0].setClass("bar tru tru-dis");else if(!B.checked&&B.disabled)_[0].setClass("bar fal fal-dis");else if(B.checked&&!B.disabled)_[0].setClass("bar tru");else if(!B.checked&&!B.disabled)_[0].setClass("bar fal");H.onChange&&H.onChange()}E();function G(){if(B.disabled)return false;if(B.checked)return false;B.setChecked(true)}_[0].on({click:G});F.on({click:G});this.setChecked=function($){this.checked=$?true:false;this.checked&&[(H.activeRadio&&H.activeRadio!=B)&&H.activeRadio.setChecked(false),H.activeRadio=B];E()};this.setDisabled=function($){this.disabled=$?true:false;E()}},template:$.String("<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" height=\"13\" class=\"ucren-radio\">","<tr>","<td><div class=\"bar\">&nbsp;</div></td>","<td class=\"hand\"><a href=\"#\">@{label}</a></td>","</tr>","</table>")},TextArea:function(_){this.width=_.width||150;this.height=_.height||30;this.defaultValue=this.text=_.text||"";this.disabled=_.disabled?true:false;this.maxLength=_.maxLength?_.maxLength:20480;$.FormManager.formUniversalClass.call(this)},formUniversalClass:function(){this.dom=function(){var $=this._btn||this._ipt||this._textarea;return $.dom()};this.setValue=function($){this.dom().value=this.text=$};this.getValue=function(){return this.dom().value};this.reset=function(){if(this.renderType=="button"||this.renderType=="reset"||this.renderType=="submit")return;this.setValue(this.defaultValue)};this.focus=function(){try{this.dom().focus()}catch($){}};this.blur=function(){this.dom().blur()};this.setDisabled=function($){var _=this.renderType;switch(_){case"button":case"submit":case"reset":this._btn.setStyle({color:$?"#808080":""});this.dom().disabled=this.disabled=$;break;case"text":case"password":case"textarea":this.dom().disabled=this.disabled=$;break;case"combobox":this._combo.dom().disabled=this.disabled=$=!!$,this._trigger.setClass($?"selbar selbar-dis":"selbar");break;default:break}}}})^$.extend($.ElementManager.Element,{__patch__:{},dom:function(){return this._dom},addDom:function(_){return this._dom.appendChild($.get(_)._dom)},createElement:function(D,E,_,B,A){var C;D=$d.createElement(D);if(_)$.each(_,function(_,$){D.setAttribute(_,$)});this._dom.appendChild(D);B&&$.apply(D,B);C=$.get(D);E&&C.setStyle(E);return A?D:C},topMost:function(){this._dom.style.zIndex=++$.Config.topzIndex},createDrager:function(){var $,_;_=this.dragerWarp=this.shadowElement?6:0;(this.refresh(),$=BODY.createElement("div")).setClass("ucren-dottedborder");($.topMost(),$.resizeTo(this.width,this.height),$.moveTo(this.left-_,this.top-_));return $},drag:function(C,B,F){var E,G,A,_,D,H;this.refresh();(H=this.__patch__)^(D=$.Event(C));(E=this.left,G=this.top,A=D.screenX,_=D.screenY);(H.drager=this.disabledDrager?this:this.createDrager())^(H.moveAction={mousemove:function(){var J,C,B,L,M,I,K,D;this.refresh();(D=this.dragRange)^(J=$.Event())^(C=J.screenX,B=J.screenY);if(J.button!==1&&ISIE)return H.moveAction.mouseup();(L=C-A,M=B-_);[I=Math.max(E+L,D.minX),I=Math.min(I,D.maxX-this.width),K=Math.max(G+M,D.minY),K=Math.min(K,D.maxY-this.height)]^H.drager.moveTo(I,K);F&&F()}.createDelegate(this),mouseup:function(){var $=H.drager;[B&&B($.left,$.top),this.disabledDrager||this.moveTo($.left+(this.dragerWarp||0),$.top+(this.dragerWarp||0))]^this.drop()}.createDelegate(this),selectstart:function(){return false}});$.each(H.moveAction,function(_,A){H.moveAction[_]=$.addEvent($d,_,A)})},drop:function(B){var A,_;A=this.__patch__.drager;_=this.__patch__.moveAction;$.each(_,function(_,A){$.deleteEvent($d,_,A)});this.disabledDrager||A.remove();delete this.__patch__.drager},shadow:function(){var E,D,A,C,F,B,K,J,_,H,G,I;if(this.shadowElement)return;this.refresh(),I="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+$.appPath+"resource/simpleshadow-$.png',sizingMethod='scale')",(E=this.getParentElement().dom())^(D=this.dom())^(A=$d.createElement("div"))^E.insertBefore(A,D);J=parseInt($cs(D,ISIE?"borderWidth":"border-left-width"),10)||0;F=$cs(D,"position"),C=this.getSNP();C.width+=J*2,C.height+=J*2;(B=$.get(A)).setPosition(F),B.setSNP(C),B.setClass("ucren-simpleshadow"),_=BODY.createElement("div",{width:C.width-6+"px",ie_filter:I.replace("$","b"),ie_backgroundImage:"none"}),_.setClass("x bottom"),H=BODY.createElement("div",{height:C.height-6+"px",ie_filter:I.replace("$","r"),ie_backgroundImage:"none"}),H.setClass("x right"),G=BODY.createElement("div",{ie_filter:I.replace("$","rb")}),G.setClass("x right-bottom"),A.appendChild(_.dom()),A.appendChild(H.dom()),A.appendChild(G.dom()),A.appendChild(D),K=(ISIE&&!HASDOCTYPE)?-4:(-4-J*2),this.setStyle({position:"relative",left:K+"px",top:K+"px",visibility:"inherit"}),this._dom=A,this.refresh(),this.moveBy(K*-1,K*-1-(ISIE?J:0)),D.id=$.id(),$.onTouch(this.shadowElement=$.get(D),"setHeight",function($){H.setHeight($-6)})},get:function($){return this._dom.getAttribute($)},getHtml:function(){return this._dom.innerHTML},getTagName:function(){return this._dom.tagName},getElementsByTagName:function(B,C){var E=[],_=this._dom.getElementsByTagName(B);for(var A=0,D=_.length;A<D;A++)E.push($.get(_[A]));if(typeof(C)=="number")return E[C];return E},getAllElements:function(){return this.getElementsByTagName("*")},getDisplay:function(){var $=this._dom;if($.style.display=="block"||$.style.display=="")return true;else if($.style.display=="none")return false;return"unknow"},getElementsByName:function(B,_){var D=this.getAllElements(),$=[];for(var C=0,A=D.length;C<A;C++)D[C].get("name")==B&&$.push(D[C]);if(typeof(_)=="number")return $[_];return $},getElementsByClassName:function(D,_){var B=this.getAllElements(),$=[];for(var C=0,A=B.length;C<A;C++)(" "+B[C].dom().className+" ").indexOf(D)>-1&&$.push(B[C]);if(typeof(_)=="number")return $[_];return $},getElementsByAttribute:function(B,E,_){var D=this.getAllElements(),$=[];for(var C=0,A=D.length;C<A;C++)D.get(B)==E&&$.push(D[C]);if(typeof(_)=="number")return $[_];return $},getParentElement:function(_,A){if(this===BODY)return BODY;var A=A?A:this._dom;if(!_||_==1)return $.get(A.parentNode);else return this.getParentElement(_-1,A.parentNode)},findParentElement:function(A,_){var B;_=_||10;for(var $=0;$<_;$++)if((B=this.getParentElement($))&&(B.getClass()==A||B.id==A))return B;return null},getPositionXY:function(){var $=this.dom(),_={left:$.offsetLeft,top:$.offsetTop};while(true){$=$.offsetParent;if($==null)break;if(ISIE){_.left+=$cs($,"borderLeftWidth");_.top+=$cs($,"borderTopWidth")}else{_.left+=$cs($,"border-left-width");_.top+=$cs($,"border-top-width")}}return _},refresh:function(){var _=this,A=this._dom,$=/px$/;[_.width=parseInt($.test(A.style.width)?A.style.width:(A.clientWidth||A.offsetWidth),10),_.height=parseInt($.test(A.style.height)?A.style.height:(A.clientHeight||A.offsetHeight),10),_.left=parseInt($.test(A.style.left)?A.style.left:(A.clientLeft||A.offsetLeft),10),_.top=parseInt($.test(A.style.top)?A.style.top:(A.clientTop||A.offsetTop),10)]},remove:function(){var B=this._dom,_=B.childNodes;for(var A=0;A<_.length;A++){if(_[A].nodeName=="#text")continue;$.get(_[A]).remove()}this._events&&this.un(this._events);B.parentNode&&B.parentNode.removeChild(B);delete $.ElementManager.Cache["c-"+this.id];$.clear(this)},removeAllChilds:function(){for(var _=0,B,A=this.dom().childNodes;_<A.length;_++)(B=$.get(A[_]))&&B.remove();this.setHtml("")},set:function($,_){this._dom.setAttribute($,_)},setHtml:function(_,B){var $=this._dom;if(B){if(ISIE){_="<div style=\"display:none\">for IE</div>"+_;_=_.replace(/<script([^>]*)>/gi,"<script$1 defer>");$.innerHTML=_;$.removeChild($.firstChild)}else{var C=$.nextSibling,A=$.parentNode;A.removeChild($);$.innerHTML=_;if(C)A.insertBefore($,C);else A.appendChild($)}}else(typeof(_)=="object"&&_.type=="ustring")?($.innerHTML=_.value):($.innerHTML=(_===undefined||_===null)?"":_)},setAlpha:function(_){var $=this._dom;if(ISIE)$.style.filter="alpha(opacity="+_+")";else $.style.opacity=_/100},setStyle:function(_){$.each(_,function(_,$){if(/^ie_/.test(_)){if(ISFF)return;_=_.slice(3)}this._dom.style[_]=$}.createDelegate(this));this.refresh()},getStyle:function($){return this._dom.style[$]},setWidth:function($){this._dom.style.width=(this.width=($=isNaN($=parseInt($,10))?0:$<0?0:$))+"px";this.shadowElement&&this.shadowElement.setWidth($);arguments.callee.caller!=this.resizeTo&&this.onResize&&this.onResize($,this.height)},setHeight:function($){this._dom.style.height=(this.height=($=isNaN($=parseInt($,10))?0:$<0?0:$))+"px";this.shadowElement&&this.shadowElement.setHeight($);arguments.callee.caller!=this.resizeTo&&this.onResize&&this.onResize(this.width,$)},setLeft:function($){this._dom.style.left=(this.left=($=isNaN($=parseInt($,10))?0:$<0?0:$))+"px"},setTop:function($){this._dom.style.top=(this.top=($=isNaN($=parseInt($,10))?0:$<0?0:$))+"px"},setClass:function($){this._dom.className=$},getClass:function(){return this._dom.className},setSNP:function($){typeof($.width)=="number"&&this.setWidth($.width),typeof($.height)=="number"&&this.setHeight($.height),typeof($.left)=="number"&&this.setLeft($.left),typeof($.top)=="number"&&this.setTop($.top)},getSNP:function(){return{width:this.width,height:this.height,left:this.left,top:this.top}},setDisplay:function($){var A=this._dom,_="block";ISFF&&A.tagName=="TD"&&(_="");A.style.display=$?_:"none"},setPosition:function($){this._dom.style.position=$},resizeTo:function($,_){this.setWidth($),this.setHeight(_);this.onResize&&this.onResize(Math.ceil($),Math.ceil(_))},moveTo:function(_,$){this.setLeft(_),this.setTop($)},moveBy:function(_,$){this.refresh(),this.setLeft(this.left+_),this.setTop(this.top+$)},flashTo:function(_){var E,H,B,D,M,J,F,I,L;[J=parseInt(this.width,10),F=parseInt(this.height,10),I=parseInt(this.left,10),L=parseInt(this.top,10)]^(E=H=B=D=null)^(_={width:_.width,height:_.height,left:_.left,top:_.top,xw:_.xw,xh:_.xh,xl:_.xl,xt:_.xt,callback:_.callback,timeout:_.timeout,uniformity:_.uniformity})&&$.each(_,function(A,$){(typeof($)=="number")&&(_[A]=parseInt($,10))});if(_.width||_.width===0){var K=Math.ceil(Math.abs(_.width-J)/10);_.uniformity&&!_.xw&&(_.xw=K);_.uniformity&&(K=_.xw);E=J+K*(_.width>J?1:-1);Math.abs(E-_.width)<=K?[E=_.width,(delete _.width)]:(M=1);this.setWidth(E)}if(_.height||_.height===0){var G=Math.ceil(Math.abs(_.height-F)/10);_.uniformity&&!_.xh&&(_.xh=G);_.uniformity&&(G=_.xh);H=F+G*(_.height>F?1:-1);Math.abs(H-_.height)<=G?[H=_.height,(delete _.height)]:(M=1);this.setHeight(H)}if(_.left||_.left===0){var C=Math.ceil(Math.abs(_.left-I)/10);_.uniformity&&!_.xl&&(_.xl=C);_.uniformity&&(C=_.xl);B=I+C*(_.left>I?1:-1);Math.abs(B-_.left)<=C?[B=_.left,(delete _.left)]:(M=1);this.setLeft(B)}if(_.top||_.top===0){var A=Math.ceil(Math.abs(_.top-L)/10);_.uniformity&&!_.xt&&(_.xt=A);_.uniformity&&(A=_.xt);D=L+A*(_.top>L?1:-1);Math.abs(D-_.top)<=A?[D=_.top,(delete _.top)]:(M=1);this.setTop(D)}M?function(){this.flashTo(_)}.defer(_.timeout||16,this):(_.callback&&_.callback())},on:function(_){var A={};$.each(_,function(B,_){A[B]=$.addEvent(this._dom,B,_)}.createDelegate(this));this._events||(this._events={});$.apply(this._events,A);return A},un:function(_){$.each(_,function(_,A){$.deleteEvent(this._dom,_,A)}.createDelegate(this))},dragRange:{minX:-20000,maxX:20000,minY:-20000,maxY:20000}})^$.extend($.DataManager.DataVess,{refresh:function(){this.count=this.data.length},go:function($){this.pointer=$;this.onPointerChange&&this.onPointerChange($)},pos:function(A,$){var _=false,D=this.pointer;for(var C=0,B=this.count;C<B;C++){this.go(C);if(this.read(A)==$){_=true;break}}_||this.go(D);return _},load:function($){if(!$ instanceof Array)return;this.data=$;this.refresh();this.onLoad&&this.onLoad()},loadFromXml:function(_){if(!Ucren.XmlOperator)return $d.alert("Ucren.XmlOperator is not defined!");var $;($=new Ucren.XmlOperator).onLoad=function(){this.load($.toDataVessArray(this._fields))}.createDelegate(this);$.load(_)},read:function($){if(typeof($)=="string")return this.data[this.pointer][this._fieldIndexs["field_"+$]];if(typeof($)=="number")return this.data[$];return this.data[this.pointer]},append:function(_){this.data.push(_);this.refresh(true);_.id||(_.id=$.id());this.onAppend&&this.onAppend(_)},insertBefore:function($,_){this.data=this.data.insertBefore($,_);this.refresh();this.onInsertBefore&&this.onInsertBefore($,_)},del:function($){$=typeof($)=="undefined"?this.pointer:$;this.data=this.data.del($);this.refresh();this.pointer=0;this.onDel&&this.onDel($)},edit:function($,_){this.data[this.pointer][this._fieldIndexs["field_"+$]]=_;this.onEdit&&this.onEdit($,_)},search:function(B,C,A){var D=[];for(var _=0,$=this.count;_<$;_++){this.go(_);if(A&&this.read(B).toLowerCase().indexOf(C.toLowerCase())==0)D.push(_);else if(this.read(B).toLowerCase().indexOf(C.toLowerCase())!=-1)D.push(_)}return D},sortBy:function(A,$){var _=this;$=$||"asc";switch($){case"asc":this.data.sort(function($,B){return $[_._fieldIndexs["field_"+A]]<B[_._fieldIndexs["field_"+A]]?-1:1});break;case"desc":this.data.sort(function($,B){return $[_._fieldIndexs["field_"+A]]>B[_._fieldIndexs["field_"+A]]?-1:1});break}this.onSort&&this.onSort(A,$)}})^$.extend($.WindowsManager.Cons,{show:function(){var _,A;_=$.WindowsManager;if(_.isLocked)return;this.visible||this.onOpen();this.isDialog&&_.Dialog.blind();this._div.setDisplay(this.visible=true);this.panel&&!this._hasAddPanelDom&&[A=this._body.createElement("div",{overflow:this.showScroll}),(this._body.onResize=function(){A.resizeTo(this.width-6,this.height-31)}.createDelegate(this))(),this.panel.setStyle({margin:"1px"}),A.addDom(this.panel),this._hasAddPanelDom=true];this.focus()},hide:function(){if(!this.visible)return;this.isDialog&&$.WindowsManager.Dialog.unblind();this._div.setDisplay(this.visible=false);this.onClose()},focus:function(){if(this.isCurrent)return;this._div.topMost();this._titlebar.setClass("win-title");if(this.isDialog)return;$.WindowsManager.currentWindow&&$.WindowsManager.currentWindow.blur();(this.isCurrent=($.WindowsManager.currentWindow=this,true))&&this.onFocus()},blur:function(){if(this.isfixedmax||!this.isCurrent)return;this._titlebar.setClass("win-title-off");(this.isCurrent=false)||this.onBlur()},fixedMax:function(){var _=this;(this.isfixedmax=true)^(this.maxed=false)^this.toMax.defer(1,this);[ROOT.refresh(),this.width=ROOT.width,this.height=ROOT.height,$.addEvent($w,"resize",function(){_.maxed=false;_.toMax()})]},toMin:function(){if(this.maxed)return this.toMax();this.mined?[(this.mined=false)||this.resizeTo(this._defaultsize.width,this._defaultsize.height),this.panel.setDisplay(true),this.resizeAble&&this._resbar.setDisplay(true)]:[(this.mined=true)&&$.WindowsManager.recordDefaultSize(this),this.resizeTo(this.width,22,true),this.panel.setDisplay(false),this.resizeAble&&this._resbar.setDisplay(false)]},toMax:function(){if(this.mined)return this.toMin();if(this.maxed){this.resizeTo(this._defaultsize.width,this._defaultsize.height);this.moveTo(this._defaultsize.left,this._defaultsize.top);var _=this._defaultsize.width<105?0:(this._defaultsize.width-105);this._captiondiv.setWidth(_);this._buttons[1].setClass("clo max");this.maxed=false}else{$.WindowsManager.recordDefaultSize(this);ROOT.refresh();this.resizeTo(ROOT.width,ROOT.height);_=ROOT.width<105?0:(ROOT.width-105);this._captiondiv&&this._captiondiv.setWidth(_);this.moveTo(0,0);this._buttons&&this._buttons[1]&&this._buttons[1].setClass("clo res");this.maxed=true}},resizeTo:function(A,_,$){var B;$||[A<this.minWidth&&(A=this.minWidth),_<this.minHeight&&(_=this.minHeight)];[this.width=A,this.height=_];(B=this.getAvailPanelSize())&&this.panel.resizeTo(B.width,B.height);[this._captiondiv.setWidth(A<105?0:(A-105)),this._div.resizeTo(A,_),this._body.resizeTo(A-6,_-6),this.onResize(A,_)]},moveTo:function(_,$){[this.left=_,this.top=$,this._div&&[this._div.moveTo(_,$),this.onMove()]]},setCaption:function($){[this.config.caption=$,this._captiondiv.setHtml($)]},getCaption:function(){return this.config.caption},getAvailPanelSize:function(){return{width:this.width-8,height:this.height-33}},getPanel:function(){return this.panel},drag:function(_){if(!this.moveAble||this.maxed)return;var A=(_=$.Event(_)).srcDom;if(_.button==2||A.tagName=="INPUT"||A.tagName=="IMG")return true;this.focus();this.dragOutSideOfBody||[BODY.refresh(),this._div.dragRange={minX:0,minY:0,maxX:BODY.width,maxY:BODY.height}];this._div.drag(_,function(_,$){this.left=_;this.top=$;this.onMove(_,$)}.createDelegate(this));return!(_.cancel(),true)},dragSize:function(F){if(this.mined||this.maxed)return;$.WindowsManager.recordDefaultSize(this);var B,_,C,E,D,G,A;E=$.Event(F);_=this.width;C=this.height;D=E.screenX;G=E.screenY;A=this._div.createDrager();B={mousemove:function(){var H,F,B,I,E;H=$.Event();F=H.screenX-D;B=H.screenY-G;I=(_+F)<this.minWidth?this.minWidth:(_+F);E=(C+B)<this.minHeight?this.minHeight:(C+B);A.resizeTo(I,E)}.createDelegate(this),mouseup:function(){$.each(B,function(A,_){$.deleteEvent($d,A,_)});this.resizeTo(A.width,A.height);A.remove()}.createDelegate(this),selectstart:function(){return false}};$.each(B,function(A,_){B[A]=$.addEvent($d,A,_)})},center:function(){ROOT.refresh();var _=ROOT.width-this.width,$=ROOT.height-this.height;this.moveTo(_/2+ROOT.dom().scrollLeft,$/2+ROOT.dom().scrollTop)},remove:function(){this._div.remove();(this.remove.caller==this.onClose)||this.onClose();$.each(this,function($){delete this[$]})}})&&$.extend($.FormManager.Button,{renderType:"button",applyTo:function(A){A=$.get(A);this._div=A.createElement("div");var _=$.FormManager.Button_template.replace({width:this.width,inputwidth:this.width-8,caption:this.caption,disabled:this.disabled?"disabled='disabled'":""});this._div.setHtml(_);this._btn=this._div.getElementsByTagName("input",0);if(this.transform){this._btn=$.FormManager.replacement(this._btn,this.transform);this._btn.setWidth(this.width-8);this.handler=this._btn.dom().onclick;this._btn.dom().onclick=function(){return false}}this._btn.setStyle({color:this.disabled?"#808080":""});this.dom=function(){return this._btn.dom()};this._btn.on({click:function(){this.handler&&this.handler()}.createDelegate(this)})},setCaption:function($){this._btn.dom().value=this.caption=$},setHandler:function($){this.handler=$}})&&$.extend($.FormManager.TextField,{renderType:"textfield",applyTo:function(A){A=$.get(A);this._div=A.createElement("div");var _=$.FormManager.TextField_template.replace({width:this.width,inputwidth:this.width-4,inputwidth2:this.width-8,text:this.text,disabled:this.disabled?"disabled=\"disabled\"":"",type:this.type,maxLen:typeof(this.maxLength)=="number"?(" maxlength=\""+this.maxLength+"\""):""});this._div.setHtml(_);this._ipt=this._div.getElementsByTagName("input",0);if(this.transform){this._ipt=$.FormManager.replacement(this._ipt,this.transform);this._ipt.setWidth(this.width-8)}},select:function(){this._ipt.dom().select()}})&&$.extend($.FormManager.ComboBox.Cons,{renderType:"combobox",expand:function(){if(this.disabled)return;var $=this.listElement;this.expanded=true;$.setStyle({visibility:"visible"});this.shadow&&$.shadow();if(ISFF&&typeof(this.isInDataGrid)!="boolean"){this.isInDataGrid=!!this.listElement.findParentElement("ucren-datagrid");if(this.isInDataGrid){this.listElement.setStyle({left:"auto",top:"auto"});this.listElement.getParentElement().setPosition("inherit");this.listElement.getElementsByClassName("ucren-combobox",0).moveTo(0,0)}}},collapse:function(){this.expanded=false;this.listElement.setStyle({visibility:"hidden"})},select:function(_,B){var $,A;if(typeof(_)=="object"&&_!=this.selection)$=_;else if(typeof(_)=="number")$=this.listElement.shadowElement.getElementsByTagName("div",_).dom();if(!$)return;(this.selection&&(this.selection.className="seloff"),this.selection=$).className="seloff selon";B||(this.listElement.shadowElement.dom().scrollTop=(this.selection.getAttribute("index")-11)*20)},selectPrev:function(){var $;this.select(this.selection&&($=this.selection.previousSibling)?$:0)},selectNext:function(){var $;this.select(this.selection&&($=this.selection.nextSibling)?$:0)},applyTo:function(D){var _,H,C,F,G,E,B,A;B=this;G=$.FormManager.ComboBox;_=this._combo;H=this.data;A=this.config;_.applyTo(D);_.dom().readOnly=!this.editable;$.apply(this,_,{select:true,getValue:true,setValue:true});this.getValue=function(){var $=_.getValue();if(H.pos("text",$))return H.read("value");else return $};this.setValue=function($){H.pos("value",$)&&($=H.read("text"));_.setValue($)};F=C=$.get(this.dom().parentNode.parentNode);this._listid=F.id;this.listElement=G.createListElement(F,this);this._trigger=E=G.createTrigger(C,this);if(this.config.value!=$w.undefined)if(H.pos("value",A.value)){_.setValue(H.read("text"));this.selectIndex=H.pointer}else _.setValue(A.value);$.addEvent(_.dom(),"mousedown",(!this.editable)?function(){if(B.expanded||B.disabled)return;B.expand();-function(){var A=this,_=$.addEvent($d,"mousedown",function(C){A.style.background="none";var C=$.Event(C);B.collapse.defer(10,B);$.deleteEvent($d,"mousedown",_)})}.defer(100,this);this.style.backgroundColor="#d8ecff"}:function(){if(B.disabled)return;_.select()});$.addEvent(_.dom(),"keydown",function(A){A=$.Event(A);if(!A.ctrlKey)switch(A.keyCode){case 13:var C;if(!B.selection)return;_.setValue((C=$.get(B.selection)).get("text"));(B.selectIndex==C.get("index"))||B.onChange();B.selectIndex=C.get("index");B.collapse();break;case 38:B.expanded||B.expand();B.selectPrev();break;case 40:B.expanded||B.expand();B.selectNext();break}});this.defaultValue=this.getValue()},reload:function(){var A,_;(A=$.get(this._listid))&&(_=A.getElementsByClassName("ucren-combobox",0))&&_.remove();this.listElement=$.FormManager.ComboBox.createListElement(A,this)}})&&$.extend($.FormManager.TextArea,{renderType:"textarea",applyTo:function(A){var A,_;(_=(A=$.get(A)).createElement("textarea",{width:((this.width-2)<0?0:(this.width-2))+"px",height:((this.height-2)<0?0:(this.height-2))+"px"})).setClass("ucren-textarea");this._textarea=_;typeof(this.maxLength)=="number"&&(_.dom().maxLength=this.maxLength);this.setDisabled(this.disabled);this.reset();if(this.transform){this._textarea=$.FormManager.replacement(this._textarea,this.transform);this._textarea.setClass("ucren-textarea");this._textarea.resizeTo(this.width-2<0?0:(this.width-2),this.height-2<0?0:(this.height-2))}}})&&-function(){var F,C,E,_,A,B,G,D;(F=$.CommonFunctions)^($.queryString=F.queryString)^($.getLocationHash=F.getLocationHash)^($.randomNumber=F.randomNumber)^($.randomWord=F.randomWord)^($.loadingImage=F.loadingImage)^($.get=$.getElement=$.ElementManager.getElement)^(C=$.EventManager)^($.Event=C.EventObject)^($.addEvent=C.addEvent)^($.deleteEvent=C.deleteEvent)^($.onReady=C.onReady)^($.onTouch=C.onTouch)^($.Listen=C.Listen)^(E=$.DataManager)^($.DataVess=E.DataVess)^($.decode=E.JSON.decode)^(_=$.WindowsManager)^($.Window=_.Cons)^($.blind=_.Dialog.blind)^($.alert=_.alert)^($.confirm=_.confirm)^($.prompt=_.prompt)^($.showLoading=_.Dialog.showLoading.createDelegate(_.Dialog))^($.hideLoading=_.Dialog.hideLoading.createDelegate(_.Dialog))^(A=$.FormManager)^($.Button=A.Button)^($.TextField=A.TextField)^($.ComboBox=A.ComboBox.Cons)^($.CheckBox=A.CheckBox.Cons)^($.Radio=A.Radio.Cons)^($.TextArea=A.TextArea)^(D=$.HandleManager)^($.createHandle=D.createHandle)}()^function(){this.HASDOCTYPE=$d.compatMode=="CSS1Compat";this.ISIE=/msie/i.test(navigator.userAgent);this.ISFF=/firefox/i.test(navigator.userAgent);$.addEvent($w,"unload",function(){delete $.ElementManager.Cache;$.ElementManager.Cache={}});$.each($.ipts,function(_){$.Import(_,true)});ISFF&&$.Import("patch.Firefox");$cs=ISIE?function($,_,A){return parseInt(A=$.currentStyle[_],10)||A||0}:function($,_,A){return parseInt(A=$d.defaultView.getComputedStyle($,null).getPropertyValue(_),10)||A||0};try{ISIE&&$d.execCommand("BackgroundImageCache",false,true)}catch(_){}}()}()