var undefined,_=window._=function(){return +new Date()},Namespace=window.Namespace=function(C){var B=C.split("."),A=window;return _.get(A,B)||_.set(A,B,{})},Class=window.Class=function(S,I,E){var A,O=[],G=Class,D=window,N=G._fun,B=G._reg,C,K,M,F,Q;E=E||{};if(F=_.get(D,S.split("."))){return F}I=(!I?[]:typeof I=="string"?[I]:I);for(M=0;F=I[M];M++){if(!(O[M]=(_.get(D,F.split("."))||(linb&&linb.SC&&linb.SC(F))))){throw new Error("errNoParent:"+F)}}if(E.Dependency){for(M=0;F=E.Dependency[M];M++){if(!(_.get(D,F.split("."))||(linb&&linb.SC&&linb.SC(F)))){throw new Error("errNoDependency:"+F)}}}C=O[0];A=E.Static||{};F={};for(M in A){if(B[M]){F[M]=1}}for(M in F){delete A[M]}A.Before=E.Before||(C&&C.Before);A.After=E.After||(C&&C.After);A.$End=E.$End||(C&&C.$End);A.__gc=E.__gc||A.__gc||function(){Class.__gc(this.$key)};if(typeof E.Constructor=="function"){K=N(E.Constructor,"Constructor",S,C||_.fun());K.Constructor=String(E.Constructor)}else{if(C){var P=_.fun(),H=C.Constructor;if(H){P=new Function(H.slice(H.indexOf("(")+1,H.indexOf(")")).split(","),H.slice(H.indexOf("{")+1,H.lastIndexOf("}")))}K=N(P,"Constructor",S,C.upper);K.Constructor=H}else{K=_.fun()}}Q=_.fun();for(M=O.length-1;F=O[M--];){_.merge(Q,F);_.merge(Q.prototype,F.prototype)}K.KEY=K.$key=K.prototype.KEY=K.prototype.$key=S;G._wrap(K,A,0,Q);if(F=E.Instance){G._wrap(K.prototype,F,1,Q.prototype)}G._inherit(K,Q);G._inherit(K.prototype,Q.prototype);Q=null;if(_.tryF(K.Before,arguments,K)===false){return false}for(M=0;F=O[M];M++){F=(F.$children||(F.$children=[]));for(var L=0,J=F.length,R;L<J;L++){if(F[J]==S){R=true;break}}if(!R){F[F.length]=S}}K.$linb$=1;K.$children=[];K.$parent=O;K.prototype.constructor=K;K[S]=K.prototype[S]=true;_.set(D,S.split("."),K);_.tryF(K.After,[],K);_.tryF(E.Initialize,[],K);_.tryF(K.$End,[],K);return K},linb=window.linb=function(B,A){return linb.Dom.pack(B,A)};_.merge=function(E,D,B){var A,C;if(typeof B=="function"){C=B;B="fun"}switch(B){case"fun":for(A in D){if(true===C(D[A],A)){E[A]=D[A]}}break;case"all":for(A in D){E[A]=D[A]}break;case"with":for(A in D){if(A in E){E[A]=D[A]}}break;default:for(A in D){if(!(A in E)){E[A]=D[A]}}}return E};_.merge(_,{fun:function(){return function(){}},exec:function(A){var D=this,E=document,C=E.getElementsByTagName("head")[0]||E.documentElement,B=E.createElement("script");B.type="text/javascript";if(linb.browser.ie){B.text=A}else{B.appendChild(E.createTextNode(A))}C.insertBefore(B,C.firstChild);C.removeChild(B)},get:function(D,A){for(var C=0,B=A.length;C<B;){if(!D||(D=D[A[C++]])===undefined){return }}return D},set:function(H,B,G){var C,E=0,A,F=B.length-1,D=B[F];for(;E<F;){C=B[E++];if(H[C]&&((A=typeof H[C])=="object"||A=="function")){H=H[C]}else{H=H[C]={}}}if(G===undefined){delete H[D]}else{return H[D]=G}},tryF:function(A,B,C,D){return(A&&typeof A=="function")?A.apply(C||null,B||[]):D},asyRun:function(A,D,B,C){return setTimeout(typeof A=="string"?A:function(){A.apply(C,B||[]);A=B=null},D||0)},isEmpty:function(B){for(var A in B){return false}return true},resetRun:function(E,A,H,D,F){var G=arguments.callee,C=E,B=G.$cache||(G.$cache={});if(B[C]){clearTimeout(B[C])}if(typeof A=="function"){B[C]=setTimeout(function(){delete B[C];A.apply(F||null,D||[])},H||0)}else{delete B[C]}},observableRun:function(C,A,B){linb.Thread.observableRun(C,A,B)},breakO:function(H,E){var C=E||1,D=1+(arguments[2]||0),K=arguments.callee,J="___gc_",B=K._o||(K._o={}),F,I,A;if(H&&(typeof H=="object"||typeof H=="function")&&H!==window&&H!==Object&&H!==Date&&H!==Array&&H!==document){if(J in H){return }else{try{H[J]=1}catch(G){return }}A=(A=H.constructor)?A.prototype:B;for(F in H){if(F!=J){if(D<C&&H[F]&&(typeof H[F]=="object"||typeof H[F]=="function")){K(H[F],C,D)}if(!(A&&A[F])&&F!="prototype"&&F!="constructor"){try{delete H[F]}catch(G){}}}}try{delete H[J]}catch(G){}if(H.constructor==Array){H.length=0}}},each:function(D,A,C){C=C||D;for(var B in D){if(false===A.call(C,D[B],B,D)){break}}return D},copy:function(B,A){return _.clone(B,A,1)},clone:function(D,A,J){if(D&&typeof D=="object"){var F=D.constructor,H=F==Array;if(H||F==Object){var G=arguments.callee,E=H?[]:{},I,C=0,B;if(!J){if(J===0){return D}else{J=100}}if(H){B=D.length;for(;C<B;C++){if(typeof A=="function"&&false===A.call(D,D[C],C)){continue}E[E.length]=((I=D[C])&&J&&typeof I=="object")?G(I,A,J-1):I}}else{for(C in D){if(A===true?C.charAt(0)=="_":typeof A=="function"?false===A.call(D,D[C],C):0){continue}E[C]=((I=D[C])&&J&&typeof I=="object")?G(I,A,J-1):I}}return E}else{return D}}else{return D}},filter:function(E,B,A){if(!A&&E&&E.constructor==Array){var F,D,H,G=[],C;for(F=0,D=E.length;F<D;F++){G[G.length]=E[F]}E.length=0;for(F=0,D=G.length;F<D;F++){if(typeof B=="function"?false!==B.call(G,G[F],F):1){E[E.length]=G[F]}}}else{var F,I={};for(F in E){if(B===true?F.charAt(0)=="_":typeof B=="function"?false===B.call(E,E[F],F):0){I[F]=1}}for(F in I){delete E[F]}}return E},toArr:function(E,C){if(!E){return[]}var A=[];if(typeof C=="boolean"){for(var D in E){A[A.length]=C?D:E[D]}}else{if(typeof E=="string"){A=E.split(C||",")}else{for(var D=0,B=E.length;D<B;++D){A[D]=E[D]}}}return A},toUTF8:function(A){return A.replace(/[^\x00-\xff]/g,function(C,B){B=C.charCodeAt();return"\\u"+Math.floor(B/16).toString(16)+(B%16).toString(16)})},fromUTF8:function(A){return A.replace(/\\u([0-9a-f]{3})([0-9a-f])/g,function(C,B,D){return String.fromCharCode((parseInt(B,16)*16+parseInt(D,16)))})},urlEncode:function(C){var A=[],B,D;for(B in C){D=C[B];A.push(encodeURIComponent(B)+"="+encodeURIComponent(typeof D=="string"?D:_.serialize(D)))}return A.join("&")},urlDecode:function(H,E){if(!H){return E?"":{}}var A,F={},C=H.split("&"),G;for(var D=0,B=C.length;D<B;D++){G=C[D];A=G.split("=");F[decodeURIComponent(A[0])]=decodeURIComponent(A[1])}return E?F[E]:F},exists:function(A){return A!==undefined},isNull:function(A){return A===null},isObj:function(A){return !!A&&(typeof A=="object"||typeof A=="function")},isBool:function(A){return typeof A=="boolean"},isNumb:function(A){return typeof A=="number"&&isFinite(A)},isDate:function(A){return Object.prototype.toString.call(A)==="[object Date]"},isFun:function(A){return Object.prototype.toString.call(A)==="[object Function]"},isArr:function(A){return Object.prototype.toString.call(A)==="[object Array]"},isHash:function(A){return !!A&&typeof A=="object"&&Object.prototype.toString.call(A)==="[object Object]"},isReg:function(A){return Object.prototype.toString.call(A)==="[object RegExp]"},isStr:function(A){return typeof A=="string"},isArguments:function(A){return !!(A&&A.callee&&A.callee.arguments===A)},str:{startWith:function(B,A){return B.indexOf(A)===0},endWith:function(B,C){var A=B.length-C.length;return A>=0&&B.lastIndexOf(C)===A},repeat:function(B,A){return new Array(A+1).join(B)},initial:function(A){return A.charAt(0).toUpperCase()+A.substring(1)},trim:function(A){return this.ltrim(this.rtrim(A))},ltrim:function(A){return A.replace(/^ */,"")},rtrim:function(A){return A.replace(/ *$/,"")},toDom:function(G,F){var H=arguments.callee,E=H._pool||(H._pool=[]),D=0,C=E.length,B,A=[];do{B=E[D++]}while(D<C&&(B&&B.firstChild));if(!B||B.firstChild){B=document.createElement("div");E.push(B)}B.innerHTML=G;for(var D=0,I=B.childNodes,C=I.length;D<C;D++){A[A.length]=I[D]}return linb(A)}},arr:{subIndexOf:function(A,D,E){if(E===undefined){return -1}for(var C=0,B=A.length;C<B;C++){if(A[C]&&A[C][D]===E){return C}}return -1},removeFrom:function(A,B,C){A.splice(B,C||1);return A},removeValue:function(A,D){for(var B=A.length,C=B-1;C>=0;C--){if(A[C]===D){A.splice(C,1)}}return A},insertAny:function(A,F,E,D){var C=A.length;D=F.constructor!=Array||D;if(E===0){if(D){A.unshift(F)}else{A.unshift.apply(A,F)}}else{var B;if(!E||E<0||E>C){E=C}if(E!=C){B=A.splice(E,C-E)}if(D){A[A.length]=F}else{A.push.apply(A,F)}if(B){A.push.apply(A,B)}}return E},indexOf:function(A,D){for(var C=0,B=A.length;C<B;C++){if(A[C]===D){return C}}return -1},each:function(A,D,F,G){var E,C,B=A;if(B.constructor!=Array){if((B=B._nodes)||B.constructor!=Array){throw new Error("errNotArray")}if(G===undefined){G=1}}C=B.length;F=F||A;if(!G){for(E=0;E<C;E++){if(D.call(F,B[E],E,B)===false){break}}}else{for(E=C-1;E>=0;E--){if(D.call(F,B[E],E,B)===false){break}}}return A}}});_.merge(_.fun,{body:function(fun){with(String(fun)){return slice(indexOf("{")+1,lastIndexOf("}"))}},args:function(fun){with(String(fun)){return slice(indexOf("(")+1,indexOf(")")).split(",")}},clone:function(A){return new Function(_.fun.args(A),_.fun.body(A))}});_.merge(Class,{_reg:{$key:1,$parent:1,$children:1,KEY:1,Static:1,Instance:1,Constructor:1,Initialize:1},_reg2:{constructor:1,prototype:1,toString:1,valueOf:1},_fun:function(A,B,C,D){A.$name$=B;A.$original$=C;if(D){A.upper=D}return A},_other:["toString","valueOf"],_o:{},_inherit:function(D,F,A){var B,E,C=this._reg;for(B in F){if(B in D||(!A&&C[B])||B.charAt(0)=="$"){continue}E=F[B];if(E&&E.$linb$){continue}D[B]=E}},_wrap:function(J,B,L,K){var M=this,G,F,D,E=J.KEY,A=M._reg,C=M._reg2,I=M._fun,H=M._other;for(G in B){if(C[G]||(!L&&A[G])){continue}D=B[G];J[G]=(typeof D!="function")?D:I(D,G,E,typeof K[G]=="function"&&K[G])}for(F=0;G=H[F++];){D=B[G];if(D&&(D==M._o[G])){continue}J[G]=(typeof D!="function")?D:I(D,G,E,typeof K[G]=="function"&&K[G])}},__gc:function(C){if(typeof C=="object"){C=C.KEY||""}var B=_.get(window,C.split(".")),D;if(B){if(D=_.get(window,["linb","cache","SC"])){delete D[C]}for(var A=0,E;E=B.$children[A];A++){if(E=_.get(window,E.split("."))){CLASS.__gc(E)}}B.$parent.length=B.$children.length=0;_.set(window,C.split("."))}}});_.merge(linb,{cache:{dom:{},domId:{},template:{},hookKey:{},thread:{},SC:{},text:{}},Locale:{en:{}},$lang:"en",$href:"javascript:;",$langId:"linblangkey",setAppLangKey:function(A){linb.$appLangKey=A},getAppLangKey:function(A){return linb.$appLangKey},getLang:function(){return linb.$lang},setLang:function(I,K){var B=linb.Locale,E=linb.getRes,L,J,D,C,F,A,G,H=[];linb.$lang=I;J=linb.browser.ie?document.all.tags("span"):document.getElementsByTagName("span");for(D=0;L=J[D];D++){if(L.id==linb.$langId){H[H.length]=L}}F=function(){(function(){C=H.splice(0,100);for(D=0;L=C[D];D++){if(typeof (J=E(L.className))=="string"){L.innerHTML=J}}if(H.length){setTimeout(arguments.callee,0)}_.tryF(K)}())},G="linb.Locale."+I,A=function(){var M=linb.$appLangKey;if(M){linb.include(G+"."+M,linb.getPath("Locale."+I,".js"),F,F)}else{F()}};linb.include(G,linb.getPath(G,".js"),A,A)},_r:/\x24(\d+)/g,getRes:function(D){var B,A=D.indexOf("-")!=-1?((B=D.split("-"))&&(D=B[0])&&B):arguments,C=_.get(linb.Locale[linb.$lang],D.split("."));return(B=typeof C)=="string"?C.replace(linb._r,function(E,F){return A[parseInt(F)+1]||E}):B=="function"?C.apply(null,A):C?C:D.substr(D.lastIndexOf(".")+1)},wrapRes:function(D){var A=D,B,C;if(A.charAt(0)=="$"){arguments[0]=A.substr(1,A.length-1)}B=D;C=linb.getRes.apply(null,arguments);if(B==C){C=A}return'<span id="'+linb.$langId+'" class="'+B+'">'+C+"</span>"},request:function(B,C,E,F,D,A){return((A&&A.method.toLowerCase()=="post")?linb.IAjax:linb.absIO.isCrossDomain(B)?linb.SAjax:linb.Ajax).apply(null,arguments).start()},include:function(D,A,B,C){if(D&&linb.SC.get(D)){_.tryF(B)}else{linb.SAjax(A,"",B,C,0,{rspType:"script",checkKey:D}).start()}},_m:[],main:function(A){linb._m.push(A)},getPath:function(F,A,G){F=F.split(".");if(G){var C=[F[0],G];for(var E=1,B=F.length;E<B;E++){C.push(F[E])}F.length=0;F=C}var H,D=linb.ini;if(F[0]=="linb"){H=D.path;F.shift();if(F.length==(G?1:0)){F.push("linb")}}else{H=D.appPath;if(F.length==((G?1:0)+1)&&A==".js"){F.push("index")}if(D.verPath){H+=D.verPath+"/"}if(D.ver){H+=D.ver+"/"}}return H+F.join("/")+(A||"/")},log:_.fun(),message:_.fun(),_pool:[],getObject:function(A){return linb._pool["$"+A]},create:function(I,A){var F,B,H,G=arguments.callee,C=G.r1||(G.r1=/</);if(typeof I=="string"){if(A===true){B=linb([document.createTextNode(I)])}else{if(H=linb.absBox.$type[I]){F=[];for(var E=1,D=arguments.length;E<D;E++){F[E-1]=arguments[E]}B=new (linb.SC(H))(false);if(B._ini){B._ini.apply(B,F)}}else{if(C.test(I)){B=_.str.toDom(I)}else{B=document.createElement(I);B.id=typeof A=="string"?A:_.id();B=linb([B])}}}}else{B=new (linb.SC(I.key))(I)}return B}});new function(){var H=window,J=navigator.userAgent.toLowerCase(),F=document,G=linb.browser={kde:/webkit/.test(J),opr:/opera/.test(J),ie:/msie/.test(J)&&!/opera/.test(J),gek:/mozilla/.test(J)&&!/(compatible|webkit)/.test(J),isWin:/(windows|win32)/.test(J),isMac:/(macintosh|mac os x)/.test(J),isAir:/adobeair/.test(J),isLinux:/linux/.test(J),isSecure:location.href.toLowerCase().indexOf("https")==0},I=function(M,N){return M+(G.ver=J.split(N)[1].split(".")[0])};_.filter(G,function(M){return !!M});if(G.ie){G[I("ie","msie ")]=true;if(G.ie6){try{document.execCommand("BackgroundImageCache",false,true)}catch(E){}H.XMLHttpRequest=function(){return new ActiveXObject("Msxml2.XMLHTTP")}}}else{if(G.gek){G[I("gek","firefox/")]=true}else{if(G.opr){G[I("opr","opera/")]=true}else{if(G.kde){G[I("kde","webkit/")]=true}}}}G.contentBox=function(M){return(G.ie||G.opr)?!/BackCompat|QuirksMode/.test(F.compatMode):(M=(M=M||F.documentElement).style["-moz-box-sizing"]||M.style["box-sizing"])?(M=="content-box"):true}();var L=linb.ini={};if(window.linb_ini){_.merge(L,window.linb_ini)}if(!L.path){var K,C=document.getElementsByTagName("script"),A=/js\/linb(-[\w]+)?\.js$/,B=C.length;while(--B>=0){K=C[B].src;if(K.match(A)){L.path=K.replace(A,"");break}}}_.merge(L,{appPath:location.href.split("?")[0].replace(/[^\\\/]+$/,""),file_bg:L.path+"bg.gif",dummy_tag:"$_dummy_$"});if(!L.path){L.path=L.appPath+"/jsLinb"}var D=function(){if(F.addEventListener&&!G.kde){F.removeEventListener("DOMContentLoaded",arguments.callee,false)}try{for(var N=0,M=linb._m.length;N<M;N++){_.tryF(linb._m[N])}linb._m.length=0;linb.isDomReady=true}catch(O){_.asyRun(function(){throw O})}};if(F.addEventListener&&!G.kde){F.addEventListener("DOMContentLoaded",D,false)}else{if(G.ie){(function(){try{F.activeElement.id;F.documentElement.doScroll("left");D()}catch(M){setTimeout(arguments.callee,1)}})()}else{(function(){/loaded|complete/.test(F.readyState)?D():setTimeout(arguments.callee,1)})()}}};Class("linb.Thread",null,{Constructor:function(B,C,E,G,H,A,D){var J=this,F=arguments.callee,I=linb.cache.thread;if(J.constructor!==F||!!J.id){return new F(B,C,E,G,H,A,D)}if(typeof B!="string"){B="$"+(J.constructor.$id++)}J.id=B;J.profile=I[B]||(I[B]={id:B,_start:false,time:0,_left:0,_asy:-1,index:0,tasks:C||[],delay:E||0,callback:G,onStart:H,onEnd:A,cache:{},status:"run",cycle:!!D})},Instance:{_fun:_.fun(),__gc:function(){var A=linb.cache.thread,C=A[this.id];if(C){delete A[this.id];C.tasks.length=0;for(var B in C){C[B]=null}}},_task:function(){var A=this,G=A.profile,C={args:[]},F=G.tasks[G.index],E,B,D=typeof F;G._asy=-1;if(!G.status){return }if(D=="function"){C.task=F}else{if(D=="object"){for(B in F){C[B]=F[B]}}}if(typeof C.task!="function"){C.task=A._fun}if(typeof C.callback!="function"){C.callback=G.callback}C.args.push(G.id);G.index++;G.time=_();E=_.tryF(C.task,C.args||[G.id],C.scope||A,null);if(!G.status){return }if(C.id){G.cache[C.id]=E}if(C.callback){if(false===_.tryF(C.callback,[G.id],A,true)){A.abort();return }}if(G.status!=="run"){return }if(!G||G.status!=="run"){return }A.start()},start:function(E){var B=this,D=B.profile,A,C;if(D._start===false){D._start=true;if(false===_.tryF(D.onStart,[D.id],B)){return B.abort()}}if(!D.tasks.length){return B.abort()}if(D.index>=D.tasks.length){if(D.cycle===true){B.profile.index=0}else{return B.abort()}}A=D.tasks[D.index];C=typeof A=="number"?A:typeof A.delay=="number"?A.delay:D.delay;D._left=(E||E===0)?E:C;if(D._asy!=-1){clearTimeout(D._asy)}D._asy=_.asyRun(B._task,D._left,[],B);D.time=_();return B},suspend:function(){var B,A=this.profile;if(A.status=="pause"){return }A.status="pause";if(A._asy!==-1){clearTimeout(A._asy);if(A.index>0){A.index--}}B=A._left-(_()-A.time);A._left=(B>=0?B:0);return this},resume:function(B){var A=this;if(A.profile.status=="run"){return }B=B===undefined?A.profile._left:B===true?A.profile.delay:B===false?0:(Number(B)||0);A.profile.status="run";A.start(B);return A},abort:function(){var A=this.profile;A.status="stop";clearTimeout(A._asy);_.tryF(A.onEnd,[A.id]);this.__gc()},links:function(A){var C=this.profile,B=C.onEnd,D=C.id;C.onEnd=function(){_.tryF(B,[D]);A.start()};return this},insert:function(A,E){var D=this,F=D.profile.tasks,C=F.length,B;if(A.constructor!=Array){A=[A]}E=E||D.profile.index;if(E<0||E>C){E=C}B=F.splice(E,C-E);F.push.apply(F,A);F.push.apply(F,B);return D},getCache:function(A){return this.profile.cache[A]},setCache:function(A,B){this.profile.cache[A]=B;return this}},After:function(){var C=this,E=function(F){C[F]=function(H){var G;if(linb.cache.thread[H]){(G=linb.Thread(H))[F].apply(G,Array.prototype.slice.call(arguments,1))}}},B="start,suspend,resume,abort".split(",");for(var D=0,A=B.length;D<A;D++){E(B[D])}},Static:{$id:1,__gc:function(){linb.cache.thread={}},isAlive:function(A){return !!linb.cache.thread[A]},observableRun:function(E,B,C){var A=linb.Thread,D=linb.Dom;if(!_.isArr(E)){E=[E]}if(linb.cache.thread[C]){if(typeof B=="function"){E.push(B)}A(C).insert(E)}else{A(C,E,0,null,function(F){if(D){D.busy(F)}},function(F){_.tryF(B,arguments,this);if(D){D.free(F)}}).start()}},group:function(B,F,G,H,A){var I={},E=linb.Thread,D=function(M,J,L){if(typeof M=="string"){M=E(M)}if(M){var K=function(){var N=arguments.callee;_.tryF(N.onEnd,arguments,this);N.onEnd=null;delete I[J];_.tryF(G,[J,L],this);if(_.isEmpty(I)){E.resume(L)}};K.onEnd=M.profile.onEnd;M.profile.onEnd=K;M.start()}};for(var C in F){I[C]=1}return E(B,[function(K){if(!_.isEmpty(F)){E.suspend(K);for(var J in F){D(F[J],J,K)}}}],0,null,H,A)}}});Class("linb.absIO",null,{Constructor:function(C,H,G,A,E,L){if(typeof C=="object"){L=C}else{L=L||{};_.merge(L,{uri:C,query:H,onSuccess:G,onFail:A,threadid:E})}var K=this,I=arguments.callee,B=K.constructor;if((B!==I)||K.id){return new I(L)}_.merge(L,{id:L.id||(_()+""+(B._id++)),uri:L.uri||"",query:L.query||"",asy:L.asy!==false,method:"POST"==(L.method||B.method).toUpperCase()?"POST":"GET"},"all");var J="retry,timeout,rspType,customQS".split(",");for(var F=0,D=J.length;F<D;F++){L[J[F]]=(J[F] in L)?L[J[F]]:B[J[F]]}_.merge(K,L,"all");if(B.events){_.merge(K,B.events)}K.query=K.customQS(K.query);if(!K._useForm&&typeof K.query!="string"){K.query=B._buildQS(K.query,K._single,K.method=="POST")}return K},Instance:{_fun:_.fun(),_flag:0,_response:"",_retryNo:0,_end:false,_time:function(){var A=this,B=A.constructor;A._clear();if(A._retryNo<A.retry){A._retryNo++;_.tryF(A.onRetry,[A._retryNo],A);A.start()}else{_.tryF(A.onTimeout,[],A);A._onError(new Error("errTimout"))}},_onEnd:function(){var A=this;A._end=true;if(A._flag>0){clearTimeout(A._flag);A._flag=0}linb.Thread.resume(A.threadid);_.tryF(A.onEnd,[],A);A._clear()},_onStart:function(){var A=this;linb.Thread.suspend(A.threadid);_.tryF(A.onStart,[],A)},_onResponse:function(){var A=this;if(false!==_.tryF(A.beforeSuccess,[A._response,A.rspType,A.threadid],A)){_.tryF(A.onSuccess,[A._response,A.rspType,A.threadid],A)}A._onEnd()},_onError:function(B){var A=this;if(false!==_.tryF(A.beforeFail,[B,A.threadid],A)){_.tryF(A.onFail,[String(B),A.rspType,A.threadid],A)}A._onEnd()},abort:function(){this._onEnd()}},Static:{$abstract:true,_id:1,method:"GET",retry:2,timeout:60000,rspType:"text",type:"type",randkey:"id",callback:"callback",_buildQS:function(C,A,B){return A?((A=_.serialize(C))&&(B?A:encodeURIComponent(A))):_.urlEncode(C)},customQS:function(A){return A},_if:function(D,F,B){var C=linb.browser.ie,E=D.createElement(C?"<iframe name='"+F+"' "+(B?"onload='linb.IAjax._o(\""+F+"\")'":"")+">":"iframe"),A;if(F){E.id=E.name=F}if(!C&&B){E.onload=B}E.style.display="none";D.body.appendChild(E);A=frames[frames.length-1];return[E,A,A.document]},isCrossDomain:function(D){D=D||"";var C=arguments.callee,B=C.r||(C.r=/(http(s)?\:\/\/)?([\w\.]+(:[\d]+)?)(.*)/),A;if((A=D.indexOf(":"))==-1||A>D.indexOf("/")){return false}if(D.indexOf("file:")===0){return !!location.host}return location.host!=D.replace(B,"$3")},groupCall:function(F,G,A,B,E){var C,D=function(J,H,I){I[H]=linb.Thread(null,[function(K){J.threadid=K;J.start()}])};for(C in F){D(F[C],C,F)}return linb.Thread.group(null,F,G,function(){linb.Thread(E).suspend();_.tryF(A,arguments,this)},function(){_.tryF(B,arguments,this);linb.Thread(E).resume()}).start()}}});Class("linb.Ajax","linb.absIO",{Instance:{_single:true,_XML:null,start:function(){var self=this;if(false===_.tryF(self.beforeStart,[],self)){self._onEnd();return }if(!self._retryNo){self._onStart()}try{with(self){var x=self._XML=new window.XMLHttpRequest();if(asy){x.onreadystatechange=function(){if(self&&x&&x.readyState==4){self._complete.apply(self);self._clear()}}}if(!_retryNo&&method!="POST"){if(query){uri=uri.split("?")[0]+"?"+query}query=null}if(x.overrideMimeType){x.overrideMimeType("text/xml")}x.open(method,uri,asy);if(method!="POST"){x.setRequestHeader("Content-type","application/x-www-form-urlencoded")}x.setRequestHeader("X-Requested-With","XMLHttpRequest");if(x.overrideMimeType){x.setRequestHeader("Connection","close")}try{x.send(query)}catch(e){}if(asy){if(x&&timeout>0){_flag=_.asyRun(function(){if(self&&!self._end){self._time()}},self.timeout)}}else{_complete()}}}catch(e){self._onError(e)}return self},abort:function(){var B=this,A=B._XML;if(A){A.onreadystatechange=B._fun;A.abort();B._XML=null}arguments.callee.upper.call(B)},_clear:function(){var B=this,A=B._XML;if(A){A.onreadystatechange=B._fun;B._XML=null}},_complete:function(){with(this){var x=this._XML,status=x.status;_response=rspType=="text"?x.responseText:x.responseXML;if(status===undefined||status===0||status==304||(status>=200&&status<300)){_onResponse()}else{_onError(new Error("errXMLHTTP:"+status))}}}}});Class("linb.SAjax","linb.absIO",{Instance:{start:function(){var B=this,G,F=B.constructor,D,E,C=false;if(false===_.tryF(B.beforeStart,[],B)){B._onEnd();return }if(!B._retryNo){B._onStart()}if(B.rspType=="script"){B.retry=0}G=B.id;if(F._pool[G]){F._pool[G].push(B)}else{F._pool[G]=[B]}var A=F._n=document;E=B.node=A.createElement("script");E.src=B.uri+(B.query?"?"+B.query:"");E.type="text/javascript";E.charset="utf-8";E.id="linb:script:"+B.id;E.onload=E.onreadystatechange=function(){var H=this.readyState;if(!C&&(!H||H=="loaded"||H=="complete")){C=true;if(B.rspType=="script"){if(typeof B.checkKey=="string"){_.asyRun(function(){_.exec("var a=linb.SAjax._pool['"+G+"'][0];if(linb.SC.get('"+B.checkKey+"'))a._onResponse();else a._loaded();")})}else{B._onResponse()}}else{B._loaded()}}};E.onerror=function(){B._loaded()};A.body.appendChild(E);if(B.timeout>0){B._flag=_.asyRun(function(){if(B&&!B._end){B._time()}},B.timeout)}},_clear:function(){var B=this,E=B.node,D=B.constructor,C=D._div||(D._div=D._n.createElement("div")),A=B.constructor._pool;A.length=0;delete A[B.id];if(E){B.node=E.id=E.onload=E.onreadystatechange=E.onerror=null;if(B.rspType!="script"){C.appendChild(E.parentNode&&E.parentNode.removeChild(E)||E);if(linb.browser.ie){_.asyRun(function(){C.innerHTML="";E.removeNode()})}else{C.innerHTML=""}}}},_loaded:function(){var A=this;_.asyRun(function(){if(A.id&&A.constructor._pool[A.id]){A._onError(new Error("errInData"))}},500)}},Static:{_pool:{},$response:function(E){var B=this;try{if(E&&(o=B._pool[E[B.randkey]])){for(var C=0,A=o.length;C<A;C++){o[C]._response=E;o[C]._onResponse()}}else{B._onError(new Error("errInData:"+E))}}catch(D){linb.Debugger&&linb.Debugger.trace(D)}},customQS:function(F){var G=this.constructor,C=G.type,B=G.randkey,A=G.callback,E=(this.rspType!="script"),D=E?B+"="+this.id+"&type=script&":"";if(typeof F=="string"){return(F&&F+"&")+D+(E?A+"=linb.SAjax.$response":"")}else{if(E){F[C]="script";F[B]=this.id;F[A]="linb.SAjax.$response"}return F}}}});Class("linb.IAjax","linb.absIO",{Instance:{_useForm:true,$e:function(A){this._onError(new Error("errInData:"+A))},start:function(){var L=this,H=L.constructor,G,B,K,D,F,C,I,A,E;if(false===_.tryF(L.beforeStart,[],L)){L._onEnd();return }if(!L._retryNo){L._onStart()}B=L.id;if(H._pool[B]){H._pool[B].push(L)}else{H._pool[B]=[L]}L._onload=E=function(M){if(!L.node){return }var T=L.node.contentWindow,R=linb.IAjax,N,U;if(linb.browser.opr){try{if(T.location=="about:blank"){return }}catch(Q){}}try{T.location=R._getDummy()+"#"+linb.ini.dummy_tag;if(T.name==L.id){L.$e("no response")}else{try{N=_.unserialize(decodeURIComponent(T.name));if(N&&(U=R._pool[N[R.randkey]])){for(var P=0,O=U.length;P<O;P++){U[P]._response=N;U[P]._onResponse()}}else{L.$e(T.name)}}catch(S){L.$e(T.name)}}}catch(Q){}};var J=H._if(document,B,E);L.node=J[0];L.frm=J[1];A=L.form=document.createElement("form");A.style.display="none";A.action=L.uri;A.method=L.method;A.target=B;F=L.query||{};for(G in F){if(F[G]&&F[G].nodeName=="INPUT"){F[G].id=F[G].name=G;A.appendChild(F[G]);I=true}else{K=document.createElement("input");K.id=K.name=G;K.value=typeof F[G]=="string"?F[G]:_.serialize(F[G]);A.appendChild(K)}}if(L.method=="POST"&&I){A.enctype="multipart/form-data";if(A.encoding){A.encoding=A.enctype}}document.body.appendChild(A);A.submit();if(L.timeout>0){L._flag=_.asyRun(function(){if(L&&!L._end){L._time()}},L.timeout)}},_clear:function(){var A=this,G=A.node,B=A.form,F=A.constructor,E=F._div||(F._div=document.createElement("div"));if(linb.browser.gek&&G){try{G.onload=null;var D=G.contentWindow.document;D.write(" ");D.close()}catch(C){}}A.form=A.node=A.frm=null;clearTimeout(A._tf);if(G){E.appendChild(G.parentNode.removeChild(G))}if(B){E.appendChild(B.parentNode.removeChild(B))}E.innerHTML=""}},Static:{method:"POST",_pool:{},_o:function(D){var A=this,B=A._pool[D],C=B[B.length-1];_.tryF(C._onload)},_getDummy:function(E){E=E||window;var I=this,D,A,H=E.document,K=linb.ini,J=linb.browser,F=I.isCrossDomain;if(I.dummy){return I.dummy}if(K.dummy){return I.dummy=K.dummy}if(J.gek){D=H.getElementsByTagName("link");for(var C=0,B=D.length;C<B;C++){A=D[C];if(A.rel=="stylesheet"&&!F(A.href)){return I.dummy=A.href.split("#")[0]}}}if(!F(K.path)){if(!H.getElementById("linb:img:bg")){A=H.createElement("img");A.id="linb:img:bg";A.src=K.file_bg;A.style.display="none";H.body.appendChild(A)}}D=H.getElementsByTagName("img");for(var C=0,B=D.length;C<B;C++){A=D[C];if(!F(A.src)){return I.dummy=A.src.split("#")[0]}}try{if(E!=E.parent){if((E=E.parent)&&!F(""+E.document.location.href)){return I._getDummy(E)}}}catch(G){}return"/favicon.ico"},customQS:function(C){var B=this,D=B.constructor,A=D.type;C[A]="iframe";C[D.randkey]=B.id;return C}}});Class("linb.SC",null,{Constructor:function(F,G,A,E,B){var D=linb.cache.SC,C;if(C=D[F]||(D[F]=_.get(window,F.split(".")))){_.tryF(G,[F,null,E],C)}else{B=B||{};B.$cb=G;if(A){B.threadid=E}C=D[F]=linb.SC._call(F||"",B,A)}return C},Static:{__gc:function(A){linb.cache.SC={}},get:function(B,A){return _.get(A||window,(B||"").split("."))},_call:function(L,M,H){H=!!H;var D,J,A,C,G=[],K=linb.SC.get,E=linb.cache.text,F=function(Q,R,P){var N=this;if(Q){if(!K(L)){if(N.$p){(N.$cache||E)[N.$tag]=Q}else{try{_.exec(Q)}catch(O){throw new Error('errInEval:"'+O+N.$tag)}}}}_.tryF(N.$cb,[N.$tag,Q,P],K(L)||{})},B=function(O){var N=this;_.tryF(N.$cb,[null,null,N.threadid],N)};if(!(A=K(L))){if(J=E[L]){H=false;F.call({$cb:M.$cb},J);delete E[L]}if(!(A=K(L))){C=linb.getPath(L,".js","js");M=M||{};M.$tag=L;var I;if(H&&!M.$p){M.rspType="script";I=linb.SAjax}else{M.asy=H;I=linb.Ajax}I(C,"",F,B,null,M).start();if(!H){A=K(L)}}}else{if(M.$cb){F.call(M)}}return A},loadSnips:function(F,B,G,A,D){if(!F||!F.length){_.tryF(A,[D]);return }var H={},J={$p:1,$cache:B||linb.cache.text};for(var E=0,C=F.length;E<C;E++){H[F[E]]=1}if(G||A){J.$cb=function(K){if(G){_.tryF(G,arguments,this)}delete H[K||this.$tag];if(_.isEmpty(H)){_.tryF(A,[D]);A=null;linb.Thread.resume(D)}}}linb.Thread.suspend(D);for(var E=0,I;I=F[E++];){this._call(I,_.merge({$tag:I},J),true)}},runInBG:function(E,F,G,A){var C=0,B,H,I=this,D=function(J){while(E.length>C&&(H=I.get(B=E[C++]))){}if(!H){I._call(B,{threadid:J},true)}if(E.length<C){linb.Thread(J).abort()}if(E.length==C){C++}};linb.Thread(null,[D],1000,F,G,A,true).start()},execSnips:function(A){var B,C=A||linb.cache.text;for(B in C){try{_.exec(C[B])}catch(D){throw new Error('errInEval:"'+D)}}C={}},groupCall:function(C,E,B,D){if(C){var A=this;A.execSnips();linb.Thread.suspend(D);A.loadSnips(C,0,E,function(){A.execSnips();_.tryF(B,[D]);B=null;linb.Thread.resume(D)})}else{_.tryF(B,[D])}}}});new function(){var max,M={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},H={"@window":"window","@this":"this"},A=/[\x00-\x1f\x7f-\x9f\\\"]/g,C=/^\s*\x7b/,D=/^(-\d+|\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,3}))?((?:[+-](\d{2}):(\d{2}))|Z)?$/,E=function(t,i,a,v,m,n){for(i in t){if((a=typeof (v=t[i]))=="string"&&(v=D.exec(v))){m=v[8]&&v[8].charAt(0);if(m!="Z"){n=(m=="-"?-1:1)*((+v[9]||0)*60)+(+v[10]||0)}else{n=0}m=new Date(+v[1],+v[2]-1,+v[3],+v[4],+v[5],+v[6],+v[7]||0);n-=m.getTimezoneOffset();if(n){m.setTime(m.getTime()+n*60000)}t[i]=m}else{if(a=="object"&&a.constructor===Object){E(t[i])}}}return t},R=function(n){return n<10?"0"+n:n},F="function",N="number",L="boolean",S="string",O="object",T={},S16=function(b){return Math.floor(b/16).toString(16)+(b%16).toString(16)},MS=function(x,s){return"."+((s=x[s]())?s<10?"00"+s:s<100?"0"+s:s:"000")},Z=(function(a,b){a=-(new Date).getTimezoneOffset()/60;b=a>0?"+":"-";a=""+Math.abs(a);return b+a+(a.length==1?"0":"")+":00"})();T["undefined"]=function(){return"undefined"};T[L]=function(x){return String(x)};T[N]=function(x){return isFinite(x)?String(x):"null"};T[S]=function(x){return H[x]||'"'+(A.test(x)?x.replace(A,function(a,b){if(b=M[a]){return b}b=a.charCodeAt();return"\\u00"+S16(b)}):x)+'"'};T[O]=function(x,filter,dateformat,deep){var me=arguments.callee,map=me.map||(me.map={prototype:1,constructor:1,toString:1,valueOf:1});deep=deep||1;if(deep>99||max>9999){return'"too much recursion!"'}max++;if(x){var a=[],b=[],c=x.constructor,f,i,l,v;if(x===window){return"window"}if(x===document){return"document"}if((typeof x==O||typeof x==F)&&typeof c!=F){return x.nodeType?"document.getElementById('"+x.id+"')":"$alien"}else{if(c==Array){a[0]="[";l=x.length;for(i=0;i<l;++i){if(typeof filter=="function"&&false==filter.call(x,x[i],i)){continue}if(f=T[typeof (v=x[i])]){if(typeof (v=f(v,filter,dateformat,deep+1))==S){b[b.length]=v}}}a[2]="]"}else{if(c==Date){if(dateformat=="utc"){return'"'+x.getUTCFullYear()+"-"+R(x.getUTCMonth()+1)+"-"+R(x.getUTCDate())+"T"+R(x.getUTCHours())+":"+R(x.getUTCMinutes())+":"+R(x.getUTCSeconds())+MS(x,"getUTCMilliseconds")+'Z"'}else{if(dateformat=="gmt"){return'"'+x.getFullYear()+"-"+R(x.getMonth()+1)+"-"+R(x.getDate())+"T"+R(x.getHours())+":"+R(x.getMinutes())+":"+R(x.getSeconds())+MS(x,"getMilliseconds")+Z+'"'}else{return"new Date("+[x.getFullYear(),x.getMonth(),x.getDate(),x.getHours(),x.getMinutes(),x.getSeconds(),x.getMilliseconds()].join(",")+")"}}}else{if(c==RegExp){return String(x)}else{if(typeof x.serialize==F){x=x.serialize()}if(typeof x==O){if(x.nodeType){return"document.getElementById('"+x.id+"')"}else{a[0]="{";for(i in x){if(map[i]||(filter===true?i.charAt(0)=="_":typeof filter=="function"?false===filter.call(x,x[i],i):0)){continue}if(f=T[typeof (v=x[i])]){if(typeof (v=f(v,filter,dateformat,deep+1))==S){b[b.length]=T.string(i)+":"+v}}}a[2]="}"}}else{return String(x)}}}}}a[1]=b.join(", ");return a[0]+a[1]+a[2]}return"null"};T[F]=function(x){return x.$path?x.$path:String(x)};_.serialize=function(obj,filter,dateformat){max=0;return T[typeof obj](obj,filter,dateformat)||""};_.unserialize=function(str,dateformat){try{str=eval(C.test(str)?"("+str+")":str);if(dateformat){if(typeof str==="object"){E(str)}else{if(typeof str==="string"){return E({a:str}).a}}}return str}catch(e){return false}}};_.id=function(){var A=this,B=arguments.callee;if(A.constructor!==B||A.a){return(B._||(B._=new B)).next()}A.a=[-1];A.b=[""];A.value=""};_.id.prototype={constructor:_.id,_chars:"abcdefghijklmnopqrstuvwxyz".split(""),next:function(i){with(this){var m,k,l,i=(i||i===0)?i:b.length-1;if((m=a[i])>=25){m=0;if(i===0){a.splice(0,0,1);b.splice(0,0,"a");l=a.length;for(k=1;k<l;++k){a[k]=0;b[k]="0"}++i}else{next(i-1)}}else{++m}a[i]=m;b[i]=_chars[m];return value=b.join("")}}};(linb.Locale.en||(linb.Locale.en={})).inline={ok:"O K",cancel:"Cancel",set:"SET",today:"Today",yes:"Yes",no:"No"};linb.Locale.en.date={WEEKS:{"0":"Su","1":"Mo","2":"Tu","3":"We","4":"Th","5":"Fr","6":"Sa","7":"WK"},VIEWS:{"10 ms":"10 millisecond","100 ms":"100 milliseconds","1 s":"1 second","10 s":"10 seconds","1 n":"1 minute","5 n":"5 minutes","10 n":"10 minutes","30 n":"30 minutes","1 h":"1 hour","2 h":"2 hours","6 h":"6 hours","1 d":"1 day","1 w":"1 week","15 d":"15 days","1 m":"1 month","1 q":"1 quarter","1 y":"1 year","1 de":"10 years","1 c":"1 century"},MONTHS:{"1":"Jan.","2":"Feb.","3":"Mar.","4":"Apr.","5":"May.","6":"Jun.","7":"Jul.","8":"Aug.","9":"Sep.","10":"Oct.","11":"Nov.","12":"Dec."},MS:"ms",S:"s",N:"n",H:"h",D:"d",W:"w",M:"m",Q:"q",Y:"y",DE:"de",C:"c",HN:function(C,B,A){return B+":"+A},DHN:function(D,B,A,C){return B+"th "+A+":"+C},MDHN:function(E,B,A,D,C){return A+"th "+linb.getRes("date.MONTHS."+B)+" "+D+":"+C},HNS:function(D,B,A,C){return B+":"+A+":"+C},HNSMS:function(E,B,A,D,C){return B+":"+A+":"+D+" "+C},YM:function(C,B,A){return linb.getRes("date.MONTHS."+A)+" "+B},YQ:function(C,B,A){return A+"Q "+B},YMD:function(D,B,A,C){return A+"/"+C+"/"+B},YMD2:function(D,B,A,C){return linb.getRes("date.MONTHS."+A)+" "+C+", "+B},MD:function(C,B,A){return linb.getRes("date.MONTHS."+B)+" "+A},YMDH:function(E,B,A,D,C){return D+"/"+A+"/"+B+" "+C+":00"},YMDHN:function(F,B,A,E,D,C){return A+"/"+E+"/"+B+" "+D+":"+C},YMDHNS:function(G,B,A,F,E,D,C){return A+"/"+F+"/"+B+" "+E+":"+D+":"+C},ALL:function(H,B,A,G,F,E,D,C){return A+"/"+G+"/"+B+" "+F+":"+E+":"+D+" "+C}};linb.Locale.en.color={LIST:{FFFFFF:"White",FFFFF0:"Ivory",FFFFE0:"Light Yellow",FFFF00:"Yellow",FFFAFA:"Snow",FFFAF0:"Floral White",FFFACD:"Lemon Chiffon",FFF8DC:"Cornislk",FFF5EE:"Sea Shell",FFF0F5:"Lavender Blush",FFEFD5:"Papaya Whip",FFEBCD:"Blanched Almond",FFE4E1:"Misty Rose",FFE4C4:"Bisque",FFE4B5:"Moccasin",FFDEAD:"Navajo White",FFDAB9:"Peach Puff",FFD700:"Gold",FFC0CB:"Pink","FFB6C1 ":"Light Pink",FFA500:"Orange",FFA07A:"Light Salmon",FF8C00:"Dark Orange",FF7F50:"Coral",FF69B4:"Hot Pink",FF6347:"Tomato",FF4500:"Orange Red",FF1493:"Deep Pink",FF00FF:"Magenta",FF00FF:"Fuchsia",FF0000:"Red",FDF5E6:"Old Lace",FAFAD2:"Light Goldenrod Yellow",FAF0E6:"Linen",FAEBD7:"Antique White",FA8072:"Salmon",F8F8FF:"Ghost White",F5FFFA:"Medium Spring Green",F5F5F5:"White Smoke",F5DEB3:"Wheat",F4A460:"Sandy Brown",F0FFFF:"Azure",F0FFF0:"Honeydew",F0F8FF:"Alice Blue",F0E68C:"Khaki",F08080:"Light Coral",EEE8AA:"Pale Godenrod",EE82EE:"Violet",E9967A:"Dark Salmon",E6E6FA:"Lavender",E1FFFF:"Light Cyan",DEB887:"Bruly Wood",DDA0DD:"plum",DCDCDC:"Gainsboro",DC143C:"Crimson",DB7093:"Pale Violet Red",DAA520:"Gold Enrod",DA70D6:"Orchid",D8BFD8:"Thistle",D3D3D3:"Light Grey",D2B48C:"Tan",D2691E:"Chocolate",CD853F:"Peru",CD5C5C:"Indian Red",C71585:"Medium Violet Red",C0C0C0:"Silver",BDB76B:"Dark Khaki",BC8F8F:"Rosy Brown",BA55D3:"Medium Orchid",B22222:"Fire Brick",B0E0E6:"Pow Der Blue",B0C4DE:"Light Steel Blue",AFEEEE:"Pale Turquoise",ADFF2F:"Green Yellow",ADD8E6:"Light BLue",A9A9A9:"Dark Gray",A52A2A:"Brown",A0522D:"Sienna","9932CC":"Dark Orchid","98FB98":"Pale Green","9400D3":"Dark Voilet","9370DB":"Medium Purple","90EE90":"Light Green","8FBC8F":"Dark Sea Green","8B4513":"Saddle Brown","8B008B":"Dark Magenta","8B0000":"Dark Red","8A2BE2":"Blue Violet","87CEFA":"Light Sky Blue","87CEEB":"Sky Blue","808080":"Gray","808000":"Olive","800080":"Purple","800000":"Maroon","7FFFAA":"Auqamarin","7FFF00":"Chartreuse","7CFC00":"Lawn Green","7B68EE":"Medium Slate Blue","778899":"Light Slate Gray","708090":"Slate Gray","6B8E23":"Beige","6A5ACD":"Slate Blue","696969":"Dim Gray","6495ED":"Cornflower Blue","5F9EA0":"Cadet Blue","556B2F":"Olive Drab","4B0082":"Indigo","48D1CC":"Medium Turquoise","483D8B":"Dark Slate Blue","4682B4":"Steel Blue","4169E1":"Royal Blue","40E0D0":"Turquoise","3CB371":"Spring Green","32CD32":"Lime Green","2F4F4F":"Dark Slate Gray","2E8B57":"Sea Green","228B22":"Forest Green","20B2AA":"Light Sea Green","1E90FF":"Doder Blue","191970":"Midnight Blue","00FFFF":"Cyan","00FFFF":"Aqua","00FF7F":"Mint Cream","00FF00":"Lime","00FA9A":"Medium Aquamarine","00CED1":"Dark Turquoise","00BFFF":"Deep Sky Blue","008B8B":"Dark Cyan","008080":"Teal","008000":"Green","006400":"Dark Green","0000FF":"Blue","0000CD":"Medium Blue","00008B":"Dark Blue","000080":"Navy","000000":"Black"}};Class("linb.Event",null,{Constructor:function(M,K,A,O){var H=linb.Event,R=0,J,D=linb.DragDrop,C,B,I,F;if(!(M=M||window.event)||!(C=K)){return false}B=M.type;if(O){C._tid=O}if("mouseover"==B||"mouseout"==B){R=(D&&D._profile.isWorking)?1:2;if(R!=1&&A){return H.$FALSE}if(!H._handleMouseHover(M,C,H.getSrc(M),R==1)){return H.$FALSE}if(R==1){I=D&&D._dropElement}}else{if((F=H._tabHookStack).length&&H._kb[B]&&(M.$key||M.keyCode||M.charCode)==9&&false===H._handleTabHook(H.getSrc(M),F=F[F.length-1])){return }}J=O||H.getId(C);if(F=H._getProfile(J)){if(B=="mousedown"){_.tryF(linb.Dom._blurTrigger,[F,M,C],C)}else{if(B=="resize"){B="size";if(linb.browser.ie&&window===C){var E=linb.browser.contentBox&&document.documentElement.clientWidth||document.body.clientWidth,N=linb.browser.contentBox&&document.documentElement.clientHeight||document.body.clientHeight;if(F._w==E&&F._h==N){return }F._w=E;F._h=N}}}var L,P,S,G=true,Q=[];for(L=0;L<=2;++L){if(R==1&&L!==0&&!M.$force){break}if(R==2&&L===0){continue}S=H._type[B+L]||(H._type[B+L]=H._getEventName(B,H._eventtag[L]));if(!M.$e||M.$all||(S==M.$name)){F._getEV(Q,J,S,C)}}P=function(T){for(var V=0,U;U=Q[V++];){if(false===U.call(C,F,T||M,C)){return false}}return true};G=P();if(D){if(B=="drag"){D._onDrag=P}else{if(B=="dragover"){D._onDragover=P}}}if(R==1){if("mouseover"==B&&D._dropElement==C&&I&&I!=C){H({type:"mouseout",target:I,$e:true,$name:"beforeMouseout",preventDefault:function(){this.returnValue=false},stopPropagation:function(){this.cancelBubble=true}},I);D.setDropElement(C)}if("mouseout"==B&&!D._dropElement&&I&&I==C){H._preDropable=J;_.asyRun(function(){delete linb.Event._preDropable})}if(C==D._dropElement){G=false}}if(G===false){H.stopBubble(M)}return G}},Static:{$FALSE:linb.browser.opr?undefined:false,_type:{},_kb:{keydown:1,keypress:1,keyup:1},_reg:/(-[\w]+)|([\w]+$)/g,$eventhandler:function(){return linb.Event(arguments[0],this)},$eventhandler2:function(){return linb.Event(arguments[0],this,1)},_eventtag:"before,on,after".split(","),_events:("mouseover,mouseout,mousedown,mouseup,mousemove,click,dblclick,contextmenu,keydown,keypress,keyup,scroll,blur,focus,load,unload,change,select,submit,error,location,size,dragbegin,drag,dragstop,dragleave,dragenter,dragover,drop").split(","),_getEventName:function(A,D){var B=arguments.callee,C=B.map||(B.map={});return C[A+D]||(A=A.charAt(0).toUpperCase()+A.substring(1))&&(C[A+D]=D?(D+A.charAt(0).toUpperCase()+A.substring(1)):function(G){var H,F,E=[];for(H=0;F=linb.Event._eventtag[H];H++){E[H]=F+G}return E}(A))},_getEventType:function(A){var B=arguments.callee,C=B.map||(B.map={});return C[A]||(C[A]=A.replace(/^(on|before|after)/,"").toLowerCase())},_getProfile:function(C,B,A){return C&&((B=(A=linb.cache.dom)[C])?B["linb.UIProfile"]?B:(A=A[C.replace(this._reg,"")])?A:B:A[C.replace(this._reg,"")])},_handleTabHook:function(D,C){if(D===document){return true}var B=D,A;do{if(B==C[0]){return true}}while(B&&(B=B.parentNode)&&B!==document&&B!==window);A=_.tryF(C[1],[C[0]],D);return false},_handleMouseHover:function(B,F,A,I){if(F==document){return true}var D=(B.type=="mouseover"?B.fromElement:B.toElement)||B.relatedTarget;if(I&&B.type=="mouseover"&&this._preDropable){try{do{if(D&&D.id&&D.id==this._preDropable){return true}}while(D&&(D=D.parentNode)&&D!==document&&D!==window)}catch(H){}}if(linb.browser.gek){try{do{if(D==F){return false}}while(D&&(D=D.parentNode))}catch(H){var G=this.getPos(B),D=linb([F]),C=D.offset(),J=D.cssSize(),E=(G.left<C.left||G.left>C.left+J.width||G.top<C.top||G.top>C.top+J.height);return B.type=="mouseover"?!E:E}}else{do{if(D==F){return false}}while(D&&(D=D.parentNode))}return true},_tabHookStack:[],pushTabOutTrigger:function(B,A){this._tabHookStack.push([B,A]);return this},popTabOutTrigger:function(A){if(A){this._tabHookStack=[]}else{this._tabHookStack.pop()}return this},$EVENTHANDLER:"return linb.Event(arguments[0],this)",$EVENTHANDLER2:"return linb.Event(arguments[0],this,1)",getSrc:function(B){var A;return((A=B.target||B.srcElement||null)&&linb.browser.kde&&A.nodeType==3)?A.parentNode:A},getId:function(A){return window===A?"___window":document===A?"___document":A?A.id:""},getBtn:function(A){return linb.browser.ie?A.button==4?"middle":A.button==2?"right":"left":A.which==2?"middle":A.which==3?"right":"left"},getPos:function(A){A=A||window.event;if("pageX" in A){return{left:A.pageX,top:A.pageY}}else{return{left:A.clientX+this._L,top:A.clientY+this._T}}},getKey:function(A){A=A||window.event;var F=[],I,C=A.$key||A.keyCode||A.charCode||0;if(typeof C=="string"){F[0]=C}else{var H=String.fromCharCode(C),G=A.type;if((G=="keypress"&&C>=33&&C<=128)||((C>=48&&C<=57)||(C>=65&&C<=90))){F[0]=H}else{if(!(I=arguments.callee.map)){I=arguments.callee.map={};var C,E=("3,enter,8,backspace,9,tab,12,numlock,13,enter,19,pause,20,capslock,27,esc,32, ,33,pageup,34,pagedown,35,end,36,home,37,left,38,up,39,right,40,down,44,printscreen,45,insert,46,delete,50,down,52,left,54,right,56,up,91,win,92,win,93,apps,96,0,97,1,98,2,99,3,100,4,101,5,102,6,103,7,104,8,105,9,106,*,107,+,109,-,110,.,111,/,112,f1,113,f2,114,f3,115,f4,116,f5,117,f6,118,f7,119,f8,120,f9,121,f10,122,f11,123,f12,144,numlock,145,scroll,186,;,187,=,189,-,190,.,191,/,192,`,219,[,220,\\,221,],222,',224,meta,63289,numlock,63276,pageup,63277,pagedown,63275,end,63273,home,63234,left,63232,up,63235,right,63233,down,63272,delete,63302,insert,63236,f1,63237,f2,63238,f3,63239,f4,63240,f5,63241,f6,63242,f7,63243,f8,63244,f9,63245,f10,63246,f11,63247,f12,63248,print").split(",");for(var D=1,B=E.length;D<B;D=D+2){I[E[D-1]]=E[D]}E.length=0;I[188]=","}F[0]=I[C]||H}}if((A.modifiers)?(A.modifiers&Event.CONTROL_MASK):(A.ctrlKey||A.ctrlLeft||C==17||C==57391)){if(C==17||C==57391){F[0]=""}F.push("1")}else{F.push("")}if((A.modifiers)?(A.modifiers&Event.SHIFT_MASK):(A.shiftKey||A.shiftLeft||C==16||C==57390)){if(C==16||C==57390){F[0]=""}F.push("1")}else{F.push("")}if((A.modifiers)?false:(A.altKey||A.altLeft||C==18||C==57388)){if(C==18||C==57388){F[0]=""}F.push("1")}else{F.push("")}return F},getEventPara:function(E,A){var D=this.getKey(E),C={pageX:A&&A.left,pageY:A&&A.top,keyCode:D[0],ctrlKey:D[1],shiftKey:D[2],altKey:D[3]};for(var B in E){if(B.charAt(0)=="$"){C[B]=E[B]}}return C},stopBubble:function(A){A=A||window.event;if(A.stopPropagation){A.stopPropagation()}A.cancelBubble=true;this.stopDefault(A)},stopDefault:function(A){A=A||window.event;if(A.preventDefault){A.preventDefault()}A.returnValue=false},keyboardHook:function(H,A,C,E,G,F,I){if(H){var B=linb.cache.hookKey,D=(H||"").toLowerCase()+":"+(A?"1":"")+":"+(C?"1":"")+":"+(E?"1":"");if(typeof G!="function"){delete B[D]}else{B[D]=[G,F,I]}}return this}},Initialize:function(){if(linb.browser.ie){this._IE=function(){var C=document,B=C.documentElement,A=C.body;this._L=(B&&B.scrollLeft||A&&A.scrollLeft||0)-(B.clientLeft||0);this._T=(B&&B.scrollTop||A&&A.scrollTop||0)-(B.clientTop||0)};this._IE()}}});Class("linb.Date",null,{Initialize:function(){var D=this;D._mapKeys(D.$TIMEUNIT);var C=D._key1,A=D._key2,E=D.$UNIT={};for(var F=0,B=C.length;F<B;F++){E[C[F]]=1}for(var F=0,B=A.length;F<B;F++){E[A[F]]=1}E.w=1},Static:{_key1:"MILLISECOND,SECOND,MINUTE,HOUR,DAY,WEEK,MONTH,QUARTER,YEAR,DECADE,CENTURY".split(","),_key2:"ms,s,n,h,d,ww,m,q,y,de,c".split(","),$TIMEUNIT:{MILLISECOND:1,SECOND:1000,MINUTE:60000,HOUR:3600000,DAY:86400000,WEEK:604800000,MONTH:2592000000,QUARTER:7776000000,YEAR:31557600000,DECADE:315576000000,CENTURY:3155760000000},$TEXTFORMAT:{utciso:function(B,A){A=linb.Date._fix;return B.getUTCFullYear()+"-"+A(B.getUTCMonth()+1)+"-"+A(B.getUTCDate())+"T"+A(B.getUTCHours())+":"+A(B.getUTCMinutes())+":"+A(B.getUTCSeconds())+"Z"},iso:function(B,A){A=linb.Date._fix;return B.getFullYear()+"-"+A(B.getMonth()+1)+"-"+A(B.getDate())+"T"+A(B.getHours())+":"+A(B.getMinutes())+":"+A(B.getSeconds())},ms:function(A){return linb.Date._fix(A.getMilliseconds(),3)+linb.wrapRes("date.MS")},s:function(A){return linb.Date._fix(A.getSeconds())+linb.wrapRes("date.S")},n:function(A){return linb.Date._fix(A.getMinutes())+linb.wrapRes("date.N")},h:function(A){return linb.Date._fix(A.getHours())+linb.wrapRes("date.H")},d:function(A){return A.getDate()+linb.wrapRes("date.D")},w:function(B,A){return linb.wrapRes("date.WEEKS."+(B.getDay()-A+7)%7)},ww:function(B,A){return linb.Date.getWeek(B,A)+linb.wrapRes("date.W")},m:function(A){return(A.getMonth()+1)+linb.wrapRes("date.M")},q:function(A){return(parseInt((A.getMonth()+3)/3-1)+1)+linb.wrapRes("date.Q")},y:function(A){return A.getFullYear()+linb.wrapRes("date.Y")},de:function(A){return parseInt(A.getFullYear()/10)+linb.wrapRes("date.DE")},c:function(A){return parseInt(A.getFullYear()/100)+linb.wrapRes("date.C")},hn:function(A){return linb.wrapRes("date.HN-"+A.getHours()+"-"+A.getMinutes())},dhn:function(A){return linb.wrapRes("date.DHN-"+A.getDate()+"-"+A.getHours()+"-"+A.getMinutes())},mdhn:function(A){return linb.wrapRes("date.MDHN-"+(A.getMonth()+1)+"-"+A.getDate()+"-"+A.getHours()+"-"+A.getMinutes())},hns:function(A){return linb.wrapRes("date.HNS-"+A.getHours()+"-"+A.getMinutes()+"-"+A.getSeconds())},hnsms:function(A){return linb.wrapRes("date.HNSMS-"+A.getHours()+"-"+A.getMinutes()+"-"+A.getSeconds()+"-"+A.getMilliseconds())},yq:function(A){return linb.wrapRes("date.YQ-"+A.getFullYear()+"-"+(parseInt((A.getMonth()+3)/3-1)+1))},ym:function(A){return linb.wrapRes("date.YM-"+A.getFullYear()+"-"+(A.getMonth()+1))},md:function(A){return linb.wrapRes("date.MD-"+(A.getMonth()+1)+"-"+A.getDate())},ymd:function(A){return linb.wrapRes("date.YMD-"+A.getFullYear()+"-"+(A.getMonth()+1)+"-"+A.getDate())},ymd2:function(A){return linb.wrapRes("date.YMD2-"+A.getFullYear()+"-"+(A.getMonth()+1)+"-"+A.getDate())},ymdh:function(A){return linb.wrapRes("date.YMDH-"+A.getFullYear()+"-"+(A.getMonth()+1)+"-"+A.getDate()+"-"+A.getHours())},ymdhn:function(A){return linb.wrapRes("date.YMDHN-"+A.getFullYear()+"-"+(A.getMonth()+1)+"-"+A.getDate()+"-"+A.getHours()+"-"+A.getMinutes())},ymdhns:function(A){return linb.wrapRes("date.YMDHNS-"+A.getFullYear()+"-"+(A.getMonth()+1)+"-"+A.getDate()+"-"+A.getHours()+"-"+A.getMinutes()+"-"+A.getSeconds())},all:function(A){return linb.wrapRes("date.ALL-"+A.getFullYear()+"-"+(A.getMonth()+1)+"-"+A.getDate()+"-"+A.getHours()+"-"+A.getMinutes()+"-"+A.getSeconds()+"-"+A.getMilliseconds())}},$TIMEZONE:[{id:"Asia(East,North)",sub:[{id:"Brunei",v:"+0800"},{id:"Burma",v:"+0630"},{id:"Cambodia",v:"+0700"},{id:"China",v:"+0800"},{id:"China(HK,Macau)",v:"+0800"},{id:"China(TaiWan)",v:"+0800"},{id:"China(Urumchi)",v:"+0700"},{id:"East Timor",v:"+0800"},{id:"Indonesia",v:"+0700"},{id:"Japan",v:"+0900"},{id:"Kazakhstan(Aqtau)",v:"+0400"},{id:"Kazakhstan(Aqtobe)",v:"+0500"},{id:"Kazakhstan(Astana)",v:"+0600"},{id:"Kirghizia",v:"+0500"},{id:"Korea",v:"+0900"},{id:"Laos",v:"+0700"},{id:"Malaysia",v:"+0800"},{id:"Mongolia",v:"+0800",tag:"03L03|09L03"},{id:"Philippines",v:"+0800"},{id:"Russia(Anadyr)",v:"+1300",tag:"03L03|10L03"},{id:"Russia(Kamchatka)",v:"+1200",tag:"03L03|10L03"},{id:"Russia(Magadan)",v:"+1100",tag:"03L03|10L03"},{id:"Russia(Vladivostok)",v:"+1000",tag:"03L03|10L03"},{id:"Russia(Yakutsk)",v:"+0900",tag:"03L03|10L03"},{id:"Singapore",v:"+0800"},{id:"Thailand",v:"+0700"},{id:"Vietnam",v:"+0700"}]},{id:"Asia(South,West)",sub:[{id:"Afghanistan",v:"+0430"},{id:"Arab Emirates",v:"+0400"},{id:"Bahrain",v:"+0300"},{id:"Bangladesh",v:"+0600"},{id:"Bhutan",v:"+0600"},{id:"Cyprus",v:"+0200"},{id:"Georgia",v:"+0500"},{id:"India",v:"+0530"},{id:"Iran",v:"+0330",tag:"04 13|10 13"},{id:"Iraq",v:"+0300",tag:"04 13|10 13"},{id:"Israel",v:"+0200",tag:"04F53|09F53"},{id:"Jordan",v:"+0200"},{id:"Kuwait",v:"+0300"},{id:"Lebanon",v:"+0200",tag:"03L03|10L03"},{id:"Maldives",v:"+0500"},{id:"Nepal",v:"+0545"},{id:"Oman",v:"+0400"},{id:"Pakistan",v:"+0500"},{id:"Palestine",v:"+0200"},{id:"Qatar",v:"+0300"},{id:"Saudi Arabia",v:"+0300"},{id:"Sri Lanka",v:"+0600"},{id:"Syria",v:"+0200",tag:"04 13|10 13"},{id:"Tajikistan",v:"+0500"},{id:"Turkey",v:"+0200"},{id:"Turkmenistan",v:"+0500"},{id:"Uzbekistan",v:"+0500"},{id:"Yemen",v:"+0300"}]},{id:"North Europe",sub:[{id:"Denmark",v:"+0100",tag:"04F03|10L03"},{id:"Faroe Is.(DK)",v:"+0100"},{id:"Finland",v:"+0200",tag:"03L01|10L01"},{id:"Iceland",v:"+0000"},{id:"Jan Mayen(Norway)",v:"-0100"},{id:"Norwegian",v:"+0100"},{id:"Svalbard(NORWAY)",v:"+0100"},{id:"Sweden",v:"+0100",tag:"03L01|10L01"}]},{id:"Eastern Europe",sub:[{id:"Armenia",v:"+0400"},{id:"Austria",v:"+0100",tag:"03L01|10L01"},{id:"Azerbaijan",v:"+0400"},{id:"Belarus",v:"+0200",tag:"03L03|10L03"},{id:"Czech",v:"+0100"},{id:"Estonia",v:"+0200"},{id:"Georgia",v:"+0500"},{id:"Germany",v:"+0100",tag:"03L01|10L01"},{id:"Hungarian",v:"+0100"},{id:"Latvia",v:"+0200"},{id:"Liechtenstein",v:"+0100"},{id:"Lithuania",v:"+0200"},{id:"Moldova",v:"+0200"},{id:"Poland",v:"+0100"},{id:"Rumania",v:"+0200"},{id:"Russia(Moscow)",v:"+0300",tag:"03L03|10L03"},{id:"Slovakia",v:"+0100"},{id:"Switzerland",v:"+0100",tag:"03L01|10L01"},{id:"Ukraine",v:"+0200"},{id:"Ukraine(Simferopol)",v:"+0300"}]},{id:"Western Europe",sub:[{id:"Andorra",v:"+0100",tag:"03L01|10L01"},{id:"Belgium",v:"+0100",tag:"03L01|10L01"},{id:"Channel Is.(UK)",v:"+0000",tag:"03L01|10L01"},{id:"France",v:"+0100",tag:"03L01|10L01"},{id:"Gibraltar(UK)",v:"+0100",tag:"03L01|10L01"},{id:"Ireland",v:"+0000",tag:"03L01|10L01"},{id:"Isle of Man(UK)",v:"+0000",tag:"03L01|10L01"},{id:"Luxembourg",v:"+0100",tag:"03L01|10L01"},{id:"Monaco",v:"+0100"},{id:"Netherlands",v:"+0100",tag:"03L01|10L01"},{id:"United Kingdom",v:"+0000",tag:"03L01|10L01"}]},{id:"South Europe",sub:[{id:"Albania",v:"+0100"},{id:"Bosnia",v:"+0100"},{id:"Bulgaria",v:"+0200"},{id:"Croatia",v:"+0100"},{id:"Greece",v:"+0200",tag:"03L01|10L01"},{id:"Holy See",v:"+0100"},{id:"Italy",v:"+0100",tag:"03L01|10L01"},{id:"Macedonia",v:"+0100"},{id:"Malta",v:"+0100"},{id:"Montenegro",v:"+0100"},{id:"Portugal",v:"+0000",tag:"03L01|10L01"},{id:"San Marino",v:"+0100"},{id:"Serbia",v:"+0100"},{id:"Slovenia",v:"+0100"},{id:"Span",v:"+0100",tag:"03L01|10L01"}]},{id:"North America",sub:[{id:"Canada(AST)",v:"-0400",tag:"04F02|10L02"},{id:"Canada(CST)",v:"-0600",tag:"04F02|10L02"},{id:"Canada(EST)",v:"-0500",tag:"04F02|10L02"},{id:"Canada(MST)",v:"-0700",tag:"04F02|10L02"},{id:"Canada(NST)",v:"-0330",tag:"04F02|10L02"},{id:"Canada(PST)",v:"-0800",tag:"04F02|10L02"},{id:"Greenland(DK)",v:"-0300"},{id:"US(Central)",v:"-0600",tag:"03S02|11F02"},{id:"US(Eastern)",v:"-0500",tag:"03S02|11F02"},{id:"US(Mountain)",v:"-0700",tag:"03S02|11F02"},{id:"US(Pacific)",v:"-0800",tag:"03S02|11F02"},{id:"US(Alaska)",v:"-0900"},{id:"US(Arizona)",v:"-0700"}]},{id:"South America",sub:[{id:"Anguilla(UK)",v:"-0400"},{id:"Antigua&amp;Barbuda",v:"-0400"},{id:"Antilles(NL)",v:"-0400"},{id:"Argentina",v:"-0300"},{id:"Aruba(NL)",v:"-0400"},{id:"Bahamas",v:"-0500"},{id:"Barbados",v:"-0400"},{id:"Belize",v:"-0600"},{id:"Bolivia",v:"-0400"},{id:"Brazil(AST)",v:"-0500",tag:"10F03|02L03"},{id:"Brazil(EST)",v:"-0300",tag:"10F03|02L03"},{id:"Brazil(FST)",v:"-0200",tag:"10F03|02L03"},{id:"Brazil(WST)",v:"-0400",tag:"10F03|02L03"},{id:"British Virgin Is.(UK)",v:"-0400"},{id:"Cayman Is.(UK)",v:"-0500"},{id:"Chilean",v:"-0300",tag:"10F03|03F03"},{id:"Chilean(Hanga Roa)",v:"-0500",tag:"10F03|03F03"},{id:"Colombia",v:"-0500"},{id:"Costa Rica",v:"-0600"},{id:"Cuba",v:"-0500",tag:"04 13|10L03"},{id:"Dominican",v:"-0400"},{id:"Ecuador",v:"-0500"},{id:"El Salvador",v:"-0600"},{id:"Falklands",v:"-0300",tag:"09F03|04F03"},{id:"Grenada",v:"-0400"},{id:"Guadeloupe(FR)",v:"-0400"},{id:"Guatemala",v:"-0600"},{id:"Guiana(FR)",v:"-0300"},{id:"Guyana",v:"-0400"},{id:"Haiti",v:"-0500"},{id:"Honduras",v:"-0600"},{id:"Jamaica",v:"-0500"},{id:"Martinique(FR)",v:"-0400"},{id:"Mexico(Mazatlan)",v:"-0700"},{id:"Mexico(Tijuana)",v:"-0800"},{id:"Mexico(Mexico)",v:"-0600"},{id:"Montserrat(UK)",v:"-0400"},{id:"Nicaragua",v:"-0500"},{id:"Panama",v:"-0500"},{id:"Paraguay",v:"-0400",tag:"10F03|02L03"},{id:"Peru",v:"-0500"},{id:"Puerto Rico(US)",v:"-0400"},{id:"So. Georgia&amp;So. Sandwich Is.(UK)",v:"-0200"},{id:"St. Kitts&amp;Nevis",v:"-0400"},{id:"St. Lucia",v:"-0400"},{id:"St. Vincent&amp;Grenadines",v:"-0400"},{id:"Suriname",v:"-0300"},{id:"Trinidad&amp;Tobago",v:"-0400"},{id:"Turks&amp;Caicos Is.(UK)",v:"-0500"},{id:"Uruguay",v:"-0300"},{id:"Venezuela",v:"-0400"},{id:"Virgin Is.(US)",v:"-0400"}]},{id:"Africa(North)",sub:[{id:"Algeria",v:"+0100"},{id:"Egypt",v:"+0200",tag:"04L53|09L43"},{id:"Libyan",v:"+0200"},{id:"Morocco",v:"+0000"},{id:"Sudan",v:"+0200"},{id:"Tunisia",v:"+0100"}]},{id:"Africa(Western)",sub:[{id:"Benin",v:"+0100"},{id:"Burkina Faso",v:"+0000"},{id:"Canary Is.(SP)",v:"-0100"},{id:"Cape Verde",v:"-0100"},{id:"Chad",v:"+0100"},{id:"Gambia",v:"+0000"},{id:"Ghana",v:"+0000"},{id:"Guinea",v:"+0000"},{id:"Guinea-Bissau",v:"+0000"},{id:"Ivory Coast",v:"+0000"},{id:"Liberia",v:"+0000"},{id:"Mali",v:"+0000"},{id:"Mauritania",v:"+0000"},{id:"Niger",v:"+0100"},{id:"Nigeria",v:"+0100"},{id:"Senegal",v:"+0000"},{id:"Sierra Leone",v:"+0000"},{id:"Togo",v:"+0000"},{id:"Western Sahara",v:"+0000"}]},{id:"Africa(Central)",sub:[{id:"Cameroon",v:"+0100"},{id:"Cen.African Rep.",v:"+0100"},{id:"Congo,Democratic",v:"+0100"},{id:"Congo,Republic",v:"+0100"},{id:"Equatorial Guinea",v:"+0100"},{id:"Gabon",v:"+0100"},{id:"Sao Tome&amp;Principe",v:"+0000"}]},{id:"Africa(East)",sub:[{id:"Burundi",v:"+0200"},{id:"Comoros",v:"+0300"},{id:"Djibouti",v:"+0300"},{id:"Eritrea",v:"+0300"},{id:"Ethiopia",v:"+0300"},{id:"Kenya",v:"+0300"},{id:"Madagascar",v:"+0300"},{id:"Malawi",v:"+0200"},{id:"Mauritius",v:"+0400"},{id:"Mayotte(FR)",v:"+0300"},{id:"Mozambique",v:"+0200"},{id:"Reunion(FR)",v:"+0400"},{id:"Rwanda",v:"+0200"},{id:"Seychelles",v:"+0300"},{id:"Somalia",v:"+0300"},{id:"Tanzania",v:"+0300"},{id:"Uganda",v:"+0300"}]},{id:"Africa(South)",sub:[{id:"Angola",v:"+0100"},{id:"Botswana",v:"+0200"},{id:"Lesotho",v:"+0200"},{id:"Namibia",v:"+0200",tag:"09F03|04F03"},{id:"Saint Helena(UK)",v:"-0100"},{id:"South Africa",v:"+0200"},{id:"Swaziland",v:"+0200"},{id:"Zambia",v:"+0200"},{id:"Zimbabwe",v:"+0200"}]},{id:"Oceania",sub:[{id:"American Samoa(US)",v:"-1100"},{id:"Australia(Adelaide)",v:"+0930",sub:"10L03|03L03"},{id:"Australia(Brisbane)",v:"+1000"},{id:"Australia(Darwin)",v:"+0930"},{id:"Australia(Hobart)",v:"+1000",sub:"10L03|03L03"},{id:"Australia(Perth)",v:"+0800"},{id:"Australia(Sydney)",v:"+1000",sub:"10L03|03L03"},{id:"Cook Islands(NZ)",v:"-1000"},{id:"Eniwetok",v:"-1200"},{id:"Fiji",v:"+1200",sub:"11F03|02L03"},{id:"Guam",v:"+1000"},{id:"Hawaii(US)",v:"-1000"},{id:"Kiribati",v:"+1100"},{id:"Marshall Is.",v:"+1200"},{id:"Micronesia",v:"+1000"},{id:"Midway Is.(US)",v:"-1100"},{id:"Nauru Rep.",v:"+1200"},{id:"New Calednia(FR)",v:"+1100"},{id:"New Zealand",v:"+1200",sub:"10F03|04F63"},{id:"New Zealand(CHADT)",v:"+1245",sub:"10F03|04F63"},{id:"Niue(NZ)",v:"-1100"},{id:"Nor. Mariana Is.",v:"+1000"},{id:"Palau",v:"+0900"},{id:"Papua New Guinea",v:"+1000"},{id:"Pitcairn Is.(UK)",v:"-0830"},{id:"Polynesia(FR)",v:"-1000"},{id:"Solomon Is.",v:"+1100"},{id:"Tahiti",v:"-1000"},{id:"Tokelau(NZ)",v:"-1100"},{id:"Tonga",v:"+1300",tag:"10F63|04F63"},{id:"Tuvalu",v:"+1200"},{id:"Vanuatu",v:"+1100"},{id:"Western Samoa",v:"-1100"},{id:"Data Line",v:"-1200"}]}],_mapKeys:function(F){var C=this,E=C._key2,A=C._key1;for(var D=0,B=A.length;D<B;D++){F[E[D]]=F[A[D]]}},_validUnit:function(A){return this.$UNIT[A]?A:"d"},_isDate:function(A){return !!A&&A.constructor==Date},_date:function(A,B){return this._isDate(A)?A:this._isDate(B)?B:new Date},_isNumb:function(A){return typeof A=="number"&&isFinite(A)},_numb:function(A,B){return this._isNumb(A)?A:this._isNumb(B)?B:0},_timeZone:-((new Date).getTimezoneOffset()/60),get:function(C,D,B){var A=this;C=A._date(C);D=A._validUnit(D);B=A._numb(B);var E=arguments.callee.map||(arguments.callee.map={ms:function(F){return F.getMilliseconds()},s:function(F){return F.getSeconds()},n:function(F){return F.getMinutes()},h:function(F){return F.getHours()},d:function(F){return F.getDate()},ww:function(G,F){return linb.Date.getWeek(G,F)},w:function(G,F){return(7+G.getDay()-F)%7},m:function(F){return F.getMonth()},q:function(F){return parseInt((F.getMonth()+3)/3-1)},y:function(F){return F.getFullYear()},de:function(F){return parseInt(F.getFullYear()/10)},c:function(F){return parseInt(F.getFullYear()/100)}});return E[D](C,B)},_fix:function(D,A,C){A=A||2;C=C||"0";D+="";if(D.length<A){for(var B=D.length;B<A;B++){D=C+D}}return D},add:function(B,D,E){var A=this,C=A.$TIMEUNIT,G,F;B=A._date(B);D=A._validUnit(D);if(!(G=arguments.callee.map)){G=arguments.callee.map={MILLISECOND:function(H,I){H.setTime(H.getTime()+I*C.ms)},SECOND:function(H,I){H.setTime(H.getTime()+I*C.s)},MINUTE:function(H,I){H.setTime(H.getTime()+I*C.n)},HOUR:function(H,I){H.setTime(H.getTime()+I*C.h)},DAY:function(H,I){H.setTime(H.getTime()+I*C.d)},WEEK:function(H,I){H.setTime(H.getTime()+I*C.ww)},MONTH:function(J,K){var I=J.getDate(),H;K=J.getMonth()+K;this.YEAR(J,Math.floor(K/12));J.setMonth((K%12+12)%12);if((H=J.getDate())!=I){this.DAY(J,-H)}},QUARTER:function(H,I){this.MONTH(H,I*3)},YEAR:function(J,K){var I=J.getDate(),H;J.setFullYear(J.getFullYear()+K);if((H=J.getDate())!=I){this.DAY(J,-H)}},DECADE:function(H,I){this.YEAR(H,10*I)},CENTURY:function(H,I){this.YEAR(H,100*I)}};A._mapKeys(G)}G[D](F=new Date(B),E);return F},diff:function(D,A,F,C){var B=this;D=B._date(D);A=B._date(A);F=B._validUnit(F);C=B._numb(C);var E=B.$TIMEUNIT,G;if(!(G=arguments.callee.map)){G=arguments.callee.map={MILLISECOND:function(I,H){return H.getTime()-I.getTime()},SECOND:function(I,H){var I=B.getTimSpanStart(I,"s"),H=B.getTimSpanStart(H,"s"),J=H.getTime()-I.getTime();return J/E.s},MINUTE:function(I,H){var I=B.getTimSpanStart(I,"n"),H=B.getTimSpanStart(H,"n"),J=H.getTime()-I.getTime();return J/E.n},HOUR:function(I,H){var I=B.getTimSpanStart(I,"h"),H=B.getTimSpanStart(H,"h"),J=H.getTime()-I.getTime();return J/E.h},DAY:function(I,H){var I=B.getTimSpanStart(I,"d",1),H=B.getTimSpanStart(H,"d",1),J=H.getTime()-I.getTime();return J/E.d},WEEK:function(J,H,I){var J=B.getTimSpanStart(J,"ww",1,I),H=B.getTimSpanStart(H,"ww",1,I),K=H.getTime()-J.getTime();return K/E.ww},MONTH:function(I,H){return(H.getFullYear()-I.getFullYear())*12+(H.getMonth()-I.getMonth())},QUARTER:function(I,H){return(H.getFullYear()-I.getFullYear())*4+parseInt((H.getMonth()-I.getMonth())/3)},YEAR:function(I,H){return parseInt((H.getFullYear()-I.getFullYear()))},DECADE:function(I,H){return parseInt((H.getFullYear()-I.getFullYear())/10)},CENTURY:function(I,H){return parseInt((H.getFullYear()-I.getFullYear())/100)}};B._mapKeys(G)}return G[F](new Date(D),new Date(A),C)},getTimSpanStart:function(C,G,F,A){var J=this,H=J.$TIMEUNIT,B,I;C=J._date(C);G=J._validUnit(G);A=J._numb(A);F=J._numb(F,1);if(!(B=arguments.callee.map)){var E=function(K){K.setMilliseconds(0);K.setSeconds(0);K.setMinutes(0);K.setHours(0)},D=function(K){E(K);K.setDate(1);K.setMonth(0)};B=arguments.callee.map={MILLISECOND:function(L,M){var K=L.getMilliseconds();L.setMilliseconds(K-(K%M))},SECOND:function(L,M){L.setMilliseconds(0);var K=L.getSeconds();L.setSeconds(K-(K%M))},MINUTE:function(L,M){L.setMilliseconds(0);L.setSeconds(0);var K=L.getMinutes();L.setTime(L.getTime()-(K%M)*H.n)},HOUR:function(L,M){L.setMilliseconds(0);L.setSeconds(0);L.setMinutes(0);var K=L.getHours();L.setHours(K-(K%M))},DAY:function(L,M){E(L);var K=L.getDate();L.setDate(K-(K%M))},WEEK:function(N,O,M){E(N);var Q=(N.getDay()+7-M)%7,P,K,L=new Date();N.setTime(N.getTime()-Q*H.d);D(L);L.setFullYear(N.getFullYear());P=(L.getDay()+7-M)%7;L.setTime(L.getTime()-P*H.d);K=(N.getTime()-L.getTime())/H.d/7;N.setTime(N.getTime()-(K%O)*H.ww)},MONTH:function(L,M){E(L);L.setDate(1);var K=L.getMonth();L.setMonth(K-(K%M))},QUARTER:function(K,L){L=J._numb(L,1);return this.MONTH(K,L*3)},YEAR:function(L,M){D(L);var K=L.getFullYear();L.setFullYear(K-(K%M))},DECADE:function(K,L){D(K);K.setFullYear(Math.floor(K.getFullYear()/10)*10)},CENTURY:function(K,L){D(K);K.setFullYear(Math.floor(K.getFullYear()/100)*100)}};J._mapKeys(B)}B[G](I=new Date(C),F,A);return I},getTimSpanEnd:function(C,D,E,B){var A=this;C=A._date(C);D=A._validUnit(D);B=A._numb(B);E=A._numb(E,1);var G=C.getTime(),F=A.getTimSpanStart(C,D,E,B);if(F.getTime()<G){F=A.add(F,D,E)}return F},offsetTimeZone:function(D,C,B){var A=this;D=A._date(D);return new Date(D.getTime()+(B?-1:1)*(C-A._timeZone)*A.$TIMEUNIT.h)},getWeek:function(C,B){var A=this,D,E;C=A._date(C);B=A._numb(B),E=C.getFullYear();C=A.add(A.getTimSpanStart(C,"ww",1,B),"d",6);if(C.getFullYear()!=E){return 1}D=A.getTimSpanStart(C,"y",1);D=A.add(A.getTimSpanStart(D,"ww",1,B),"d",6);return A.diff(D,C,"ww")+1},parse:function(H){H+="";var L=this,J,I=arguments.callee,D=I.dp||(I.dp={FullYear:2,Month:4,Date:6,Hours:8,Minutes:10,Seconds:12,Milliseconds:14}),G=H.match(I.iso||(I.iso=/^((-\d+|\d{4,})(-(\d{2})(-(\d{2}))?)?)?T((\d{2})(:(\d{2})(:(\d{2})(\.(\d{1,3})(\d)?\d*)?)?)?)?(([+-])(\d{2})(:(\d{2}))?|Z)?$/)),C=new Date(0);if(G){if(G[4]){G[4]--}if(G[15]>=5){G[14]++}J=G[16]||G[18]?"UTC":"";for(var E in D){var K=G[D[E]];if(!K){continue}C["set"+J+E](K);if(C["get"+J+E]()!=G[D[E]]){return null}}if(G[18]){var F=Number(G[17]+G[18]),B=Number(G[17]+(G[20]||0));C.setUTCMinutes(C.getUTCMinutes()+(F*60)+B)}return C}else{var A=Date.parse(H);return A?C.setTime(A)&&C:null}},getText:function(C,D,B){var A=this;C=A._date(C);B=A._numb(B);D=D||"";return A.$TEXTFORMAT[D](C,B)}}});Class("linb.CSS",null,{Static:{_r:linb.browser.ie?"rules":"cssRules",_baseid:"linb:css:base",_firstid:"linb:css:first",_lastid:"linb:css:last",_reg1:/\.(\w+)\[CLASS~="\1"\]/g,_reg2:/\[ID"([^"]+)"\]/g,_reg3:/\*([.#])/g,_reg4:/\s+/g,_reg5:/\*\|/g,_reg6:/(\s*,\s*)/g,_rep:function(B){var A=this;return B.replace(A._reg1,".$1").replace(A._reg2,"#$1").replace(A._reg3,"$1").replace(A._reg4," ").replace(A._reg5,"").replace(A._reg6,",").toLowerCase()},_createCss:function(H,D){var C=this,A=this._getHead(),F=C._firstid,E=C._lastid,B,G;B=document.createElement("style");B.type="text/css";B.id=H;if(!D){G=document.getElementById(F)||A.firstChild;while((G=G.nextSibling)&&!/^(script|link|style)$/i.test(""+G.tagName)){}if(G){A.insertBefore(B,G)}else{if(G=document.getElementById(E)){A.insertBefore(B,G)}else{A.appendChild(B)}}}else{A.appendChild(B)}return B},_getCss:function(B,A){return document.getElementById(B)||this._createCss(B,A)},_getBase:function(){return this._getCss(this._baseid)},_getFirst:function(){return this._getCss(this._firstid)},_getLast:function(){return this._getCss(this._lastid,true)},_getHead:function(){return this._head||(this._head=document.getElementsByTagName("head")[0]||document.documentElement)},_check:function(){if(!linb.browser.ie){return }var E=0;for(var D=this._getHead(),C=0,B=D.childNodes,A;A=B[C++];){if(A.type=="text/css"){E++}}return E>20},get:function(F,E){for(var D=this._getHead(),C=0,B=D.childNodes,A;A=B[C++];){if(A.type=="text/css"&&F in A&&A[F]==E){return A}}},addStyleSheet:function(A,H,B){var F,D=this,C=D._getHead(),E=function(I,M,J){var L=document.createElement("style");L.type="text/css";if(M){L.id=M}if(linb.browser.ie){L.styleSheet.cssText=I||""}else{try{L.appendChild(document.createTextNode(I||""))}catch(K){L.styleSheet.cssText=I||""}}C.insertBefore(L,J?D._getLast():D._getBase());L.disabled=true;L.disabled=false;return L},G=function(I,J){var K=J?D._getLast():D._getBase();K.styleSheet.cssText+=I;return K};if(H&&(H=H.replace(/[^\w\-\_\.\:]/g,"_"))&&(F=D.get("id",H))){return F}if(D._check()){return G(A,B)}else{return E(A,H,B)}},includeLink:function(B,G,E,A){var F,D=this,C=D._getHead();if(B&&(F=D.get("href",B))){}else{F=document.createElement("link");F.type="text/css";F.rel="stylesheet";F.href=B;if(G){F.id=G}F.media="all";_.each(A,function(I,H){F.setAttribute(H,I)})}C.insertBefore(F,E?D._getBase():D._getLast());F.disabled=true;F.disabled=false;return F},remove:function(C,B){var A=this._getHead();if(B=this.get(C,B)){B.disabled=true;A.removeChild(B)}},replaceLink:function(A,I,E,B){var F=this,G=F._getHead(),D={},C,H;D[I]=B;C=F.includeLink(A,null,false,D);if(H=F.get(I,E)){G.replaceChild(C,H)}C.disabled=true;C.disabled=false},_build:function(A,D,B){var C="";_.each(D,function(F,E){C+=E.replace(/([A-Z])/g,"-$1").toLowerCase()+":"+F+";"});return B?C:A+"{"+C+"}"},setStyleRules:function(D,J,B){var I=this,N=true,C=document.styleSheets,H,E,A,L,F,G,M,K;D=_.str.trim(D.replace(/\s+/g," "));if(!(J&&B)){L=D.toLowerCase();_.arr.each(_.toArr(C),function(P){try{P[I._r]}catch(O){return }_.arr.each(_.toArr(P[I._r]),function(Q,R){if(!Q.selectorText){return }if(Q.disabled){return }A=I._rep(Q.selectorText);K=A.split(",");if(!J){N=false;if(_.arr.indexOf(K,L)!=-1&&K.length>1){K=_.arr.removeFrom(K,_.arr.indexOf(K,L)).join(",");M=Q.cssText.slice(Q.cssText.indexOf("{")+1,Q.cssText.lastIndexOf("}"));if(P.insertRule){P.insertRule(K+"{"+M+"}",P[I._r].length)}else{if(P.addRule){P.addRule(K,M)}}if(P.deleteRule){P.deleteRule(R)}else{P.removeRule(R)}P.disabled=true;P.disabled=false}else{if(A==L){if(P.deleteRule){P.deleteRule(R)}else{P.removeRule(R)}P.disabled=true;P.disabled=false}}}else{if(A==L){H=Q;return false}if(_.arr.indexOf(K,L)!=-1){E=Q;return false}}},null,true);if(H){N=false;try{_.each(J,function(R,Q){Q=Q.replace(/(-[a-z])/gi,function(S,T){return T.charAt(1).toUpperCase()});H.style[Q]=typeof R=="function"?R(H.style[Q]):R})}catch(O){}P.disabled=true;P.disabled=false;return false}else{if(E){N=false;P.insertRule(I._build(D,J),P[I._r].length);P.disabled=true;P.disabled=false;return false}}},null,true)}if(B||N){I._addRules(D,J)}return I},$getCSSValue:function(G,E){var K=this,H=K._r,C=document.styleSheets,F=C.length,D,B,L,J,I,A;G=_.str.trim(G.replace(/\s+/g," "));for(J=F-1;J>=0;J--){D=(B=C[J][H]).length;for(I=D-1;I>=0;I--){if((L=B[I]).selectorText&&!L.disabled){A=K._rep(L.selectorText);if(_.arr.indexOf(A.split(","),G)!=-1){return L.style[E]}}}}},_addRules:function(A,C){var B=this,D=B._getLast(),E=D.sheet||D.styleSheet;if(E.insertRule){E.insertRule(B._build(A,C),E[B._r].length)}else{if(E.addRule){E.addRule(A,B._build(A,C,true))}}D.disabled=true;D.disabled=false;return B}},Initialize:function(){var A=linb.browser;this.addStyleSheet("html{color:#000;background:#FFF;}body{cursor:default;font:13px/1.231 arial,helvetica,clean,sans-serif;}"+(linb.browser.ie?"body{font-size:small;font:x-small;}":"")+"body *{line-height:1.22em;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;empty-cells:show;font-size:inherit;font:100%;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul,li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym {border:0;font-variant:normal;}sup {vertical-align:text-top;}sub {vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}"+(A.ie?"input,textarea,select{font-size:100%;}":"")+"legend{color:#000;}del,ins{text-decoration:none;}pre,code,kbd,samp,tt{font-family:monospace;"+(A.ie?"font-size:108%;":"")+"line-height:100%;}select,input,button,textarea{font:99% arial,helvetica,clean,sans-serif;border-width:1px;}a{color:#0000ee;text-decoration:none;"+(A.gek?"-moz-user-select:none;":"")+"}a:hover{color:red}"+(A.gek?"a:focus{-moz-outline-offset:-1px !important}":"")+"div{font-size:12px;}span{"+(A.gek?"display:-moz-inline-block;display:-moz-inline-box;display:inline-block;":A.ie6?"display:inline-box;display:inline;":"display:inline-block;")+(A.ie?"zoom:1;":"")+"}h1{font-size:138.5%;}h2{font-size:123.1%;}h3{font-size:108%;}h1,h2,h3{margin:1em 0;}h1,h2,h3,h4,h5,h6,strong {font-weight:bold;}em{font-style:italic;}","linb.CSS")}});Class("linb.absProfile",null,{Constructor:function(){if(!this.$id){this.$id=linb.absProfile.$id.next()}},Instance:{getId:function(){return this.$id},link:function(D,E,C){var A=this,B="$"+A.$id;C=C||A;if(D[B]){A.unLink(E)}D[B]=C;if(D instanceof Array){D.push(C)}A._links[E]=D;return A},unLink:function(D){var A=this,C,B="$"+A.$id;if(!A._links){return }if(!(C=A._links[D])){return }if(C instanceof Array){_.arr.removeValue(C,C[B])}delete C[B];delete A._links[D];return A},unLinkAll:function(){var B=this,E="$"+B.$id,A=B._links,D,C;for(C in A){D=A[C];if(D instanceof Array){_.arr.removeValue(D,D[E])}delete D[E]}B._links={};return B}},Static:{$id:new _.id,$abstract:true}});Class("linb.DomProfile","linb.absProfile",{Constructor:function(C,B){arguments.callee.upper.call(this);var A=this;A.domNode=B;linb.cache.dom[A.domId=C]=A;A.nodeVars={}},Instance:{__gc:function(){var A=this,B;if(A.nodeVars&&(B=A.domNode)){_.each(A.nodeVars,function(D,C){B[C]=null})}delete linb.cache.dom[A.domId];_.breakO(A)},_getEV:function(B,F,C){var E=linb.cache.dom[F];if(E&&(E=E.events)&&(E=E[C])){for(var D=0,A=E.length;D<A;D++){if(typeof E[E[D]]=="function"){B[B.length]=E[E[D]]}}}}},Static:{get:function(A){return linb.cache.dom[A]},$abstract:true}});Class("linb.absBox",null,{Constructor:function(){this._nodes=[]},Before:function(B){var A=linb.absBox;if(A){(A=A.$type)[B.replace("linb.","")]=A[B]=B}},Instance:{get:function(A){var B=this._nodes;return B[A]||B},each:function(B){var C=this;for(var E=0,D=C._nodes,A=D.length;E<A;E++){if(false===B.call(C,D[E],E)){break}}return C},isEmpty:function(){return !this._nodes.length},merge:function(D){if(this==linb.win||this==linb.doc||this==linb("body")){return this}var A=this,F=A.constructor,D=D._nodes,C=0,B,E=A._nodes;if(D.length){for(;B=D[C++];){E[E.length]=B}A._nodes=F._unique(E)}return A},reBoxing:function(D,A){var B=this,C=linb.absBox.$type[D||"Dom"];if(C==B.KEY){return B}if(C=linb.SC(C)){return C.pack(B._nodes,A)}}},Static:{$abstract:true,$type:{},pack:function(A,B){var C=new this(false);C._nodes=A?B===false?A:typeof this._ensureValues=="function"?this._ensureValues(A):A:[];return C},_unique:function(B){var F={},C=[],E=0,D,A;for(;D=B[E++];){A=D.$id;if(!F[A]){F[A]=1;C[C.length]=D}}return C},plugIn:function(B,A){this.prototype[B]=A;return this}}});Class("linb.Dom","linb.absBox",{Instance:{serialize:function(){var A=[];this.each(function(B){A[A.length]=B.id});return"linb(['"+A.join("','")+"'])"},id:function(D,E){var C,B,A=linb.cache.dom;if(typeof D=="string"){return this.each(function(F){if((B=F.id)!==D){if(!E&&(C=A[B])){A[D]=C;delete A[B]}F.id=D}})}else{return this.get(0).id}},$sum:function(B,C){var A=[],E,D;this.each(function(F){E=B.apply(F,C||[]);if(E){if(_.isArr(E)){for(D=0;F=E[D];D++){A[A.length]=F}}else{A[A.length]=E}}});return linb(A)},children:function(){return this.$sum(function(){return _.toArr(this.childNodes)})},clone:function(A){return this.$sum(function(){return this.cloneNode(A?true:false)},arguments)},$iterator:function(C,B,E,A,D){return this.$sum(function(L,H,O,M,N){var Q=arguments.callee;if(typeof M!="function"){var I=M||0;M=function(S,R){return R==I}}var J=0,G,F=this,K=0,P;while(F){if(F.nodeType==1){if(M(F,J++)===true){break}}if(L=="x"){F=H?F.nextSibling:F.previousSibling}else{if(L=="y"){F=H?Q.call(H===1?F.lastChild:F.firstChild,"x",(H!==1),true,0,N):F.parentNode}else{O=_.isBool(O)?O:true;G=null;F=H?(P=O&&F.firstChild)?P:(P=F.nextSibling)?P:(G=F.parentNode):(P=O&&F.lastChild)?P:(P=F.previousSibling)?P:(G=F.parentNode);if(G){while(!(G=H?F.nextSibling:F.previousSibling)){F=F.parentNode;if(!F){if(K){return null}else{K=true;G=H?document.body.firstChild:document.body.lastChild;break}}}F=G}O=true}}}return F},arguments)},query:function(B,J,I){B=B||"*";var G="getElementsByTagName",H=arguments.callee,F=H.f1||(H.f1=function(M,L,P){var O=this[G](M),K=[];if(P.test(this[L])){K[K.length]=this}for(var Q,N=0;Q=O[N];N++){if(P.test(Q[L])){K[K.length]=Q}}return K}),E=H.f2||(H.f2=function(M,L,P){var O=this[G](M),K=[];if(this[L]==P){K[K.length]=this}for(var Q,N=0;Q=O[N];N++){if(Q[L]==P){K[K.length]=Q}}return K}),D=H.f3||(H.f3=function(M,L,P){var O=this[G](M),K=[];if(this[L]){K[K.length]=this}for(var Q,N=0;Q=O[N];N++){if(Q[L]){K[K.length]=Q}}return K}),C=H.f4||(H.f4=function(K){return _.toArr(this[G](K))}),A=H.f5||(H.f5=function(M,L){var O=this[G](M),K=[];if(L(this)){K[K.length]=this}for(var P,N=0;P=O[N];N++){if(L(P)){K[K.length]=P}}return K});return this.$sum(J?typeof J=="function"?A:I?I.constructor==RegExp?F:E:D:C,[B,J,I])},$add:function(L,J,G){if(G){G=linb(J);J=this}else{J=linb(J);G=this}if(J._nodes.length){var I=G.get(0),M=J._nodes,E=linb.Dom,A=linb.cache.dom,K,O,B,F,C,D,N,O,H=[];J.each(function(P){O=(B=P.id)&&(B=A[B])&&B.LayoutTrigger&&E.getStyle(I,"display")!="none"&&B.LayoutTrigger;if(O){H.push([O,B])}});if(M.length==1){K=M[0]}else{K=document.createDocumentFragment();for(F=0;C=M[F];F++){K.appendChild(C)}}L.call(I,K);for(F=0;C=H[F];F++){for(D=0;N=C[0][D];D++){N.call(C[1])}if(C[1].onLayout){C[1].boxing().onLayout(C[1])}}H.length=0}return this},prepend:function(A,B){return this.$add(function(C){if(this.firstChild){this.insertBefore(C,this.firstChild)}else{this.appendChild(C)}},A,B)},append:function(A,B){return this.$add(function(C){this.appendChild(C)},A,B)},addPrev:function(A,B){return this.$add(function(C){this.parentNode.insertBefore(C,this)},A,B)},addNext:function(A,B){return this.$add(function(C){if(this.nextSibling){this.parentNode.insertBefore(C,this.nextSibling)}else{this.parentNode.appendChild(C)}},A,B)},replace:function(F,E){F=linb(F);var B,C,G=this.get(0),D=F.get(),A=D.length;if(A>0&&(B=D[A-1])){G.parentNode.replaceChild(B,G);for(C=0;C<A-1;C++){B.parentNode.insertBefore(D[C],B)}if(E){this.remove(E)}}return F},swap:function(C){var A=this,B=linb.Dom.getEmptyDiv().html("*",false);C=linb(C);A.replace(B,false);C.replace(A,false);B.replace(C,false);B.get(0).innerHTML="";document.body.insertBefore(B.get(0),document.body.firstChild);return A},remove:function(B){var A=arguments.callee,C=A._c||(A._c=document.createElement("div"));if(B===false){this.each(function(E,D){if(E.parentNode){E.parentNode.removeChild(E)}})}else{this.each(function(D){C.appendChild(D)});C.innerHTML="";_.resetRun("dom.__gc",linb.Dom.__gc,300)}return this},empty:function(A){return this.each(function(B){linb([B]).html("",A)})},html:function(E,D){var C="",B,A,F=this.get(0);D=D!==false;if(E!==undefined){if(F.nodeType==3){F.nodeValue=E}else{if(!(A=F.firstChild)&&E==""){return this}if(!D&&linb.browser.ie){while(B=F.firstChild){F.removeChild(B)}}if(D){F.innerHTML=""}F.innerHTML=E;if(D&&A){_.resetRun("dom.__gc",linb.Dom.__gc,300)}}return this}else{return(F.nodeType==3)?F.nodeValue:F.innerHTML}},outerHTML:function(I,B){var M=this,L,N="",E=M.get(0),D=E.id;if(I!==undefined){if(E.nodeVars&&(L=E.domNode)){_.each(E.nodeVars,function(P,O){L[O]=null})}if(linb.browser.gek){var F=M.replace(_.str.toDom(I),false);M._nodes[0]=F.get(0)}else{var J,A=(J=E.previousSibling)?E.previousSibling:E.parentNode;E.outerHTML=I;if(A){M._nodes[0]=J?A.nextSibling:A.firstChild}}linb([E]).remove(B);return M}else{if(linb.browser.gek){var H=linb.Dom,G=H.getEmptyDiv(),F=H.getEmptyDiv(2),K=F.parent(),C;if(C=E.parentNode){M.replace(F,false)}G.append(E);N=G.html();if(C){F.replace(E,false)}G.empty();K.prepend(F);return N}else{return E.outerHTML}}},text:function(C){if(C!==undefined){var B=this,A=[];B.each(function(E){var D=E.firstChild;if(D&&D.nodeType!=1){D.nodeValue=C}else{A[A.length]=E}});if(A.length){linb(A).empty().each(function(D){D.appendChild(document.createTextNode(C))})}return B}else{return(function(I){var F,E=I.childNodes,D=E.length,H="",G=arguments.callee;for(F=0;F<D;F++){if(E[F].nodeType!=8){H+=(E[F].nodeType!=1)?E[F].nodeValue:G(E[F])}}return H})(this.get(0))}},attr:function(A,H){var J=this,G=arguments.callee,E=G.map1||(G.map1={"class":"className",readonly:"readOnly",tabindex:"tabIndex","for":"htmlFor",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",value:"value"}),D=G.map2||(G.map2={href:1,src:1,style:1});if(typeof A=="object"){for(var C in A){G.call(J,C,A[C])}return J}var I=linb.browser.ie&&A=="style",F=!D[A=E[A]||A];if(H!==undefined){return J.each(function(L){if(H===null){if(I){L.style.cssText=""}else{if(F){try{L[A]=null;if(L.nodeType==1){L.removeAttribute(A)}}catch(K){}}}}else{if(I){L.style.cssText=""+H}else{if(F){L[A]=H;if(L.nodeType==1&&typeof H=="string"){L.setAttribute(A,H)}}else{L.setAttribute(A,H)}}}})}else{var B=J.get(0);if(I){return B.style.cssText}if(A=="selected"&&linb.browser.kde){B.parentNode.selectedIndex}return((A in B)&&F)?B[A]:B.getAttribute(A,linb.browser.ie&&!F?2:undefined)}},css:function(A,B){return(typeof A=="object"||B!==undefined)?this.each(function(C){linb.Dom.setStyle(C,A,B)}):linb.Dom.getStyle(this.get(0),A)},caret:function(D,H){var N=this.get(0),P=N.tagName,L=typeof D,C=linb.browser.ie,M;if(!/^(input|textarea)$/i.test(P)){return this}N.focus();if(L=="number"){if(C){var A=N.createTextRange();A.collapse(true);A.moveEnd("character",H);A.moveStart("character",D);A.select()}else{N.setSelectionRange(D,H)}return this}else{if(L=="string"){var A=this.caret(),G=0,F=0,K,O=N.value,E=/\r/g;if(C){G=O.substr(0,A[0]).match(E);G=(G&&G.length)||0;F=D.match(E);F=(F&&F.length)||0}if(linb.browser.opr){G=D.match(/\n/g);G=(G&&G.length)||0;F=D.match(/\r\n/g);F=(F&&F.length)||0;F=G-F;G=0}N.value=O.substr(0,A[0])+D+O.substr(A[1],O.length);K=A[0]-G+F+D.length;this.caret(K,K);return K}else{if(C){var A=document.selection.createRange(),I=A.text,G=I.length,J,F;if(P.toLowerCase()=="input"){A.moveStart("character",-N.value.length);J=A.text.length;return[J-G,J]}else{var B=A.duplicate();B.moveToElementText(N);B.setEndPoint("EndToEnd",A);J=B.text.length;return[J-G,J]}}else{return[N.selectionStart,N.selectionEnd]}}}},show:function(E,D){var C,B,F="auto",A=linb.Dom.HIDE_VALUE;return this.each(function(G){if(G.nodeType!=1){return }C=G.style;if(B=(D||(C.top==A&&(G._top||F)))){C.top=B}if(B=(E||(C.left==A&&(G._left||F)))){C.left=B}if(B=G._position){if(C.position!=B){C.position=B}}if(C.visibility!="visible"){C.visibility="visible"}G._linbhide=0})},hide:function(){var B,A;return this.each(function(C){if(C.nodeType!=1){return }B=C.style;A=linb([C]);if(C._linbhide!==1){C._position=B.position;C._top=B.top;C._left=B.left;C._linbhide=1}if(B.position!="absolute"){B.position="absolute"}B.top=B.left=linb.Dom.HIDE_VALUE})},cssRegion:function(J,K){var N=this;if(typeof J=="object"){var F,M,B,A=N._nodes[0],E=linb.Dom,G=E._setPxStyle,B={};for(var D=0,H=E._boxArr;F=H[D++];){B[F]=((F in J)&&J[F]!==null)?G(A,F,J[F]):false}if(K){var G=E.$hasEventHandler;if(G(A,"onsize")&&(B.width||B.height)){N.onSize(true,{width:B.width,height:B.height})}if(G(A,"onlocation")&&(B.left||B.top)){N.onLocation(true,{left:B.left,top:B.top})}}return N}else{var C=J,L=K,I=C?N.offset(null,L):N.cssPos(),O=N.cssSize();return{left:I.left,top:I.top,width:O.width,height:O.height}}},cssSize:function(I,E){var H=this,A=H._nodes[0],B=linb.Dom,C=B._setPxStyle,F,D;if(I){var G;F=I.width!==null?C(A,"width",I.width):false;D=I.height!==null?C(A,"height",I.height):false;if(E&&(F||D)&&B.$hasEventHandler(A,"onsize")){H.onSize(true,{width:F,height:D})}return H}else{return{width:H._W(A,1)||0,height:H._H(A,1)}}},cssPos:function(H,F){var D=this._nodes[0],G=linb.Dom,E=G._setPxStyle,B,A;if(H){var C;B=H.left!=null?E(D,"left",H.left):false;A=H.top!==null?E(D,"top",H.top):false;if(F&&(B||A)&&G.$hasEventHandler(D,"onlocation")){this.onLocation(true,{left:B,top:A})}return this}else{E=G.getStyle;return{left:parseInt(E(D,"left"))||0,top:parseInt(E(D,"top"))||0}}},offset:function(E,N){var J,H,S=linb.browser,W=this,L=W.get(0),P=L,G=L.parentNode,F=L.offsetParent,V=L.ownerDocument,R=V.documentElement,T=V.body,B=/^inline|table.*$/i,D=linb.Dom.getStyle,C=D(L,"position")=="fixed",U=arguments.callee,I=U.add||(U.add=function(Z,X,Y){Z.left+=parseInt(X,10)||0;Z.top+=parseInt(Y,10)||0}),M=U.border||(U.border=function(X,Y){I(Y,D(X,"borderLeftWidth"),D(X,"borderTopWidth"))}),K=U.TTAG||(U.TTAG={TABLE:1,TD:1,TH:1}),O=U.HTAG||(U.HTAG={BODY:1,HTML:1}),A=U.posDiff||(U.posDiff=function(c,Z){var Y=c.cssPos(),X=c.offset(null,Z);return{left:X.left-Y.left,top:X.top-Y.top}});N=N?linb(N).get(0):V;if(E){if(E.left===null&&E.top===null){return W}var Q=A(W,N);W.cssPos({left:E.left===null?null:(E.left-Q.left),top:E.top===null?null:(E.top-Q.top)});J=W}else{if(!(linb.browser.gek&&L==document.body)&&L.getBoundingClientRect){H=L.getBoundingClientRect();E={left:H.left,top:H.top};if(N.nodeType==1){I(E,-(H=N.getBoundingClientRect()).left+N.scrollLeft,-H.top+N.scrollTop)}else{I(E,Math.max(R.scrollLeft,T.scrollLeft)-R.clientLeft,Math.max(R.scrollTop,T.scrollTop)-R.clientTop)}}else{E={left:0,top:0};I(E,L.offsetLeft,L.offsetTop);while(F&&F!=N&&F!=N.offsetParent){I(E,F.offsetLeft,F.offsetTop);if(S.kde||(S.gek&&!K[F.tagName])){M(F,E)}if(!C&&D(F,"position")=="fixed"){C=true}if(F.tagName!="BODY"){P=F.tagName=="BODY"?P:F}F=F.offsetParent}while(G&&G.tagName&&G!=N&&!O[G.tagName]){if(!B.test(D(G,"display"))){I(E,-G.scrollLeft,-G.scrollTop)}if(S.gek&&D(G,"overflow")!="visible"){M(G,E)}G=G.parentNode}if((S.gek&&D(P,"position")!="absolute")){I(E,-T.offsetLeft,-T.offsetTop)}if(C){I(E,Math.max(R.scrollLeft,T.scrollLeft),Math.max(R.scrollTop,T.scrollTop))}}J=E}return J},hasClass:function(B){var A=this.get(0).className.split(/\s+/);return _.arr.indexOf(A,B)!=-1},addClass:function(B){var A,C,E=arguments.callee,D=(E.reg||(E.reg=/\s+/));return this.each(function(F){A=(C=F.className).split(D);if(_.arr.indexOf(A,B)==-1){F.className=C+" "+B}})},removeClass:function(A){var E,D,C,G,I,H=typeof A=="string",F=arguments.callee,B=(F.reg||(F.reg=/\s+/));return this.each(function(J){E=J.className.split(B);C=E.length;G=[];for(D=0;I=E[D];D++){if(H?(I!=A):(!A.test(String(I)))){G[G.length]=I}}if(C!=G.length){J.className=G.join(" ")}})},replaceClass:function(C,A){var D,B;return this.each(function(E){B=(D=E.className).replace(C,A);if(D!=B){E.className=B}})},tagClass:function(A,E){var D=this,F=arguments.callee,C=F["_r1_"+A]||(F["_r1_"+A]=new RegExp("([-\\w]+"+A+"[-\\w]*)")),B=F._r2||(F._r2=/([-\w]+)/g);D.removeClass(C);return(false===E)?D:D.replaceClass(B,"$1 $1"+A)},_ajustType:function(B,A){return(window===B||document===B)&&A=="onsize"?"onresize":A},$addEventHandler:function(B,F){var C,G,A=linb.Event,H="on"+A._getEventType(B),E=A.$eventhandler,D=A.$EVENTHANDLER,J=A.getId,I=this._ajustType;return this.each(function(K){if(K.nodeType==3){return }C=J(K);if(!C){C=K.id=_.id()}H=I(K,H);if(F===false){if(K.setAttribute){K.setAttribute(H,D)}}else{if(K[H]){return }K[H]=E}if(!(G=linb.DomProfile.get(C))){G=new linb.DomProfile(C,K)}(G.nodeVars||(G.nodeVars={}))[H]=D})},$removeEventHandler:function(A){var C="on"+linb.Event._getEventType(A),B=this._ajustType;return this.each(function(D){C=B(D,C);if(D[C]){D[C]=null}if(D.getAttribute&&D.getAttribute(C)){D.removeAttribute(C)}})},$addEvent:function(B,I,J,F){var N=this,H,M,C,G,L=linb.Event.getId,E=linb.cache.dom,A=linb.Event,D=_.arr.removeValue,K=_.arr.insertAny;if(!(B instanceof Array)){B=[[B,I,J]]}if(!F&&F!==0){F=-1}_.arr.each(B,function(P,O){B=P[0];I=P[1];J=P[2];if(typeof J=="string"){J="$"+J}else{J=undefined}N.$addEventHandler(B).each(function(Q){if(Q.nodeType==3){return }C=L(Q);if(!C){C=Q.id=_.id()}H=E[C];M=H.events||(H.events={});H=M[B]||(M[B]=[]);if(J===undefined){H.length=0;H=M[B]=[];F=-1;J="_"}H[J]=I;D(H,J);if(F==-1){H[H.length]=J}else{K(H,J,F)}if(M=(H=E[C]).clearCache){M.call(H)}})});return N},$removeEvent:function(B,J,G){var M=this,I,L,D,C,F,H,K=linb.Event.getId,E=linb.cache.dom,A=linb.Event;if(!(B instanceof Array)){B=[[B,J]]}_.arr.each(B,function(O,N){B=O[0];J=O[1];H=A._getEventType(B);M.each(function(P){if(!(C=K(P))){return }if(!(I=E[C])){return }if(!(L=I.events)){return }if(G){_.arr.each(A._getEventName(H),function(Q){delete L[Q]})}else{if(typeof J=="string"){J="$"+J;if(D=L[B]){if(_.arr.indexOf(D,J)!=-1){_.arr.removeValue(D,J)}delete D[J]}}else{delete L[B]}}if(L=(I=E[C]).clearCache){L.call(I)}})});return M},$getEvent:function(C,B){var E;if(!(E=linb.Event.getId(this.get(0)))){return }if(B){return _.get(linb.cache.dom,[E,"events",C,"$"+B])}else{var D=[],A=_.get(linb.cache.dom,[E,"events",C]);_.arr.each(A,function(G,F){D[D.length]=[G,A[G]]});return D}},$clearEventHandler:function(){return this.each(function(A){_.arr.each(linb.Event._events,function(B){if(A[B="on"+B]){A[B]=null}if(A.getAttribute&&A.getAttribute(B)){A.removeAttribute(B)}})})},$clearEvent:function(){this.$clearEventHandler();return this.each(function(A){var C,B;if(!(C=linb.Event.getId(A))){return }if(!(B=linb.cache.dom[C])){return }_.filter(B.nodeVars,function(E,D){if(_.str.startWith(D,"on")){return false}});_.breakO(B.events,2);delete B.events})},$fireEvent:function(A,E){var G=linb.Event._getEventType(A),I,J="on"+G,F=arguments.callee,D=linb.Event.$eventhandler,C=F.f1||(F.f1=function(){this.returnValue=false}),B=F.f2||(F.f2=function(){this.cancelBubble=true}),H=this._ajustType;E=E||{};return this.each(function(K){J=H(K,J);if(typeof K[J]!="function"){if(!K[J]&&!(K.getAttribute&&K.getAttribute(J))){return }K[J]=D}_.merge(E,{type:G,target:K,button:1,$e:true,$name:A,preventDefault:C,stopPropagation:B},"all");if("blur"==G||"focus"==G){K[G].call(K,E)}else{K[J].call(K,E)}})},$canFocus:function(){var D=arguments.callee,A=linb.Dom.getStyle,E=D.map||(D.map={a:1,input:1,select:1,textarea:1,button:1,object:1}),B,C;return !!((C=this._nodes[0])&&C.focus&&(((B=E[C.tagName.toLowerCase()])&&!(parseInt(C.tabIndex)<=-1))||(!B&&parseInt(C.tabIndex)>=(linb.browser.ie?1:0)))&&A(C,"display")!="none"&&A(C,"visibility")!="hidden"&&C.offsetWidth>0&&C.offsetHeight>0)},focus:function(B){var A=this;if(B||A.$canFocus()){try{A.get(0).focus()}catch(C){}}return A},setSelectable:function(B){var A=arguments.callee,C=A._f||(A._f=function(){return false});return this.each(function(D){if(linb.browser.gek){D.style.MozUserSelect=B?"all":"none"}else{D.unselectable=B?"off":"on";D.onselectstart=B?null:C}})},setInlineBlock:function(){var A=this;if(linb.browser.gek){A.css("display","-moz-inline-block").css("display","-moz-inline-box").css("display","inline-block")}else{if(linb.browser.ie6){A.css("display","inline-block").css({display:"inline",zoom:"1"})}else{A.css("display","inline-block")}}return A},topZindex:function(A){var E=1000,C=0,B,F=this.get(0),G=F.offsetParent,D,H;if(F.nodeType!=1||!G){return 1}D=G.childNodes;for(B=0;H=D[B];B++){if(H==F||H.nodeType!=1||H.style.display=="none"||H.style.visibility=="hidden"||H.zIndexIgnore){continue}C=parseInt(H.style&&H.style.zIndex)||0;E=E>C?E:C}E++;if(E>=linb.Dom.TOP_ZINDEX){linb.Dom.TOP_ZINDEX=E+1000}if(A){F.style.zIndex=E}else{C=parseInt(F.style.zIndex)||0;return E>C?E:C}return this},nextFocus:function(D,C,B){D=_.isBool(D)?D:true;var A=this.get(0),E=this.$iterator("",D,C,function(F){return F!==A&&linb([F]).$canFocus()});if(!E.isEmpty()&&B!==false){E.focus()}return E},animate:function(I,L,A,C,B,K,D){var J=arguments.callee,F=J.lib||(J.lib={linear:function(N,O){return N/O},expoIn:function(N,O){return(N/O==0)?0:Math.pow(2,10*(N/O-1))},expoOut:function(N,O){return(N/O==1)?1:-Math.pow(2,-10*N/O)+1},expoInOut:function(N,O){if(N==0){return 0}else{if(N==O){return 1}else{if((N/=O/2)<1){return 1/2*Math.pow(2,10*(N-1))}}}return 1/2*(-Math.pow(2,-10*--N)+2)},sineIn:function(N,O){return -1*Math.cos(N/O*(Math.PI/2))+1},sineOut:function(N,O){return Math.sin(N/O*(Math.PI/2))},sineInOut:function(N,O){return -1/2*(Math.cos(Math.PI*N/O)-1)},backIn:function(N,O){var P=1.70158;return(N/=O)*N*((P+1)*N-P)},backOut:function(N,O){var P=1.70158;return((N=N/O-1)*N*((P+1)*N+P)+1)},backInOut:function(N,O){var P=1.70158;if((N/=O/2)<1){return 1/2*(N*N*(((P*=(1.525))+1)*N-P))}return 1/2*((N-=2)*N*(((P*=(1.525))+1)*N+P)+2)},bounceOut:function(N,O){if((N/=O)<(1/2.75)){return 7.5625*N*N}else{if(N<(2/2.75)){return 7.5625*(N-=(1.5/2.75))*N+0.75}else{if(N<(2.5/2.75)){return 7.5625*(N-=(2.25/2.75))*N+0.9375}else{return 7.5625*(N-=(2.625/2.75))*N+0.984375}}}}}),E=J.color||(J.color=function(R,Q,N,O){var P,S,V=0+(100-0)*F[R](O,N),U=Q[0],T=Q[1];if(typeof U!="string"||typeof T!="string"){return"#fff"}if(V<0){return U}else{if(V>100){return T}}P=function(W){return(W.charAt(0)!="#")?("#"+W):W};U=P(U);T=P(T);P=function(Y,X,W){return parseInt(Y.slice(X,W),16)||0};S=function(W){return{red:P(W,1,3),green:P(W,3,5),blue:P(W,5,7)}};U=S(U);T=S(T);P=function(d,Z,X,Y){var W=d[Y]+Math.round((X/100)*(Z[Y]-d[Y]));return(W<16?"0":"")+W.toString(16)};return"#"+P(U,T,V,"red")+P(U,T,V,"green")+P(U,T,V,"blue")});C=C||100;B=B||5;K=F[K]!==undefined?K:"expoIn";var M=this,H=0,G=[function(N){if(++H>B){linb.Thread(N).abort();return false}_.each(I,function(Q,O){if(typeof Q=="function"){Q(F[K](H,B))}else{var P=String(_.str.endWith(O.toLowerCase(),"color")?E(K,Q,B,H):(Q[0]+(Q[1]-Q[0])*F[K](H,B)));(M[O])?(M[O](P)):(M.css(O,P))}})}];return linb.Thread(D||_.id(),G,Math.max(C/B-9,0),null,L,A,true)},popToTop:function(H,G,K){var I,F=this,L;K=linb(K);if(K.isEmpty()){K=linb("body")}F.css({position:"absolute",left:linb.Dom.HIDE_VALUE,top:linb.Dom.HIDE_VALUE,display:"block",zIndex:linb.Dom.TOP_ZINDEX});if(H["linb.Dom"]||H.nodeType){G=(G||1).toString();var C=linb(H),M=C.offset(null,K);I={left:M.left,top:M.top,width:C.offsetWidth(),height:C.offsetHeight()}}else{G=G?"3":"0";L=G=="0"?0:8;I=H.region||{left:H.left-L,top:H.top-L,width:L*2,height:L*2}}H={left:0,top:0};var L=linb.win,E={};E.left=L.scrollLeft();E.top=L.scrollTop();E.width=L.width()+E.left;E.height=L.height()+E.top;var J=F.offsetWidth(),D=F.offsetHeight(),B,A;switch(G){case"1":B=false;A=true;break;case"2":B=true;A=false;break;case"3":B=false;A=false;break;case"4":B=A=true;break}if(B){if(I.top+D<E.height){H.top=I.top}else{H.top=I.top+I.height-D}}else{if(I.top+I.height+D<E.height){H.top=I.top+I.height}else{H.top=I.top-D}}if(A){if(I.left+J<E.width){H.left=I.left}else{H.left=I.left+I.width-J}}else{if(I.left+I.width+J<E.width){H.left=I.left+I.width}else{H.left=I.left-J}}if(H.left+J>E.width){H.left=E.width-J}if(H.left<E.left){H.left=E.left}if(H.top+D>E.height){H.top=E.height-D}if(H.top<E.top){H.top=E.top}F.cssPos(H).css({visibility:"visible",display:"block"});K.get(0).appendChild(F.get(0));return this},setBlurTrigger:function(A,C,I){var G=this,H=document,B="$blur_triggers$",E=linb(I?I:G.get()),F=linb.Dom._blurTrigger||(linb.Dom._blurTrigger=function(J,M){var N=arguments.callee,J=linb.Event.getPos(M),L=N.arr,Q=_.copy(L),P,O,R,K,S;_.arr.each(Q,function(T){P=true;if(!(S=L[T].target)){P=false}else{S.each(function(U){if(!linb.Dom.byId(U.id)){return P=false}})}if(!P){_.arr.removeValue(L,T);delete L[T]}});Q=_.copy(L);_.arr.each(Q,function(T){S=L[T];P=true;S.target.each(function(U){if(U.parentNode&&(R=U.offsetWidth)&&(K=U.offsetHeight)){O=linb([U]).offset();if(J.left>=O.left&&J.top>=O.top&&J.left<=(O.left+R)&&J.top<=(O.top+K)){return P=false}}});if(P){_.tryF(S.trigger,[],S.target);_.arr.removeValue(L,T);delete L[T]}else{return false}},null,true);Q.length=0}),D=F.arr||(F.arr=[]);if(!H.onmousedown){H.onmousedown=linb.Event.$eventhandler}E.each(function(J){if(!J.id){J.id=_.id()}});if(!C){_.arr.removeValue(D,A);delete D[A]}else{if(D[A]){_.arr.removeValue(D,A);delete D[A]}}D[A]={trigger:C,target:E};D.push(A);return this},$firfox2:function(){if(!linb.browser.gek2){return this}var A=this;A.css("overflow","hidden");_.asyRun(function(){A.css("overflow","auto")});return A},ieRemedy:function(){if(linb.browser.ie){var A=linb.Dom;if(!A.$_ie){A.$_ie=linb()}A.$_ie.merge(this);_.asyRun(function(){if(!A.$_ie.isEmpty()){A.$_ie.css("wordWrap","break-word")}});_.asyRun(function(){if(!A.$_ie.isEmpty()){A.$_ie.css("wordWrap","normal");A.$_ie._nodes.length=0}})}return this},fixPng:function(A){if(linb.browser.ie6){return this.each(function(B){if(B.tagName=="IMG"){B.style.height=B.height;B.style.width=B.width;B.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src="+B.src+", sizingMethod="+A+")";B.src=linb.ini.file_bg}})}}},Static:{HIDE_VALUE:"-10000px",TOP_ZINDEX:10000,_boxArr:_.toArr("width,height,left,top,right,bottom"),_cursor:{},__gc:function(){var E,F,D,A,C=linb.cache.dom,B=[];for(E in C){F=C[E];if(!F){continue}D=F.domNode;if(window===D||document===D||document.body===D){continue}if(!document.getElementById(F.domId)){if(D){D.$id=null}F.__gc();B[B.length]=E;if(F.$domId&&F.$domId!=F.domId){B[B.length]=F.$domId}}}for(E=0;E<B.length;){delete C[B[E++]]}if(linb.browser.ie6){CollectGarbage()}},$linbid:0,_map:{html:1,head:1,body:1},_ff:function(A){return document.getElementsByTagName(A)[0]},_ensureValues:function(G){var E,D,C,F=this._map,B=this._ff,A=window===G?[window]:document===G?[G]:G.constructor==Array?G:G["linb.Dom"]?G._nodes:G._toDomElems?G._toDomElems():typeof G=="function"?G():typeof G!="string"?[G]:G.charAt(0)=="{"?linb.SC(G.slice(1,G.length-1)).getAll().reBoxing()._nodes:[G];if(A[0]&&!A[0].nodeType){C=[];for(D=0;D<A.length;D++){if(E=typeof (E=A[D])=="string"?F[E]?B(E):document.getElementById(E):E?E.nodeType?E:(E["linb.UIProfile"]||E["linb.Template"])?E.domNode?E.domNode:(E.boxing().render()&&E.domNode):E===window?E:0:0){C[C.length]=E}}}else{C=A}for(D=0;E=C[D++];){if(E.nodeType==1){if(!E.$id){E.$id="$"+this.$linbid++}}}return C.length<=1?C:this._unique(C)},getStyle:function(C,B){if(C.nodeType!=1){return""}var I,H;if(B=="opacity"&&linb.browser.ie){H=B="filter"}I=C.style[B];if(!I){var G=arguments.callee,J,A=G.map||(G.map={"float":1,cssFloat:1,styleFloat:1}),E=G._c1||(G._c1={}),D=G._c2||(G._c2={}),B=E[B]||(E[B]=B.replace(/\-(\w)/g,function(L,K){return K.toUpperCase()})),F=D[B]||(D[B]=B.replace(/([A-Z])/g,"-$1").toLowerCase());if(A[B]){B=linb.browser.ie?"styleFloat":"cssFloat"}I=((J=document.defaultView)&&J.getComputedStyle)?(J=J.getComputedStyle(C,null))?J.getPropertyValue(F):"":(C.currentStyle&&(C.currentStyle[B]||C.currentStyle[F]))}return H?I?(parseFloat(I.match(/alpha\(opacity=(.*)\)/)[1])||0)/100:1:(I||"")},setStyle:function(F,B,G){if(F.nodeType!=1){return }if(typeof B=="string"){var E=this.getStyle,D=E._c1||(E._c1={}),A=E._r1||(E._r1=/alpha\([^\)]*\)/ig);B=D[B]||(D[B]=B.replace(/\-(\w)/g,function(I,H){return H.toUpperCase()}));if(B=="opacity"){G=parseFloat(G)||0;G=G>0.9999?"":linb.browser.ie?"alpha(opacity="+100*G+")":G;if(linb.browser.ie){F.zoom=1;B="filter";G=F.style.filter.replace(A,"")+G}}F.style[B]=G}else{for(var C in B){arguments.callee.call(this,F,C,B[C])}}},_setPxStyle:function(C,A,D){if(C.nodeType!=1){return false}var B=C.style;if(D||D===0){D=((""+parseFloat(D))==(""+D))?(parseInt(D)||0)+"px":D+"";if((A=="width"||A=="height")&&D.charAt(0)=="-"){D="0"}if(B[A]!=D){B[A]=D;return true}}return false},_matrixid:"linb.matrix::",getEmptyDiv:function(D){var E=1,B,A,C,I,G=0,H=document,F=H.body,J=function(K){K.id=B;linb([K]).attr("style","position:absolute;visibility:hidden;overflow:visible;left:"+linb.Dom.HIDE_VALUE+";top:"+linb.Dom.HIDE_VALUE+";")};D=D||1;while(1){B=this._matrixid+E;if(C=linb.Dom.byId(B)){if(!C.firstChild&&++G==D){return linb([C])}}else{C=H.createElement("div");J(C,B);if(F.firstChild){F.insertBefore(C,F.firstChild)}else{F.appendChild(C)}return linb([C])}E++}},setCover:function(C,G){var F=arguments.callee,A="linb.temp:cover:",H="linb.temp:message:",E=typeof C=="string"?C:"",D,B;if((D=linb(A)).isEmpty()){linb("body").prepend(D=linb.create('<div id="'+A+'" style="position:absolute;display:none;left:0;top:0;background-image:url('+linb.ini.file_bg+')"><div id="'+H+'" style="position:absolute;font-size:12px"></div></div>'));D.get(0).zIndexIgnore=1}B=linb(H);if(!C){if(typeof F._label=="string"&&F._label!==G){return }if(F._showed){B.empty(false);D.css({zIndex:0,cursor:"",display:"none"});F._showed=false}delete F._label}else{if(typeof G=="string"){F._label=G}var I=linb.win;if(!F._showed){D.css({zIndex:linb.Dom.TOP_ZINDEX*2,display:"",width:I.scrollWidth()+"px",height:I.scrollHeight()+"px",cursor:"wait"});F._showed=true}if(E){B.css({left:I.scrollLeft()+I.width()/2+"px",top:I.scrollTop()+I.height()/2+"px"});B.html(E+"",false)}}},byId:function(A){return document.getElementById(A||"")},$hasEventHandler:function(B,A){return !!(B[A]||(B.getAttribute&&B.getAttribute(A)))},submit:function(D,C,G,E,B){C=_.isHash(C)?C:{};G=G||"get";D=D||"";E=E||"_blank";var A=[];_.each(C,function(I,H){A.push('<textarea name="'+H+'">'+(typeof I=="object"?_.serialize(I):I)+"</textarea>")});if(!_.isEmpty(C)){A.push('<input type="hidden" name="rnd" value="'+_()+'">')}var F=_.str.toDom('<form target="'+E+'" action="'+D+'" method="'+G+(B?'" enctype="'+B:"")+'">'+A.join("")+"</form>");linb.Dom.getEmptyDiv().append(F);F.get(0).submit();F.remove()},busy:function(A){linb.Dom.setCover(true,A)},free:function(A){linb.Dom.setCover(false,A)},animate:function(F,G,I,A,D,B,H,E){var C=document.createElement("div");_.merge(F,{position:"absolute",left:this.HIDE_VALUE,zIndex:this.TOP_ZINDEX+10});linb.Dom.setStyle(C,F);document.body.appendChild(C);return linb([C]).animate(G,I,function(){_.tryF(A);if(C.parentNode){C.parentNode.removeChild(C)}},D,B,H,E)},$enableEvents:function(B){if(!(B instanceof Array)){B=[B]}var A=this,C;_.arr.each(B,function(D){C=function(F,H,E){if(typeof F=="function"){return this.$addEvent(D,F,H,E)}else{if(F===null){return this.$removeEvent(D,H,E)}}var G=arguments[1]||{};G.$all=(arguments[0]===true);return this.$fireEvent(D,G)};C.$event$=1;A.plugIn(D,C)})}},After:function(U){var M=this;_.each({parent:["y",false],prev:["x",false],next:["x",true],first:["y",true],last:["y",1]},function(H,B){M.plugIn(B,function(L){return this.$iterator(H[0],H[1],true,L||1)})});_.arr.each(_.toArr("offsetLeft,offsetTop,scrollWidth,scrollHeight"),function(B){M.plugIn(B,function(){var T=this.get(0),R=window,W=document;if(T==R||T==W){if("scrollWidth"==B||"scrollHeight"==B){var L=W.documentElement,H=W.body;return Math.max(L[B],H[B])}else{T=linb.browser.contentBox?W.documentElement:W.body}}return T[B]})});var N="padding",P="margin",X="border",V="inner",O="offset",J="outer",G="width",S="height",A="Width",F="Height",C="Top",E="Left",I="top",Q="left",D="Right",K="Bottom";_.arr.each([["_"+N+"H",N+C,N+K],["_"+N+"W",N+E,N+D],["_"+X+"H",X+C+A,X+K+A],["_"+X+"W",X+E+A,X+D+A],["_"+P+"W",P+E,P+D],["_"+P+"H",P+C,P+K]],function(L){var H,B=linb.Dom.getStyle;M.plugIn(L[0],function(){H=this.get(0);return(parseInt(B(H,L[1]))+parseInt(B(H,L[2])))||0})});_.arr.each([["_W",G,"_"+N+"W","_"+X+"W","_"+P+"W",V+A,O+A],["_H",S,"_"+N+"H","_"+X+"H","_"+P+"H",V+F,O+F]],function(B){M.plugIn(B[0],function(i,T,h){var g,c,Y,k=i.style,u=arguments.callee,Z=linb.browser.contentBox,j=u.r1||(u.r1=/%$/),R=linb.Dom.getStyle,l=linb.Dom._setPxStyle,L=typeof h,W;if(L=="undefined"||L=="boolean"){if(h===true){g=(R(i,"display")=="none");if(g){var q=linb.Dom.getEmptyDiv().html("*",false);linb([i]).swap(q);var s,e,m;s=k.visibility,e=k.position,m=k.display;e=e||"";s=s||"";m=m||"";k.visibility="hidden";k.position="absolute";k.display="block"}}Y=linb([i]);switch(T){case 1:c=R(i,B[1]);if(isNaN(parseInt(c))||j.test(c)){c=u(i,2)-(Z?Y[B[2]]():0)}c=parseInt(c)||0;break;case 2:c=i[B[6]]-Y[B[3]]();break;case 3:c=i[B[6]];if(!c){c=u(i,1)+(Z?Y[B[2]]():0)+Y[B[3]]()}break;case 4:c=u(i,3);c+=Y[B[4]]();break}if(g){k.display=m;k.position=e;k.visibility=s;Y.swap(q);q.empty(false)}return parseInt(c)||0}else{switch(T){case 1:if(l(i,B[1],h)){if(linb.Dom.$hasEventHandler(i,"onsize")){var H={};H[B[1]]=1;linb([i]).onSize(true,H)}}break;case 2:u(i,1,h-(Z?linb([i])[B[2]]():0));break;case 3:u(i,1,h-(Y=linb([i]))[B[3]]()-(Z?Y[B[2]]():0));break;case 4:u(i,1,h-(Y=linb([i]))[B[4]]()-Y[B[3]]()-(Z?Y[B[2]]():0));break}}})});_.arr.each([[V+A,"_W",2],[O+A,"_W",3],[J+A,"_W",4],[V+F,"_H",2],[O+F,"_H",3],[J+F,"_H",4]],function(B){M.plugIn(B[0],function(L){var H=typeof L;if(H=="undefined"||H=="boolean"){return this[B[1]](this.get(0),B[2])}else{return this.each(function(R){this[B[1]](R,B[2],L)})}})});_.arr.each([[Q+"By",Q],[I+"By",I],[G+"By",G],[S+"By",S]],function(B){M.plugIn(B[0],function(Y,W){if(Y===0){return this}var H,T,R=B[1],L=linb.Dom.getStyle;return this.each(function(Z){H=L(Z,R);H=(parseInt(H)||0)+Y;if(R=="width"||R=="height"){H=H>0?H:0}Z.style[R]=H+"px";if(W){T={};T[R]=1;var c=linb.Dom.$hasEventHandler;if((R=="left"||R=="top")&&c(Z,"onlocation")){linb([Z]).onLocation(true,T)}if((R=="width"||R=="height")&&c(Z,"onsize")){linb([Z]).onSize(true,T)}}},this)})});_.arr.each(["scrollLeft","scrollTop"],function(B){M.plugIn(B,function(T){if(T!==undefined){return this.each(function(W){W[B]=T})}else{var R=this.get(0);if(R===window||R===document){var L=document.documentElement,H=document.body;if("scrollTop"==B){return window.pageYOffset||Math.max(L[B],H[B])}if("scrollLeft"==B){return window.pageXOffset||Math.max(L[B],H[B])}}return R[B]}})});_.arr.each("width,height,left,top".split(","),function(B){M.plugIn(B,function(Z){var d=this,H=d._nodes[0],T=linb.browser,R=typeof Z,Y=document,c;if(!H||H.nodeType==3){return }if(R=="undefined"||R=="boolean"){if((B=="width"&&(c="Width"))||(B=="height"&&(c="Height"))){if(Y===H){return Math.max(Y.body["scroll"+c],Y.body["offset"+c],Y.documentElement["scroll"+c],Y.documentElement["offset"+c])}if(window===H){return T.opr?(Y.body["client"+c]||window["inner"+c]):T.kde?window["inner"+c]:(linb.browser.contentBox&&Y.documentElement["client"+c])||Y.body["client"+c]}}if(B=="width"){Z=parseInt(H.style.width)||d._W(H,1,Z)}else{if(B=="height"){Z=parseInt(H.style.height)||d._H(H,1,Z)}else{Z=linb.Dom.getStyle(H,B)}}return Z=="auto"?Z:(parseInt(Z)||0)}else{var L=linb.Dom._setPxStyle,c,W;return d.each(function(e){if(e.nodeType!=1){return }if(e.style[B]!==Z){if(B=="width"){d._W(e,1,Z)}else{if(B=="height"){d._H(e,1,Z)}else{if(L(e,B,Z)){if((B=="top"||B=="left")&&linb.Dom.$hasEventHandler(H,"onlocation")){W={};W[B]=1;linb([e]).onLocation(true,W)}}}}}})}})});_.arr.each(linb.Event._events,function(B){_.arr.each(linb.Event._getEventName(B),function(H){M.$enableEvents(H)})})},Initialize:function(){linb.win=linb([window]);linb.doc=linb([document]);linb.$inlineBlock=linb.browser.gek?["-moz-inline-block","-moz-inline-box","inline-block"]:linb.browser.ie6?["inline-block","inline"]:"inline-block",linb.doc.onKeydown(function(C,B){var A=linb.Event,E,D=A.$keyboard=A.getKey(B);if(D){if(D[0].length==1){D[0]=D[0].toLowerCase()}E=linb.cache.hookKey[D.join(":")];if(E){if(_.tryF(E[0],E[1],E[2])===false){A.stopBubble(B);return false}}}return true},"document").onKeyup(function(B,A){delete linb.Event.$keyboard},"document");linb.doc.onClick(function(F,E,H){if(!linb.History){return }var D=location.href.split("#")[0],C=linb.Event,G=C.getSrc(E),A,B=0,A;do{if(G.tagName=="A"){A=true;break}if(++B>8){break}}while(G=G.parentNode);if(A){if(G.href.indexOf("javascript:")==0){return false}if(!C.getKey(E)[2]&&C.getBtn(E)=="left"&&(G.href.indexOf(D+"#")==0||G.href.indexOf("#")==0)){linb.History.setFI(G.href.replace(D,""));return false}}},"hookA",0);linb.win.afterUnload(function(){linb.SC.__gc();linb.Thread.__gc();linb([window,document]).$clearEvent();linb("body").empty();linb.Dom.__gc();_.breakO([linb,Class,_],3);window.Class=window.Namespace=window.linb=window._=undefined},"window",-1);if(linb.browser.ie){linb.win.onScroll(function(){linb.Event._IE()},"forEventPos",0)}}});Class("linb.Template","linb.absProfile",{Constructor:function(D,C,B,E){var A=this;A.$id=A.$domId=A.KEY+":"+(A.serialId=A._pickSerialId())+":";A.domId=typeof E=="string"?E:A.$domId;A._links={};A.template={"":[["<div></div>"],[]]};A.properties={};A.events={};A.$template={};A.link(A.constructor._cache,"self").link(linb._pool,"linb");A.box=A.constructor;A.boxing=function(){return this};if(D){A.setTemplate(typeof D=="string"?{"":D}:D)}if(B){A.setEvents(B)}if(C){A.setProperties(C)}return A},Instance:{rendered:false,__gc:function(){this.destroy()},_reg:/^\w[\w_-]*$/,getRootNode:function(){return this.domNode||(this.domNode=document.getElementById(this.domId))},setDomId:function(D){var A=this,C=linb.cache.dom,B=A._reg;if(typeof D=="string"&&B.test(D)&&!document.getElementById(D)){if(A.domId!=A.$domId){delete C[A.domId]}A.domId=D;if(A.getRootNode()){A.getRootNode().id=D}if(C[A.$domId]){C[D]=A}}return A},destroy:function(){var A=this,B=linb.cache.domId;if(A.domNode){var C=this.constructor,D=C.c||(C.c=document.createElement("div"));D.appendChild(A.domNode);A.domNode=null;D.innerHTML=""}(B[A.KEY]||(B[A.KEY]=[])).push(A.serialId);delete linb.cache.dom[A.domId];delete linb.cache.dom[A.$domId];A.unLinkAll();_.breakO(A)},setEvents:function(B,C){var A=this;if(typeof B=="object"){A.events=B}else{A.events[B]=C}return A},setTemplate:function(D,G){var A=this,C=A.template,H=A.$template,F=A._buildTemplate,E;if(typeof D=="object"){A.template=D;E={};for(var B in D){E[B]=F(D[B])}A.$template=E}else{if(typeof G=="string"){H[D]=F(C[D]=G)}else{H[""]=F(C[""]=D)}}return A},setProperties:function(B,C){var A=this;if(typeof B=="object"){A.properties=B}else{A.properties[B]=C}return A},getItem:function(D){if(typeof D=="string"){D=document.getElementById(D)}if(!D){return }var E=D.getAttribute("evid"),A=D.getAttribute("evkey");if(!E||!A){return }var B=arguments.callee,C=B.f||(B.f=function(J,H,L){var I,K,G,F;for(G in J){K=J[G];if(_.isArr(K)&&(H==G||H.indexOf((J._evkey||G)+".")===0)){for(I=0;F=K[I];I++){if(F._evkey==H&&F.id==L){return F}else{if(F=C(F,H,L)){return F}}}}}});return C(this.properties,A,E)},_pickSerialId:function(){var A=linb.cache.domId[this.KEY];if(A&&A[0]){return A.shift()}return this.constructor._ctrlId.next()},render:function(){var C=this,G=C.toHtml(),F;if(F=C.getRootNode()){var A,E=(A=F.previousSibling)?F.previousSibling:F.parentNode;if(linb.browser.gek){F.id="";var B=F.ownerDocument.createRange();B.setStartBefore(F);F.parentNode.replaceChild(B.createContextualFragment(G),F)}else{F.outerHTML=G}if(E){C.domNode=A?E.nextSibling:E.firstChild}}else{var D=this.constructor,H=D.c||(D.c=document.createElement("div"));linb.cache.dom[C.domId]=linb.cache.dom[C.$domId]=this;C.rendered=true;H.innerHTML=G;C.domNode=H.removeChild(H.firstChild)}return C},renderOnto:function(D){var E,C,B="style",A;if(typeof D=="string"){D=document.getElementById(D)}E=D.id||(D.id=_.id());C=this.domNode;D.parentNode.replaceChild(C,D);if(C.tabIndex!=D.tabIndex){C.tabIndex!=D.tabIndex}if(D.className){C.className+=D.className}if(linb.browser.ie&&(A=D.style.cssText)){C.style.cssText+=A+""}else{if(A=D.getAttribute(B)){C.setAttribute(B,(C.getAttribute(B)||"")+A)}}this.setDomId(E)},toHtml:function(A){return this._doTemplate(A||this.properties||{})},_buildTemplate:function(G){if(typeof G=="string"){var E=arguments.callee,D=E._reg||(E._reg=/([^{}]*)\{([\w]+)\}([^{}]*)/g),C=E._reg2||(E._reg2=/(<[^>]+\[\$e\])([^>]*[>])/g),F=[[],[]],B=F[0],A=F[1];G=G.replace(C,"$1 evid={id} evkey={_evkey}$2");G.replace(D,function(I,H,K,J){if(H){B[B.length]=H}A[B.length]=B[B.length]=K;if(J){B[B.length]=J}return""});return F}else{return G}},_getEV:function(A,H,E,G){var B=this.events,D=G.getAttribute("evkey"),C=D&&B&&B[D]||B,F=C&&C[E];if(F){A.push(F)}},_doTemplate:function(A,Q,B){if(!A){return""}var F=this,O=arguments.callee,D,C,G,L=A.constructor==Array,K=O.r1||(O.r1=/(\[\$e\])/g),I=O.r2||(O.r2=/(^\s*<\w+)(\s|>)(.*)/),N=F.$template,M=N[Q||""],E=!B;B=B||[];if(L){if(typeof M!="function"){M=O}for(var J=0;C=A[J++];){C._evkey=Q;M.call(F,C,Q,B)}}else{if(typeof M=="function"){M.call(F,A,Q,B)}else{Q=Q?Q+".":"";var R=M[0],P=M[1];for(var J=0,H=R.length;J<H;J++){if(G=P[J]){if(G in A){C=A[G];if(N[D=Q+G]){O.call(F,C,D,B)}else{B[B.length]=C}}}else{B[B.length]=R[J]}}}}if(E){return B.join("").replace(K,"\"return linb.Event(arguments[0],this,0,'"+F.domId+"')\"").replace(I,'$1 id="'+F.domId+'" $2$3')}},serialize:function(){var A=this,D=_.serialize,C=linb.absObj.$specialChars,B=_.isEmpty(A.properties)?null:_.clone(A.properties,function(F,E){return !C[(E+"").charAt(0)]});return"new linb.Template("+D(A.template||null)+","+D(B)+","+D(_.isEmpty(A.events)?null:A.events)+","+D(A.$domId!=A.domId?A.domId:null)+")"}},Static:{getFromDom:function(A){if((A=typeof A=="string"?A:(A&&A.id))&&(A=linb.cache.dom[A])&&A["linb.Template"]){return A.boxing()}},_cache:[],_ctrlId:new _.id()}});Class("linb.Com",null,{Constructor:function(C,B,D){var A=this;A._nodes=[];A.host=D||A;A.properties=C||{};A.events=_.copy(A.events)||{};if(B){_.merge(A.events,B,"all")}},Instance:{setHost:function(B,A){this.host=B;return B[A]=this},getHost:function(){return this.host},setProperties:function(B,C){var A=this;if(!B){A.properties={}}else{if(typeof B=="string"){A.properties[B]=C}else{_.merge(A.properties,B,"all")}}return A},getProperties:function(A){return A?this.properties[A]:this.properties},setEvents:function(B,C){var A=this;if(!B){A.events={}}else{if(typeof B=="string"){A.events[B]=C}else{_.merge(A.events,B,"all")}}return A},getEvents:function(A){return A?this.events[A]:this.events},_fireEvent:function(C,B){var D,A=this;if(D=A.events[C]){if(typeof D=="string"){D=A.host[D]}B=B||[];B.splice(0,0,A,A.threadid);A.$lastEvent=C;if(typeof D=="function"){return D.apply(A.host,B)}}},_innerCall:function(B){var A=this;return _.tryF(A[B],[A,A.threadid],A)},show:function(C,D,B,F){var A=this,E=function(){A.render();if(A.customAppend){A.customAppend.call(A,D,B,F)}else{(D||linb("body")).append(A.getUIComponents(),B)}_.tryF(C,[A,F],A.host)};A.threadid=F;if(A.created){E()}else{A.create(E,F)}},render:function(B){var A=this;A.getUIComponents().render(B);A._fireEvent("onRender");A.rendered=true},create:function(C,E){var B=this,D,A=[];B.threadid=E;if(false===B._fireEvent("beforeCreated")){return }A.push(function(F){B.threadid=F;B._fireEvent("onCreated")});if((D=B.base)&&D.length){A.push(function(F){linb.SC.groupCall(B.base,function(G){B._fireEvent("onLoadBaseClass",[G])},null,F)})}if(B.iniResource){A.push(function(){B._fireEvent("onIniResource");B._innerCall("iniResource")})}if((D=B.required)&&D.length){A.push(function(F){linb.SC.groupCall(B.required,function(G){B._fireEvent("onLoadReqiredClass",[G])},null,F)})}if(B.iniComponents){A.push(function(){if(false===B._fireEvent("beforeIniComponents")){return }Array.prototype.push.apply(B._nodes,B._innerCall("iniComponents")||[]);B._fireEvent("afterIniComponents")})}if(B.iniExComs){A.push(function(){B._innerCall("iniExComs")})}A.push(function(F){B.loaded=true;if(B.background){linb.SC.runInBG(B.background)}B._fireEvent("onReady")});A.push(function(F){_.tryF(C,[B,F],B.host)});linb.Thread.observableRun(A,function(){B.created=true},E)},iniComponents:function(){},requestData:function(D,B,C){var A=linb.Thread;A.observableRun(function(E){linb.absIO.groupCall(D,null,null,B,A||E)},null,C)},composeUI:function(B,C,A){_.tryF(B)},fillUI:function(B,C,A){_.tryF(B)},getUIComponents:function(){var B=_.copy(this._nodes),C,A="linb.UI";_.filter(B,function(D){return !!(D.box[A]&&!D.box.$noDomRoot)});return linb.UI.pack(B,false)},getComponents:function(){return linb.absObj.pack(_.copy(this._nodes),false)},setComponents:function(C){var A=this,B;_.arr.each(A._nodes,function(D){if((B=A[D.alias])&&B.get(0)==D){delete A[D.alias]}});_.arr.each(A._nodes=C.get(),function(D){A[D.alias]=D.boxing()});return A},destroy:function(B){var A=this;A.threadid=B;A._fireEvent("onDestroy");_.arr.each(A._nodes,function(C){if(C.box){C.boxing().destroy()}});A._nodes.length=0;_.breakO(A)}},Static:{load:function(B,C,E,D){var A=function(){linb.SC(B,function(H){if(H){var F=this,G=function(){var I=new F();if(D!==false){I.show(C)}else{_.tryF(C,[I],I)}};if(E){linb.setLang(E,G)}else{G()}}else{throw new Error(B+" doesnt exists!")}},true)};if(linb.isDomReady){A()}else{linb.main(A)}},$EventHandlers:{beforeCreated:function(A,B){},onLoadBaseClass:function(A,C,B){},onIniResource:function(A,B){},beforeIniComponents:function(A,B){},afterIniComponents:function(A,B){},onLoadRequiredClass:function(A,C,B){},onReady:function(A,B){},onRender:function(A,B){}}}});Class("linb.Cookies",null,{Static:{set:function(A,D,F,E,C,B){if(A){document.cookie=escape(A)+"="+escape(D)+(F?";expires="+(new Date((new Date()).getTime()+(24*60*60*1000*F))).toGMTString():"")+(E?";path="+E:"")+(C?";domain="+C:"")+(B?";secure":"")}return this},get:function(C){var D,B,A=document.cookie.split("; ");for(D=0;D<A.length;D++){B=A[D].split("=");if(B[0]==escape(C)){return B[1]?unescape(B[1]):""}}return null},remove:function(A){return this.set(A,"",-1).set(A,"/",-1)}}});Class("linb.XML",null,{Static:{json2xml:function(D){var A=[],C=function(I,J,F){if(typeof J=="object"){if(_.isArr(J)){if(J.length){for(var H=0,G=J.length;H<G;H++){F.push(C(I,J[H],F))}}else{F.push("<"+I+">__[]__</"+I+">")}}else{var E;F.push("<"+I);for(var H in J){if(H.charAt(0)=="@"){F.push(" "+H.substr(1)+'="'+J[H]+'"')}else{E=1}}F.push(E?">":"/>");if(E){for(var H in J){if(H=="#text"){F.push(J[H])}else{if(H=="#cdata"){F.push("<![CDATA["+J[H]+"]]>")}else{if(H.charAt(0)!="@"){F.push(C(H,J[H],F))}}}}F.push("</"+I+">")}}}else{F.push("<"+I+">"+J+"</"+I+">")}};for(var B in D){C(B,D[B],A)}return'<?xml version="1.0" encoding="UTF-8" ?>'+A.join("")},xml2json:function(F){if(F.nodeType==9){F=F.documentElement}var A={},G={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},C=/^-?(\d\d*\.\d*$)|(^-?\d\d*$)|(^-?\.\d\d*$)/,B={"__[]__":[],"null":null,"false":false,"true":true},E=function(J){return J.replace(/[\s\S]/g,function(L,K){return(K=G[L])?K:L})},H=function(K){var L,J;K.normalize();for(L=K.firstChild;L;){J=L;if(L.nodeType==1){H(L)}L=L.nextSibling;if(J.nodeType==3&&!J.nodeValue.match(/\S/)){K.removeChild(J)}}return K},I=function(N){if("innerHTML" in N){N=N.innerHTML;N=N in B?B[N]:C.test(N)?parseFloat(N):N}else{var K=[],L,M=function(R){if(R.nodeType==1){K.push("<"+R.nodeName);var O=R.attributes;for(var Q=0,P=O.length;Q<P;Q++){K.push(" "+O[Q].nodeName+'="'+(O[Q].nodeValue||"")+'"')}if(R.firstChild){K.push(">");for(O=R.firstChild;O;O=O.nextSibling){K.push(M(O))}K.push("</"+R.nodeName+">")}else{K.push("/>")}}else{if(R.nodeType==3){R=R.nodeValue;K.push(R in B?B[R]:C.test(R)?parseFloat(R):R)}else{if(R.nodeType==4){K.push("<![CDATA["+R.nodeValue+"]]>")}}}};for(var J=N.firstChild;J;J=J.nextSibling){M(J)}N=(K.length==1?K[0]:K.join(""))}return typeof N=="string"?E(N):N},D=function(O){var K=null,S,P;if(O.nodeType==1&&((S=O.attributes).length||O.firstChild)){K={};if(S.length){for(var N=0,M=S.length;N<M;N++){K["@"+S[N].nodeName]=(S[N].nodeValue||"")+""}}if(O.firstChild){var R=0,Q=0,J=0,L;for(L=O.firstChild;L;L=L.nextSibling){P=L.nodeType;if(P==1){J++}else{if(P==3){R++}else{if(P==4){Q++}}}}if(J){if(R<2&&Q<2){for(L=O.firstChild;L;L=L.nextSibling){if(L.nodeType==3){K["#text"]=E(L.nodeValue)}else{if(L.nodeType==4){K["#cdata"]=E(L.nodeValue)}else{if(K[P=L.nodeName]){if(K[P] instanceof Array){K[P][K[P].length]=D(L)}else{K[P]=[K[P],D(L)]}}else{K[P]=D(L)}}}}}else{if(!S.length){K=I(O)}else{K["#text"]=I(O)}}}else{if(R){if(!S.length){K=I(O)}else{K["#text"]=I(O)}}else{if(Q){if(Q>1){K=I(O)}else{for(L=O.firstChild;L;L=L.nextSibling){K["#cdata"]=E(L.nodeValue)}}}}}}}return K};A[F.nodeName]=D(H(F));return A},parseXML:function(A){var D=null;if(typeof DOMParser=="undefined"){try{D=new ActiveXObject("Microsoft.XMLDOM");D.async=false;D.loadXML(A)}catch(C){D=null}}else{try{var B=new DOMParser();D=B.parseFromString(A,"text/xml")}catch(C){D=null}finally{B=null}}return D}}});Class("linb.DragDrop",null,{Static:{_eh:"_dd",_id:"linb.dd:proxy:",_idi:"linb.dd:td:",_type:{blank:1,move:1,shape:1,deep_copy:1,copy:1,icon:1,none:1},_Icons:{none:"top",move:"-16px",link:"-32px",add:"-48px"},_profile:{},_left:function(value){with(this._profile){if(magneticDistance>0&&xMagneticLines.length){var l=xMagneticLines.length;while(l--){if(Math.abs(value-xMagneticLines[l])<=magneticDistance){return xMagneticLines[l]}}}if(widthIncrement>1){return Math.floor(value/widthIncrement)*widthIncrement}return value}},_top:function(value){with(this._profile){if(magneticDistance>0&&yMagneticLines.length){var l=yMagneticLines.length;while(l--){if(Math.abs(value-yMagneticLines[l])<=magneticDistance){return yMagneticLines[l]}}}if(heightIncrement>1){return Math.floor(value/heightIncrement)*heightIncrement}return value}},_ini:function(D){var C=this,B=C._profile,A=linb.win;C._box={width:A.width()+A.scrollLeft(),height:A.height()+A.scrollTop()};B.ox=B.x;B.oy=B.y;if(C._proxy=D){C._proxystyle=D.get(0).style;C._profile.curPos=C._cssPos=C._proxy.cssPos();C._cssPos_x=B.x-C._cssPos.left;C._cssPos_y=B.y-C._cssPos.top;B.restrictedLeft=B.x-(B.maxLeftOffset||0);B.restrictedRight=B.x+(B.maxRightOffset||0);B.restrictedTop=B.y-(B.maxTopOffset||0);B.restrictedBottom=B.y+(B.maxBottomOffset||0);C._proxyLeft=C._pre.left=C._cssPos.left;C._proxyTop=C._pre.top=C._cssPos.top;if("move"!==B.dragType){C._proxy.css("zIndex",linb.Dom.TOP_ZINDEX*10)}}},_reset:function(){var C=this,B=null,A=false;_.tryF(C.$reset);C.setDropFace();C._resetProxy();C.$proxySize=50;C.$mousemove=C.$mouseup=C.$onselectstart=C.$ondragstart="*";C._cursor="";C._pre={};C._proxyLeft=C._proxyTop=C._cssPos_x=C._cssPos_y=0;C._stop=A;C._cssPos=C._box=C._dropElement=C._source=C._proxy=C._proxystyle=C._onDrag=C._onDragover=B;C._profile={dragType:"shape",dragCursor:"move",targetReposition:true,dragIcon:linb.ini.path+"ondrag.gif",magneticDistance:0,xMagneticLines:[],yMagneticLines:[],widthIncrement:0,heightIncrement:0,dragDefer:0,horizontalOnly:A,verticalOnly:A,maxBottomOffset:B,maxLeftOffset:B,maxRightOffset:B,maxTopOffset:B,targetNode:B,targetCSS:B,dragKey:B,dragData:B,targetLeft:B,targetTop:B,targetWidth:B,targetHeight:B,targetOffsetParent:B,shadowFrom:B,proxyNode:B,x:0,y:0,ox:0,oy:0,curPos:{},offset:{},isWorking:A,restrictedLeft:B,restrictedRight:B,restrictedTop:B,restrictedBottom:B,dropElement:B};return C},abort:function(){this._stop=true},_end:function(){var B=this,A=document;if(B._proxy){B._unpack()}if(B.$onselectstart!="*"){A.body.onselectstart=B.$onselectstart}if(B.$ondragstart!="*"){A.ondragstart=B.$ondragstart}if(B.$mousemove!="*"){A.onmousemove=B.$mousemove}if(B.$mouseup!="*"){A.onmouseup=B.$mouseup}return B},startDrag:function(D,E,B,H,C){var F=this;if(F._profile.isWorking){return false}F._end()._reset();F._profile.isWorking=true;B=_.isHash(B)?B:{};D=D||window.event;if(linb.Event.getBtn(D)!=="left"){return true}F._source=B.targetNode=linb(E);F._cursor=F._source.css("cursor");if(!B.targetNode.id()){B.targetNode.id(_.id(),true)}F._defer=B.dragDefer=_.isNumb(B.dragDefer)?B.dragDefer:0;if(true===B.dragCursor){B.dragCursor=F._cursor}if(typeof B.dragIcon=="string"){B.dragType="icon"}var I=document,J=linb.Event.getPos(D);B.x=J.left;B.y=J.top;B.dragKey=H||B.dragKey||null;B.dragData=C||B.dragData||null;var A=linb.Event.getSrc(D);F._start=function(L){var K=F._profile;_.merge(K,B,"with");F._source.beforeDragbegin();if(F._stop){F._end()._reset();return false}if(linb.Event){linb.Event._preDropable=F._source.get(0).id}if(K.dragType=="icon"){K.targetReposition=false}F._ini(K.dragType=="none"?null:F._pack(J,K.targetNode));if(B.x>=F._box.width||B.y>=F._box.height){F._end()._reset();return true}F._source.onDragbegin();if(K.dragDefer<1){F.$mousemove=I.onmousemove;F.$mouseup=I.onmouseup}if(linb.browser.ie){setTimeout(function(){A.releaseCapture()})}I.onmousemove=F.$onDrag;I.onmouseup=F.$onDrop;F._source.afterDragbegin();if(K.dragDefer>0){F.$onDrag.call(F,L)}};if(linb.browser.ie){F.$ondragstart=I.ondragstart;F.$onselectstart=I.body.onselectstart;I.ondragstart=I.body.onselectstart=null;if(I.selection){_.tryF(I.selection.empty)}}linb.Event.stopBubble(D);if(B.targetNode.get(0)!==I){linb(I).onMousedown(true,linb.Event.getEventPara(D,J))}if(B.dragDefer<1){_.tryF(F._start,[D],F);return false}else{F.$mouseup=I.onmouseup;I.onmouseup=function(K){linb.DragDrop._end()._reset();return _.tryF(document.onmouseup,[K],null,true)};F.$mousemove=I.onmousemove;var G={};I.onmousemove=function(L){var K=linb.Event.getPos(L);if(K.left===G.left&&K.top===G.top){return }G=K;if(--F._defer<=0){linb.DragDrop._start(L)}return false}}},$onDrag:function(C){var D=linb.DragDrop,B=D._profile;C=C||window.event;if((!B.isWorking)||D._stop||(linb.browser.ie&&(!C.button))){D.$onDrop(C);return true}var A=linb.Event.getPos(C);B.x=A.left;B.y=A.top;if(!B.isWorking){return false}if(D._proxy){if(!B.verticalOnly){D._proxyLeft=Math.floor(D._left(((B.maxLeftOffset!==null||B.maxRightOffset!==null)?((B.x<=B.restrictedLeft)?B.restrictedLeft:(B.x>=B.restrictedRight)?B.restrictedRight:B.x):B.x)-D._cssPos_x));if(D._proxyLeft-D._pre.left){D._proxystyle.left=D._proxyLeft+"px"}D._pre.left=D._proxyLeft;B.curPos.left=D._proxyLeft+D.$proxySize}if(!B.horizontalOnly){D._proxyTop=Math.floor(D._top(((B.maxTopOffset!==null||B.maxBottomOffset!==null)?((B.y<=B.restrictedTop)?B.restrictedTop:(B.y>=B.restrictedBottom)?B.restrictedBottom:B.y):B.y)-D._cssPos_y));if(D._proxyTop-D._pre.top){D._proxystyle.top=D._proxyTop+"px"}D._pre.top=D._proxyTop;B.curPos.top=D._proxyTop+D.$proxySize}}else{B.curPos.left=B.x;B.curPos.top=B.y}if(D._onDrag!=1){if(D._onDrag){D._onDrag(C)}else{D._onDrag=1;D._source.onDrag(true,linb.Event.getEventPara(C,A))}}return false},$onDrop:function(D){var E=linb.DragDrop,C=E._profile,A=linb.Event;D=D||window.event;E._end();if(C.isWorking){var B=E._source.onDragstop(true,A.getEventPara(D));if(E._dropElement){linb([E._dropElement]).onDrop(true,A.getEventPara(D))}}E._reset();A.stopBubble(D);_.tryF(document.onmouseup,[D]);return !!B},setDropElement:function(A){this._profile.dropElement=(this._dropElement=A)&&A.id;return this},getProfile:function(){var B=this,A=B._profile;A.offset=B._proxy?{x:B._proxyLeft-A.ox+B._cssPos_x,y:B._proxyTop-A.oy+B._cssPos_y}:{x:A.x-A.ox,y:A.y-A.oy};return A},setDropFace:function(G,E){var H=this,D='<div style="position:absolute;z-index:'+linb.Dom.TOP_ZINDEX+";font-size:0;line-height:0;border-",B=":dashed 1px #ff6600;",F=H._Region,A=H._rh,C="backgroundColor";if(F&&F.parent()){F.remove(false)}if(H._R){H._R.css(C,H._RB);delete H._R;delete H._RB}if(G){if(!F){F=H._Region=linb.create(D+"top"+B+'left:0;top:0;width:100%;height:0;"></div>'+D+"right"+B+'right:0;top:0;height:100%;width:0;"></div>'+D+"bottom"+B+'bottom:0;left:0;width:100%;height:0;"></div>'+D+'left:solid 2px #ff6600;width:0;left:0;top:0;height:100%;"></div>');A=H._rh=linb([F.get(1),F.get(3)])}G=linb(G);if(linb.browser.ie6){A.height("100%")}if(G.css("display")=="block"){G.append(F);if(linb.browser.ie6&&!A.get(0).offsetHeight){A.height(G.get(0).offsetHeight)}}else{H._RB=G.get(0).style[C];H._R=G;G.css(C,"#FA8072")}H.setDragIcon(E||"move")}else{H.setDragIcon("none")}return H},setDragIcon:function(C){_.resetRun("setDropFace",null);var E=this,D=E._profile,B=D.proxyNode,A=E._Icons;if(B&&D.dragType=="icon"){B.first(4).css("backgroundPosition","left "+(A[C]||A.none))}return E},_setProxy:function(G,F){var B,A,E=this,C=E._profile,D=linb.Dom;if(!D.byId(E._id)){linb("body").prepend(linb.create('<div id="'+E._id+'" style="left:0;top:0;border:0;font-size:0;line-height:0;padding:'+E.$proxySize+'px; position: absolute;"><div style="font-size:0;line-height:0;" id="'+E._idi+'">'+(linb.browser.ie6?"&nbsp;":"")+"</div></div>"))}B=linb(E._id);if(C.dragKey){E.$proxySize=0;B.css("padding",0)}else{F.left-=E.$proxySize;F.top-=E.$proxySize;if(!C.targetOffsetParent){D.setCover(true)}}if(A=C.targetOffsetParent){linb(A).append(B)}if(G){linb(E._idi).empty(false).append(G);C.proxyNode=G}else{C.proxyNode=linb(E._idi)}B.css({display:"",zIndex:D.TOP_ZINDEX*10,cursor:C.dragCursor}).offset(F,A);return B},_resetProxy:function(){var H=this,E=H._profile,G=linb.Dom,D=H._id,C=H._idi;if(G.byId(D)){var B,A,F=linb(C),B=linb(D);if(linb.browser.ie6){F.html("&nbsp;",false)}else{F.empty(false)}F.attr("style","font-size:0;line-height:0;");linb("body").prepend(B.css({zIndex:0,cursor:"",display:"none",padding:H.$proxySize+"px"}));E.proxyNode=H._proxystyle=null;G.setCover(false)}},_pack:function(G,C){var D,F={},I={},E=this,A=E._profile,H;if(A.targetLeft===null||null===A.targetTop){H=C.offset(null,A.targetOffsetParent)}F.left=null!==A.targetLeft?A.targetLeft:H.left;F.top=null!==A.targetTop?A.targetTop:H.top;switch(A.dragType){case"deep_copy":case"copy":var H;I.width=_.isNumb(A.targetWidth)?A.targetWidth:(C.cssSize().width||0);I.height=_.isNumb(A.targetHeight)?A.targetHeight:(C.cssSize().height||0);var B=C.clone(A.dragType=="deep_copy").id("",true).css({position:"relative",cursor:A.dragCursor,margin:0,cssFloat:"none"}).cssSize(I);B.css("opacity",0.5);if(A.targetCSS){B.css(A.targetCSS)}B.cssPos({margin:"0",left:"0",top:"0"}).query().id("",true);D=E._setProxy(B,F);break;case"shape":I.width=null!==A.targetWidth?A.targetWidth:C.offsetWidth();I.height=null!==A.targetHeight?A.targetHeight:C.offsetHeight();I.width-=2;I.height-=2;D=E._setProxy(linb.create("div").css({border:"dashed 1px",fontSize:"0",lineHeight:"0"}).cssSize(I),F);break;case"blank":D=E._setProxy(null,F);break;case"icon":F.left=_.isNumb(A.targetLeft)?A.targetLeft:(G.left-linb.win.scrollLeft()+16);F.top=_.isNumb(A.targetTop)?A.targetTop:(G.top-linb.win.scrollTop()+16);H='<table border="0"><tr><td valign="top"><span style="background:url('+A.dragIcon+") no-repeat left top;width:"+(_.isNumb(A.targetWidth)?A.targetWidth:16)+"px;height:"+(_.isNumb(A.targetHeight)?A.targetHeight:16)+'px;" ></span></td><td id="linb:dd:shadow" '+(A.shadowFrom?'style="border:solid 1px #e5e5e5;"':"")+">"+(A.shadowFrom?linb(A.shadowFrom).clone(true).cssPos({left:"auto",top:"auto",padding:0,margin:0}).outerHTML().replace(/\s*id\=[^\s\>]*/g,""):"")+"</td></tr></table>";D=E._setProxy(linb.create(H),F);break;case"move":E.$proxySize=0;D=C;if(D.css("position")!="absolute"){D.css("position","absolute").offset(F)}D.css("cursor",A.dragCursor)}return D},_unpack:function(){var D=this,C=D._profile,A,B;if(C.targetReposition&&("move"!=C.dragType)){if((A=linb(D._source))){if(!A.isEmpty()){if(A.css("position")!="absolute"){A.css("position","absolute").cssPos(A.offset(null,A.get(0).offsetParent))}if(linb.browser.ie){A.cssRegion({right:"auto",bottom:"auto"})}A.offset(C.curPos,C.targetOffsetParent||document.body)}}}if("move"==C.dragType){D._source.css("cursor",D._cursor)}},_unRegister:function(D,A){var C=linb(D),B=this._eh;C.$removeEvent("beforeMouseover",B).$removeEvent("beforeMouseout",B).$removeEvent("beforeMousemove",B);C.each(function(E){var F=linb.cache.dom[E.id];if(F=F.nodeVars){delete F._dropKeys}E._dropKeys=null})},_register:function(D,A){var C=linb(D),B=this._eh;C.beforeMouseover(function(){var F=linb.DragDrop,G=F._profile,E=this;if(G.dragKey&&E._dropKeys[G.dragKey]){F.setDropElement(E);F._onDragover=null;linb([E]).onDragenter(true);if(F._dropElement){_.resetRun("setDropFace",F.setDropFace,0,[E],F)}}},B);C.beforeMouseout(function(){var F=linb.DragDrop,G=F._profile,E=this;if(G.dragKey&&E._dropKeys[G.dragKey]){linb([E]).onDragleave(true);F.setDropElement(F._onDragover=null);_.resetRun("setDropFace",F.setDropFace,0,[null],F)}},B).beforeMousemove(function(E,J){var G=linb.DragDrop,H=G._onDragover,I=G._profile,F=this;if(H==1){return }if(G._dropElement==F&&I.dragKey&&F._dropKeys[I.dragKey]){if(H){H(J)}else{G._onDragover=1;linb([F]).onDragover(true,linb.Event.getEventPara(J))}}},B);C.each(function(E){(E._dropKeys||(E._dropKeys={}))[A]=true;var F=linb.cache.dom[E.id].nodeVars._dropKeys=1});return this}},After:function(){this._reset();_.each({startDrag:function(D,B,A,C){linb.DragDrop.startDrag(D,this.get(0),B,A||"",C||null);return this},dragable:function(B,E,D,F){var C=this,A=linb.DragDrop;if(B===undefined){B=true}else{if(typeof B=="object"){E=B;B=true}}if(!!B){C.$addEvent("onMousedown",function(H,G){if(linb.Event.getSrc(G)!=this){return true}linb([this]).startDrag(G,E,D,F)},A._eh,-1)}else{C.$removeEvent("onMousedown",A._eh)}return C},dropable:function(A,B){if(A===undefined){A=true}B=B||"default";var C=linb.DragDrop;return this.each(function(D){if(!!A){C._register(D,B)}else{C._unRegister(D,B)}})}},function(B,A){linb.Dom.plugIn(A,B)})}});Class("linb.Tips",null,{Constructor:function(){return null},Initialize:function(){var B=linb.DragDrop,A=this;if(B){B.$reset=function(){A._pos={left:B._profile.x,top:B._profile.y}}}linb.CSS.addStyleSheet(".linb-tips{font-size:0;line-height:0;position:absolute;overflow:visible;} .linb-tips-i{font-size:12px;overflow:hidden;}.linb-tips-i span{display:inline;}",this.KEY);linb.doc.afterMousedown(function(){A._cancel()},"$Tips",-1).afterMousemove(function(F,E,G){if(B.isWorking){return }var C=linb.Event,D,H;if((D=_.resetRun.$cache)&&D["$Tips3"]){A._pos=C.getPos(E)}if(A._from){_.resetRun("$Tips3",null);A._showF()}else{if(A._showed&&A.MOVABLE){D=C.getPos(E);H=A._Node.style;H.left=(parseInt(H.left)||0)+(D.left-A._pos.left)+"px";H.top=(parseInt(H.top)||0)+(D.top-A._pos.top)+"px";A._pos=D}}},"$Tips",-1).afterMouseover(function(I,M,C){var D=linb.Event,G=D.$FALSE,F=D.getSrc(M),E,L=M.fromElement||M.relatedTarget,K,N,H,J=0,O;if(!F){return G}try{while((!F.id||F.id==linb.$langId)&&F.parentNode!==document&&J++<10){F=F.parentNode}if(!(E=F.id)){return G}}catch(M){}if((K=D._getProfile(E))&&K.box&&K.KEY=="linb.UIProfile"){N=K.onShowTips?E:E.replace(A._reg,":");if(A._markId&&N==A._markId){return G}A._markId=N;A._pos=D.getPos(M);if(A._showed){A._from=K;A._enode=F;A._showF()}else{_.resetRun("$Tips",function(){A._from=K;A._enode=F;_.resetRun("$Tips3",function(){if(A._from){A._showF()}},100)},A.DELAYTIME)}}else{A._cancel()}return G},"$Tips",-1).afterMouseout(function(G,L,C){if(A._markId){var D=linb.Event,E,M,H,K=A._from,I,J=0,F=L.toElement||L.relatedTarget;if(!F){I=1}else{try{while((!F.id||F.id==linb.$langId)&&F.parentNode!==document&&J++<10){F=F.parentNode}if(!(E=F.id)){I=1}}catch(L){I=1}}if(I){A._cancel()}else{M=(K&&K.onShowTips)?E:E.replace(A._reg,":")}return D.$FALSE}},"$Tips",-1);this._Types={"default":new function(){this._r=/(\$)([\w\.]+)/g;this.show=function(N,J,M){if(!J){return }var O=this,E,D,P,L,H;if(!(E=O.node)){E=O.node=linb.create('<div class="linb-tips"><div class="linb-tips-i"></div></div>');D=O._ruler=linb.create('<div class="linb-tips" style="position:absolute;visibility:hidden;left:-10000px;"><div class="linb-tips-i" style="position:relative;"></div></div>');O.n=E.first();O._n=D.first();if(typeof E.addShadow=="function"){E.addShadow();D.addShadow()}linb("body").append(D)}D=O._ruler;if(document.body.lastChild!=E.get(0)){linb("body").append(E)}P=typeof N=="object"?N[M||linb.Tips.TIPSKEY]:N;if(typeof P=="function"){P=P()}if(P+=""){var G=/^\s*\</.test(P);P=P.replace(O._r,function(R,Q,S){return linb.getRes(S)});linb.Tips._curTips=P;if(!N.transTips||!G){P='<div style="border:solid gray 1px;background-color:#FFF8DC;padding:1px 2px 2px 2px;">'+P+"</div>"}O._n.get(0).innerHTML=P;L=D.get(0).offsetWidth;if(!G){L=Math.min(A.MAXWIDTH,L)}var C=E.get(0).style,I=O.n.get(0),F,K=I.style;C.visibility="hidden";I.innerHTML=P;if(linb.browser.ie){C.width=K.width=L+(L%2)+"px";H=I.offsetHeight;C.height=H-(H%2)+"px"}else{K.width=L+"px"}E.popToTop({left:J.left,top:J.top,region:{left:J.left,top:J.top-12,width:24,height:32}},1)}else{E.css("zIndex",0).hide()}};this.hide=function(){this.node.css("zIndex",0).hide()}}}},Static:{_reg:/-[\w]+:/,TIPSKEY:"tips",MAXWIDTH:300,MOVABLE:true,DELAYTIME:200,AUTOHIDETIME:5000,_showF:function(){var B=this,E=B._from,D=B._enode,H=B._pos,G,F,C,A=false;B._from=B._enode=null;if(!D||!E||!H||!(F=E.box)){return }B._pos=H;A=((C=E.CF)&&(C=C.showTips)&&C(E,D,H));if(!A){A=(F._showTips&&F._showTips(E,D,H))}if(!A&&((C=E)&&C.tips)||(C&&(C=C.properties)&&(C.tips))){B.show(H,C);A=true}if(!A){B.hide()}else{if(!B.MOVABLE){_.resetRun("$Tips2",B.hide,B.AUTOHIDETIME,null,B)}}},getTips:function(){return this._curTips},show:function(E,D,C){var A=this,B;A._pos=E;if(A._item===D){return }if(typeof D=="string"||(D&&(D[C||linb.Tips.TIPSKEY]))){B=A._tpl=A._Types[D.tipsTemplate]||A._Types["default"];B.show(D,E,C);A._Node=B.node.get(0);A._item=D;A._showed=true}else{A._cancel()}},hide:function(){var A=this;if(A._showed){if(A._tpl){A._tpl.hide()}A._clear()}},_cancel:function(){var A=this;if(A._markId){if(A._showed){A.hide()}else{_.resetRun("$Tips",null);_.resetRun("$Tips3",null);A._clear()}}},_clear:function(){var A=this;A._curTips=A._markId=A._from=A._tpl=A._item=A._showed=null}}});Class("linb.History",null,{Static:{_fid:"linb:history",setCallback:function(F){var B=this;B._callback=F;var D=location.hash;if(F){B._lastFI=D;if(linb.browser.ie){if(B._lastFI==""){B._lastFI="#"}var E=document.createElement("div");E.style.display="none";document.body.appendChild(E);E.innerHTML='<iframe id="'+this._fid+'" style="display: none;"></iframe>';var A=document.getElementById(this._fid),C=A.contentWindow.document;C.open();C.close();C.location.hash=D}else{if(linb.browser.kde){B.backStack=[];B.backStack.length=history.length;B.forwardStack=[]}}B._callback(D.replace(/^#/,""));clearInterval(B._itimer);B._itimer=setInterval(B._timer,100)}else{clearInterval(B._itimer)}return B},_timer:function(){var H=linb.History;if(typeof H._callback!="function"){clearInterval(H._itimer);return }if(linb.browser.ie){var F=document.getElementById(H._fid),B=F.contentWindow.document;C=B.location.hash;if(C!=H._lastFI){H._lastFI=location.hash=C;H._callback(C.replace(/^#/,""))}}else{if(linb.browser.kde){if(!H.dontCheck){var I=H.backStack,A=H.forwardStack,G=history.length-I.length;if(G){if(G<0){for(var D=0;D<Math.abs(G);D++){A.unshift(I.pop())}}else{for(var D=0;D<G;D++){I.push(A.shift())}}var E=I[I.length-1];if(E!==undefined){H._lastFI=location.hash;H._callback(E)}else{}}else{if(I[I.length-1]===undefined){if(H._lastFI!=location.hash){H._lastFI=location.hash;H._callback(location.hash)}}}}}else{var C=location.hash;if(C!=H._lastFI){H._lastFI=C;H._callback(C.replace(/^#/,""))}}}},getFI:function(){return this._lastFI},setFI:function(F,E){var B=this;if(!B._callback){return }if(F){F=(""+F).replace(/^#+/,"")}if(B._lastFI=="#"+F){return false}if(linb.browser.ie){var A=document.getElementById(B._fid),D=A.contentWindow.document;D.open();D.close();D.location.hash=location.hash=B._lastFI="#"+F}else{if(linb.browser.kde){B.dontCheck=true;B.backStack.push(F);B.forwardStack.length=0;var C=B;_.asyRun(function(){C.dontCheck=false;C=null},300);location.hash=B._lastFI=F}else{location.hash=B._lastFI="#"+F}}if(E!==false){_.tryF(B._callback,[F])}}}});Class("linb.ComFactory",null,{Static:{_pro:{},_cache:{},_domId:"linb:ComFactory:",getProfile:function(A){return A?this._pro[A]:this._pro},setProfile:function(A,B){if(typeof A=="string"){this._pro[A]=B}else{this._pro=A}return this},destroyAll:function(){_.each(this._cache,function(A){_.tryF(A.destroy,[],A)});this._cache={}},broadcast:function(A){if(typeof A=="function"){var B,C=this._cache;for(B in C){A.call(C[B],B)}}},setCom:function(B,A){this._cache[B]=A;if(A){A.comRefId=B}return this},getComFromCache:function(A){return this._cache[A]||null},getCom:function(B,A,G,H){H=H!==false;var K=this._cache,C=this._pro,P=C._iniMethod;if(H&&K[B]){_.tryF(A,[G,K[B]],K[B]);return K[B]}else{if(!(C=C[B])){return null}var O=arguments.callee,J=this,E=C.children;var L=C.iniMethod||P||"create",F=C.cls||C,I=C.properties,N=C.events,H=C.singleton!==false,M,D=function(Q,S,T){var U=new Q();if(S){_.merge(U.properties,S,"all")}if(N){_.merge(U.events,event,"all")}if(H){linb.ComFactory.setCom(B,U)}var R=[function(X){var V=X.getUIComponents().get(),W=function(Y,Z){var c=arguments.callee;_.arr.each(Y,function(f,g){if(f.key=="linb.UI.Tag"){var d=f,h=d.properties.tagKey;if(h&&E&&E[h]){O.apply(J,[E[h],function(){X[h]=this;this.parent=X;var j=this.getUIComponents(),i;if(!(i=j.get(0))){return }linb.UI.Tag.replace(d,i,Z?X:null)},T])}}if(f.children){var e=[];_.arr.each(f.children,function(i){e[e.length]=i[0]});c(e)}})};W(V,1)}];R.push(T||null);if(A){linb.Thread(T).insert({task:A,args:[T,U],scope:U})}_.tryF(U[L],R,U)};linb.Thread.observableRun(function(R){var Q=function(U,S,V){var T;if(T=linb.SC.get(F)){linb.Thread(V).insert({task:D,args:[T,I,V]})}};linb.SC(F,function(S){if(S){Q(0,0,R)}else{throw new Error(F+" doesnt exists!")}},true,R)},null,G)}},newCom:function(A,B,C){var D=linb.SC.get(A);D=typeof D=="function"?new D():null;if(D){_.tryF(B,[C,D],D)}else{linb.Thread.observableRun(function(E){linb.SC(A,function(G,F){if(G){var H=linb.SC.get(A);H=typeof H=="function"?new H():null;_.tryF(B,[E,H],H)}else{throw new Error(A+" doesnt exists!")}},true,E)},null,C)}},storeCom:function(E){var A,B,D=this._cache,C=this._domId;if(B=D[E]){if(!(A=linb.Dom.byId(C))){linb("body").prepend(linb.create('<div id="'+C+'" style="display:none;"></div>'))}A=linb(C);B=B.getUIComponents();if(!B.isEmpty()){B.get(0).unlinkParent();A.append(B)}}},prepareWidgets:function(){var B=this,A=function(D){var C=false;_.each(linb.UI,function(F){if(F.$linb$&&F["linb.UI"]&&F.$Appearances["default"]){var E=linb.getPath(F.KEY,"/default/css.css","appearance");if(!linb.UI.$cache_csspath[E]){F=(new F).get(0);F.toString();F.destroy();C=true;return false}}});if(!C){linb.Thread(D).abort()}};linb.Thread(null,[A],100,null,null,null,true).start();return this},prepareComs:function(A){var C=this,B=[];_.arr.each(A,function(D){B.push(function(){C.getCom(D)})});linb.Thread(null,B,500).start();return this}}});Class("linb.Debugger",null,{Static:{$time:_(),_id1:"linb:dbg::_frm",_id4:"linb:dbg::_head",_id2:"linb:dbg::_con",_id3:"linb:dbg::_inp",err:function(A,C,B){if(linb.browser.gek&&A=="Error loading script"){return true}linb.Debugger.log("*** An error raised ***"," >> Location: "+C+" ( line "+B+" )"," >> Message: "+A)},trace:function(G){var D=arguments,C=D[1]||arguments.callee.caller,A=D[2]||[];if(C){A.push('function "'+(C.$name$||"")+'" in Class "'+(C.$original$||"")+'"');if(C.caller){try{arguments.callee(null,C.caller,A,1)}catch(F){}}}if(!D[3]){var B=[];B.push(" >> Object Info:");if(typeof G=="object"){for(var E in G){B.push(" -- "+E+" : "+G[E])}}else{B.push(G)}B.push(" >> Function Trace: "+A.join(" <= "));linb.Debugger.log.apply(linb.Debugger,B)}},log:function(){var t1,t2,time,self=this,arr=arguments,str;if(!arr.length){return }t1=document.createElement("div");t2=document.createElement("div");t2.className="linb-dbg-con1";time=_();t2.appendChild(document.createTextNode("Time stamp : "+time+"("+(time-self.$time)+")"));self.$time=time;t1.appendChild(t2);for(var i=0,l=arr.length;i<l;i++){str=arr[i];t2=document.createElement("div");t2.className="linb-dbg-con2";t2.appendChild(document.createTextNode(" "+_.serialize(_.isArguments(str)?_.toArr(str):str)));t1.appendChild(t2)}if(!linb.Dom.byId(self._id2)){var ns=linb.create("<div id="+self._id1+' style="left:5px;top:'+(linb.win.scrollTop()+5)+'px;" class="linb-dbg-frm"><div class="linb-dbg-box"><div id='+self._id4+' class="linb-dbg-header">&nbsp;&nbsp;:&nbsp;)&nbsp;&nbsp;jsLINB Debug Window <span class="linb-dbg-cmds"><a href="javascript:;" onclick="linb(\''+self._id2+'\').empty(false);">Clear</a><a href="javascript:;" onclick="linb(\''+self._id1+"').remove();\"> &Chi; </a></span></div><div id="+self._id2+' class="linb-dbg-content"></div><div class="linb-dbg-tail"><table><tr><td style="font-family:serif;">&nbsp;>>>&nbsp;</td><td style="width:100%"><input id='+self._id3+" /></td></tr></table></div></div></div>");linb("body").append(ns);self.$con=linb(self._id2);linb(self._id4).onMousedown(function(p,e){if(linb.Event.getSrc(e)!=this){return }linb(this).parent(2).startDrag(e)});if(linb.browser.ie6){ns.height(ns.offsetHeight())}if(ns.addShadow){ns.addShadow()}var bak="",temp;linb(self._id3).onKeydown(function(p,e,s){var k=linb.Event.getKey(e)[0];if(k=="enter"){switch(s.value){case"?":case"help":self.$con.append(linb.create("<div class='linb-dbg-con3'><p><strong>vailable commands:</strong></p><ul><li> -- <strong>[clr]</strong> or <strong>[clear]</strong> : clears the message</li><li> -- <strong>[?]</strong> or <strong>[help]</strong> : shows this message</li><li> -- <strong>any other</strong>: shows its string representation</li></ul></div>"));break;case"clr":case"clear":linb(self._id2).empty();break;default:try{temp=s.value;if(/^\s*\x7b/.test(temp)){temp="("+temp+")"}self.log(eval(temp))}catch(e){self.$con.append(linb.create("<div  class='linb-dbg-con4'>"+String(e)+"</div>"));return }}bak=s.value;s.value=""}else{if(k=="up"||k=="down"){var a=s.value;s.value=bak||"";bak=a}}})}self.$con.append(t1).scrollTop(self.$con.scrollHeight())}},Initialize:function(){linb.CSS.addStyleSheet(".linb-dbg-frm{position:absolute;width:300px;z-index:2000;}.linb-dbg-header{cursor:move;height:18px;padding-top:2px;position:relative;border-bottom:solid 1px #CCC;background-color:#FFAB3F;font-weight:bold;}.linb-dbg-cmds{position:absolute;right:2px;top:2px;}.linb-dbg-cmds a{margin:2px;}.linb-dbg-box{position:relative;overflow:hidden;border:solid 1px #AAA;}.linb-dbg-content{position:relative;width:100%;overflow:auto;height:300px;background:#fff;}.linb-dbg-con1{background-color:#CCC}.linb-dbg-con2{padding-left:6px;border-bottom:dashed 1px #CCC}.linb-dbg-con3{padding-left:6px;border-bottom:dashed 1px #CCC;background:#EEE;color:#0000ff;}.linb-dbg-con4{padding-left:6px;border-bottom:dashed 1px #CCC;background:#EEE;color:#ff0000;}.linb-dbg-tail{overflow:hidden;position:relative;border-top:solid 1px #CCC;height:16px;background:#fff;color:#0000ff;}.linb-dbg-tail input{width:100%;border:0;background:transparent;}",this.KEY);linb.log=function(){if(linb.browser.gek&&window.console){console.log.apply(console,arguments)}linb.Debugger.log.apply(linb.Debugger,arguments)};linb.message=function(G,I,B,D){B=B||200;if(linb.browser.ie){B=B+(B%2)}var A,F,H=arguments.callee,J=H.stack||(H.stack=[]),M=linb.win,C=M.scrollLeft()+M.width()/2-B/2,K=M.height(),L=M.scrollTop();if(!(A=J.pop())){A='<div class="uibg-bar uiborder-outset" style="font-size:0;line-height:0;border:solid 1px #cdcdcd;position:absolute;overflow:visible;top:-50px;z-index:'+linb.Dom.TOP_ZINDEX+'"><div style="font-size:14px;overflow:hidden;font-weight:bold;padding:2px;"></div><div style="padding:5px;overflow:hidden;"></div></div>';A=linb.create(A);if(A.addBorder){A.addBorder()}linb("body").append(A)}A.css({left:C+"px",width:B+"px",visibility:"visible"}).first().html(I||"").next().html(G||"");if(H.last&&A!=H.last){var E=H.last.left();H.last.animate({left:[E,E+(H.last.width+B)/2+20]},null,null,100,5).start()}H.last=A;H.last.width=B;F=A.height();if(linb.browser.ie6){A.cssSize({height:F,width:B+2})}A.animate({top:[L-F-20,L+20]},null,null,100,5,"expoOut").start();_.asyRun(function(){A.animate({top:[L+20,K+20]},null,function(){J.push(A);A.hide()},100,10).start()},D||5000)}}});Class("linb.Profile","linb.absProfile",{Constructor:function(H,F,E,G,D,C,B){arguments.callee.upper.apply(this,arguments);var A=this;_.merge(A,B);A.key=F||A.key||"";A.alias=E||A.alias||"",A.properties=D||A.properties||{};A.events=C||A.events||{};A.host=H||A.host||A;A.box=G||A.box||A.constructor;if(A.events){A.setEvents(A.events);delete A.events}A._links={}},Instance:{setEvents:function(B){var A=this.box.$EventHandlers;return _.merge(this,B,"all",function(D,C){return A[C]})},getEvents:function(){var A=this,B,C={};_.each(A.box.$EventHandlers,function(E,D){if(A[D]){C[D]=A[D]}});return C},_applySetAction:function(A,B){return A.call(this,B)},__gc:function(){this.unLinkAll();_.tryF(this.clearCache,[],this);var A=_.get(this,["box","_namePool"]);if(A){delete A[self.alias]}_.breakO(this)},boxing:function(){var A=this,B;if(!((B=A.object)&&B._nodes[0]==A&&B._nodes.length==1)){B=A.object=A.box.pack([A],false)}return B},serialize:function(G,J){var H,I=this,D=(H=I.box._beforeSerialized)?H(I):I,A={alias:D.alias,key:D.key,host:D.host};if(A.host===I){delete A.host}else{if(D.host&&!J){if(G!==false){A.host="@this"}else{delete A.host}}}var F={},C=D.box.$DataStruct,B=linb.absObj.$specialChars;_.merge(F,D.properties,function(L,K){return(K in C)&&C[K]!==L&&!B[K.charAt(0)]});if(!_.isEmpty(F)){A.properties=F}if(!_.isEmpty(H=this.getEvents())){A.events=H}var E=D.box.$EventHandlers;_.filter(A.events,function(L,K){return L!=E[K]});if(_.isEmpty(A.events)){delete A.events}return G===false?A:_.serialize(A)}}});Class("linb.absObj","linb.absBox",{Constructor:function(){arguments.callee.upper.apply(this,arguments);if(arguments[0]!==false&&typeof this._ini=="function"){return this._ini.apply(this,arguments)}},Before:function(B,A,C){linb.absBox.$type[B]=B;return true},After:function(){var M=this,G=arguments.callee,K,L,D,J,B,F,E,C,I,A,H;M._nameId=0;M._namePool={};M._nameTag=(L=M.KEY.split("."))[L.length-1].toLowerCase();M._cache=[];if(M===linb.absObj||M===linb.absObj){return }B=G.a1||(G.a1=_.toArr("$Keys,$DataStruct,$EventHandlers,$DataModel"));for(E=0;I=B[E++];){D={};if((L=M.$parent)&&(F=L.length)){while(F--){_.merge(D,L[F][I])}}M[I]=D}M.setDataModel(M.DataModel);delete M.DataModel;M.setEventHandlers(M.EventHandlers);delete M.EventHandlers;B=G.a5||(G.a5=_.toArr("RenderTrigger,LayoutTrigger"));for(E=0;I=B[E++];){K=[];if((L=M.$parent)&&(C=L.length)){for(F=0;F<C;F++){J=L[F];if(J=J["$"+I]){K.push.apply(K,J)}}}if(M[I]){K.push(M[I])}M["$"+I]=K;delete M[I]}},Static:{$abstract:true,$specialChars:{_:1,$:1},getAll:function(){return this.pack(this._cache)},pickAlias:function(){var B,C=this._namePool,A=this._nameTag;while(C[B=(A+(++this._nameId))]){}return B},setDataModel:function(H){var M=this,K=linb.absObj.$specialChars,E=M.$DataStruct,J=M.$DataModel,B=M.prototype,I,G,L,C,D,F,A;for(I in H){if(!J[I]){J[I]={}}C=H[I];if(null===C||undefined===C){A=_.str.initial(I);delete E[I];delete J[I];delete B["get"+A];delete B["set"+A]}else{L=typeof C;if(L!="object"||C.constructor!=Object){C={ini:C}}E[I]=("ini" in C)?C.ini:(I in E)?E[I]:"";L=J[I];for(G in L){if(!(G in C)){C[G]=L[G]}}J[I]=C}}_.each(H,function(O,N){if(null===O||undefined===O||K[N.charAt(0)]){return }A=_.str.initial(N);D="set"+A;if(!(O&&(O.readonly||O.inner))){L=O.set;F=B[D];B[D]=typeof L=="function"?Class._fun(L,D,M.KEY):typeof F=="function"?F:Class._fun(function(Q,P){return this.each(function(S){if(!S.properties){return }if(S.properties[N]===Q&&!P){return }var T=S.properties[N],R=_.get(S.box.$DataModel,[N,"action"]);S.properties[N]=Q;if(typeof R=="function"&&S._applySetAction(R,Q,T)===false){S.properties[N]=T}})},D,M.KEY);delete O.set;if(B[D]!==F){B[D].$auto$=1}}else{delete B[D]}D="get"+A;if(!(O&&O.inner)){L=O.get;F=B[D];B[D]=typeof L=="function"?Class._fun(L,D,M.KEY):typeof F=="function"?F:Class._fun(function(){return this.get(0).properties[N]},D,M.KEY);delete O.get;if(B[D]!==F){B[D].$auto$=1}}else{delete B[D]}});return M},setEventHandlers:function(B){var A=this;_.each(B,function(E,C){if(null===E){delete A.$EventHandlers[C];delete A.prototype[C]}else{A.$EventHandlers[C]=E;var D=function(G){var F=arguments.length;if(F==1&&(typeof G=="function"||typeof G=="string")){return this.each(function(M){if(M.domNode){M.clearCache()}M[C]=G})}else{if(F==1&&null===G){return this.each(function(M){M.clearCache();delete M[C]})}else{var K=[],I=this.get(0),L=I[C],H=I.host||I,J;if(I.$ignore){return }if(arguments[0]!=I){K[0]=I}for(J=0;J<F;J++){K[K.length]=arguments[J]}I.$lastEvent=C;if(typeof L=="string"){L=H[L]}if(typeof L=="function"){return _.tryF(L,K,H)}}}};D.$event$=1;D.$original$=E.$original$||A.KEY;A.plugIn(C,D)}});return A}},Instance:{alias:function(E){var B=this,D=this.get(0),A;if(E){if(A=D.alias){if(D.host){try{delete D.host[A]}catch(C){D.host[A]=undefined}}delete B.constructor._namePool[A]}B.constructor._namePool[D.alias=E]=1;if(D.host){D.host[E]=B}return B}else{return D.alias}},host:function(C,B){var A=this;if(C){A.get(0).host=C;if(B){A.alias(B);C[B]=A}return A}else{return A.get(0).host}}}});Class("linb.DataBinder","linb.absObj",{Instance:{_ini:function(C,G,F){var H=this,D=H.constructor,A,I,E=D._namePool,B;if(C&&C["linb.Profile"]){A=C;B=A.alias||D.pickAlias()}else{if(C&&C.key&&linb.absBox.$type[C.key]){I=C;C=null;B=I.alias;B=(B&&!E[B])?B:D.pickAlias()}else{B=D.pickAlias()}A=new linb.Profile(F,H.$key,B,D,C,G,I)}E[B]=1;A._n=A._n||[];A.link(D._cache,"self").link(linb._pool,"linb");H._nodes.push(A);return H},destroy:function(){this.each(function(B){var C=B.box,A=B.properties.name;_.arr.each(B._n,function(D){C._unBind(A,D)});delete C._pool[A];B.__gc()})},resetValue:function(A){return this.each(function(C,B){_.arr.each(C._n,function(D){var E=D.properties;D.boxing().resetValue((A&&E.dataField in A)?A[E.dataField]:"")})})},getUI:function(){return linb.UI.pack(this.get(0)._n,false)},checkValid:function(){return linb.absValue.pack(this.get(0)._n,false).checkValid()},getValue:function(){var B=this.get(0);if(this.checkValid()){var A={};_.arr.each(B._n,function(E){var F=E.properties,C=E.boxing(),D;if(E.domNode){C.updateValue()}D=C.getValue();A[F.dataField]=D});return A}else{return null}},host:function(C,B){var A=this;if(C&&B){A.setName(B)}return arguments.callee.upper.apply(A,arguments)}},Static:{_pool:{},destroyAll:function(){this.pack(this._pool,false).destroy();this._pool={}},getFromName:function(A){var B=this._pool[A];return B&&B.boxing()},_bind:function(A,C){var B=this._pool[A];if(!B){B=new linb.DataBinder();B.setName(A);B=B.get(0)}if(C&&_.arr.indexOf(B._n,C)==-1){C.link(B._n,"databinder."+A)}},_unBind:function(A,B){if(this._pool[A]){B.unLink("databinder."+A)}},DataModel:{name:{set:function(D){var E=this.get(0),C=E.properties.name;if(C!==D){var G=linb.DataBinder,A=G._pool,F=A[C],B=A[D];if(F&&B){throw new Error(D+" exists!")}A[E.properties.name=D]=E;if(F&&!B){linb.absValue.pack(E._n).setDataBinder(D);_.arr.each(E._n,function(H){G._unBind(C,H)})}if(B&&!F){E._n=B._n}if(F){delete A[C]}}return this}}}}});Class("linb.UIProfile","linb.Profile",{Instance:{rendered:false,_render:function(){var C=this,E,F=linb.Dom.byId(C.domId);if(!F){return }C.root=linb([C.domNode=F]);linb.cache.dom[C.domId]=linb.cache.dom[C.$domId]=C;if(E=C.RenderTrigger){for(var D=0,A=E.length;D<A;D++){E[D].call(C)}delete C.RenderTrigger;C.rendered=true;if(C.onRender){C.boxing().onRender(C)}}if(arguments[0]===true&&(E=C.LayoutTrigger)){for(var D=0,A=E.length;D<A;D++){E[D].call(C)}if(C.onLayout){C.boxing().onLayout(C)}}if(C.children){for(var D=0,B;B=C.children[D++];){B[0]._render(true)}}if(C.$attached){for(var D=0,B;B=C.$attached[D++];){if(B["linb.UIProfile"]){B._render(true)}}delete C.$attached}},__gc:function(){var A=this,C;if(A.onDestroy){A.boxing().onDestroy()}if(A.destroyTrigger){A.destroyTrigger()}if(!A.serialId){return }A.clearCache();if(C=A.$dockParent){if(C=A.constructor.getFromDom(C)){_.tryF(C.clearCache,[],C)}}if(A.nodeVars&&(C=A.domNode)){for(var B in A.nodeVars){C[B]=null}}if(!A.$exID){C=linb.cache.domId;(C[A.key]||(C[A.key]=[])).push(A.serialId)}else{delete A.$exID}delete linb.cache.dom[A.domId];delete linb.cache.dom[A.$domId];delete A.box._namePool[A.alias];A.unLinkAll();_.tryF(A.$ondestory);_.breakO(A)},unlinkParent:function(){var A=this;delete A.parent;delete A.childrenId;A.unLink("$parent");return A},getRootNode:function(){return this.domNode||(this.domNode=document.getElementById(this.domId))},getRoot:function(){return this.root||null},linkParent:function(A,C){var B=this;B.unlinkParent();B.parent=A;B.childrenId=C;B.link(A.children,"$parent",[B,C]);return B},_reg:/^\w[\w_-]*$/,setDomId:function(D){var A=this,C=linb.cache.dom,B=A._reg;if(typeof D=="string"&&(B.test(D)||D==A.$domId)&&!linb.Dom.byId(D)){if(A.domId!=A.$domId){delete C[A.domId]}A.domId=D;if(A.domNode){A.domNode.id=D}if(C[A.$domId]){C[D]=A}}return A},getDomId:function(){return this.domId},clearCache:function(){var E=this,B="$_egetter",A="$_domid",D=E[B];for(var C in D){D[C].length=0}D=E[A];for(var C in D){D[C]=null}E[B]=E[A]=null;return E},_getEV:function(H,C,B){var L=this,I=C+"+"+B,G=L.$_egetter||(L.$_egetter={}),A;if(G[I]){Array.prototype.push.apply(H,G[I]);return }else{A=G[I]=[]}var E=linb.cache.dom,K,J;if((K=E[C])&&(K=K.events)&&(K=K[B])){for(var F=0,D=K.length;F<D;F++){if(typeof K[K[F]]=="function"){A.push(H[H.length]=K[K[F]])}}}J=C.split(":")[0].split("-")[1];if(typeof (((K=L._CB)&&(J?(K=K[J]):1))&&(K=K[B]))=="function"){A.push(H[H.length]=K)}else{if(typeof (((K=L.CB)&&(J?(K=K[J]):1))&&(K=K[B]))=="function"){A.push(H[H.length]=K)}else{if(typeof (((K=L.behavior)&&(J?(K=K[J]):1))&&(K=K[B]))=="function"){A.push(H[H.length]=K)}}}},toHtml:function(){var O=this,L=arguments.callee,C=L._reg||(L._reg=/<!--([^>^\s]*)-->/g),J=O.box,G={},K,I="linb.UIProfile",H="linb.Profile",A,F,B,D,N,M,E;E=J._prepareData(O);if(J._dynamicTemplate){J._dynamicTemplate(O)}K=J._build(O,E);if(D=J._getChildren(O)){for(F=0;B=D[F++];){if(B[0][I]){A=B[1]||"";N=G[A]||(G[A]=[]);N[N.length]=B[0].toHtml()}else{if(!B[0][H]){M.ini.call(M,B[0]);B[0]=M.get(0)}}}}return K.replace(C,function(Q,P){return G[P]?G[P].join(""):""})},buildItems:function(C,B){var A=this,E=A.box,F,D=A.toHtml._reg;F=E._rpt(A,linb.UI.$doTemplate(A,_.get(linb.cache.template,[E.KEY,A._hash]),B,C));return F.replace(D,"")},serialize:function(H,K){var I,E,J=this,D=(I=J.box._beforeSerialized)?I(J):J,A={alias:D.alias,key:D.key,host:D.host};if(A.host===J){delete A.host}else{if(D.host&&!K){if(H!==false){A.host="@this"}else{delete A.host}}}if(D.$domId!=D.domId){A.domId=D.domId}var G={},C=D.box.$DataStruct,B=linb.absObj.$specialChars;_.merge(G,D.properties,function(M,L){return(L in C)&&C[L]!==M&&!B[L.charAt(0)]});if(!_.isEmpty(G)){A.properties=G}if(!_.isEmpty(I=this.getEvents())){A.events=I}var F=D.box.$EventHandlers;_.filter(A.events,function(M,L){return M!=F[L]});if(_.isEmpty(A.events)){delete A.events}if(!_.isEmpty(D.CS)){A.CS=_.copy(D.CS)}if(!_.isEmpty(D.CB)){A.CB=_.copy(D.CB)}if(!_.isEmpty(D.CC)){A.CC=_.copy(D.CC)}if(!_.isEmpty(D.CF)){A.CF=_.copy(D.CF)}if(D.children&&D.children.length){D.children.sort(function(L,M){L=parseInt(L[0].properties.tabindex);M=parseInt(M[0].properties.tabindex);return L>M?1:L==M?0:-1});I=A.children=[];_.arr.each(D.children,function(L){E=[L[0].serialize(false,K)];if(L[1]){E[1]=L[1]}I[I.length]=E})}return H===false?A:_.serialize(A)},_applySetAction:function(A,B,C){if(this.domNode){return A.call(this,B,C)}},getKey:function(B){var A;if(B.indexOf(":")==-1){B=(A=linb.cache.dom[B])&&(A.$domId)}return B?B.split(":")[0]:""},getSubId:function(B){var A;if(B.indexOf(":")==-1){B=(A=linb.cache.dom[B])&&(A.$domId)}return B?B.split(":")[2]:""},pickSubId:function(B){var A=this,C,D=A.cache_subid||(A.cache_subid={});if((D[B]||(D[B]=[]))[0]){return D[B].shift()}D=A.subId||(A.subId={});C=(D[B]||(D[B]=new _.id)).next();return C},reclaimSubId:function(C,A){var B=this.cache_subid||(this.cache_subid={});(B[A]||(B[A]=[])).push(C)},getClass:function(C,A){C=this.keys[C]||C;var B=this,E=arguments.callee,G=E._map||(E._map={}),D=E._reg||(E._reg=/\./g),F=C+":"+A;return G[F]||(G[F]=C.replace(D,"-").toLowerCase().replace("linb-ui","linb")+(A||""))},_getSubNodeId:function(C,B){var A=this.$domId.split(":");A[0]=C;A[2]=B||"";C=A.join(":");if(C==this.$domId){return linb.cache.dom[C].domId}else{return C}},getSubNode:function(D,B){var A=this;D=A.keys[D]||D;var G,C,F,E=A.$_domid||(A.$_domid={});if(B===true){G=linb([A.domNode]).query("*","id",D==A.keys.KEY?A.domId:new RegExp("^"+D+":"+A.serialId))}else{if(!B&&E[D]&&E[D]._nodes.length==1){return E[D]}G=(C=linb.Dom.byId(F=A._getSubNodeId(D,B)))?linb([C]):((C=A.domNode)&&linb([C]).query("*","id",F));if(!B){E[D]=G}}return G},getSubNodes:function(A,C){var D=0,B=[],E;for(;E=A[D++];){Array.prototype.push.apply(B,this.getSubNode(E,C).get())}return linb(B)},getSubNodeByItemId:function(A,B){return(B=this.getSubIdByItemId(B))?this.getSubNode(A,B):linb()},getItemByItemId:function(B){var A;if((A=this.ItemIdMapSubSerialId)&&(A=A[B])){return this.SubSerialIdMapItem[A]}},getItemByDom:function(A){return this.SubSerialIdMapItem&&this.SubSerialIdMapItem[this.getSubId(A.id||A)]},getItemIdByDom:function(B){var A;return(A=this.getItemByDom(B))&&A.id},getSubIdByItemId:function(B){var A;return(A=this.ItemIdMapSubSerialId)&&A[B]},queryItems:function(D,C,B,H,A){var F=[],E=arguments.callee,G=E.f||(E.f=function(K,J,I,M,L){_.arr.each(K,function(O,N){if(J===true||J.call(null,O,N,K)){L.push(A?[O,N,K]:O);if(M){return false}}if(I&&O.sub&&O.sub.length){G(O.sub,J,I,M,L)}})});G(D,C,B,H,F);return F}},Static:{getFromDom:function(A){if((A=typeof A=="string"?A:(A&&A.id))&&(A=linb.Event._getProfile(A))&&A["linb.UIProfile"]){return A}}}});Class("linb.UI","linb.absObj",{Before:function(B,A,C){linb.absBox.$type[B.replace("linb.UI.","").replace("linb.","")]=linb.absBox.$type[B]=B;return true},After:function(){linb.absObj.After.apply(this,arguments);var N=this,G=arguments.callee,L,M,A,K,F,C,B,D,I,J,H,E;N._ctrlId=new _.id();N._idCache=[];N.$cssKeys={};M=N.$Keys;M.KEY=M.$key=N.KEY;N.addTemplateKeys(_.toArr(M,true));J="$Behaviors";A={};if((M=N.$parent)&&(D=M.length)){while(D--){H=M[D][J];for(C in H){if(typeof H[C]=="object"){if(_.isArr(H[C])){K=A[C]||(A[C]=[]);K.push.apply(K,H[C])}else{K=A[C]||(A[C]={});_.merge(K,H[C])}}else{A[C]=H[C]}}}}N[J]=A;J="$Templates";A={};if((M=N.$parent)&&(D=M[0])){for(C in D[J]){if(C.charAt(0)!="$"){A[C]=D[J][C]}}}N[J]=_.clone(A);J="$Appearances";A={};if((M=N.$parent)&&(D=M.length)){while(D--){H=M[D];for(C in H[J]){M=H[J][C];K=A[C]||(A[C]={});_.merge(K,M)}}}N[J]=A;N.setTemplate(N.Templates);delete N.Templates;N.setBehavior(N.Behaviors);delete N.Behaviors;N.setAppearance(N.Appearances);delete N.Appearances;if(M=N.PublicAppearance){linb.UI.$cache_css+=N.buildCSSText(M);delete N.PublicAppearance}},Instance:{destroy:function(){this.each(function(A){if(A.beforeDestroy&&false===A.boxing().beforeDestroy()){return }if(A.root){A.root.remove()}else{A.__gc()}})},serialize:function(B,C){var A=[];this.each(function(D){A[A.length]=D.serialize(false,C)});return B===false?A:A.length==1?" new "+A[0].key+"("+_.serialize(A[0])+")":"linb.UI.unserialize("+_.serialize(A)+")"},_toDomElems:function(){this.render();var B,A=[];_.arr.each(this._nodes,function(C){if(B=C.domNode){A.push(B)}});return A},_ini:function(F,O,N,A,H,I,E){var P=this,G=P.constructor,B,M="default",Q,K=G._namePool,D,L;if(F&&F["linb.Profile"]){B=F;D=B.alias||G.pickAlias();linb.UIProfile.apply(B,[N,P.$key,D,G,null,O])}else{if(F&&F.key&&linb.absBox.$type[F.key]){Q=F;F=null;D=Q.alias;D=(D&&!K[D])?D:G.pickAlias()}else{D=G.pickAlias()}B=new linb.UIProfile(N,P.$key,D,G,F,O,Q)}K[D]=1;for(var C in (L=G.$DataStruct)){if(!(C in B.properties)){B.properties[C]=typeof L[C]=="object"?_.copy(L[C]):L[C]}}B.keys=G.$Keys;B.CS=A||B.CS||{};B.CB=I||B.CB||{};B.CC=H||B.CC||{};B.CF=E||B.CF||{};B.template=G.getTemplate();B.behavior=G.$Behaviors;if(!B.serialId){B.serialId=G._pickSerialId()}B.$domId=B.key+":"+B.serialId+":";B.domId=B.domId||B.$domId;B.RenderTrigger=_.copy(G.$RenderTrigger);B.LayoutTrigger=_.copy(G.$LayoutTrigger);B.nodeVars=B.behavior?B.behavior.$eventhandler:null;B.link(linb.UI._cache,"UI").link(G._cache,"self").link(linb._pool,"linb");L=B.children;B.children=[];if(L&&L.length){for(var C=0,J;J=L[C++];){if(!J[0]["linb.UIProfile"]){J[0]=new (linb.SC(J[0].key))(J[0]).get(0)}J[0].linkParent(B,J[1])}}P._nodes.push(B);return P},busy:function(C,B,A){C=typeof C=="string"?C:"Loading...";B=typeof B=="string"?B:'<span style="background:'+linb.UI.$bg("busy.gif","no-repeat left center")("linb.UI.Public")+';padding-left:16px;">'+C+"</span>";return this.each(function(D){_.resetRun(D.$id+":busy",function(){var H=D.keys;A=H[A]||H.BORDER||H.PANEL||H.KEY;var E=D.getSubNode(A),F=E.cssSize(),G;if(!(G=D.$busy)){G=D.$busy=linb.create('<div style="left:0;top:0;z-index:10;position:absolute;background-color:#DDD;"></div><div style="left:0;top:0;z-index:20;text-align:center;position:absolute;"><div>'+B+"</div></div>");linb([G.get(0)]).css({opacity:0.5});linb(E).append(G)}G.css({display:"",width:F.width+"px",height:F.height+"px"});linb([G.get(1).firstChild]).html(B,false).css("paddingTop",F.height/2+"px")},50)})},free:function(){return this.each(function(A){_.resetRun(A.$id+":busy");if(A.$busy){A.$busy.css("display","none")}})},reLayout:function(A,B){return this.each(function(E){if(!E.domNode){return }var D=E.properties;if((!E.$noB)&&D.border&&E.boxing()._border){E.boxing()._border(null,false)}if(D.dock&&D.dock!="none"){var C=E.domNode.style;C.width=C.height=0;linb.UI.$dock(E,true,true)}else{linb.UI.$tryResize(E,D.width,D.height,A,B)}})},toHtml:function(){var A=[];_.arr.each(this._nodes,function(B){A[A.length]=B.toHtml()});return A.join("")},render:function(C){var L=this,H=[],G,F,B,K,E,A,I,D=L._nodes,J=[],M=linb.Dom.byId;linb.UI.$applyCSS();for(G=0;B=D[G++];){if(!M(B.domId)){H[H.length]=B}}if(F=H.length){for(G=0;G<F;G++){J[J.length]=H[G].toHtml()}E=_.str.toDom(J.join(""));E=E.get();F=E.length;I=linb.Dom.getEmptyDiv().get(0);K=document.createDocumentFragment?document.createDocumentFragment():I;for(G=0;G<F;G++){K.appendChild(E[G])}if(K!=I){I.appendChild(K)}}for(G=0;B=D[G++];){B._render(C)}return L},renderOnto:function(E,D){E=linb(E);if(E.isEmpty()){return this}var B=this,F=B.get(0),C=arguments.callee,A=C.para||(C.para=function(H){var G=H.cssRegion();G.tabindex=H.attr("tabIndex");G.zIndex=H.css("zIndex");G.position=H.css("position");return G});_.merge(F.properties,A(E),"all");E.outerHTML(F.toHtml());F.boxing().host(D||window,E.get(0).id||F.alias);F._render(true);return B},setDomId:function(A){this.get(0).setDomId(A);return this},hide:function(){return this.each(function(A){if(A.domNode){A.root.hide();A.properties.top=A.properties.left=-10000;A.properties.dockIgnore=true}})},show:function(B,A,D,C){return this.each(function(H){var F=H.properties,E;D=(D||D===0)?(parseInt(D)||0):null;C=(C||C===0)?(parseInt(C)||0):null;if(D!==null){F.left=D}if(C!==null){F.top=C}if(H.domNode&&H.domNode._linbhide){E=1;F.dockIgnore=false;H.root.show(D&&(D+"px"),C&&(C+"px"));if(F.dock&&F.dock!="none"){linb.UI.$dock(H,false,true)}}else{if(!B&&(!H.domNode||(H.domNode.id||"").indexOf(linb.Dom._matrixid)===0)){B=linb("body")}}var G=B,I;if(G){if(G["linb.UIProfile"]){I=G.domNode;G=G.boxing()}else{if(G["linb.UI"]){I=(I=G._nodes[0])&&I.domNode}else{I=(G=linb(G))&&G._nodes[0]}}if(I){G.append(H.boxing(),A);if(!E){H.root.show(D&&(D+"px"),C&&(C+"px"))}}}})},clone:function(){var A=[],B=function(D){delete D.alias;delete D.domId;if(D.children){for(var C=0,E;E=D.children[C];C++){B(E)}}};this.each(function(C){C=C.serialize(false,true);B(C);A.push(C)});return this.constructor.unserialize(A)},refreshDom:function(){(function(A){var B=arguments.callee;_.arr.each(A,function(C){if(_.isArr(C)){C=C[0]}C.clearCache();if(C.children&&C.children.length){B(C.children)}})})(this._nodes);return this.each(function(C){if(C.domNode){var A=C.getRoot(),B=A.cssSize();A.outerHTML(C.toHtml());linb.UI.$tryResize(C,B.width,B.height,true,true)}})},refresh:function(){var I,F,A,H,G,C,E,D,B;return this.each(function(K){if(!K.domNode){return }D=K.box;G=K.$id;C=K.serialId;if(F=!!K.parent){A=K.parent.boxing();I=K.childrenId}else{A=K.root.parent()}var J=linb.create("span");K.root.replace(J,true);B=_.copy(K.children);K.children.length=0;_.arr.each(B,function(L){delete L[0].$dockParent;J.append(L[0].root)});H=K.serialize(false,true);E=K.$addOns;K.$exID=1;K.boxing().destroy();linb.Dom.__gc();_.merge(K,H,"all");K.$id=G;K.serialId=C;K=new D(K).render();if(E){E.call(E.target,K.get(0))}J.empty(false);J.replace(K.get(0).root);if(F){A.append(K,I)}else{A.append(K)}_.arr.each(B,function(L){K.append.apply(K,L)});J.remove()})},append:function(C,B){if(C["linb.UIProfile"]){C=C.boxing()}var D=this.get(0),A;if(B!==false){C.each(function(E){E.linkParent(D,B)})}if(D.domNode){if(B=typeof B=="string"?B:null){B=D.getSubIdByItemId(B)}A=D.keys.PANEL?D.getSubNode(D.keys.PANEL,B):D.root;if(!A.isEmpty()){A.append(C)}}return this},getChildren:function(B){var A=[];_.arr.each(this.get(0).children,function(C){if(B?C[1]==B:1){A.push(C[0])}});return linb.UI.pack(A)},removeChildren:function(A){return this.each(function(B){_.arr.each(B.children,function(C){if(A?C[1]==A:1){C[0].unlinkParent()}if(C[0].root){C[0].root.remove()}else{C[0].__gc()}})})},dragable:function(A,C,B){return this.each(function(D){D.getSubNode(D.keys[B]||"KEY",true).beforeMousedown(A?function(G,E,F){if(G.properties.disabled){return }linb([F]).startDrag(E,{dragKey:A,dragData:typeof C=="function"?C():C,dragCursor:"pointer",dragType:"icon",dragDefer:1})}:null,"_d",-1).beforeDragbegin(A?function(E,F,G){linb([G]).onMouseout(true,{$force:true}).onMouseup(true)}:null,"_d",-1);if(!A){D.clearCache()}})},setCustomFunction:function(A,B){return this.each(function(C){if(typeof A=="string"){if(B){C.CF[A]=B}else{delete C.CF[A]}}else{C.CF=A||{}}})},setCustomClass:function(B,D){var C=arguments.callee,A=(C.fun||(C.fun=function(J,G,H,F){if(!H[G]){return }var I=J.getSubNode(G,true),E;if(!I.isEmpty()){_.arr.each(H[G].split(/\s+/),function(K){I[F?"removeClass":"addClass"](K)})}}));return this.each(function(G){var E=_.copy(G.CC);if(typeof B=="string"){if(G.domNode){if(B in E){A(G,B,E,true)}}if(!D){delete G.CC[B]}else{G.CC[B]=D;if(G.domNode){A(G,B,G.CC)}}}else{if(!!B&&typeof B=="object"){if(G.domNode){for(var F in B){A(G,F,E,true)}for(var F in B){A(G,F,B)}}G.CC=B}else{if(G.domNode){for(var F in E){A(G,F,E,true)}}G.CC={}}}})},setCustomStyle:function(B,D){var C=arguments.callee,A=(C.fun||(C.fun=function(J,G,H,F){if(!H[G]){return }var I=J.getSubNode(G,true),E;if(!I.isEmpty()){_.arr.each(H[G].split(";"),function(M,K){if((E=M.split(":")).length==2){E[0]=E[0].replace(/\-(\w)/g,function(O,N){return N.toUpperCase()});try{I.css(E[0],F?"":E[1])}catch(L){}}})}}));return this.each(function(G){var E=_.copy(G.CS);if(typeof B=="string"){if(G.domNode){if(B in E){A(G,B,E,true)}}if(!D){delete G.CS[B]}else{G.CS[B]=D;if(G.domNode){A(G,B,G.CS)}}}else{if(!!B&&typeof B=="object"){if(G.domNode){for(var F in B){A(G,F,E,true)}for(var F in B){A(G,F,B)}}G.CS=B}else{if(G.domNode){for(var F in E){A(G,F,E,true)}}G.CS={}}}})},setCustomBehavior:function(A,B){return this.each(function(C){if(typeof A=="string"){if(C.keys[A]){C.CB[A]=B||{}}}else{C.CB=A||{}}if(C.CB.KEY){_.merge(C.CB,C.CB.KEY,"all");delete C.CB.KEY}C.clearCache()})}},Initialize:function(){var B=this.prototype;_.arr.each("getSubNode,getDomId,getRootNode,getRoot".split(","),function(D){if(!B[D]){B[D]=function(){var E=this.get(0);return E[D].apply(E,arguments)}}B[D].$original$="linb.UI"});var A=this,C={};_.each(linb.UI.$ps,function(D,E){C[E]={ini:"auto",action:function(I){var G=this,J=G.properties,F=false,H={$type:J.dock};switch(J.dock){case"top":if(E!="height"&&E!="top"){return }H.width=H.height=1;break;case"bottom":if(E!="height"&&E!="bottom"){return }H.width=H.height=1;break;case"left":if(E!="width"&&E!="left"){return }H.width=H.height=1;break;case"right":if(E!="width"&&E!="right"){return }H.width=H.height=1;break;case"width":if("width"==E){return }H.width=1;break;case"height":if("height"==E){return }H.height=1;break;case"fill":case"cover":if(E=="width"&&E=="height"){return }H.width=H.height=1;break}G.root[E]?G.root[E](I):linb.Dom._setPxStyle(G.domNode,E,I);if(J.dock!="none"){_.tryF(G.$dock,[G,H],G)}}}});_.merge(C,{renderer:{ini:null},zIndex:{ini:1,action:function(D){this.root.css("zIndex",D)}},tabindex:{ini:1,action:function(F){var E=this,D=new RegExp("^"+E.key+"[-\\w]*:"+E.serialId+":");E.root.query("*",function(G){return G.id&&D.test(G.id)&&G.getAttribute("tabIndex")}).attr("tabIndex",F)}},position:{ini:"absolute",listbox:["","static","relative","absolute"],action:function(D){this.root.css("position",D)}},visibility:{listbox:["","visible","hidden"],action:function(D){this.root.css("visibility",D)}},display:{listbox:["","none","block","inline","inline-block"],action:function(D){if(D=="inline-block"){this.root.setInlineBlock()}else{this.root.css("display",D)}}}});A.setDataModel(C);linb.UI.$cache_css+=linb.UI.buildCSSText({".ui-ctr":{},".ui-dragable":{},".ui-btn, .ui-btni, .ui-btnc":{height:"22px",background:linb.UI.$bg("button.gif","no-repeat",true)},".ui-btn":{$order:1,"white-space":"nowrap","vertical-align":"top",overflow:"hidden","background-position":"right top","padding-right":"4px","font-size":"12px"},".ui-btn *":{cursor:"pointer"},".ui-btnc button, .ui-btnc a":{display:linb.$inlineBlock,zoom:linb.browser.ie?1:null,background:"transparent",border:0,margin:0,padding:0},".ui-btnc a":{padding:"0 4px 1px 4px"},".ui-btni":{$order:1,"background-position":"left -60px","padding-left":"4px","vertical-align":"top"},".ui-btnc":{$order:1,"background-position":"left -30px","background-repeat":"repeat-x","padding-top":"3px","vertical-align":"top"},".ui-btn-mouseover, .ui-btn-focus":{$order:2,"background-position":"right -90px"},".ui-btn-mouseover .ui-btni, .ui-btn-focus .ui-btni":{$order:2,"background-position":"left -150px"},".ui-btn-mouseover .ui-btnc, .ui-btn-focus .ui-btnc":{$order:2,"background-position":"left -120px"},".ui-btn-mousedown, .ui-btn-checked":{$order:3,"background-position":"right -180px"},".ui-btn-mousedown .ui-btni, .ui-btn-checked .ui-btni":{$order:3,"background-position":"left -240px"},".ui-btn-mousedown .ui-btnc, .ui-btn-checked .ui-btnc":{$order:3,"background-position":"left -210px"},".ui-icon":{"vertical-align":"middle",width:"16px",height:"16px",margin:"0 4px 0 2px"},".uicmd-close, .uicmd-opt, .uicmd-land, .uicmd-toggle, .uicmd-toggle2, .uicmd-min, .uicmd-max,.uicmd-restore,.uicmd-pin, .uicmd-check, .uicmd-radio, .uicmd-add":{background:linb.UI.$bg("icons.gif","no-repeat 0 0",true),width:"16px",height:"16px","margin-right":"2px",cursor:"default","vertical-align":"middle"},".uicmd-empty":{width:"16px",height:"16px","margin-right":"2px",cursor:"default","vertical-align":"middle"},".uicmd-opt":{$order:1,"background-position":"0 0"},".uicmd-opt-mouseover":{$order:2,"background-position":"0 -20px"},".uicmd-opt-mousedown":{$order:3,"background-position":"0 -40px"},".uicmd-land":{$order:1,"background-position":"-40px 0"},".uicmd-land-mouseover":{$order:2,"background-position":"-40px -20px"},".uicmd-land-mousedown":{$order:3,"background-position":"-40px -40px"},".uicmd-pin":{$order:1,"background-position":"-80px 0"},".uicmd-pin-mouseover":{$order:2,"background-position":"-80px -20px"},".uicmd-pin-mousedown":{$order:3,"background-position":"-80px -40px"},".uicmd-pin-checked, .uicmd-pin-checked-mouseover, .uicmd-pin-checked-mousedown":{$order:4,"background-position":"-80px -40px"},".uicmd-min":{$order:1,"background-position":"-120px 0"},".uicmd-min-mouseover":{$order:2,"background-position":" -120px -20px"},".uicmd-min-mousedown":{$order:3,"background-position":"-120px -40px"},".uicmd-restore":{$order:1,"background-position":"-160px 0"},".uicmd-restore-mouseover":{$order:2,"background-position":"-160px -20px"},".uicmd-restore-mousedown":{$order:3,"background-position":"-160px -40px"},".uicmd-max":{$order:1,"background-position":"-200px 0"},".uicmd-max-mouseover":{$order:2,"background-position":"-200px -20px"},".uicmd-max-mousedown":{$order:3,"background-position":"-200px -40px"},".uicmd-close":{$order:1,"background-position":"-240px 0"},".uicmd-close-mouseover":{$order:2,"background-position":"-240px -20px"},".uicmd-close-mousedown":{$order:3,"background-position":"-240px -40px"},".uicmd-check":{$order:1,margin:"0 4px 0 2px","background-position":"-20px -70px"},".uicmd-check-mouseover":{$order:2,"background-position":"-20px -90px"},".uicmd-check-mousedown":{$order:3,"background-position":"-20px -110px"},".uicmd-check-checked":{$order:4,"background-position":"0 -70px"},".uicmd-check-checked-mouseover":{$order:5,"background-position":"0 -90px"},".uicmd-check-checked-mousedown":{$order:6,"background-position":"0 -110px"},".uicmd-radio":{$order:1,margin:"0 4px 0 2px","background-position":"-60px -70px"},".uicmd-radio-mouseover":{$order:2,"background-position":"-60px -90px"},".uicmd-radio-mousedown":{$order:3,"background-position":"-60px -110px"},".uicmd-radio-checked":{$order:4,"background-position":"-40px -70px"},".uicmd-radio-checked-mouseover":{$order:5,"background-position":"-40px -90px"},".uicmd-radio-checked-mousedown":{$order:6,"background-position":"-40px -110px"},".uicmd-add":{$order:1,"background-position":"-56px -222px"},".uicmd-add-mouseover":{$order:2,"background-position":"-56px -222px"},".uicmd-add-mousedown":{$order:3,"background-position":"-56px -222px"},".uicmd-toggle":{$order:1,"margin-left":"3px","background-position":"-160px -70px"},".uicmd-toggle-mouseover":{$order:2,"background-position":"-160px -90px"},".uicmd-toggle-mousedown":{$order:3,"background-position":"-160px -110px"},".uicmd-toggle-checked":{$order:4,"background-position":"-180px -70px"},".uicmd-toggle-checked-mouseover":{$order:5,"background-position":"-180px -90px"},".uicmd-toggle-checked-mousedown":{$order:6,"background-position":"-180px -110px"},".uicmd-toggle-busy":{$order:7,background:linb.UI.$bg("busy.gif","no-repeat center center",true)},".uicmd-toggle2":{$order:1,"background-position":"-200px -70px"},".uicmd-toggle2-mouseover":{$order:2,"background-position":"-200px -90px"},".uicmd-toggle2-mousedown":{$order:3,"background-position":"-200px -110px"},".uicmd-toggle2-checked":{$order:4,"background-position":"-220px -70px"},".uicmd-toggle2-checked-mouseover":{$order:5,"background-position":"-220px -90px"},".uicmd-toggle2-checked-mousedown":{$order:6,"background-position":"-220px -110px"},".uibar-top, .uibar-bottom, .uibar-top-s, .uibar-bottom-s":{position:"relative","vertical-align":"top","font-size":0,"line-height":0},".uibar-top td, .uibar-top-s td, .uibar-bottom td, .uibar-bottom-s td":{$order:1,background:linb.UI.$bg("bar_vertical.gif","no-repeat 0 0",true)},".uibar-top, .uibar-top .uibar-t":{height:"29px"},".uibar-top .uibar-tdl":{$order:1,"padding-left":"4px",height:"100%","background-position":"0 0"},".uibar-top .uibar-tdm":{$order:1,"background-position":"0 -30px","background-repeat":"repeat-x"},".uibar-top .uibar-tdr":{$order:1,"padding-left":"4px","background-position":"right -60px"},".uibar-top-focus .uibar-tdl":{$order:2,"padding-left":"4px",height:"100%","background-position":"left -90px"},".uibar-top-focus .uibar-tdm":{$order:2,"background-position":"left -120px","background-repeat":"repeat-x"},".uibar-top-focus .uibar-tdr":{$order:2,"padding-left":"4px","background-position":"right -150px"},".uibar-top .uibar-cmdl":{"-moz-user-select":"none",overflow:"hidden",position:"absolute",left:0,top:"6px",width:"92%",height:"22px","padding-left":"8px","white-space":"nowrap"},".uibar-top .uibar-cmdr":{"-moz-user-select":"none",position:"absolute",top:"6px",right:"8px","text-align":"right"},".uicon-main":{position:"relative","padding-left":"5px","font-size":0,"line-height":0,"z-index":1,overflow:"visible",background:linb.UI.$bg("bar_horizontal.gif","repeat-y -595px top",true)},".uicon-maini":{"padding-right":"5px","font-size":0,"line-height":0,background:linb.UI.$bg("container_right.gif","#AAD2FA repeat-y right top",true)},".uibar-bottom, .uibar-bottom .uibar-t":{height:"12px"},".uibar-bottom .uibar-tdl":{$order:1,"padding-left":"5px",height:"100%","background-position":"left -189px"},".uibar-bottom .uibar-tdm":{$order:1,"background-position":"left -211px","background-repeat":"repeat-x"},".uibar-bottom .uibar-tdr":{$order:1,"padding-left":"5px","background-position":"right -233px"},".uibar-top-s, .uibar-top-s .uibar-t":{$order:3,height:"7px"},".uibar-top-s .uibar-tdl":{$order:3,height:"100%","padding-left":"5px","background-position":"left -261px"},".uibar-top-s .uibar-tdm":{$order:3,"background-position":"left -283px","background-repeat":"repeat-x"},".uibar-top-s .uibar-tdr":{$order:3,"padding-left":"5px","background-position":"right -305px"},".uibar-top-s .uibar-cmdl":{$order:3,display:"none"},".uibar-top-s .uibar-cmdr":{$order:3,display:"none"},".uibar-bottom-s, .uibar-bottom-s .uibar-t":{$order:3,height:"6px"},".uibar-bottom-s .uibar-tdl":{$order:3,height:"100%","padding-left":"5px","background-position":"left -327px"},".uibar-bottom-s .uibar-tdm":{$order:3,"background-position":"left -349px","background-repeat":"repeat-x"},".uibar-bottom-s .uibar-tdr":{$order:3,"padding-left":"5px","background-position":"right -371px"}})+linb.UI.buildCSSText({".uiw-shell":{background:"transparent",display:linb.$inlineBlock,zoom:linb.browser.ie6?1:null,border:0,padding:0,margin:0},".uiw-frame":{$order:1,display:"block",position:"relative",border:0,padding:0,margin:0,width:"100%",height:"100%","-moz-box-flex":"1"},".uiw-border":{$order:2,display:"block",position:"absolute",border:0,padding:0,margin:0,left:0,top:0,width:"100%",height:"100%"},".ui-dirty":{$order:1,background:linb.UI.$bg("icons.gif","no-repeat",true),"background-position":"-390px -290px"},".ui-disabled, .ui-disabled *":{color:"#808080"},".ui-invalid, .ui-invalid *":{"background-color":"#FFEBCD"},"#linblangkey":{"vertical-align":"baseline"}})+linb.UI.buildCSSText({".uibg-base":{"background-color":"#fff"},".uibg-bar":{"background-color":"#aad2fa"},".uiborder-inset":{border:"solid 1px","border-color":"#648cb4 #c8e1fa #c8e1fa #648cb4"},".uiborder-outset":{border:"solid 1px","border-color":"#c8e1fa #648cb4 #648cb4 #c8e1fa"}})},$End:function(){linb.UI.$cache_css+=this.buildCSSText(this.$Appearances)},Static:{$cache_css:"",$css_tag_dirty:"ui-dirty",$css_tag_invalid:"ui-invalid",$tag_left:"{",$tag_right:"}",$tag_special:"#",$ID:"#id#",$DOMID:"#domid#",$CLS:"#cls#",$tag_subId:"_serialId",$childTag:"<!--{id}-->",$theme:"default",$ps:{left:1,top:1,width:1,height:1,right:1,bottom:1},_getChildren:function(A){return A.children},getFromDom:function(A){if(A=linb.UIProfile.getFromDom(A)){return A.boxing()}},unserialize:function(C,D){if(typeof C=="string"){C=_.unserialize(str)}var B=function(E){if(_.isArr(E)){E=E[0]}delete E.serialId;if(E.children){_.arr.each(E.children,B)}},A=[];_.arr.each(C,function(E){if(!D){B(E)}A.push((new (linb.SC(E.key))(E)).get(0))});return this.pack(A,false)},_ensureValues:function(A){var B=[],F=0,D=0,G,E=this.KEY,C=linb.cache.dom;if(A["linb.absBox"]){A=A._nodes}for(;G=A[F++];){if((G.box&&G.box[E])||((G=C[G.domNode?G.domNode.id:G.id])&&G.box&&G.box[E])){B[D++]=G}}return B.length<=1?B:this._unique(B)},__gc:function(){var C=this,B=C.$key,A=linb.cache;_.breakO([A.template[B],A.domId[B],C._cache,C._idCache,C.$DataModel,C.$Templates,C.$Behaviors,C],2);delete linb.absBox.$type[B.replace("linb.UI.","")];Class.__gc(B)},_pickSerialId:function(){var A=linb.cache.domId[this.$key];if(A&&A[0]){return A.pop()}return this._ctrlId.next()},$bg:function(C,A,B){return function(D){var E=linb.ini.path+"appearance/default/"+(typeof B=="string"?B:B?"Public":(E=D.split("."))[E.length-1])+"/"+C;return"url("+E+") "+(A||"")}},$ieBg:function(B,A){return function(C){var D=linb.ini.path+"appearance/default/"+(typeof A=="string"?A:A?"Public":(D=C.split("."))[D.length-1])+"/"+B;return'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+D+'",sizingMethod="crop")'}},$doTemplate:function(E,I,H,O,P){var L=arguments.callee,N,K,D,M=H.constructor==Array,J=I[O||""],A=!P,P=P||[];if(M){if(typeof J!="function"){J=L}for(var G=0;K=H[G++];){J(E,I,K,O,P)}}else{if(K=H.object){P[P.length]=K.toHtml()}else{if(typeof J=="function"){J(E,I,H,O,P)}else{O=O?O+".":"";var C=J[0],B=J[1];for(var G=0,F=C.length;G<F;G++){if(D=B[G]){if(D in H){K=H[D];if(I[N=O+D]&&K){L(E,I,K,N,P)}else{P[P.length]=K}}}else{P[P.length]=C[G]}}}}}if(A){return P.join("")}},$buildTemplate:function(E,V,c,H,B){if(V&&String(V.tagName).toLowerCase()=="text"){B[B.length]=V.text;return }var L=arguments.callee,K=E.behavior?c?E.behavior[c]:E.behavior:null,Y=L.map1||(L.map1={tagName:1,text:1}),W=L.map2||(L.map2={image:1,input:1,br:1,meta:1,hr:1,abbr:1,embed:1}),Q=L.r2||(L.r2=/[a-z]/),P=L.r3||(L.r3=/^(on|before|after)/),M=L.r7||(L.r7=/([^{}]*)\{([\w]+)\}([^{}]*)/g),F=false,G=linb.UI,J,N,U,C;if(!V){V=E.template}C=c?E.keys[c]:E.key;if(!V.tagName){V.tagName="span"}if(V.id!==null){V.id=c?C+":"+G.$ID+":"+G.$tag_left+G.$tag_subId+G.$tag_right:G.$DOMID}else{delete V.id}if(V.className!==null){J=G.$CLS+(c?"-"+c.toLowerCase():"");U=V.className||"";V["class"]=J+" "+U+" "+(C==E.key?" ui-ctrl ":"")+G.$tag_special+(c||"KEY")+"_CC"+G.$tag_special}delete V.className;V.style=(V.style||"")+";"+G.$tag_special+(c||"KEY")+"_CS"+G.$tag_special;var T=[],S={},D=V.tagName,I=V.text,A=linb.absObj.$specialChars;for(var R in V){if(!V[R]){continue}if(!A[R.charAt(0)]&&!Y[R]){N=V[R];if(!Q.test(R)){if(typeof N=="object"){if(!N.$order){N.$order=0}N.$key=R;T[T.length]=N}}else{S[R]=N}}}T.sort(function(d,e){d=d.$order;e=e.$order;return d>e?1:d==e?0:-1});if(!B){F=true;B=[]}B[B.length]="<"+D+" ";for(var R in S){B[B.length]=R+'="'+S[R]+'" '}if(V.className!==null){V.className=U}delete V["class"];if(K&&(J=K.$eventhandler)){for(var R in J){if(J[R]){B[B.length]=R+'="'+J[R]+'" '}}}B[B.length]="{attributes}>";if(!W[D]&&I){B[B.length]=I}for(var R=0,O=T.length;R<O;){N=T[R++];L(E,N,N.$key,H,B)}if(!W[D]){B[B.length]="</"+D+">"}if(F){var Z=H[0],X=H[1];B.join("").replace(M,function(f,e,h,g){if(e){Z[Z.length]=e}X[Z.length]=Z[Z.length]=h;if(g){Z[Z.length]=g}return""})}},_rpt:function(E,B){var G=arguments.callee,A=linb.UI.$tag_special,F=G._r||(G._r=new RegExp(A+"([0-9A-Z_]+)_C([SC])"+A+"|"+A+"([\\w_\\-\\.]*)"+A,"img")),D={id:E.serialId,cls:E.getClass("KEY"),domid:E.domId},C={S:E.CS,C:E.CC};return B.replace(F,function(I,H,K,J){return D[J]||C[K][H]||""})},_build:function(B,G){var I,L,C,J=linb.UI,K=[[],[]],M=this,H=M.KEY,A=linb.cache.template,F=B._hash="b:"+(B.template._subid||"")+";!"+(B._exhash||"");if(!(I=_.get(A,[H,F]))){J.$buildTemplate(B,null,null,K);_.set(A,[H,F,""],K);if(L=B.template.$dynamic){for(var E in L){if(typeof (C=L[E])!="function"){var K=[[],[]];for(var D in C){if(typeof C[D]=="object"){J.$buildTemplate(B,C[D],D,K)}}C=K}_.set(A,[H,F,E],C)}}I=_.get(A,[H,F])}if(!I){return""}return M._rpt(B,J.$doTemplate(B,I,G))},_setDefaultBehavior:function(G){var A=this,D=arguments.callee,F=D._m||(D._m={"":1,KEY:1,$key:1}),E=D._f1||(D._f1=function(I,K,L){var J=function(R,W,M){var Z,P=M.id,Y,X=R.getSubId(P),O=R.properties,N,V,U;if(O.disabled){return }Y=R.SubSerialIdMapItem&&R.SubSerialIdMapItem[X];if(Y&&Y.disabled){return }switch(typeof I){case"string":N=R.getSubNode(I,X).get();break;case"function":V=[I];break;case"object":N=[];V=[];for(var Q,T=0,S=I.length;T<S;T++){Q=I[T];if(typeof Q=="string"){N.push.apply(N,R.getSubNode(Q,X).get())}else{V.push(Q)}}}if(N&&N.length){N=linb(N);U=R.boxing();if(L==1){if(K=="mouseover"&&R.beforeHoverEffect){if(false==U.beforeHoverEffect(R,Y,W,M,"mouseover")){return }}if(K=="mousedown"&&R.beforeClickEffect){if(false==U.beforeClickEffect(R,Y,W,M,"mousedown")){return }}N.tagClass("-"+K)}else{if(K=="mouseup"){if(R.beforeClickEffect&&false==U.beforeClickEffect(R,Y,W,M,"mouseup")){return }N.tagClass("-mousedown",false)}else{if(R.beforeHoverEffect&&false==U.beforeHoverEffect(R,Y,W,M,"mouseout")){return }N.tagClass("(-mouseover|-mousedown)",false)}}N.length=0}if(V&&V.length){_.arr.each(V,function(c){_.tryF(c,[R],R)});V.length=0}};return J}),B={},C;if(!linb.SC.get("linb.absComposed")){Class("linb.absComposed","linb.absObj",{Instance:{addPanel:function(J,L,M){var N=_.copy(linb.UI.Panel.$DataStruct);_.merge(N,J,"with");_.merge(N,{dock:"fill",tag:J.tag||J.id},"all");var K=new linb.UI.Panel(N),I=[];this.append(K,M&&M.id);_.arr.each(L,function(O){I.push(O[0])});K.append(linb.UI.pack(I,false))},removePanel:function(){this.destroy()},getPanelPara:function(){return _.copy(this.get(0).properties)},getPanelChildren:function(){return this.get(0).children},_e1:function(J,K,L,M,I){},_e2:function(K,J,N,I,M,L,O){},_e3:function(J,K,I,L){},_e4:function(J,M,N,I,L,K){},_e5:function(I,J,K){}},Static:{DataModel:{dragKey:"",dropKeys:""},$abstract:true}})}var H=linb.absComposed.prototype;if(G.HoverEffected){_.each(G.HoverEffected,function(J,I){C=F[I]?G:(G[I]||(G[I]={}));if(!J){C.afterMouseover=C.afterMouseout=null}else{C.afterMouseover=E(J,"mouseover",1);C.afterMouseout=E(J,"mouseout",2)}});B.beforeHoverEffect=H._e1}if(G.ClickEffected){_.each(G.ClickEffected,function(J,I){C=F[I]?G:(G[I]||(G[I]={}));if(!J){C.afterMousedown=C.afterMouseup=null}else{C.afterMousedown=E(J,"mousedown",1);C.afterMouseup=E(J,"mouseup",2)}});B.beforeClickEffect=H._e1}if(G.KeyHook){_.merge(G,{afterKeydown:function(J,K,L){if(J.onHotKeydown){var I=linb.Event.getKey(K);return false!==J.boxing().onHotKeydown(J,I[0],!!I[1],!!I[2],!!I[3],K,L)}},afterKeypress:function(J,K,L){if(J.onHotKeypress){var I=linb.Event.getKey(K);return false!==J.boxing().onHotKeypress(J,I[0],!!I[1],!!I[2],!!I[3],K,L)}},afterKeyup:function(J,K,L){if(J.onHotKeyup){var I=linb.Event.getKey(K);return false!==J.boxing().onHotKeyup(J,I[0],!!I[1],!!I[2],!!I[3],K,L)}}},"all");B.onHotKeydown=B.onHotKeypress=B.onHotKeyup=H._e2}if(G.NavKeys){_.each(G.NavKeys,function(J,L){var I=arguments.callee,K,Q=I.m1||(I.m1={KEY:1,$key:1});if(Q[L]){return }var O=I.m2||(I.m2={input:1,textarea:1}),N=I.m3||(I.m3={tab:1,enter:1,up:1,down:1,left:1,right:1}),M=I.m4||(I.m4={tab:1,up:1,down:1,left:1,right:1}),P=G[L]||(G[L]={});if(null===J){P.afterKeydown=null}else{P.afterKeydown=function(V,Z,R){var W=linb.Event.getKey(Z),d=W[0],S=W[1],U=W[2],Y=W[3],c=false;if(O[W=R.tagName.toLowerCase()]){if(N[d]){var T=linb([R]).caret(),X=R.value;switch(d){case"up":if(!/[\n\r]/.test(X.substr(0,T[0]))){c=true}break;case"left":if(S||(T[0]===0&&(T[1]!==X.length||T[1]===0))){c=true}break;case"down":if(!/[\n\r]/.test(X.substr(T[1],X.length))){c=true}break;case"right":if(S||(T[1]===X.length&&(T[0]!==0||T[1]===0))){c=true}break;case"enter":if(W=="input"||Y){c=true}break;case"tab":c=true;break}}}else{if(M[d]){c=true}}if(c){if(V.beforeNextFocus&&false===V.boxing().beforeNextFocus(V,d,!!U,Z)){return false}if(d!="tab"){linb(R).nextFocus(("up"==d||"left"==d)?false:true)}}}}});B.beforeNextFocus=H._e3}if((C=G.DropableKeys)&&C.length){_.arr.each(C,function(I){A._dropable(I)});C=A.prototype;_.arr.each("addPanel,removePanel,getPanelPara,getPanelChildren,getDropKeys,setDropKeys".split(","),function(I){if(!C[I]){C[I]=H[I]}});A.$DataModel.dropKeys=A.$DataStruct.dropKeys="";B.onDragEnter=B.onDragLeave=B.onDrop=B.onDropTest=B.onDropMarkShow=B.onDropMarkClear=H._e4}if((C=G.DragableKeys)&&C.length){_.arr.each(C,function(I){A._dragable(I)});C=A.prototype;_.arr.each("getDragKey,setDragKey".split(","),function(I){if(!C[I]){C[I]=H[I]}});A.$DataModel.dragKey=A.$DataStruct.dragKey="";B.onGetDragData=B.onStartDrag=B.onDragStop=H._e5}A.setEventHandlers(B)},addTemplateKeys:function(A){var B=this,C=B.KEY,E=arguments.callee,D=E._reg||(E._reg=/\./g);_.arr.each(A,function(F){B.$cssKeys[F]=(B.$Keys[F]=F=="KEY"?C:C+"-"+F).replace(D,"-").toLowerCase().replace("linb-ui","linb")});return B},$CSSCACHE:{},$getCSSValue:function(A,D){var C=this.$CSSCACHE,B=A+"->"+D,F=arguments.callee;if(B in C){return C[B]}var G=linb.Dom.getEmptyDiv().get(0),E;G.className=A;E=C[B]=parseInt(linb.Dom.getStyle(G,D))||0;G.className="";return E},getTheme:function(){return this.$theme},setTheme:function(A){A=A||"default";var B=this;if(A!=B.$theme){if(A!="default"){linb.CSS.includeLink(linb.getPath("linb.appearance."+A,"/theme.css"),"theme:"+A)}var D=linb.CSS.get("id","theme:"+B.$theme);if(D){D.disabled=true;linb(D).remove(false)}B.$theme=A;B.$CSSCACHE={};var C=0;_.asyRun(function(){if(C>5){throw new Error("errLoadTheme:"+A)}C++;var E=linb.CSS.$getCSSValue(".setting-uikey","fontFamily");if(E==A||A=="default"){linb.UI.getAll().reLayout(false,true);C=null}else{_.asyRun(arguments.callee,200*C)}},100)}return this},setAppearance:function(A){_.merge(this.$Appearances,A,"all");return this},getAppearance:function(){return this.$Appearances},setTemplate:function(D,K){if(D){var J=this,G=arguments.callee,A=G.r2||(G.r2=/[a-z]/),F=linb.absObj.$specialChars,E=["KEY"],H=G._fun||(G._fun=function(N,L){var O,M;for(M in N){if(!F[M.charAt(0)]){if(!A.test(M)){L[L.length]=M;O=N[M];if(typeof O=="object"){arguments.callee(O,L)}}}}}),I;H(D,E);J.addTemplateKeys(E);I=J.$Templates;if(typeof K=="string"){D._subid=K;I[K]=D}else{I._=D}if(I=D.$dynamic){for(var C in I){for(var B in I[C]){G.call(J,I[C],B)}}}}return this},getTemplate:function(A){return this.$Templates[A||"_"]},setBehavior:function(I){if(I){var P=this,B=linb.absObj.$specialChars,O=linb.Event.$EVENTHANDLER,L="$eventhandler",A=linb.Event._getEventType,K=arguments.callee,E=K.r1||(K.r1=/[a-z]/),D=K.r2||(K.r2=/^(on|before|after)/),N=P.$Behaviors,F,H,G,C,M,J;P._setDefaultBehavior(I);if(I.KEY){_.merge(I,I.KEY,"all");delete I.KEY}for(H in I){C=I[H];if(!B[H.charAt(0)]){if(!E.test(H)){F=N[H]||(N[H]={});for(G in C){M=C[G];if(!B[G.charAt(0)]){J=A(G);if(M){F[G]=M;(F[L]||(F[L]={}))["on"+J]=O}else{delete F[G];if(N[L]){delete N[L]["on"+J]}}}}}else{if(D.test(H)){J=A(H);if(C){N[H]=C;(N[L]||(N[L]={}))["on"+J]=O}else{delete N[H];if(N[L]){delete N[L]["on"+J]}}}else{N[H]=C}}}}}return P},getBehavior:function(){return this.$Behaviors},$applyCSS:function(){var B=linb.UI,A=B.$cache_css;if(A){if(!B.$cssNo){B.$cssNo=1}linb.CSS.addStyleSheet(A,"linb.UI-CSS"+(B.$cssNo++));B.$cache_css=""}},buildCSSText:function(I){var Q=this,M=arguments.callee,D=M._r1||(M._r1=/(^|\s|,)([0-9A-Z_]+)/g),J=[],A=[],K=linb.browser,F=K.ie6,B=K.ie,L=K.gek,N=Q.$cssKeys,P,O,C;for(var H in I){C=I[H];P=H.replace(D,function(S,R,T){return R+"."+(N[T]||T)}).toLowerCase();C.$order=parseInt(C.$order)||0;C.$=P;J[J.length]=C}J.sort(function(R,S){R=R.$order;S=S.$order;return R>S?1:R==S?0:-1});for(var H=0,E=J.length;H<E;){C=J[H++];A[A.length]=C.$+"{";if(P=C.$before){A[A.length]=P}if(P=C.$text){A[A.length]=P}for(var G in C){switch(G.charAt(0)){case"$":continue;break;case"_":if(!F){continue}break;case"*":if(!B){continue}break;case"-":if(!L){continue}break}if((O=C[G])||C[G]===0){switch(typeof O){case"string":case"number":A[A.length]=G+":"+O+";";break;case"function":A[A.length]=G+":"+O(Q.KEY)+";";break;default:_.arr.each(O,function(R){if(R){A[A.length]=G+":"+R+";"}})}}}if(O=C.$after){A[A.length]=O}A[A.length]="}"}return A.join("")},_dropable:function(D){var B=this,C=linb.Event.$EVENTHANDLER2,E=B.$Behaviors,A=D=="KEY"?E:(E[D]||(E[D]={}));_.merge(A,{beforeMouseover:function(H,K,F){if(H.properties.disabled||H.properties.readonly){return }var M=this,O=linb.DragDrop,G=O.getProfile(),N=G.dragKey,I=G.dragData,Q,J,P,L;if(!N||!I||!(new RegExp("\\b"+N+"\\b")).test(H.box.getDropKeys(H,M))){return }J=H.boxing();if(J.getItemByDom){Q=J.getItemByDom(F)}L=[H,K,M,N,I,Q];if((P=H.onDropTest)&&(false===J.onDropTest.apply(J,L))){return }if((P=H.box._onDropTest)&&(false===P.apply(H.host||H,L))){return }O.setDropElement(F);if(H.onDropMarkShow&&(false===J.onDropMarkShow.apply(J,L))){}else{if((P=H.box._onDropMarkShow)&&(false===P.apply(H.host||H,L))){}else{_.resetRun("setDropFace",O.setDropFace,0,[M],O)}}if(P=H.box._onDragEnter){P.apply(H.host||H,L)}if(H.onDragEnter){J.onDragEnter.apply(J,L)}},beforeMouseout:function(H,K,F){if(H.properties.disabled||H.properties.readonly){return }var P=this,N=linb.DragDrop,G=N.getProfile(),M=G.dragKey,I=G.dragData,O,J,L;if(G.dropElement==F.id){J=H.boxing();if(J.getItemByDom){O=J.getItemByDom(F)}L=[H,K,P,M,I,O];if(H.onDropMarkClear&&(false===J.onDropMarkClear.apply(J,L))){}else{if((t=H.box._onDropMarkClear)&&(false===t.apply(H.host||H,L))){}else{_.resetRun("setDropFace",N.setDropFace,0,[null],linb.DragDrop)}}if(t=H.box._onDragLeave){t.apply(H.host||H,L)}if(H.onDragLeave){J.onDragLeave.apply(J,L)}N.setDropElement(null)}},beforeDrop:function(H,K,F){var Q=this,N=linb.DragDrop,G=N.getProfile(),M=G.dragKey,I=G.dragData,P,O,L,J=H.boxing();if(J.getItemByDom){P=J.getItemByDom(F)}L=[H,K,Q,M,I,P];if(H.onDropMarkClear&&(false===J.onDropMarkClear.apply(J,L))){}else{if((O=H.box._onDropMarkClear)&&(false===O.apply(H.host||H,L))){}}if(H.onDrop&&(false===J.onDrop.apply(J,L))){}else{if((O=H.box._onDrop)&&(false===O.apply(H.host||H,L))){}}}},"all");_.merge(A.$eventhandler||(A.$eventhandler={}),{onmouseover:C,onmouseout:C,ondrop:C});return B},_dragable:function(D){var B=this,C=linb.Event.$EVENTHANDLER2,E=B.$Behaviors,A=D=="KEY"?E:(E[D]||(E[D]={}));_.merge(A,{beforeMousedown:function(I,K,L){if(I.properties.disabled){return }if(!I.properties.dragKey){return }var M=linb.Event.getPos(K),J=I.boxing(),G=[I,K,L],H;if(I.onStartDrag&&(false===J.onStartDrag.apply(J,G))){}else{if((H=I.box._onStartDrag)&&(false===H.apply(I.host||I,G))){}else{var F=I.box;linb([L]).startDrag(K,{dragType:"icon",targetLeft:M.left+12,targetTop:M.top+12,dragCursor:"pointer",dragDefer:1,dragKey:F.getDragKey(I,this),dragData:F.getDragData(I,K,this)})}}},beforeDragbegin:function(F,G,H){linb(H).onMouseout(true,{$force:true}).onMouseup(true)},beforeDragstop:function(G,H,I){var F;if(G.onDragStop){G.boxing().onDragStop(G.e,I)}if(F=G.box._onDragStop){F.apply(G.host||G,arguments)}}},"all");_.merge(A.$eventhandler||(A.$eventhandler={}),{onmousedown:C,ondragbegin:C});return B},adjustData:function(D,G,C){if(!C){C={}}var B,H,A=linb.wrapRes,F=arguments.callee,E=F._r||(F._r=/\B\$([\w]+[\.][\w\.]+[\w])/g);for(B in G){if(B.charAt(0)=="$"){continue}if(!(B in C)){C[B]=typeof (H=G[B])=="string"?(((H.indexOf("$")!=-1)?(H=H.replace(E,function(J,I){return A(I)})):H)&&((H.charAt(0)=="@")?(linb.SC.get(H.substr(1,H.length))||H):H)):H}}if((typeof (H=C.renderer)=="function")||(typeof (H=G.renderer)=="function")){C.caption=H(G,C,D)}if("disabled" in G){C.disabled=G.disabled?"ui-disabled":""}C.iconDisplay=G.image?"":"display:none";return C},cacheData:function(A,B){_.set(linb.cache,["UIDATA",A],B);return this},getCachedData:function(A){var B=_.get(linb.cache,["UIDATA",A]);if(typeof B=="function"){B=B()}return _.clone(B)},Behaviors:{onContextmenu:function(A,B,C){return A.boxing().onContextmenu(A,B,C)!==false}},DataModel:{tag:"",tagVar:{ini:{}},disabled:{ini:false,action:function(A){this.root.css("opacity",A?0.5:1)}},dock:{ini:"none",listbox:["none","top","bottom","left","right","center","middle","origin","width","height","fill","cover"],action:function(A){linb.UI.$dock(this,true,true)}},dockIgnore:{ini:false,action:function(B){var A=this;if(A.properties.dock!="none"){linb.UI.$dock(A,true,true)}}},dockOrder:{ini:1,action:function(B){var A=this;if(A.properties.dock!="none"){linb.UI.$dock(A,true,true)}}},dockMargin:{ini:{left:0,top:0,right:0,bottom:0},action:function(B){var A=this;if(A.properties.dock!="none"){linb.UI.$dock(A,true,true)}}},dockFloat:{ini:false,action:function(B){var A=this;if(A.properties.dock!="none"){linb.UI.$dock(A,true,true)}}},dockMinW:0,dockMinH:0,tips:""},EventHandlers:{onRender:function(A){},onLayout:function(A){},onDestroy:function(A){},beforeDestroy:function(A){},onShowTips:function(A,B,C){},onContextmenu:function(A,C,B){}},RenderTrigger:function(){var B=this,A=B.boxing(),E=B.properties;if(B.box._onresize){var D=B.domNode.style,C;if((C=D.visibility)!="hidden"){B._$v=C;D.visibility="hidden"}linb.UI.$tryResize(B,E.width,E.height)}if(E.disabled){A.setDisabled(true,true)}B.inValid=1},$tryResize:function(C,F,D,B,A,G){var I=C.box,H=I._onresize,E=C.$rs_args;if(H&&(F||D)){if(!E){E=C.$rs_args=[C,null,null];_.asyRun(C.$resizeFun=function(){delete C.$rs_args;delete C.$resizeFun;if(!linb.Dom.byId(C.domId)){return }H.apply(I,E);var J=C.domNode.style;if("_$v" in C){if(J.visibility!="visible"){J.visibility=C._$v}delete C._$v}})}if(F){E[1]=F}if(D){E[2]=D}E[3]=A;E[4]=G}if(B){_.tryF(C.$resizeFun)}},LayoutTrigger:function(){var B=this,A=B.boxing(),D=B.properties;if(D.dock&&D.dock!="none"){if(!B.$laidout){B.$laidout=1;var C=B.domNode.style;switch(D.dock){case"top":case"bottom":case"width":C.width=0;break;case"left":case"right":case"height":C.height=0;break;default:C.width=C.height=0}}linb.UI.$dock(this,false,true)}},$dock_args:["top","bottom","left","right","center","middle","width","height"],$dock_map:{middle:1,center:1},$dock:function(H,D,E){var B=H.properties,J=B.dockMargin,G=H.root,O=B.dock||"none",C=G.parent(),Q="auto",K=C.id(),F=function(R,S){R=parseInt(R.properties.dockOrder)||0;S=parseInt(S.properties.dockOrder)||0;return R>S?1:R==S?0:-1},M=false,N,A="$inMatix",L,P,I=function(R){return linb.browser.ie6?R-R%2:R};if(K&&_.str.startWith(K,linb.Dom._matixid)){return }if(H.$dockParent!=K||H.$dockType!=O||D){H.$dockParent=K;H.$dockType=O;H.unLink("$dock");H.unLink("$dock1");H.unLink("$dock2");switch(O){case"middle":N={right:Q,bottom:Q,left:B.left||"",width:B.width||"",height:B.height||""};break;case"center":N={right:Q,bottom:Q,top:B.top||"",width:B.width||"",height:B.height||""};break;case"origin":N={right:Q,bottom:Q,width:B.width||"",height:B.height||""};break;case"top":N={left:J.left,right:J.right,bottom:Q,height:B.height||""};break;case"bottom":N={left:J.left,right:J.right,top:Q,height:B.height||""};break;case"left":N={right:Q,width:B.width||""};break;case"right":N={left:Q,width:B.width||""};break;case"width":N={bottom:Q,height:B.height||"",top:B.top||""};break;case"height":N={right:Q,width:B.width||"",left:B.left||""};break;case"fill":case"cover":N={right:Q,bottom:Q};break;case"none":N={left:B.left,top:B.top,width:B.width||"",height:B.height||""};break}G.cssRegion(N,true);if(C.get(0)===document.body){C=linb.win;M=true;if(M&&!linb.cache._resizeTime){linb.cache._resizeTime=1}}if(O!="none"){L=C.$getEvent("onSize","dock");if(!L){L=function(g){var e=arguments.callee,R=linb.UI.$dock_map,Y=linb.UI.$dock_args,Z=e.rePos,U=e.node,S=U.get(0).style,c=e.win,X,W,V,T,f,d;if(g.$dockid||!c||(_()-linb.cache._resizeTime>100)){X={left:0,top:0,right:0,bottom:0,width:parseInt(S&&S.width)||U.width(),height:parseInt(S&&S.height)||U.height()};for(V=0;f=Y[V++];){d=e[f];if(d.length){if(!R[f]){g.width=g.height=1}for(W=0;T=d[W++];){if(!T.properties.dockIgnore){Z(T,X,f,g.$dockid,c||g.width,c||g.height)}}}}if(X.later){_.each(X.later,function(i){try{i.node.cssRegion(i,true)}catch(h){_.asyRun(function(){i.width+=1;i.height+=1;i.node.cssRegion(i,true)})}})}if(c){linb.cache._resizeTime=_()}}};L.node=C;_.arr.each(linb.UI.$dock_args,function(R){L[R]=[]});L.win=M;L.rePos=function(S,c,g,f,Z,l){var k=false;if(f&&S.$id!=f){k=true}var R=S.properties,j=R.dockFloat,e=R.dockMargin,i=S.root,m=S.domNode.style,U,d,p,W,n,V,Y=parseInt(R._dockBorderWidth)||0,X=parseInt(R._dockBorderHeight)||0,T={};switch(g){case"middle":i.top((c.height-i.height())/2);break;case"center":i.left((c.width-i.width())/2);break;case"top":if(!k){U=e.left;p=e.right;d=(j?0:c.top)+e.top;if(parseFloat(m.top)!=d){T.top=d}n=c.width-U-p-Y;if(parseFloat(m.width)!=n){T.width=I(n)}if(!_.isEmpty(T)){i.cssRegion(T,true)}}if(!j){c.top+=(i.offsetHeight()+e.top+e.bottom)}break;case"bottom":if(!k){U=e.left;p=e.right;W=(j?0:c.bottom)+e.bottom;if(parseFloat(m.bottom)!=W){T.bottom=W}n=c.width-U-p-Y;if(parseFloat(m.width)!=n){T.width=I(n)}if(!_.isEmpty(T)){i.cssRegion(T,true)}}if(!j){c.bottom+=(i.offsetHeight()+e.top+e.bottom)}break;case"left":if(!k){U=(j?0:c.left)+e.left;d=(j?0:c.top)+e.top;W=(j?0:c.bottom)+e.bottom;if(parseFloat(m.left)!=U){T.left=U}if(parseFloat(m.top)!=d){T.top=d}n=c.height-d-W-X;if(parseFloat(m.height)!=n){T.height=I(n)}if(!_.isEmpty(T)){i.cssRegion(T,true)}}if(!j){c.left+=(i.offsetWidth()+e.left+e.right)}break;case"right":if(!k){p=(j?0:c.right)+e.right;d=(j?0:c.top)+e.top;W=(j?0:c.bottom)+e.bottom;if(parseFloat(m.right)!=p){T.right=p}if(parseFloat(m.top)!=d){T.top=d}n=c.height-d-W-X;if(parseFloat(m.height)!=n){T.height=I(n)}if(!_.isEmpty(T)){i.cssRegion(T,true)}}if(!j){c.right+=(i.offsetWidth()+e.left+e.right)}break;case"width":if(!Z){return }U=(R.dock=="cover"?0:(j?0:c.left))+e.left;p=(R.dock=="cover"?0:(j?0:c.right))+e.right;d=R.dock=="width"?(parseInt(R.top)||0):((R.dock=="cover"?0:(j?0:c.top))+e.top);n=c.width-U-p-Y;c.later=c.later||{};c.later[S.$id]=c.later[S.$id]||{};_.merge(c.later[S.$id],{node:i,width:I(R.dockMinW?Math.max(R.dockMinW,n):n),left:U,top:d},"all");break;case"height":if(!l){return }d=(R.dock=="cover"?0:(j?0:c.top))+e.top;W=(R.dock=="cover"?0:(j?0:c.bottom))+e.bottom;U=R.dock=="height"?(parseInt(R.left)||0):((R.dock=="cover"?0:(j?0:c.left))+e.left);n=c.height-d-W-X;c.later=c.later||{};c.later[S.$id]=c.later[S.$id]||{};_.merge(c.later[S.$id],{node:i,height:I(R.dockMinH?Math.max(R.dockMinH,n):n),left:U,top:d},"all");break}};C.onSize(L,"dock")}if(O=="fill"||O=="cover"){H.link(L.height,"$dock1");H.link(L.width,"$dock2");L.height.sort(F);L.width.sort(F)}else{if(O=="origin"){H.link(L.center,"$dock1");H.link(L.middle,"$dock2")}else{H.link(L[O],"$dock");L[O].sort(F)}}linb.cache._resizeTime=1;H.$dockFun=L}}if(O!="none"&&E){H.$dockFun({width:1,height:1,$dockid:_.arr.indexOf(["width","height","fill","cover"],O)!=-1?H.$id:null,$type:O})}},_beforeSerialized:function(D){var E=D.boxing(),A,C,G={};_.merge(G,D,"all");var F=G.properties=_.copy(D.properties);switch(F.dock){case"top":case"bottom":delete F.width;delete F.left;delete F.top;delete F.right;delete F.bottom;break;case"left":case"right":delete F.height;delete F.left;delete F.top;delete F.right;delete F.bottom;break;case"width":delete F.width;delete F.left;delete F.right;break;case"height":delete F.height;delete F.top;delete F.bottom;break;case"fill":case"cover":delete F.width;delete F.height;delete F.left;delete F.top;delete F.right;delete F.bottom;break}for(var B in linb.UI.$ps){if((B in F)&&typeof F[B]!="number"&&F[B]!=""&&F[B]!="auto"){F[B]=isNaN(F[B]=parseFloat(F[B]))?"auto":F[B]}}if(F.items&&F.items.length){C=linb.absObj.$specialChars;F.items=_.clone(F.items,function(I,H){return !C[(H+"").charAt(0)]&&I!=undefined})}if(_.isEmpty(F.tagVar)){delete F.tagVar}if((C=F.dockMargin)&&!C.left&&!C.top&&!C.right&&!C.bottom){delete F.dockMargin}if(F.items&&(F.items.length==0||F.listKey)){delete F.items}return G},getDropKeys:function(A,B){return A.properties.dropKeys},getDragKey:function(A,B){return A.properties.dragKey},getDragData:function(A,C,B){return{profile:A,domId:B.id,data:A.onGetDragData?A.boxing().onGetDragData(A,C,B):null}},_prepareData:function(C,F){var A=C.properties,G=this.$DataModel,H=arguments.callee,B=H.map||(H.map=_.toArr("left,top,bottom,right,width,height")),I=[],J=linb.UI.adjustData,K;F=F||{};if(A.id){delete A.id}if("caption" in G&&A.caption!==null){A.caption=A.caption===undefined?C.alias:A.caption}if("$hborder" in G){F.bWidth=A.width-(A.$hborder||0)*2}if("$vborder" in G){F.bHeight=A.height-(A.$vborder||0)*2}for(var D=0,E;E=B[D];D++){if(A[E]||A[E]===0){if(String(parseFloat(A[E]))==String(A[E])){I[I.length]=E+":"+(parseInt(A[E])||0)+"px"}else{if(A[E]!="auto"&&A[E]){I[I.length]=E+":"+A[E]}}}}if(A.position){I[I.length]="position:"+A.position}if(A.visibility){I[I.length]="visibility:"+A.visibility}if(A.zIndex){I[I.length]="z-index:"+A.zIndex}if(A.display){I[I.length]="display:"+(A.display=="inline-block"?linb.browser.gek?"-moz-inline-block;display:-moz-inline-box;display:inline-block;":"inline-block":A.display)}F._style=";"+I.join(";")+";";if("href" in G){F.href=A.href||linb.$href}if("tabindex" in G){F.tabindex=A.tabindex||"-1"}if("items" in G){C.ItemIdMapSubSerialId={};C.SubSerialIdMapItem={};F.items=this._prepareItems(C,A.items)}F=J(C,A,F);C.prepared=true;return F},_prepareItems:function(D,K,J,F,H){var O=[],N,A,M,C=linb.UI.$tag_subId,B,G=D.properties.tabindex,L=linb.UI.adjustData;for(var I=0,E=K.length;I<E;I++){if(typeof K[I]!="object"){K[I]={id:K[I]}}N=K[I];if(!("caption" in N)){N.caption=N.id}A={id:N.id};if(J){A._pid=J}B=A[C]=typeof H=="string"?H:D.pickSubId("items");if(false!==F){D.ItemIdMapSubSerialId[N.id]=B;D.SubSerialIdMapItem[B]=N}if(M=N.object){M=A.object=M["linb.absBox"]?M.get(0):M;if(M["linb.UIProfile"]){M.properties.position="relative"}N.$id=M.$id;M.$item=N;M.$holder=D;if(!D.$attached){D.$attached=[]}D.$attached.push(M)}else{A._tabindex=G;L(D,N,A);if(this._prepareItem){this._prepareItem(D,A,N,J,F,H)}}O.push(A)}return O},_showTips:function(A,B,C){if(A.onShowTips){return A.boxing().onShowTips(A,B,C)}}}});Class("linb.absList","linb.absObj",{Instance:{activate:function(){var B=this.get(0),A=B.getSubNode("ITEM",true);if(!A.isEmpty()){A.focus()}return this},insertItems:function(F,B,J){if(!F){F=[_()+""]}if(_.isStr(F)){F=[F]}if(!F.length){return }var C,H,G,A,D,E,I=this._afterInsertItems;return this.each(function(L){E=L.box;H=L.properties.items;G=_.arr.subIndexOf(H,"id",B);if(L.domNode){D=E._prepareItems(L,F,B);var K=L.buildItems("items",D);if(G==-1){C=L.getSubNode(E.ITEMSKEY||L.keys.ITEMS||L.keys.KEY);A=_.str.toDom(K);if(J){C.prepend(A)}else{C.append(A)}}else{A=_.str.toDom(K);C=L.getSubNodeByItemId(E._ITEMKEY||"ITEM",B);if(J){C.addPrev(A)}else{C.addNext(A)}}if(I){L.boxing()._afterInsertItems(L,D,B,J)}}if(G==-1){H.push.apply(H,F)}else{_.arr.insertAny(H,F,J?G:G+1)}})},removeItems:function(B,D){if(!(B instanceof Array)){B=[B]}var E,C,A=this._afterRemoveItems;remove=function(I,F,K,H,J){var G=arguments.callee;if(!H){H=linb()}_.filter(F,function(O){var N,L;if(J||(L=(_.arr.indexOf(K,O.id)!=-1))){if(I.domNode){if(N=I.ItemIdMapSubSerialId[O.id]){delete I.SubSerialIdMapItem[N];delete I.ItemIdMapSubSerialId[O.id];I.reclaimSubId(N,"items");if(!J){if(!(E=I.getSubNode(I.keys[D]?D:"ITEM",N)).isEmpty()){H.merge(E)}if(O.$id){H.get().push(linb.getObject(O.$id).getRootNode())}}}}}if(O.sub){G(I,O.sub,K,H,J||L)}if(L){for(var M in O){O[M]=null}return false}});H.remove()};return this.each(function(F){var G=F.properties;remove(F,G.items,B);if(C=G.$UIvalue){if((C=C.split(";")).length>1){_.filter(C,function(H){return _.arr.indexOf(B,H)==-1});G.$UIvalue=C.join(";")}else{if(_.arr.indexOf(B,G.$UIvalue)!=-1){G.$UIvalue=null}}}if(A&&F.domNode){F.boxing()._afterRemoveItems(F,B)}})},clearItems:function(A){return this.each(function(B){if(!B.SubSerialIdMapItem){return }B.getSubNode(B.keys[A]||B.keys.ITEMS||"KEY",true).empty();_.each(B.SubSerialIdMapItem,function(D,C){B.reclaimSubId(C,"items")});B.properties.items.length=0;B.SubSerialIdMapItem={};B.ItemIdMapSubSerialId={}})},updateItem:function(B,L){var K=this,D=K.get(0),F=D.box,G=D.properties.items,H=D.queryItems(G,function(M){return typeof M=="object"?M.id===B:M==B},true,true,true),J,E,C,A,I;if(_.isStr(L)){L={caption:L}}if(H.length){H=H[0];if(typeof H[0]!="object"){J=H[2][H[1]]={id:H[0]}}else{J=H[0]}_.merge(J,L,"all");J.id=B;E=_.get(D,["ItemIdMapSubSerialId",B]);arr=F._prepareItems(D,[J],J._pid,false,E);C=D.getSubNodeByItemId("ITEM",B);if(!C.isEmpty()){if(L.sub){delete J._created;delete J._checked}else{if(J.sub){A=D.getSubNodeByItemId("SUB",B)}}C.outerHTML(D.buildItems(arguments[2]||"items",arr));if(A&&!A.isEmpty()){if(!(I=D.getSubNodeByItemId("SUB",B)).isEmpty()){I.replace(A)}}}}return K},fireItemClickEvent:function(A){this.getSubNodeByItemId("ITEM",A).onClick();return this}},Initialize:function(){var A=this.prototype;_.arr.each(_.toArr("getItemByItemId,getItemByDom,getSubIdByItemId,getSubNodeByItemId"),function(B){A[B]=function(){var C=this.get(0);return C[B].apply(C,arguments)};Class._fun(A[B],B,A.KEY)})},Static:{$abstract:true,DataModel:{listKey:{set:function(B,A){return this.each(function(D){if(D.properties.listKey!=B||A){var C=D.box.getCachedData(B);if(C){D.boxing().setItems(C)}else{D.boxing().setItems(D.properties.items)}D.properties.listKey=B}})}},items:{ini:[],set:function(A){return this.each(function(B){if(B.domNode){B.boxing().clearItems().insertItems(A)}B.properties.items=A})}}},_showTips:function(C,E,H){if(C.onShowTips){return C.boxing().onShowTips(C,E,H)}if(!linb.Tips){return }var B=C.properties,G=E.id,A=C.getSubId(G),F=C.SubSerialIdMapItem,D=F&&F[A];if(B.disabled){return }if(D&&D.disabled){return }if(D&&D.tips){linb.Tips.show(H,D);return true}else{return false}}}});Class("linb.absValue","linb.absObj",{Instance:{_getCtrlValue:function(){return this.getUIValue()},_setCtrlValue:function(A){return this},_setDirtyMark:function(){return this},getValue:function(){return this.get(0).properties.value},getUIValue:function(){return this.get(0).properties.$UIvalue},resetValue:function(B){var A=this;A.each(function(C){var D;if(typeof (D=C.box._ensureValue)=="function"){B=D.call(C.box,C,B)}C.boxing()._setCtrlValue(C.properties.$UIvalue=C.properties.value=B);if(typeof (D=C.$onValueSet)=="function"){D.call(C,B)}C.inValid=1});A._setDirtyMark();return A},setUIValue:function(C,B){var A=this;this.each(function(D){var H=D.properties,F,G=H.$UIvalue,E=D.boxing();if(G!==C||B){if(false===D.box._checkValid(D,C)||(D.beforeUIValueSet&&false===(F=E.beforeUIValueSet(D,G,C)))){return }if(F!==undefined){C=F}if(typeof (F=D.box._ensureValue)=="function"){C=F.call(D.box,D,C)}if(typeof (F=D.$onValueUpdated)=="function"){F.call(D,C)}if(D.domNode){E._setCtrlValue(C)}H.$UIvalue=C;if(D.domNode){E._setDirtyMark()}if(D.afterUIValueSet){E.afterUIValueSet(D,G,C)}}});return this},updateValue:function(){this.each(function(A){var B=A.properties;if(A.boxing().checkValid()){B.value=B.$UIvalue}});return this._setDirtyMark()},isDirtied:function(){var A=this.get(0).properties;return A.value!==A.$UIvalue},checkValid:function(){var A=true;this.each(function(B){var C=B.properties;A=B.box._checkValid(B,C.$UIvalue)&&A;if(B.domNode){B.boxing()._setDirtyMark()}});return A}},Static:{$abstract:true,DataModel:{dataBinder:{combobox:function(){return _.toArr(linb.DataBinder._pool,true)},set:function(D,C){var B,A;return this.each(function(F){var G=F.properties,E=G.dataBinder;if(E==D&&!C){return }if(E){linb.DataBinder._unBind(E,F)}G.dataBinder=D;linb.DataBinder._bind(D,F)})}},dataField:"",value:{ini:null,set:function(B,A){this.each(function(D){var H=D.properties,F,G=H.value,E=D.boxing(),C=B;if(G!==C||A){if(D.box._checkValid(D,C)===false){return }if(D.beforeValueSet&&false===(F=E.beforeValueSet(D,G,C))){return }if(F!==undefined){C=F}if(typeof (F=D.box._ensureValue)=="function"){C=F.call(D.box,D,C)}if(typeof (F=D.$onValueSet)=="function"){F.call(D,C)}if(D.domNode){E._setCtrlValue(C)}H.value=H.$UIvalue=C;D.inValid=1;if(D.domNode){E._setDirtyMark()}if(D.afterValueSet){E.afterValueSet(D,G,C)}}});return this}},dirtyMark:true},EventHandlers:{beforeValueSet:function(B,A,C){},afterValueSet:function(B,A,C){},beforeUIValueSet:function(B,A,C){},afterUIValueSet:function(B,A,C){},beforeDirtyMark:function(B,A){}},RenderTrigger:function(){var B=this,A=B.boxing(),E=B.properties,C,D;E.$UIvalue=E.value;if(E.value!==undefined){D=E.value;if(typeof (C=B.box._ensureValue)=="function"){D=C.call(B.box,B,D)}A._setCtrlValue(D)}if(C=E.dataBinder){A.setDataBinder(C,true)}if(C=E.dataField){A.setDataField(C)}},_checkValid:function(A,B){return true}}});new function(){var A="linb.UI";Class(A+".Widget",A,{Static:{Appearances:{KEY:{"font-size":linb.browser.ie?0:null,"line-height":linb.browser.ie?0:null}},Templates:{className:"uiw-shell ",style:"{_style}",FRAME:{className:"uiw-frame ",BORDER:{style:"width:{bWidth}px;height:{bHeight}px;",className:"uiw-border"}}},Behaviors:{KeyHook:true,onSize:function(E,F){var D=E.domNode.style,B=null,C=null;if(F.width){B=parseInt(D.width)||B}if(F.height){C=parseInt(D.height)||C}linb.UI.$tryResize(E,B,C)}},DataModel:{width:100,height:100,$hborder:0,$vborder:0},RenderTrigger:function(){var B=this,C=B.properties,D=B.boxing();if(linb.Dom.byId(B.domId)){if((!B.$noB)&&C.border&&D._border){D._border()}}_.asyRun(function(){if(!linb.Dom.byId(B.domId)){return }if((!B.$noR)&&C.resizer&&D.setResizer){D.setResizer(C.resizer,true)}if((!B.$noS)&&C.shadow&&D._shadow){D._shadow()}})},_onresize:function(E,B,J){var K=E.properties,C=E.getSubNode("BORDER"),I,G=B,F=J,D=Math.max(0,(K.$b_lw||0)-(K.$hborder||0)),H=Math.max(0,(K.$b_tw||0)-(K.$vborder||0));if(null!==G){G-=Math.max((K.$hborder||0)*2,(K.$b_lw||0)+(K.$b_rw||0));if(linb.browser.ie6){G=(parseInt(G/2))*2}}if(null!==F){F-=Math.max((K.$vborder||0)*2,(K.$b_lw||0)+(K.$b_rw||0));if(linb.browser.ie6){F=(parseInt(F/2))*2}if(linb.browser.ie6&&null===B){C.ieRemedy()}}I={left:D,top:H,width:G,height:F};C.cssRegion(I);if((E.$border||E.$shadow||E.$resizer)&&linb.browser.ie){C.ieRemedy()}return I}}});Class(A+".Link",A,{Static:{Appearances:{KEY:{"font-size":linb.browser.ie?"12px":null,"line-height":linb.browser.ie?"14px":null}},Templates:{tagName:"a",style:"{_style}",href:"{href}",target:"{target}",tabindex:"{tabindex}",text:"{caption}"},Behaviors:{onClick:function(B,D,E){var C;if(!B.properties.disabled&&B.onClick){C=B.boxing().onClick(B,D,E)}return(E.href.indexOf("javascript:")===0||E.href.indexOf("#")===0||C===undefined)?C:false}},DataModel:{caption:{ini:undefined,action:function(B){this.root.get(0).innerHTML=B}},href:{ini:linb.$href,action:function(B){this.root.attr("href",B)}},target:{action:function(B){this.root.attr("target",B)}}},EventHandlers:{onClick:function(B,C){}}}});Class(A+".SLabel",A,{Static:{Templates:{style:"{_style}text-align:{hAlign}",text:"{caption}"},DataModel:{tabindex:null,caption:{ini:undefined,action:function(B){this.domNode.innerHTML=B}},hAlign:{ini:"right",listbox:["left","center","right"],action:function(B){this.root.css("textAlign",B)}}}}});Class(A+".SButton",A,{Instance:{activate:function(){this.getSubNode("FOCUS").focus();return this}},Static:{Templates:{className:"{_clsName}",style:"{_style}",BTN:{className:"ui-btn",BTNI:{className:"ui-btni",BTNC:{className:"ui-btnc",FOCUS:{tagName:"a",tabindex:"{tabindex}",href:linb.$href,style:"{_align}",text:"{caption}"}}}}},Appearances:{BTN:{overflow:"hidden"},"KEY-auto BTN, KEY-auto BTNI, KEY-auto BTNC, KEY-auto FOCUS":{$order:1,display:linb.$inlineBlock},"BTN,BTNI,BTNC":{display:"block"},"KEY FOCUS":{cursor:"default","font-size":"12px","line-height":"14px","text-align":"center",display:"block"}},Behaviors:{HoverEffected:{BTN:["BTN"]},ClickEffected:{BTN:["BTN"]},NavKeys:{FOCUS:1},onClick:function(B,D,E){var C=B.properties;if(C.disabled){return false}B.getSubNode("FOCUS").focus();if(B.onClick){B.boxing().onClick(B,D,E)}}},DataModel:{caption:{ini:undefined,action:function(B){this.getSubNode("FOCUS").get(0).innerHTML=B}},hAlign:{ini:"center",listbox:["left","center","right"],action:function(B){this.getSubNode("FOCUS").css("textAlign",B)}},width:{ini:"auto",action:function(B){if(B=="auto"){this.root.width("auto").tagClass("-auto")}else{this.root.width(B).tagClass("-auto",false)}}},height:{readonly:true}},EventHandlers:{onClick:function(B,D,E,C){}},_prepareData:function(B){var C=arguments.callee.upper.call(this,B);C._align="text-align:"+C.hAlign+";";C._clsName=parseInt(C.width)?"":B.getClass("KEY","-auto");return C}}});Class(A+".SCheckBox",[A,"linb.absValue"],{Instance:{activate:function(){this.getSubNode("FOCUS").focus();return this},_setCtrlValue:function(B){return this.each(function(C){C.getSubNode("MARK").tagClass("-checked",!!B)})},_setDirtyMark:function(){return this.each(function(D){if(!D.properties.dirtyMark){return }if(!D.domNode){return }var C=D.properties,F=D.getSubNode("CAPTION"),B=C.value!==C.$UIvalue,E=linb.UI.$css_tag_dirty;if(F.beforeDirtyMark&&false===F.boxing().beforeDirtyMark(D,B)){return }if(B){F.addClass(E)}else{F.removeClass(E)}})}},Static:{Templates:{className:"{_clsName}",style:"{_style}",FOCUS:{tagName:"a",tabindex:"{tabindex}",href:linb.$href,MARK:{className:"uicmd-check"},CAPTION:{$order:1,text:"{caption}"}}},Appearances:{KEY:{overflow:"visible"},FOCUS:{cursor:"default","vertical-align":"middle",padding:"2px 0","font-size":"12px","line-height":"14px","vertical-align":"middle"},CAPTION:{"vertical-align":"middle"}},Behaviors:{HoverEffected:{KEY:"MARK"},ClickEffected:{KEY:"MARK"},NavKeys:{FOCUS:1},onClick:function(C,E,F){var D=C.properties,B=C.boxing();if(D.disabled){return false}B.setUIValue(!D.$UIvalue);if(C.onChecked){B.onChecked(C,E,D.$UIvalue)}C.getSubNode("FOCUS").focus()},FOCUS:{onKeydown:function(C,D,E){var B=linb.Event.getKey(D)[0];if(B==" "||B=="enter"){C.root.onClick(true);return false}}}},DataModel:{value:false,caption:{ini:undefined,action:function(B){this.getSubNode("CAPTION").get(0).innerHTML=B}}},EventHandlers:{onChecked:function(B,D,C){}},_ensureValue:function(B,C){return !!C}}});Class(A+".Div",A,{Static:{Appearances:{KEY:{outline:linb.browser.gek?"none":null,zoom:linb.browser.ie6?"1":null,background:linb.browser.ie?"url("+linb.ini.file_bg+") no-repeat left top":null}},Templates:{tagName:"div",style:"{_style}",tabindex:"-1",text:"{html}"+linb.UI.$childTag},DataModel:{disabled:null,width:"100",height:"100",html:{action:function(B){this.domNode.innerHTML=B}}}}});Class(A+".Tag",A+".Div",{Static:{Templates:{tagName:"div",style:"overflow:auto;border:dashed blue 1px;text-align:center;background:#EBEADB;{_style}",text:"{tagKey}"+linb.UI.$childTag},DataModel:{html:null,tagKey:{action:function(B){this.root.html(B)}}},_l:_.toArr("left,top,bottom,right,width,height,zIndex,tabindex,position,dock,dockFloat,dockMinW,dockMinH,dockOrder,dockMargin"),replace:function(D,E,B){_.arr.each(this._l,function(H){if(H in D.properties){E.properties[H]=D.properties[H]}});_.merge(E.CS,D.CS,"all");_.merge(E.CC,D.CC,"all");if(D.parent){var F=D.parent.children,G=F["$"+D.$id],C=_.arr.indexOf(F,G);D.parent.boxing().append(E,G[1]);F[C]=F.pop();D.unLink("$parent");delete D.parent}else{if(B){_.arr.each(B._nodes,function(I,H){if(I===D){B._nodes[H]=E;return false}})}}if(D.domNode){E.boxing().renderOnto(D.domNode)}}}});Class(A+".Pane",A+".Div",{Static:{Behaviors:{DropableKeys:["KEY"]}}})};Class("linb.UI.Image","linb.UI",{Instance:{getRate:function(){return parseFloat(this.get(0)._rate)||1}},Static:{Templates:{tagName:"image",style:"{_style}",border:"0",width:"{width}",height:"{height}"},Behaviors:{HoverEffected:{KEY:"KEY"},ClickEffected:{KEY:"KEY"},DragableKeys:["KEY"],onError:function(A,B,C){A.boxing().onError(A)},onLoad:function(C,E,F){var B=new Image(),D=B.src=F.src,A=C.box._adjust(C,B.width,B.height);C.boxing().afterLoad(C,D,A[0],A[1])}},RenderTrigger:function(){var B=this,C=B.properties,A=C.src;if(A){C.value=C.$UIvalue="";B.boxing().setSrc(A,true)}},EventHandlers:{onError:function(A){},beforeLoad:function(A){},afterLoad:function(C,D,B,A){}},_adjust:function(E,D,A){var H=E.properties,G=E.getRootNode();if(D>0&&A>0){var C=H.maxWidth/D,B=H.maxHeight/A,F=C<B?C:B;if(F>=1){F=1}E._rate=F;G.width=D*F;G.height=A*F;return[D*F,A*F]}return[0,0]},DataModel:{maxWidth:{ini:800,action:function(A){var B=this.getRootNode();this.box._adjust(this,B.width,B.height)}},maxHeight:{ini:600,action:function(A){var B=this.getRootNode();this.box._adjust(this,B.width,B.height)}},width:{ini:"auto",action:function(A){var B=this.getRootNode();B.width=A}},height:{ini:"auto",action:function(A){var B=this.getRootNode();B.height=A}},src:{action:function(B){var A=this;if(false!==A.boxing().beforeLoad(this)){_.asyRun(function(){A.root.attr({width:"0",height:"0",src:B})})}}}}}});Class("linb.UI.Border","linb.UI",{Instance:{_attachTo:function(F,D){var C=this,B=C.get(0),E;F.append(C);B.$edgeId=linb(F).id();B.$tieId=D;B.$attached=true;if(E=B.properties){if(B.properties.borderActive){var E=B.behavior.TAG,A="tag",G=B.domNode;if(linb.Dom.byId(D)){linb(D).afterMouseover(function(I,H){if(I.properties.disabled){return }_.tryF(E.afterMouseover,[B,H,G],this)},A).afterMouseout(function(I,H){if(I.properties.disabled){return }_.tryF(E.afterMouseout,[B,H,G],this)},A).afterMousedown(function(I,H){if(I.properties.disabled){return }_.tryF(E.afterMousedown,[B,H,G],this)},A).afterMouseup(function(I,H){if(I.properties.disabled){return }_.tryF(E.afterMouseup,[B,H,G],this)},A)}}}return F},_detach:function(){var D=this,C=D.get(0),F,E,B=null,A="tag";delete C.$attached;if(F=C.$tieId){if(F=linb.Dom.byId(F)){linb(F).afterMouseover(B,A).afterMouseout(B,A).afterMousedown(B,A).afterMouseup(B,A)}}return D}},Initialize:function(){_.each({addBorder:function(B){var C=linb([this.get(0)]),A=arguments[1]||C.id();return new linb.UI.Border(B)._attachTo(C,A)},$getBorder:function(){var B=this.id(),A;_.arr.each(linb.UI.Border._cache,function(C){if(C.$edgeId==B){A=C;return false}});return A&&A.boxing()},removeBorder:function(){var A=this.id();_.arr.each(linb.UI.Border._cache,function(B){if(B.$edgeId==A){B.boxing()._detach().destroy()}});return this}},function(B,A){linb.Dom.plugIn(A,B)});_.each({_border:function(B,A){return this.each(function(H){var F=H.properties,G=H.getSubNode(F._customBorder||"BORDER"),D;if(!B){B={}}if(F._customBorder){D=(B._bkey=H.getClass("KEY"))}else{D="linb-border"}var E="setting-"+D,C;C="borderLeftWidth";F.$b_lw=linb.UI.$getCSSValue(E,C);C="borderRightWidth";F.$b_rw=linb.UI.$getCSSValue(E,C);C="borderTopWidth";F.$b_tw=linb.UI.$getCSSValue(E,C);C="borderBottomWidth";F.$b_bw=linb.UI.$getCSSValue(E,C);if(A!==false){if(G.$getBorder()){return }H.$border=G.addBorder(B);H.clearCache().boxing().reLayout()}})},_unBorder:function(){return this.each(function(C){var B=C.getSubNode("BORDER"),A=C.properties;if(!B.$getBorder()){return }B.removeBorder();delete C.$border;delete A.$b_lw;delete A.$b_rw;delete A.$b_tw;delete A.$b_bw;C.clearCache().boxing().reLayout()})}},function(B,A){linb.UI.Widget.plugIn(A,B)});linb.UI.Widget.setDataModel({border:{ini:false,action:function(B){var A=this.boxing();if(B){A._border()}else{A._unBorder()}}}})},Static:{Templates:{tagName:"div",TAG:{},T:{className:"{cls_t}"},RT:{className:"{cls_rt}",$order:1},R:{className:"{cls_r}"},RB:{className:"{cls_rb}",$order:1},B:{className:"{cls_b}"},LB:{className:"{cls_lb}",$order:1},L:{className:"{cls_l}"},LT:{className:"{cls_lt}",$order:1}},Appearances:{KEY:{width:0,height:0,_display:"inline","font-size":0,"line-height":0},"TAG,T, RT, R, RB, B, LB, L, LT":{position:"absolute",display:"block","font-size":0,"line-height":0},".setting-linb-border":{"border-style":"solid","border-top-width":"1px","border-bottom-width":"1px","border-left-width":"1px","border-right-width":"1px"},T:{width:"100%",left:0,top:"-1px",height:"3px",background:linb.UI.$bg("vertical.gif","repeat-x left top")},B:{width:"100%",left:0,bottom:"-1px",height:"3px",background:linb.UI.$bg("vertical.gif","repeat-x left bottom")},L:{height:"100%",top:0,left:"-1px",width:"3px",background:linb.UI.$bg("horizontal.gif","repeat-y left top")},R:{height:"100%",top:0,right:"-1px",width:"3px",background:linb.UI.$bg("horizontal.gif","repeat-y right top")},LT:{top:"-1px",left:"-1px",width:"3px",height:"3px",background:linb.UI.$bg("corner.gif","no-repeat left top")},RT:{top:"-1px",right:"-1px",width:"3px",height:"3px",background:linb.UI.$bg("corner.gif","no-repeat right top")},RB:{right:"-1px",bottom:"-1px",width:"3px",height:"3px",background:linb.UI.$bg("corner.gif","no-repeat right bottom")},LB:{left:"-1px",bottom:"-1px",width:"3px",height:"3px",background:linb.UI.$bg("corner.gif","no-repeat left bottom")}},Behaviors:{HoverEffected:{TAG:"KEY"},ClickEffected:{TAG:"KEY"}},DataModel:{_bkey:"",borderActive:false},_prepareData:function(A){var C=arguments.callee.upper.call(this,A),B=A.properties._bkey;C.cls_t=B?B+"-b-t":"";C.cls_rt=B?B+"-b-rt":"";C.cls_r=B?B+"-b-r":"";C.cls_rb=B?B+"-b-rb":"";C.cls_b=B?B+"-b-b":"";C.cls_lb=B?B+"-b-lb":"";C.cls_l=B?B+"-b-l":"";C.cls_lt=B?B+"-b-lt":"";return C}}});Class("linb.UI.Shadow","linb.UI",{Instance:{_attachTo:function(B){B=B.reBoxing();var A=this;A.get(0)._target=B.get(0);B.append(A);return B}},Initialize:function(){_.each({addShadow:function(A){return new linb.UI.Shadow(A)._attachTo(linb([this.get(0)],false))},$getShadow:function(){var B=this.get(0),A;_.arr.each(linb.UI.Shadow._cache,function(C){if(C._target==B){A=C;return false}});return A&&A.boxing()},removeShadow:function(){var A=this.get();_.arr.each(linb.UI.Shadow._cache,function(B){if(_.arr.indexOf(A,linb(B._target).get(0))!=-1){B.boxing().destroy()}});return this}},function(B,A){linb.Dom.plugIn(A,B)});_.each({_shadow:function(A){return this.each(function(D){var B=D.getSubNode("BORDER");if(B.$getShadow()){return }var C=D.properties;D.$shadow=B.addShadow({shadowSize:C._shadowSize})})},_unShadow:function(){return this.each(function(B){var A=B.getSubNode("BORDER");if(!A.$getShadow()){return }A.removeShadow();delete B.$shadow})}},function(B,A){linb.UI.Widget.plugIn(A,B)});linb.UI.Widget.setDataModel({shadow:{ini:false,action:function(B){var A=this.boxing();if(B){A._shadow()}else{A._unShadow()}}},_shadowSize:this.SIZE})},Static:{SIZE:8,Templates:{tagName:"div",R:{tagName:"div",style:"top:{shadowOffset}px;width:{shadowSize}px;right:-{pos}px;"},RB:{tagName:"div",style:"height:{rbsize}px;width:{rbsize}px;right:-{pos}px;bottom:-{pos}px;"},B:{tagName:"div",style:"left:{shadowOffset}px;height:{shadowSize}px;bottom:-{pos}px;"}},Appearances:{KEY:{width:0,height:0,_display:"inline","_font-size":0,"_line-height":0},"B, RB, R":{position:"absolute",display:"block","*font-size":0,"*line-height":0,"z-index":"-1"},B:{left:0,width:"100%",background:linb.browser.ie6?"":linb.UI.$bg("bottom.png","repeat-x left bottom"),_filter:linb.UI.$ieBg("bottom.png")},RB:{background:linb.browser.ie6?"":linb.UI.$bg("right_bottom.png","left top"),_filter:linb.UI.$ieBg("right_bottom.png")},R:{top:0,height:"100%",background:linb.browser.ie6?"":linb.UI.$bg("right.png","repeat-y right top"),_filter:linb.UI.$ieBg("right.png")}},DataModel:{shadowSize:{ini:8,action:function(C){var B=this,A=B.properties.shadowOffset;B.getSubNode("R").cssRegion({width:C,top:A,right:-C-A});B.getSubNode("RB").cssRegion({width:C,height:C,right:-C-A+1,bottom:-C-A+1});B.getSubNode("B").cssRegion({height:C,left:A,bottom:-C-A})}},shadowOffset:{ini:0,action:function(A){this.boxing().setShadowSize(this.properties.shadowSize,true)}}},_prepareData:function(B){var A=arguments.callee.upper.call(this,B);A.pos=(parseInt(A.shadowSize)||0)+(parseInt(A.shadowOffset)||0);A.rbsize=A.shadowSize+4;return A},LayoutTrigger:function(){if(linb.browser.ie){this.root.ieRemedy()}}}});Class("linb.UI.Resizer","linb.UI",{Instance:{_attachTo:function(D,C){var B=this,A=B.get(0);A._target=linb(D);A._parent=C||linb("body");A._parent.append(B);A.$resizeId=linb(D).id();return B},show:function(){var A=this;A.each(function(B){B.root.css("display",B.$display||"block")});if(linb.browser.ie){A.reBoxing().ieRemedy()}return A},hide:function(){var A=this;A.each(function(B){B.$display=B.root.css("display")});A.reBoxing().css("display","none");return A}},Initialize:function(){this.addTemplateKeys(["HANDLER","HIDDEN","MOVE","L","R","T","B","LT","RT","LB","RB"]);_.each({addResizer:function(B,A){var D=linb([this.get(0)]);B=B||{};_.merge(B,{_attached:true});var C=new linb.UI.Resizer(B)._attachTo(D,D);if(A){C.onUpdate(A)}return C},removeResizer:function(){var A=this.id();_.arr.each(linb.UI.Resizer._cache,function(B){if(B.$resizeId==A){B.boxing().destroy()}});return this},$getResizer:function(){var B=this.id(),A;_.arr.each(linb.UI.Resizer._cache,function(C){if(C.$resizeId==B){A=C;return false}});return A&&A.boxing()}},function(B,A){linb.Dom.plugIn(A,B)});_.each({_resizer:function(B,A){return this.each(function(E){var C=E.getSubNode("BORDER"),D=E.properties;if(C.$getResizer()){return }A=A||{};var F=function(N,L,P,H){var J=arguments.callee.profile,I=J.root,G=J.properties,O;if(P){var M=null,K=null;if(O=P.width){I.widthBy(O);G.width=M=I.width()}if(O=P.height){I.heightBy(O);G.height=K=I.height()}linb.UI.$tryResize(J,M,K,true)}if(H){if((O=H.left)&&!(G.left=="auto"&&parseInt(G.right)>=0)){I.leftBy(O);G.left=I.left()}if((O=H.top)&&!(G.top=="auto"&&parseInt(G.bottom)>=0)){I.topBy(O);G.top=I.top()}}};F.profile=E;E.$resizer=C.addResizer(A,F)})},_unResizer:function(){return this.each(function(B){var A=B.getSubNode("BORDER");if(!A.$getResizer()){return }A.removeResizer();delete B.$resizer})}},function(B,A){linb.UI.Widget.plugIn(A,B)});linb.UI.Widget.setDataModel({resizer:{ini:false,action:function(C){var B=this.boxing();if(C){var D=this.properties,A={};_.each("minHeight,minWidth,maxHeight,maxWidth".split(","),function(E){if(E in D){A[E]=D[E]}});B._resizer(C,A)}else{B._unResizer()}}}})},Static:{Templates:{tagName:"div",style:"{_style};"},Appearances:{KEY:{position:"absolute",margin:"0 -1px -1px 0",visibility:"visible","_font-size":0,"_line-height":0,"*background":"url("+linb.ini.path+"bg.gif)","z-index":60,cursor:"move"},MOVE:{position:"absolute",display:"block","z-index":100,visibility:"visible",background:linb.UI.$bg("icons.gif","no-repeat -17px -244px",true),"_font-size":0,"_line-height":0},HANDLER:{$order:0,position:"absolute",display:"block",border:"solid 1px","background-color":"#fff","z-index":100,visibility:"visible","_font-size":0,"_line-height":0},T:{$order:1,left:"50%",cursor:"n-resize"},RT:{$order:1,cursor:"ne-resize","z-index":110},R:{$order:1,top:"50%",cursor:"e-resize"},RB:{$order:1,cursor:"se-resize","z-index":110},B:{$order:1,left:"50%",cursor:"s-resize"},LB:{$order:1,cursor:"sw-resize","z-index":110},L:{$order:1,top:"50%",cursor:"w-resize"},LT:{$order:1,cursor:"nw-resize","z-index":110},HIDDEN:{$order:10,"background-color":"transparent","border-width":0}},Behaviors:{onMousedown:function(A,B,C){A.box._onMousedown(A,B,C,{move:true})},onDragbegin:function(A,B,C){A.box._onDragbegin(A,B,C)},onDrag:function(A,B,C){A.box._onDrag(A,B,C,{move:true})},onDragstop:function(A,B,C){A.box._onDragstop(A,B,C,{move:true})},LT:{onMousedown:function(A,B,C){A.box._onMousedown(A,B,C,{left:true,top:true})},onDragbegin:function(A,B,C){A.box._onDragbegin(A,B,C)},onDrag:function(A,B,C){A.box._onDrag(A,B,C,{left:true,top:true})},onDragstop:function(A,B,C){A.box._onDragstop(A,B,C,{left:true,top:true})}},RT:{onMousedown:function(A,B,C){A.box._onMousedown(A,B,C,{right:true,top:true})},onDragbegin:function(A,B,C){A.box._onDragbegin(A,B,C)},onDrag:function(A,B,C){A.box._onDrag(A,B,C,{right:true,top:true})},onDragstop:function(A,B,C){A.box._onDragstop(A,B,C,{right:true,top:true})}},LB:{onMousedown:function(A,B,C){A.box._onMousedown(A,B,C,{left:true,bottom:true})},onDragbegin:function(A,B,C){A.box._onDragbegin(A,B,C)},onDrag:function(A,B,C){A.box._onDrag(A,B,C,{left:true,bottom:true})},onDragstop:function(A,B,C){A.box._onDragstop(A,B,C,{left:true,bottom:true})}},RB:{onMousedown:function(A,B,C){A.box._onMousedown(A,B,C,{right:true,bottom:true})},onDragbegin:function(A,B,C){A.box._onDragbegin(A,B,C)},onDrag:function(A,B,C){A.box._onDrag(A,B,C,{right:true,bottom:true})},onDragstop:function(A,B,C){A.box._onDragstop(A,B,C,{right:true,bottom:true})}},L:{onMousedown:function(A,B,C){A.box._onMousedown(A,B,C,{left:true})},onDragbegin:function(A,B,C){A.box._onDragbegin(A,B,C)},onDrag:function(A,B,C){A.box._onDrag(A,B,C,{left:true})},onDragstop:function(A,B,C){A.box._onDragstop(A,B,C,{left:true})}},T:{onMousedown:function(A,B,C){A.box._onMousedown(A,B,C,{top:true})},onDragbegin:function(A,B,C){A.box._onDragbegin(A,B,C)},onDrag:function(A,B,C){A.box._onDrag(A,B,C,{top:true})},onDragstop:function(A,B,C){A.box._onDragstop(A,B,C,{top:true})}},R:{onMousedown:function(A,B,C){A.box._onMousedown(A,B,C,{right:true})},onDragbegin:function(A,B,C){A.box._onDragbegin(A,B,C)},onDrag:function(A,B,C){A.box._onDrag(A,B,C,{right:true})},onDragstop:function(A,B,C){A.box._onDragstop(A,B,C,{right:true})}},B:{onMousedown:function(A,B,C){A.box._onMousedown(A,B,C,{bottom:true})},onDragbegin:function(A,B,C){A.box._onDragbegin(A,B,C)},onDrag:function(A,B,C){A.box._onDrag(A,B,C,{bottom:true})},onDragstop:function(A,B,C){A.box._onDragstop(A,B,C,{bottom:true})}}},DataModel:{_attached:false,forceVisible:false,forceMovable:false,singleDir:false,vertical:true,horizontal:true,minHeight:12,minWidth:12,maxHeight:5000,maxWidth:5000,handlerSize:4,handlerOffset:0,left:100,top:100,height:100,width:100,position:"absolute",display:"block"},EventHandlers:{onUpdate:function(C,D,B,A){}},_dynamicTemplate:function(C){var F=C.properties,J,E,H,D=C._exhash="$_attached:"+F._attached+";forceVisible:"+F.forceVisible+";singleDir:"+F.singleDir+";vertical:"+F.vertical+";horizontal:"+F.horizontal+";forceMovable:"+F.forceMovable+";";var A=arguments.callee.map||(arguments.callee.map={MOVE:{tagName:"div",style:"top:50%;left:50%;margin-left:-6px;margin-top:-6px;width:13px;height:13px;"},T:{tagName:"div",style:"top:-{extend}px;margin-left:-{extend}px;width:{handlerSize}px;height:{handlerSize}px;"},RT:{tagName:"div",style:"top:-{extend}px;right:-{extend}px;width:{handlerSize}px;height:{handlerSize}px;"},R:{tagName:"div",style:"right:-{extend}px;margin-top:-{extend}px;width:{handlerSize}px;height:{handlerSize}px;"},RB:{tagName:"div",style:"bottom:-{extend}px;right:-{extend}px;width:{handlerSize}px;height:{handlerSize}px;"},B:{tagName:"div",style:"bottom:-{extend}px;margin-left:-{extend}px;width:{handlerSize}px;height:{handlerSize}px;"},LB:{tagName:"div",style:"bottom:-{extend}px;left:-{extend}px;width:{handlerSize}px;height:{handlerSize}px;"},L:{tagName:"div",style:"left:-{extend}px;margin-top:-{extend}px;width:{handlerSize}px;height:{handlerSize}px;"},LT:{tagName:"div",style:"left:-{extend}px;top:-{extend}px;width:{handlerSize}px;height:{handlerSize}px;"},cover:{T:{tagName:"div",style:"width:100%;left:0;top:-{extend}px;height:{handlerSize}px;"},RT:{tagName:"div",style:"top:-{extend}px;right:-{extend}px;width:{handlerSize}px;height:{handlerSize}px;"},R:{tagName:"div",style:"height:100%;top:0;right:-{extend}px;width:{handlerSize}px;"},RB:{tagName:"div",style:"right:-{extend}px;bottom:-{extend}px;width:{handlerSize}px;height:{handlerSize}px;"},B:{tagName:"div",style:"width:100%;left:0;bottom:-{extend}px;height:{handlerSize}px;"},LB:{tagName:"div",style:"left:-{extend}px;bottom:-{extend}px;width:{handlerSize}px;height:{handlerSize}px;"},L:{tagName:"div",style:"height:100%;top:0;left:-{extend}px;width:{handlerSize}px;"},LT:{tagName:"div",style:"top:-{extend}px;left:-{extend}px;width:{handlerSize}px;height:{handlerSize}px;"}}});var G=C.box.getTemplate(D);if(!G){var I,B;G=_.clone(C.box.getTemplate());I=F._cover?A.cover:A;if(F._move){G.MOVE=A.MOVE}if(F.vertical){if(!F.singleDir){G.T=I.T}G.B=I.B}if(F.horizontal){if(!F.singleDir){G.L=I.L}G.R=I.R;if(F.vertical){if(!F.singleDir){G.LB=I.LB;G.RT=I.RT;G.LT=I.LT}G.RB=I.RB}}B=C.getClass("KEY","-handler")+" ";if(I=G.T){I.className=B}if(I=G.RT){I.className=B}if(I=G.R){I.className=B}if(I=G.RB){I.className=B}if(I=G.B){I.className=B}if(I=G.LB){I.className=B}if(I=G.L){I.className=B}if(I=G.LT){I.className=B}if(!F._visible){B=C.getClass("KEY","-hidden")+" ";if(I=G.T){I.className+=B}if(I=G.RT){I.className+=B}if(I=G.R){I.className+=B}if(I=G.RB){I.className+=B}if(I=G.B){I.className+=B}if(I=G.LB){I.className+=B}if(I=G.L){I.className+=B}if(I=G.LT){I.className+=B}}C.box.setTemplate(G,D)}C.template=G},_prepareData:function(B){var A=B.properties;A._visible=true;A._cover=false;A._move=true;if(A._attached){A._visible=false;A._cover=true;A._move=false;A.position="static";A.display="inline";A.left=A.top=A.width=A.height=0}if(A.forceVisible){A._visible=true;A._cover=false}if(A.forceMovable){A._move=true}A.extend=(parseInt(A.handlerSize)||0)/2+(parseInt(A.handlerOffset)||0);return arguments.callee.upper.call(this,B)},RenderTrigger:function(){var A=this;A.domNode.zIndexIgnore=true;if(!A.onUpdate){A.onUpdate=A.box.onUpdate}},onUpdate:function(D,E,C,A){if(E){if(C){E.widthBy(C.width,true).heightBy(C.height,true)}if(A){var B=E.get(0).style;if(B.left=="auto"&&(parseInt(B.right)>=0)){}else{E.leftBy(A.left)}if(B.top=="auto"&&(parseInt(B.bottom)>=0)){}else{E.topBy(A.top)}}}},_onMousedown:function(B,C,D,A){var E=linb.Event.getPos(C);linb([D]).startDrag(C,{dragDefer:1,targetReposition:false,dragType:"blank",dragCursor:true,targetLeft:E.left,targetTop:E.top})},_onDragbegin:function(C,D){var E=C.properties._attached?C._target:linb([C.domNode]),A=E.width(),B=E.height();if(C.properties._attached){var F=E.offset();C.proxy=linb.Dom.getEmptyDiv();C.proxy.html(" ",false).css({border:"1px dashed",visibility:"visible"}).offset(F).width(A).height(B).css("zIndex",linb.Dom.TOP_ZINDEX+20)}else{C.proxy=E}C.o_pos=C.proxy.cssPos();C.o_w2=C.o_w=A;C.o_h2=C.o_h=B;C.$onDrag=true},_onDrag:function(D,G,B,L){var C=L;D.oos=D.oos||{};var E=linb.DragDrop.getProfile().offset;if(E.x==D.oos.width&&E.y==D.oos.height){return }D.oos=E;var J,I,K,F,M=D.properties;if(C.left){K=D.o_w-E.x;J=D.o_pos.left+E.x;if(K<M.minWidth){K=M.minWidth;J=D.o_w+D.o_pos.left-K}else{if(K>M.maxWidth){K=M.maxWidth;J=D.o_w+D.o_pos.left-K}}D.proxy.width(K).left(J)}else{if(C.right){K=D.o_w+E.x;if(K<M.minWidth){K=M.minWidth}else{if(K>M.maxWidth){K=M.maxWidth}}D.proxy.width(K)}}if(C.left||C.right){var A=K-D.o_w2;if(D.regions&&A!==0){D.regions.widthBy(A);D.o_w2=K}}if(C.top){F=D.o_h-E.y;I=D.o_pos.top+E.y;if(F<M.minHeight){F=M.minHeight;I=D.o_h+D.o_pos.top-F}else{if(F>M.maxHeight){F=M.maxHeight;I=D.o_h+D.o_pos.top-F}}D.proxy.height(F).top(I)}else{if(C.bottom){F=D.o_h+E.y;if(F<M.minHeight){F=M.minHeight}else{if(F>M.maxHeight){F=M.maxHeight}}D.proxy.height(F)}}if(C.top||C.bottom){var H=F-D.o_h2;if(D.regions&&H!==0){D.regions.heightBy(H);D.o_h2=F}}if(C.move){J=D.o_pos.left+E.x;I=D.o_pos.top+E.y;D.proxy.top(I).left(J)}},_onDragstop:function(D,E,G,B){var A,C,H,F=D.proxy;if(!B.move){C={width:F.width()-D.o_w,height:F.height()-D.o_h}}if(B.left||B.top||B.move){A=F.cssPos();H={left:A.left-D.o_pos.left,top:A.top-D.o_pos.top}}D.boxing().onUpdate(D,D._target,C,H);if(D.properties._attached){if(linb.browser.ie6){D._target.ieRemedy()}D.proxy.html("",false).css({visibility:"hidden",zIndex:"0",width:"0",height:"0"})}D.$onDrag=false}}});Class("linb.UI.Block","linb.UI.Widget",{Initialize:function(){var A=this,B=A.getTemplate();_.merge(B.FRAME.BORDER,{className:"uiw-border {clsBorderType1}",PANEL:{tagName:"div",className:"{clsBorderType2} uibg-bar",style:"{background}",text:"{html}"+linb.UI.$childTag}},"all");A.setTemplate(B);B=A.getAppearance();_.merge(B,{PANEL:{position:"relative",overflow:"auto"}});A.setAppearance(B)},Static:{Behaviors:{DropableKeys:["PANEL"]},DataModel:{disabled:null,tips:null,html:{action:function(A){this.getSubNode("PANEL").html(A)}},borderType:{ini:"outset",listbox:["none","inset","outset","groove","ridge"],action:function(I){var G=this,A=G.properties,F=G.getSubNode("BORDER"),D=G.getSubNode("PANEL"),C=/^uiborder-/,E="uiborder-inset",B="uiborder-outset",H=G.root;F.removeClass(C);D.removeClass(C);switch(I){case"inset":F.addClass(E);break;case"outset":F.addClass(B);break;case"groove":F.addClass(E);D.addClass(B);break;case"ridge":F.addClass(B);D.addClass(E);break}G.box._setB(G);linb.UI.$tryResize(G,H.width(),H.height())}},background:{ini:"",action:function(A){this.getSubNode("PANEL").css("background",A)}},width:100,height:100},_setB:function(B){var C=B.properties,A=C.borderType;C.$hborder=C.$vborder=C.$iborder=0;if(A=="inset"||A=="outset"){C.$hborder=C.$vborder=1;C.$iborder=0}else{if(A=="groove"||A=="ridge"){C.$hborder=C.$vborder=C.$iborder=1}}},LayoutTrigger:function(){var A=this.properties.borderType;if(A!="none"){this.boxing().setBorderType(A,true)}},_prepareData:function(A){var B=arguments.callee.upper.call(this,A);B.background=B.background?"background:"+B.background:"";return B},_onresize:function(E,D,B){var C=arguments.callee.upper.apply(this,arguments),F=E.properties,A=(F.$iborder||0)*2;if(C.width){C.width-=A}if(C.height){C.height-=A}E.getSubNode("PANEL").cssSize(C,true)}}});Class("linb.UI.Label","linb.UI.Widget",{Instance:{_shadowText:function(A){return this.each(function(B){B.getSubNode("SHADOW").css("display","block")})},_unShadowText:function(A){return this.each(function(B){B.getSubNode("SHADOW").css("display","none")})}},Initialize:function(){var A=this.getTemplate();_.merge(A.FRAME.BORDER,{SHADOW:{$order:1,style:"display:none;",SICON:{style:"background:url({image}) transparent no-repeat {imagePos};{iconDisplay}",className:"ui-icon",$order:0},SCAPTION:{text:"{caption}",style:"color:#cdcdcd;",$order:1}},BOX:{$order:2,ICON:{style:"background:url({image}) transparent no-repeat {imagePos};{iconDisplay}",className:"ui-icon",$order:0},CAPTION:{text:"{caption}",$order:1}}},"all");this.setTemplate(A)},Static:{Appearances:{KEY:{"font-size":"12px","line-height":"14px"},BOX:{position:"absolute"},SHADOW:{position:"absolute",top:"4px"}},DataModel:{tabindex:null,caption:{ini:undefined,action:function(D){var C=this,E=C.properties,A=C.boxing(),B=C.keys;C.getSubNodes(["CAPTION","SCAPTION"]).html(D,false);if(E.hAlign!="left"){A.setHAlign(E.hAlign,true)}if(E.vAlign!="top"){A.setVAlign(E.vAlign,true)}}},image:{action:function(C){var B=this,A=B.keys;B.getSubNodes(["ICON","SICON"]).css("display",C?"":"none").css("backgroundImage","url("+(C||"")+")")}},imagePos:{action:function(C){var B=this,A=B.keys;B.getSubNodes(["ICON","SICON"]).css("backgroundPosition",C)}},shadowText:{ini:false,action:function(B){var A=this.boxing();B=String(B).toLowerCase()!="false";if(B){A._shadowText(B)}else{A._unShadowText()}}},hAlign:{ini:"right",listbox:["left","center","right"],action:function(B){var A=this,E=A.getSubNode("BOX"),D=A.getSubNode("SHADOW"),C=A.properties;switch(B){case"left":E.css({left:0,right:"auto",marginLeft:"auto"});D.css({left:C._textSshadowSize+"px",right:"auto",marginLeft:"auto"});break;case"right":E.css({left:"auto",right:C._textSshadowSize+"px",marginLeft:"auto"});D.css({left:"auto",right:0,marginLeft:"auto"});break;case"center":E.css({left:"50%",right:"auto",marginLeft:-1*E.get(0).offsetWidth/2+"px"});D.css({left:"50%",right:"auto",marginLeft:-1*E.get(0).offsetWidth/2+C._textSshadowSize+"px"});break}}},vAlign:{ini:"top",listbox:["top","middle","bottom"],action:function(B){var A=this,E=A.getSubNode("BOX"),D=A.getSubNode("SHADOW"),C=A.properties;switch(B){case"top":E.css({top:0,bottom:"auto",marginTop:"auto"});D.css({top:C._textSshadowSize+"px",bottom:"auto",marginTop:"auto"});break;case"bottom":E.css({top:"auto",bottom:C._textSshadowSize+"px",marginTop:"auto"});D.css({top:"auto",bottom:0,marginTop:"auto"});break;case"middle":E.css({top:"50%",bottom:"auto",marginTop:-1*E.get(0).offsetHeight/2+"px"});D.css({top:"50%",bottom:"auto",marginTop:-1*E.get(0).offsetHeight/2+C._textSshadowSize+"px"});break}}},fontSize:{action:function(B){var A=this;A.getSubNodes(["CAPTION","SCAPTION"]).css("fontSize",B)}},fontWeight:{action:function(B){var A=this;A.getSubNodes(["CAPTION","SCAPTION"]).css("fontWeight",B)}},width:120,height:20,_textSshadowSize:4},RenderTrigger:function(){var A=this.properties,B=this.boxing();if(A.fontSize){B.setFontSize(A.fontSize,true)}if(A.fontWeight){B.setFontWeight(A.fontWeight,true)}if(A.shadowText){B.setShadowText(true,true)}},LayoutTrigger:function(){var B=this.properties,C=this.boxing(),A=B.shadowText;if(B.hAlign!="left"||A){C.setHAlign(B.hAlign,true)}if(B.vAlign!="top"||A){C.setVAlign(B.vAlign,true)}}}});Class("linb.UI.ProgressBar",["linb.UI.Widget","linb.absValue"],{Instance:{_setCtrlValue:function(A){return this.each(function(B){B.getSubNode("FILL").width(A+"%");B.getSubNode("CAP").text(B.properties.captionTpl.replace(/\{value\}/g,A))})}},Initialize:function(){var A=this,B=A.getTemplate();_.merge(B.FRAME.BORDER,{FILL:{tagName:"div",style:"width:{value}%;{fillBG}",text:"{html}"+linb.UI.$childTag},INN:{$order:2,tagName:"div",CAP:{tagName:"div"}}},"all");A.setTemplate(B);B=A.getAppearance();_.merge(B,{BORDER:{border:"1px solid #95B611","font-size":0,"line-height":0},INN:{display:"table",position:"absolute",left:0,top:0,width:"100%",height:"100%"},CAP:{"text-align":"center"},FILL:{position:"absolute",width:"1px",left:0,top:0,height:"100%",background:linb.UI.$bg("bar.gif","#96E115 repeat-x left top"),width:0}});A.setAppearance(B)},Static:{DataModel:{value:0,width:300,height:22,captionTpl:{ini:"{value}%",action:function(){this.boxing()._setCtrlValue(this.properties.$UIvalue)}},fillBG:{ini:"",action:function(A){this.getSubNode("FILL").css("background",A)}},$hborder:1,$vborder:1},_prepareData:function(A){var B=arguments.callee.upper.call(this,A);B.fillBG=B.fillBG?"background:"+B.fillBG:"";return B},_ensureValue:function(A,B){return parseInt(B)||0},_onresize:function(E,D,A){var B=arguments.callee.upper.apply(this,arguments),C;if(B.height){C=B.height+"px";E.getSubNodes(["INN","CAP","FILL"]).css({height:C,"line-height":C})}}}});Class("linb.UI.Button",["linb.UI.Widget","linb.absValue"],{Instance:{activate:function(){this.getSubNode("FOCUS").focus();return this},_setCtrlValue:function(A){if(_.isNull(A)||!_.exists(A)){A=false}return this.each(function(D){var C=D.properties;if(C.type!="status"){return }D.getSubNode("BORDER").tagClass("-checked",A);if(C.border){var B=D.getSubNode("BORDER").$getBorder();if(B){B.get(0).root.tagClass("-checked",A)}}})}},Initialize:function(){this.addTemplateKeys(["DROP"]);var A=this.getTemplate();_.merge(A.FRAME,{FOCUS:{$order:2,tagName:"a",href:"{href}",tabindex:"{tabindex}",TB:{cellpadding:"0",cellspacing:"0",width:"100%",height:"100%",border:"0",tagName:"table",TR:{tagName:"tr",TDL:{tagName:"td"},TD:{$order:1,align:"{hAlign}",valign:"{vAlign}",tagName:"td",width:"100%",height:"100%",BOX:{ICON:{$order:1,className:"ui-icon",style:"background:url({image}) transparent no-repeat  {imagePos};{iconDisplay}"},CAPTION:{$order:2,text:"{caption}"}}},TDR:{$order:2,tagName:"td",className:"{dropCls}",TDRI:{}}}}}},"all");this.setTemplate(A)},Static:{Appearances:{KEY:{"font-size":"12px","line-height":"14px"},BORDER:{"font-size":0,"line-height":0,"background-color":"#D2D7DF"},"BORDER-mouseover":{$order:2,"background-color":"#F7D928"},"BORDER-mousedown, BORDER-checked":{$order:2,"background-color":"#F9E56A"},DROP:{$order:10,background:linb.UI.$bg("drop.gif","no-repeat left bottom","Button"),"padding-left":"16px"},"DROP-mouseover":{$order:11,"background-position":"-16px bottom"},"DROP-mousedown":{$order:12,"background-position":"right bottom"},"TDR,TDL":{"padding-left":"6px"},".setting-linb-button":{"border-top-width":"1px","border-bottom-width":"1px","border-left-width":"1px","border-right-width":"1px"},"KEY-b-t":{top:"-1px",height:"10px",background:linb.UI.$bg("vertical.gif","repeat-x left top","Button")},"KEY-b-b":{bottom:"-1px",height:"10px",background:linb.UI.$bg("vertical.gif","repeat-x left bottom","Button")},"BORDER-mouseover KEY-b-t, BORDER-mouseover KEY-b-b":{$order:1,"background-image":linb.UI.$bg("vertical_mouseover.gif","","Button")},"BORDER-checked KEY-b-t, BORDER-checked KEY-b-b, BORDER-mousedown KEY-b-t, BORDER-mousedown KEY-b-b":{$order:2,"background-image":linb.UI.$bg("vertical_mousedown.gif","","Button")},"KEY-b-l":{left:"-1px",width:"4px",background:linb.UI.$bg("horizontal.gif","repeat-y left top","Button")},"KEY-b-r":{right:"-1px",width:"4px",background:linb.UI.$bg("horizontal.gif","repeat-y right top","Button")},"BORDER-mouseover KEY-b-l, BORDER-mouseover KEY-b-r":{$order:1,"background-image":linb.UI.$bg("horizontal_mouseover.gif","","Button")},"BORDER-checked KEY-b-l, BORDER-checked KEY-b-r, BORDER-mousedown KEY-b-l, BORDER-mousedown KEY-b-r":{$order:2,"background-image":linb.UI.$bg("horizontal_mousedown.gif","","Button")},"KEY-b-lt":{top:"-1px",left:"-1px",width:"4px",height:"10px",background:linb.UI.$bg("corner.gif","no-repeat left top","Button")},"KEY-b-rt":{top:"-1px",right:"-1px",width:"4px",height:"10px",background:linb.UI.$bg("corner.gif","no-repeat right top","Button")},"KEY-b-rb":{right:"-1px",bottom:"-1px",width:"4px",height:"10px",background:linb.UI.$bg("corner.gif","no-repeat right bottom","Button")},"KEY-b-lb":{left:"-1px",bottom:"-1px",width:"4px",height:"10px",background:linb.UI.$bg("corner.gif","no-repeat left bottom","Button")},"BORDER-mouseover KEY-b-lt, BORDER-mouseover KEY-b-rt, BORDER-mouseover KEY-b-rb, BORDER-mouseover KEY-b-lb":{$order:1,"background-image":linb.UI.$bg("corner_mouseover.gif","","Button")},"BORDER-checked KEY-b-lt, BORDER-checked KEY-b-rt, BORDER-checked KEY-b-rb, BORDER-checked KEY-b-lb, BORDER-mousedown KEY-b-lt, BORDER-mousedown KEY-b-rt, BORDER-mousedown KEY-b-rb, BORDER-mousedown KEY-b-lb":{$order:2,"background-image":linb.UI.$bg("corner_mousedown.gif","","Button")},FOCUS:{overflow:"hidden",display:"block",left:0,top:0,"z-index":"20",width:"100%",height:"100%",position:"absolute","-moz-outline-offset":"-1px !important"},BOX:{display:"inline","white-space":"nowrap"},CAPTION:{cursor:"pointer","vertical-align":"middle",display:"inline","font-size":"12px","line-height":"14px"}},Behaviors:{HoverEffected:{KEY:["BORDER"]},ClickEffected:{KEY:["BORDER"]},NavKeys:{FOCUS:1},onClick:function(B,D,E){var C=B.properties;if(C.disabled){return false}B.getSubNode("FOCUS").focus();var A=B.boxing();if(C.type=="status"){A.setUIValue(!C.$UIvalue);if(B.onChecked){A.onChecked(B,D,C.$UIvalue)}}if(B.onClick){A.onClick(B,D,E,C.$UIvalue)}},TDR:{onMousedown:function(A){if(A.properties.type!="drop"){return }linb([this]).addClass(A.getClass("DROP","-mousedown"));return false},onMouseup:function(A){if(A.properties.type!="drop"){return }linb([this]).removeClass(A.getClass("DROP","-mousedown"));return false},onMouseover:function(A){if(A.properties.type!="drop"){return }linb([this]).addClass(A.getClass("DROP","-mouseover"))},onMouseout:function(A){if(A.properties.type!="drop"){return }linb([this]).removeClass(A.getClass("DROP","-mouseover")).removeClass(A.getClass("DROP","-mousedown"))},onClick:function(A,B,C){if(A.properties.type!="drop"){return }A.boxing().onClickDrop(A,B,C);return false}}},DataModel:{caption:{ini:undefined,action:function(A){this.getSubNode("CAPTION").get(0).innerHTML=A}},image:{action:function(A){this.getSubNode("ICON").css("display",A?"":"none").css("backgroundImage","url("+(A||"")+")")}},imagePos:{action:function(A){this.getSubNode("ICON").css("backgroundPosition",A)}},hAlign:{ini:"center",listbox:["left","center","right"],action:function(A){this.getSubNode("TD").attr("align",A)}},vAlign:{ini:"middle",listbox:["top","middle","bottom"],action:function(A){this.getSubNode("TD").attr("valign",A)}},href:linb.$href,value:false,type:{ini:"normal",listbox:["normal","status","drop"],action:function(E){var C=this,A=C.getRoot(),D=C.getSubNode("TDR"),B=C.getClass("DROP");if(E=="drop"){D.addClass(B)}else{D.removeClass(B)}C.box._onresize(C)}},width:120,height:22,_customBorder:"BORDER",border:true},_ensureValue:function(A,B){return !!B},_prepareData:function(A){var B=arguments.callee.upper.call(this,A);B.dropCls=B.type=="drop"?A.getClass("DROP"):"";return B},RenderTrigger:function(){var A=this,B=A.properties,C=A.boxing();if(B.type=="status"&&B.value){C.setValue(true,true)}},EventHandlers:{onClick:function(A,C,D,B){},onClickDrop:function(A,B,C){},onChecked:function(A,C,B){}}}});Class("linb.UI.CheckBox","linb.UI.Button",{Instance:{_setCtrlValue:function(A){return this.each(function(B){B.getSubNode("MARK").tagClass("-checked",!!A)})},_setDirtyMark:function(){return this.each(function(C){if(!C.properties.dirtyMark){return }if(!C.domNode){return }var B=C.properties,E=C.getSubNode("CAPTION"),A=B.value!==B.$UIvalue,D=linb.UI.$css_tag_dirty;if(E.beforeDirtyMark&&false===E.boxing().beforeDirtyMark(C,A)){return }if(A){E.addClass(D)}else{E.removeClass(D)}})}},Initialize:function(){var A=this.getTemplate();_.merge(A.FRAME.FOCUS.TB.TR.TD.BOX,{MARK:{$order:0,className:"uicmd-check"}},"all");this.setTemplate(A)},Static:{Appearances:{KEY:{"font-size":"12px","line-height":"14px",border:0,cursor:"pointer"},BORDER:{},FOCUS:{overflow:"hidden",display:"block",position:"absolute",left:0,top:0,"z-index":"200",width:"100%",height:"100%","-moz-outline-offset":"-1px !important"},BOX:{display:linb.$inlineBlock,zoom:linb.browser.ie6?1:null,"font-size":"12px","line-height":"14px",overflow:"hidden","vertical-align":"middle","white-space":"nowrap"},TD:{background:"transparent"},TDR:{background:"transparent"},TDL:{background:"transparent"},CAPTION:{display:"inline","white-space":"normal","vertical-align":"middle",cursor:"pointer",zoom:linb.browser.ie?0:null}},Behaviors:{HoverEffected:{KEY:"MARK"},ClickEffected:{KEY:"MARK"},onClick:function(B,D,E){var C=B.properties,A=B.boxing();if(C.disabled){return false}A.setUIValue(!C.$UIvalue);if(B.onChecked){A.onChecked(B,C.$UIvalue)}B.getSubNode("FOCUS").focus()},FOCUS:{onKeydown:function(B,C,D){var A=linb.Event.getKey(C)[0];if(A==" "||A=="enter"){B.root.onClick(true);return false}}}},DataModel:{type:null,value:false,hAlign:"left",_customBorder:false,border:false},EventHandlers:{onClick:null},_ensureValue:function(A,B){return !!B}}});Class("linb.UI.Slider",["linb.UI","linb.absValue"],{Instance:{_setCtrlValue:function(A){return this.each(function(G){var I=G.properties,F=I.steps,E=function(J){return G.getSubNode(J)},D=E("IND1"),C=E("IND2"),B=G.box._v2a(G,A),H=I.type=="vertical"?"top":"left";D[H](B[0]+"%");if(I.isRange){C[H](B[1]+"%")}})},_setDirtyMark:function(){return this.each(function(D){if(!D.properties.dirtyMark){return }if(!D.domNode){return }var C=D.properties,B=C.value!==C.$UIvalue;if(D._dirtyFlag==B){return }D._dirtyFlag=B;var E=D.getSubNode("BOX"),A=linb.UI.$css_tag_dirty;if(D.beforeDirtyMark&&false===D.boxing().beforeDirtyMark(D,B)){return }if(B){E.addClass(A)}else{E.removeClass(A)}})}},Static:{Templates:{style:"{_style}",BOX:{tagName:"div",className:"{_cls}",BG:{tagName:"div"},RULER:{$order:1,tagName:"div",RULERLEFT:{},RULERRIGHT:{}},IND:{$order:2,IND1:{tagName:"a",style:"{_showD}",href:linb.$href,tabindex:"{tabIndex}"},IND2:{tagName:"a",href:linb.$href,tabindex:"{tabIndex}",style:"{_showD2}"}},DECREASE:{tagName:"a",style:"{_showDes}",href:linb.$href,tabindex:"{tabIndex}"},INCREASE:{tagName:"a",style:"{_showIns}",href:linb.$href,tabindex:"{tabIndex}"}}},Appearances:{"IND, BT, RULER, RULERLEFT, RULERRIGHT, IND1, IND2, DECREASE, INCREASE":{"font-size":0,"line-height":0,position:"absolute"},BOX:{position:"relative",left:0,top:0,width:"100%",height:"100%"},"BOX-h DECREASE, BOX-h INCREASE":{top:"50%",width:"17px",height:"17px","margin-top":"-8px"},"BOX-v DECREASE, BOX-v INCREASE, BOX-h DECREASE, BOX-h INCREASE, BOX-h IND1,BOX-h IND2, BOX-v IND1,BOX-v IND2":{background:linb.UI.$bg("icons.gif","no-repeat",true)},"BOX-h DECREASE":{$order:1,left:0,"background-position":"-80px -70px"},"BOX-h INCREASE":{$order:1,right:0,"background-position":"-100px -70px"},"BOX-h DECREASE-mouseover":{$order:2,"background-position":"-80px -90px"},"BOX-h DECREASE-mousedown":{$order:3,"background-position":"-80px -110px"},"BOX-h INCREASE-mouseover":{$order:2,"background-position":"-100px -90px"},"BOX-h INCREASE-mousedown":{$order:3,"background-position":"-100px -110px"},"BOX-h BG":{top:"50%"},"BOX-h IND, BOX-h RULER":{"z-index":1,top:"50%",height:"6px","margin-top":"-3px"},"BOX-h RULER, BOX-h RULERLEFT, BOX-h RULERRIGHT":{background:linb.UI.$bg("bar_vertical.gif","repeat-x",true)},"BOX-h RULER":{$order:2,"background-position":"left -482px"},"BOX-h RULERLEFT, BOX-h RULERRIGHT":{"z-index":1,height:"6px",width:"5px"},"BOX-h RULERLEFT":{$order:2,"background-position":"left -474px",left:"-4px",top:0},"BOX-h RULERRIGHT":{$order:2,"background-position":"left -490px",right:"-4px",top:0},"BOX-h IND1,BOX-h IND2":{$order:1,"z-index":2,"background-position":"-21px -282px",height:"18px",width:"8px",left:0,top:0,"margin-top":"-6px"},"BOX-h IND1-mouseover,BOX-h IND2-mouseover":{$order:2,"background-position":"-31px -282px"},"BOX-h IND1-mousedown,BOX-h IND2-mousedown":{$order:3,"background-position":"-41px -282px"},"BOX-v DECREASE, BOX-v INCREASE":{$order:10,left:"50%",width:"17px",height:"17px","margin-left":"-8px"},"BOX-v DECREASE":{$order:10,top:0,"background-position":"-120px -70px"},"BOX-v INCREASE":{$order:10,bottom:0,"background-position":"-140px -70px"},"BOX-v DECREASE-mouseover":{$order:11,"background-position":"-120px -90px"},"BOX-v DECREASE-mousedown":{$order:12,"background-position":"-120px -110px"},"BOX-v INCREASE-mouseover":{$order:11,"background-position":"-140px -90px"},"BOX-v INCREASE-mousedown":{$order:12,"background-position":"-140px -110px"},"BOX-v BG":{$order:10,left:"50%"},"BOX-v IND, BOX-v RULER":{$order:10,"z-index":1,left:"50%",width:"6px","margin-left":"-3px"},"BOX-v RULER, BOX-v RULERLEFT, BOX-v RULERRIGHT":{background:linb.UI.$bg("bar_horizontal.gif","repeat-y",true)},"BOX-v RULER":{$order:10,"background-position":"-482px top"},"BOX-v RULERLEFT, BOX-v RULERRIGHT":{$order:10,"z-index":1,width:"6px",height:"5px"},"BOX-v RULERLEFT":{$order:12,"background-position":"-490px top",top:"-4px",left:0},"BOX-v RULERRIGHT":{$order:12,"background-position":"-474px top",bottom:"-4px",left:0},"BOX-v IND1,BOX-v IND2":{$order:10,"z-index":2,"background-position":"left -272px",width:"18px",height:"8px",left:0,top:0,"margin-left":"-6px"},"BOX-v IND1-mouseover,BOX-v IND2-mouseover":{$order:11,"background-position":"left -282px"},"BOX-v IND1-mousedown,BOX-v IND2-mousedown":{$order:12,"background-position":"left -292px"}},Behaviors:{HoverEffected:{IND1:"IND1",IND2:"IND2",DECREASE:"DECREASE",INCREASE:"INCREASE"},ClickEffected:{IND1:"IND1",IND2:"IND2",DECREASE:"DECREASE",INCREASE:"INCREASE"},onSize:function(A,B){var C=A.root;linb.UI.$tryResize(A,B.width?C.width():null,C.height?C.height():null)},IND:{onClick:function(C,I,A){var B=C.properties,O=linb([A]).offset(),N=linb.Event.getPos(I),F=C.box._v2a(C,C.properties.$UIvalue),E,D,K=B.type=="vertical",J=K?"top":"left",H=K?"offsetTop":"offsetLeft",G=K?"offsetHeight":"offsetWidth",M=N[J]-O[J],L=(M/A[G])*100;if(!B.isRange){F[0]=L}else{E=C.getSubNode("IND1")[H](),D=C.getSubNode("IND2")[H]();if(Math.abs(E-M)<Math.abs(D-M)){F[0]=L}else{F[1]=L}}C.boxing().setUIValue(C.box._adjustValue(C,F))}},IND1:{onKeydown:function(C,E,F){var D=C.properties,B=D.type=="vertical",A=linb.Event.getKey(E)[0];if(A==(B?"up":"left")){C.box._auto(C,false)}if(A==(B?"down":"right")){C.box._auto(C,true)}},onKeyout:function(A){linb.Thread.abort(A.$id+":auto")},onKeyup:function(A){linb.Thread.abort(A.$id+":auto")},onMousedown:function(B,F,H){var E=B.properties,A=E.type=="vertical",G=A?"offsetTop":"offsetLeft",D=A?"offsetHeight":"offsetWidth",C=B.box;linb([H]).startDrag(F,{widthIncrement:E.steps?B._size/E.steps:null,dragType:"none",targetReposition:true,horizontalOnly:A?true:null,verticalOnly:A?null:true,maxLeftOffset:H[G],maxRightOffset:H.parentNode[D]-H[G],dragCursor:"default"});linb([H]).css("zIndex",10).focus();B.getSubNode("IND2").css("zIndex",5)},beforeDragbegin:function(B,C,D){var A=B.properties.type=="vertical";linb(D)[A?"top":"left"](B.__x=D[A?"offsetTop":"offsetLeft"])},onDrag:function(C,D,F){var E=linb.DragDrop.getProfile().offset,B=C.properties.type=="vertical",A=C.box._v2a(C,C.properties.$UIvalue);A[0]=((C.__x+E[B?"y":"x"])/F.parentNode[B?"offsetHeight":"offsetWidth"])*100;C.boxing().setUIValue(C.box._adjustValue(C,A))},onDragstop:function(A,B,C){linb(C).onMouseout(true,{$force:true}).onMouseup(true)},onClick:function(){return false}},IND2:{onKeydown:function(C,E,F){var D=C.properties,B=D.type=="vertical",A=linb.Event.getKey(E)[0];if(A==(B?"up":"left")){C.box._auto(C,false)}if(A==(B?"down":"right")){C.box._auto(C,true)}},onKeyout:function(A){linb.Thread.abort(A.$id+":auto")},onKeyup:function(A){linb.Thread.abort(A.$id+":auto")},onMousedown:function(B,F,H){var E=B.properties,A=E.type=="vertical",G=A?"offsetTop":"offsetLeft",D=A?"offsetHeight":"offsetWidth",C=B.box;linb([H]).startDrag(F,{widthIncrement:E.steps?B._size/E.steps:null,dragType:"none",targetReposition:true,horizontalOnly:A?true:null,verticalOnly:A?null:true,maxLeftOffset:H[G],maxRightOffset:H.parentNode[D]-H[G],dragCursor:"default"});linb([H]).css("zIndex",10).focus();B.getSubNode("IND1").css("zIndex",5)},beforeDragbegin:function(B,C,D){var A=B.properties.type=="vertical";linb(D)[A?"top":"left"](B.__x=D[A?"offsetTop":"offsetLeft"])},onDrag:function(C,D,F){var E=linb.DragDrop.getProfile().offset,B=C.properties.type=="vertical",A=C.box._v2a(C,C.properties.$UIvalue);A[1]=((C.__x+E[B?"y":"x"])/F.parentNode[B?"offsetHeight":"offsetWidth"])*100;C.boxing().setUIValue(C.box._adjustValue(C,A))},onDragstop:function(A,B,C){linb(C).onMouseout(true,{$force:true}).onMouseup(true)},onClick:function(){return false}},RULERRIGHT:{onClick:function(C,E,F){var D=C.properties,B=C.boxing(),G=C.box,A=G._v2a(C,D.$UIvalue);if(!D.isRange){A[0]=100}else{A[1]=100}B.setUIValue(C.box._adjustValue(C,A))}},DECREASE:{onMousedown:function(A){A.box._auto(A,false)},onMouseout:function(A){linb.Thread.abort(A.$id+":auto")},onMouseup:function(A){linb.Thread.abort(A.$id+":auto")}},INCREASE:{onMousedown:function(A){A.box._auto(A,true)},onMouseout:function(A){linb.Thread.abort(A.$id+":auto")},onMouseup:function(A){linb.Thread.abort(A.$id+":auto")}}},DataModel:{position:"absolute",width:{ini:200},height:{ini:50},steps:0,value:"0:0",type:{listbox:["vertical","horizontal"],ini:"horizontal",action:function(A){this.boxing().refresh()}},isRange:{ini:true,action:function(A){this.boxing().refresh()}},showIncreaseHandle:{ini:true,action:function(A){this.boxing().refresh()}},showDecreaseHandle:{ini:true,action:function(A){this.boxing().refresh()}}},_prepareData:function(A){var C=arguments.callee.upper.call(this,A),B="display:none";C._showDes=C.showDecreaseHandle?"":B,C._showIns=C.showIncreaseHandle?"":B,C._showD2=C.isRange?"":B;C._cls=A.getClass("BOX",C.type=="vertical"?"-v":"-h");return C},_adjustValue:function(B,C){var D=B.properties,A=[];A[0]=parseFloat(C[0])||0;A[1]=parseFloat(C[1])||0;if(D.steps){C=100/D.steps;A[0]=Math.ceil(A[0]/C);if(D.isRange){A[1]=Math.ceil(A[1]/C)}}return A.join(":")},_ensureValue:function(B,I){var A=B.properties,H=I.split(":"),D=0,F=A.steps?A.steps:100,G=[],E=function(J){return parseFloat(J)||0},C=function(J){return Math.min(F,Math.max(D,J))};G[0]=E(H[0]);if(A.isRange){G[1]=E(H[1]);if(G[0]>G[1]){H=G[1];G[1]=G[0];G[0]=H}}G[0]=C(G[0]);if(A.isRange){G[1]=C(G[1])}return A.isRange?G.join(":"):(G[0]+"")},_v2a:function(D,B){var A=D.properties.steps,C;B=typeof B=="string"?B.split(":"):B;B[0]=parseFloat(B[0])||0;B[1]=parseFloat(B[1])||0;if(A){B[0]=B[0]*100/A}if(A){B[1]=B[1]*100/A}if(B[0]>B[1]){C=B[0];B[1]=B[0];B[0]=C}return B},_auto:function(E,G){var A=E.$id+":auto";if(linb.Thread.isAlive(A)){return }var B=E.properties,I,D=(B.steps?100/B.steps:1)*(G?1:-1),C={delay:300},F=E.box._v2a(E,B.$UIvalue),H=function(){F[0]+=D;if(B.isRange){F[1]+=D}E.boxing().setUIValue(E.box._adjustValue(E,F));C.delay*=0.8};C.task=H;linb.Thread(A,[C],500,null,H,null,true).start()},_onresize:function(D,B,K){var A=D.properties,I=A.type,H=function(N){return D.getSubNode(N)},M=H("RULER"),C=H("IND"),L=H("RULERLEFT");if(I=="vertical"){var J=L.height(),G=A.showDecreaseHandle?H("DECREASE").height():0,F=A.showIncreaseHandle?H("INCREASE").height():0,E=H("IND1").height();if(K){M.top(G+J).height(K-G-F-2*J);C.top(G).height(D._size=K-G-F-E)}}else{var J=L.width(),G=A.showDecreaseHandle?H("DECREASE").width():0,F=A.showIncreaseHandle?H("INCREASE").width():0,E=H("IND1").width();if(B){M.left(G+J).width(B-G-F-2*J);C.left(G).width(D._size=B-G-F-E)}}}}});Class("linb.UI.Input",["linb.UI.Widget","linb.absValue"],{Instance:{_setTB:function(C){var B=this.get(0),D=B.properties,E,A;if(!B.host||!D.tipsBinder){return }A=B.tips=B.tips||D.tips||"";E=B.host[D.tipsBinder];if(E&&E.KEY=="linb.UI.Div"){E.get(0).domNode.innerHTML=A.charAt(0)=="$"?linb.wrapRes(A):A;E.reBoxing().css("color",C==1?"gray":C==2?"red":"#000")}},activate:function(){var A=this.get(0);if(A.domNode){var B=A.getSubNode("INPUT").get(0);B.focus();if(!B.readOnly&&B.select){B.select()}}return this},_setCtrlValue:function(A){if(_.isNull(A)||!_.exists(A)){A=""}return this.each(function(B){B.getSubNode("INPUT").attr("value",A+"")})},_getCtrlValue:function(){var A=this.get(0);return A.getSubNode("INPUT").attr("value")},_setDirtyMark:function(){return this.each(function(B){if(!B.properties.dirtyMark){return }var F=B.properties,A=B.getSubNode("INPUT"),I=B.box,D=B.boxing(),E=linb.UI.$css_tag_dirty,H=linb.UI.$css_tag_invalid,G=F.value!==F.$UIvalue;if(B.beforeDirtyMark&&false===D.beforeDirtyMark(B,G)){}else{if(G){A.addClass(E)}else{A.removeClass(E)}}if(B.beforeFormatMark&&false===D.beforeFormatMark(B,B.inValid==2)){}else{var C=B.getSubNode("ERROR");if(B.inValid==2){A.addClass(H);C.css("display","block")}else{A.removeClass(H);C.css("display","none")}}if(B.inValid==2){B.tips=F.tipsErr||F.tips;if(F.mask){_.asyRun(function(){D.setUIValue(A.get(0).value=B.$Mask)})}}else{if(B.inValid==1){B.tips=F.tips}else{B.tips=F.tipsOK||F.tips}}D._setTB(B.inValid)})}},Initialize:function(){var A=this.getTemplate();_.merge(A.FRAME.BORDER,{BOX:{WRAP:{tagName:"div",INPUT:{tagName:"input",type:"{type}",tabindex:"{tabindex}",cursor:"{cursor}",style:"{_css}"}}}},"all");A.FRAME.ERROR={};this.setTemplate(A)},Static:{_maskMap:{"~":"[+-]","1":"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},_maskSpace:"_",Appearances:{KEY:{"font-family":'"Verdana", "Helvetica", "sans-serif"',position:"relative"},BORDER:{"line-height":"0px","font-size":"0px"},WRAP:{left:0,position:"absolute",overflow:linb.browser.gek?"auto":"hidden"},BOX:{left:0,top:0,position:"absolute","background-color":"#fff",border:"solid 1px #648CB4","z-index":10},"BOX-focus, BOX-mouseover":{"border-color":"#FAE100"},INPUT:{"padding-top":"2px","background-color":"transparent",border:0,margin:0,"margin-top":linb.browser.ie?"-1px":null,"font-size":"12px",position:"relative",overflow:"auto","overflow-y":(linb.browser.gek||linb.browser.ie)?"auto":"","overflow-x":(linb.browser.gek||linb.browser.ie)?"hidden":""},ERROR:{width:"16px",height:"16px",position:"absolute",right:"2px",top:"2px",display:"none","font-size":0,background:linb.UI.$bg("icons.gif","no-repeat left -244px",true),"z-index":"50"},".setting-linb-input":{"border-style":"solid","border-top-width":"1px","border-bottom-width":"1px","border-left-width":"1px","border-right-width":"1px"},"KEY-b-t":{height:"2px",top:"-1px",background:linb.UI.$bg("vertical.gif","repeat-x left top","Input")},"KEY-b-b":{height:"2px",bottom:"-1px",background:linb.UI.$bg("vertical.gif","repeat-x left bottom","Input")},"BOX-focus KEY-b-t, BOX-focus KEY-b-b, BOX-mouseover KEY-b-t, BOX-mouseover KEY-b-b":{$order:1,"background-image":linb.UI.$bg("vertical_mouseover.gif","","Input")},"KEY-b-l":{width:"2px",left:"-1px",background:linb.UI.$bg("horizontal.gif","repeat-y left top","Input")},"KEY-b-r":{width:"2px",right:"-1px",background:linb.UI.$bg("horizontal.gif","repeat-y right top","Input")},"BOX-focus KEY-b-l, BOX-focus KEY-b-r, BOX-mouseover KEY-b-l, BOX-mouseover KEY-b-r":{$order:1,"background-image":linb.UI.$bg("horizontal_mouseover.gif","","Input")},"KEY-b-lt":{width:"2px",height:"2px",left:"-1px",top:"-1px",background:linb.UI.$bg("corner.gif","no-repeat left top","Input")},"KEY-b-rt":{width:"2px",height:"2px",right:"-1px",top:"-1px",background:linb.UI.$bg("corner.gif","no-repeat right top","Input")},"KEY-b-rb":{width:"2px",height:"2px",right:"-1px",bottom:"-1px",background:linb.UI.$bg("corner.gif","no-repeat right bottom","Input")},"KEY-b-lb":{width:"2px",height:"2px",left:"-1px",bottom:"-1px",background:linb.UI.$bg("corner.gif","no-repeat left bottom","Input")},"BOX-focus KEY-b-lt, BOX-focus KEY-b-rt, BOX-focus KEY-b-rb, BOX-focus KEY-b-lb, BOX-mouseover KEY-b-lt, BOX-mouseover KEY-b-rt, BOX-mouseover KEY-b-rb, BOX-mouseover KEY-b-lb":{$order:1,"background-image":linb.UI.$bg("corner_mouseover.gif","","Input")}},Behaviors:{HoverEffected:{BOX:["BOX"]},NavKeys:{INPUT:1},INPUT:{onChange:function(A,B,D){var C=A.inValid;A.boxing().setUIValue(D.value);A.properties.$UIvalue=D.value;if(C!==A.inValid){if(A.domNode){A.boxing()._setDirtyMark()}}},onKeydown:function(E,G,H){var F=E.properties,B=F.multiLines,A=E.box,C=linb.Event,D=C.getKey(G);if(D[0]=="enter"&&(!B||D[3])){linb([H]).onChange()}if(F.mask){if(D[0].length>1){E.$ignore=true}else{delete E.$ignore}switch(D[0]){case"backspace":A._changeMask(E,H,"",false);return false;case"delete":A._changeMask(E,H,"");return false}}},onKeypress:function(D,G,H){var F=D.properties,B=D.box,E=B._maskMap;if(F.mask){if(D.$ignore){delete D.$ignore;return true}var A=linb.Event,C=A.getKey(G);if(C[1]||C[3]){return true}B._changeMask(D,H,C[0],true);return false}},onKeyup:function(A,C,D){var B=A.properties;if(B.dynCheck){A.box._checkValid(A,D.value);A.boxing()._setDirtyMark()}},onFocus:function(B,D,E){var C=B.properties,A=B.box;if(C.disabled){return false}if(B.onFocus){B.boxing().onFocus(B)}B.getSubNode("BORDER").tagClass("-focus");if(C.mask){if(linb.browser.opr||linb.browser.kde){A._maskF(B,E)}if(!E.value){_.asyRun(function(){B.boxing().setUIValue(E.value=B.$Mask);A._setCaret(B,E)})}}B.boxing()._setTB(3)},onBlur:function(A,C,D){var B=A.properties;if(B.disabled){return false}if(A.onBlur){A.boxing().onBlur(A)}A.getSubNode("BORDER").tagClass("-focus",false);if(B.$UIvalue==D.value){A.box._checkValid(A,D.value)}A.boxing()._setDirtyMark()}}},DataModel:{_customBorder:"BOX",tipsErr:"",tipsOK:"",border:true,dynCheck:false,valueFormat:{helpinput:[{caption:"required",id:"[^.*]"},{caption:"email",id:"^[\\w\\.=-]+@[\\w\\.-]+\\.[\\w\\.-]{2,4}$"},{caption:"charOnly",id:"^[a-zA-Z]*$"},{caption:"words",id:"^[\\w ]*$"},{caption:"integer",id:"^-?\\d\\d*$"},{caption:"positiveInteger",id:"^\\d\\d*$"},{caption:"number",id:"^-?(\\d\\d*\\.\\d*$)|(^-?\\d\\d*$)|(^-?\\.\\d\\d*$)"},{caption:"filepath",id:"([\\/]?[\\w_]+)+\\.\\w{1,9}$"},{caption:"URL",id:"^(http|https|ftp)\\:\\/\\/[\\w\\-\\_\\.]+[\\w\\-\\_](:[\\w]*)?\\/?([\\w\\-\\._\\?\\,\\'\\/\\\\\\+&amp;%\\$#\\=~])*$"},{caption:"color",id:"^\\#[0-9A-Fa-f]{6}$"},{caption:"HH:MM",id:"^(([0-1][0-9])|([2][0-3])):([0-5][0-9])$"},{caption:"HH:MM:SS",id:"^(([0-1][0-9])|([2][0-3])):([0-5][0-9])\\:([0-5][0-9])$"},{caption:"YYYY-MM-DD",id:"^([0-9]{4})\\-(([0][0-9])|([1][0-2]))\\-([0-3][0-9])$"},{caption:"DD/MM/YYYY",id:"^(([0-2][0-9])|([3][0-1]))/(([0][0-9])|([1][0-2]))/([0-9]{4})$"}]},mask:{action:function(D){var B=this,A=B.box;if(D){B.$MaskFormat=function(J,I){var G=J._maskMap,H=[],K=/[A-Za-z0-9]/;_.arr.each(I.split(""),function(M,L){H.push(G[M]||(K.test(M)?"":"\\")+M)});return"^"+H.join("")+"$"}(A,D);B.$Mask=function(K,I){var G=K._maskMap,H=[],J=K._maskSpace;_.arr.each(I.split(""),function(M,L){H.push(G[M]?J:M)});return H.join("")}(A,D);if(B.domNode){var F=linb.browser.ie,E=B.getSubNode("INPUT").get(0),C=function(G){A._maskF(B,E,F&&G.propertyName)};if(F){E.attachEvent("onpropertychange",C);E.attachEvent("ondrop",C);B.$ondestory=function(){E.detachEvent("onpropertychange",C);E.detachEvent("ondrop",C)}}else{E.addEventListener("input",C,false);if(linb.browser.gek){E.addEventListener("dragdrop",C,false)}B.$ondestory=function(){E.removeEventListener("input",C,false);E.addEventListener("dragdrop",C,false)}}}}else{delete B.$MaskFormat;delete B.$Mask;if(B.domNode){_.tryF(B.$ondestory)}}}},value:"",width:120,height:22,disabled:{ini:false,action:function(A){this.root.css("opacity",A?0.5:1);this.getSubNode("INPUT").attr("disabled",A)}},readonly:{ini:false,action:function(A){this.getSubNode("INPUT").attr("readonly",A).css("cursor",A?"default":"")}},type:{ini:"text",listbox:["text","password"],action:function(A){this.getSubNode("INPUT").attr("type",A)}},multiLines:{ini:false,action:function(B){var C=this.getSubNode("INPUT").outerHTML();C=C.replace(/^(<)[a-zA-Z]+(\s)/i,"$1"+(B?"textarea":"input")+"$2");var A=this.boxing().getValue();this.getSubNode("INPUT").outerHTML(C);this.boxing().setUIValue(A)}},tipsBinder:""},EventHandlers:{onFocus:function(A){},onBlur:function(A){},beforeFormatCheck:function(A,B){},beforeFormatMark:function(A,B){}},_prepareData:function(A){var B=arguments.callee.upper.call(this,A);B.cursor=B.readonly?"default":"";B.type=B.type||"";if(linb.browser.kde){B._css="resize:none;"}return B},_dynamicTemplate:function(D){var B=D.properties,A,E=D._exhash="$multiLines:"+B.multiLines,C=D.box.getTemplate(E);B.$UIvalue=B.value;if(!C){C=_.clone(D.box.getTemplate());if(B.multiLines){A=C.FRAME.BORDER.BOX.WRAP.INPUT;A.tagName="textarea";delete A.type}D.box.setTemplate(C,E)}D.template=C},RenderTrigger:function(){var A=this,B=A.properties;_.asyRun(function(){A.boxing()._setTB(1)});A.getSubNode("WRAP").$firfox2();if(B.readonly){A.boxing().setReadonly(true,true)}},LayoutTrigger:function(){var A=this.properties;if(A.mask){this.boxing().setMask(A.mask,true)}},_changeMask:function(C,E,F,K){var R=this,J=C.properties,Q=R._maskMap,L=R._maskSpace,A=J.mask,B=C.$Mask,G=linb([E]),H=G.caret();if(K===false&&H[0]==H[1]&&H[0]>0){G.caret(H[0]-1,H[0])}if(K===undefined&&H[0]==H[1]){G.caret(H[0],H[0]+1)}if(K===true){if(B.charAt(H[0])!=L){var N=H[0]+B.substr(H[0],B.length).indexOf(L);G.caret(N,Math.max(H[1],N))}}var H=G.caret(),M=E.value,D=R._maskMap[J.mask.charAt(H[0])],O,I;if(D&&new RegExp("^"+D+"$").test(F)||F==""){I=M;if(H[0]!=H[1]){I=I.substr(0,H[0])+B.substr(H[0],H[1]-H[0])+I.substr(H[1],I.length-H[1])}if(F){I=I.substr(0,H[0])+F+I.substr(H[0]+1,I.length-H[0]-1)}var P=[];_.arr.each(A.split(""),function(T,S){P.push((new RegExp("^"+(Q[T]?Q[T]:"\\"+T)+"$").test(I.charAt(S)))?I.charAt(S):B.charAt(S))});if(K===true){F=B.substr(H[0]+1,M.length-H[0]-1);O=F.indexOf(L);O=H[0]+(O==-1?0:O)+1}else{O=H[0]}if(linb.browser.opr){if(K===undefined){_.arr.insertAny(P,L,O)}if(K===false){_.arr.insertAny(P,L,O++)}}C.boxing().setUIValue(E.value=P.join(""));R._setCaret(C,E,O)}},_setCaret:function(A,B,C){if(A.properties.mask){if(typeof C!="number"){C=B.value.indexOf(this._maskSpace)}linb([B]).caret(C,C)}},_checkValid:function(C,D){var E=C.properties,B=(E.mask&&C.$MaskFormat),A=E.valueFormat||C.$valueFormat;if((C.beforeFormatCheck&&(C.boxing().beforeFormatCheck(C,D)===false))||(B&&typeof B=="string"&&!(new RegExp(B)).test(D||""))||(A&&typeof A=="string"&&!(new RegExp(A)).test(D||""))){C.inValid=2;return false}C.inValid=3;return true},_maskF:function(A,C,B){var D=C.id;_.resetRun(A.$id+"_mask",function(){if(linb.browser.ie&&B!="value"){return }var E=linb.Dom.byId(D);if(E.value.length!=A.$Mask.length){A.box._changeMask(A,E,"",true)}})},_onresize:function(E,A,L){var D=1,K=1,N=linb.UI.$getCSSValue("linb-input-input","paddingTop");var M=E.properties,B=E.getSubNode("BOX"),J=E.getSubNode("INPUT"),I,G=A,F=L,C=Math.max(0,(M.$b_lw||0)-D),H=Math.max(0,(M.$b_tw||0)-K);if(null!==G){G-=Math.max(D*2,(M.$b_lw||0)+(M.$b_rw||0));if(linb.browser.ie6){G=(parseInt(G/2))*2}}if(null!==F){F-=Math.max(K*2,(M.$b_lw||0)+(M.$b_rw||0));if(linb.browser.ie6){F=(parseInt(F/2))*2}if(linb.browser.ie6&&null===A){B.ieRemedy()}}I={left:C,top:H,width:G,height:F};B.cssRegion(I);if(G||F){J.cssSize({width:G,height:F?(F-N):null})}if((E.$border||E.$shadow||E.$resizer)&&linb.browser.ie){B.ieRemedy()}}}});Class("linb.UI.TextEditor",["linb.UI.Widget","linb.absValue"],{Instance:{activate:function(){var A=this.get(0);A.getSubNode("INPUT").focus();return this},_setCtrlValue:function(A){if(_.isNull(A)||!_.exists(A)){A=""}return this.each(function(C){var D=C.getSubNode("INPUT").get(0);if(D.value.replace(/(\r\n|\r)/g,"\n")!=A.replace(/(\r\n|\r)/g,"\n")){var B=D.scrollTop;D.value=A;D.scrollTop=B}})},_getCtrlValue:function(B){var A=this.get(0);return A.getSubNode("INPUT").attr("value").replace(/(\r\n|\r)/g,"\n").replace(/( +)(\n)/g,"$2").replace(/\t/g,"    ")}},Initialize:function(){var A=this.getTemplate();_.merge(A.FRAME.BORDER,{BOX:{tagName:"div",INPUT:{tagName:"textarea",tabindex:"{tabindex}",style:"{_css}"}},BAK1:{},BAK2:{tagName:"div"}},"all");this.setTemplate(A)},Static:{Appearances:{BOX:{width:"100%",height:"100%",left:0,top:0,position:"absolute",overflow:linb.browser.gek?"auto":"","z-index":"10"},INPUT:{"font-family":"Courier New, Courier, monospace","font-size":"12px","line-height":"14px",position:"absolute","background-color":"#fff",left:0,top:0,border:0,margin:0,padding:0,overflow:"auto","overflow-y":(linb.browser.gek||linb.browser.ie)?"auto":"","overflow-x":(linb.browser.gek||linb.browser.ie)?"hidden":""},"BAK1, BAK2":{"font-family":"Courier New, Courier, monospace","font-size":"12px",position:"absolute",visibility:"hidden",left:"-10000px",top:"-10000px"}},Behaviors:{INPUT:{onFocus:function(A,B,C){A.box._onchange(A,C)},onChange:function(A,B,C){A.boxing().setUIValue(C.value);A.box._onchange(A,C)},afterKeydown:function(D,G,B){var I=D.properties,H,K;if(I.disabled||I.readonly){return }if(D.$change){delete D.$change}var J=linb.Event.getKey(G),E=J[0];switch(E){case"tab":var A=linb([B]).caret(),C=B.value.slice(A[0],A[1]);if(/(\n|\r)/.test(C)){H=B.value.slice(0,A[0]);if(C.charAt(0)!="\n"&&C.charAt(0)!="\r"){C=H.slice(A[0]=H.lastIndexOf("\n"))+C}if(linb.browser.ie){K=(K=H.match(/\r/g))?K.length:0;A[0]-=K;K=(K=(B.value.slice(0,A[1])).match(/\r/g))?K.length:0;A[1]-=K}linb([B]).caret(A[0],A[1]);if(J[2]){C=C.replace(/(\n|\n\r)    /g,"$1")}else{C=C.replace(/(\n|\n\r)/g,"$1    ")}D.box.insertAtCaret(D,C);A[1]=A[0]+C.length;if(linb.browser.ie){K=(K=C.match(/\r/g))?K.length:0;A[1]-=K}linb([B]).caret(A[0],A[1])}else{if(J[2]){linb([B]).caret(A[0]-4,A[0]-4);A[0]-=4;A[1]-=4}else{D.box.insertAtCaret(D,"    ");A[0]+=4;A[1]+=4}}D.$pos=A;return false;case"enter":var L=D.box.getParas(D);H=L[1];var F=H.length-_.str.ltrim(H).length;if(H.charAt(H.length-1)=="{"){F+=4}if(F){D.box.insertAtCaret(D,"\n"+_.str.repeat(" ",F));D.$enter=true;return false}break;default:if(D.tips){D.tips.destroy();D.tips=null}}},afterKeypress:function(C,F,A){if(C.properties.disabled||C.properties.readonly){return }var K=linb.Event.getKey(F),D=K[0];var H=arguments.callee,B=H.map||(H.map={space:1,enter:1,backspace:1,tab:1,"delete":1});if(D.length==1||B[D]){C.$change=true}switch(D){case"tab":if(linb.browser.opr){_.asyRun(function(){linb([A]).caret(C.$pos[0],C.$pos[1])})}return false;case"enter":if(C.$enter){delete C.$enter;return false}case"}":if(K[2]){var M=C.box.getParas(C);var E=M[0],G=M[1],I=M[2],J=M[3];if(/ {4}$/.test(G)){var L=linb(A).scrollTop();J.value=J.value.substr(0,E).replace(/ {4}$/,"}")+J.value.substr(E,J.value.length);linb(J).onChange();C.box.setCaretTo(J,E-4+1,L);return false}}break}},afterKeyup:function(C,F,G){var B=linb.Event.getKey(F),A=B[0];var D=arguments.callee,E=D.map||(D.map={space:1,enter:1,backspace:1,tab:1,"delete":1});if(A.length==1||E[A]){C.$change=true}if(C.$change){delete C.$change;C.box._onchange(C,G)}}}},DataModel:{left:0,top:0,width:200,height:200,position:"absolute",disabled:{ini:false,action:function(A){b.boxing().setReadonly(A)}},readonly:{ini:false,action:function(A){this.getSubNode("INPUT").attr("readonly",A).css("background",A?"#EBEADB":"")}}},EventHandlers:{onChange:function(C,B,A){}},RenderTrigger:function(){var A=this;if(A.properties.readonly){A.boxing().setReadonly(true,true)}var D=linb.browser.ie,C=A.getSubNode("INPUT").get(0),B=function(F){if(D&&F.propertyName!="value"){return true}var E=D?F.srcElement:this;A.box._onchange(A,E)};if(D){C.attachEvent("onpropertychange",B);C.attachEvent("ondrop",B);A.$ondestory=function(){C.detachEvent("onpropertychange",B);C.detachEvent("ondrop",B)}}else{C.addEventListener("input",B,false);C.addEventListener("dragdrop",B,false);A.$ondestory=function(){C.removeEventListener("input",B,false);C.addEventListener("dragdrop",B,false)};A.getSubNode("BOX").$firfox2()}},_onchange:function(B,C){if(B.onChange){var A=C.id;_.resetRun(B.$id+"_drop",function(){A=linb.Dom.byId(A).value||"";B.$prevV=B.$prevV||"";if(A!=B.$prevV){B.boxing().onChange(B,B.$prevV,A);B.$prevV=A}})}},_prepareData:function(A){var B=arguments.callee.upper.call(this,A);if(linb.browser.kde){B._css="resize:none;"}return B},_onresize:function(D,C,A){var B=arguments.callee.upper.apply(this,arguments);D.getSubNode("BOX").cssSize(B);D.getSubNode("INPUT").cssSize(B)},insertAtCaret:function(C,E){var A=C.getSubNode("INPUT"),D=A.scrollTop()||null,B;A.onChange();B=A.caret(E);this.setCaretTo(A.get(0),B||0,D)},setCaretTo:function(A,G,D){A.focus();var C,F,B,E=linb([A]);if(_.isNumb(D)){E.scrollTop(D)}if(D===true){if(E.get(0).tagName.toLowerCase()=="textarea"&&E.scrollHeight()!==E.offsetHeight()){C=E.attr("value").substr(0,G);F=E.clone().id("").css({visibility:"hidden",position:"absolute",left:5000+"px"}).attr("value",C);linb("body").append(F);B=Math.max((F.scrollHeight()>F.offsetHeight())?F.scrollHeight()-30:0,0);E.scrollTop(B);F.remove()}}E.caret(G,G)},getParas:function(C){var O=C.getSubNode("INPUT"),S=arguments.callee,D=S.reg||(S.reg=/\r\n/g),K=O.get(0).value,G=O.caret();if(G[0]<0){G[0]=0}var R=0,Q=K.substr(0,G[0]).match(D);if(Q){R=Q.length}K=K.replace(D,"\n");var M=K.substr(0,G[0]-R);var L=M.lastIndexOf("\n"),I=M.substr(L+1,G[0]-L),J=O.innerWidth(),P=C.getSubNode("BAK1"),N=C.getSubNode("BAK2");if(M.charAt(M.length-1)=="\n"){M+="*"}N.width(J);var H=P.html(I.replace(/ /g,"&nbsp;"),false).width(),F=N.html(M.replace(/\n/g,"<br />"),false).height()-O.scrollTop();if(H>J){N.html(I,false);var A=I;var B=N.height();while(A){A=A.replace(/ [^ ]*$/,"");N.html(A,false);if(N.height()!=B){break}}A=I.substr(A.length,I.length-A.length);H=P.html(A,true).width()}P.html("",false);N.html("",false);var E=C.root.offset();E.left+=H;E.top+=F;return[G[0],I,E,O.get(0),M]}}});Class("linb.UI.ComboInput","linb.UI.Input",{Instance:{_setCtrlValue:function(E,B){var D=arguments.callee,C=D._r1||(D._r1=/\</),A=D._r2||(D._r2=/\<\/?[^>]+\>/g);return this.each(function(G){var H=G.getSubNode("INPUT"),F=G.properties.type;E=B?E:G.boxing()._getShowValue(E);if(F!=="none"&&!G.properties.multiLines&&typeof E=="string"&&C.test(E)){E=E.replace(A,"")}H.attr("value",E||"");if(F=="colorpicker"){G.getSubNode("BOX").css("backgroundColor",E);H.css("color",linb.UI.ColorPicker.getTextColor(E))}})},_compareValue:function(D,C){var B=this.get(0),A;if(A=B.CF.compareValue||B.$compareValue){return A(B,D,C)}return D===C},_getShowValue:function(D){var C=this.get(0),E=C.properties,A,B;if(B=C.CF.getShowValue||C.$getShowValue){A=B(C,D)}else{if("listbox"==E.type||"combobox"==E.type){if((A=_.arr.subIndexOf(E.items,"id",D))!=-1){A=E.items[A].caption;A=A.charAt(0)=="$"?linb.getRes(A.slice(1)):A}else{A=""}}else{A=C.$showValue}}A=A||((D||D===0)?String(D):"");if(A!==D){C.$caption=A}else{delete C.$caption}return A},_getEditValue:function(C){var B=this.get(0),D=B.properties,A;if(A=B.CF.getEditValue||B.$getEditValue){return A(B,C)}return C},_fromEditValue:function(C){var B=this.get(0),D=B.properties,A;if(A=B.CF.fromEditValue||B.$fromEditValue){return A(B,C)}return C},_cache:function(){var B=this.get(0),A=B.$drop;if(A){if(linb.browser.opr){A.root.css("display","none")}_.asyRun(function(){B.getSubNode("POOL").append(A.root)})}delete B.$poplink},clearPopCache:function(){var A=this.get(0);if(A.domNode){A.getSubNode("POOL").empty()}delete A.$drop;return this},getUploadObj:function(){var A=this.get(0);if(A.domNode&&A.properties.type=="upload"){var B=A.getSubNode("UPLOAD"),C=B.clone();delete A.$_domid[A.keys.UPLOAD];B.addPrev(C).remove(false);this.setValue("",true);return B.get(0)}},resetValue:function(A){this.each(function(B){if(B.properties.type=="upload"){B.getSubNode("UPLOAD").attr("value","")}});return arguments.callee.upper.apply(this,arguments)},_drop:function(A,B){return this.each(function(E){var J=E.properties;if(J.disabled){return }if(J.type=="upload"||J.type=="none"||J.type=="spin"){return }if(E.$poplink){return }var C,K,G=E.boxing(),F=E.root,I=F.offset(),M=F.cssSize();M.width+=2;I.top+=F.offsetHeight();if((E.beoforeComboPop&&false===G.beoforeComboPop(E,I,A,B))||J.type=="getter"||J.type=="cmdbox"||J.type=="popbox"){return }var H;switch(J.type){case"timepicker":case"datepicker":case"colorpicker":H=J.type;break;default:if(J.listKey){if(typeof _.get(linb.cache,["UIDATA",J.listKey])=="function"){E.$drop=H=null}else{H=J.listKey}}else{H=E.$id}}if(H){_.filter(E.box.$drop,function(N){return !!N.domNode});E.$drop=E.box.$drop[H]}if(!E.$drop){switch(J.type){case"combobox":case"listbox":case"helpinput":linb.SC("linb.UI.List");C=linb.create("List").render();C.host(E).setItems(_.copy(J.items)).setListKey(J.listKey||"").adjustSize();C.beforeUIValueSet(function(Q,P,O){var N=this.boxing();N.setUIValue(O).activate()._cache();return false});break;case"timepicker":linb.SC("linb.UI.TimePicker");C=linb.create("TimePicker").render();C.host(E);C.beforeClose(function(){this.boxing().activate()._cache();return false});C.beforeUIValueSet(function(O,P,N){this.boxing().setUIValue(N).activate()._cache()});break;case"datepicker":linb.SC("linb.UI.DatePicker");C=linb.create("DatePicker").render();C.host(E);C.beforeClose(function(){this.boxing().activate()._cache();return false});C.beforeUIValueSet(function(O,P,N){this.boxing().setUIValue(String(N.getTime())).activate()._cache()});break;case"colorpicker":linb.SC("linb.UI.ColorPicker");C=linb.create("ColorPicker").render();C.host(E);C.beforeClose(function(){this.boxing().activate()._cache();return false});C.beforeUIValueSet(function(O,P,N){this.boxing().setUIValue("#"+N).activate()._cache()});break}E.$drop=C.get(0);if(H){E.box.$drop[H]=E.$drop}}C=E.$drop.boxing();C.host(E);switch(J.type){case"combobox":case"listbox":case"helpinput":C.setWidth(E.root.width());case"timepicker":C.setValue(G.getUIValue(),true);break;case"datepicker":var L=E.$drop.properties;L.WEEK_FIRST=J.WEEK_FIRST;if(L=G.getUIValue()){C.setValue(new Date(parseInt(L)),true)}break;case"colorpicker":C.setValue(G.getUIValue().replace("#",""),true);break}E.$poplink=C.get(0);var D=C.reBoxing();D.popToTop(E.root);_.tryF(C.activate,[],C);D.setBlurTrigger(E.key+":"+E.$id,function(){G._cache()},null,E.$id);linb.Event.keyboardHook("esc",0,0,0,function(){G._cache();G.activate();linb.Event.keyboardHook("esc")})})}},Initialize:function(){this.addTemplateKeys(["UPLOAD","BTN","TOP","MID","RBTN","R1","R1T","R1B","R2","R2T","R2B"]);var A=this.getTemplate();_.merge(A.FRAME.BORDER,{SBTN:{$order:5,style:"{_saveDisplay}",STOP:{},SMID:{}}},"all");A.FRAME.POOL={};this.setTemplate(A)},Static:{_iniType:function(B){var F=B.properties,C=F.type;if(C=="listbox"||C=="upload"){B.boxing().setReadonly(true)}if(C!="listbox"&&C!="combobox"){if(!F.items){F.items=[]}}if(C=="timepicker"){var E=linb.SC("linb.UI.TimePicker");_.merge(B,{$compareValue:null,$getShowValue:function(G,H){return H?E._ensureValue(G,H):""},$getEditValue:null,$fromEditValue:function(G,H){return E._ensureValue(G,H)}},"all");if(F.value){F.$UIvalue=F.value=E._ensureValue(B,F.value)}}else{if(C=="datepicker"){var A=linb.Date;_.merge(B,{$compareValue:function(I,H,G){return String(H)==String(G)},$getShowValue:function(G,H){return H?A.getText(new Date(parseInt(H)),"ymd"):""},$getEditValue:function(H,I){var G=new Date(parseInt(I));return I?(A.get(G,"m")+1)+"/"+A.get(G,"d")+"/"+A.get(G,"y"):""},$fromEditValue:function(H,I){var G=linb.Date.parse(I);if(G){G=linb.Date.getTimSpanStart(G,"d",1)}return G?String(G.getTime()):"0"}},"all");if(F.value){var D=new Date(parseInt(F.value)||0);F.$UIvalue=F.value=String(A.getTimSpanStart(D,"d",1).getTime())}}else{delete B.$compareValue;delete B.$getShowValue;delete B.$getEditValue;delete B.$fromEditValue;if(_.isDate(F.value)){F.$UIvalue=F.value=String(F.value)}}}},$drop:{},Appearances:{POOL:{position:"absolute",left:0,top:0,width:0,height:0,display:"none",visibility:"hidden"},UPLOAD:{opacity:0,"*filter":"alpha(opacity=0)","z-index":"3",border:0,height:"100%",position:"absolute",top:0,right:0,cursor:"pointer","font-size":"12px",overflow:"hidden"},"RBTN,SBTN,BTN":{display:"block","z-index":"1",cursor:"pointer",width:"16px","font-size":0,"line-height":0,position:"relative","float":"right"},"SBTN,BTN,R1,R2":{"margin-top":"2px"},"R1, R2, BTN, SBTN, STOP, TOP, R1T, R2T, R1B, R2B, SMID,MID":{background:linb.UI.$bg("bg.gif")},"SBTN,BTN":{$order:1,"background-position":"left bottom"},"R1,R2":{$order:1,display:"block","font-size":0,"line-height":0,cursor:"pointer",width:"16px",position:"absolute",height:"50%","background-position":"left bottom","margin-top":"2px"},R1:{top:0},R2:{bottom:"-2px"},"BTN-mouseover, SBTN-mouseover, R1-mouseover, R2-mouseover":{$order:2,"background-position":"-16px bottom"},"BTN-mousedown, SBTN-mousedown, R1-mousedown, R2-mousedown":{$order:3,"background-position":"-32px bottom"},"STOP, TOP, R1T, R2T":{$order:1,cursor:"pointer",width:"16px","font-size":0,"line-height":0,position:"absolute",top:"-2px",left:0,height:"4px","background-position":"left -104px"},"BTN-mouseover TOP,SBTN-mouseover STOP, R1-mouseover R1T, R2-mouseover R2T":{$order:2,"background-position":"-16px -104px"},"BTN-mousedown TOP,SBTN-mousedown STOP, R1-mousedown R1T, R2-mousedown R2T":{$order:3,"background-position":"-32px -104px"},"R1B,R2B":{cursor:"pointer",width:"16px","font-size":0,"line-height":0,position:"absolute",left:0,top:"50%","margin-top":"-4px",height:"6px","z-index":2},R1B:{$order:1,"background-position":"-14px -36px"},R2B:{$order:1,"background-position":"left -5px"},"SMID,MID":{$order:2,cursor:"pointer",width:"16px","font-size":0,"line-height":0,position:"absolute",bottom:"0",left:0,height:"16px","background-position":"0 0"},SMID:{$order:3,"background-position":"-14px -16px"},".setting-linb-comboinput":{"border-style":"solid","border-top-width":"1px","border-bottom-width":"1px","border-left-width":"1px","border-right-width":"1px"}},Behaviors:{HoverEffected:{BOX:"BOX",BTN:"BTN",SBTN:"SBTN",R1:"R1",R2:"R2"},ClickEffected:{BTN:"BTN",SBTN:"SBTN",R1:"R1",R2:"R2"},UPLOAD:{onClick:function(A,B,C){if(A.onFileDlgOpen){A.boxing().onFileDlgOpen(A,C)}},onChange:function(A,B,C){A.getSubNode("INPUT").attr("value",C.value).onChange()}},BTN:{onClick:function(A,B,C){A.boxing()._drop(B,C)}},SBTN:{onClick:function(A,B,C){if(A.onSave){A.boxing().onSave(A,C)}}},INPUT:{onChange:function(C,E,G){if(C.$_onedit||C.$_inner){return }var F=C.inValid,A=C.boxing(),B=A._fromEditValue(G.value),D=C.properties.$UIvalue;if(!A._compareValue(D,B)){C.$_inner=1;delete C.$_inner;if(B===null){A._setCtrlValue(D)}else{A.setUIValue(B);C.properties.$UIvalue=B;if(F!==C.inValid){if(C.domNode){A._setDirtyMark()}}}}},onKeyup:function(A,C,D){var B=A.properties;if(B.dynCheck){if(B.$UIvalue!=D.value){A.box._checkValid(A,D.value)}A.boxing()._setDirtyMark()}},onFocus:function(C,F,G){var E=C.properties,D=E.$UIvalue;if(E.disabled){return false}var A=C.boxing(),B=A._getEditValue(D);if(B!==D){C.$_onedit=true;G.value=B;delete C.$_onedit}if(C.onFocus){C.boxing().onFocus(C)}C.getSubNode("BORDER").tagClass("-focus");C.boxing()._setTB(3)},onBlur:function(C,F,G){var E=C.properties,A=C.boxing(),D=E.$UIvalue,B=A._fromEditValue(G.value);if(E.disabled){return false}if(C.onFocus){A.onFocus(C)}C.getSubNode("BORDER").tagClass("-focus",false);if(A._compareValue(E.$UIvalue,B)){C.box._checkValid(C,B);A._setCtrlValue(D)}A._setDirtyMark()},onKeydown:function(C,D,E){var F=C.properties,A=F.multiLines,B=linb.Event.getKey(D);if(B[0]=="enter"&&(!A||B[3])){linb([E]).onChange()}if(B[0]=="down"||B[0]=="up"){if(F.type=="spin"){C.box._spin(C,B[0]=="up");return false}if(B[1]&&F.type){C.boxing()._drop(D,E);return false}}},onKeyup:function(B,C,D){var E=B.properties,A=linb.Event.getKey(C);if(A[0]=="down"||A[0]=="up"){if(E.type=="spin"){linb.Thread.abort(B.$id+":spin");return false}}},onClick:function(A,B,C){if(C.readOnly){A.boxing()._drop(B,C)}}},R1:{onMousedown:function(A){A.box._spin(A,true)},onMouseout:function(A){linb.Thread.abort(A.$id+":spin")},onMouseup:function(A){linb.Thread.abort(A.$id+":spin")}},R2:{onMousedown:function(A){A.box._spin(A,false)},onMouseout:function(A){linb.Thread.abort(A.$id+":spin")},onMouseup:function(A){linb.Thread.abort(A.$id+":spin")}}},EventHandlers:{onFileDlgOpen:function(A,B){},onSave:function(A,B){},beoforeComboPop:function(A,D,B,C){}},_posMap:{none:"",combobox:"left top",listbox:"left top",upload:"-16px top",getter:"left -31px",helpinput:"-16px -46px",cmdbox:"left -16px",popbox:"left -46px",timepicker:"left -60px",datepicker:"left -75px",colorpicker:"-16px -60px"},DataModel:{listKey:{set:function(A){var B=this.constructor.getCachedData(A);return this.each(function(C){C.boxing().setItems(B?B:C.properties.items);C.properties.listKey=A})}},items:{ini:[],action:function(B){var A=this;A.boxing().setValue(null,true);A.SubSerialIdMapItem={};A.ItemIdMapSubSerialId={};A.box._prepareItems(A,B);A.boxing().clearPopCache()}},image:{action:function(A){this.getSubNode("MID").css("backgroundImage","url("+(A||"")+")")}},imagePos:{action:function(A){this.getSubNode("MID").css("backgroundPosition",A)}},readonly:{ini:false,action:function(A){if(!A&&this.properties.type=="listbox"){return }this.getSubNode("INPUT").css("cursor",A?"pointer":"default").attr("readonly",A)}},type:{ini:"combobox",listbox:_.toArr("none,combobox,listbox,upload,getter,helpinput,cmdbox,popbox,timepicker,datepicker,colorpicker,spin"),set:function(B,A){return this.each(function(C){if(C.properties.type!=B||A){C.properties.type=B;C.box._iniType(C);if(C.domNode){C.boxing().refresh()}}})}},scale:2,increment:0.01,min:0,max:1,saveBtn:{ini:false,action:function(A){this.boxing().refresh()}}},RenderTrigger:function(){var B=this,A=B.boxing(),C=B.properties;B.box._iniType(B);if(C.readonly){A.setReadonly(true,true)}},_spin:function(D,B){var G=D.$id+":spin";if(linb.Thread.isAlive(G)){return }var F=D.properties,E=F.increment*(B?1:-1),C={delay:300},A=function(){D.boxing().setUIValue(String((+F.$UIvalue||0)+E));C.delay*=0.9};C.task=A;linb.Thread(G,[C],500,null,A,null,true).start()},_dynamicTemplate:function(D){var B=D.properties,E=D._exhash="$multiLines:"+B.multiLines+";type:"+B.type+";",C=D.box.getTemplate(E);B.$UIvalue=B.value;if(!C){C=_.clone(D.box.getTemplate());var A=C.FRAME.BORDER;if(B.multiLines){A.BOX.WRAP.INPUT.tagName="textarea";delete A.BOX.WRAP.INPUT.type}switch(B.type){case"spin":A.RBTN={$order:5,style:"{rDisplay}",R1:{R1T:{},R1B:{}},R2:{R2T:{},R2B:{}}};break;case"none":break;case"upload":A.UPLOAD={$order:2,tagName:"input",type:"file",size:"1"};default:A.BTN={$order:4,style:"{_popbtnDisplay}",TOP:{},MID:{style:"{_btnStyle}"}}}D.box.setTemplate(C,E)}D.template=C},_prepareData:function(A){var B=arguments.callee.upper.call(this,A),C=A.box._posMap;if(C[B.type]){B._btnStyle=B.image?("background: url("+B.image+")"+(B.imagePos||"")):("background-position:"+C[B.type])}B._saveDisplay=B.saveBtn?"":"display:none";B._popbtnDisplay=B.type!="none"?"":"display:none";return B},_ensureValue:function(B,D){var C=arguments.callee,A=C._reg||(C._reg=/^#[\w]{6}$/),F=B.properties;switch(B.properties.type){case"datepicker":return(D.constructor==Date?D.getTime():D)+"";case"colorpicker":return"#"+linb.UI.ColorPicker._ensureValue(null,D);case"timepicker":return linb.UI.TimePicker._ensureValue(null,D);case"spin":var E=Math.pow(10,F.scale);D=+D||0;D=Math.ceil((D-3e-13)*E)/E;return String(D>F.max?F.max:D<F.min?F.min:D);default:return typeof D!=="string"?D:(D||D===0)?String(D):""}},_onresize:function(C,M,K){var R=1,A=1,F=linb.UI.$getCSSValue("linb-comboinput-input","paddingTop");var H=C.properties,L=C.getSubNode("BOX"),N=C.getSubNode("BORDER"),J="px",P=function(S){return S?C.getSubNode(S)._nodes[0]:null},B=P("INPUT"),O=P(H.saveBtn?"SBTN":null),G=P(H.type=="spin"?"RBTN":H.type=="none"?null:"BTN"),Q=M,D=K,E=Math.max(0,(H.$b_lw||0)-R),I=Math.max(0,(H.$b_tw||0)-A);if(null!==Q){Q-=Math.max(R*2,(H.$b_lw||0)+(H.$b_rw||0));Q-=((O?O.offsetWidth:0)+(G?G.offsetWidth:0));if(linb.browser.ie6){Q=(parseInt(Q/2))*2}}if(null!==D){D-=Math.max(A*2,(H.$b_lw||0)+(H.$b_rw||0));if(linb.browser.ie6){D=(parseInt(D/2))*2}if(linb.browser.ie6&&null===M){L.ieRemedy()}}if(null!==Q){B.style.width=Q+J}if(null!==D){B.style.height=(D-F)+J}if(O){O.style.height=(K-2)+J}if(G){G.style.height=(K-2)+J}if(H.type=="spin"){K=(K/2-2)+J;P("R1").style.height=K;P("R2").style.height=K}L.cssRegion({left:E,top:I,width:Q,height:D});N.cssRegion({width:M,height:K});if((C.$border||C.$shadow||C.$resizer)&&linb.browser.ie){L.ieRemedy();N.ieRemedy()}}}});Class("linb.UI.Group","linb.UI.Div",{Instance:{activate:function(){var A=this.get(0);A.getSubNode("HANDLE").focus();return this}},Static:{Behaviors:{NavKeys:{CAPTION:1},HoverEffected:{TOGGLE:"TOGGLE"},ClickEffected:{TOGGLE:"TOGGLE"},DropableKeys:["PANEL"],DragableKeys:["HANDLE"],onSize:function(D,E){var C=D.domNode.style,A=null,B=null;if(E.width){A=parseInt(C.width)||A}if(E.height){B=parseInt(C.height)||B}linb.UI.$tryResize(D,A,B)},HANDLE:{onClick:function(A,B,C){if(A.properties.toggleBtn){A.box._toggle(A,!A.properties.toggle);return false}}}},Templates:{tagName:"div",style:"{_style}",FIELDSET:{tagName:"fieldset",className:" {toggleCls}",LEGEND:{tagName:"legend",HANDLE:{tagName:"a",href:linb.$href,tabindex:"{tabindex}",TOGGLE:{className:"uicmd-toggle2 {toggleCls}",style:"{toggleDispplay}"},ICON:{style:"background:url({image}) transparent  no-repeat {imagePos};{iconDisplay}",className:"ui-icon",$order:1},CAPTION:{text:"{caption}",$order:2}}},PANEL:{$order:1,tagName:"div",style:"{panelDisplay}",text:"{html}"+linb.UI.$childTag}}},Appearances:{KEY:{zoom:linb.browser.ie6?"1":null},FIELDSET:{border:"1px solid #7ba3cb",position:"relative",overflow:"hidden",zoom:linb.browser.ie6?"1":null},"FIELDSET-checked":{$order:2,"padding-left":"2px","border-left":"0","border-right":"0","border-bottom":"0"},LEGEND:{"margin-left":"3px"},HANDLE:{cursor:"default",padding:"0 3px 0 6px",display:linb.$inlineBlock},PANEL:{position:"relative",overflow:"auto",background:linb.browser.ie?"url("+linb.ini.file_bg+") no-repeat left top":null},"FIELDSET-checked PANEL":{$order:4,display:"none"},CAPTION:{"vertical-align":"middle","font-family":'"Verdana", "Helvetica", "sans-serif"',"font-size":"12px","line-height":"18px"}},DataModel:{caption:{ini:undefined,action:function(A){this.getSubNode("CAPTION").get(0).innerHTML=A}},html:{action:function(A){this.getSubNode("PANEL").html(A)}},toggleBtn:{ini:true,action:function(A){this.getSubNode("TOGGLE").css("display",A?"":"none")}},toggle:{ini:true,action:function(A){this.box._toggle(this,A)}},image:{action:function(A){this.getSubNode("ICON").css("display",A?"":"none").css("backgroundImage","url("+(A||"")+")")}},imagePos:{action:function(A){this.getSubNode("ICON").css("backgroundPosition",A)}}},LayoutTrigger:function(){var B=this,C=B.properties,A=B.box;if(C.toggle){A._toggle(B,C.toggle)}},EventHandlers:{onIniPanelView:function(A){},onFold:function(A){},onExpend:function(A){}},_prepareData:function(B){var C=arguments.callee.upper.call(this,B),A="display:none";C.toggleDispplay=C.toggleBtn?"":A;C.panelDisplay=C.toggleBtn&&!C.toggle?A:"";C.toggleCls=C.toggleBtn&&!C.toggle?B.getClass("FIELDSET","-checked"):"";C.toggleCls2=C.toggleBtn&&!C.toggle?B.getClass("TOGGLE","-checked"):"";return C},_onresize:function(C,B,A){if(A&&parseInt(C.domNode.style.height)){C.getSubNode("FIELDSET").height(A);C.getSubNode("PANEL").height(A-(C.getSubNode("LEGEND").height()||18))}if(B&&parseInt(C.domNode.style.width)){C.getSubNode("PANEL").width(B-2)}},_toggle:function(B,C){var D=B.properties,A=B.boxing();D.toggle=C;if(C&&!B.$ini){if(A.onIniPanelView){if(A.onIniPanelView(B)!==false){B.$ini=true}}}if(C){if(false===A.onExpend(B)){return }}else{if(false===A.onFold(B)){return }}B.getSubNode("PANEL").css("display",C?"":"none");B.getSubNodes(["TOGGLE","FIELDSET"]).tagClass("-checked",!C)}}});Class("linb.UI.ColorPicker",["linb.UI","linb.absValue"],{Instance:{activate:function(){this.getSubNode("TOGGLEA").focus();return this},_setCtrlValue:function(B,A){return this.each(function(G){if(!G.domNode){return }var K=G.box,E=G.properties,F=G.$hex=K._to3(B),D=G.$hex.join(""),J=G.$rgb=K.hex2rgb(B),H=G.$hsv=K.rgb2hsv(J),I=function(M,L){G.getSubNode(M).get(0).firstChild.nodeValue=String(L)},C=function(L){return parseInt(L*100)};I("R",J[0]);I("G",J[1]);I("B",J[2]);I("H",F[0]);I("E",F[1]);I("X",F[2]);if(G.$hexinhsv!=D){I("HH",H[0]);I("S",C(H[1]));I("V",C(H[2]));delete G.$hexinhsv}K._setClrName(G,D);K._updateDftTip(G);if(E.advance&&G.$hexinadv!=D){K._updateMarks(G,B,true,H[0]);delete G.$hexinadv}if(A!=false){G.getSubNode("CAPTION").html("#"+B,false)}})},getColorName:function(){return this.get(0).$clrN||""}},Initialize:function(){var H=this,F=linb.Event.$EVENTHANDLER,A=linb.UI.$ID,K=linb.UI.$CLS,I=H.KEY,G=H._slist,B=G.length,D,C,E=[],J=' unselectable="on" onmousedown="'+F+'" ondrag="'+F+'" ondragstop="'+F+'" ';H.addTemplateKeys(["TXT","DD1","DD2","DD3","R","G","B","HH","S","V","H","E","X"]);for(D=0;D<B;D++){E.push('<a  id="'+I+"-SC:"+A+":"+G[D]+'" href='+linb.$href+' onmouseover="'+F+'"  onkeydown="'+F+'" onclick="'+F+'" style="background-color:#'+G[D]+'">'+G[D]+"</a>")}C='<div><span class="'+K+'-txt">R: </span><span id="'+I+"-R:"+A+':" class="'+K+'-dd2 ui-dragable #DD2_CC#" '+J+'>R</span><span style="width:8px;height:8px"  unselectable="on" ></span><span class="'+K+'-txt">H: </span><span id="'+I+"-HH:"+A+':" class="'+K+'-dd2 ui-dragable #DD2_CC#" '+J+'>H</span><span>\xB0</span></div><div><span class="'+K+'-txt">G: </span><span id="'+I+"-G:"+A+':" class="'+K+'-dd2 ui-dragable #DD2_CC#" '+J+'>G</span><span style="width:8px;height:8px"  unselectable="on" ></span><span class="'+K+'-txt">S: </span><span id="'+I+"-S:"+A+':" class="'+K+'-dd2 ui-dragable #DD2_CC#"  '+J+'>S</span><span>%</span></div><div><span class="'+K+'-txt">B: </span><span id="'+I+"-B:"+A+':" class="'+K+'-dd2 ui-dragable #DD2_CC#" '+J+'>B</span><span style="width:8px;height:8px"  unselectable="on" ></span><span class="'+K+'-txt">V: </span><span id="'+I+"-V:"+A+':" class="'+K+'-dd2 ui-dragable #DD2_CC#" '+J+'>V</span><span>%</span></div><div><span style="width:38px">HEX: #</span><span id="'+I+"-H:"+A+':" class="'+K+'-dd3 ui-dragable #DD3_CC#" '+J+'>H</span><span id="'+I+"-E:"+A+':" class="'+K+'-dd3 ui-dragable #DD3_CC#" '+J+'>E</span><span id="'+I+"-X:"+A+':" class="'+K+'-dd1 ui-dragable #DD1_CC#" '+J+">X</span></div>";H.setTemplate({style:"{_style};height:auto;width:{_width}px;",tagName:"div",onselectstart:"return false",BORDER:{tagName:"div",BAR:{tagName:"div",className:"uibar-top",style:"{barDisplay};",BART:{cellpadding:"0",cellspacing:"0",width:"100%",border:"0",className:"uibar-t",tagName:"table",BARTR:{tagName:"tr",BARTDL:{tagName:"td",className:"uibar-tdl"},BARTDM:{$order:1,width:"100%",tagName:"td",className:"uibar-tdm"},BARTDR:{$order:2,tagName:"td",className:"uibar-tdr"}}},BARCMDL:{tagName:"div",className:"uibar-cmdl"},BARCMDR:{tagName:"div",className:"uibar-cmdr",onselectstart:"return false",unselectable:"on",CLOSE:{className:"uicmd-close ",style:"{closeDisplay}"}}},MAIN:{$order:2,tagName:"div",className:"uicon-main",MAINI:{tagName:"div",className:"uicon-maini",CON:{$order:1,tagName:"div",SIMPLE:{tagName:"div",TOP:{$order:1,tagName:"div",DATA:{$order:0,tagName:"div",onselectstart:"return false",text:C},EXAM:{$order:1,tagName:"div",EXAMI:{tagName:"div"}}},LIST:{$order:2,tagName:"div",text:E.join("")}},ADV:{$order:2,style:"{advDispay}",tagName:"div",ADVWHEEL:{$order:0,tagName:"div"},ADVCLR:{$order:1,tagName:"div"},ADVMARK1:{$order:3,tagName:"div"},ADVMARK2:{$order:4,tagName:"div"}}}}},TAIL:{$order:3,tagName:"div",className:"uicon-main",TAILI:{tagName:"div",className:"uicon-maini",CAPTION:{text:"{caption}"},SET:{className:"ui-btn",SETI:{className:"ui-btni",SETC:{className:"ui-btnc",SETA:{tagName:"a",href:linb.$href,text:linb.wrapRes("inline.set")}}}},TOGGLE:{className:"ui-btn",TOGGLEI:{className:"ui-btni",TOGGLEC:{className:"ui-btnc",TOGGLEA:{tagName:"a",href:linb.$href,tabindex:"{tabindex}",text:">>"}}}}}},BBAR:{$order:4,tagName:"div",className:"uibar-bottom-s",BBART:{cellpadding:"0",cellspacing:"0",width:"100%",border:"0",tagName:"table",className:"uibar-t",BBARTR:{tagName:"tr",BBARTDL:{tagName:"td",className:"uibar-tdl"},BBARTDM:{$order:1,width:"100%",tagName:"td",className:"uibar-tdm"},BBARTDR:{$order:2,tagName:"td",className:"uibar-tdr"}}}}}})},Static:{_radius:84,_square:100,_bigRadius:97,DataModel:{height:{ini:"auto",readonly:true},width:{ini:"auto",readonly:true},value:"FFFFFF",displayBar:{ini:true,action:function(A){this.getSubNode("BAR").css("display",A?"":"none")}},closeBtn:{ini:true,action:function(A){this.getSubNode("CLOSE").css("display",A?"":"none")}},advance:{ini:false,action:function(A){var B=this;B.getSubNode("ADV").css("display",A?"":"none");B.getSubNode("TOGGLEA").text(A?"<<":">>");B.root.width(A?410:210);if(A){B.box._updateMarks(B,B.properties.$UIvalue,true,B.$hsv[0])}}},$borderW:1},Appearances:{KEY:{"-moz-user-select":"none"},MAINI:{padding:"4px 5px 4px 0"},CON:{height:"196px",padding:"3px",position:"relative",border:"solid 1px #648CB4"},DATA:{"float":"left",width:"112px",height:"86px"},"DATA span":{"float":"left"},"DATA div":{"padding-top":"3px",clear:"both"},TXT:{width:"16px"},CAPTION:{"font-size":"12px","vertical-align":"middle"},EXAM:{"float":"left","margin-top":"2px",padding:"3px",border:"solid 1px #648CB4","background-color":"#E5EBFB"},EXAMI:{height:"70px",width:"70px","white-space":"normal","text-align":"center",border:"solid 1px #648CB4"},"DD1, DD2, DD3":{display:"block",height:"16px",border:"1px solid #779EBF","padding-right":"2px",cursor:"e-resize","text-align":"right",background:"#F8FBFF"},DD1:{width:"16px"},DD2:{width:"24px"},DD3:{$order:2,width:"16px","border-right":"none"},TOP:{height:"90px",position:"relative"},LIST:{height:"106px",position:"relative",overflow:"hidden",margin:"0 2px","line-height":linb.browser.ie6?"0":null,clear:"both"},TAILI:{position:"relative","padding-top":"4px",height:"22px","text-align":"center"},SIMPLE:{"float":"left",width:"192px",position:"relative"},ADV:{"float":"right",width:"195px",height:"195px",position:"relative"},"ADV div":{cursor:"crosshair",position:"absolute"},ADVCLR:{background:linb.browser.ie6?null:linb.UI.$bg("bg.png","no-repeat left top"),_filter:linb.UI.$ieBg("bg.png"),height:"101px",left:"47px",top:"47px",width:"101px"},ADVWHEEL:{background:linb.browser.ie6?null:linb.UI.$bg("clr.png","no-repeat left top"),_filter:linb.UI.$ieBg("clr.png"),height:"195px",width:"195px"},"ADVMARK1, ADVMARK2":{background:linb.browser.ie6?null:linb.UI.$bg("picker.png","no-repeat left top"),_filter:linb.UI.$ieBg("picker.png"),height:"17px",margin:"-8px 0pt 0pt -8px",overflow:"hidden",width:"17px"},"LIST a":{height:"12px",width:"10px","font-size":linb.browser.ie6?"0":null,"float":"left",display:"block",overflow:"hidden","text-indent":"100px",margin:"0",cursor:"pointer",border:"1px solid #000",margin:"0 -1px -1px 0"},"LIST a:hover":{border:"1px solid black"},SET:{position:"absolute",display:"none",top:"0",right:"38px"},TOGGLE:{position:"absolute",right:"5px",top:"0"}},Behaviors:{HoverEffected:{CLOSE:"CLOSE",SET:"SET",TOGGLE:"TOGGLE"},ClickEffected:{CLOSE:"CLOSE",SET:"SET",TOGGLE:"TOGGLE"},KEY:{onClick:function(){return false}},SC:{onMouseover:function(C,B,A){C.box._setTempUI(C,C.getSubId(A.id))},onClick:function(D,C,B){var A=D.getSubId(B.id);D.boxing()._setCtrlValue(D.$tempValue=A,false);if(!D.properties.advance){D.boxing().setUIValue(A)}D.box._vC(D);return false}},LIST:{onMouseout:function(C,B,A){C.box._updateDftTip(C)}},SET:{onClick:function(B,A,C){B.boxing().setUIValue(B.$tempValue,true);B.box._vC(B)}},CANCEL:{onClick:function(B,A,C){B.getSubNode("CLOSE").onClick(true)}},TOGGLE:{onClick:function(B,A,C){B.boxing().setAdvance(!B.properties.advance)}},R:{onMousedown:function(B,A,C){B.box._dd1(B,A,C)},onDrag:function(B,A,C){B.box._dd2(B,A,C,0)},onDragstop:function(B,A,C){B.box._dd3(B,A,C,0)}},G:{onMousedown:function(B,A,C){B.box._dd1(B,A,C)},onDrag:function(B,A,C){B.box._dd2(B,A,C,1)},onDragstop:function(B,A,C){B.box._dd3(B,A,C,1)}},B:{onMousedown:function(B,A,C){B.box._dd1(B,A,C)},onDrag:function(B,A,C){B.box._dd2(B,A,C,2)},onDragstop:function(B,A,C){B.box._dd3(B,A,C,2)}},HH:{onMousedown:function(B,A,C){B.box._dd1(B,A,C,true)},onDrag:function(B,A,C){B.box._dd2(B,A,C,0,"hsv1")},onDragstop:function(B,A,C){B.box._dd3(B,A,C,0,true,"hsv1")}},S:{onMousedown:function(B,A,C){B.box._dd1(B,A,C,true)},onDrag:function(B,A,C){B.box._dd2(B,A,C,1,"hsv2")},onDragstop:function(B,A,C){B.box._dd3(B,A,C,1,true,"hsv2")}},V:{onMousedown:function(B,A,C){B.box._dd1(B,A,C,true)},onDrag:function(B,A,C){B.box._dd2(B,A,C,2,"hsv2")},onDragstop:function(B,A,C){B.box._dd3(B,A,C,2,true,"hsv2")}},H:{onMousedown:function(B,A,C){B.box._dd1(B,A,C)},onDrag:function(B,A,C){B.box._dd2(B,A,C,0,"hex")},onDragstop:function(B,A,C){B.box._dd3(B,A,C,0)}},E:{onMousedown:function(B,A,C){B.box._dd1(B,A,C)},onDrag:function(B,A,C){B.box._dd2(B,A,C,1,"hex")},onDragstop:function(B,A,C){B.box._dd3(B,A,C,1)}},X:{onMousedown:function(B,A,C){B.box._dd1(B,A,C)},onDrag:function(B,A,C){B.box._dd2(B,A,C,2,"hex")},onDragstop:function(B,A,C){B.box._dd3(B,A,C,2)}},CLOSE:{onClick:function(C,D,E){var B=C.properties,A=C.boxing();if(B.disabled){return }if(false===A.beforeClose(C)){return }A.destroy();return false}},ADVWHEEL:{onMousedown:function(C,B,D){var A=C.box;A._prepareAdv(C,B);A._updateClrByPos(C,B,true);C.getSubNode("ADVMARK1").startDrag(B,{dragType:"none"})}},ADVMARK1:{onMousedown:function(C,B,D){var A=C.box;A._prepareAdv(C,B);A._updateClrByPos(C,B,true);C.getSubNode("ADVMARK1").startDrag(B,{dragType:"none"})},onDrag:function(C,B,D){var A=C.box;A._updateClrByPos(C,B,true)},onDragstop:function(B,A,C){B.box._updateValueByPos(B,A)}},ADVCLR:{onMousedown:function(C,B,D){var A=C.box;A._prepareAdv(C,B);A._updateClrByPos(C,B);C.getSubNode("ADVMARK2").startDrag(B,{dragType:"none"});return false}},ADVMARK2:{onMousedown:function(C,B,D){var A=C.box;A._prepareAdv(C,B);A._updateClrByPos(C,B);C.getSubNode("ADVMARK2").startDrag(B,{dragType:"none"});return false},onDrag:function(C,B,D){var A=C.box;A._updateClrByPos(C,B)},onDragstop:function(B,A,C){B.box._updateValueByPos(B,A)}}},_vC:function(B){var D=B.properties,A=D.$UIvalue,C=A==B.$tempValue;B.getSubNode("SET").css("display",C?"none":"block");B.getSubNode("CAPTION").css("color",C?"#000":"#ff0000")},_prepareData:function(B){var C=arguments.callee.upper.call(this,B);var A="display:none";C.displayBar=C.displayBar?"":A;C.closeDisplay=C.closeBtn?"":A;C._width=C.advance?"410":"210";C.advDispay=C.advance?"":"display:none;";return C},EventHandlers:{beforeClose:function(A,B){}},RenderTrigger:function(){this.$onValueSet=this.$onValueUpdated=function(A){this.box._setClrName(this,A)}},_setClrName:function(C,B){var E=C,A="color.LIST.",D=linb.getRes(A+B);if(D==B){E.$clrN2=E.$clrN="#"+B}else{E.$clrN=D;E.$clrN2=linb.wrapRes(A+B)}},_slist:"FFFFFF,FFFFF0,FFFFE0,FFFF00,FFFAFA,FFFAF0,FFFACD,FFF8DC,FFF5EE,FFF0F5,FFEFD5,FFEBCD,FFE4E1,FFE4C4,FFE4B5,FFDEAD,FFDAB9,FFD700,FFC0CB,FFB6C1,FFA500,FFA07A,FF8C00,FF7F50,FF69B4,FF6347,FF4500,FF1493,FF00FF,FF00FF,FF0000,FDF5E6,FAFAD2,FAF0E6,FAEBD7,FA8072,F8F8FF,F5FFFA,F5F5F5,F5DEB3,F4A460,F0FFFF,F0FFF0,F0F8FF,F0E68C,F08080,EEE8AA,EE82EE,E9967A,E6E6FA,E1FFFF,DEB887,DDA0DD,DCDCDC,DC143C,DB7093,DAA520,DA70D6,D8BFD8,D3D3D3,D2B48C,D2691E,CD853F,CD5C5C,C71585,C0C0C0,BDB76B,BC8F8F,BA55D3,B22222,B0E0E6,B0C4DE,AFEEEE,ADFF2F,ADD8E6,A9A9A9,A52A2A,A0522D,9932CC,98FB98,9400D3,9370DB,90EE90,8FBC8F,8B4513,8B008B,8B0000,8A2BE2,87CEFA,87CEEB,808080,808000,800080,800000,7FFFAA,7FFF00,7CFC00,7B68EE,778899,708090,6B8E23,6A5ACD,696969,6495ED,5F9EA0,556B2F,4B0082,48D1CC,483D8B,4682B4,4169E1,40E0D0,3CB371,32CD32,2F4F4F,2E8B57,228B22,20B2AA,1E90FF,191970,00FFFF,00FFFF,00FF7F,00FF00,00FA9A,00CED1,00BFFF,008B8B,008080,008000,006400,0000FF,0000CD,00008B,000080,000000".split(","),_C16:"0123456789ABCDEF",_dd1:function(C,F,G,B){var E=C.properties,A=C.box,D=function(){var H=A.hex2rgb(C.$tempValue||E.$UIvalue);return B?A.rgb2hsv(H):H};linb([G]).css("background","red").startDrag(F,{dragType:"blank",targetReposition:false,widthIncrement:2,dragCursor:true});C.$temp=0;C.$start=D();C.$temp2=D()},_dd2:function(E,I,A,F,J){var G,D=linb.DragDrop.getProfile().offset,B=E.properties,C=E.$temp2,L=E.box,H=J=="hsv1"?361:J=="hsv2"?101:256,K;G=(J=="hsv2"?parseInt(E.$start[F]*100):parseInt(E.$start[F]))+parseInt(D.x/2);G=(G%H+H)%H;if(E.$temp!=G){C[F]=E.$temp=J=="hsv2"?G/100:G;K=(J=="hsv1"||J=="hsv2")?L.hsv2rgb(C):C;K=L.rgb2hex(K);L._setTempUI(E,K);linb([A]).text(J=="hex"?L._toFF(G):G)}},_dd3:function(D,G,A,E,F){if(D.$start[E]!==D.$temp){var B=D.properties,I=D.box,C=D.$start,H;C[E]=D.$temp;H=F?I.hsv2rgb(C):C;H=I.rgb2hex(H);if(F){D.$hexinhsv=H}D.boxing()._setCtrlValue(D.$tempValue=H,false);delete D.$hexinhsv;D.box._vC(D)}linb([A]).css("background","");D.$temp=D.$start=0},_setTempUI:function(H,C){var B=this,E=B.hex2rgb(C),A=H.boxing(),F=A.getSubNode("EXAMI"),D=B.rgb2hsv(E),G=linb.getRes("color.LIST."+C);F.css({backgroundColor:"#"+C,color:D[2]>0.6?"#000":"#FFF"});F.text(H.show_color=G==C?"#"+C:G)},_updateDftTip:function(C){var A=C.box,B=C.boxing().getSubNode("EXAMI");B.css({backgroundColor:"#"+C.$hex.join(""),color:C.$hsv[2]>0.6?"#000":"#FFF"});B.html(C.$clrN2||"",false)},_to3:function(A){if(!A){A="FFFFFF"}return[A.substr(0,2),A.substr(2,2),A.substr(4,2)]},_toFF:function(B){var A=this._C16;B=parseInt(B)||0;B=(B>255||B<0)?0:B;return A.charAt((B-B%16)/16)+A.charAt(B%16)},_to255:function(C){var B=this._C16,A=C.split("");return B.indexOf(A[0].toUpperCase())*16+B.indexOf(A[1].toUpperCase())},_webSafe:function(D,C,A){var B=arguments.callee,E=B.f||(B.f=function(F){return parseInt(F/51)*51});if(typeof D=="object"){C=D[1];A=D[2];D=D[0]}return[E(D),E(C),E(A)]},_updateMarks:function(B,A,G,F){var J=this,E=J.hex2rgb(A),D=J.rgb2hsv(E),C=(D[0]/360)*6.28,K=B.getSubNode("ADVCLR");if(G){var I=B.getSubNode("ADVMARK1"),H=B.getSubNode("ADVMARK2");I.cssPos({left:Math.round(Math.sin(C)*J._radius+J._bigRadius),top:Math.round(-Math.cos(C)*J._radius+J._bigRadius)});H.cssPos({left:Math.round(J._square*(D[1]-0.5)+J._bigRadius),top:Math.round(J._square*(0.5-D[2])+J._bigRadius)})}if(F!==undefined){K.css("backgroundColor","#"+J.rgb2hex(J.hsv2rgb([F,1,1])))}J._setTempUI(B,A)},_updateClrByPos:function(C,H,I){var P=this,E=linb.Event.getPos(H),K=C.$tpos,B=E.left-K.left,L=E.top-K.top,D,O,N,G,Q,M,F,J,A;if(I){O=C.getSubNode("ADVMARK1");D=Math.atan2(B,-L);O.cssPos({left:Math.round(Math.sin(D)*P._radius+P._bigRadius),top:Math.round(-Math.cos(D)*P._radius+P._bigRadius)});G=Math.floor((D/6.28)*360);if(G<0){G+=360}F=[G,C.$hsv[1],C.$hsv[2]];J=P.hsv2rgb(F);A=P.rgb2hex(J);P._updateMarks(C,C.$t_hex=A,false,G)}else{N=C.getSubNode("ADVMARK2");Q=Math.max(0,Math.min(1,(B/P._square)+0.5));M=Math.max(0,Math.min(1,0.5-(L/P._square)));N.cssPos({left:Math.round(P._square*(Q-0.5)+P._bigRadius),top:Math.round(P._square*(0.5-M)+P._bigRadius)});F=[C.$hsv[0],Q,M];J=P.hsv2rgb(F);A=P.rgb2hex(J);P._updateMarks(C,C.$t_hex=A)}},_updateValueByPos:function(A,B){A.$hexinadv=A.$t_hex;A.boxing()._setCtrlValue(A.$tempValue=A.$t_hex,false);delete A.$hexinadv;A.box._vC(A)},_prepareAdv:function(B,C){var A=this,D=B.getSubNode("ADVWHEEL").offset();B.$tpos={left:D.left+A._bigRadius,top:D.top+A._bigRadius}},_ensureValue:function(C,I){var G=this,F=arguments.callee,A=F.map||(F.map=(function(){var J={};_.arr.each(G._C16.split(""),function(L,K){J[L]=1});return J}())),B=F._r||(F._r=/rgb\(([^)]*)\)/);if(!I||typeof I!="string"){return"FFFFFF"}if(B.test(I)){I=I.replace(B,"$1");I=I.split(",");I[0]=parseInt(I[0])||0;I[1]=parseInt(I[1])||0;I[2]=parseInt(I[2])||0;I=G.rgb2hex(I)}if(I.charAt(0)=="#"){I=I.substr(1,I.length)}var H="",D;for(var E=0;E<6;E++){D=I.charAt(E).toUpperCase();H+=(A[D]?D:"F")}return H},hsv2rgb:function(F,M,K){if(F instanceof Array){M=F[1];K=F[2];F=F[0]}var I=arguments.callee,H=I.f||(I.f=function(N){return Math.min(255,Math.round(N*256))}),A,G,J,E,D,C,B,L;if(M==0){return[K=H(K),K,K]}else{E=Math.floor((F/60)%6);D=(F/60)-E;C=K*(1-M);B=K*(1-D*M);L=K*(1-(1-D)*M);switch(E){case 0:A=K;G=L;J=C;break;case 1:A=B;G=K;J=C;break;case 2:A=C;G=K;J=L;break;case 3:A=C;G=B;J=K;break;case 4:A=L;G=C;J=K;break;case 5:A=K;G=C;J=B;break}return M==0?[K=H(K),K,K]:[H(A),H(G),H(J)]}},rgb2hsv:function(A,D,E){if(A instanceof Array){D=A[1];E=A[2];A=A[0]}A=A/255;D=D/255;E=E/255;var B=Math.min(A,D,E),F=Math.max(A,D,E),G=F-B,I=(F===0)?0:1-(B/F),H=F,C;switch(F){case B:C=0;break;case A:C=60*(D-E)/G;if(D<E){C+=360}break;case D:C=(60*(E-A)/G)+120;break;case E:C=(60*(A-D)/G)+240;break}return[Math.round(C),I,H]},rgb2hex:function(D,C,A){var B=this;if(D instanceof Array){C=D[1];A=D[2];D=D[0]}return B._toFF(D)+B._toFF(C)+B._toFF(A)},hex2rgb:function(B){var A=this;if(!B){B="FFFFFF"}if(B.charAt(0)=="#"){B=B.slice(1)}return[A._to255(B.substr(0,2)),A._to255(B.substr(2,2)),A._to255(B.substr(4,2))]},getTextColor:function(B){var A=this;B=A._ensureValue(0,B);B=A.hex2rgb(B);B=A.rgb2hsv(B);return(B&&B[2])>0.6?"#000000":"#FFFFFF"},_onresize:function(){}}});Class("linb.UI.DatePicker",["linb.UI","linb.absValue"],{Dependency:["linb.Date"],Instance:{activate:function(){this.getSubNode("PRE").focus();return this},_setCtrlValue:function(A){return this.each(function(E){if(!E.domNode){return }var C=E.box,F=E.properties,D=linb.Date,B=D.getTimSpanStart(A,"m");C._to(E,B,A);if(E.keys.CAPTION){E.getSubNode("CAPTION").html(D.getText(A,"ymd",F.WEEK_FIRST),false)}})},getDateFrom:function(){return this.get(0)._realstart}},Initialize:function(){var J=this,R=linb.Event.$EVENTHANDLER,K=linb.UI.$ID,A=linb.UI.$CLS,I=A+"-td-free",W=J.KEY;J.addTemplateKeys(["H","W","TBODY","TD"]);var G='<colgroup><col width="2%"/><col width="14%"/><col width="14%"/><col width="14%"/><col width="14%"/><col width="14%"/><col width="14%"/><col width="14%"/></colgroup>',C='<thead><tr height="1%"><th id="'+W+"-H:"+K+':7" class="'+A+'-h #H_CC#"></th>',B="</tr></thead>",F='<th id="'+W+"-H:"+K+':@" class="'+A+'-h #H_CC#">@</th>',O='<tbody id="'+W+"-TBODY:"+K+':" >',M="</tbody>",V="<tr>",T="</tr>",E='<th id="'+W+"-W:"+K+':@"  class="'+A+'-w #W_CC#">@</th>',D='<td id="'+W+"-TD:"+K+':@" class="'+A+'-td ! #TD_CC#"  unselectable="on" onmouseover="'+R+'" onmouseout="'+R+'" onclick="'+R+'" ></td>',H,Q,P,N,L,U=[],S=[];for(Q=0;Q<7;Q++){S[S.length]=F.replace(/@/g,Q)}N=L=0;for(Q=0;Q<48;Q++){P=Q%8;U[U.length]=(P==0?V:"")+(P==0?E:D).replace(/@/g,P==0?L:N).replace("!",(P==1||P==7)?I:"")+(P==7?T:"");if(P!==0){N++}else{L++}}H=G+C+S.join("")+B+O+U.join("")+M;J.setTemplate({tagName:"div",style:"{_style};height:auto;",onselectstart:"return false",BORDER:{tagName:"div",BAR:{tagName:"div",className:"uibar-top",style:"{barDisplay};",BART:{cellpadding:"0",cellspacing:"0",width:"100%",border:"0",className:"uibar-t",tagName:"table",BARTR:{tagName:"tr",BARTDL:{tagName:"td",className:"uibar-tdl"},BARTDM:{$order:1,width:"100%",tagName:"td",className:"uibar-tdm"},BARTDR:{$order:2,tagName:"td",className:"uibar-tdr"}}},BARCMDL:{tagName:"div",className:"uibar-cmdl",PRE2:{$order:0,tagName:"a",href:linb.$href,tabindex:"{tabindex}"},PRE:{$order:1,tagName:"a",href:linb.$href,tabindex:"{tabindex}"},YEAR:{$order:2,unselectable:"on",className:"ui-dragable"},MONTH:{$order:4,unselectable:"on",className:"ui-dragable"},MTXT:{$order:5,style:"display:inline"},NEXT:{$order:6,tagName:"a",href:linb.$href,tabindex:"{tabindex}"},NEXT2:{$order:7,tagName:"a",href:linb.$href,tabindex:"{tabindex}"}},BARCMDR:{tagName:"div",className:"uibar-cmdr",onselectstart:"return false",unselectable:"on",CLOSE:{className:"uicmd-close ",style:"{closeDisplay}"}}},MAIN:{$order:2,tagName:"div",className:"uicon-main",MAINI:{tagName:"div",className:"uicon-maini",CON:{tagName:"div",BODY:{tagName:"table",cellpadding:"0",cellspacing:"0",width:"100%",text:H}}}},TAIL:{$order:3,tagName:"div",className:"uicon-main",TAILI:{tagName:"div",className:"uicon-maini",CAPTION:{text:"{caption}",$order:1},TODAY:{className:"ui-btn",TODAYI:{className:"ui-btni",TODAYC:{className:"ui-btnc",TODAYA:{tagName:"a",href:linb.$href,tabindex:"{tabindex}",text:linb.wrapRes("inline.today")}}}}}},BBAR:{$order:4,tagName:"div",className:"uibar-bottom-s",BBART:{cellpadding:"0",cellspacing:"0",width:"100%",border:"0",tagName:"table",className:"uibar-t",BBARTR:{tagName:"tr",BBARTDL:{tagName:"td",className:"uibar-tdl"},BBARTDM:{$order:1,width:"100%",tagName:"td",className:"uibar-tdm"},BBARTDR:{$order:2,tagName:"td",className:"uibar-tdr"}}}}}})},Static:{Appearances:{KEY:{overflow:"visible","-moz-user-select":"none"},BORDER:{overflow:"visible",position:"relative"},BODY:{position:"relative"},BARCMDL:{top:"3px"},TAILI:{position:"relative","padding-top":"4px",height:"22px","text-align":"center"},TODAY:{position:"absolute",top:"0",right:"5px"},"PRE,PRE2,NEXT,NEXT2":{$order:0,display:linb.$inlineBlock,position:"relative",margin:"0 2px",width:"15px",height:"15px","vertical-align":"middle",cursor:"default",background:linb.UI.$bg("icons.gif","no-repeat",true)},PRE:{$order:1,"background-position":"-260px -70px"},"PRE-mouseover":{$order:2,"background-position":"-260px -90px"},"PRE-mousedown":{$order:3,"background-position":"-260px -110px"},PRE2:{$order:1,"background-position":"-240px -70px"},"PRE2-mouseover":{$order:2,"background-position":"-240px -90px"},"PRE2-mousedown":{$order:3,"background-position":"-240px -110px"},NEXT:{$order:1,"background-position":"-280px -70px"},"NEXT-mouseover":{$order:2,"background-position":"-280px -90px"},"NEXT-mousedown":{$order:3,"background-position":"-280px -110px"},NEXT2:{$order:1,"background-position":"-300px -70px"},"NEXT2-mouseover":{$order:2,"background-position":"-300px -90px"},"NEXT2-mousedown":{$order:3,"background-position":"-300px -110px"},"YEAR,MONTH":{$order:4,margin:"0 2px",height:"15px","font-weight":"bold","vertical-align":"middle",border:"1px solid #779EBF","background-color":"#F8FBFF","padding-left":"2px",cursor:"e-resize"},YEAR:{width:"32px"},MONTH:{width:"16px"},CAPTION:{"font-size":"12px","vertical-align":"middle"},MAINI:{"padding-top":"4px","padding-bottom":"4px"},CON:{"border-left":"solid 1px #648CB4","border-top":"solid 1px #648CB4"},BODY:{overflow:"visible"},"BODY td,BODY th":{$order:1,border:0,"border-right":"solid 1px #648CB4","border-bottom":"solid 1px #648CB4"},"TD .exday":{color:"#C1C1C1"},TD:{"text-align":"center","background-color":"#EFF8FF"},"TD-free":{$order:1,"text-align":"center","background-color":"#F9F7D1"},"TD-mouseover":{$order:3,"background-color":"#d9e8fb"},"TD-checked":{$order:4,"background-color":"#316AC5","font-weight":"bold",color:"#fff"},"W,H":{$order:3,color:"#333333","background-color":"#E8EEF7","vertical-align":"middle","text-align":"center"}},Behaviors:{HoverEffected:{CLOSE:"CLOSE",TD:"TD",PRE:"PRE",PRE2:"PRE2",NEXT:"NEXT",NEXT2:"NEXT2",TODAY:"TODAY"},ClickEffected:{CLOSE:"CLOSE",TD:"TD",PRE:"PRE",PRE2:"PRE2",NEXT:"NEXT",NEXT2:"NEXT2",TODAY:"TODAY"},KEY:{onClick:function(){return false}},TD:{onClick:function(B,E,F){var D=B.properties,G=B.getSubId(F.id),C=B.$daymap,A=C[G];if(D.disabled){return false}linb([F]).onMouseout(true,{$force:true});B.boxing().setUIValue(A)}},TODAY:{onClick:function(A){A.boxing().setUIValue(new Date,true)}},CLOSE:{onClick:function(C,D,E){var B=C.properties,A=C.boxing();if(B.disabled){return }if(false===A.beforeClose(C,E)){return }A.destroy();return false}},PRE:{onClick:function(A,C,D){var B=A.properties;if(B.disabled){return }A.box._to(A,linb.Date.add(A.$mfirst,"m",-1,B.WEEK_FIRST))}},NEXT:{onClick:function(A,C,D){var B=A.properties;if(B.disabled){return }A.box._to(A,linb.Date.add(A.$mfirst,"m",1,B.WEEK_FIRST))}},PRE2:{onClick:function(A,C,D){var B=A.properties;if(B.disabled){return }A.box._to(A,linb.Date.add(A.$mfirst,"y",-1,B.WEEK_FIRST))}},NEXT2:{onClick:function(A,C,D){var B=A.properties;if(B.disabled){return }A.box._to(A,linb.Date.add(A.$mfirst,"y",1,B.WEEK_FIRST))}},YEAR:{onMousedown:function(A,B,C){linb(C).startDrag(B,{dragType:"blank",targetReposition:false,widthIncrement:20,dragCursor:true});A.$temp=A.$temp2=0},onDrag:function(A,C,E){var B,D=linb.DragDrop.getProfile().offset;B=parseInt(A.$year)+(A.$temp2=parseInt(D.x/20));if(A.$temp!=B){A.$temp=B;A.getSubNode("YEAR").html(B,false)}},onDragstop:function(B,D,E){if(B.$temp2){var C=B.properties,A=linb.Date.add(B.$mfirst,"y",B.$temp2,C.WEEK_FIRST);B.box._to(B,linb.Date.getTimSpanStart(A,"m"))}B.$temp=B.$temp2=0}},MONTH:{onMousedown:function(A,B,C){linb(C).startDrag(B,{dragType:"blank",targetReposition:false,widthIncrement:20,dragCursor:true});A.$temp=A.$temp2=0},onDrag:function(A,C,E){var B,D=linb.DragDrop.getProfile().offset;B=parseInt(A.$month)+(parseInt(D.x/20)%12);B=(B%12+12)%12;if(A.$temp!=B){A.$temp=B;A.$temp2=B-A.$month+1;A.getSubNode("MONTH").html(B+1,false)}},onDragstop:function(B,D,E){if(B.$temp2){var C=B.properties,A=linb.Date.add(B.$mfirst,"m",B.$temp2,C.WEEK_FIRST);B.box._to(B,linb.Date.getTimSpanStart(A,"m"))}B.$temp=B.$temp2=0}}},DataModel:{height:{ini:"auto",readonly:true},width:{ini:210,readonly:true},value:new Date,closeBtn:{ini:true,action:function(A){this.getSubNode("CLOSE").css("display",A?"":"none")}},$borderW:1},EventHandlers:{beforeClose:function(A,B){}},_prepareData:function(B){var C=arguments.callee.upper.call(this,B);var A="display:none";C.closeDisplay=C.closeBtn?"":A;return C},RenderTrigger:function(){var B=this,C=B.properties,D=B.boxing(),A=B.box;A._setWeekLabel(B)},_getWeekNodes:function(A){return A.$week||(A.$week=A.getSubNode("W",true))},_getTDNodes:function(A){return A.$tds||(A.$tds=A.getSubNode("TD",true))},_getLabelNodes:function(A){return A.$day||(A.$day=A.getSubNode("TD",true))},_getHeaderNodes:function(A){return A.$header||(A.$header=A.getSubNode("H",true))},_setWeekLabel:function(A){var C=linb.Date,B=A.getSubId;A.box._getHeaderNodes(A).each(function(E,D){E.innerHTML=linb.wrapRes("date.WEEKS."+B(E.id))})},_setBGV:function(D,H,F){var E=linb.Date,A=D.properties,G=D.$daymap||(D.$daymap=[]),I,C,B=A.WEEK_FIRST;D.box._getLabelNodes(D).each(function(K,J){C=E.add(H,"d",J,B);G[J]=C;I=E.get(C,"m",B)==F?"#":'<p class="exday">#</p>';C=E.get(C,"d",B);K.innerHTML=I.replace("#",C)});D.box._getWeekNodes(D).each(function(K,J){K.innerHTML=E.get(E.add(H,"ww",J,B),"ww",B)})},_to:function(G,N,L){var A=G.properties,B=A.WEEK_FIRST,H=linb.Date,O=G.keys,K=L||A.$UIvalue,J=H.get(K,"m",B)+"-"+H.get(K,"d",B),F=H.get(K,"y",B)+"-"+H.get(K,"m",B),C=H.get(N,"y",B)+"-"+H.get(N,"m",B),I=-1,E,M,P=H.getTimSpanStart(H.getTimSpanStart(N,"m"),"ww",1,B),D=H.get(N,"m",B);G.$mfirst=N;this._setBGV(G,G._realstart=P,D);if(G.$selnode){G.$selnode.tagClass("-checked",false)}if(F==C){_.arr.each(G.$daymap,function(R,Q){if(H.get(R,"m",B)+"-"+H.get(R,"d",B)==J){I=Q;return false}});E=this._getTDNodes(G).get()[I];(G.$selnode=linb([E]).tagClass("-checked"))}if(O.YEAR){M=H.get(N,"y",B);if(G.$year!=M){G.$year=M;G.getSubNode("YEAR").html(M,false)}}if(O.MONTH){M=H.get(N,"m",B)+1;if(G.$month!=M){G.$month=M;G.getSubNode("MONTH").html(M,false)}}},_onresize:function(){}}});Class("linb.UI.TimePicker",["linb.UI","linb.absValue"],{Dependency:["linb.Date"],Instance:{activate:function(){this.getSubNode("PRE").focus();return this},_setCtrlValue:function(A){return this.each(function(F){if(!F.domNode){return }var B=F.boxing(),C=F.box,H=F.properties,G=H.$UIvalue,E=C._v2a(G),D=C._v2a(A);F.$hour=D[0];if(E[1]){C._uncheck(F.getSubNode("MI",E[1]).get(0))}C._check(F.getSubNode("MI",D[1]).get(0));F.getSubNode("HOUR").html(D[0],false);F.getSubNode("CAPTION").html(F.box._showV(F,F.box._v2a(D)),false)})}},Initialize:function(){this.addTemplateKeys(["MI"]);var D=[],C=this._excls,B=this._excls2,H=linb.UI.$ID,G=linb.Event.$EVENTHANDLER,F='<span id="'+this.KEY+"-MI:"+H+':@" class="'+C+' !" onmouseover="'+G+'" onmouseout="'+G+'" onclick="'+G+'"   unselectable="on" >@</span>',E,A;for(E=0;E<60;E++){D[D.length]=F.replace(/@/g,E<10?"0"+E:E).replace("!",(E%5===0)?B:"")}A=D.join("");D.length=0;this.setTemplate({tagName:"div",onselectstart:"return false",style:"{_style};height:auto;",BORDER:{tagName:"div",BAR:{tagName:"div",className:"uibar-top",style:"{barDisplay};",BART:{cellpadding:"0",cellspacing:"0",width:"100%",border:"0",tagName:"table",className:"uibar-t",BARTR:{tagName:"tr",BARTDL:{tagName:"td",className:"uibar-tdl"},BARTDM:{$order:1,width:"100%",tagName:"td",className:"uibar-tdm"},BARTDR:{$order:2,tagName:"td",className:"uibar-tdr"}}},BARCMDL:{tagName:"div",className:"uibar-cmdl",PRE:{$order:0,tagName:"a",href:linb.$href,tabindex:"{tabindex}"},HOUR:{$order:1,unselectable:"on",className:"ui-dragable"},NEXT:{$order:3,tagName:"a",href:linb.$href,tabindex:"{tabindex}"}},BARCMDR:{tagName:"div",className:"uibar-cmdr",onselectstart:"return false",unselectable:"on",CLOSE:{className:"uicmd-close ",style:"{closeDisplay}"}}},MAIN:{$order:2,tagName:"div",className:"uicon-main",MAINI:{tagName:"div",className:"uicon-maini",CON:{tagName:"div",text:A}}},TAIL:{$order:3,tagName:"div",className:"uicon-main",TAILI:{tagName:"div",className:"uicon-maini",CAPTION:{text:"{caption}"},SET:{className:"ui-btn",SETI:{className:"ui-btni",SETC:{className:"ui-btnc",SETA:{tagName:"a",href:linb.$href,tabindex:"{tabindex}",text:linb.wrapRes("inline.set")}}}}}},BBAR:{$order:4,tagName:"div",className:"uibar-bottom-s",BBART:{cellpadding:"0",cellspacing:"0",width:"100%",border:"0",tagName:"table",className:"uibar-t",BBARTR:{tagName:"tr",BBARTDL:{tagName:"td",className:"uibar-tdl"},BBARTDM:{$order:1,width:"100%",tagName:"td",className:"uibar-tdm"},BBARTDR:{$order:2,tagName:"td",className:"uibar-tdr"}}}}}})},Static:{_excls:"linbex-timepicker",_excls2:"linbex-timepicker2",_excls_mo:"linbex-timepicker-mouseover",_excls_c:"linbex-timepicker-checked",_mover:function(B){var A=this,C=B.className;if(C.indexOf(A._excls_mo)==-1){B.className=C+" "+A._excls_mo}},_mout:function(B){var A=this,C=B.className;if(C.indexOf(A._excls_mo)!=-1){B.className=C.replace(A._excls_mo,"")}},_check:function(B){var A=this,C=B.className;if(C.indexOf(A._excls_c)==-1){B.className=C+" "+A._excls_c}A._mout(B)},_uncheck:function(B){var A=this,C=B.className;if(C.indexOf(A._excls_c)!=-1){B.className=C.replace(A._excls_c,"")}},Appearances:{KEY:{"-moz-user-select":"none"},MAINI:{"padding-top":"4px"},CON:{width:"220px","border-left":"solid 1px #648CB4","border-top":"solid 1px #648CB4"},BARCMDL:{top:"3px"},"PRE,NEXT":{position:"relative",margin:"0 2px",width:"15px",height:"15px","vertical-align":"middle",cursor:"default",background:linb.UI.$bg("icons.gif","no-repeat",true)},PRE:{$order:1,display:linb.$inlineBlock,"background-position":"-260px -70px"},"PRE-mouseover":{$order:2,"background-position":"-260px -90px"},"PRE-mousedown":{$order:3,"background-position":"-260px -110px"},NEXT:{$order:1,display:linb.$inlineBlock,"background-position":"-280px -70px"},"NEXT-mouseover":{$order:2,"background-position":"-280px -90px"},"NEXT-mousedown":{$order:3,"background-position":"-280px -110px"},HOUR:{$order:3,margin:"0 2px",height:"15px",width:"16px","font-weight":"bold","vertical-align":"middle",border:"1px solid #779EBF","background-color":"#F8FBFF",cursor:"e-resize","padding-left":"2px"},SET:{position:"absolute",display:"none",color:"#ff0000",top:"1px",right:"5px"},TAILI:{position:"relative","padding-top":"4px",height:"20px","text-align":"center"},CAPTION:{"font-size":"12px","vertical-align":"middle"},".linbex-timepicker2":{$order:1,"background-color":"#FDF8D2"},".linbex-timepicker":{"font-size":"12px","padding-left":"3px",width:"18px",height:"16px","border-right":"1px solid #648CB4","border-bottom":"1px solid #648CB4","background-color":"#F9F9FB"},".linbex-timepicker-mouseover":{$order:2,"background-color":"#d9e8fb"},".linbex-timepicker-checked":{$order:2,"background-color":"#316AC5",color:"#fff"}},Behaviors:{HoverEffected:{CLOSE:"CLOSE",PRE:"PRE",NEXT:"NEXT",SET:"SET"},ClickEffected:{CLOSE:"CLOSE",PRE:"PRE",NEXT:"NEXT",SET:"SET"},KEY:{onClick:function(){return false}},HOUR:{onMousedown:function(A,B,C){linb(C).startDrag(B,{dragType:"blank",targetReposition:false,widthIncrement:5,dragCursor:true});A.$temp2=0},onDrag:function(C,E,G){var D,F=linb.DragDrop.getProfile().offset,B=C.properties.$UIvalue,A=B.split(":");A[0]=(parseFloat(A[0])||0)+parseInt(F.x/10);A[0]=(A[0]%24+24)%24;C.$temp2=(A[0]<=9?"0":"")+A[0];if(B[0]!=C.$temp2){C.getSubNode("HOUR").html(C.$temp2,false)}},onDragstop:function(A,B,C){if(A.$temp2){A.$hour=A.$temp2}A.$temp2=0;A.box._hourC(A)}},SET:{onClick:function(C){var D=C.properties,B=D.$UIvalue,A=B.split(":");A[0]=C.$hour;C.boxing().setUIValue(A.join(":"),true);C.box._hourC(C)}},MI:{onMouseover:function(A,B,C){A.box._mover(C)},onMouseout:function(A,B,C){A.box._mout(C)},onClick:function(B,C,D){var A=[];A[0]=B.$hour;A[1]=B.getSubId(D.id);B.boxing().setUIValue(A.join(":"),true);B.box._hourC(B)}},PRE:{onClick:function(B,D,E){var C=B.properties;if(C.disabled){return }var A=B.$hour;A=(parseFloat(A)||0)-1;A=(A%24+24)%24;B.$hour=A=(A<=9?"0":"")+A;B.getSubNode("HOUR").html(A,false);B.box._hourC(B)}},NEXT:{onClick:function(B,D,E){var C=B.properties;if(C.disabled){return }var A=B.$hour;A=(parseFloat(A)||0)+1;A=(A%24+24)%24;B.$hour=A=(A<=9?"0":"")+A;B.getSubNode("HOUR").html(A,false);B.box._hourC(B)}},CLOSE:{onClick:function(C,D,E){var B=C.properties,A=C.boxing();if(B.disabled){return }if(false===A.beforeClose(C,E)){return }A.destroy();return false}}},DataModel:{height:{ini:"auto",readonly:true},width:{ini:231,readonly:true},value:"00:00",closeBtn:{ini:true,action:function(A){this.getSubNode("CLOSE").css("display",A?"":"none")}}},EventHandlers:{beforeClose:function(A,B){}},_hourC:function(C){var E=C.properties,B=E.$UIvalue,A=B.split(":"),D=A[0]==C.$hour;C.getSubNode("SET").css("display",D?"none":"block");C.getSubNode("CAPTION").css("color",D?"":"#ff0000")},_prepareData:function(B){var C=arguments.callee.upper.call(this,B);var A="display:none";C.closeDisplay=C.closeBtn?"":A;return C},_ensureValue:function(C,D){var B,A=[];if(D&&typeof D=="string"){B=D.split(":")}else{if(D&&typeof D=="object"&&_.isArr(D)){B=D}else{B=[]}}A[0]=parseFloat(B[0])||0;A[1]=parseFloat(B[1])||0;if(A[0]<0){A[0]=0}if(A[0]>23){A[0]=23}if(A[1]<0){A[1]=0}if(A[1]>59){A[1]=59}A[0]=(A[0]<=9?"0":"")+A[0];A[1]=(A[1]<=9?"0":"")+A[1];return A.join(":")},formatValue:function(A){return A.join(":")},_v2a:function(A){return typeof A=="string"?A.split(":"):A},_showV:function(B,A){var C=B.CF;if(typeof C.formatCaption=="function"){return C.formatCaption(A)}else{return A.join(":")}},_onresize:function(){}}});Class("linb.UI.List",["linb.UI","linb.absList","linb.absValue"],{Instance:{_setCtrlValue:function(A){return this.each(function(D){if(!D.domNode){return }var I=D.box,N=D.boxing().getUIValue(),B=D.properties,P=I._ITEMKEY||"ITEM",F=I._DIRTYKEY||"ITEM",G=function(Q,R){return D.getSubNode(Q,R)},J=function(Q){return D.getSubIdByItemId(Q)};if(B.selMode=="single"){var M=J(N);if(N!==null&&M){G(F,M).tagClass("-mouseover",false).tagClass("-checked",false)}M=J(A);if(M){G(F,M).tagClass("-mouseover",false).tagClass("-checked")}if(M){var C=G(P,M);if(C){var L=C.offsetTop(),K=G("ITEMS"),H=K.scrollHeight(),O=K.scrollTop(),E=K.height();if(H>E){if(L<O||L>O+E){K.scrollTop(L)}}}}}else{if(B.selMode=="multi"){N=N?N.split(";"):[];A=A?A.split(";"):[];_.arr.each(N,function(Q){if(_.arr.indexOf(A,Q)==-1){G(F,J(Q)).tagClass("-mouseover",false).tagClass("-checked",false)}});_.arr.each(A,function(Q){if(_.arr.indexOf(N,Q)==-1){G(F,J(Q)).tagClass("-mouseover",false).tagClass("-checked")}})}}})},adjustSize:function(){return this.each(function(D){var B=D.getSubNode("ITEMS"),A=D.properties;B.height("auto");var C=Math.min(A.maxHeight,B.offsetHeight());A.height=C;B.height(C);D.root.height(C)})},activate:function(){return linb.absList.prototype.activate.call(this)},_setDirtyMark:function(){return this.each(function(B){if(!B.properties.dirtyMark){return }var F=B.domId,C=B.properties,A=C.value!==C.$UIvalue,E=linb.UI.$css_tag_dirty;if(B.beforeDirtyMark&&false===B.boxing().beforeDirtyMark(B,A)){}else{var D=B.getSubNode("ITEMS");if(A){D.addClass(E)}else{D.removeClass(E)}}})}},Static:{_DIRTYKEY:"ITEM",Templates:{tagName:"div",style:"{_style}",className:"uibg-base",ITEMS:{$order:10,tagName:"div",text:"{items}"},$dynamic:{items:{ITEM:{className:"{itemClass} {disabled}",style:"{itemStyle}",tagName:"a",href:linb.$href,tabindex:"{_tabindex}",ICON:{style:"background:url({image}) transparent  no-repeat {imagePos};{iconDisplay}",className:"ui-icon",$order:0},CAPTION:{tagName:"text",text:"{caption}&nbsp;",$order:1}}}}},Appearances:{KEY:{"font-size":"12px"},ITEMS:{position:"relative",border:"1px solid #6a92ba",overflow:"auto","overflow-x":(linb.browser.ie||linb.browser.gek)?"hidden":""},ITEM:{display:"block",zoom:linb.browser.ie?1:null,"font-family":'"Verdana", "Helvetica", "sans-serif"',border:0,cursor:"pointer","font-size":"12px",padding:"4px 2px",position:"relative"},"ITEM-mouseover, ITEM-mousedown, ITEM-checked":{background:linb.UI.$bg("item.gif","repeat-x")},"ITEM-mouseover":{$order:1,"background-color":"#FAD200","background-position":"left -51px"},"ITEM-mousedown":{$order:2,"background-color":"#F5D22D","background-position":"left -101px"},"ITEM-checked":{$order:2,"background-color":"#AAD2FA","background-position":"left top"}},Behaviors:{HoverEffected:{ITEM:"ITEM"},ClickEffected:{ITEM:"ITEM"},DragableKeys:["ITEM"],DropableKeys:["ITEM","ITEMS"],onSize:function(C,D){var E=C.domNode.style,A=null,B=null;if(D.height){B=parseInt(E.height)||A}if(D.width){A=parseInt(E.width)||B}linb.UI.$tryResize(C,A,B)},ITEM:{onDblclick:function(B,D,E){var A=B.properties,C=B.getItemByDom(E);B.boxing().onDblclick(B,C,E)},onClick:function(C,J,A){var L=C.properties,P=C.getItemByDom(A),M=C.getSubId(A.id),I=C.boxing(),N=linb.Event.getKey(J),E,B;if(L.disabled||P.disabled){return false}linb(A).focus();switch(L.selMode){case"none":E=I.onItemSelected(C,P,A);break;case"multi":var O=I.getUIValue(),H=O?O.split(";"):[];if(H.length&&(N[1]||N[2]||L.$checkbox)){B=false;if(N[2]){var K=L.items,F=_.arr.subIndexOf(K,"id",C.$firstV.id),D=_.arr.subIndexOf(K,"id",P.id),G;H.length=0;for(G=Math.min(F,D);G<=Math.max(F,D);G++){H.push(K[G].id)}}else{if(_.arr.indexOf(H,P.id)!=-1){_.arr.removeValue(H,P.id)}else{H.push(P.id)}}H.sort();O=H.join(";");if(I.getUIValue()==O){E=false}else{I.setUIValue(O);if(I.getUIValue()==O){E=I.onItemSelected(C,P,A)||B}}break}case"single":if(I.getUIValue()==P.id){E=false}else{C.$firstV=P;I.setUIValue(P.id);if(I.getUIValue()==P.id){E=I.onItemSelected(C,P,A)}}break}return E},onKeydown:function(C,F,A){var J=linb.Event.getKey(F),I=J[0],B=J[2],H=linb(A),E=C.root.nextFocus(true,true,false),G=C.root.nextFocus(false,true,false);switch(linb.Event.getKey(F)[0]){case"tab":if(B){if(A!=E.get(0)){E.focus();return false}}else{if(A!=G.get(0)){G.focus();return false}}break;case"left":case"up":var D=H.nextFocus(false,true,false);if(H.get(0)==E.get(0)){G.focus()}else{H.nextFocus(false)}return false;break;case"right":case"down":var D=H.nextFocus(true,false,false);if(H.get(0)==G.get(0)){E.focus()}else{H.nextFocus()}return false;break;case"enter":linb(A.id).onClick();return false;break}}}},DataModel:({selMode:{ini:"single",listbox:["single","none","multi"]},width:120,height:150,maxHeight:300}),EventHandlers:{onDblclick:function(A,B,C){},onItemSelected:function(A,B,C){}},_ensureValue:function(B,C){if(B.properties.selMode=="multi"){var A=(C||"").split(";");A.sort();return A.join(";")}else{return C}},_onStartDrag:function(A,B,C,D){var D=linb.Event.getPos(B);linb([C]).startDrag(B,{dragType:"icon",shadowFrom:C,targetLeft:D.left+12,targetTop:D.top+12,dragCursor:"pointer",dragDefer:1,dragKey:A.box.getDragKey(A,C),dragData:A.box.getDragData(A,B,C)});return false},_onDropTest:function(B,F,H,A,D,C){var G=D&&D.domId,E=H.id;if(G){if(G==E){return false}if(_.get(H,["previousSibling","id"])==G){return false}}},_onDrop:function(D,H,B,I,G,K){linb.DragDrop.setDragIcon("none");var F=D.getKey(B.id),C=G.profile,A=G.domId,E,J=linb.absObj.$specialChars;E=_.clone(C.getItemByDom(A),function(M,L){return !J[(L+"").charAt(0)]});C.boxing().removeItems([E.id]);if(F==D.keys.ITEM){D.boxing().insertItems([E],K.id,true)}else{D.boxing().insertItems([E])}return false},_onresize:function(F,E,A){var D=F.properties,C,B=F.getSubNode("ITEMS");if(!parseInt(F.domNode.style.height)){return }B.height(A)}}});Class("linb.UI.Gallery","linb.UI.List",{Instance:{getStatus:function(B){var A=this.get(0).getItemByItemId(B);return(A&&A._status)||"ini"}},Initialize:function(){var A=this.getTemplate();A.$dynamic={items:{ITEM:{tagName:"a",href:linb.$href,tabindex:"{_tabindex}",className:"{itemClass} {disabled}",style:"padding:{itemPadding}px;margin:{itemMargin}px;{itemStyle}",ITEMFRAME:{style:"width:{itemWidth}px;height:{itemHeight}px;",CAPTION:{tagName:"div",text:"{caption}",$order:0},CONTENT:{tagName:"div",$order:1,IBWRAP:{tagName:"div",IMAGE:{tagName:"img",src:"{image}",width:"{imgWidth}",height:"{imgHeight}",style:"{imgStyle}"}}},COMMENT:{text:"{comment}",$order:2}}}}};this.setTemplate(A)},Static:{Appearances:{KEY:{overflow:"auto","overflow-x":(linb.browser.ie||linb.browser.gek)?"hidden":""},ITEMS:{position:"relative",overflow:"visible",zoom:linb.browser.ie6?1:null},ITEM:{display:linb.$inlineBlock,zoom:linb.browser.ie6?1:null,position:"relative",overflow:"hidden",cursor:"pointer","vertical-align":"top",border:"solid 1px #C2E4FC",margin:0},ITEMFRAME:{display:linb.browser.ie?"inline-block":"block",position:"relative",overflow:"hidden",border:0,padding:0,margin:0,width:"100%",height:"100%","-moz-box-flex":"1","-moz-user-select":"none"},IBWRAP:{"font-size":0,"line-height":0},"ITEM-mouseover":{$order:1,padding:0,border:"solid 1px #a0c8f0","background-color":"#e1f0ff"},"ITEM-mousedown":{$order:2,padding:0,border:"solid 1px #dcdcdc","background-color":"#bbcef1"},"ITEM-checked":{$order:2,padding:0,border:"solid 1px #bbcef1","background-color":"#bbcef1"},IMAGE:{display:linb.$inlineBlock,zoom:linb.browser.ie6?1:null,"vertical-align":"middle"},"CONTENT, CAPTION":{"text-align":"center",overflow:"hidden","white-space":"nowrap"},CAPTION:{"font-weight":"bold"},COMMENT:{display:"block",margin:"0 2px 0 2px"}},Behaviors:{IMAGE:{onLoad:function(A,C,D){var B=A.getItemByDom(D);B._status="loaded"},onError:function(A,C,D){var B=A.getItemByDom(D);B._status="error"}}},DataModel:({itemMargin:{ini:6,action:function(A){if(typeof A!="object"){this.getSubNode("ITEM",true).css("margin",(""+parseFloat(A))==(""+A)?A+"px":A)}else{this.getSubNode("ITEM",true).css(A)}}},itemPadding:{ini:2,action:function(A){if(typeof A!="object"){this.getSubNode("ITEM",true).css("padding",(""+parseFloat(A))==(""+A)?A+"px":A)}else{this.getSubNode("ITEM",true).css(A)}}},itemWidth:{ini:32,action:function(A){this.getSubNode("ITEMFRAME",true).width(A)}},itemHeight:{ini:32,action:function(A){this.getSubNode("ITEMFRAME",true).height(A)}},imgWidth:{ini:16,action:function(A){this.getSubNode("IMAGE",true).width(A)}},imgHeight:{ini:16,action:function(A){this.getSubNode("IMAGE",true).height(A)}},width:200,height:200}),_prepareItem:function(A,B){var C=A.properties;_.arr.each(_.toArr("itemWidth,itemHeight,imgWidth,imgHeight,itemPadding,itemMargin"),function(D){B[D]=B[D]||C[D]});B.href=B.href||linb.$href;B.capition=B.capition||"";B.comment=B.comment||"";B._tabindex=C.tabindex},_onresize:function(){}}});Class("linb.UI.IconList","linb.UI.List",{Instance:{getStatus:function(B){var A=this.get(0).getItemByItemId(B);return(A&&A._status)||"ini"}},Initialize:function(){var A=this.getTemplate();A.$dynamic={items:{ITEM:{tagName:"a",href:linb.$href,tabindex:"{_tabindex}",className:"{itemClass} {disabled}",style:"padding:{itemPadding}px;margin:{itemMargin}px;{itemStyle}",IBWRAP:{tagName:"div",IMAGE:{tagName:"img",src:"{image}",width:"{itemWidth}",height:"{itemHeight}",style:"{imgStyle}"}}}}};this.setTemplate(A)},Static:{Appearances:{KEY:{overflow:"auto","overflow-x":(linb.browser.ie||linb.browser.gek)?"hidden":""},ITEMS:{overflow:"auto","overflow-x":(linb.browser.ie||linb.browser.gek)?"hidden":"",position:"relative","line-height":"14px",zoom:linb.browser.ie6?1:null},ITEM:{display:linb.$inlineBlock,zoom:linb.browser.ie6?1:null,position:"relative",overflow:"hidden",cursor:"pointer",border:"solid 1px #C2E4FC","vertical-align":"top"},IBWRAP:{"font-size":0,"line-height":0},"ITEM-mouseover":{$order:1,padding:0,border:"solid 1px #a0c8f0","background-color":"#e1f0ff"},"ITEM-mousedown":{$order:2,padding:0,border:"solid 1px #dcdcdc","background-color":"#bbcef1"},"ITEM-checked":{$order:2,padding:0,border:"solid 1px #bbcef1","background-color":"#bbcef1"}},Behaviors:{IMAGE:{onLoad:function(A,C,D){var B=A.getItemByDom(D);B._status="loaded"},onError:function(A,C,D){var B=A.getItemByDom(D);B._status="error"}}},DataModel:({itemMargin:{ini:6,action:function(A){if(typeof A!="object"){this.getSubNode("ITEM",true).css("margin",(""+parseFloat(A))==(""+A)?A+"px":A)}else{this.getSubNode("ITEM",true).css(A)}}},itemPadding:{ini:2,action:function(A){if(typeof A!="object"){this.getSubNode("ITEM",true).css("padding",(""+parseFloat(A))==(""+A)?A+"px":A)}else{this.getSubNode("ITEM",true).css(A)}}},itemWidth:{ini:16,action:function(A){this.getSubNode("IMAGE",true).width(A)}},itemHeight:{ini:16,action:function(A){this.getSubNode("IMAGE",true).height(A)}},width:200,height:200}),_prepareItem:function(A,B){var C=A.properties;_.arr.each(_.toArr("itemWidth,itemHeight,itemPadding,itemMargin"),function(D){B[D]=B[D]||C[D]});B._tabindex=C.tabindex},_onresize:function(){}}});Class("linb.UI.Panel","linb.UI.Div",{Static:{Templates:{tagName:"div",style:"{_style}",BORDER:{tagName:"div",TBAR:{tagName:"div",className:"uibar-top",BART:{cellpadding:"0",cellspacing:"0",width:"100%",height:"100%",border:"0",tagName:"table",className:"uibar-t",BARTR:{tagName:"tr",BARTDL:{tagName:"td",className:"uibar-tdl"},BARTDM:{$order:1,width:"100%",tagName:"td",className:"uibar-tdm"},BARTDR:{$order:2,tagName:"td",className:"uibar-tdr"}}},BARCMDL:{tagName:"div",className:"uibar-cmdl",TOGGLE:{className:"uicmd-toggle {toggleCls}",style:"{toggleDisplay}",$order:0},ICON:{style:"background:url({image}) transparent  no-repeat {imagePos}; {iconDisplay}",className:"ui-icon",$order:0},CAPTION:{tagName:"a",href:"{href}",tabindex:"{tabindex}",text:"{caption}",$order:1}},BARCMDR:{tagName:"div",className:"uibar-cmdr",onselectstart:"return false",unselectable:"on",OPT:{className:"uicmd-opt",style:"{optDisplay}",$order:1},LAND:{className:"uicmd-land",style:"{landDisplay}",$order:1},CLOSE:{className:"uicmd-close ",style:"{closeDisplay}",$order:2}}},MAIN:{$order:2,tagName:"div",className:"uicon-main",MAINI:{tagName:"div",className:"uicon-maini",PANEL:{tagName:"div",style:"{panelDisplay}",text:"{html}"+linb.UI.$childTag}}},BBAR:{$order:3,tagName:"div",className:"uibar-bottom-s",BBART:{cellpadding:"0",cellspacing:"0",width:"100%",border:"0",tagName:"table",className:"uibar-t",BBARTR:{tagName:"tr",BBARTDL:{tagName:"td",className:"uibar-tdl"},BBARTDM:{$order:1,width:"100%",tagName:"td",className:"uibar-tdm"},BBARTDR:{$order:2,tagName:"td",className:"uibar-tdr"}}}}}},Appearances:{KEY:{overflow:"hidden",background:"transparent"},"KEY BORDER":{zoom:linb.browser.ie6?1:null},PANEL:{position:"relative",left:0,top:0,overflow:"auto",zoom:linb.browser.ie6?1:null},CAPTION:{"font-size":"12px",display:"inline","vertical-align":"middle"}},Behaviors:{DropableKeys:["PANEL"],DragableKeys:["TBAR"],HoverEffected:{OPT:"OPT",CLOSE:"CLOSE",LAND:"LAND",TOGGLE:"TOGGLE"},ClickEffected:{CLOSE:"CLOSE",OPT:"OPT",LAND:"LAND",TOGGLE:"TOGGLE"},onSize:function(C,D){var E=C.root,A=null,B=null;if(D.height){B=E.height()}if(D.width){A=E.width()}linb.UI.$tryResize(C,A,B)},OPT:{onClick:function(A,B,C){A.boxing().onShowOptions(A,B,C)}},TOGGLE:{onClick:function(A,B,C){A.box._toggle(A,!A.properties.toggle);return false}},CAPTION:{onClick:function(A,B,C){if(!A.onClickBar||false===A.boxing().onClickBar(A,C)){return !!linb.Event.getKey(B)[2]}}},CLOSE:{onClick:function(C,D,E){var B=C.properties;if(B.disabled){return }var A=C.boxing();if(false===A.beforeClose(C)){return }A.destroy();return false}},LAND:{onClick:function(B,D,A){var E=B.properties;if(E.disabled){return }var G=B.root.offset(),I=B.root.cssSize();var H=_.copy(linb.UI.Dialog.$DataStruct);_.merge(H,E,"with");_.merge(H,{dock:"none",width:Math.max(I.width,200),height:Math.max(I.height,100),left:G.left,top:G.top},"all");var F=new linb.UI.Dialog(H),C=[];linb("body").append(F);_.arr.each(B.children,function(J){C.push(J[0])});F.append(linb.UI.pack(C,false));B.boxing().destroy();return false}}},DataModel:{position:"absolute",zIndex:0,dock:"fill",caption:{ini:undefined,action:function(A){this.getSubNode("CAPTION").get(0).innerHTML=A}},image:{action:function(A){this.getSubNode("ICON").css("display",A?"":"none").css("backgroundImage","url("+(A||"")+")")}},imagePos:{action:function(A){this.getSubNode("ICON").css("backgroundPosition",A)}},href:{ini:linb.$href,action:function(A){this.getSubNode("CAPTION").attr("href",A)}},html:{action:function(A){this.getSubNode("PANEL").html(A)}},toggle:{ini:true,action:function(A){this.box._toggle(this,A)}},optBtn:{ini:false,action:function(A){this.getSubNode("OPT").css("display",A?"":"none")}},toggleBtn:{ini:false,action:function(A){this.getSubNode("TOGGLE").css("display",A?"":"none")}},closeBtn:{ini:false,action:function(A){this.getSubNode("CLOSE").css("display",A?"":"none")}},landBtn:{ini:false,action:function(A){this.getSubNode("LAND").css("display",A?"":"none")}}},EventHandlers:{beforeClose:function(A,B){},onIniPanelView:function(A){},onFold:function(A){},onExpend:function(A){},onShowOptions:function(A,B,C){},onClickBar:function(A,B){}},LayoutTrigger:function(){var B=this,C=B.properties,A=B.box;if(C.toggle){A._toggle(B,C.toggle)}},_prepareData:function(B){var C=arguments.callee.upper.call(this,B);var A="display:none";C.panelDisplay=C.toggle?"":A;C.toggleCls=C.toggle?"":B.getClass("TOGGLE","-checked");C.toggleDisplay=C.toggleBtn?"":A;C.optDisplay=C.optBtn?"":A;C.closeDisplay=C.closeBtn?"":A;C.landDisplay=C.landBtn?"":A;return C},_onresize:function(B,A,K){var J={},I=B.getSubNode("TBAR"),H=B.getSubNode("PANEL"),G=B.getSubNode("BBAR"),E=B.getSubNode("MAIN"),D=B.getSubNode("MAINI"),F,C,L;if(K){F=I.height(),C=G.height();if((L=K-F-C)>0){J.height=L}}if(A){J.width=A-(parseInt(D.css("paddingRight"))||0)-(parseInt(E.css("paddingLeft"))||0)}H.cssSize(J,true)},_toggle:function(B,C){var D=B.properties,A=B.boxing();D.toggle=C;if(C&&!B.$ini){if(A.onIniPanelView){if(A.onIniPanelView(B)!==false){B.$ini=true}}}if(C){if(false===A.onExpend(B)){return }}else{if(false===A.onFold(B)){return }}B.getSubNode("PANEL").css("display",C?"":"none");if(D.toggleBtn){B.getSubNode("TOGGLE").tagClass("-checked",!C)}}}});Class("linb.UI.PageBar",["linb.UI","linb.absValue"],{Instance:{_setCtrlValue:function(A){return this.each(function(E){if(!E.domNode){return }var I,C=E.properties,B=E.box._v2a(A),O=B[0],D=B[1],R=B[2],J=E.keys,S=function(U,T){return U.getSubNode(T)},F=S(E,"FIRST"),L=S(E,"PREV"),K=S(E,"PREM"),N=S(E,"CUR"),M=S(E,"NEXT"),P=S(E,"NEXTM"),G=S(E,"LAST"),H=function(V,U,T){if(U){V.first(3).attr("href",C.uriTpl.replace("*",U))}if(T){V.first(3).text(C.textTpl.replace("*",T))}},Q=function(U,T){U.css("display",T?"":"none")};H(F,O,O);H(K,"",".."+_.str.repeat(".",String(D-1-O).length));H(L,D-1);H(N,D,D);H(M,D+1);H(P,"",".."+_.str.repeat(".",String(R-D-1).length));H(G,R,R);if((I=D-O)<=0){Q(F,0);Q(K,0);Q(L,0)}else{if(I==1){Q(F,1);Q(K,0);Q(L,0)}else{if(I==2){Q(F,1);Q(K,0);Q(L,1)}else{Q(F,1);Q(K,1);Q(L,1)}}}if((I=R-D)<=0){Q(G,0);Q(P,0);Q(M,0)}else{if(I==1){Q(G,1);Q(P,0);Q(M,0)}else{if(I==2){Q(G,1);Q(P,0);Q(M,1)}else{Q(G,1);Q(P,1);Q(M,1)}}}})},setPage:function(A){return this.each(function(D){var C=D.properties.value,B=C.split(":");B[1]=parseInt(A)||B[0];D.boxing().setValue(B.join(":"))})}},Static:{Templates:{style:"{_style}",POOL:{style:"position:absolute;display:none;",POP:{tagName:"div",className:"uibg-base"}},LABEL:{text:"{caption}"},FIRST:{$order:1,className:"ui-btn",FIRSTI:{className:"ui-btni",FIRSTC:{className:"ui-btnc",FIRSTA:{tagName:"a",href:"#",tabindex:"{tabindex}"}}}},PREM:{$order:2,className:"ui-btn",PREMI:{className:"ui-btni",PREMC:{className:"ui-btnc",PREMA:{tagName:"a",href:"#",tabindex:"{tabindex}"}}}},PREV:{$order:3,className:"ui-btn",PREVI:{className:"ui-btni",PREVC:{className:"ui-btnc",PREVA:{tagName:"a",href:"#",tabindex:"{tabindex}",text:"{prevMark}"}}}},CUR:{$order:4,className:"ui-btn ui-btn-focus",CURI:{className:"ui-btni",CURC:{className:"ui-btnc",CURA:{tagName:"a",href:"#",tabindex:"{tabindex}"}}}},NEXT:{$order:5,className:"ui-btn",NEXTI:{className:"ui-btni",NEXTC:{className:"ui-btnc",NEXTA:{tagName:"a",href:"#",tabindex:"{tabindex}",text:"{nextMark}"}}}},NEXTM:{$order:6,className:"ui-btn",NEXTMI:{className:"ui-btni",NEXTMC:{className:"ui-btnc",NEXTMA:{tagName:"a",href:"#",tabindex:"{tabindex}"}}}},LAST:{$order:6,className:"ui-btn",LASTI:{className:"ui-btni",LASTC:{className:"ui-btnc",LASTA:{tagName:"a",href:"#",tabindex:"{tabindex}"}}}}},Appearances:{LABEL:{"font-size":"12px",padding:"3px 6px 0 6px","vertical-align":"top","white-space":"nowrap"},KEY:{display:"inline",overflow:"visible"},"KEY a:focus, POP a:focus":{"-moz-outline-offset":""},"KEY .ui-btn, POP .ui-btn":{"margin-right":"3px"},"KEY .ui-btn a, POP .ui-btn a":{padding:"0 3px 0 3px"},"PREV,CUR,NEXT":{"font-weight":"bold"},POP:{border:"dotted 1px gray",background:"#fff",position:"absolute",padding:"3px","line-height":"26px"}},Behaviors:{HoverEffected:{FIRST:"FIRST",PREM:"PREM",PREV:"PREV",NEXT:"NEXT",NEXTM:"NEXTM",LAST:"LAST",POPI:"POPI",CUR:"CUR"},ClickEffected:{FIRST:"FIRST",PREM:"PREM",PREV:"PREV",NEXT:"NEXT",NEXTM:"NEXTM",LAST:"LAST",POPI:"POPI",CUR:"CUR"},POP:{onClick:function(A,C,E){var D=linb(E),B=linb.Event.getSrc(C);D.setBlurTrigger(A.key+":"+A.$id,null);A.getSubNode("POOL").append(D);if(B.tagName.toLowerCase()=="a"||((B=B.firstChild)&&(B.tagName.toLowerCase()=="a"))||((B=B.firstChild)&&(B.tagName.toLowerCase()=="a"))||((B=B.firstChild)&&(B.tagName.toLowerCase()=="a"))){return A.box._click(A,B.parentNode.parentNode.parentNode)}}},FIRST:{onClick:function(A,B,C){return A.box._click(A,C)}},PREM:{onClick:function(A,B){return !!linb.Event.getKey(B)[2]},onMousedown:function(A,B,C){A.box._show(A,B,C,0);return false}},PREV:{onClick:function(A,B,C){return A.box._click(A,C)}},CUR:{onClick:function(A,B,C){return A.box._click(A,C)}},NEXT:{onClick:function(A,B,C){return A.box._click(A,C)}},NEXTM:{onClick:function(A,B){return !!linb.Event.getKey(B)[2]},onMousedown:function(A,B,C){A.box._show(A,B,C,1);return false}},LAST:{onClick:function(A,B,C){return A.box._click(A,C)}}},DataModel:{dataField:null,dataBinder:null,caption:" Page: ",value:"1:1:1",uriTpl:"#*",textTpl:"*",prevMark:"&lt;",nextMark:"&gt;",_moreStep:100},EventHandlers:{onClick:function(A,B){}},_ensureValue:function(D,E){var C=E.split(":"),A=[],B=function(F){return parseInt(F)||1};A[0]=B(C[0]);A[1]=B(C[1]);A[2]=B(C[2]);A[0]=Math.max(A[0],1);A[0]=Math.min(A[0],A[1]);A[2]=Math.max(A[1],A[2]);return A.join(":")},_v2a:function(A){A=typeof A=="string"?A.split(":"):A;A[0]=parseInt(A[0]);A[1]=parseInt(A[1]);A[2]=parseInt(A[2]);return A},_click:function(D,F){var A=D.boxing(),C=A.getValue(),B=C.split(":");var E=A.onClick(D,parseInt(linb(F).first(3).attr("href").split("#")[1])||B[0]);return typeof E=="boolean"?E:false},_show:function(G,T,H,S){var D=G.properties,A=G.box._v2a(D.value),P=A[0],F=A[1],R=A[2],K=G.keys,U=function(X,W){return X.getSubNode(W)},L=U(G,"POOL"),I=U(G,"POP"),B=function(W){return Math.ceil((W+1)/10)*10},V=[],J,N,M,Q,O;if(S){if((J=R-1-F)<=0){return }M=F+1;O=R}else{if((J=F-1-P)<=0){return }M=1;O=F-1}N=Math.ceil(J/D._moreStep);if(N>10){M=B(M);O=B(O)-1;N=B(N)}else{M=M+N}var E=G.keys.POPI+":"+G.serialId+":",C=linb.Event.$EVENTHANDLER;while(M<O){V.push('<span style="margin-top:3px;" id="'+E+M+'" onmouseover="'+C+'" onmouseout="'+C+'" onmousedown="'+C+'" class="ui-btn"><span class="ui-btni"><span class="ui-btnc"><a href="'+D.uriTpl.replace("*",M)+'">'+D.textTpl.replace("*",M)+"</a></span></span></span>");M=M+N}I.width("auto");I.html(V.join(" "));linb("body").append(I);if(I.width()>300){I.width(300)}I.popToTop(H);I.setBlurTrigger(G.key+":"+G.$id,function(){L.append(I)})}},Initialize:function(){this.addTemplateKeys(["POPI"])}});Class("linb.UI.Tabs",["linb.UI","linb.absList","linb.absValue"],{Instance:{_setCtrlValue:function(A){this.each(function(C){var B=C.domId,E=C.boxing(),I=E.getUIValue(),F=C.properties,G=C.getSubIdByItemId(I),J,K;if(I&&C.getSubIdByItemId(I)){C.getSubNodes(["ITEM","BOX"],G).tagClass("-checked",false);if(E.KEY!="linb.UI.Tabs"||F.hasPanel){E.getPanel(I).hide()}}G=C.getSubIdByItemId(A);if(G){C.getSubNodes(["ITEM","BOX"],G).tagClass("-checked");if(E.KEY!="linb.UI.Tabs"||F.hasPanel){E.getPanel(A).show("auto",C.getSubNode("LIST").offsetHeight()+"px");K=C.root.cssSize();linb.UI.$tryResize(C,parseInt(K.width)||null,parseInt(K.height)||null,false,A);if(F.dynRender){var D=C.children,H=[];_.arr.each(D,function(L){if(L[1]==A&&!L[0]["parent:"+C.$id]){H.push(L[0]);L[0]["parent:"+C.$id]=1}});if(H.length){E.append(linb.UI.pack(H),A)}}}}})},append:function(C,A){var B=this.get(0).properties;if(A=A||B.$UIvalue||B.value){arguments.callee.upper.call(this,C,A)}return this},getCurPanel:function(){var A=this.get(0);return this.getPanel(A.properties.$UIvalue)},getPanel:function(A){var B=this.get(0);return B.getSubNodeByItemId("PANEL",A)},addPanel:function(B,E,F){var D={},G=F&&F.id;if(!G){var C=this.getItems();if(C.length){G=C[C.length-1].id}}_.merge(D,{caption:B.caption,image:B.image,closeBtn:B.closeBtn||false,landBtn:B.landBtn||false,optBtn:B.optBtn||false,imagePos:B.imagePos,dragKey:B.dragKey,dropKeys:B.dropKeys,id:B.id||B.tag||_.id()});this.insertItems([D],G);var A=[];_.arr.each(E,function(H){A.push(H[0])});this.append(linb.UI.pack(A,false),D.id)},removePanel:function(C){var A=this,B=A.getItemByDom(C);return A.removeItems([B.id])},getPanelPara:function(E){var C=this.get(0),B=C.properties,D=C.getItemByDom(E),A=_.clone(D);if(!A.dragKey){A.dragKey=B.dragKey}if(!A.dropKeys){A.dropKeys=B.dropKeys}return A},getPanelChildren:function(C){var B=this.get(0),D=B.getItemIdByDom(C),A=[];if(D){_.arr.each(B.children,function(E){if(E[1]==D){A.push(E)}})}return A},fireItemClickEvent:function(A){this.getSubNodeByItemId("ITEM",A).onMousedown();return this},_afterInsertItems:function(D,F){var E=D.box,G,B,A=D.properties;if(A.hasPanel&&(G=D.getSubNode(D.keys.BOX||D.keys.KEY))){G.append(_.str.toDom(D.buildItems("panels",F)));if(!(B=this.getUIValue())){this.fireItemClickEvent((B=A.items[0])&&(B=B.id))}var C=D.domNode.style;linb.UI.$tryResize(D,parseInt(C.width)||null,parseInt(C.height)||null,false,B)}},removeItems:function(A){var B=this,D,C;if(!_.isArr(A)){A=[A]}B.each(function(E){if(E.properties.hasPanel){_.arr.each(A,function(F){C=E.getSubIdByItemId(F);if(C&&!(D=E.getSubNode("PANEL",C)).isEmpty()){D.remove()}})}});arguments.callee.upper.apply(B,arguments);B.each(function(F){if(!F.boxing().getUIValue()){var E;F.boxing().fireItemClickEvent((E=F.properties.items[0])&&E.id)}if(F.properties.hasPanel){linb.UI.$tryResize(F,F.root.width(),F.root.height(),false,F.boxing().getUIValue())}});return B},clearItems:function(){var A=this;A.each(function(B){if(B.properties.hasPanel){B.getSubNode("PANEL",true).remove()}});A.setValue(null,true);arguments.callee.upper.apply(A,arguments);return A},markItemCaption:function(B,F,D){var C=this.get(0);B=C.getItemByItemId(B);if((B._dirty!=F)||D){var E=B.id,A=C.getItemByItemId(E).caption;C.getSubNodeByItemId("CAPTION",E).html(C.getItemByItemId(E).caption=F?("*"+A):A.replace(/^\*/,"")).css("fontStyle",F?"italic":"normal");B._dirty=F}return this}},Static:{Templates:{tagName:"div",style:"{_style};",LIST:{$order:0,tagName:"div",ITEMS:{tagName:"div",text:"{items}",style:"{HAlign}"}},PNAELS:{$order:1,tagName:"text",text:"{panels}"},$dynamic:{items:{ITEM:{className:"{itemClass} {disabled}",style:"{itemStyle}",ITEMI:{ITEMC:{HANDLE:{tagName:"a",href:"{href}",tabindex:"{_tabindex}",IBWRAP:{tagName:"div",style:"white-space:nowrap;",RULER:{},ICON:{style:"background:url({image}) transparent  no-repeat {imagePos};{iconDisplay}",className:"ui-icon",$order:0},CAPTION:{text:"{caption}",$order:1},CMDS:{$order:2,OPT:{$order:1,className:"uicmd-opt",style:"{_opt}"},LAND:{className:"uicmd-land",style:"{landDisplay}",$order:1},CLOSE:{className:"uicmd-close ",style:"{closeDisplay}",$order:2}}}}}}}},panels:{PANEL:{tagName:"div",className:"uibg-base",text:linb.UI.$childTag}}}},Appearances:{KEY:{position:"absolute",overflow:"hidden"},LIST:{position:"relative"},ITEMS:{padding:"0 4px 2px 0",position:"relative",background:linb.UI.$bg("line.gif","repeat-x center bottom")},ITEM:{$order:0,"font-family":'"Verdana", "Helvetica", "sans-serif"',cursor:"pointer","padding-right":"6px","vertical-align":"top",background:linb.UI.$bg("button.gif","no-repeat right -540px",true)},"ITEM-mouseover":{$order:1,"background-position":"right -690px"},"ITEM-mousedown, ITEM-checked":{$order:2,"background-position":"right -840px","border-bottom":"solid 1px #FAD600;"},ITEMI:{$order:0,"padding-left":"6px","vertical-align":"top",background:linb.UI.$bg("button.gif","no-repeat left -640px",true)},"ITEM-mouseover ITEMI":{$order:1,"background-position":"left -790px"},"ITEM-mousedown ITEMI, ITEM-checked ITEMI":{$order:2,"background-position":"left -940px"},ITEMC:{$order:0,padding:"5px 0 3px 0","vertical-align":"top","text-align":"center",background:linb.UI.$bg("button.gif","repeat-x left -590px",true)},"ITEM-mouseover ITEMC":{$order:1,"background-position":"left -740px"},"ITEM-mousedown ITEMC, ITEM-checked ITEMC":{$order:2,"background-position":"left -890px"},HANDLE:{display:linb.$inlineBlock,zoom:linb.browser.ie6?1:null,cursor:"pointer","vertical-align":"middle","font-size":"12px"},RULER:{height:"18px",width:"1px","vertical-align":"middle"},PANEL:{position:"absolute",visibility:"hidden",top:"-10000px",left:"-10000px",width:"100%",overflow:"auto"},CAPTION:{"vertical-align":"middle"},CMDS:{"vertical-align":"middle","margin-left":"4px"}},Behaviors:{DropableKeys:["PANEL","KEY","ITEM"],DragableKeys:["ITEM"],HoverEffected:{ITEM:"ITEM",OPT:"OPT",CLOSE:"CLOSE",LAND:"LAND"},ClickEffected:{ITEM:"ITEM",OPT:"OPT",CLOSE:"CLOSE",LAND:"LAND"},onSize:function(C,D){var E=C.domNode.style,A=null,B=null;if(D.height){B=parseInt(E.height)||null}if(D.width){A=parseInt(E.width)||null}linb.UI.$tryResize(C,A,B)},OPT:{onMousedown:function(){return false},onClick:function(A,B,C){A.boxing().onShowOptions(A,A.getItemByDom(C),B,C);return false}},CAPTION:{onMousedown:function(B,E,F){if(linb.Event.getBtn(E)!="left"){return }var A=B.properties,D=B.getItemByDom(F),C=B.boxing();if(A.disabled){return false}if(C.getUIValue()==D.id){if(B.onCaptionActive){B.boxing().onCaptionActive(B,B.getItemByDom(F),F)}}}},ITEM:{onClick:function(A,B,C){return false},onMousedown:function(B,E,G){if(linb.Event.getBtn(E)!="left"){return false}if(B.getKey(linb.Event.getSrc(E).parentNode.id)==B.keys.CMDS){return false}var A=B.properties,F=B.getSubId(G.id),D=B.getItemByDom(G),C=B.boxing();if(A.disabled){return false}if(C.getUIValue()==D.id){return }B.getSubNode("HANDLE",F).focus();C.setUIValue(D.id);if(C.getUIValue()==D.id){C.onItemSelected(B,D,G);return false}}},HANDLE:{onClick:function(A,B,C){return !!linb.Event.getKey(B)[2]},onKeydown:function(C,F,A){var K=linb.Event.getKey(F),J=K[0],B=K[2];if(J==" "||J=="enter"){C.getSubNode("ITEM",C.getSubId(A.id)).onMousedown();return false}var I=linb([A]),G=C.getSubNode("ITEMS"),E=G.nextFocus(true,true,false),H=G.nextFocus(false,true,false);switch(J){case"tab":if(B){if(A!=E.get(0)){E.focus();return false}}else{if(A!=H.get(0)){H.focus();return false}}break;case"left":case"up":var D=I.nextFocus(false,true,false);if(I.get(0)==E.get(0)){H.focus()}else{I.nextFocus(false)}return false;break;case"right":case"down":var D=I.nextFocus(true,false,false);if(I.get(0)==H.get(0)){E.focus()}else{I.nextFocus()}return false;break}}},CLOSE:{onMousedown:function(){return false},onClick:function(D,F,G){var C=D.properties,E=D.getItemByDom(G),B;if(C.disabled){return }var A=D.boxing();if(false===A.beforePageClose(D,E,G)){return }B=_.copy(E);A.removeItems(E.id);A.afterPageClose(D,B);linb.UI.$tryResize(D,D.root.width(),D.root.height());return false}},LAND:{onMousedown:function(){return false},onClick:function(D,F,A){var H=D.properties,K=D.getItemByDom(A),C=K.id;if(H.disabled){return }var B=D.boxing().getPanel(C),I=D.root.offset(),L=D.root.cssSize(),J=_.copy(linb.UI.Dialog.$DataStruct);_.merge(J,K,"with");_.merge(J,{dragKey:K.dragkey||H.dragKey,dock:"none",tag:K.tag||K.id,width:Math.max(L.width,200),height:Math.max(L.height,100),left:I.left,top:I.top},"all");var G=new linb.UI.Dialog(J);linb("body").append(G);var E=[];_.arr.each(D.children,function(M){if(M[1]==C){E.push(M[0])}},null,true);if(E.length){G.append(linb.UI.pack(E,false))}D.boxing().removeItems(C);return false}}},DataModel:{dataBinder:null,dataField:null,dock:"fill",hasPanel:true,width:200,height:200,position:"absolute",HAlign:{ini:"left",listbox:["left","center","right"],action:function(A){this.getSubNode("ITEMS").css("textAlign",A)}},dynRender:true,dropKeysPanel:"",value:{ini:""},items:{set:function(A){return this.each(function(H){if(H.domNode){var F=H.boxing(),G,C=linb.Dom.getEmptyDiv(),E=_.copy(H.children);H.children.length=0;_.arr.each(E,function(I){delete I[0].$dockParent;C.append(I[0].root)});var B=H.properties.value;F.clearItems();linb.Dom.__gc();F.insertItems(A);_.arr.each(E,function(I){F.append.apply(F,I)});C.empty();F.setValue(B,true);var D=H.root.cssSize();linb.UI.$tryResize(H,D.width,D.height)}else{H.properties.items=A}})}}},EventHandlers:{beforePageClose:function(A,B,C){},afterPageClose:function(A,B){},onShowOptions:function(A,B,C,D){},onItemSelected:function(A,B,C){},onCaptionActive:function(A,B,C){}},RenderTrigger:function(){var B=this,A,D,C;if(A=B.properties.value){(C=B.boxing()).setUIValue(A);if(D=B.getItemByItemId(A)){C.onItemSelected(B,D)}}},_getChildren:function(A){if(!A.properties.dynRender){return A.children}},_prepareData:function(A){var B=arguments.callee.upper.call(this,A);B.panels=B.items;B.HAlign="text-align:"+B.HAlign+";";return B},_prepareItem:function(A,B){var C="display:none";B.closeDisplay=B.closeBtn?"":C;B.landDisplay=B.landBtn?"":C;B._opt=B.optBtn?"":C;B.href=B.href||linb.$href},getDropKeys:function(A,B){return A.properties[A.getKey(B.id)==A.keys.PANEL?"dropKeys":"dropKeysPanel"]},_showTips:function(B,D,G){var F=D.id,E=B.properties,C=B.keys,A=B.getKey(F);if(!F){return false}if(B.onShowTips){return B.boxing().onShowTips(B,D,G)}else{return arguments.callee.upper.apply(this,arguments)}},_onresize:function(E,B,K,A,J){var M=E.properties,L=E.getItemByItemId(J);if(!L){J=M.$UIvalue}L=E.getItemByItemId(J);var D=E.boxing().getPanel(J),G=E.getSubNode("LIST"),C=0,I;if(!D||D.isEmpty()){return }if(!parseInt(E.domNode.style.height)){K=null}var F=null,H=null;if(A){L._w=L._h=null}if(B&&L._w!=B){K=E.domNode.offsetHeight||E.getRoot().offsetHeight();C=1}if((K&&L._h!=K)||C){L._h=K;I=G.get(0).offsetHeight||G.offsetHeight();K=K-I+(linb.browser.ie6?2:1);if(K>0){H=K}}if(I){D.top(I)}if(H){D.height(H).onSize()}}}});Class("linb.UI.Stacks","linb.UI.Tabs",{Initialize:function(){var A=this.getTemplate();A.BORDER={tagName:"div",LIST:A.LIST,PNAELS:A.PNAELS};delete A.LIST;delete A.PNAELS;this.setTemplate(A)},Static:{Appearances:{BORDER:{border:"solid 1px #648CB4",position:"absolute",left:0,top:0},LIST:{position:"static"},ITEMS:{position:"static"},ITEM:{$order:0,display:"block",position:"absolute",cursor:"pointer",background:linb.UI.$bg("bar_vertical.gif","repeat-x left -380px",true),width:"100%",left:0},ITEMC:{display:"block"},ITEMI:{display:"block"},"ITEM-mouseover":{$order:1,"background-position":"right -410px"},"ITEM-mousedown, ITEM-checked":{$order:2,"background-position":"right -440px"},HANDLE:{cursor:"pointer",display:"block","font-size":"12px",height:"100%",height:"18px",padding:"5px 0 5px 8px","white-space":"nowrap"},PANEL:{position:"absolute",visibility:"hidden",top:"-10000px",left:"-10000px",overflow:"auto"},CMDS:{position:"absolute",top:"6px",right:"8px","text-align":"right","vertical-align":"middle"}},DataModel:{$border:1},_onresize:function(D,B,O,A,M){var Q=D.properties,P=D.getItemByItemId(M),L=Q.$border*2;if(!P){M=Q.$UIvalue}var N,I,G,F,K,E=null,H=null,J=D.getSubNode("BORDER"),C=D.boxing().getPanel(M);if(!C||C.isEmpty()){return }if(O){O-=L;G=I=0;_.arr.each(Q.items,function(R){F=D.getSubNodeByItemId("ITEM",R.id);F.cssRegion({bottom:"auto",top:I});I+=F.height();if(R.id==M){return false}});_.arr.each(Q.items,function(R){if(R.id==M){return false}F=D.getSubNodeByItemId("ITEM",R.id);F.cssRegion({top:"auto",bottom:G});G+=F.height()},null,true);N=O-I-G;if(N>0){K=I;H=N}J.height(O)}if(B){B-=L;E=B;J.width(B)}C.cssRegion({width:E?E:null,height:H?H:null,top:K,left:0},true);if(E){D.getSubNode("LIST").width(E)}}}});Class("linb.UI.ButtonViews","linb.UI.Tabs",{Initialize:function(){var A=this.getTemplate();A.LIST.className="uibg-bar uiborder-outset";this.setTemplate(A)},Static:{Appearances:{LIST:{"z-index":"2",position:"absolute"},ITEMS:{"z-index":"2",position:"absolute",left:0,top:0},ITEM:{$order:0,margin:"2px",position:"relative","font-family":'"Verdana", "Helvetica", "sans-serif"',cursor:"pointer","padding-right":"4px","vertical-align":"top",background:linb.UI.$bg("button.gif","no-repeat right -270px",true)},"ITEM-mouseover":{$order:1,"background-position":"right -360px"},"ITEM-mousedown, ITEM-checked":{$order:2,"background-position":"right -450px"},ITEMI:{$order:0,"padding-left":"4px","vertical-align":"top","text-align":"center",background:linb.UI.$bg("button.gif","no-repeat left -330px",true)},"ITEM-mouseover ITEMI":{$order:1,"background-position":"left -420px"},"ITEM-mousedown ITEMI, ITEM-checked ITEMI":{$order:2,"background-position":"left -510px"},ITEMC:{$order:0,"vertical-align":"top","text-align":"center",height:"20px",padding:"2px 0",background:linb.UI.$bg("button.gif","repeat-x left -300px",true)},"ITEM-mouseover ITEMC":{$order:1,"background-position":"left -390px"},"ITEM-mousedown ITEMC, ITEM-checked ITEMC":{$order:2,"background-position":"left -480px"},LEFT:{"border-right":"1px solid #A7A6AA"},RIGHT:{"border-left":"1px solid #A7A6AA"},TOP:{"border-bottom":"1px solid #A7A6AA"},BOTTOM:{"border-top":"1px solid #A7A6AA"},HANDLE:{display:linb.$inlineBlock,zoom:linb.browser.ie6?1:null,cursor:"pointer","vertical-align":"middle","font-size":"12px",margin:"1px"}},DataModel:{barLocation:{ini:"top",listbox:["top","bottom","left","right"],action:function(B){var A=this,C=A.getSubNode("LIST"),D=A.getSubNodes(["ITEM","ITEMI","ITEMC"],true);switch(B){case"left":C.cssRegion({left:0,top:0,right:"auto",bottom:0});break;case"top":C.cssRegion({left:0,top:0,right:0,bottom:"auto"});break;case"right":C.cssRegion({left:"auto",top:0,right:0,bottom:0});break;case"bottom":C.cssRegion({left:0,top:"auto",right:0,bottom:0});break}switch(B){case"left":case"right":D.css("display","block");break;case"top":case"bottom":D.setInlineBlock();C.height("auto");break}A.boxing().setBarSize(A.properties.barSize,true)}},barHAlign:{ini:"left",listbox:["left","center","right"],action:function(B){var A=this.getSubNode("ITEMS");A.css("textAlign",B)}},barVAlign:{ini:"top",listbox:["top","bottom"],action:function(B){var A=this.getSubNode("ITEMS");if(B=="top"){A.cssRegion({top:0,bottom:"auto"})}else{A.cssRegion({bottom:0,top:"auto"})}}},barSize:{ini:50,action:function(C){var B=this,E=B.properties,D=B.getSubNode("LIST"),A=B.getSubNode("ITEMS");if(E.barLocation=="left"||E.barLocation=="right"){D.merge(A).width(C)}else{D.height(C)}linb.UI.$tryResize(B,B.root.width(),B.root.height())}}},LayoutTrigger:function(){var A=this.properties;this.boxing().setBarLocation(A.barLocation,true).setBarHAlign(A.barHAlign,true).setBarVAlign(A.barVAlign,true)},_onresize:function(F,C,L,B,K){var N=F.properties,M=F.getItemByItemId(K);if(!M){K=N.$UIvalue}var D=F.boxing().getPanel(K),I,E,J=F.getSubNode("LIST"),A=F.getSubNode("ITEMS"),G=null,H=null;if(N.barLocation=="top"||N.barLocation=="bottom"){if(C){J.width(C);A.width(C);E=0;G=C}if(L-N.barSize>0){H=L-N.barSize-2}I=N.barLocation=="top"?2- -N.barSize:0}else{if(L){J.height(L);I=0;H=L}if(C){E=N.barLocation=="left"?2- -N.barSize:0;G=C-N.barSize-2}}if(D&&!D.isEmpty()){D.cssRegion({width:G?G:null,height:H?H:null,left:E,top:I},true)}}}});Class("linb.UI.RadioBox","linb.UI.List",{Initialize:function(){var A=this.getTemplate();A.$dynamic={items:{ITEM:{className:"{itemClass}  {disabled}",style:"{itemStyle}",tagName:"a",href:linb.$href,tabindex:"{_tabindex}",MARK:{$order:0,className:"uicmd-radio"},ICON:{style:"background:url({image}) transparent  no-repeat {imagePos};{iconDisplay}",className:"ui-icon",$order:1},CAPTION:{text:"{caption}",$order:2}}}};this.setTemplate(A)},Static:{_DIRTYKEY:"MARK",Appearances:{ITEM:{display:linb.$inlineBlock,zoom:linb.browser.ie6?1:null,"font-family":' "Verdana", "Helvetica", "sans-serif"',border:0,padding:"4px",position:"relative",zoom:linb.browser.ie?1:null,cursor:"pointer",overflow:"hidden","vertical-align":"middle","font-size":"12px"},CAPTION:{"vertical-align":"middle"},ITEMS:{overflow:"auto","overflow-x":(linb.browser.ie||linb.browser.gek)?"hidden":"",position:"relative","line-height":"14px"}},Behaviors:{HoverEffected:{ITEM:"MARK"},ClickEffected:{ITEM:"MARK"}}}});Class("linb.UI.TreeBar",["linb.UI","linb.absList","linb.absValue"],{Instance:{_setCtrlValue:function(B,A){return this.each(function(F){if(!F.domNode){return }var G=F.boxing(),H=G.getUIValue(),E=F.properties,C=function(K,L,J){F.getSubNodeByItemId(K,L).tagClass("-checked",J)},D=E.selMode;if(D=="single"){var I=F.getSubIdByItemId(H);if(H&&I){F.getSubNodes(["BAR","MARK2"],I).tagClass("-checked",false)}I=F.getSubIdByItemId(B);if(I){F.getSubNodes(["BAR","MARK2"],I).tagClass("-checked")}}else{if(D=="multi"){H=H?H.split(";"):[];B=B?B.split(";"):[];if(A){_.arr.each(B,function(J){C("BAR",J);C("MARK2",J)})}else{_.arr.each(H,function(J){if(_.arr.indexOf(B,J)==-1){C("BAR",J,false);C("MARK2",J,false)}});_.arr.each(B,function(J){if(_.arr.indexOf(H,J)==-1){C("BAR",J);C("MARK2",J)}})}}}})},insertItems:function(A,B,E,D){if(!A){A=[_()+""]}if(_.isStr(A)){A=[A]}if(!A.length){return this}var C;return this.each(function(I){var F,J,G;if(!B){G=I.properties;F=G.items||(G.items=[])}else{G=I.getItemByItemId(B);F=G.sub||(G.sub=[])}if(I.domNode){if(!E){if(!B){C=I.getSubNode("ITEMS")}else{if(B&&G._created){C=I.getSubNodeByItemId("SUB",B)}}if(C){J=_.str.toDom(I.buildItems("items",I.box._prepareItems(I,A,B)));if(D){C.prepend(J)}else{C.append(J)}}}else{C=I.getSubNodeByItemId("ITEM",E);if(C){J=_.str.toDom(I.buildItems("items",I.box._prepareItems(I,A,B)));if(D){C.addPrev(J)}else{C.addNext(J)}}}}if(!E){_.arr.insertAny(F,A,D?0:-1)}else{var H=_.arr.subIndexOf(F,"id",E);_.arr.insertAny(F,A,D?H:(H+1))}var K;if(B){if((K=I.getSubNodeByItemId("TOGGLE",B)).css("display")=="none"){K.setInlineBlock()}}if(!(("iniFold" in G)?G.iniFold:I.properties.iniFold)){if(!B||I.getItemByItemId(B)._created){I.boxing()._toggleNodes(A,true)}}})},_toggleNodes:function(C,A,D){var B=this;_.arr.each(C,function(E){B.toggleNode(E.id,A,D)});return B},toggleNode:function(E,A,B){var C=this.get(0),D=C.getItemByItemId(E);if(D&&D.sub){C.box._setSub(C,D,typeof A=="boolean"?A:!D._checked,B)}return self},openToNode:function(A){return this.each(function(E){var D=false,C=[],B=function(F,H,G){G=G||0;var I=arguments.callee;_.arr.each(F,function(J){if(J.id==H){C.push(J);D=true;return false}if(J.sub){D=I.call(I,J.sub,H,++G);if(D){C.push(J);return false}}});return D};B(E.properties.items,A);if(D){C.reverse();_.arr.each(C,function(F){if(F.sub){if(!F._checked){E.box._setSub(E,F,true)}}else{E.boxing().fireItemClickEvent(F.id)}})}})},fireItemClickEvent:function(A){this.getSubNodeByItemId("BAR",A).onClick();return this}},Initialize:function(){this.addTemplateKeys(["DISABLED"])},Static:{Templates:{tagName:"div",style:"{_style}",ondrag:"return false",onselectstart:"return false",BORDER:{tagName:"div",BOX:{tagName:"div",onselectstart:"return false",ITEMS:{tagName:"div",text:"{items}"}}},$dynamic:{items:{ITEM:{className:"{itemClass} {disabled}",style:"{itemStyle}",tagName:"div",onselectstart:"return false",unselectable:"on",BAR:{$order:0,tagName:"a",href:"{href}",tabindex:"{_tabindex}",className:"{cls_group} ",onselectstart:"return false",unselectable:"on",TOGGLE:{$order:0,className:"uicmd-toggle",style:"{mark}"},MARK2:{$order:1,style:"{mark2Display}"},ITEMICON:{style:"background:url({image}) transparent  no-repeat   {imagePos}; {iconDisplay}",className:"ui-icon",$order:2},ITEMCAPTION:{text:"&nbsp;{caption}",className:"{disabled} ",$order:3}},SUB:{$order:1,tagName:"div",text:linb.UI.$childTag}}}}},Appearances:{KEY:{"font-family":"Verdana, Helvetica, sans-serif",border:0},BOX:{left:0,overflow:"auto","overflow-x":(linb.browser.ie||linb.browser.gek)?"hidden":"",position:"relative"},ITEMS:{overflow:"hidden"},ITEM:{"white-space":"nowrap",position:"relative",overflow:"hidden"},BAR:{cursor:"pointer",zoom:linb.browser.ie?1:null,position:"relative",display:"block",overflow:"hidden","font-size":"12px",padding:"2px 0",border:"1px solid","border-color":"#EDF4FC #698AB3 #698AB3 #698AB3","background-color":"#CCE4FC"},DISABLED:{color:"#808080"},"BAR-mouseover":{$order:1,"background-color":"#fffa9f"},"BAR-checked":{$order:2,"background-color":"#fffa9f"},"BAR-GROUP":{$order:2,"border-top":"none","border-bottom":"none",padding:"5px 0",height:"18px",background:linb.UI.$bg("bar_vertical.gif","repeat-x left -380px",true)},"BAR-GROUP-mouseover":{$order:3,"background-position":"left -410px"},"BAR-GROUP-checked":{$order:4,"background-position":"left -440px"},SUB:{overflow:"hidden","*zoom":1,height:0,"font-size":"1px","line-height":"1px",position:"relative","margin-left":"12px"},MARK2:{"vertical-align":"middle",cursor:"pointer",width:"16px",height:"16px",margin:"0 4px 0 0"},"MARK2-checked":{$order:2,background:linb.UI.$bg("icons.gif","no-repeat -84px -244px",true)},ITEMCAPTION:{"vertical-align":"middle",padding:"2px"}},Behaviors:{HoverEffected:{TOGGLE:"TOGGLE",BAR:"BAR"},ClickEffected:{TOGGLE:"TOGGLE",BAR:"BAR"},DragableKeys:["BAR"],DropableKeys:["BAR","TOGGLE","BOX"],onSize:function(C,D){var E=C.root,A=null,B=null;if(D.height){B=E.height()}if(D.width){A=E.width()}linb.UI.$tryResize(C,A,B)},TOGGLE:{onClick:function(B,D,E){var A=B.properties,C=B.getItemByDom(E);if(A.disabled||C.disabled){return false}if(!("sub" in C)){return false}B.box._setSub(B,C,!C._checked);return false}},BAR:{onClick:function(D,K,A){var M=D.properties,Q=D.getItemByDom(A),N=D.getSubId(A.id),J=D.boxing(),O=linb.Event.getKey(K),F,C;if(M.disabled||Q.disabled){return false}if(Q.sub&&(Q.group!==undefined?Q.group:M.group)){D.getSubNode("TOGGLE",N).onClick();return false}switch(M.selMode){case"none":F=J.onItemSelected(D,Q,A);break;case"multi":var P=J.getUIValue(),I=P?P.split(";"):[];if(I.length&&(O[1]||O[2])){C=false;if(O[2]){if(D.$firstV._pid!=Q._pid){return false}var L=M.items;if(Q._pid){var B=D.getItemByItemId(Q._pid);if(B){L=B.sub}}var G=_.arr.subIndexOf(L,"id",D.$firstV.id),E=_.arr.subIndexOf(L,"id",Q.id),H;I.length=0;for(H=Math.min(G,E);H<=Math.max(G,E);H++){I.push(L[H].id)}}else{if(_.arr.indexOf(I,Q.id)!=-1){_.arr.removeValue(I,Q.id)}else{I.push(Q.id)}}I.sort();P=I.join(";");if(J.getUIValue()==P){F=false}else{J.setUIValue(P);if(J.getUIValue()==P){F=J.onItemSelected(D,Q,A)||C}}break}case"single":if(J.getUIValue()==Q.id){F=false}else{D.$firstV=Q;J.setUIValue(Q.id);if(J.getUIValue()==Q.id){F=J.onItemSelected(D,Q,A)}}break}D.getSubNode("BAR",N).focus();return F},onKeydown:function(C,F,A){var J=linb.Event.getKey(F),I=J[0],B=J[2],H=linb(A),E=C.root.nextFocus(true,true,false),G=C.root.nextFocus(false,true,false);switch(linb.Event.getKey(F)[0]){case"tab":if(B){if(A!=E.get(0)){E.focus();return false}}else{if(A!=G.get(0)){G.focus();return false}}break;case"up":var D=H.nextFocus(false,true,false);if(H.get(0)==E.get(0)){G.focus()}else{H.nextFocus(false)}return false;break;case"down":var D=H.nextFocus(true,false,false);if(H.get(0)==G.get(0)){E.focus()}else{H.nextFocus()}return false;break;case"right":case"left":C.getSubNode("TOGGLE",C.getSubId(A.id)).onClick();return false}}},BOX:{onScroll:function(A,B,C){if(linb([C]).scrollLeft()!==0){linb([C]).scrollLeft(0)}}}},EventHandlers:{onGetContent:function(A,B,C){},onItemSelected:function(A,B,C){}},DataModel:{listKey:null,width:200,height:200,iniFold:true,animCollapse:false,dock:"fill",group:{ini:false,action:function(F){var E=this,D=E.properties.items,G=E.queryItems(D,function(H){return H.sub&&H.group===undefined}),C=linb();_.arr.each(G,function(H){C.merge(E.getSubNodeByItemId("BAR",H.id))});var B=E.getClass("BAR"),A=E.getClass("BAR","-group");if(F){C.replaceClass(new RegExp("(\\b)"+B+"([^b]*\\b)","g"),"$1"+A+"$2")}else{C.replaceClass(new RegExp("(\\b)"+A+"([^b]*\\b)","g"),"$1"+B+"$2")}}},selMode:{ini:"single",listbox:["single","none","multi"],action:function(A,B){var C=this.getSubNode("MARK2",true);if(B=="none"){C.setInlineBlock()}if(A=="none"){C.css("display","none")}}},singleOpen:false,dynDestory:false,position:"absolute"},RenderTrigger:function(){var A=this,B=A.properties;if(!B.iniFold){A.boxing()._toggleNodes(B.items,true)}},_onStartDrag:function(A,B,C,D){var D=linb.Event.getPos(B);linb([C]).startDrag(B,{dragType:"icon",shadowFrom:C,targetLeft:D.left+12,targetTop:D.top+12,dragCursor:"pointer",dragDefer:1,dragKey:A.box.getDragKey(A,C),dragData:A.box.getDragData(A,B,C)});return false},_onDropTest:function(B,F,H,A,D,C){var G=D&&D.domId,E=H.id;if(G){if(G==E){return false}if(_.get(H,["parentNode","previousSibling","firstChild","id"])==G){return false}}},_onDrop:function(D,H,B,K,G,M){linb.DragDrop.setDragIcon("none");var F=D.getKey(B.id),C=G.profile,A=G.domId,E,J=D.keys,L=linb.absObj.$specialChars,I=D.boxing();E=_.clone(C.getItemByDom(A),function(O,N){return !L[(N+"").charAt(0)]});C.boxing().removeItems([E.id]);if(F==J.BOX){I.insertItems([E],null,null,false)}else{if(F==J.BAR){I.insertItems([E],M._pid,M.id,true)}else{if(F==J.TOGGLE){I.insertItems([E],M.id,null,false)}}}return false},_ensureValue:function(B,C){if(B.properties.selMode=="multi"){var A=(C||"").split(";");A.sort();return A.join(";")}else{return C}},_prepareItem:function(C,D,A,B){var E=C.properties;if(B){A._pid=B}D.mark=D.sub?"":"display:none";D.disabled=D.disabled?C.getClass("KEY","-disabled"):"";D.mark2Display=(E.selMode=="none")?"display:none":"";D._tabindex=E.tabindex;D.href=D.href||linb.$href;if(D.sub&&(D.group!==undefined?D.group:E.group)){D.cls_group=C.getClass("BAR","-group");D.mark2Display="display:none"}},_setSub:function(C,S,N,R){var K=C.domId,G=C.getSubIdByItemId(S.id),E=C.properties,P=C.getSubNode("BAR",G),B=C.getSubNode("TOGGLE",G),L=C.getSubNode("SUB",G);if(linb.Thread.isAlive(C.key+C.id)){return }if(S._checked){if(!N){var Q=L.height();if(E.animCollapse){L.animate({height:[Q,0]},null,null,100,5,"expoIn",C.key+C.id).start()}else{L.height(0)}B.tagClass("-checked",false);S._checked=false;if(S.group||E.group){P.tagClass("-checked",false)}if(E.dynDestory){var I=S.sub,A=[];for(var O=0,M=I.length;O<M;O++){A.push(I[O].id)}C.boxing().removeItems(A);S.sub=true;delete S._created}}if(R&&S.sub&&!E.dynDestory){_.arr.each(S.sub,function(U){if(U.sub&&U.sub.length){C.box._setSub(C,U,false,true)}})}}else{if(N){var T=function(X,g,W,Z,e,d,U,Y){var f=X.boxing(),V=X.properties;if(!g._created){delete g.sub;g._created=true;if(typeof U=="string"){e.html(g.sub=U,false)}else{if(_.isArr(U)){f.insertItems(U,g.id)}else{if(U["linb.Template"]||U["linb.UI"]){e.append(g.sub=U.render(true))}}}f._setCtrlValue(f.getUIValue(),true)}if(V.singleOpen){f._toggleNodes(g._pid?X.getItemByItemId(g._pid).sub:V.items,false)}if(!Y){var c=e.height(true);if(V.animCollapse){e.animate({height:[0,c]},null,function(){e.height("auto")},100,5,"expoOut",X.key+X.id).start()}else{e.height("auto")}}else{e.height("auto")}Z.tagClass("-checked");if(g.group||E.group){d.tagClass("-checked")}g._checked=true},F=S.sub,D=function(U){T(C,S,K,B,L,P,U,R)},H;if((H=typeof F)=="string"||H=="object"){D(F)}else{if(C.onGetContent){var J=C.boxing().onGetContent(C,S,D);if(J){D(J)}}}}if(R&&S.sub){_.arr.each(S.sub,function(U){if(U.sub&&U.sub.length&&!U._checked){C.box._setSub(C,U,true,true)}})}}},_onresize:function(C,B,A){C.getSubNode("BORDER").cssSize({width:B?B:null,height:A?A:null});C.getSubNode("BOX").cssSize({width:B?B:null,height:A?A:null})}}});Class("linb.UI.PopMenu",["linb.UI.Widget","linb.absList"],{Instance:{_adjustSize:function(){this.each(function(A){var F=A.root,E=A.getSubNode("ITEMS"),B=A.getSubNode("BORDER"),J=F.cssSize(),H=B.cssSize(),I=A.properties,C=Math.min(I._maxHeight,E.height()+J.height-H.height+1),G=Math.min(I._maxWidth,E.width()+J.width-H.width+1);I.width=G;I.height=C;F.cssSize({width:G,height:C});linb.UI.$tryResize(A,G,C,true);if(I.shadow){A.$noS=true;var D=A.boxing();if(D._shadow){D._shadow(true)}}});return this._setScroll()},_setScroll:function(){return this.each(function(E){var F=E.getSubNode("ITEMS"),C=F.offsetTop(),D=F.offsetHeight(),A=E.getSubNode("BORDER"),B=A.offsetHeight();E.getSubNode("TOP").css("display",C===0?"none":"block");E.getSubNode("BOTTOM").css("display",(B>D+C)?"none":"block")})},_scrollToBottom:function(){return this.each(function(E){var G=E.getSubNode("ITEMS"),C=E.getSubNode("BORDER"),H=G.offsetTop(),F,D=G.offsetHeight(),A=false,B=C.height();if(B<D+H){if(!E.$scrollStep){E.$scrollStep=1}if(E.$scrollStep<30){E.$scrollStep=E.$scrollStep*1.1}H-=E.$scrollStep;if(B>D+H){H=B-D;A=true}G.top(H);if(A){E.getSubNode("BOTTOM").css("display","none");E.$scrollTobottom=false;E.$scrollStep=null}else{E.getSubNode("TOP").css("display","block");if(E.$scrollTobottom){_.asyRun(arguments.callee,0,[E],this)}}}})},_scrollToTop:function(){return this.each(function(B){var C=B.getSubNode("ITEMS"),D=C.offsetTop(),A=false;if(D<0){if(!B.$scrollStep){B.$scrollStep=1}if(B.$scrollStep<10){B.$scrollStep=B.$scrollStep*1.03}D+=B.$scrollStep;if(D>=-1){D=0;A=true}C.top(D);if(A){B.getSubNode("TOP").css("display","none");B.$scrollToTop=false;B.$scrollStep=null}else{B.getSubNode("BOTTOM").css("display","block");if(B.$scrollToTop){_.asyRun(arguments.callee,0,[B],this)}}}})},pop:function(F,D,C){var B=this.get(0);if(!B.rendered){var G=B.boxing().render(true);linb.Dom.getEmptyDiv().append(G)}var A=B.root;if(B.$highLight){linb([B.$highLight]).tagClass("-mouseover",false)}B._conainer=C;A.popToTop(F,D,C);var E=function(){var H=arguments.callee.profile;H.boxing().hide();H.$popGrp.length=0};E.profile=B;if(!B.$popGrp||!B.$popGrp.length){B.$popGrp=[A.get(0)];A.setBlurTrigger(B.$id,null);A.setBlurTrigger(B.$id,E,B.$popGrp)}return this},hide:function(H){var C,E=this.get(0),B=E.root,D="$subPopMenuShowed",A="$childPopMenu";if(false!==H){if(false===E.boxing().beforeHide(E)){return this}}if(!B||B.css("display")=="none"){return }B.setBlurTrigger(E.$id,null);if(E.$hideMenuPool){E.$hideMenuPool.append(B)}else{B.css("display","none")}var G=E[A],F;if(C=E[D]){C.hide()}while(G){G.boxing().hide();G=(F=G)[A];F[A]=F[D]=null}E[A]=E[D]=null;if(C=E.$parentPopMenu){C[D]=null}_.arr.removeValue(E.$popGrp,B.get(0));if(false!==H){E.boxing().onHide(E)}return this}},Initialize:function(){var A=this.getTemplate();_.merge(A.FRAME.BORDER,{TOP:{},BOTTOM:{},BOX:{tagName:"div",ITEMS:{tagName:"div",text:"{items}"}},POOL:{tagName:"div",style:"display:none;"}},"all");A.$dynamic={items:function(G,F,D,C,B){var E;C=C+"."+D.type;if(E=D.object){B[B.length]=E.build(D)}else{if(F[C]){linb.UI.$doTemplate(G,F,D,C,B)}}},"items.split":{ITEMSPLIT:{tagName:"a"}},"items.button":{ITEM:{tagName:"a",href:linb.$href,tabindex:1,className:"{itemClass} {disabled}",style:"{itemStyle}",ICON:{style:"background:url({image}) transparent  no-repeat {imagePos};",className:"ui-icon",$order:0},CAPTION:{text:"{caption}",$order:1},RULER:{style:"{displayAdd}",$order:2},ADD:{tagName:"div",style:"{displayAdd}",text:"{add}",$order:2},SUB:{style:"{tagClass}"}}},"items.checkbox":{ITEM:{tagName:"a",href:linb.$href,tabindex:1,className:"{itemClass} {disabled}",style:"{itemStyle}",CHECKBOX:{$order:0,className:"ui-icon {checkboxCls}"},CAPTION:{text:"{caption}",$order:1},RULER:{style:"{displayAdd}",$order:2},ADD:{tagName:"div",style:"{displayAdd}",text:"{add}",$order:2}}}};this.setTemplate(A)},Static:{$noDomRoot:true,Appearances:{KEY:{"font-size":"12px",visibility:"hidden"},BORDER:{border:"1px solid","border-color":"#FFF #ACA899 #ACA899 #FFF"},BOX:{"background-color":"#EEF7FF",overflow:"hidden",position:"absolute",left:0,top:0,"font-size":"12px","z-index":"3"},ITEMS:{position:"absolute",top:0,left:0,overflow:"visible",background:linb.UI.$bg("bg.gif","repeat-y left top")},ITEM:{display:"block",position:"relative",overflow:"visible","white-space":"nowrap",color:"#000","font-family":'"Verdana", "Helvetica", "sans-serif"',cursor:"pointer",padding:"2px 20px 2px 2px"},ITEMSPLIT:{display:"block",position:"relative",overflow:"visible","white-space":"nowrap","font-size":"1px","line-height":"1px",padding:"1px",margin:"2px 2px 2px 26px",background:linb.UI.$bg("split_horizontal.gif","repeat-x left top",true)},"ITEM-mouseover":{$order:1,"background-color":"#FFFA9F",border:"solid 1px #94A3A8",padding:"1px 19px 1px 1px"},"ITEM-checked":{$order:2,"background-color":"#FFFA9F",border:"solid 1px #94A3A8",padding:"1px 19px 1px 1px"},CHECKBOX:{background:linb.UI.$bg("icons.gif","no-repeat -20px -70px",true),margin:0},ICON:{margin:0},"CHECKBOX-checked":{$order:1,background:linb.UI.$bg("icons.gif","no-repeat -0px -70px",true)},TOP:{cursor:"pointer",display:"none",position:"absolute","margin-left":"-8px",right:0,height:"16px",width:"16px","z-index":"10",top:0,background:linb.UI.$bg("icons.gif","no-repeat -48px -244px",true)},BOTTOM:{cursor:"pointer",display:"none",position:"absolute","margin-left":"-8px",right:0,height:"16px",width:"16px","z-index":"10",bottom:0,background:linb.UI.$bg("icons.gif","no-repeat -66px -244px",true)},"CHECKBOX, CHECKBOX-checked":{cursor:"pointer","vertical-align":"middle",width:"16px",height:"16px"},CAPTION:{"vertical-align":"middle","padding-left":"6px"},RULER:{width:"100px","font-size":0,"line-height":0},ADD:{position:"absolute",top:"3px",right:0,width:"80px","padding-right":"20px","text-align":"right","z-index":"10"},SUB:{position:"absolute",top:"4px",right:0,width:"8px",height:"16px",background:linb.UI.$bg("icons.gif","no-repeat -200px -70px",true)}},Behaviors:{ITEM:{onMouseover:function(F,H,B){var D="$subPopMenuShowed",L="$allPops",E="$highLight",K="$showpops",G="$popGrp";if(F[E]==B){return }var I=F.properties,P=F.getItemByDom(B),J=P.id,O=false,M,C,N;if(N=F[D]){if(N==_.get(F,[L,J])){O=true}else{N.hide();F[D]=null}}if(!O){if(N=F[E]){linb([N]).tagClass("-mouseover",false)}F[E]=B;linb([B]).tagClass("-mouseover");try{B.focus()}catch(H){}}if(!O&&P.sub){if(_.isArr(P.sub)&&P.sub.length){F[L]=F[L]||{};if(!(M=F[L][J])){M=(new linb.UI.PopMenu({position:"absolute",items:P.sub,autoHide:F.properties.autoHide})).render(true);M.onMenuSelected(function(S,Q,R){F.boxing().onMenuSelected(F,Q,R)});C=M.get(0);C.$hideMenuPool=F.$hideMenuPool||F.getSubNode("POOL");F[L][J]=M;F[K]=F[K]||[F];C[K]=F[K];F[K].push(C)}else{C=M.get(0)}F[G].push(C.root.get(0));C[G]=F[G];C.$parentPopMenu=F;F.$childPopMenu=C;M.pop(B,2);F[D]=M}else{if(F.onShowSubMenu){var A=F["$sub:"+P.id];if(A&&A["linb.UI"]&&!A.isEmpty()){}else{A=F.boxing().onShowSubMenu(F,P,B)}if(A&&A["linb.UI"]&&!A.isEmpty()){F[D]=A;A=A.reBoxing();A.onMouseout(function(R,Q,S){F.box._mouseout(F,Q,S)},null,-1);F[G].push(A.get(0));A.popToTop(B,2,F._conainer)}}}}},onMouseout:function(C,F,A){var G=C.properties,J=C.getItemByDom(A),H=J.id,D=true,K;if(K=C.$subPopMenuShowed){var B=F.toElement||F.relatedTarget,E=K.get(0).root.get(0);try{do{if(B==E){return }}while((B&&(B=B.parentNode)))}catch(I){}}linb([A]).tagClass("-mouseover",false);C.$highLight=null},onClick:function(A,C,E){var F=A.properties,B=A.getItemByDom(E),D=B.id;if(F.disabled||B.disabled){return false}if(!B.sub){if(B.type=="checkbox"){A.getSubNodeByItemId("CHECKBOX",B.id).tagClass("-checked",B.value=!B.value)}if(A.onMenuSelected){A.boxing().onMenuSelected(A,B,E)}if(F.hideAfterClick){linb([E]).tagClass("-mouseover",false);_.asyRun(function(){var H=A,G;while(H){H.boxing().hide();H=(G=H).$parentPopMenu;G.$parentPopMenu=G.$subPopMenuShowed=null}A.$subPopMenuShowed=null;A.$popGrp.length=0},100)}}return false},onFocus:function(B,E,F){var C=B.getSubNode("BOX"),D=C.scrollTop(),A=C.scrollHeight(),G=linb([F]).offsetTop();if(G<D||G>D+A){linb(F).offsetTop(D)}linb(F).onMouseover()},onKeydown:function(D,F,B){var L=D.getItemByDom(B),G=D.properties.items,J=linb.Event.getKey(F)[0],I=L.id,H,A,E,C,K;switch(J){case"up":A=true;H=false;_.arr.each(G,function(N,M){if(N.type=="split"){return }if(H){E=N.id;return A=false}if(N.id==I){H=true}},null,true);if(A){E=G[G.length-1].id}C=D.getSubNodeByItemId("ITEM",E).get(0);break;case"down":A=true;H=false;_.arr.each(G,function(N,M){if(N.type=="split"){return }if(H){E=N.id;return A=false}if(N.id==I){H=true}});if(A){E=G[0].id}C=D.getSubNodeByItemId("ITEM",E).get(0);break;case"left":if(K=D.$parentPopMenu){if(K=D.$parentPopMenu.$highLight){C=K}}break;case"right":if((K=D.$subPopMenuShowed)&&K==D.$allPops[I]){K.activate()}break}if(C&&C.tagName){try{C.focus()}catch(F){}}}},TOP:{onMouseover:function(A,B,C){A.$scrollToTop=true;A.boxing()._scrollToTop()},onMouseout:function(A,B,C){A.$scrollToTop=false;A.$scrollStep=null},onClick:function(A,B,C){A.$scrollStep=1000}},BOTTOM:{onMouseover:function(A,B,C){A.$scrollTobottom=true;A.boxing()._scrollToBottom()},onMouseout:function(A,B,C){A.$scrollTobottom=false;A.$scrollStep=null},onClick:function(A,B,C){A.$scrollStep=1000}},ITEMS:{beforeKeydown:function(B,C){var A=linb.Event.getKey(C)[0];if(A=="tab"||A=="enter"){return true}else{if(A=="esc"){do{B.boxing().hide()}while(B=B.$parentPopMenu);return false}else{return false}}}},BORDER:{onMouseout:function(A,B,C){A.box._mouseout(A,B,C)}}},DataModel:({dock:null,tabindex:null,tips:null,border:null,resizer:null,shadow:true,_maxHeight:260,_maxWidth:300,left:-10000,hideAfterClick:true,autoHide:false,height:100,width:300,position:"absolute",$hborder:1,$vborder:1}),EventHandlers:{onShowSubMenu:function(A,B,C){},beforeHide:function(A){},onHide:function(A){},onMenuSelected:function(A,B,C){}},RenderTrigger:function(){this.boxing()._adjustSize()},_mouseout:function(C,E,G){if(C.properties.autoHide){var F=linb.Event.getPos(E),B,D,A;_.arr.each(C.$popGrp,function(H){H=linb([H]);D=H.offset();B=H.cssSize();if(F.left>D.left&&F.top>D.top&&F.left<D.left+B.width&&F.top<D.top+B.height){return A=1}});if(!A){while(A=C.$parentPopMenu){C=A}C.boxing().hide();C.$popGrp.length=0}}},_prepareItem:function(A,B){B.add=B.add||"";B.displayAdd=B.add?"":"display:none";B.tagClass=B.sub?"":"display:none";B.type=B.type||"button";if(B.type=="checkbox"){B.checkboxCls=A.getClass("CHECKBOX",B.value?"-checked":"")}},_onresize:function(D,C,A){var B=arguments.callee.upper.apply(this,arguments);D.getSubNode("BOX").cssSize(B)}}});Class("linb.UI.MenuBar",["linb.UI","linb.absList"],{Instance:{updateItem:function(D,C){var B=this,E=B.get(0),G=E.box,A=E.properties.items,H=E.queryItems(A,function(I){return typeof I=="object"?I.id===D:I==D},true,true,true),F;if(typeof C=="string"){C={caption:C}}if(H.length){H=H[0];if(typeof H[0]!="object"){F=H[2][H[1]]={id:H[0]}}else{F=H[0]}_.merge(F,C,"all");F.id=D;if(A.indexOf(F)!=-1){arguments.callee.upper.apply(this,arguments)}else{_.each(E.$allPops,function(I){I.updateItem(D,C)})}}},_pop:function(C,B){var D,J=this,E=J.get(0),H=E.properties,G="$allPops";if(E.$curPop){J.hide()}linb([B]).tagClass("-mousedown");E[G]=E[G]||{};if(!(D=E[G][C])){var I=E.getItemByItemId(C),A=I.sub;A=A||[];D=linb.create("PopMenu",{position:"absolute",items:A,autoHide:!!H.autoShowTime});E.getSubNode("POOL").append(D);D.onHide(function(K){J.hide(false)}).onMenuSelected(function(M,K,L){return E.boxing().onMenuSelected(E,M,K,L)}).onShowSubMenu(function(M,K,L){return E.boxing().onShowSubMenu(E,M,K,L)});D.get(0).$hideMenuPool=E.getSubNode("POOL");D.get(0)[G]=E[G];E[G][C]=D}var F=linb(B);D.pop(F,1,linb(H.parentID));E.$curPop=C;E.$curElem=B},_afterInsertItems:function(){this.clearPopCache()},hide:function(){var A=this.get(0),C,D=A.$curPop,B=A.$curElem;if(C=A.$allPops[D]){if(false!==arguments[0]){C.hide(false)}A.getSubNode("POOL").append(C.reBoxing());linb([B]).tagClass("-mousedown",false)}A.$menuPop=A.$curPop=A.$curElem=null},clearPopCache:function(){var A=this.get(0);A.getSubNode("POOL").empty();A.$allPops=A.$curPop=A.$curElem=null}},Initialize:function(){linb.SC("linb.UI.PopMenu")},Static:{Templates:{tagName:"div",POOL:{tagName:"div"},BORDER:{className:"uibg-bar uiborder-outset",tagName:"div",LIST:{tagName:"div",HANDLER:{style:"{handler}"},ITEMS:{$order:1,text:"{items}"}}},$dynamic:{items:{ITEM:{ITEMI:{ITEMC:{ITEMA:{tagName:"a",href:linb.$href,tabindex:"{_tabindex}",className:" {typeCls} {disabled}",ICON:{$order:1,className:"ui-icon",style:"background:url({image}) transparent no-repeat  {imagePos}; {iconDisplay}"},CAPTION:{$order:2,text:"{caption}",style:"{captionDisplay}"}}}}}}}},Appearances:{KEY:{"font-size":0,"line-height":0,position:"absolute",left:0,top:0},POOL:{width:0,height:0,visibility:"hidden",position:"absolute",left:"-10000px"},BORDER:{left:0,top:0,"font-size":0,"line-height":0},HANDLER:{height:"22px",width:"7px",background:linb.UI.$bg("handler.gif"," left top",true),cursor:"move","vertical-align":"middle"},LIST:{padding:"2px"},ITEMS:{"vertical-align":"middle"},"LIST-disabled":{"background-color":"#E4E4E4"},"ITEM-mouseover, ITEM-mouseover ITEMI, ITEM-mouseover ITEMC, ITEM-mousedown, ITEM-mousedown ITEMI, ITEM-mousedown ITEMC":{background:linb.UI.$bg("button.gif","no-repeat",true)},ITEM:{height:"22px","white-space":"nowrap","vertical-align":"top",overflow:"hidden",margin:"0  3px 0 3px","padding-right":"6px","font-size":0,"line-height":0},"ITEM *":{cursor:"pointer"},ITEMI:{height:"22px","padding-left":"6px","vertical-align":"top"},ITEMC:{height:"22px","padding-top":"3px","vertical-align":"top"},ITEMA:{display:linb.$inlineBlock},"ITEM-mouseover":{$order:2,"background-position":"right -90px"},"ITEM-mousedown":{$order:3,"background-position":"right -180px"},"ITEM-mouseover ITEMI":{$order:2,"background-position":"left -150px"},"ITEM-mousedown ITEMI":{$order:3,"background-position":"left -240px"},"ITEM-mouseover ITEMC":{$order:2,"background-position":"left -120px","background-repeat":"repeat-x"},"ITEM-mousedown ITEMC":{$order:3,"background-position":"left -210px","background-repeat":"repeat-x"},CAPTION:{"font-size":"12px","line-height":"14px","vertical-align":"middle"}},Behaviors:{ITEM:{onMouseover:function(B,E,G){var D=B.properties,A=this;if(D.disabled){return }var C=B.getItemByDom(G),F=C.id;if(C.disabled){return }if(B.$menuPop){if(B.$menuPop!=F){linb([A]).tagClass("-mousedown");B.boxing()._pop(F,A);B.$menuPop=F}}else{linb([A]).tagClass("-mouseover");if(D.autoShowTime){_.resetRun(B.$id+":autoShowTime",function(){B.boxing()._pop(F,A)},D.autoShowTime)}}},onMouseout:function(D,E,A){var B=D.properties;if(B.disabled){return }var J=D.getItemByDom(A);if(J.disabled){return }linb([this]).tagClass("-mouseover",false);if(B.autoShowTime){var G=D.$allPops;if(G=G&&G[D.$curPop]){var C=G.get(0).root,H=linb.Event.getPos(E),K=C.cssSize(),I=3,F=C.offset();if(H.left>F.left&&H.top>F.top-I&&H.left<F.left+K.width&&H.top<F.top+K.height){}else{G.hide()}}_.resetRun(D.$id+":autoShowTime",null)}},onMousedown:function(A,D,F){var C=A.properties;if(C.disabled){return }var B=A.getItemByDom(F),E=B.id;if(B.disabled){return }if(A.$menuPop){A.$menuPop=null;A.boxing().hide(E)}else{A.$menuPop=E;A.boxing()._pop(E,this);return false}},onKeydown:function(C,F,A){var J=linb.Event.getKey(F),I=J[0],B=J[2],H=linb(A),E=C.root.nextFocus(true,true,false),G=C.root.nextFocus(false,true,false);switch(linb.Event.getKey(F)[0]){case"tab":if(B){if(A!=E.get(0)){E.focus();return false}}else{if(A!=G.get(0)){G.focus();return false}}break;case"left":case"up":var D=H.nextFocus(false,true,false);if(H.get(0)==E.get(0)){G.focus()}else{H.nextFocus(false)}return false;break;case"right":case"down":var D=H.nextFocus(true,false,false);if(H.get(0)==G.get(0)){E.focus()}else{H.nextFocus()}return false;break;case"enter":linb(A).onMousedown();return false;break}},onClick:function(){return false}}},DataModel:{listKey:null,height:{ini:"auto",readonly:true},width:"auto",parentID:"",$hborder:1,$vborder:1,left:0,top:0,autoShowTime:200,handler:{ini:true,action:function(A){this.getSubNode("HANDLER").css("display",A?"":"none")}},position:"absolute",dock:{ini:"top",listbox:["top","bottom"]}},EventHandlers:{onShowSubMenu:function(A,D,B,C){},onMenuSelected:function(A,D,B,C){}},RenderTrigger:function(){if(this.properties.disabled){this.boxing().setDisabled(true,true)}},_prepareData:function(A){var B=arguments.callee.upper.call(this,A);B.handler=B.handler?"":"display:none";return B}}});Class("linb.UI.ToolBar",["linb.UI","linb.absList"],{Instance:{updateItem:function(B,A){return arguments.callee.upper.apply(this,[B,A,"items.sub"])},showItem:function(B,A){return this.each(function(C){C.getItemByItemId(B).visible=A!==false;C.getSubNodeByItemId("ITEM",B).css("display",A===false?"none":"")})},showGroup:function(A,B){return this.each(function(C){_.arr.each(C.properties.items,function(D){if(D.id==A){D.visible=B!==false;return false}});C.getSubNodeByItemId("GROUP",A).css("display",B===false?"none":"")})}},Static:{Templates:{tagName:"div",ITEMS:{className:"uibg-bar uiborder-outset",tagName:"div",style:"{mode}",text:"{items}"},$dynamic:{items:{GROUP:{className:"{groupClass}",style:"{grpDisplay} {groupStyle}",HANDLER:{style:"{mode2}"},LIST:{$order:1,tagName:"text",text:"{sub}"}}},"items.sub":{ITEM:{style:"{itemDisplay}",IBWRAP:{tagName:"div",SPLIT:{style:"{splitDisplay}"},LABEL:{className:" {disabled}",style:"{labelDisplay}",text:"{label}"},BTN:{className:"ui-btn {itemClass}",style:"{itemStyle} {boxDisplay}",BTNI:{className:"ui-btni",BTNC:{className:"ui-btnc",BOX:{tagName:"a",href:linb.$href,tabindex:"{_tabindex}",BOXWRAP:{tagName:"div",ICON:{$order:1,className:"ui-icon",style:"background:url({image}) transparent no-repeat  {imagePos}; {iconDisplay}"},CAPTION:{$order:2,text:"{caption}",className:" {disabled}",style:"{captionDisplay}"},DROP:{$order:3,style:"{dropDisplay}"}}}}}}}}}}},Appearances:{KEY:{"font-size":0,"line-height":0,position:"absolute",left:0,top:0},ICON:{margin:0,"vertical-align":"top"},ITEMS:{display:"block","padding-bottom":"1px","font-size":0,"line-height":0},HANDLER:{height:"22px",width:"7px",background:linb.UI.$bg("handler.gif"," left top",true),cursor:"move","vertical-align":"middle"},GROUP:{"font-size":0,"line-height":0,position:"relative",padding:"2px 4px 0px 2px","vertical-align":"baseline"},ITEM:{"vertical-align":"middle",padding:"1px"},"BTNC a":{padding:0},SPLIT:{$order:1,width:"6px",height:"19px","vertical-align":"middle",background:linb.UI.$bg("split_vertical.gif","repeat-y left top",true)},BTN:{"padding-right":"3px"},BTNI:{"padding-left":"3px"},DROP:{width:"11px",height:"16px","vertical-align":"top",background:linb.UI.$bg("drop.gif","no-repeat left center","Button")},"BTN-mouseover DROP":{$order:2,"background-position":"-16px center"},"BTN-mousedown DROP, BTN-checked DROP":{$order:2,"background-position":"-32px center"},"LABEL, CAPTION":{height:"16px","vertical-align":"middle","margin-left":"2px","margin-right":"2px",cursor:"default","font-size":"12px"},LABEL:{"padding-top":"3px"}},Behaviors:{HoverEffected:{BTN:["BTN"]},ClickEffected:{BTN:["BTN"]},BTN:{onClick:function(C,E,F){if(C.properties.disabled){return }var B=F.parentNode.parentNode.parentNode.id,A=C.getItemByDom(B);if(A.disabled){return }var G=F.id,D=C.getItemByDom(G);if(D.disabled){return }linb(F).focus();if(D.statusButton){linb(F).tagClass("-checked",D.value=!D.value)}C.boxing().onClick(C,D,A,E,F);return false}}},DataModel:{listKey:null,height:{ini:"auto",readonly:true},width:"auto",left:0,top:0,handler:{ini:true,action:function(A){this.getSubNode("HANDLER",true).css("display",A?"":"none")}},position:"absolute",hAlign:{ini:"left",listbox:["left","center","right"],action:function(A){this.getSubNode("ITEMS",true).css("textAlign",A)}},dock:{ini:"top",listbox:["top","bottom"]}},EventHandlers:{onClick:function(A,B,D,C,E){}},_prepareData:function(A){var C=arguments.callee.upper.call(this,A);var B=A.properties;C.mode=B.hAlign=="right"?"text-align:right;":"";return C},_prepareItem:function(B,C,K,H,D,E){var F="display:none",I=function(Q,N,R,M,L,P){var S=N[linb.UI.$tag_subId]=typeof P=="string"?P:("a_"+Q.pickSubId("aitem")),O;if(typeof R=="string"){R={caption:R}}if(false!==L){Q.ItemIdMapSubSerialId[R.id]=S;Q.SubSerialIdMapItem[S]=R}if(O=R.object){O=N.object=O["linb.absBox"]?O.get(0):O;if(O["linb.UIProfile"]){O.properties.position="relative";if(!O.CS.KEY){O.CS.KEY=""}O.CS.KEY="vertical-align:middle;margin-left:4px;"+O.CS.KEY}R.$id=O.$id;O.$item=R;O.$holder=Q;if(!Q.$attached){Q.$attached=[]}Q.$attached.push(O)}else{if(R.type=="split"){R.split=true}linb.UI.adjustData(Q,R,N);N.splitDisplay=N.split?"":F;N.labelDisplay=N.label?"":F;N.captionDisplay=N.caption?"":F;N.dropDisplay=R.dropButton?"":F;N.boxDisplay=(!N.split&&(N.caption||N.image))?"":F}N.itemDisplay=R.visible===false?F:"";R._pid=M};if(H){I(B,C,K,H,D,E)}else{var G=[],A,J=K.sub||[];H=K.id;C.mode2=B.properties.handler?"":F;C.grpDisplay=K.visible===false?F:"";C.sub=G;_.arr.each(J,function(L){A={id:L.id};I(B,A,L,H,D,E);G.push(A)})}}}});Class("linb.UI.Layout",["linb.UI","linb.absList"],{Instance:{getPanel:function(A){return this.get(0).getSubNodeByItemId("PANEL",A)},append:function(B,A){var C=this.get(0);return arguments.callee.upper.call(this,B,A||"main")},fireCmdClickEvent:function(A){this.getSubNodeByItemId("CMD",A).onMousedown();return this}},Static:{Templates:{tagName:"div",style:"{_style}",text:"{items}",$dynamic:{items:{ITEM:{tagName:"div",className:"{cls1} {itemClass}",style:"{size};{itemStyle}",MOVE:{$order:0,tagName:"div",className:"uibg-bar {cls2} ",style:"{display}"},CMD:{$order:1,tagName:"div",style:"{cmdDisplay}",className:"{cls3} "},PANEL:{tagName:"div",className:"uibg-base",style:"position:absolute;left:0;top:0;",text:linb.UI.$childTag}}}}},Appearances:{".setting-linb-layout":{width:"9px"},KEY:{position:"absolute",overflow:"hidden",left:0,top:0,"font-size":linb.browser.ie?0:null,"line-height":linb.browser.ie?0:null},MOVE:{$order:0,position:"absolute","z-index":"10","font-size":linb.browser.ie?0:null,"line-height":linb.browser.ie?0:null},"MOVE-mouseover":{$order:1,"background-color":"#C8E1FA"},CMD:{position:"absolute",cursor:"pointer","z-index":"20","font-size":linb.browser.ie?0:null,"line-height":linb.browser.ie?0:null},ITEM:{position:"absolute","z-index":1,overflow:"hidden","border-width":linb.browser.opr?"0px":null,"font-size":linb.browser.ie?0:null,"line-height":linb.browser.ie?0:null},PANEL:{position:"absolute",overflow:"hidden","border-width":linb.browser.opr?"0px":null,"font-size":linb.browser.ie?0:null,"line-height":linb.browser.ie?0:null},"ITEM-MAIN":{left:0,right:0,top:0,bottom:0},"ITEM-TOP, ITEM-BOTTOM":{left:0,right:0},"ITEM-LEFT, ITEM-RIGHT":{top:0,bottom:0},"MOVE-TOP, MOVE-BOTTOM":{width:"100%",height:"7px",cursor:"n-resize","border-top":"solid 1px #c8e1fa","border-bottom":"solid 1px #648cb4"},"MOVE-LEFT, MOVE-RIGHT":{height:"100%",width:"7px",cursor:"w-resize","border-left":"solid 1px #c8e1fa","border-right":"solid 1px #648cb4"},"MOVE-TOP":{bottom:0},"MOVE-BOTTOM":{top:0},"MOVE-LEFT":{right:0},"MOVE-RIGHT":{left:0},"CMD-TOP, CMD-BOTTOM, CMD-LEFT, CMD-RIGHT":{background:linb.UI.$bg("icons.gif","no-repeat",true)},"CMD-TOP":{$order:1,left:"50%","margin-left":"-20px",bottom:0,width:"40px",height:"9px","background-position":"-360px -232px"},"CMD-BOTTOM":{$order:1,left:"50%","margin-left":"-20px",top:0,width:"40px",height:"9px","background-position":"-360px -258px"},"CMD-LEFT":{$order:1,top:"50%","margin-top":"-20px",right:0,height:"40px",width:"9px","background-position":"-310px -240px"},"CMD-RIGHT":{$order:1,top:"50%","margin-top":"-20px",left:0,height:"40px",width:"9px","background-position":"-336px -240px"},"CMD-TOP-mouseover":{$order:2,"background-position":"-360px -245px"},"CMD-BOTTOM-mouseover":{$order:2,"background-position":"-360px -271px"},"CMD-LEFT-mouseover":{$order:2,"background-position":"-323px -240px"},"CMD-RIGHT-mouseover":{$order:2,"background-position":"-349px -240px"},"MOVE-MAIN":{$order:5,display:"none"},"CMD-MAIN":{$order:5,display:"none"}},Behaviors:{DropableKeys:["PANEL"],HoverEffected:{MOVE:"MOVE",CMD:"CMD"},onSize:function(A,B){var C=A.root;linb.UI.$tryResize(A,B.width?C.width():null,B.height?C.height():null)},MOVE:{onMousedown:function(G,K,A){var C=A.id,L=G.getSubId(C),Q=G.getItemByDom(A);if(Q.hide){return }var H=G.getItemByItemId("main"),E=G.getSubNode("ITEM",L),F=G.getSubNodeByItemId("ITEM","main"),O=linb([A]).css("cursor"),P=G.properties,I,M,J,N,D,B;G.pos=Q.pos;if(P.type=="vertical"){I=G._cur=E.height();J=F.height();if(Q.pos=="before"){D=I-Q.min;B=Q.max?Math.min(parseInt(Q.max)-I,(J-H.min)):(J-H.min)}else{D=Q.max?Math.min(parseInt(Q.max)-I,(J-H.min)):(J-H.min);B=I-Q.min}linb([A]).startDrag(K,{dragType:"copy",targetReposition:false,verticalOnly:true,maxTopOffset:D,maxBottomOffset:B,dragCursor:O})}else{M=G._cur=E.width();N=F.width();if(Q.pos=="before"){D=M-Q.min;B=Q.max?Math.min(parseInt(Q.max)-M,(N-H.min)):(N-H.min)}else{D=Q.max?Math.min(parseInt(Q.max)-M,(N-H.min)):(N-H.min);B=M-Q.min}linb([A]).startDrag(K,{dragType:"copy",targetReposition:false,horizontalOnly:true,maxLeftOffset:D,maxRightOffset:B,dragCursor:O})}G._limited=0},onDrag:function(C,E,G){var B=C.properties,F=linb.DragDrop,D=linb.DragDrop._profile,A=0;if(B.type=="vertical"){if((D.y<=D.restrictedTop)||(D.y>=D.restrictedBottom)){A=true}}else{if(D.x<=D.restrictedLeft||D.x>=D.restrictedRight){A=true}}if(A){if(!C._limited){C._bg=D.proxyNode.css("backgroundColor");D.proxyNode.css("backgroundColor","#ff6600");C._limited=true}}else{if(C._limited){D.proxyNode.css("backgroundColor",C._bg);C._limited=0}}},onDragstop:function(B,E,G){var A=B.properties,F=linb([G]).parent(),D=B.root,C=B.getItemByDom(G);if(A.type=="vertical"){F.height(C.size=B._cur+(B.pos=="before"?1:-1)*linb.DragDrop.getProfile().offset.y);linb.UI.$tryResize(B,null,D.height())}else{F.width(C.size=B._cur+(B.pos=="before"?1:-1)*linb.DragDrop.getProfile().offset.x);linb.UI.$tryResize(B,D.width(),null)}B._limited=0}},CMD:{onMousedown:function(H,K,C){var N=H.properties,D=C.id,O=linb([C]),L=H.getSubId(D),M=H.getItemByDom(C),B=H.root,I=H.getItemByItemId("main"),G=H.getSubNodeByItemId("ITEM","main"),E=H.getSubNode("ITEM",L),A=H.getSubNode("PANEL",L),F=H.getSubNode("MOVE",L),J=linb.UI.$getCSSValue("setting-linb-layout","width");if(N.type=="vertical"){if(M.hide){if(M.size<=G.height()-I.min+J){E.height(M.size);A.show();M.hide=false;if(M.pos=="before"){O.replaceClass(/bottom/g,"top")}else{O.replaceClass(/top/g,"bottom")}if(!M.locked){F.css("cursor","n-resize")}H.getSubNode("MOVE").tagClass("-checked",false)}else{linb.message("no enough space!")}}else{E.height(J);A.hide();M.hide=true;if(M.pos=="before"){O.replaceClass(/top/g,"bottom")}else{O.replaceClass(/bottom/g,"top")}if(!M.locked){F.css("cursor","default")}H.getSubNode("MOVE").tagClass("-checked")}linb.UI.$tryResize(H,null,B.height())}else{if(M.hide){if(M.size<=G.width()-I.min+J){E.width(M.size);A.show();M.hide=false;if(M.pos=="before"){O.replaceClass(/right/g,"left")}else{O.replaceClass(/left/g,"right")}if(!M.locked){F.css("cursor","w-resize")}H.getSubNode("MOVE").tagClass("-checked",false)}else{linb.message("no enough space!")}}else{E.width(J);A.hide();M.hide=true;if(M.pos=="before"){O.replaceClass(/left/g,"right")}else{O.replaceClass(/right/g,"left")}if(!M.locked){F.css("cursor","default")}H.getSubNode("MOVE").tagClass("-checked")}linb.UI.$tryResize(H,B.width(),null)}return false}}},DataModel:{disabled:null,position:"absolute",type:{listbox:["vertical","horizontal"],ini:"vertical",action:function(E,F){if(E!=F){var C=this,H="auto",A=C.getSubNode("ITEM",true),B=C.getSubNode("MOVE",true),G=C.getSubNode("CMD",true);B.merge(A).merge(G);if(E=="vertical"){B.replaceClass(/(-left)(\b)/ig,"-top$2");B.replaceClass(/(-right)(\b)/ig,"-bottom$2");A.each(function(I){linb(I).height(linb(I).width())}).cssRegion({left:0,top:H,right:H,bottom:H})}else{B.replaceClass(/(-top)(\b)/ig,"-left$2");B.replaceClass(/(-bottom)(\b)/ig,"-right$2");A.each(function(I){linb(I).width(linb(I).height())}).cssRegion({left:H,top:0,right:H,bottom:H})}var D=C.root.cssSize();linb.UI.$tryResize(C,D.width,D.height)}}},dock:"fill",listKey:null,width:200,height:200,items:{ini:[],set:function(A){return this.each(function(H){if(H.domNode){var E=H.boxing(),B=linb.Dom.getEmptyDiv(),D=_.copy(H.children),G,F;H.children.length=0;_.arr.each(D,function(I){delete I[0].$dockParent;B.append(I[0].root)});E.clearItems();linb.Dom.__gc();F=H.box._prepareV(H,A);E.insertItems(F);_.arr.each(D,function(I){E.append.apply(E,I)});B.empty();var C=H.root.cssSize();linb.UI.$tryResize(H,C.width,C.height)}else{H.properties.items=_.copy(A)}})}}},_prepareV:function(C,B){var A,D=[],E=[];_.arr.each(B,function(F){if(F.id=="main"){A=F}else{if(F.pos=="before"){D.push(F)}else{F.pos="after";E.push(F)}}});A=A||{};A.id="main";A.min=A.min||10;B.length=0;_.arr.insertAny(B,D,0);_.arr.insertAny(B,A);_.arr.insertAny(B,E);_.arr.each(B,function(F){F.id=_.isStr(F.id)?F.id:C.$id+":"+_.id();F.min=F.min||10;if(F.id!="main"){F.size=parseInt(F.size)||20;F.locked=typeof F.locked=="boolean"?F.locked:false;F.hide=typeof F.hide=="boolean"?F.hide:false;F.cmd=typeof F.cmd=="boolean"?F.cmd:false}});return B},_prepareData:function(A){var B=A.properties;if(!B.items||B.items.constructor!=Array){B.items=_.clone([{id:"before",pos:"before",locked:false,size:60,min:50,max:200},{id:"after",pos:"after",locked:false,size:60,min:50,max:200}])}B.items=this._prepareV(A,B.items);return arguments.callee.upper.call(this,A)},_prepareItem:function(B,C){var A=B.properties;if(C.id=="main"){C.cls1=B.getClass("ITEM","-main");C.cls2=B.getClass("MOVE","-main");C.cls3=B.getClass("CMD","-main");return }if(A.type=="vertical"){C.size="height:"+C.size+"px"}else{C.size="width:"+C.size+"px"}var D;if(A.type=="vertical"){if(C.pos=="before"){D="top"}else{D="bottom"}}else{if(C.pos=="before"){D="left"}else{D="right"}}C.cls1=B.getClass("ITEM","-"+D);C.cls2=B.getClass("MOVE","-"+D);C.cls3=B.getClass("CMD","-"+D);C.display=C.locked?"display:none":"";C.cmdDisplay=C.cmd?"":"display:none"},RenderTrigger:function(){var A,B=this;_.arr.each(B.properties.items,function(C){if(C.id!="main"){if(C.hide&&(A=B.getSubIdByItemId(C.id))){C.hide=false;B.getSubNode("CMD",A).onMousedown()}}})},_onresize:function(G,C,P){var O,Q=G.properties,H,E,L,D,B,N,M=G.keys.ITEM,A=G.keys.PANEL,F=G.getSubNode("MOVE",true),J=linb.UI.$getCSSValue("setting-linb-layout","width");var K={},I={};_.arr.each(Q.items,function(R){L=G.getSubIdByItemId(R.id);K[L]={};I[L]={}});if(Q.type!="vertical"){if(!_.isNull(C)){N=D=B=0;_.arr.each(Q.items,function(R){if(R.id=="main"){return }L=G.getSubIdByItemId(R.id);if(R.pos=="before"){E=G.getSubNode("ITEM",L);if(R.hide){H=I[L].width=J}else{H=E.width()}I[L].left=D;D+=H;I[L].right="auto";K[L].right="auto";K[L].left=0;K[L].width=H-(R.locked?0:J)}});_.arr.each(Q.items,function(R){if(R.id=="main"){return }L=G.getSubIdByItemId(R.id);if(R.pos=="after"){E=G.getSubNode("ITEM",L);if(R.hide){H=I[L].width=J}else{H=E.width()}I[L].right=B;B+=H;I[L].left="auto";K[L].right=0;K[L].left="auto";K[L].width=H-(R.locked?0:J)}},null,true);N=D+B;if(C-N>=0){O=G.getSubIdByItemId("main");K[O].width=C-N;I[O].width=C-N;I[O].left=D}}if(!_.isNull(P)){_.each(K,function(R,S){R.height=P;I[S].height=P})}}else{if(!_.isNull(P)){N=D=B=0;_.arr.each(Q.items,function(R){if(R.id=="main"){return }L=G.getSubIdByItemId(R.id);if(R.pos=="before"){E=G.getSubNode("ITEM",L);if(R.hide){H=I[L].height=J}else{H=E.height()}I[L].top=D;D+=H;I[L].bottom="auto";K[L].top=0;K[L].bottom="auto";K[L].height=H-(R.locked?0:J)}});_.arr.each(Q.items,function(R){if(R.id=="main"){return }L=G.getSubIdByItemId(R.id);if(R.pos=="after"){E=G.getSubNode("ITEM",L);H=E.height();if(R.hide){H=I[L].height=J}else{H=E.height()}I[L].bottom=B;B+=H;I[L].top="auto";K[L].bottom=0;K[L].top="auto";K[L].height=H-(R.locked?0:J)}},null,true);N=D+B;if(P-N>=0){O=G.getSubIdByItemId("main");K[O].height=P-N;I[O].height=P-N;I[O].top=D}}if(!_.isNull(C)){_.each(K,function(R,S){R.width=C;I[S].width=C})}}_.each(I,function(R,S){G.getSubNode("ITEM",S).cssRegion(I[S]);G.getSubNode("PANEL",S).cssRegion(K[S],true)})}}});Class("linb.UI.TreeGrid",["linb.UI","linb.absValue"],{Instance:{_setCtrlValue:function(A){return this.each(function(D){if(!D.domNode){return }if(D.properties.activeMode=="none"){return }var I=D.boxing(),N=I.getUIValue(),B=D.properties,F=B.activeMode=="row"?"CELLS":"CELL",G=function(P,Q){return D.getSubNode(P,Q)},J=function(P){var R=D.rowMap2;if(B.activeMode=="row"){return R[P]}else{if(!P){return }var Q=P.split("|");return _.get(D.rowMap,[R[Q[0]],"_cells",Q[1]])}};if(B.selMode=="single"){var M=J(N);if(N&&M){G(F,M).tagClass("-checked",false)}M=J(A);if(M){G(F,M).tagClass("-checked")}if(M){var C=G(F,M);if(C){var L=C.offsetTop(),K=G("SCROLL"),H=K.scrollHeight(),O=K.scrollTop(),E=K.height();if(H>E){if(L<O||L>O+E){K.scrollTop(L)}}}}}else{if(B.selMode=="multi"){N=N?N.split(";"):[];A=A?A.split(";"):[];_.arr.each(N,function(P){if(_.arr.indexOf(A,P)==-1){G(F,J(P)).tagClass("-checked",false)}});_.arr.each(A,function(P){if(_.arr.indexOf(N,P)==-1){G(F,J(P)).tagClass("-checked")}})}}})},_insertRowsToDom:function(C,F,E,B,H){if(E){var I=C.rowMap[E];if(I&&!I._created){return }}var D,G,G=C.getSubNode("HFCELL").width();_.arr.each(F,function(J){J._row0DfW=G;_.arr.each(J.cells,function(K,L){K.width=K._col.width})});var A=_.str.toDom(C.buildItems("rows",F));if(!B){if(E){D=C.getSubNode("SUB",E)}else{D=C.getSubNode("BODY")}if(H){D.prepend(A)}else{D.append(A)}}else{D=C.getSubNode("ROW",B);if(H){D.addPrev(A)}else{D.addNext(A)}}_.arr.each(F,function(J){J.open=false});delete C.$allrowscache},_refreshHeader:function(F){var C=this.get(0),E=C.properties,D=_.copy(E.rows),A=C.box._prepareHeader(C,F);var B=E.header.length;E.header=F;this.removeAllRows();C.getSubNode("HCELL",true).remove(false);if(A.length){C.getSubNode("HCELLS").append(_.str.toDom(C.buildItems("header",A)))}if(B==F.length&&D.length){this.insertRows(D)}C.box._ajdustBody(C)},_expendRows:function(B){var A=this;if(B&&B.length){_.arr.each(B,function(C){if(C.sub&&C.sub.length&&!C.iniFold&&!C._checked){A.toggleRow(C.id,true)}})}},getRows:function(D){var C=this.get(0).properties.rows;if(D=="data"){return _.clone(C,true)}else{if(D=="min"){var B=_.clone(C,true),A;_.arr.each(B,function(F,E){_.each(A=B[E]=B[E].cells,function(G,H){A[H]=(typeof G=="object"&&"value" in G)?G.value:G})});return B}else{return C}}},toggleRow:function(D,A){var B=this.get(0),C=B.rowMap[B.rowMap2[D]];if(C&&C.sub){B.box._setSub(B,C,typeof A=="boolean"?A:!C._checked)}},getRowbyRowId:function(C){var B=this.get(0),A=B.rowMap2[C];return A?B.rowMap[A]:null},getRowbyCell:function(A){return A._row},updateRow:function(D,J){var G=this,A=G.getRowbyRowId(D),H=A._serialId,I,F;if(!A){return G}if(_.isStr(J)){J={value:J}}else{_.filter(J,true)}J.id=D;if(("group" in J&&J.group!=A.group)||"cells" in J||("sub" in J&&!((!J.sub&&A.sub&&A.sub.length==0)||(J.sub&&J.sub.length==0&&!A.sub)))){var B="__special",E=A._pid,C=G.get(0);A.id=B;C.rowMap2[B]=C.rowMap2[D];delete C.rowMap2[D];A=_.clone(A,true);_.merge(A,J,"all");if("sub" in J&&!J.sub){delete A.sub}G.insertRows([A],E,B,true);G.removeRows([B])}else{if("sub" in J){I=G.getSubNode("FCELLCMD",H);if(J.sub){I.removeClass("uicmd-empty").addClass("uicmd-toggle2")}else{I.removeClass("uicmd-toggle2").addClass("uicmd-empty")}}if(I=J.height){G.getSubNode("CELLS",H).height(I)}if(I=J.rowStyle){(F=G.getSubNode("CELLS",H)).attr("style",F.attr("style")+";"+I)}if(I=J.rowClass){G.getSubNode("CELLS",H).addClass(I)}if(I=J.firstCellStyle){(F=G.getSubNode("FCELL",H)).attr("style",F.attr("style")+";"+I)}if(I=J.firstCellClass){G.getSubNode("FCELL",H).addClass(I)}if("caption" in J){G.getSubNode("FCELLCAPTION",H).get(0).innerHTML=J.caption}if("previewDisplay" in J){I=!!J.previewDisplay;G.getSubNode("PREVIEW",H).css("display",(J.previewDisplay=I)?"block":"none")}if("preview" in J){G.getSubNode("PREVIEW",H).html(J.preview)}if("summaryDisplay" in J){I=!!J.summaryDisplay;G.getSubNode("SUMMARY",H).css("display",(J.summaryDisplay=I)?"block":"none")}if("summary" in J){G.getSubNode("SUMMARY",H).html(J.summary)}if("rowResizer" in J){I=!!J.rowResizer;G.getSubNode("FHANDLER",H).css("display",(J.rowResizer=I)?"block":"none")}_.merge(A,J,"all")}return G},insertRows:function(E,D,A,J){var H=this.constructor,C=this.get(0),K=C.properties,B=C.rowMap2,L;A=B[A];if(A){L=C.rowMap[A];if(L){D=L._pid}}if(!E){E=[[]]}if(E[0]&&typeof E[0]!="object"){E=[E]}var M=H._prepareItems(C,E,D),F,I=C.rowMap;D=B[D];if(!D){F=(K.rows||(K.rows=[]))}else{F=(I[D].sub||(I[D].sub=[]))}if(!A){_.arr.insertAny(F,E,J?0:-1)}else{var G=_.arr.subIndexOf(F,"_serialId",A);_.arr.insertAny(F,E,J?G:(G+1))}if(M.length){this._insertRowsToDom(C,M,D,A,J)}if(!K.iniFold){C.boxing()._expendRows(M)}C.box._asy(C);return this},removeRows:function(F){var D=this,E=D.get(0),G=E.properties,A=E.cellMap,C=[],B;F=_.isArr(F)?F:[F];_.arr.each(F,function(M){if(!(M=E.rowMap2[M])){return }var L;if(L=E.rowMap[M]){var J=L._cells,K=L.id,I;if(L.sub&&_.isArr(L.sub)){var H=[];_.arr.each(L.sub,function(N){H.push(N.id)});D.removeRows(H)}_.each(J,function(O,N){delete A[O]._col._cells[K];delete A[O];E.reclaimSubId(O.slice(2),"cell")});if(I=L._pid?(I=E.rowMap[E.rowMap2[L._pid]])?I.sub:null:E.properties.rows){if(_.isArr(I)){_.filter(I,function(N){return N._serialId!=M})}}delete E.rowMap2[K];delete E.rowMap[M];C.push(E.getSubNode("ROW",M).get(0))}E.reclaimSubId(M.slice(2),"row")});if(B=G.value){if((B=B.split(";")).length>1){_.filter(B,function(H){return _.arr.indexOf(arr,H)==-1});G.value=B.join(";")}else{if(_.arr.indexOf(arr,G.value)!=-1){G.value=null}}}linb(C).remove();E.box._asy(E);return D},removeAllRows:function(){var B=this.get(0);for(var A in B.cellMap){B.reclaimSubId(A.slice(2),"cell")}for(var A in B.rowMap){B.reclaimSubId(A.slice(2),"row")}_.each(B.colMap,function(C){C._cells={}});B.rowMap={};B.cellMap={};B.rowMap2={};B.properties.rows.length=0;if(B.domNode){B.getSubNode("BODY").empty();B.getSubNode("SCROLL").scrollTop(0).scrollLeft(0)}return this},resetRowValue:function(C){var B=this.get(0),D=this.getRowbyRowId(C),A=[];_.each(D.cells,function(E){if(E._$value!==E.value){E._$value=E.value;A.push(B.getSubNode("CELLA",E._serialId).get(0))}});linb(A).removeClass("ui-dirty")},getActiveRow:function(){var A,B=this.get(0);if(B.properties.activeMode!="row"){return }if(!(A=B.$activeRow)){return }return B.rowMap[B.getSubId(A)]},setActiveRow:function(C){var B,D,A=this.get(0);if(A.properties.activeMode!="row"){return }if(!(D=this.getRowbyRowId(C))){return }if(!(B=A.getSubNode("CELLS",D._serialId)).isEmpty()){A.box._activeRow(A,B.get(0).id)}return this},getHeader:function(D){var C=this.get(0).properties.header;if(D=="data"){return _.clone(C,true)}else{if(D=="min"){var B=_.clone(C,true),A;_.arr.each(B,function(F,E){B[E]=F.id});return B}else{return C}}},updateHeader:function(E,B){var D=this,F=D.getHeaderByColId(E),A=F._serialId,C;if(!F){return D}if(_.isStr(B)){B={caption:B}}else{_.filter(B,true)}delete B.id;if(C=B.width){var G=[];G.push(D.getSubNode("HCELL",A).get(0));_.each(F._cells,function(H){G.push(D.getSubNode("CELL",H).get(0))});linb(G).width(C)}if(C=B.headerStyle){(tt=D.getSubNode("HCELL",A)).attr("style",tt.attr("style")+";"+C)}if(C=B.headerClass){D.getSubNode("HCELL",A).addClass(C)}if("caption" in B){D.getSubNode("HCELLCAPTION",A).get(0).innerHTML=B.caption}if("colResizer" in B){C=!!B.colResizer;D.getSubNode("HHANDLER",A).css("display",(B.colResizer=C)?"block":"none")}_.merge(F,B,"all")},getHeaderByColId:function(C){var A=this.get(0).properties.header,B=_.arr.subIndexOf(A,"id",C);return A[B]},getHeaderByCell:function(A){return A._header},showColumn:function(B,A){return this.each(function(F){var H=F.colMap2,G=F.colMap,E,C,D,I=[];if(E=G[C=H[B]]){I.push(F.getSubNode("HCELL",C).get(0));_.each(E._cells,function(J){I.push(F.getSubNode("CELL",J).get(0))});linb(I).css("display",(E.visibility=(A===false?false:true))?"":"none")}F.box._ajdustBody(F)})},getCellbyRowCol:function(D,C){var B=this.get(0),A;A=_.get(B.rowMap,[B.rowMap2[D],"_cells",C]);return A?B.cellMap[A]:null},updateCellByRowCol:function(G,E,C,F){var D,B=this,A=B.constructor;if(D=A._getCellId(B.get(0),G,E)){A._updCell(B.get(0),D,C,F)}return B},updateCell:function(C,B,D){var A=this;A.constructor._updCell(A.get(0),C,B,D);return A},editCellbyRowCol:function(D,C){var B=this.get(0),A=B.box;return A._editCell(B,A._getCellId(B,D,C))},getActiveCell:function(){var A,B=this.get(0);if(B.properties.activeMode!="cell"){return }if(!(A=B.$activeCell)){return }return B.cellMap[B.getSubId(A)]},setActiveCell:function(E,C){var D,A,B=this.get(0);if(B.properties.activeMode!="cell"){return }if(!(A=this.getCellbyRowCol(E,C))){return }if(!(D=B.getSubNode("CELL",A._serialId)).isEmpty()){B.box._activeCell(B,D.get(0).id)}return this},resetGridValue:function(){return this.each(function(A){_.each(A.cellMap,function(B){B._$value=B.value});A.getSubNode("CELLA",true).removeClass("ui-dirty")})},getSubNodeInGrid:function(B,E,D){var C=this,A=(E&&D)?C.getCellbyRowCol(E,D):D?C.getHeaderByColId(D):E?C.getRowbyRowId(E):null;return C.getSubNode(B,(A&&A._serialId)||true)}},Initialize:function(){this.addTemplateKeys(["ALT","PROGRESS"])},Static:{Templates:{tagName:"div",style:"{_style}",BORDER:{tagName:"div",BOX:{tagName:"div",HEADER:{$order:0,tagName:"div",style:"{showHeader}",HI:{tagName:"div",style:"width:10000px;",HCELLS:{tagName:"div",style:"{headerHeight};",HFCELL:{$order:0,style:"{rowHandlerDisplay};width:{_row0DfW}px;",HFCELLA:{HHANDLER:{tagName:"div",style:"{colDDDisplay}"},FHANDLER:{tagName:"div",style:"{rowDDDisplay}"},GRIDCAPTION:{text:"{gridHandlerCaption}"}}},OTHERHCELLS:{$order:1,tagName:"text",text:"{header}"}}}},SCROLL:{$order:1,tagName:"div",className:"uibg-base ",BODY:{tagName:"div",text:"{rows}"}},FOOTER:{$order:2},COLLIST:{tagName:"div"}}},$dynamic:{header:{HCELL:{className:"{headerClass}",style:"width:{width}px;{headerStyle}",HCELLA:{HCELLCAPTION:{text:"{caption}"},SORT:{style:"{sortDisplay}"},HHANDLER:{$order:2,tagName:"div",style:"{colDDDisplay}"}}}},rows:{ROW:{tagName:"div",PREVIEW:{$order:1,tagName:"div",style:"{previewDisplay}",text:"{preview}"},CELLS:{$order:2,tagName:"div",className:"{rowCls} {rowClass}",style:"height:{rowHeight}px;{rowStyle}",FCELL:{$order:0,style:"{rowHandlerDisplay};width:{_row0DfW}px;{firstCellStyle}",className:"{firstCellClass}",FCELLA:{FCELLRULER:{style:"width:{_rulerW}px"},FCELLCMD:{$order:1,className:"{subClass}"},FHANDLER:{tagName:"div",style:"{rowDDDisplay}"},FCELLINN:{$order:2,ROWNUM:{},FCELLCAPTION:{$order:1,text:"{caption}"}}}},OTHERCELLS:{tagName:"text",$order:1,text:"{cells}"}},SUB:{$order:3,tagName:"div"},SUMMARY:{$order:4,tagName:"div",style:"{summaryDisplay}",text:"{summary}"}}},"rows.cells":function(E,D,C,B,A){var F=arguments.callee,G=F._m||(F._m={checkbox:".checkbox",button:".button",progress:".progress"});linb.UI.$doTemplate(E,D,C,B+(G[C.type]||".input"),A)},"rows.cells.input":{CELL:{style:"width:{width}px;{cellDisplay};{cellStyle}",className:"{cellCls} {cellClass}",CELLA:{tagName:"a",style:"{bgcolor};{color};",href:linb.$href,tabindex:"{_tabindex}",text:"{caption}"}}},"rows.cells.button":{CELL:{style:"width:{width}px;{cellDisplay};{cellStyle}",className:"{cellCls} {cellClass}",CELLA:{tagName:"button",tabindex:"{_tabindex}",text:"{caption}"}}},"rows.cells.checkbox":{CELL:{style:"width:{width}px;{cellDisplay};{cellStyle}",className:"{cellCls} {cellClass}",CELLA:{tagName:"a",href:linb.$href,tabindex:"{_tabindex}",CHECKBOX:{className:"{checkboxCls}"}}}},"rows.cells.progress":{CELL:{style:"width:{width}px;{cellDisplay};{cellStyle}",className:"{cellCls} {cellClass}",CELLA:{tagName:"a",href:linb.$href,tabindex:"{_tabindex}",PROGRESS:{tagName:"div",style:"width:{progress};",text:"{caption}"}}}}}},Appearances:{KEY:{display:"block",position:"absolute",overflow:"hidden"},BOX:{display:"block",position:"relative",overflow:"hidden"},HEADER:{background:linb.UI.$bg("head.gif","#CAE3FF repeat-x left top"),position:"relative",overflow:"hidden"},HI:{position:"relative"},SCROLL:{overflow:"auto",position:"relative"},COLLIST:{position:"absolute","z-index":"10",left:0,top:0,cursor:"pointer",visibility:"hidden",background:linb.UI.$bg("collist.gif","#FFF1A0 no-repeat center bottom"),border:"1px solid","border-color":"#fff #ACA899 #ACA899 #fff"},BODY:{overflow:"visible",position:"absolute","background-color":"#fff",left:0,top:"0","font-size":0,"line-height":0,"border-bottom":"1px solid #ACA899"},"SORT, SORT-checked":{width:"16px",height:"16px"},SORT:{background:linb.UI.$bg("icons.gif","no-repeat -110px -220px",true),position:"absolute",right:"2px",bottom:"2px"},"HCELL-mouseover SORT":{$order:1,"background-position":"-110px -240px"},"HCELL-mousedown SORT":{$order:2,"background-position":"-110px -260px"},"SORT-checked":{$order:3,"background-position":"-130px -220px"},"HCELL-mouseover SORT-checked":{$order:4,"background-position":"-130px -240px"},"HCELL-mousedown SORT-checked":{$order:5,"background-position":"-130px -260px"},HHANDLER:{position:"absolute",background:linb.browser.ie?"url("+linb.ini.file_bg+")":null,width:"4px",top:"0",right:"0",height:"100%",cursor:"e-resize","font-size":0,"line-height":0},"HCELLS, CELLS":{"overflow-y":linb.browser.ie?"hidden":"",position:"relative","white-space":"nowrap","font-size":"12px","line-height":"18px"},HCELLS:{"padding-bottom":"2px"},"CELLS-group":{$order:1,"border-right":"1px solid #ACA899"},"CELLS-group FCELL":{"border-right":0,"padding-right":"1px"},"CELLS-group FCELLCAPTION, CELLS-group FCELLA":{"font-weight":"bold",color:"#3764A0",overflow:"visible"},"PREVIEW,SUMMARY":{position:"relative",display:"none","padding-left":"16px","border-right":"1px solid #ACA899"},PREVIEW:{"border-bottom":"1px dashed #ACA899"},SUMMARY:{"border-top":"1px dashed #ACA899"},"CELLS-mouseover":{$order:4,"background-color":"#DFE8F6"},"CELL-disabled":{$order:8,"background-color":"#EBEADB"},"CELL-disabled CELLA":{$order:8,color:"#999"},"CELLS-active, CELL-active":{$order:5,"background-color":"#A3BAE9"},"CELLS-checked, CELL-checked, CELLS-checked CELLA, CELL-checked CELLA":{$order:6,"background-color":"#7199E8",color:"#fff"},"HFCELLA, FCELLA":{"-moz-box-flex":"1","-moz-user-select":"none",display:"block",position:"relative",overflow:"hidden",height:"100%"},FCELLA:{"text-align":"left","padding-left":"4px"},FHANDLER:{position:"absolute",height:"4px",left:"0px",width:"100%",bottom:"0px",cursor:"n-resize","z-index":10,"font-size":0,"line-height":0},"HFCELL, HCELL":{height:"100%","border-left":"1px solid #fff","border-top":"1px solid #fff","border-right":"1px solid #A2BBD9",padding:0,"vertical-align":"top","font-size":"12px","line-height":"14px"},"HCELL-mouseover":{background:linb.UI.$bg("head-mouseover.gif","#FFF1A0 repeat-x left top")},ROW:{position:"relative",zoom:linb.browser.ie?1:null,"border-top":"1px solid #A2BBD9","font-size":0,"line-height":0},ROWNUM:{"padding-right":"6px",color:"#808080"},"FCELL, CELL":{"padding-left":"1px","border-right":"1px solid #A2BBD9",height:"100%",position:"relative",overflow:linb.browser.ie6?"hidden":"","font-size":"12px","line-height":"20px","vertical-align":"top"},ALT:{"background-color":"#EFF8FF"},"CELL-label a":{color:"#000"},"CELL-input":{},"CELL-number":{"text-align":"right"},"CELL-checkbox":{"text-align":"center"},"CELL-button CELLA":{width:"100%"},"CELL-mouseover":{$order:5,"background-color":"#DFE8F6"},HCELLA:{position:"relative"},"HCELLA, CELLA":{display:"block",overflow:"hidden","-moz-box-flex":"1","-moz-user-select":"none",height:"100%",color:"#000",width:linb.browser.ie?"100%":""},"CELLA-inline":{$order:5,display:"inline","-moz-box-flex":0},"HCELLA, HFCELLA":{"text-align":"center"},PROGRESS:{height:"100%","background-color":"#00ffff","text-align":"center",overflow:"visible",opacity:0.7,"*filter":"alpha(opacity=70)"},CHECKBOX:{cursor:"pointer",width:"16px",height:"16px",background:linb.UI.$bg("icons.gif","no-repeat -20px -70px",true)},"CELL-mouseover CHECKBOX":{$order:1,"background-position":"-20px -90px"},"CELL-mousedown CHECKBOX":{$order:2,"background-position":"-20px -110px"},"CHECKBOX-checked":{$order:3,"background-position":"0 -70px"},"CELL-mouseover CHECKBOX-checked":{$order:4,"background-position":"0 -90px"},"CELL-mousedown CHECKBOX-checked":{$order:5,"background-position":"0 -110px"},SUB:{"*zoom":1,height:0,position:"relative",overflow:"hidden","font-size":"1px","line-height":"1px"}},Behaviors:{HoverEffected:{FCELLCMD:"FCELLCMD",HCELL:"HCELL"},ClickEffected:{FCELLCMD:"FCELLCMD",CELL:"CELL",HCELL:"HCELL"},DropableKeys:["SCROLL","CELLS","FCELLCMD"],DragableKeys:["FCELL"],onSize:function(A,B){var C=A.root;linb.UI.$tryResize(A,B.width?C.width():null,C.height?C.height():null)},HFCELLA:{onClick:function(A,B,C){A.getSubNode("COLLIST").onClick(true)}},SCROLL:{onScroll:function(B,C,D){var A=D.scrollLeft||0;if(B.$sl!=A){B.getSubNode("HEADER").get(0).scrollLeft=B.$sl=A}}},HHANDLER:{onMousedown:function(G,I,A){var D=G.properties,E=linb(A),H=E.parent(2).width()-D._minColW,J=G.getSubNode("SCROLL"),C=J.offset().left+J.width()-linb.Event.getPos(I).left-4,B=G.getSubId(A.id),F=G.colMap[B];if(D.disabled){return false}if(F&&F.disabled){return false}E.startDrag(I,{horizontalOnly:true,dragType:"blank",dragDefer:2,maxLeftOffset:H,maxRightOffset:C,targetReposition:false});linb([A.parentNode.parentNode]).onMouseout(true,{$force:true}).onMouseup(true)},onDragbegin:function(A,B,C){linb.DragDrop.getProfile().proxyNode.css({height:A.root.height()+"px",width:"4px",backgroundColor:"#ddd",cursor:"e-resize"})},onDrag:function(B,D,F){var E=linb.DragDrop,C=E.getProfile(),A=0;if(C.x<=C.restrictedLeft||C.x>=C.restrictedRight){A=true}if(A){if(!B._limited){C.proxyNode.css("backgroundColor","#ff6600");B._limited=true}}else{if(B._limited){C.proxyNode.css("backgroundColor","#ddd");B._limited=0}}},onDragstop:function(E,F,A){var C=linb(A).parent(2),H=C.width()+linb.DragDrop.getProfile().offset.x,D=E.colMap[E.getSubId(A.id)];C.width(H);if(D){D.width=H}var B=[],G=[];if(_.str.startWith(A.parentNode.id,E.keys.HFCELLA)){E.box._setRowHanderW(E,H)}else{var I=E.colMap[E.getSubId(A.id)]._cells;_.each(I,function(J){B.push(E.getSubNode(E.keys.CELL,J).id())});linb(B).width(H)}E.getSubNode("SCROLL").onScroll();E.box._ajdustBody(E);E._limited=0},onClick:function(){return false},onDblclick:function(E,H,A){if(E.getKey(A.parentNode.id)==E.keys.HFCELLA){E.box._setRowHanderW(E,true);return }var B=E.properties,C=E.getSubId(A.id),F=E.colMap[C],K=F._cells,L=E.getClass("CELLA","-inline"),D,I=[],G=[],J;_.each(K,function(M){D=E.getSubNode("CELLA",M);if(D._nodes.length){I.push(D.get(0));G.push(D.addClass(L).width())}});G.push(B._minColW);J=parseInt(Math.max.apply(null,G));if(J>B._maxColW){J=B._maxColW}linb(I).parent().width(J);linb(A.parentNode.parentNode).width(F.width=J);linb(I).removeClass(L);E.box._ajdustBody(E);return false}},FHANDLER:{onMousedown:function(D,E,A){var B=D.properties,H=D.rowMap[D.getSubId(A.id)],C=linb(A),I=C.parent(3).height()-B._minRowH,G=D.getSubNode("SCROLL"),F=G.offset().top+G.height()-linb.Event.getPos(E).top-4;if(B.disabled||(H&&H.disabled)){return false}C.startDrag(E,{verticalOnly:true,dragType:"blank",dragDefer:2,maxTopOffset:I,maxBottomOffset:F,targetReposition:false});linb([A.parentNode.parentNode]).onMouseout(true,{$force:true}).onMouseup(true)},onDragbegin:function(A,B,C){linb.DragDrop.getProfile().proxyNode.css({width:A.root.width()+"px",height:"4px",backgroundColor:"#ddd",cursor:"n-resize"})},onDrag:function(B,D,F){var E=linb.DragDrop,C=E.getProfile(),A=0;if(C.y<=C.restrictedTop||C.y>=C.restrictedBottom){A=true}if(A){if(!B._limited){C.proxyNode.css("backgroundColor","#ff6600");B._limited=true}}else{if(B._limited){C.proxyNode.css("backgroundColor","#ddd");B._limited=0}}},onDragstop:function(B,C,F){var E=linb(F).parent(3),A=E.height()+linb.DragDrop.getProfile().offset.y,D=B.rowMap[B.getSubId(F.id)];if(linb.browser.ie&&A%2==1){A+=1}E.height(A);if(_.str.startWith(F.parentNode.id,B.keys.HFCELLA)){B.properties.headerHeight=A;linb.UI.$tryResize(B,null,B.root.height())}else{D.height=A}B._limited=0},onDblclick:function(C,E,G){var D=C.properties,A=C.getSubId(G.id),F,B;if(A){F=C.rowMap[A];B=C.getSubNode("CELLS",A);B.height(F.height=B.height("auto").height())}else{B=C.getSubNode("HCELLS");B.height(C.properties.headerHeight=B.height("auto").height());linb.UI.$tryResize(C,null,C.root.height())}return false},onClick:function(){return false}},FCELLCMD:{onClick:function(A,C,E){var B=A.properties,D=A.rowMap[A.getSubId(E.id)];if(B.disabled||D.disabled){return false}if(!D.sub){return false}A.box._setSub(A,D,!D._checked);return false}},HCELL:{onClick:function(F,I,A){var C=F.properties,B=F.getSubId(A.id),D=F.colMap[B];linb(A).first().focus();if(C.disabled||D.disabled){return false}if(!(("colSortable" in D)?D.colMovable:C.colSortable)){return }var G=D._order||false,L=D.type||"input",M=D.sortby,H=_.arr.indexOf(C.header,D),K=arguments.callee,J=K.fun||(K.fun=function(O,X,Q,P,U,Y){var S,R,W=arguments.callee;if(X){S=X.sub;R=O.getSubNode("SUB",X._serialId).get(0)}else{X={_created:true};S=O.properties.rows;R=O.getSubNode("BODY").get(0)}var j=[],h=[],f=[],T,V;_.arr.each(S,function(c){if(c.sub&&c.sub.length>1){W(O,c,Q,P,U,Y)}j[j.length]=(T=c.cells)?(T=T[Q])?T.value:"":c[Q];h[h.length]=h.length});if(typeof U!="function"){switch(P){case"number":V=function(c){return parseFloat(c)||0};break;case"date":V=function(c){return new Date(c).getTime()||0};break;default:V=function(c){return c||""}}U=function(c,i){c=V(j[c]);i=V(j[i]);return(c>i?1:c==i?0:-1)*(Y?1:-1)}}h.sort(U);var e=X._created,g=_.copy(S),d;if(e){j=R.childNodes}_.arr.each(h,function(k,c){S[c]=g[k];if(e){f[c]=j[k]}});if(e){var N=document.createDocumentFragment();for(var Z=0;T=f[Z];Z++){N.appendChild(T)}R.appendChild(N)}});J(F,"",H,L,M,G);F.getSubNode("SORT",true).css("display","none");var E=F.getSubNode("SORT",D._serialId).css("display","");E.tagClass("-checked",!(D._order=!D._order));F.box._asy(F);delete F.$allrowscache;return false},onMousedown:function(B,D,G){var C=B.properties;if(C.disabled||!C.colMovable){return }var A=B.colMap[B.getSubId(G.id)];if(!(("colMovable" in A)?A.colMovable:1)){return }if(false===B.boxing().beforeColDrag(B,A.id)){return }var H=linb.Event.getPos(D),F=linb(G),E=B.getSubId(G.id);F.startDrag(D,{dragType:"icon",shadowFrom:G,dragCursor:"pointer",targetLeft:H.left+12,targetTop:H.top+12,targetReposition:false,dragDefer:2,dragKey:B.$id+":col",dragData:F.id()})},onDragbegin:function(A,B,C){linb(C).onMouseout(true,{$force:true}).onMouseup(true)},beforeMouseover:function(A,B,C){if(false===A.box._colDragCheck(A,C)){return }linb.DragDrop.setDropElement(C).setDropFace(C,"move")},beforeMouseout:function(A,B,C){linb.DragDrop.setDropElement(null).setDropFace(null,"none");if(false===A.box._colDragCheck(A,C)){return }},onDrop:function(F,K,A){if(false===F.box._colDragCheck(F,A)){return }var D=F.properties,J=linb.DragDrop.getProfile().dragData,I=J&&F.getSubId(J),E=F.getSubId(A.id);var B=F.colMap,H=B[I],C=B[E];if(false===F.boxing().beforeColMoved(F,H.id,C.id)){return }linb.DragDrop.setDropFace(A,"none");var L=_.arr.subIndexOf(D.header,"_serialId",I),G=_.arr.subIndexOf(D.header,"_serialId",E);if(L===G||L===G-1){return }F.getSubNode("HCELL",E).addPrev(linb.DragDrop.getProfile().dragData);_.each(C._cells,function(P,O){F.getSubNode("CELL",P).addPrev(F.getSubNode("CELL",H._cells[O]))});var N=D.header[L];_.arr.removeFrom(D.header,L);_.arr.insertAny(D.header,N,G);var M=F.queryItems(D.rows,true,true);_.arr.each(M,function(O){O=O.cells?O.cells:O;if(!O||O.constructor!=Array){return }N=O[L];_.arr.removeFrom(O,L);_.arr.insertAny(O,N,G)});F.boxing().afterColMoved(F,H.id,C.id);delete F.$allrowscache},onMouseover:function(C,E,G){if(C.properties.disabled||!C.properties.colHidable){return }var A=C.colMap[C.getSubId(G.id)];if(!(("colHidable" in A)?A.colHidable:1)){return }_.resetRun(C.$id+":collist",null);var D={},F=linb([G]),H=F.offset(null,C.getSubNode("BOX")),B=F.cssSize();if(B.width<16){return }D.height=B.height;var A=C.colMap[C.getSubId(G.id)];D.width=14;D.left=H.left;D.top=H.top;C.getSubNode("COLLIST").cssRegion(D).css("visibility","visible")},onMouseout:function(B,C,D){if(B.properties.disabled||!B.properties.colHidable){return }var A=B.colMap[B.getSubId(D.id)];if(!(("colHidable" in A)?A.colHidable:1)){return }_.resetRun(B.$id+":collist",function(){B.getSubNode("COLLIST").css({visibility:"hidden",left:0,top:0})})}},COLLIST:{onMouseover:function(A,B,C){_.resetRun(A.$id+":collist",null)},onMouseout:function(A,B,C){_.resetRun(A.$id+":collist",function(){linb([C]).css("visibility","hidden")})},onClick:function(C,D,E){if(!C.properties.colHidable){return }if(!C.$col_pop){var B=[],A;_.arr.each(C.properties.header,function(F){if(("colHidable" in F)?F.colHidable:1){B.push({id:F.id,caption:F.caption,type:"checkbox",value:true})}});A=C.$col_pop=new linb.UI.PopMenu({hideAfterClick:false,items:B}).render(true);A.onMenuSelected(function(I,G,H){var F=1;_.arr.each(I.properties.items,function(J){if(J.value!==false){return F=false}});if(!F){C.boxing().showColumn(G.id,G.value)}else{I.getSubNodeByItemId("CHECKBOX",G.id).tagClass("-checked");G.value=true}})}C.$col_pop.pop(E)}},CELLS:{afterMouseover:function(A,B,C){if(A.properties.activeMode=="row"){linb([C]).tagClass("-mouseover")}},afterMouseout:function(A,B,C){if(A.properties.activeMode=="row"){linb([C]).tagClass("-mouseover",false)}},onDblclick:function(A,C,E){var B=A.properties,D=A.rowMap[A.getSubId(E.id)];if(B.disabled||D.disabled){return false}if(A.onDblClickRow){A.boxing().onDblClickRow(A,D,C,E)}return false},onClick:function(A){var B=A.properties,C=A.rowMap[A.getSubId(this.id)];if(C.group){A.getSubNode("FCELLCMD",C._serialId).onClick()}}},CELL:{afterMouseover:function(A,B,C){if(A.properties.activeMode=="cell"){linb([C]).tagClass("-mouseover")}},afterMouseout:function(A,B,C){if(A.properties.activeMode=="cell"){linb([C]).tagClass("-mouseover",false)}}},CELLA:{onDblclick:function(C,G,A){var I=C.cellMap[C.getSubId(A.id)];if(!I){return }var F=C.box,E=F.getCellPro,H=E(C,I,"type"),D=E(C,I,"disabled"),B=E(C,I,"editable");if(!D&&(!B||(H=="button"||H=="label"))){C.boxing().onDblClickCell(C,I,G,A)}},onClick:function(F,K,A){var M=F.cellMap[F.getSubId(A.id)];if(!M){return }var D=F.properties,I=F.box,H=I.getCellPro,L=H(F,M,"type"),G=H(F,M,"disabled"),B=H(F,M,"event"),J=D.activeMode,E=H(F,M,"editable"),C;if(!G&&(!E||(L=="button"||L=="label"))){if(typeof B=="function"&&false===B.call(F._host||F,F,M,null,null,K,A)){}else{F.boxing().onClickCell(F,M,K,A)}if(L=="button"){return false}}if(!G&&L=="checkbox"){if(E){I._updCell(F,M,!M.value)}}if(!D.editable){if(J=="cell"){if(H(F,M,"disabled")){return false}C=linb(A).parent().id();I._sel(F,"cell",A,C,K)}else{if(J=="row"){if(D.disabled||M._row.disabled){return false}C=linb(A).parent(2).id();I._sel(F,"row",A,C,K)}}}A.focus();return false},onFocus:function(D,H,A){var C=D.properties,F=D.box,E=F.getCellPro,I=D.cellMap[D.getSubId(A.id)],G=C.activeMode,B;if(E(D,I,"editable")){if(E(D,I,"disabled")){return false}F._editCell(D,I._serialId);_.asyRun(function(){linb([A.parentNode,A.parentNode.parentNode]).onMouseout(true,{$force:true})})}if(!C.editable){if(G=="cell"){B=linb(A).parent().id();F._activeCell(D,B)}else{if(G=="row"){B=linb(A).parent(2).id();F._activeRow(D,B)}}}},onKeydown:function(D,I,A){var Q=linb.Event.getKey(I),O=Q[0],B=Q[2],N=linb(A),F=D.getSubNode("BODY"),E=F.nextFocus(true,true,false),M=F.nextFocus(false,true,false);switch(O){case"tab":if(B){if(A!=E.get(0)){E.focus();return false}}else{if(A!=M.get(0)){M.focus();return false}}break;case"left":if(N.get(0)==E.get(0)){M.focus()}else{N.nextFocus(false)}return false;break;case"right":if(N.get(0)==M.get(0)){E.focus()}else{N.nextFocus()}return false;break;case"up":if(N.get(0)==E.get(0)){M.focus();return }case"down":var H=1,C=D.keys.FCELL,P=N.parent().get(0),J=P.parentNode.childNodes.length;while(P=P.previousSibling){H++}P=N.parent(2).get(0);if(!D.$allrowscache){var K=D.getSubNode("CELLS",true).get();_.filter(K,function(R){return !!R.offsetWidth&&D.getKey(R.lastChild.id)!=C});D.$allrowscache=K}var G=_.arr.indexOf(D.$allrowscache,P),L=D.$allrowscache.length;if(O=="up"){G--;if(G==-1){G=L-1;H--;if(H==0){H=J}}}else{G++;if(G==L){G=0;H++;if(H==J+1){H=1}}}node=linb(D.$allrowscache[G]).first().next(H-1).first();if(!node.isEmpty()){node.focus()}return false;break}}},FCELL:{onClick:function(B,D,F){var C=B.properties,G=this.id,E=B.rowMap[B.getSubId(G)],A=B.box;if(!E.group){if(C.disabled||E.disabled){return false}if(C.activeMode=="row"){A._sel(B,"row",F,G,D)}if(E.cells[0]){linb([F]).next().first().focus()}}}}},DataModel:{directInput:true,listKey:null,selMode:{ini:"none",listbox:["single","none","multi"]},dock:"fill",altRowsBg:{ini:false,action:function(E){var D=this;var C=D.getClass("ALT"),A=D.getSubNode("CELLS",true),F,B;A.removeClass(C);if(E){F=[];B=0;A.each(function(H,G){if(H.offsetHeight){H=linb([H]);if((B++)%2==1){if(!H.hasClass(C)){H.addClass(C)}}else{if(H.hasClass(C)){H.removeClass(C)}}}});linb(F).addClass(C)}}},rowNumbered:{ini:false,action:function(J){var I=this,G=I.CF.getNumberedStr||function(O){return O},C=I.getSubNode("ROWNUM",true),F=0,B=I.rowMap,N,H=0,E=0,D=[],A=[],M="",K,L;if(J){C.each(function(O){if(O.parentNode.offsetHeight){N=B[I.getSubId(O.id)];E=N._layer;if(E>H){D.push(F);A.push(M);M=M+F+".";F=0}else{if(E<H){while(E<H--){F=D.pop();M=A.pop()}}}F++;H=E;K=G(M+F);if(L=O.firstChild){if(L.nodeValue!=K){L.nodeValue=K}}else{O.appendChild(document.createTextNode(K))}}})}else{C.text("")}}},editable:false,$subMargin:16,iniFold:true,animCollapse:false,position:"absolute",width:300,height:200,_minColW:5,_maxColW:300,_minRowH:20,gridHandlerCaption:{ini:"",action:function(A){this.getSubNode("GRIDCAPTION").get(0).innerHTML=A}},rowHandlerWidth:{ini:100,set:function(A){return this.each(function(B){if(B.domNode){B.box._setRowHanderW(B,A)}else{B.rowHandlerWidth=A}})}},showHeader:{ini:true,action:function(A){this.getSubNode("HEADER").css("display",A?"":"none")}},headerHeight:{ini:18,action:function(A){this.getSubNode("HCELLS").height(A);linb.UI.$tryResize(this,this.root.width(),this.root.height())}},rowHeight:{ini:20,action:function(A){this.getSubNode("CELLS",true).height(A)}},_colDfWidth:80,rowHandler:{ini:true,action:function(A){this.getSubNode("HFCELL").css("display",A?"":"none");this.getSubNode("FCELL",true).css("display",A?"":"none");this.box._ajdustBody(this)}},rowResizer:{ini:true,action:function(A){this.getSubNode("FHANDLER",true).css("display",A?"":"none")}},colHidable:false,colResizer:{ini:true,action:function(A){this.getSubNode("HHANDLER",true).css("display",A?"":"none")}},colSortable:{ini:true,action:function(A){if(!A){this.getSubNode("SORT",true).css("display","none")}}},colMovable:false,header:{ini:{},set:function(A){return this.each(function(B){if(B.domNode){B.boxing()._refreshHeader(A)}else{B.properties.header=A}})}},rows:{ini:{},set:function(A){return this.each(function(B){if(B.domNode){B.boxing().removeAllRows().insertRows(A)}else{B.properties.rows=A}})}},activeMode:{ini:"row",listbox:["row","cell","none"],action:function(B){var A=this;if(B!="cell"&&A.$activeCell){linb(A.$activeCell).tagClass("-active",false);delete A.$activeCell}if(B!="row"&&A.$activeRow){linb(A.$activeRow).tagClass("-active",false);delete A.$activeRow}}}},EventHandlers:{onGetContent:function(A,B,C){},onRowSelected:function(A,C,B){},beforeColDrag:function(A,B){},beforeColMoved:function(B,C,A){},afterColMoved:function(B,C,A){},beforeRowActive:function(A,B){},afterRowActive:function(A,B){},beforeCellActive:function(B,A){},afterCellActive:function(B,A){},beforeIniEditor:function(B,A){},beforeCellUpdated:function(C,A,B){},afterCellUpdated:function(C,A,B){},onDblClickRow:function(A,D,B,C){},beoforeComboPop:function(C,B,A,F,D,E){},onClickCell:function(B,A,C,D){},onDblClickCell:function(B,A,C,D){}},RenderTrigger:function(){var B=this,C=B.properties,A=B.boxing();B.$cache_editor={};if(!C.iniFold){A._expendRows(C.rows)}B.box._asy(B);B.box._ajdustBody(B)},_asy:function(B){var C=B.properties,A=B.boxing(),D=B.$id;if(C.altRowsBg){_.resetRun(D+"1",function(){A.setAltRowsBg(true,true)})}if(C.rowNumbered){_.resetRun(D+"2",function(){A.setRowNumbered(true,true)})}},_setRowHanderW:function(C,F){var I=C.properties,D=I.$subMargin,A=C.rowMap,G=C.getSubNode("HFCELL"),B,H;if(typeof F=="number"){H=F}else{if(F===true){var E=[],J;C.getSubNode("FCELLINN",true).each(function(K){if((J=K.parentNode).parentNode.offsetWidth>0&&linb.Dom.getStyle(J,"overflow")!="visible"){if(B=A[C.getSubId(K.id)]){E.push(linb([K]).width()+B._layer*D)}}});E.push(I._minColW);H=parseInt(Math.max.apply(null,E))+D*2}else{H=G.width()}}if(H){if(H<I._minColW){H=I._minColW}if(I.rowHandlerWidth!=H){G.width(I.rowHandlerWidth=H);C.getSubNode("FCELL",true).width(H);C.getSubNode("FCELLRULER",true).each(function(K){B=A[C.getSubId(K.id)];K.style.width=B._layer*D+"px"});C.box._ajdustBody(C)}}},_onStartDrag:function(A,B,C){var D=linb.Event.getPos(B);A.$_ond=C.parentNode;linb([C]).startDrag(B,{dragType:"icon",shadowFrom:C.parentNode,targetLeft:D.left+12,targetTop:D.top+12,dragCursor:"pointer",dragDefer:2,dragKey:A.box.getDragKey(A,C),dragData:A.box.getDragData(A,B,C)});return false},_onDropTest:function(B,G,A,J,F,L){var C=F&&F.domId,E=A.id,H=F&&F.profile,K;if(E){var D=B.getKey(E),I=B.keys,M=B.rowMap[B.getSubId(E)];if(D==I.FCELLCMD&&!M.sub){return false}}if(H&&H.$id==B.$id){if(C&&B.getSubId(C)==B.getSubId(E)){return false}K=B.$_ond;if(_.get(A,["parentNode","previousSibling"])==K){return false}do{if(A==K){return false}}while(A&&(A=A.parentNode)&&A!==document&&A!==window)}},_onDragstop:function(B,E,F,A,D,C){delete B.$_ond},_onDrop:function(E,I,C,L,H,N){linb.DragDrop.setDragIcon("none");if(!H.profile||!H.profile[E.KEY]){return }var G=E.getKey(C.id),D=H.profile,B=H.domId,F,K=E.keys,M=linb.absObj.$specialChars,J=E.boxing(),A=D.rowMap[D.getSubId(B)],O=E.rowMap[E.getSubId(C.id)];A=_.clone(A,function(Q,P){return !M[(P+"").charAt(0)]});D.boxing().removeRows([A.id]);if(G==K.SCROLL){J.insertRows([A],null,null,false)}else{if((G==K.FCELLCMD)&&O.sub){J.insertRows([A],O.id,null,false)}else{if(G==K.CELLS){J.insertRows([A],O._pid,O.id,true)}}}return false},_beforeSerialized:function(C){var E=arguments.callee.upper.call(this,C),A=C.properties,D=linb.absObj.$specialChars,B;E.properties.header=_.clone(A.header,function(G,F){return !D[(F+"").charAt(0)]});E.properties.rows=_.clone(A.rows,function(G,F){return !D[(F+"").charAt(0)]});if(E.properties.header.length===0){delete E.properties.header}if(E.properties.rows.length===0){delete E.properties.rows}return E},_clsCache:{},_colDragCheck:function(D,F){var A=linb.DragDrop.getProfile(),C=A.dragKey,E=A.dragData,B=D.colMap[D.getSubId(F.id)];if(!(("colMovable" in B)?B.colMovable:1)){return false}if(!C||!E||C!=(D.$id+":col")){return false}if(E==F.id||E==F.previousSibling.id){return false}},_prepareData:function(A){var B=arguments.callee.upper.call(this,A),D="display:none";A.rowMap2={};A.rowMap={};A.cellMap={};var C=A.properties;B.showHeader=C.showHeader?"":D;B.colDDDisplay=C.colResizer?"":D;B.rowDDDisplay=C.rowResizer?"":D;B.rowHandlerDisplay=C.rowHandler?"":D;B.headerHeight=B.headerHeight?("height:"+B.headerHeight+"px;"):"";if(C.header&&C.header.constructor!=Array){C.header=[]}if(C.rows&&C.rows.constructor!=Array){C.rows=[]}B.header=this._prepareHeader(A,C.header);B._row0DfW=B.rowHandlerWidth;arguments.callee.upper.call(this,A);B.rows=this._prepareItems(A,C.rows);return B},_prepareHeader:function(B,D){var G=B.colMap2={},F=B.colMap={},A=linb.UI.$tag_subId,H=B.properties,C=[],I,J,E="display:none";_.arr.each(D,function(L,K){I="h_"+B.pickSubId("header");if(typeof L=="string"){L=D[K]={id:L}}if(typeof L.id!="string"){L.id=L.caption||(_()+"")}L._cells={};L[A]=I;F[I]=L;L.width=L.width||H._colDfWidth;J={sortDisplay:E,rowHandlerDisplay:H.rowHandler?"":E};J[A]=I;J._tabindex=H.tabindex;J.colDDDisplay=(("colResizer" in L)?L.colResizer:H.colResizer)?"":"display:none";if(!L.type){L.type="label"}if(!L.caption){L.caption=L.id}linb.UI.adjustData(B,L,J);G[L.id]=I;C.push(J)});return C},_renderCell:function(C,A,J){var O=C.box.getCellPro,L=J["linb.Dom"],Q=L?A:J,D=O(C,A,"type"),F="",E="",M,K=(!L)&&J.caption,N=/</g,P=arguments.callee,R=P._dcls||(P._dcls=C.getClass("CELL","-disabled")),B=P._ren||(P._ren=function(V,T,S,U){return typeof T.$caption=="string"?T.$caption:typeof S.caption=="string"?S.caption:typeof T.renderer=="function"?T.renderer(T):typeof U=="function"?U(T.value):String(T.value)||""}),I=P._f1=(P._f1=function(S){return linb.Date.getText(new Date(parseInt(S)),"ymd")}),H=P._f2=(P._f2=function(S){return(S.split("\n")[0]||"").replace(/ /g,"&nbsp;").replace(N,"&lt;")}),G=P._f3=(P._f3=function(S){return S*1000/10+"%"});switch(D){case"number":A.value=parseFloat(A.value)||0;M=K||B(C,A,Q);if(L){J.html(M||A.value,false)}break;case"datepicker":A.value=(parseInt(A.value)?new Date(parseInt(A.value)):new Date()).getTime();M=K||B(C,A,Q,I);if(L){J.html(M,false)}break;case"textarea":A.value=A.value||"";M=K||B(C,A,Q,H);if(L){J.html(M,false)}break;case"colorpicker":A.value="#"+linb.UI.ColorPicker._ensureValue(0,A.value);M=K||B(C,A,Q);F=linb.UI.ColorPicker.getTextColor(A.value);if(L){J.html(M,false);J.css("color",F).css("backgroundColor",A.value)}else{J.color="color:"+F+";";J.bgcolor="background-color:"+A.value+";"}break;case"checkbox":A.value=!!A.value;M=A.value+"";if(L){J.first().tagClass("-checked",A.value)}else{J.checkboxCls=C.getClass("CHECKBOX",A.value?"-checked":"")}break;case"progress":A.value=parseFloat(A.value)||0;A.value=Math.min(Math.max(A.value,0),1);M=K||B(C,A,Q,G);if(L){J.first().html(M,false).width(M)}else{J.progress=M}break;default:A.value=A.value||"";M=K||B(C,A,Q);if(L){J.html(M||A.value,false)}}A._$tips=M;var E=O(C,A,"disabled");if(!L){J.cellCls=C.getClass("CELL","-"+D)+(E?(" "+R):"");J.type=D;J.value=A.value;J.caption=M;J.cellStyle=O(C,A,"cellStyle");J.cellClass=O(C,A,"cellClass")}else{if(E){J.addClass(R)}else{J.removeClass(R)}}},_prepareItems:function(B,A,L){var M=this,G=B.properties,Q=G.$subMargin,W=B.rowMap2,U=B.rowMap,T=B.cellMap,K=L?U[W[L]]?(U[W[L]]._layer+1):0:0,D=linb.UI.$tag_subId,X=arguments.callee,V=X._id||(X._id=new _.id()),H=[],S,C,J,E,R,O,I,F="display:none";for(var P=0,N=A.length;P<N;P++){S="r_"+B.pickSubId("row");if(_.isArr(A[P])){A[P]={cells:A[P]}}if(!A[P].id||W[A[P].id]){while(W[J=V.next()]){}A[P].id=J}E=A[P];E._pid=L;E._cells={};E._layer=K;E[D]=S;E._tabindex=G.tabindex;U[S]=E;J={id:E.id};if(E.group){J.rowCls=B.getClass("CELLS","-group")}if(E.summary){J.summaryDisplay="display:block;"}if(E.preview){J.previewDisplay="display:block;"}J._row0DfW=G.rowHandlerWidth;J._rulerW=K*Q;J.rowHeight=E.height||G.rowHeight;J.rowHandlerDisplay=G.rowHandler?"":F;J.rowDDDisplay=(("rowResizer" in E)?E.rowResizer:G.rowResizer)?"":F;C=J.cells=[];J[D]=S;J.subClass=E.sub?"uicmd-toggle2":"uicmd-empty";W[E.id]=S;if(E.group){E.cells=null}if(!"caption" in E){E.caption=""+(E.value||E.id)}if(E.caption&&!E.tips){E._$tips=E.caption}if(I=E.cells){_.arr.each(G.header,function(Y,Z){R=I[Z]||(I[Z]={});var c={};if(typeof R=="object"&&R.constructor==Object){}else{R=I[Z]={value:R};c.value=R}R._row=E;R._col=Y;R[D]="c_"+B.pickSubId("cell");M._adjustCell(B,R,c);C.push(c);T[c[D]]=R;E._cells[Y.id]=c[D];Y._cells[E.id]=c[D]})}linb.UI.adjustData(B,E,J);H.push(J)}return H},_adjustCell:function(D,A,G){var B=this,F=D.properties,C=A._col,E;if(E=B.getCellPro(D,A,"cellRenderer")){A.renderer=E}linb.UI.adjustData(D,A,G);A._$value=A.value;if(!G.width){G.width=C.width}G._tabindex=F.tabindex;G.cellDisplay=C.visibility===false?"display:none;":"";B._renderCell(D,A,G)},_setSub:function(E,N,J){var C=E.domId,K=E.properties,F=E.rowMap2[N.id],G=E.getSubNode("FCELLCMD",F),I=E.getSubNode("SUB",F);if(linb.Thread.isAlive(E.key+E.id)){return }if(N._checked){if(!J){var H=I.height();if(K.animCollapse){I.animate({height:[H,0]},null,null,100,5,"expoIn",E.key+E.id).start()}else{I.height(0)}G.tagClass("-checked",false);N._checked=false;E.box._asy(E)}}else{if(J){var D=function(R,W,P,S,U,O){var V=R.boxing(),Q=R.properties;if(!W._created){delete W.sub;W._created=true;if(typeof O=="string"){U.html(W.sub=O,false)}else{if(_.isArr(O)){V.insertRows(O,W.id)}else{if(O["linb.Template"]||O["linb.UI"]){U.append(W.sub=O.render(true))}}}V._setCtrlValue(V.getUIValue(),true)}var T=U.height(true);if(Q.animCollapse){U.animate({height:[0,T]},null,function(){U.css({height:"auto"})},100,5,"expoOut",R.key+R.id).start()}else{U.css({height:"auto"})}S.tagClass("-checked");W._checked=true;R.box._asy(R)};var B=N.sub,L=function(O){D(E,N,C,G,I,O)},M;if((M=typeof B)=="string"||M=="object"){L(B)}else{if(E.onGetContent){var A=E.boxing().onGetContent(E,N,L);if(A){L(A)}}}}}delete E.$allrowscache},_getCellId:function(A,C,B){return _.get(A.rowMap,[A.rowMap2[C],"_cells",B])},_updCell:function(C,A,I,H){var D=C.box,F=linb.absObj.$specialChars,G,B;if(typeof A=="string"){G=C.cellMap[A]}else{G=A;A=G._serialId}if(!G){return }if(!_.isObj(I)){I={value:I}}I=_.filter(I,function(K,J){return !F[J.charAt(0)]||J=="$caption"});if(false===C.boxing().beforeCellUpdated(C,G,I)){return }delete G.caption;if(G.caption!==undefined){I.caption=I.caption;delete I.caption}_.merge(G,I,"all");B=C.getSubNode("CELLA",A);if("type" in I){var E={};D._adjustCell(C,G,E);B.parent().replace(_.str.toDom(C.buildItems("rows.cells",[E])))}else{D._renderCell(C,G,B)}C.boxing().afterCellUpdated(C,G,I);if("value" in I){if(H===false){G._$value=G.value}else{if(G.value===G._$value){B.removeClass("ui-dirty")}else{B.addClass("ui-dirty")}}}},_ensureValue:function(B,C){if(B.properties.selMode=="multi"){var A=(C||"").split(";");A.sort();return A.join(";")}else{return C}},_sel:function(C,D,F,N,S){var G=C.properties;if(G.activeMode!=D){return }var B=C.getSubId(N),T=D=="cell"?C.cellMap:C.rowMap,J=C.boxing(),I=T[B],V=linb.Event.getKey(S),E=D=="cell"?(I._row.id+"|"+I._col.id):I.id,L=G.selMode,H,K;switch(L){case"none":H=J.onRowSelected(C,I,F);break;case"multi":var P=J.getUIValue(),A=P?P.split(";"):[];if(A.length&&(V[1]||V[2])){K=false;if(V[2]&&D=="row"){if(C.$firstV._pid!=I._pid){return false}var M=G.rows;if(I._pid){var U=T[I._pid];if(U){M=U.sub}}var Q=_.arr.subIndexOf(M,"id",C.$firstV.id),O=_.arr.subIndexOf(M,"id",I.id),R;A.length=0;for(R=Math.min(Q,O);R<=Math.max(Q,O);R++){A.push(M[R].id)}}else{if(_.arr.indexOf(A,E)!=-1){_.arr.removeValue(A,E)}else{A.push(E)}}A.sort();P=A.join(";");if(J.getUIValue()==P){H=false}else{J.setUIValue(P);if(J.getUIValue()==P){H=J.onRowSelected(C,I,F)}}break}case"single":if(J.getUIValue()==E){H=false}else{C.$firstV=I;J.setUIValue(E);if(J.getUIValue()==E){H=J.onRowSelected(C,I,F)||K}}break}return H},_activeCell:function(C,E){if(C.properties.activeMode!="cell"){return }var B=C.getSubId(E),D=C.cellMap,A=D[B];if(C.beforeCellActive&&(false===C.boxing().beforeCellActive(C,A))){return }if(C.$activeCell){linb(C.$activeCell).tagClass("-active",false)}linb(C.$activeCell=E).tagClass("-active");C.boxing().afterCellActive(C,A)},_activeRow:function(C,E){if(C.properties.activeMode!="row"){return }var A=C.getSubId(E),D=C.rowMap,B=D[A];if(C.beforeRowActive&&(false===C.boxing().beforeRowActive(C,B))){return }if(C.$activeRow){linb(C.$activeRow).tagClass("-active",false)}linb(C.$activeRow=E).tagClass("-active");C.boxing().afterRowActive(C,B)},getCellPro:function(D,A,C){var B=A;return(C in B)?B[C]:((B=A._row)&&(C in B))?B[C]:((B=A._col)&&(C in B))?B[C]:((B=D.properties)&&(C in B))?B[C]:null},_editCell:function(E,C){var L=typeof C=="string"?E.cellMap[C]:C,I=E.box,H=I.getCellPro,K,F,J;if(!L){return }if(E.beforeIniEditor&&false===E.boxing().beforeIniEditor(E,L)){return }if(J=E.$curEditor){J.getRoot().setBlurTrigger(E.$id);if(J){_.tryF(J.undo)}E.$curEditor=null}K=H(E,L,"type");F=E.getSubNode("CELL",C);if(K=="checkbox"){F.first().focus();return }else{if(K=="button"||K=="label"){return }}var B=this,D=E.getSubNode("SCROLL"),A=F.offset(null,D),O=F.cssSize(),G=H(E,L,"editorFormat"),M=H(E,L,"editorReadonly"),N;if(E.$cache_editor[K]){J=E.$cache_editor[K]}else{J=new linb.UI.ComboInput({left:-1000,top:-1000,position:"absolute",visibility:"hidden",zIndex:100});switch(K){case"number":J.setType("none").setCustomStyle("INPUT","text-align:right;");break;case"progress":J.setType("none").setValueFormat("^(0([\\.]\\d*[0-9]+)|0|1)$").setCustomStyle("INPUT","text-align:right;");break;case"input":J.setType("none");break;case"textarea":J.setType("none").setMultiLines(true).setSaveBtn(true).onSave(function(P){P.boxing().hide()});_.tryF(J.setResizer,[true],J);break;case"listbox":case"combobox":case"helpinput":case"timepicker":case"datepicker":case"colorpicker":case"getter":case"popbox":case"cmdbox":J.setType(K).beoforeComboPop(function(T,U,R,S){var P=T.$cell,Q=H(E,P,"event");if(H(E,P,"disabled")){return false}if(typeof Q=="function"){return Q.call(E._host||E,E,P,T,U,R,S)}else{return E.boxing().beoforeComboPop(E,P,T,U,R,S)}});break}D.append(J);E.$cache_editor[K]=J}E.$curEditor=J;J.get(0).$cell=L;switch(K){case"listbox":case"combobox":case"helpinput":if(N=H(E,L,"editorListKey")){J.setListKey(N)}else{if(N=H(E,L,"editorListItems")){J.setItems(N)}}break}J.setValue(L.$editorValue||L.value,true);delete L.$editorValue;if(L.$tag){if(J.setCaption){J.setCaption(L.$tag)}else{if(J.setValue){J.setValue(L.$tag)}}}if(J.setReadonly){J.setReadonly(!!M)}if(G){if(typeof G=="function"){if(J.beforeFormatCheck){J.beforeFormatCheck(G)}}else{if(J.setValueFormat){J.setValueFormat(G)}}}J.undo=function(){if(!J){return }if(!E.properties.directInput){J.afterUIValueSet(null).beforeNextFocus(null);if(J.beforeFormatCheck){J.beforeFormatCheck(null)}if(J.setValueFormat){J.setValueFormat("")}J.setValue("",true)}J.reBoxing().hide();J=null};J.afterUIValueSet(function(R,Q,P){if(H(E,L,"type")=="number"){P=parseFloat(P)}B._updCell(E,C,{value:P,$caption:R.$caption})}).beforeNextFocus(function(T,Q,P,S){if(J){J.undo();var R=linb.Event.getEventPara(S);if(R.keyCode=="enter"){R.keyCode="down"}E.getSubNode("CELLA",L._serialId).onKeydown(true,R)}return false});J.getRoot().setBlurTrigger(E.$id,function(){if(J){J.undo()}return false});if(K=="textarea"){J.setWidth(Math.max(200,O.width+3)).setHeight(Math.max(100,O.height+2)).reLayout(true,true).reBoxing().popToTop(F,4,D)}else{J.setWidth(O.width+3).setHeight(O.height+2).reLayout(true,true);J.reBoxing().show((A.left-1)+"px",(A.top-1)+"px")}_.asyRun(function(){_.tryF(J&&J.activate,[],J)})},_ajdustBody:function(A){_.resetRun(A.$id+"4",function(){var B=A.getSubNode("BODY"),C,D=A.keys;last=A.properties.showHeader?A.getSubNode("HCELLS").last().get(0):B.nextFocus(false,true,false).get(0);if(last.id&&(C=A.getKey(last.id))&&(C==D.HCELL||(C==D.CELLA&&(last=last.parentNode)))){B.width(B.get(0).offsetHeight?last.offsetWidth+last.offsetLeft:0)}})},_showTips:function(D,C,F){if(D.onShowTips){return D.boxing().onShowTips(D,C,F)}if(!linb.Tips){return }var G=D.keys,I,H=G.HCELL+":",B,A,E;if(D.properties.disabled){return }A=C.id;E=C.parentNode.id;B=D.getSubId(A);if(A.indexOf(G.FCELL)==0||E.indexOf(G.FCELL)==0){I=D.rowMap[B]}else{if(A.indexOf(G.HCELL)==0||E.indexOf(G.HCELL)==0){I=D.colMap[B]}else{if(A.indexOf(G.CELL)==0||E.indexOf(G.CELL)==0){I=D.cellMap[B]}}}if(I){linb.Tips.show(F,("tips" in I)?I.tips:(I._$tips||I.caption))}else{linb.Tips.hide()}return true},_onresize:function(E,D,A){E.getSubNode("BORDER").cssSize({width:D,height:A});var F=E.getSubNode("HEADER"),C=E.getSubNode("SCROLL"),B=0;E.getSubNode("BOX").cssSize({width:D,height:A});if(D){F.width(D)}if(A){B=F.offsetHeight()}C.cssSize({width:D,height:A?(A-B):null});_.asyRun(function(){C.onScroll()})}}});Class("linb.UI.Slider",["linb.UI","linb.absValue"],{Instance:{_setCtrlValue:function(A){return this.each(function(G){var I=G.properties,F=I.steps,E=function(J){return G.getSubNode(J)},D=E("IND1"),C=E("IND2"),B=G.box._v2a(G,A),H=I.type=="vertical"?"top":"left";D[H](B[0]+"%");if(I.isRange){C[H](B[1]+"%")}})},_setDirtyMark:function(){return this.each(function(D){if(!D.properties.dirtyMark){return }if(!D.domNode){return }var C=D.properties,B=C.value!==C.$UIvalue;if(D._dirtyFlag==B){return }D._dirtyFlag=B;var E=D.getSubNode("BOX"),A=linb.UI.$css_tag_dirty;if(D.beforeDirtyMark&&false===D.boxing().beforeDirtyMark(D,B)){return }if(B){E.addClass(A)}else{E.removeClass(A)}})}},Static:{Templates:{style:"{_style}",BOX:{tagName:"div",className:"{_cls}",BG:{tagName:"div"},RULER:{$order:1,tagName:"div",RULERLEFT:{},RULERRIGHT:{}},IND:{$order:2,IND1:{tagName:"a",style:"{_showD}",href:linb.$href,tabindex:"{tabIndex}"},IND2:{tagName:"a",href:linb.$href,tabindex:"{tabIndex}",style:"{_showD2}"}},DECREASE:{tagName:"a",style:"{_showDes}",href:linb.$href,tabindex:"{tabIndex}"},INCREASE:{tagName:"a",style:"{_showIns}",href:linb.$href,tabindex:"{tabIndex}"}}},Appearances:{"IND, BT, RULER, RULERLEFT, RULERRIGHT, IND1, IND2, DECREASE, INCREASE":{"font-size":0,"line-height":0,position:"absolute"},BOX:{position:"relative",left:0,top:0,width:"100%",height:"100%"},"BOX-h DECREASE, BOX-h INCREASE":{top:"50%",width:"17px",height:"17px","margin-top":"-8px"},"BOX-v DECREASE, BOX-v INCREASE, BOX-h DECREASE, BOX-h INCREASE, BOX-h IND1,BOX-h IND2, BOX-v IND1,BOX-v IND2":{background:linb.UI.$bg("icons.gif","no-repeat",true)},"BOX-h DECREASE":{$order:1,left:0,"background-position":"-80px -70px"},"BOX-h INCREASE":{$order:1,right:0,"background-position":"-100px -70px"},"BOX-h DECREASE-mouseover":{$order:2,"background-position":"-80px -90px"},"BOX-h DECREASE-mousedown":{$order:3,"background-position":"-80px -110px"},"BOX-h INCREASE-mouseover":{$order:2,"background-position":"-100px -90px"},"BOX-h INCREASE-mousedown":{$order:3,"background-position":"-100px -110px"},"BOX-h BG":{top:"50%"},"BOX-h IND, BOX-h RULER":{"z-index":1,top:"50%",height:"6px","margin-top":"-3px"},"BOX-h RULER, BOX-h RULERLEFT, BOX-h RULERRIGHT":{background:linb.UI.$bg("bar_vertical.gif","repeat-x",true)},"BOX-h RULER":{$order:2,"background-position":"left -482px"},"BOX-h RULERLEFT, BOX-h RULERRIGHT":{"z-index":1,height:"6px",width:"5px"},"BOX-h RULERLEFT":{$order:2,"background-position":"left -474px",left:"-4px",top:0},"BOX-h RULERRIGHT":{$order:2,"background-position":"left -490px",right:"-4px",top:0},"BOX-h IND1,BOX-h IND2":{$order:1,"z-index":2,"background-position":"-21px -282px",height:"18px",width:"8px",left:0,top:0,"margin-top":"-6px"},"BOX-h IND1-mouseover,BOX-h IND2-mouseover":{$order:2,"background-position":"-31px -282px"},"BOX-h IND1-mousedown,BOX-h IND2-mousedown":{$order:3,"background-position":"-41px -282px"},"BOX-v DECREASE, BOX-v INCREASE":{$order:10,left:"50%",width:"17px",height:"17px","margin-left":"-8px"},"BOX-v DECREASE":{$order:10,top:0,"background-position":"-120px -70px"},"BOX-v INCREASE":{$order:10,bottom:0,"background-position":"-140px -70px"},"BOX-v DECREASE-mouseover":{$order:11,"background-position":"-120px -90px"},"BOX-v DECREASE-mousedown":{$order:12,"background-position":"-120px -110px"},"BOX-v INCREASE-mouseover":{$order:11,"background-position":"-140px -90px"},"BOX-v INCREASE-mousedown":{$order:12,"background-position":"-140px -110px"},"BOX-v BG":{$order:10,left:"50%"},"BOX-v IND, BOX-v RULER":{$order:10,"z-index":1,left:"50%",width:"6px","margin-left":"-3px"},"BOX-v RULER, BOX-v RULERLEFT, BOX-v RULERRIGHT":{background:linb.UI.$bg("bar_horizontal.gif","repeat-y",true)},"BOX-v RULER":{$order:10,"background-position":"-482px top"},"BOX-v RULERLEFT, BOX-v RULERRIGHT":{$order:10,"z-index":1,width:"6px",height:"5px"},"BOX-v RULERLEFT":{$order:12,"background-position":"-490px top",top:"-4px",left:0},"BOX-v RULERRIGHT":{$order:12,"background-position":"-474px top",bottom:"-4px",left:0},"BOX-v IND1,BOX-v IND2":{$order:10,"z-index":2,"background-position":"left -272px",width:"18px",height:"8px",left:0,top:0,"margin-left":"-6px"},"BOX-v IND1-mouseover,BOX-v IND2-mouseover":{$order:11,"background-position":"left -282px"},"BOX-v IND1-mousedown,BOX-v IND2-mousedown":{$order:12,"background-position":"left -292px"}},Behaviors:{HoverEffected:{IND1:"IND1",IND2:"IND2",DECREASE:"DECREASE",INCREASE:"INCREASE"},ClickEffected:{IND1:"IND1",IND2:"IND2",DECREASE:"DECREASE",INCREASE:"INCREASE"},onSize:function(A,B){var C=A.root;linb.UI.$tryResize(A,B.width?C.width():null,C.height?C.height():null)},IND:{onClick:function(C,I,A){var B=C.properties,O=linb([A]).offset(),N=linb.Event.getPos(I),F=C.box._v2a(C,C.properties.$UIvalue),E,D,K=B.type=="vertical",J=K?"top":"left",H=K?"offsetTop":"offsetLeft",G=K?"offsetHeight":"offsetWidth",M=N[J]-O[J],L=(M/A[G])*100;if(!B.isRange){F[0]=L}else{E=C.getSubNode("IND1")[H](),D=C.getSubNode("IND2")[H]();if(Math.abs(E-M)<Math.abs(D-M)){F[0]=L}else{F[1]=L}}C.boxing().setUIValue(C.box._adjustValue(C,F))}},IND1:{onKeydown:function(C,E,F){var D=C.properties,B=D.type=="vertical",A=linb.Event.getKey(E)[0];if(A==(B?"up":"left")){C.box._auto(C,false)}if(A==(B?"down":"right")){C.box._auto(C,true)}},onKeyout:function(A){linb.Thread.abort(A.$id+":auto")},onKeyup:function(A){linb.Thread.abort(A.$id+":auto")},onMousedown:function(B,F,H){var E=B.properties,A=E.type=="vertical",G=A?"offsetTop":"offsetLeft",D=A?"offsetHeight":"offsetWidth",C=B.box;linb([H]).startDrag(F,{widthIncrement:E.steps?B._size/E.steps:null,dragType:"none",targetReposition:true,horizontalOnly:A?true:null,verticalOnly:A?null:true,maxLeftOffset:H[G],maxRightOffset:H.parentNode[D]-H[G],dragCursor:"default"});linb([H]).css("zIndex",10).focus();B.getSubNode("IND2").css("zIndex",5)},beforeDragbegin:function(B,C,D){var A=B.properties.type=="vertical";linb(D)[A?"top":"left"](B.__x=D[A?"offsetTop":"offsetLeft"])},onDrag:function(C,D,F){var E=linb.DragDrop.getProfile().offset,B=C.properties.type=="vertical",A=C.box._v2a(C,C.properties.$UIvalue);A[0]=((C.__x+E[B?"y":"x"])/F.parentNode[B?"offsetHeight":"offsetWidth"])*100;C.boxing().setUIValue(C.box._adjustValue(C,A))},onDragstop:function(A,B,C){linb(C).onMouseout(true,{$force:true}).onMouseup(true)},onClick:function(){return false}},IND2:{onKeydown:function(C,E,F){var D=C.properties,B=D.type=="vertical",A=linb.Event.getKey(E)[0];if(A==(B?"up":"left")){C.box._auto(C,false)}if(A==(B?"down":"right")){C.box._auto(C,true)}},onKeyout:function(A){linb.Thread.abort(A.$id+":auto")},onKeyup:function(A){linb.Thread.abort(A.$id+":auto")},onMousedown:function(B,F,H){var E=B.properties,A=E.type=="vertical",G=A?"offsetTop":"offsetLeft",D=A?"offsetHeight":"offsetWidth",C=B.box;linb([H]).startDrag(F,{widthIncrement:E.steps?B._size/E.steps:null,dragType:"none",targetReposition:true,horizontalOnly:A?true:null,verticalOnly:A?null:true,maxLeftOffset:H[G],maxRightOffset:H.parentNode[D]-H[G],dragCursor:"default"});linb([H]).css("zIndex",10).focus();B.getSubNode("IND1").css("zIndex",5)},beforeDragbegin:function(B,C,D){var A=B.properties.type=="vertical";linb(D)[A?"top":"left"](B.__x=D[A?"offsetTop":"offsetLeft"])},onDrag:function(C,D,F){var E=linb.DragDrop.getProfile().offset,B=C.properties.type=="vertical",A=C.box._v2a(C,C.properties.$UIvalue);A[1]=((C.__x+E[B?"y":"x"])/F.parentNode[B?"offsetHeight":"offsetWidth"])*100;C.boxing().setUIValue(C.box._adjustValue(C,A))},onDragstop:function(A,B,C){linb(C).onMouseout(true,{$force:true}).onMouseup(true)},onClick:function(){return false}},RULERRIGHT:{onClick:function(C,E,F){var D=C.properties,B=C.boxing(),G=C.box,A=G._v2a(C,D.$UIvalue);if(!D.isRange){A[0]=100}else{A[1]=100}B.setUIValue(C.box._adjustValue(C,A))}},DECREASE:{onMousedown:function(A){A.box._auto(A,false)},onMouseout:function(A){linb.Thread.abort(A.$id+":auto")},onMouseup:function(A){linb.Thread.abort(A.$id+":auto")}},INCREASE:{onMousedown:function(A){A.box._auto(A,true)},onMouseout:function(A){linb.Thread.abort(A.$id+":auto")},onMouseup:function(A){linb.Thread.abort(A.$id+":auto")}}},DataModel:{position:"absolute",width:{ini:200},height:{ini:50},steps:0,value:"0:0",type:{listbox:["vertical","horizontal"],ini:"horizontal",action:function(A){this.boxing().refresh()}},isRange:{ini:true,action:function(A){this.boxing().refresh()}},showIncreaseHandle:{ini:true,action:function(A){this.boxing().refresh()}},showDecreaseHandle:{ini:true,action:function(A){this.boxing().refresh()}}},_prepareData:function(A){var C=arguments.callee.upper.call(this,A),B="display:none";C._showDes=C.showDecreaseHandle?"":B,C._showIns=C.showIncreaseHandle?"":B,C._showD2=C.isRange?"":B;C._cls=A.getClass("BOX",C.type=="vertical"?"-v":"-h");return C},_adjustValue:function(B,C){var D=B.properties,A=[];A[0]=parseFloat(C[0])||0;A[1]=parseFloat(C[1])||0;if(D.steps){C=100/D.steps;A[0]=Math.ceil(A[0]/C);if(D.isRange){A[1]=Math.ceil(A[1]/C)}}return A.join(":")},_ensureValue:function(B,I){var A=B.properties,H=I.split(":"),D=0,F=A.steps?A.steps:100,G=[],E=function(J){return parseFloat(J)||0},C=function(J){return Math.min(F,Math.max(D,J))};G[0]=E(H[0]);if(A.isRange){G[1]=E(H[1]);if(G[0]>G[1]){H=G[1];G[1]=G[0];G[0]=H}}G[0]=C(G[0]);if(A.isRange){G[1]=C(G[1])}return A.isRange?G.join(":"):(G[0]+"")},_v2a:function(D,B){var A=D.properties.steps,C;B=typeof B=="string"?B.split(":"):B;B[0]=parseFloat(B[0])||0;B[1]=parseFloat(B[1])||0;if(A){B[0]=B[0]*100/A}if(A){B[1]=B[1]*100/A}if(B[0]>B[1]){C=B[0];B[1]=B[0];B[0]=C}return B},_auto:function(E,G){var A=E.$id+":auto";if(linb.Thread.isAlive(A)){return }var B=E.properties,I,D=(B.steps?100/B.steps:1)*(G?1:-1),C={delay:300},F=E.box._v2a(E,B.$UIvalue),H=function(){F[0]+=D;if(B.isRange){F[1]+=D}E.boxing().setUIValue(E.box._adjustValue(E,F));C.delay*=0.8};C.task=H;linb.Thread(A,[C],500,null,H,null,true).start()},_onresize:function(D,B,K){var A=D.properties,I=A.type,H=function(N){return D.getSubNode(N)},M=H("RULER"),C=H("IND"),L=H("RULERLEFT");if(I=="vertical"){var J=L.height(),G=A.showDecreaseHandle?H("DECREASE").height():0,F=A.showIncreaseHandle?H("INCREASE").height():0,E=H("IND1").height();if(K){M.top(G+J).height(K-G-F-2*J);C.top(G).height(D._size=K-G-F-E)}}else{var J=L.width(),G=A.showDecreaseHandle?H("DECREASE").width():0,F=A.showIncreaseHandle?H("INCREASE").width():0,E=H("IND1").width();if(B){M.left(G+J).width(B-G-F-2*J);C.left(G).width(D._size=B-G-F-E)}}}}});Class("linb.UI.Dialog","linb.UI.Widget",{Instance:{show:function(A,B,D,C){A=A||linb("body");return this.each(function(I){var H,J=I.properties,E=I.boxing(),G=function(){var M=I.boxing(),K;if(I.domNode&&I.domNode._linbhide){K=true}if(D||D===0){M.setLeft(D)}if(C||C===0){M.setTop(C)}A.append(M);var P=I.box,L=I.root,O=L.topZindex(),N=L.css("zIndex");L.css("zIndex",O>N?O:N);if(K){L.show(D?(parseInt(D)||0)+"px":null,C?(parseInt(C)||0)+"px":null)}if(B&&!I.$inModal){P._modal(I)}P._active(I);if(I.onShow){I.boxing().onShow(I)}if(I.properties.status=="normal"){P._refreshRegion(I)}_.asyRun(function(){L.nextFocus()});delete I.inShowing},F=I.root;if(F&&F.get(0)._hide===0){return }if(I.inShowing){return }I.inShowing=1;if(H=J.fromRegion){linb.Dom.animate({border:"dashed 1px #ff0000"},{left:[H.left,J.left],top:[H.top,J.top],width:[H.width,J.width],height:[H.height,J.height]},null,G,360,12,"expoIn").start()}else{G()}})},hide:function(){this.each(function(D){var F=D.properties,E=D.box,B=D.root;if(B&&B.get(0)._hide==1){return }if(D.inHiding){return }D.inHiding=1;if(D.$inModal){E._unModal(D)}if(F.status=="max"||F.status=="min"){E._restore(D)}B.hide();var C=F.fromRegion,A=function(){delete D.inHiding};if(C){linb.Dom.animate({border:"dashed 1px #ff0000"},{left:[F.left,C.left],top:[F.top,C.top],width:[F.width,C.width],height:[F.height,C.height]},null,A,360,12,"expoOut").start()}else{A()}});return this},close:function(){return this.each(function(C){if(C.beforeClose&&false===C.boxing().beforeClose(C)){return }if(C.inClosing){return }C.inClosing=1;var D=C.properties,B=D.fromRegion,A=function(){C.boxing().destroy();delete C.inClosing};if(B){linb.Dom.animate({border:"dashed 1px #ff0000"},{left:[D.left,B.left],top:[D.top,B.top],width:[D.width,B.width],height:[D.height,B.height]},null,A,360,12,"expoOut").start()}else{A()}})}},Initialize:function(){var A=this.getTemplate();_.merge(A.FRAME.BORDER,{TBAR:{tagName:"div",className:"uibar-top",TBART:{cellpadding:"0",cellspacing:"0",width:"100%",border:"0",tagName:"table",className:"uibar-t",TBARTR:{tagName:"tr",TBARTDL:{tagName:"td",className:"uibar-tdl"},TBARTDM:{$order:1,width:"100%",tagName:"td",className:"uibar-tdm"},TBARTDR:{$order:2,tagName:"td",className:"uibar-tdr"}}},BARCMDL:{tagName:"div",className:"uibar-cmdl",ICON:{$order:0,className:"ui-icon",style:"background:url({image}) transparent no-repeat  {imagePos};{iconDisplay}"},CAPTION:{$order:1,text:"{caption}"}},BARCMDR:{tagName:"div",className:"uibar-cmdr",onselectstart:"return false",unselectable:"on",OPT:{className:"uicmd-opt",style:"{optDisplay}",$order:1},PIN:{$order:2,className:"uicmd-pin",style:"{pinDisplay}"},LAND:{$order:3,className:"uicmd-land",style:"{landDisplay}"},MIN:{$order:4,className:"uicmd-min",style:"{minDisplay}"},RESTORE:{$order:5,className:"uicmd-restore",style:"display:none;"},MAX:{$order:6,className:"uicmd-max",style:"{maxDisplay}"},CLOSE:{$order:7,className:"uicmd-close ",style:"{closeDisplay}"}}},MAIN:{$order:2,tagName:"div",className:"uicon-main",MAINI:{tagName:"div",className:"uicon-maini",PANEL:{tagName:"div",text:"{html}"+linb.UI.$childTag}}},BBAR:{$order:3,tagName:"div",className:"uibar-bottom",BBART:{cellpadding:"0",cellspacing:"0",width:"100%",border:"0",tagName:"table",className:"uibar-t",BBARTR:{tagName:"tr",BBARTDL:{tagName:"td",className:"uibar-tdl"},BBARTDM:{$order:1,width:"100%",tagName:"td",className:"uibar-tdm"},BBARTDR:{$order:2,tagName:"td",className:"uibar-tdr"}}}}},"all");this.setTemplate(A)},Static:{Appearances:{KEY:{overflow:"visible"},PANEL:{position:"relative",overflow:"auto","font-size":"12px","line-height":"14px"},CAPTION:{"font-size":"12px",display:"inline","vertical-align":"middle"}},Behaviors:{DropableKeys:["PANEL"],DragableKeys:["LAND"],HoverEffected:{OPT:"OPT",PIN:"PIN",MIN:"MIN",MAX:"MAX",RESTORE:"RESTORE",CLOSE:"CLOSE",LAND:"LAND"},ClickEffected:{OPT:"OPT",PIN:"PIN",MIN:"MIN",MAX:"MAX",RESTORE:"RESTORE",CLOSE:"CLOSE",LAND:"LAND"},onMousedown:function(A,B){A.box._active(A)},onDragstop:function(A){var C=A.root.cssPos(),B=A.properties;B.left=C.left;B.top=C.top},TBAR:{onMousedown:function(A,B,C){if(A.getKey(linb.Event.getSrc(B).parentNode.id)==A.keys.BARCMDR){return }if(A.properties.movable&&!A._locked){A.box._active(A);A.root.startDrag(B,{dragDefer:1,targetOffsetParent:A.root.parent()})}},onDblclick:function(A,B,C){if(A.getKey(linb.Event.getSrc(B).parentNode.id)==A.keys.BARCMDR){return }if(!A.properties.maxBtn){return }if(A.properties.status=="max"){A.box._restore(A)}else{A.box._max(A)}}},PIN:{onClick:function(C,D,E){var B=C.keys.PIN,A=C.properties;A.pinned=!A.pinned;C.getSubNode("PIN").tagClass("-checked",A.pinned);C._locked=A.pinned;if(A.resizer){if(!A.pinned){if(A.status!="min"&&C.$resizer){C.$resizer.show()}}else{if(C.$resizer){C.$resizer.hide()}}}}},MIN:{onClick:function(A,B,C){A.box._min(A)}},MAX:{onClick:function(A,B,C){A.box._max(A)}},RESTORE:{onClick:function(A,B,C){A.box._restore(A)}},OPT:{onClick:function(A,B,C){A.boxing().onShowOptions(A,B,C)}},CLOSE:{onClick:function(A,B,C){A.boxing().close()}}},DataModel:{tips:null,border:null,disabled:null,dock:{hidden:true},html:{action:function(A){this.getSubNode("PANEL").html(A)}},caption:{ini:undefined,action:function(A){this.getSubNode("CAPTION").get(0).innerHTML=A}},image:{action:function(A){this.getSubNode("ICON").css("display",A?"":"none").css("backgroundImage","url("+(A||"")+")")}},imagePos:{action:function(A){this.getSubNode("ICON").css("backgroundPosition",A)}},shadow:true,resizer:true,movable:true,minBtn:{ini:true,action:function(A){var B=this.getSubNode("MIN");if(A){B.setInlineBlock()}else{B.css("display","none")}}},maxBtn:{ini:true,action:function(A){var B=this.getSubNode("MAX");if(A){B.setInlineBlock()}else{B.css("display","none")}}},optBtn:{ini:false,action:function(A){this.getSubNode("OPT").css("display",A?"":"none")}},closeBtn:{ini:true,action:function(A){var B=this.getSubNode("CLOSE");if(A){B.setInlineBlock()}else{B.css("display","none")}}},pinBtn:{ini:true,action:function(A){var B=this.getSubNode("PIN");if(A){B.setInlineBlock()}else{B.css("display","none")}}},landBtn:{ini:false,action:function(A){var B=this.getSubNode("LAND");if(A){B.setInlineBlock()}else{B.css("display","none")}}},width:300,height:300,minWidth:200,minHeight:100,position:"absolute",fromRegion:{hidden:true,ini:null},status:{ini:"normal",listbox:["normal","min","max"],action:function(C,D){var B=this,A=B.box;if(C=="min"){A._min(B,D)}else{if(C=="max"){A._max(B,D)}else{A._restore(B,D)}}}}},EventHandlers:{onShow:function(A){},beforeClose:function(A){},onShowOptions:function(A,B,C){}},RenderTrigger:function(){this.destroyTrigger=function(){var A=this;if(A.$inModal){A.box._unModal(A)}}},LayoutTrigger:function(){var B=this,C=B.properties,A=B.box;if(C.status=="min"){A._min(B)}else{if(C.status=="max"){A._max(B)}else{linb.UI.$tryResize(B,C.width,C.height)}}},_prepareData:function(C){var D=arguments.callee.upper.call(this,C),B="display:none";D.minDisplay=D.minBtn?"":B;D.maxDisplay=D.maxBtn?"":B;D.optDisplay=D.optBtn?"":B;D.closeDisplay=D.closeBtn?"":B;D.pinDisplay=D.pinBtn?"":B;D.landDisplay=D.landBtn?"":B;D.statusDisplay=D.statusDisplay?"":B;D.statusHeight="height:"+D.statusHeight+"px";var A=C.properties.status;if(A=="min"||A=="max"){C.$noR=C.$noS=1}return D},_min:function(E){var H=E.root,F=E.box,G=H.parent(),C=E.properties;if(C.status=="max"){F._unMax(E)}else{F._refreshRegion(E)}E.getSubNodes(["PANEL","STATUS"]).css("display","none");if(C.minBtn){E.getSubNode("RESTORE").setInlineBlock();E.getSubNode("MIN").css("display","none")}if(C.resizer&&E.$resizer){E.$resizer.hide()}if(C.shadow){E.boxing()._unShadow(false)}C.status="min";var B=H.height(),A=E.getSubNode("BORDER").height(),D=E.getSubNode("TBAR").height();H.cssSize({width:C.minWidth,height:D+B-A},true)},_max:function(C){var F=C.root,D=C.box,A=C.boxing(),E=F.parent(),B=C.properties;if((B.status)=="min"){D._unMin(C)}else{D._refreshRegion(C)}if(B.pinBtn){C.getSubNode("PIN").css("display","none")}if(B.maxBtn){C.getSubNode("MAX").css("display","none");C.getSubNode("RESTORE").setInlineBlock()}C.old_m=B.movable;B.movable=false;if(B.resizer&&C.$resizer){C.$resizer.hide()}if(B.shadow){A._unShadow(false)}B.status="max";A.setDock("fill")},_restore:function(B){var D=B.root,C=B.box,A=B.properties;if(A.status=="max"){C._unMax(B)}if(A.status=="min"){C._unMin(B)}B.getSubNode("RESTORE").css("display","none");A.status="normal"},_unMax:function(C){var B=C.properties,A=C.boxing();C.getSubNode("MAX").setInlineBlock();if(B.pinBtn){C.getSubNode("PIN").setInlineBlock()}B.movable=C.old_m;if(B.shadow){A._shadow()}if(B.resizer&&!B.pinned){if(C.$resizer){C.$resizer.show()}else{A._resizer()}}A.setDock("none");linb.UI.$tryResize(C,B.width,B.height,true)},_unMin:function(C){var B=C.properties,A=C.boxing();C.getSubNodes(["PANEL","STATUS"]).css("display","block");C.getSubNode("MIN").setInlineBlock();if(B.shadow){A._shadow()}if(B.resizer&&!B.pinned){if(C.$resizer){C.$resizer.show()}else{A._resizer()}}C.root.cssSize({width:B.width,height:B.height});linb.UI.$tryResize(C,B.width,B.height,true)},_active:function(C){var A=this;if(A.activeWndId==C.$id){return }A._deActive();var E=linb(C.domId),D=E.topZindex(),B=E.css("zIndex");E.css("zIndex",D>B?D:B);C.getSubNode("TBAR").tagClass("-focus");A.activeWndId=C.$id},_deActive:function(){var A;if(A=linb.UI._cache["$"+this.activeWndId]){A.getSubNode("TBAR").tagClass("-focus",false)}delete this.activeWndId},_modal:function(C){var L=C.root,J,A=L.parent(),K;if(!A.isEmpty()){if(!C.$inModal){if(!C.$modalDiv){C.$modalDiv=new linb.UI.Div({position:"absolute"}).setCustomStyle({KEY:"overflow:hidden;display:block;z-index:0;cursor:wait;background-image:url("+linb.ini.path+"bg.gif)"})}K=C.$modalDiv;A.append(K);K.setDock("cover",true);K=K.reBoxing();K.css("display","block").onMousedown(function(){return false}).topZindex(true);L.css("zIndex",(parseInt(K.css("zIndex"))||0)+1);var E={},I=C.root.query("*",function(M){return M.tabIndex>0}).get();for(var F=0,B;B=I[F++];){(E[B.tabIndex]=E[B.tabIndex]||[]).push(B);B.tabIndex=-1}var G=C.$focusHash={},H=linb("body").query("*",function(M){return M.tabIndex>0}).get();for(var F=0,B;B=H[F++];){(G[B.tabIndex]=G[B.tabIndex]||[]).push(B);B.tabIndex=-1}for(var F in E){G=E[F];for(var D in G){G[D].tabIndex=F}}linb.Event.pushTabOutTrigger(C.domNode,function(){linb([C.domNode]).nextFocus()});C.$inModal=true}}},_unModal:function(D){if(D.$inModal){D.$modalDiv.setDock("none");D.root.css("zIndex",0);D.getSubNode("BORDER").append(D.$modalDiv.reBoxing().css("display","none"));D.$inModal=false;var E=D.$focusHash,C;for(var B in E){C=E[B];for(var A in C){C[A].tabIndex=B}}_.breakO(D.$focusHash,2);linb.Event.popTabOutTrigger()}},_refreshRegion:function(A){if(!A.root){return }return _.merge(A.properties,A.root.cssRegion(),"all")},_adjust:function(E,B,H){B=B||"";if(!H){H=B;B=""}var G=E.$div.reBoxing(),A="linb:temp:dialog",F=arguments.callee;if(!linb.Dom.byId(A)){D=F._cache=G.clone(false);linb("body").append(D);D.css({width:"auto",height:"auto",overflow:"visible",position:"absolute",visibility:"visible",left:linb.Dom.HIDE_VALUE}).id(A,true)}var D=F._cache;D.html(H,false);var C=D.cssSize();G.html(H);if(C.width>500){C.width=500;D.width(500);C.height=D.offsetHeight()+10;D.width("auto")}if(C.height>400){C.height=400}if(C.width<150){C.width=150}if(C.height<30){C.height=30}G.cssSize(C).css("overflow","auto").show();E.setCaption(B).setWidth(C.width+30).setHeight(C.height+90);E.$cmd.reBoxing().left((C.width+30-E.$cmd.reBoxing().width())/2)},alert:function(G,E,A){var D=arguments.callee,C;if(!(C=D.dialog)){C=D.dialog=new linb.UI.Dialog({minBtn:false,maxBtn:false,pinBtn:false,resizer:false,left:200,top:200},{beforeClose:function(){C.hide();_.tryF(D.onOK);D.onOK=null;return false}});var F=C.$cmd=new linb.UI.Div({bottom:10,width:60,height:24}),B=C.$btn=new linb.UI.SButton({caption:"$inline.ok",width:60,tabindex:1},{onClick:function(){C.hide();_.tryF(A)}});F.append(B);var H=C.$div=new linb.UI.Div({left:10,top:10});C.append(F).append(H).render()}D.onOK=A;this._adjust(C,G,E);C.show(linb("body"),true);_.asyRun(function(){C.$btn.activate()})},confirm:function(F,H,G,I){var E=arguments.callee,D;if(!(D=E.dialog)){D=E.dialog=new linb.UI.Dialog({minBtn:false,maxBtn:false,pinBtn:false,resizer:false,left:200,top:200},{beforeClose:function(){D.hide();_.tryF(E.onNo);E.onYest=E.onNo=null;return false}});var C=D.$cmd=new linb.UI.Div({bottom:10,width:140,height:24}),B=new linb.UI.SButton({caption:"$inline.yes",width:60,tabindex:1,left:0},{onClick:function(){D.hide();_.tryF(E.onYes);E.onYest=E.onNo=null}});C.append(B);B=D.$btn=new linb.UI.SButton({caption:"$inline.no",tabindex:1,width:60,left:80},{onClick:function(){D.hide();_.tryF(E.onNo);E.onYest=E.onNo=null}});C.append(B);var A=D.$div=new linb.UI.Div({left:10,top:10});D.append(C).append(A).render()}E.onYes=G;E.onNo=I;this._adjust(D,F,H);D.show(linb("body"),true);_.asyRun(function(){D.$btn.activate()})},pop:function(G,B,F,E,D){var A=new linb.UI.Dialog({minBtn:false,maxBtn:false,pinBtn:false,resizer:false,left:200||E,top:200||D}),C=A.$cmd=new linb.UI.Div({bottom:10,width:60,height:24}).append(A.$btn=new linb.UI.SButton({caption:F||"$inline.ok",tabindex:1,width:60},{onClick:function(){A.destroy()}})),H=A.$div=new linb.UI.Div({left:10,top:10}).setCustomStyle({KEY:"overflow:visible"});A.append(C).append(H).render();this._adjust(A,G,B);A.show(linb("body"),false,E,D);_.asyRun(function(){A.$btn.activate()});return A},prompt:function(G,J,C,H,K){var D,F=arguments.callee;if(!(D=F.dialog)){var I=function(){F.$inp.setValue("");F.onYes=F.onNo=null;F.dialog.hide();return false};D=F.dialog=new linb.UI.Dialog({minBtn:false,maxBtn:false,pinBtn:false,resizer:false,left:200,top:200,width:300,height:130},{beforeClose:function(){_.tryF(F.onNo);return I()}});var A=F.$con=new linb.UI.Div({top:4,left:10,width:270,height:18}),B=new linb.UI.Div({top:65,width:270,height:24}).setCustomStyle("KEY","text-align:center;").append(new linb.UI.SButton({caption:"$inline.yes",width:60,left:70,tabindex:1},{onClick:function(){_.tryF(F.onYes,[F.$inp.getUIValue()]);return I()}}));B.append(new linb.UI.SButton({caption:"$inline.no",tabindex:1,left:140,width:60},{onClick:function(){_.tryF(F.onNo);return I()}}));var E=F.$inp=new linb.UI.Input({left:10,top:22,width:270,height:36,multiLines:true});D.append(A).append(B).append(E).render()}D.setCaption(G||"Prompt");F.$con.setHtml(J||"");F.$inp.setValue(C||"");F.onYes=H;F.onNo=K;D.show(linb("body"),true);_.asyRun(function(){F.$inp.activate()})},_onresize:function(C,B,L,A){var N=arguments.callee.upper.apply(this,arguments),K={},J=C.getSubNode("TBAR"),I=C.getSubNode("PANEL"),H=C.getSubNode("BBAR"),F=C.getSubNode("MAIN"),E=C.getSubNode("MAINI"),G,D,M;if(L){G=J.height(),D=H.height();if((M=N.height-G-D)>0){K.height=M}}if(B){K.width=N.width-(parseInt(E.css("paddingRight"))||0)-(parseInt(F.css("paddingLeft"))||0)}I.cssSize(K,true)}}});