📄 linb.js
字号:
(function(){var undefined,window=this,_=window._=function(){return +new Date()},Namespace=window.Namespace=function(key){var a=key.split("."),w=window;return _.get(w,a)||_.set(w,a,{})},Class=window.Class=function(key,pkey,obj){var _Static,_parent=[],self=Class,w=window,env=self._fun,reg=self._reg,parent0,_this,i,t,_t;obj=obj||{};if(t=_.get(w,key.split("."))){return t}pkey=(!pkey?[]:typeof pkey=="string"?[pkey]:pkey);for(i=0;t=pkey[i];i++){if(!(_parent[i]=(_.get(w,t.split("."))||(linb&&linb.SC&&linb.SC(t))))){throw new Error("errNoParent:"+t)}}if(obj.Dependency){for(i=0;t=obj.Dependency[i];i++){if(!(_.get(w,t.split("."))||(linb&&linb.SC&&linb.SC(t)))){throw new Error("errNoDependency:"+t)}}}parent0=_parent[0];_Static=obj.Static||{};t={};for(i in _Static){if(reg[i]){t[i]=1}}for(i in t){delete _Static[i]}_Static.Before=obj.Before||(parent0&&parent0.Before);_Static.After=obj.After||(parent0&&parent0.After);_Static.$End=obj.$End||(parent0&&parent0.$End);_Static.__gc=obj.__gc||_Static.__gc||function(){Class.__gc(this.$key)};if(typeof obj.Constructor=="function"){_this=env(obj.Constructor,"Constructor",key,parent0||_.fun());_this.Constructor=String(obj.Constructor)}else{if(parent0){var f=_.fun(),str=parent0.Constructor;if(str){f=new Function(str.slice(str.indexOf("(")+1,str.indexOf(")")).split(","),str.slice(str.indexOf("{")+1,str.lastIndexOf("}")))}_this=env(f,"Constructor",key,parent0.upper);_this.Constructor=str}else{_this=_.fun()}}_t=_.fun();for(i=_parent.length-1;t=_parent[i--];){_.merge(_t,t);_.merge(_t.prototype,t.prototype)}_this.KEY=_this.$key=_this.prototype.KEY=_this.prototype.$key=key;self._wrap(_this,_Static,0,_t);if(t=obj.Instance){self._wrap(_this.prototype,t,1,_t.prototype)}self._inherit(_this,_t);self._inherit(_this.prototype,_t.prototype);_t=null;if(_.tryF(_this.Before,arguments,_this)===false){return false}for(i=0;t=_parent[i];i++){t=(t.$children||(t.$children=[]));for(var j=0,k=t.length,b;j<k;j++){if(t[k]==key){b=true;break}}if(!b){t[t.length]=key}}_this.$linb$=1;_this.$children=[];_this.$parent=_parent;_this.prototype.constructor=_this;_this[key]=_this.prototype[key]=true;_.set(w,key.split("."),_this);_.tryF(_this.After,[],_this);_.tryF(obj.Initialize,[],_this);_.tryF(_this.$End,[],_this);return _this},linb=window.linb=function(nodes,flag){return linb.Dom.pack(nodes,flag)};_.merge=function(target,source,type){var i,f;if(typeof type=="function"){f=type;type="fun"}switch(type){case"fun":for(i in source){if(true===f(source[i],i)){target[i]=source[i]}}break;case"all":for(i in source){target[i]=source[i]}break;case"with":for(i in source){if(i in target){target[i]=source[i]}}break;default:for(i in source){if(!(i in target)){target[i]=source[i]}}}return target};_.merge(_,{fun:function(){return function(){}},exec:function(script){var me=this,d=document,h=me.h||(me.h=d.getElementsByTagName("head")[0]||d.documentElement),s=d.createElement("script");s.type="text/javascript";if(linb.browser.ie){s.text=script}else{s.appendChild(d.createTextNode(script))}h.insertBefore(s,h.firstChild);h.removeChild(s)},get:function(hash,arr){for(var i=0,l=arr.length;i<l;){if(!hash||(hash=hash[arr[i++]])===undefined){return }}return hash},set:function(hash,arr,value){var v,i=0,m,last=arr.length-1,key=arr[last];for(;i<last;){v=arr[i++];if(hash[v]&&((m=typeof hash[v])=="object"||m=="function")){hash=hash[v]}else{hash=hash[v]={}}}if(value===undefined){delete hash[key]}else{return hash[key]=value}},tryF:function(fun,args,scope,df){return(fun&&typeof fun=="function")?fun.apply(scope||null,args||[]):df},asyRun:function(fun,defer,args,scope){return setTimeout(typeof fun=="string"?fun:function(){fun.apply(scope,args||[]);fun=args=null},defer||0)},isEmpty:function(hash){for(var i in hash){return false}return true},resetRun:function(key,fun,defer,args,scope){var me=arguments.callee,k=key,cache=me.$cache||(me.$cache={});if(cache[k]){clearTimeout(cache[k])}if(typeof fun=="function"){cache[k]=setTimeout(function(){delete cache[k];fun.apply(scope||null,args||[])},defer||0)}else{delete cache[k]}},observableRun:function(tasks,onEnd,threadid){linb.Thread.observableRun(tasks,onEnd,threadid)},breakO:function(target,depth){var n=depth||1,l=1+(arguments[2]||0),self=arguments.callee,_t="___gc_",_o=self._o||(self._o={}),i,b,p;if(target&&(typeof target=="object"||typeof target=="function")&&target!==window&&target!==Object&&target!==Date&&target!==Array&&target!==document){if(_t in target){return }else{try{target[_t]=1}catch(e){return }}p=(p=target.constructor)?p.prototype:_o;for(i in target){if(i!=_t){if(l<n&&target[i]&&(typeof target[i]=="object"||typeof target[i]=="function")){self(target[i],n,l)}if(!(p&&p[i])&&i!="prototype"&&i!="constructor"){try{delete target[i]}catch(e){}}}}try{delete target[_t]}catch(e){}if(target.constructor==Array){target.length=0}}},each:function(hash,fun,scope){scope=scope||hash;for(var i in hash){if(false===fun.call(scope,hash[i],i,hash)){break}}return hash},copy:function(hash,fun){return _.clone(hash,fun,1)},clone:function(hash,fun,deep){if(hash&&typeof hash=="object"){var c=hash.constructor,a=c==Array;if(a||c==Object){var me=arguments.callee,h=a?[]:{},v,i=0,l;if(!deep){if(deep===0){return hash}else{deep=100}}if(a){l=hash.length;for(;i<l;i++){if(fun?fun(hash[i],i):1){h[h.length]=((v=hash[i])&&deep&&typeof v=="object")?me(v,fun,deep-1):v}}}else{for(i in hash){if(fun?fun(hash[i],i):1){h[i]=((v=hash[i])&&deep&&typeof v=="object")?me(v,fun,deep-1):v}}}return h}else{return hash}}else{return hash}},filter:function(obj,fun,scope,force){if(!force&&obj&&obj.constructor==Array){var i,l,a=[],o;for(i=0,l=obj.length;i<l;i++){a[a.length]=obj[i]}obj.length=0;scope=scope||a;for(i=0,l=a.length;i<l;i++){if(fun.call(scope,a[i],i,a)!==false){obj[obj.length]=a[i]}}}else{var i,bak={};scope=scope||obj;for(i in obj){if(false===fun.call(scope,obj[i],i,obj)){bak[i]=1}}for(i in bak){delete obj[i]}}return obj},toArr:function(value,flag){if(!value){return[]}var arr=[];if(typeof flag=="boolean"){for(var i in value){arr[arr.length]=flag?i:value[i]}}else{if(typeof value=="string"){arr=value.split(flag||",")}else{for(var i=0,l=value.length;i<l;++i){arr[i]=value[i]}}}return arr},toUTF8:function(str){return str.replace(/[^\x00-\xff]/g,function(a,b){b=a.charCodeAt();return"\\u"+Math.floor(b/16).toString(16)+(b%16).toString(16)})},fromUTF8:function(str){return str.replace(/\\u([0-9a-f]{3})([0-9a-f])/g,function(a,b,c){return String.fromCharCode((parseInt(b,16)*16+parseInt(c,16)))})},urlEncode:function(hash){var a=[],i,o;for(i in hash){o=hash[i];a.push(encodeURIComponent(i)+"="+encodeURIComponent(typeof o=="string"?o:_.serialize(o)))}return a.join("&")},urlDecode:function(str,key){if(!str){return key?"":{}}var arr,hash={},a=str.split("&"),o;for(var i=0,l=a.length;i<l;i++){o=a[i];arr=o.split("=");hash[decodeURIComponent(arr[0])]=decodeURIComponent(arr[1])}return key?hash[key]:hash},exists:function(target){return target!==undefined},isNull:function(target){return target===null},isObj:function(target){return !!target&&(typeof target=="object"||typeof target=="function")},isBool:function(target){return typeof target=="boolean"},isNumb:function(target){return typeof target=="number"&&isFinite(target)},isDate:function(target){return Object.prototype.toString.call(target)==="[object Date]"},isFun:function(target){return Object.prototype.toString.call(target)==="[object Function]"},isArr:function(target){return Object.prototype.toString.call(target)==="[object Array]"},isHash:function(target){return !!target&&typeof target=="object"&&Object.prototype.toString.call(target)==="[object Object]"},isReg:function(target){return Object.prototype.toString.call(target)==="[object RegExp]"},isStr:function(target){return typeof target=="string"},isArguments:function(target){return !!(target&&target.callee&&target.callee.arguments===target)},str:{startWith:function(str,sStr){return str.indexOf(sStr)===0},endWith:function(str,eStr){var l=str.length-eStr.length;return l>=0&&str.lastIndexOf(eStr)===l},repeat:function(str,times){return new Array(times+1).join(str)},initial:function(str){return str.charAt(0).toUpperCase()+str.substring(1)},trim:function(str){return this.ltrim(this.rtrim(str))},ltrim:function(str){return str.replace(/^ */,"")},rtrim:function(str){return str.replace(/ *$/,"")},toDom:function(str,flag){var me=arguments.callee,pool=me._pool||(me._pool=[]),i=0,l=pool.length,p,r=[];do{p=pool[i++]}while(i<l&&(p&&p.firstChild));if(!p||p.firstChild){p=document.createElement("div");pool.push(p)}p.innerHTML=str;for(var i=0,t=p.childNodes,l=t.length;i<l;i++){r[r.length]=t[i]}return linb(r)}},arr:{subIndexOf:function(arr,key,value){if(value===undefined){return -1}for(var i=0,l=arr.length;i<l;i++){if(arr[i]&&arr[i][key]===value){return i}}return -1},removeFrom:function(arr,index,length){arr.splice(index,length||1);return arr},removeValue:function(arr,value){for(var l=arr.length,i=l-1;i>=0;i--){if(arr[i]===value){arr.splice(i,1)}}return arr},insertAny:function(arr,target,index,flag){var l=arr.length;flag=target.constructor!=Array||flag;if(index===0){if(flag){arr.unshift(target)}else{arr.unshift.apply(arr,target)}}else{var a;if(!index||index<0||index>l){index=l}if(index!=l){a=arr.splice(index,l-index)}if(flag){arr[arr.length]=target}else{arr.push.apply(arr,target)}if(a){arr.push.apply(arr,a)}}return index},indexOf:function(arr,value){for(var i=0,l=arr.length;i<l;i++){if(arr[i]===value){return i}}return -1},each:function(arr,fun,scope,desc){var i,l,a=arr;if(a.constructor!=Array){if((a=a._nodes)||a.constructor!=Array){throw new Error("errNotArray")}if(desc===undefined){desc=1}}l=a.length;scope=scope||arr;if(!desc){for(i=0;i<l;i++){if(fun.call(scope,a[i],i,a)===false){break}}}else{for(i=l-1;i>=0;i--){if(fun.call(scope,a[i],i,a)===false){break}}}return arr}}});_.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(fun){return new Function(_.fun.args(fun),_.fun.body(fun))}});_.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(fun,name,original,upper){fun.$name$=name;fun.$original$=original;if(upper){fun.upper=upper}return fun},_other:["toString","valueOf"],_o:{},_inherit:function(target,src,instance){var i,o,r=this._reg;for(i in src){if(i in target||(!instance&&r[i])||i.charAt(0)=="$"){continue}o=src[i];if(o&&o.$linb$){continue}target[i]=o}},_wrap:function(target,src,instance,parent){var self=this,i,j,o,k=target.KEY,r=self._reg,r2=self._reg2,f=self._fun,oo=self._other;for(i in src){if(r2[i]||(!instance&&r[i])){continue}o=src[i];target[i]=(typeof o!="function")?o:f(o,i,k,typeof parent[i]=="function"&&parent[i])}for(j=0;i=oo[j++];){o=src[i];if(o&&(o==self._o[i])){continue}target[i]=(typeof o!="function")?o:f(o,i,k,typeof parent[i]=="function"&&parent[i])}},__gc:function(key){if(typeof key=="object"){key=key.KEY||""}var t=_.get(window,key.split(".")),s;if(t){if(s=_.get(window,["linb","cache","SC"])){delete s[key]}for(var i=0,o;o=t.$children[i];i++){if(o=_.get(window,o.split("."))){CLASS.__gc(o)}}t.$parent.length=t.$children.length=0;_.set(window,key.split("."))}}});_.merge(linb,{cache:{dom:{},domId:{},template:{},hookKey:{},thread:{},SC:{},text:{}},Locale:{en:{}},$lang:"en",$href:"javascript:;",$langId:"linblangkey",setAppLangKey:function(key){linb.$appLangKey=key},getAppLangKey:function(key){return linb.$appLangKey},getLang:function(){return linb.$lang},setLang:function(key,callback){var l=linb.Locale,g=linb.getRes,t,v,i,j,f,m,z,a=[];linb.$lang=key;v=linb.browser.ie?document.all.tags("span"):document.getElementsByTagName("span");for(i=0;t=v[i];i++){if(t.id==linb.$langId){a[a.length]=t}}f=function(){(function(){j=a.splice(0,100);for(i=0;t=j[i];i++){if(typeof (v=g(t.className))=="string"){t.innerHTML=v}}if(a.length){setTimeout(arguments.callee,0)}_.tryF(callback)}())},z="linb.Locale."+key,m=function(){var k=linb.$appLangKey;if(k){linb.include(z+"."+k,linb.getPath("Locale."+key,".js"),f,f)}else{f()}};linb.include(z,linb.getPath(z,".js"),m,m)},_r:/\x24(\d+)/g,getRes:function(id){var d,b=id.indexOf("-")!=-1?((d=id.split("-"))&&(id=d[0])&&d):arguments,c=_.get(linb.Locale[linb.$lang],id.split("."));return(d=typeof c)=="string"?c.replace(linb._r,function(z,id){return b[parseInt(id)+1]||z}):d=="function"?c.apply(null,b):c?c:id.substr(id.lastIndexOf(".")+1)},wrapRes:function(id){var i=id,s,r;if(i.charAt(0)=="$"){arguments[0]=i.substr(1,i.length-1)}s=id;r=linb.getRes.apply(null,arguments);if(s==r){r=i}return'<span id="'+linb.$langId+'" class="'+s+'">'+r+"</span>"},request:function(uri,query,onSuccess,onFail,threadid,options){if(!query){query=""+_()}return((options&&options.method.toLowerCase()=="post")?linb.IAjax:linb.absIO.isCrossDomain(uri)?linb.SAjax:linb.Ajax).apply(null,arguments).start()},include:function(id,path,onSuccess,onFail){if(id&&linb.SC.get(id)){_.tryF(onSuccess)}else{linb.SAjax(path,"",onSuccess,onFail,0,{rspType:"script",checkKey:id}).start()}},_m:[],main:function(fun){linb._m.push(fun)},getPath:function(key,tag,folder){key=key.split(".");if(folder){var a=[key[0],folder];for(var i=1,l=key.length;i<l;i++){a.push(key[i])}key.length=0;key=a}var pre,ini=linb.ini;if(key[0]=="linb"){pre=ini.path;key.shift();if(key.length==(folder?1:0)){key.push("linb")}}else{pre=ini.appPath;if(key.length==((folder?1:0)+1)&&tag==".js"){key.push("index")}if(ini.verPath){pre+=ini.verPath+"/"}if(ini.ver){pre+=ini.ver+"/"}}return pre+key.join("/")+(tag||"/")},log:_.fun(),message:_.fun(),_pool:[],getObject:function(id){return linb._pool["$"+id]},create:function(tag,id){var arr,o,t,me=arguments.callee,r1=me.r1||(me.r1=/</);if(typeof tag=="string"){if(id===true){o=linb([document.createTextNode(tag)])}else{if(t=linb.absBox.$type[tag]){arr=[];for(var i=1,l=arguments.length;i<l;i++){arr[i-1]=arguments[i]}o=new (linb.SC(t))(false);if(o._ini){o._ini.apply(o,arr)}}else{if(r1.test(tag)){o=_.str.toDom(tag)}else{o=document.createElement(tag);o.id=typeof id=="string"?id:_.id();o=linb([o])}}}}else{o=new (linb.SC(tag.key))(tag)}return o}});new function(){var w=window,u=navigator.userAgent.toLowerCase(),d=document,b=linb.browser={kde:/webkit/.test(u),opr:/opera/.test(u),ie:/msie/.test(u)&&!/opera/.test(u),gek:/mozilla/.test(u)&&!/(compatible|webkit)/.test(u),isWin:/(windows|win32)/.test(u),isMac:/(macintosh|mac os x)/.test(u),isAir:/adobeair/.test(u),isLinux:/linux/.test(u),isSecure:location.href.toLowerCase().indexOf("https")==0},v=function(k,s){return k+(b.ver=u.split(s)[1].split(".")[0])};_.filter(b,function(o){return !!o});if(b.ie){b[v("ie","msie ")]=true;if(b.ie6){try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}w.XMLHttpRequest=function(){return new ActiveXObject("Msxml2.XMLHTTP")}}}else{if(b.gek){b[v("gek","firefox/")]=true}else{if(b.opr){b[v("opr","opera/")]=true}else{if(b.kde){b[v("kde","webkit/")]=true}}}}b.contentBox=function(n){return(b.ie||b.opr)?!/BackCompat|QuirksMode/.test(d.compatMode):(n=(n=n||d.documentElement).style["-moz-box-sizing"]||n.style["box-sizing"])?(n=="content-box"):true}();var ini=linb.ini={};if(window.linb_ini){_.merge(ini,window.linb_ini)}if(!ini.path){var s,arr=document.getElementsByTagName("script"),reg=/js\/linb(-[\w]+)?\.js$/,l=arr.length;while(--l>=0){s=arr[l].src;if(s.match(reg)){ini.path=s.replace(reg,"");break}}}_.merge(ini,{appPath:location.href.split("?")[0].replace(/[^\\\/]+$/,""),file_bg:ini.path+"bg.gif",dummy_tag:"$_dummy_$"});if(!ini.path){ini.path=ini.appPath+"/jsLinb"}var f=function(){if(d.addEventListener&&!b.kde){d.removeEventListener("DOMContentLoaded",arguments.callee,false)}try{for(var i=0,l=linb._m.length;i<l;i++){_.tryF(linb._m[i])}linb._m.length=0;linb.isDomReady=true}catch(e){_.asyRun(function(){throw e})}};if(d.addEventListener&&!b.kde){d.addEventListener("DOMContentLoaded",f,false)}else{if(b.ie){(function(){try{d.activeElement.id;d.documentElement.doScroll("left");f()}catch(e){setTimeout(arguments.callee,1)}})()}else{(function(){/loaded|complete/.test(d.readyState)?f():setTimeout(arguments.callee,1)})()}}};Class("linb.Thread",null,{Constructor:function(id,tasks,delay,callback,onStart,onEnd,cycle){var self=this,me=arguments.callee,t=linb.cache.thread;if(self.constructor!==me||!!self.id){return new me(id,tasks,delay,callback,onStart,onEnd,cycle)}if(typeof id!="string"){id="$"+(self.constructor.$id++)}self.id=id;self.profile=t[id]||(t[id]={id:id,_start:false,time:0,_left:0,_asy:-1,index:0,tasks:tasks||[],delay:delay||0,callback:callback,onStart:onStart,onEnd:onEnd,cache:{},status:"run",cycle:!!cycle})},Instance:{_fun:_.fun(),__gc:function(){var m=linb.cache.thread,t=m[this.id];if(t){delete m[this.id];t.tasks.length=0;for(var i in t){t[i]=null}}},_task:function(){var self=this,p=self.profile,t={args:[]},value=p.tasks[p.index],r,i,type=typeof value;p._asy=-1;if(!p.status){return }if(type=="function"){t.task=value}else{if(type=="object"){for(i in value){t[i]=value[i]}}}if(typeof t.task!="function"){t.task=self._fun}if(typeof t.callback!="function"){t.callback=p.callback}t.args.push(p.id);p.index++;p.time=_();r=_.tryF(t.task,t.args||[p.id],t.scope||self,null);if(!p.status){return }if(t.id){p.cache[t.id]=r}if(t.callback){if(false===_.tryF(t.callback,[p.id],self,true)){self.abort();return }}if(p.status!=="run"){return }if(!p||p.status!=="run"){return }self.start()},start:function(time){var self=this,p=self.profile,task,delay;if(p._start===false){p._start=true;if(false===_.tryF(p.onStart,[p.id],self)){return self.abort()}}if(!p.tasks.length){return self.abort()}if(p.index>=p.tasks.length){if(p.cycle===true){self.profile.index=0}else{return self.abort()}}task=p.tasks[p.index];delay=typeof task=="number"?task:typeof task.delay=="number"?task.delay:p.delay;p._left=(time||time===0)?time:delay;if(p._asy!=-1){clearTimeout(p._asy)}p._asy=_.asyRun(self._task,p._left,[],self);p.time=_();return self},suspend:function(){var n,p=this.profile;if(p.status=="pause"){return }p.status="pause";if(p._asy!==-1){clearTimeout(p._asy);if(p.index>0){p.index--}}n=p._left-(_()-p.time);p._left=(n>=0?n:0);return this},resume:function(time){var self=this;if(self.profile.status=="run"){return }time=time===undefined?self.profile._left:time===true?self.profile.delay:time===false?0:(Number(time)||0);self.profile.status="run";self.start(time);return self},abort:function(){var t=this.profile;t.status="stop";clearTimeout(t._asy);_.tryF(t.onEnd,[t.id]);this.__gc()},links:function(thread){var p=this.profile,onEnd=p.onEnd,id=p.id;p.onEnd=function(){_.tryF(onEnd,[id]);thread.start()};return this},insert:function(arr,index){var self=this,o=self.profile.tasks,l=o.length,a;if(arr.constructor!=Array){arr=[arr]}index=index||self.profile.index;if(index<0||index>l){index=l}a=o.splice(index,l-index);o.push.apply(o,arr);o.push.apply(o,a);return self},getCache:function(key){return this.profile.cache[key]},setCache:function(key,value){this.profile.cache[key]=value;return this}},After:function(){var self=this,f=function(i){self[i]=function(id){var t;if(linb.cache.thread[id]){(t=linb.Thread(id))[i].apply(t,Array.prototype.slice.call(arguments,1))}}},a="start,suspend,resume,abort".split(",");for(var i=0,l=a.length;i<l;i++){f(a[i])}},Static:{$id:1,__gc:function(){linb.cache.thread={}},isAlive:function(id){return !!linb.cache.thread[id]},observableRun:function(tasks,onEnd,threadid){var thread=linb.Thread,dom=linb.Dom;if(!_.isArr(tasks)){tasks=[tasks]}if(linb.cache.thread[threadid]){if(typeof onEnd=="function"){tasks.push(onEnd)}thread(threadid).insert(tasks)}else{thread(threadid,tasks,0,null,function(threadid){if(dom){dom.busy(threadid)}},function(threadid){_.tryF(onEnd,arguments,this);if(dom){dom.free(threadid)}}).start()}},group:function(id,group,callback,onStart,onEnd){var bak={},thread=linb.Thread,f=function(o,i,threadid){if(typeof o=="string"){o=thread(o)}if(o){var f=function(){var me=arguments.callee;_.tryF(me.onEnd,arguments,this);me.onEnd=null;delete bak[i];_.tryF(callback,[i,threadid],this);if(_.isEmpty(bak)){thread.resume(threadid)}};f.onEnd=o.profile.onEnd;o.profile.onEnd=f;o.start()}};for(var i in group){bak[i]=1}return thread(id,[function(threadid){if(!_.isEmpty(group)){thread.suspend(threadid);for(var i in group){f(group[i],i,threadid)}}}],0,null,onStart,onEnd)}}});Class("linb.absIO",null,{Constructor:function(uri,query,onSuccess,onFail,threadid,options){if(typeof uri=="object"){options=uri}else{options=options||{};_.merge(options,{uri:uri,query:query,onSuccess:onSuccess,onFail:onFail,threadid:threadid})}var self=this,me=arguments.callee,con=self.constructor;if((con!==me)||self.id){return new me(options)}_.merge(options,{id:options.id||(_()+""+(con._id++)),uri:options.uri||"",query:options.query||"",asy:options.asy!==false,method:"POST"==(options.method||con.method).toUpperCase()?"POST":"GET"},"all");var a="retry,timeout,rspType,customQS".split(",");for(var i=0,l=a.length;i<l;i++){options[a[i]]=(a[i] in options)?options[a[i]]:con[a[i]]}_.merge(self,options,"all");if(con.events){_.merge(self,con.events)}self.query=self.customQS(self.query);if(!self._useForm&&typeof self.query!="string"){self.query=con._buildQS(self.query,self._single,self.method=="POST")}return self},Instance:{_fun:_.fun(),_flag:0,_response:"",_retryNo:0,_end:false,_time:function(){var self=this,c=self.constructor;self._clear();if(self._retryNo<self.retry){self._retryNo++;_.tryF(self.onRetry,[self._retryNo],self);self.start()}else{_.tryF(self.onTimeout,[],self);self._onError(new Error("errTimout"))}},_onEnd:function(){var self=this;self._end=true;if(self._flag>0){clearTimeout(self._flag);self._flag=0}linb.Thread.resume(self.threadid);_.tryF(self.onEnd,[],self);self._clear()},_onStart:function(){var self=this;linb.Thread.suspend(self.threadid);_.tryF(self.onStart,[],self)},_onResponse:function(){var self=this;if(false!==_.tryF(self.beforeSuccess,[self._response,self.rspType,self.threadid],self)){_.tryF(self.onSuccess,[self._response,self.rspType,self.threadid],self)}self._onEnd()},_onError:function(e){var self=this;if(false!==_.tryF(self.beforeFail,[e,self.threadid],self)){_.tryF(self.onFail,[String(e),self.rspType,self.threadid],self)}self._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(hash,flag,post){return flag?((flag=_.serialize(hash))&&(post?flag:encodeURIComponent(flag))):_.urlEncode(hash)},customQS:function(obj){return obj},_if:function(doc,id,onLoad){var e=linb.browser.ie,n=doc.createElement(e?"<iframe name='"+id+"' "+(onLoad?"onload='linb.IAjax._o(\""+id+"\")'":"")+">":"iframe"),w;if(id){n.id=n.name=id}if(!e&&onLoad){n.onload=onLoad}n.style.display="none";doc.body.appendChild(n);w=frames[frames.length-1];return[n,w,w.document]},isCrossDomain:function(uri){uri=uri||"";var me=arguments.callee,r=me.r||(me.r=/(http(s)?\:\/\/)?([\w\.]+(:[\d]+)?)(.*)/),t;if((t=uri.indexOf(":"))==-1||t>uri.indexOf("/")){return false}if(uri.indexOf("file:")===0){return !!location.host}return location.host!=uri.replace(r,"$3")},groupCall:function(hash,callback,onStart,onEnd,threadid){var i,f=function(o,i,hash){hash[i]=linb.Thread(null,[function(threadid){o.threadid=threadid;o.start()}])};for(i in hash){f(hash[i],i,hash)}return linb.Thread.group(null,hash,callback,function(){linb.Thread(threadid).suspend();_.tryF(onStart,arguments,this)},function(){_.tryF(onEnd,arguments,this);linb.Thread(threadid).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 self=this,x=self._XML;if(x){x.onreadystatechange=self._fun;x.abort();self._XML=null}arguments.callee.upper.call(self)},_clear:function(){var self=this,x=self._XML;if(x){x.onreadystatechange=self._fun;self._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 self=this,id,c=self.constructor,t,n,ok=false;if(false===_.tryF(self.beforeStart,[],self)){self._onEnd();return }if(!self._retryNo){self._onStart()}if(self.rspType=="script"){self.retry=0}id=self.id;if(c._pool[id]){c._pool[id].push(self)}else{c._pool[id]=[self]}var w=c._n=document;n=self.node=w.createElement("script");n.src=self.uri+(self.query?"?"+self.query:"");n.type="text/javascript";n.charset="utf-8";n.id="linb:script:"+self.id;n.onload=n.onreadystatechange=function(){var t=this.readyState;if(!ok&&(!t||t=="loaded"||t=="complete")){ok=true;if(self.rspType=="script"){if(typeof self.checkKey=="string"){_.asyRun(function(){_.exec("var a=linb.SAjax._pool['"+id+"'][0];if(linb.SC.get('"+self.checkKey+"'))a._onResponse();else a._loaded();")})}else{self._onResponse()}}else{self._loaded()}}};n.onerror=function(){self._loaded()};w.body.appendChild(n);if(self.timeout>0){self._flag=_.asyRun(function(){if(self&&!self._end){self._time()}},self.timeout)}},_clear:function(){var self=this,n=self.node,c=self.constructor,div=c.div||(c.div=c._n.createElement("div")),_pool=self.constructor._pool;_pool.length=0;delete _pool[self.id];if(n){self.node=n.id=n.onload=n.onreadystatechange=n.onerror=null;if(self.rspType!="script"){div.appendChild(n.parentNode&&n.parentNode.removeChild(n)||n);if(linb.browser.ie){_.asyRun(function(){div.innerHTML="";n.removeNode()})}else{div.innerHTML=""}}}},_loaded:function(){var self=this;_.asyRun(function(){if(self.id&&self.constructor._pool[self.id]){self._onError(new Error("errInData"))}},500)}},Static:{_pool:{},$response:function(obj){var self=this;try{if(obj&&(o=self._pool[obj[self.randkey]])){for(var i=0,l=o.length;i<l;i++){o[i]._response=obj;o[i]._onResponse()}}else{self._onError(new Error("errInData:"+obj))}}catch(e){linb.Debugger&&linb.Debugger.trace(e)}},customQS:function(obj){var c=this.constructor,t=c.type,k=c.randkey,b=c.callback,nr=(this.rspType!="script"),rand=nr?k+"="+this.id+"&type=script&":"";if(typeof obj=="string"){return(obj&&obj+"&")+rand+(nr?b+"=linb.SAjax.$response":"")}else{if(nr){obj[t]="script";obj[k]=this.id;obj[b]="linb.SAjax.$response"}return obj}}}});Class("linb.IAjax","linb.absIO",{Instance:{_useForm:true,$e:function(s){this._onError(new Error("errInData:"+s))},start:function(){var self=this,c=self.constructor,i,id,t,n,k,o,b,form,onload;if(false===_.tryF(self.beforeStart,[],self)){self._onEnd();return }if(!self._retryNo){self._onStart()}id=self.id;if(c._pool[id]){c._pool[id].push(self)}else{c._pool[id]=[self]}self._onload=onload=function(id){if(!self.node){return }var w=self.node.contentWindow,c=linb.IAjax,o,t;if(linb.browser.opr){try{if(w.location=="about:blank"){return }}catch(e){}}try{w.location=c._getDummy()+"#"+linb.ini.dummy_tag;if(w.name==self.id){self.$e("no response")}else{try{o=_.unserialize(decodeURIComponent(w.name));if(o&&(t=c._pool[o[c.randkey]])){for(var i=0,l=t.length;i<l;i++){t[i]._response=o;t[i]._onResponse()}}else{self.$e(w.name)}}catch(a){self.$e(w.name)}}}catch(e){}};var a=c._if(document,id,onload);self.node=a[0];self.frm=a[1];form=self.form=document.createElement("form");form.style.display="none";form.action=self.uri;form.method=self.method;form.target=id;k=self.query||{};for(i in k){if(k[i]&&k[i].nodeName=="INPUT"){k[i].id=k[i].name=i;form.appendChild(k[i]);b=true}else{t=document.createElement("input");t.id=t.name=i;t.value=typeof k[i]=="string"?k[i]:_.serialize(k[i]);form.appendChild(t)}}if(self.method=="POST"&&b){form.enctype="multipart/form-data";if(form.encoding){form.encoding=form.enctype}}document.body.appendChild(form);form.submit();if(self.timeout>0){self._flag=_.asyRun(function(){if(self&&!self._end){self._time()}},self.timeout)}},_clear:function(){var self=this,n=self.node,f=self.form,c=self.constructor,div=c.div||(c.div=document.createElement("div"));if(linb.browser.gek&&n){try{n.onload=null;var d=n.contentWindow.document;d.write(" ");d.close()}catch(e){}}self.form=self.node=self.frm=null;clearTimeout(self._tf);if(n){div.appendChild(n.parentNode.removeChild(n))}if(f){div.appendChild(f.parentNode.removeChild(f))}div.innerHTML=""}},Static:{method:"POST",_pool:{},_o:function(id){var self=this,p=self._pool[id],o=p[p.length-1];_.tryF(o._onload)},_getDummy:function(win){win=win||window;var ns=this,arr,o,d=win.document,ini=linb.ini,b=linb.browser,f=ns.isCrossDomain;if(ns.dummy){return ns.dummy}if(ini.dummy){return ns.dummy=ini.dummy}if(b.gek){arr=d.getElementsByTagName("link");for(var i=0,j=arr.length;i<j;i++){o=arr[i];if(o.rel=="stylesheet"&&!f(o.href)){return ns.dummy=o.href.split("#")[0]}}}if(!f(ini.path)){if(!d.getElementById("linb:img:bg")){o=d.createElement("img");o.id="linb:img:bg";o.src=ini.file_bg;o.style.display="none";d.body.appendChild(o)}}arr=d.getElementsByTagName("img");for(var i=0,j=arr.length;i<j;i++){o=arr[i];if(!f(o.src)){return ns.dummy=o.src.split("#")[0]}}try{if(win!=win.parent){if((win=win.parent)&&!f(""+win.document.location.href)){return ns._getDummy(win)}}}catch(e){}return"/favicon.ico"},customQS:function(obj){var s=this,c=s.constructor,t=c.type;obj[t]="iframe";obj[c.randkey]=s.id;return obj}}});Class("linb.SC",null,{Constructor:function(path,callback,isAsy,threadid,options){var p=linb.cache.SC,r;if(r=p[path]||(p[path]=_.get(window,path.split(".")))){_.tryF(callback,[path,null,threadid],r)}else{options=options||{};options.$cb=callback;if(isAsy){options.threadid=threadid}r=p[path]=linb.SC._call(path||"",options,isAsy)}return r},Static:{__gc:function(k){linb.cache.SC={}},get:function(path,obj){return _.get(obj||window,(path||"").split("."))},_call:function(s,options,isAsy){isAsy=!!isAsy;var i,t,r,o,funs=[],ep=linb.SC.get,ct=linb.cache.text,f=function(text,n,threadid){var self=this;if(text){if(!ep(s)){if(self.$p){(self.$cache||ct)[self.$tag]=text}else{try{_.exec(text)}catch(e){throw new Error('errInEval:"'+e+self.$tag)}}}}_.tryF(self.$cb,[self.$tag,text,threadid],ep(s)||{})},fe=function(text){var self=this;_.tryF(self.$cb,[null,null,self.threadid],self)};if(!(r=ep(s))){if(t=ct[s]){isAsy=false;f.call({$cb:options.$cb},t);delete ct[s]}if(!(r=ep(s))){o=linb.getPath(s,".js","js");options=options||{};options.$tag=s;var ajax;if(isAsy&&!options.$p){options.rspType="script";ajax=linb.SAjax}else{options.asy=isAsy;ajax=linb.Ajax}ajax(o,"",f,fe,null,options).start();if(!isAsy){r=ep(s)}}}else{if(options.$cb){f.call(options)}}return r},loadSnips:function(pathArr,cache,callback,onEnd,threadid){if(!pathArr||!pathArr.length){_.tryF(onEnd,[threadid]);return }var bak={},options={$p:1,$cache:cache||linb.cache.text};for(var i=0,l=pathArr.length;i<l;i++){bak[pathArr[i]]=1}if(callback||onEnd){options.$cb=function(path){if(callback){_.tryF(callback,arguments,this)}delete bak[path||this.$tag];if(_.isEmpty(bak)){_.tryF(onEnd,[threadid]);onEnd=null;linb.Thread.resume(threadid)}}}linb.Thread.suspend(threadid);for(var i=0,s;s=pathArr[i++];){this._call(s,_.merge({$tag:s},options),true)}},runInBG:function(pathArr,callback,onStart,onEnd){var i=0,j,t,self=this,fun=function(threadid){while(pathArr.length>i&&(t=self.get(j=pathArr[i++]))){}if(!t){self._call(j,{threadid:threadid},true)}if(pathArr.length<i){linb.Thread(threadid).abort()}if(pathArr.length==i){i++}};linb.Thread(null,[fun],1000,callback,onStart,onEnd,true).start()},execSnips:function(cache){var i,h=cache||linb.cache.text;for(i in h){try{_.exec(h[i])}catch(e){throw new Error('errInEval:"'+e)}}h={}},groupCall:function(pathArr,callback,onEnd,threadid){if(pathArr){var self=this;self.execSnips();linb.Thread.suspend(threadid);self.loadSnips(pathArr,0,callback,function(){self.execSnips();_.tryF(onEnd,[threadid]);onEnd=null;linb.Thread.resume(threadid)})}else{_.tryF(onEnd,[threadid])}}}});new function(){var 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,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){return'"too much recursion!"'}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(f=T[typeof (v=x[i])]){if(typeof (v=f(v,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]){if(f=T[typeof (v=x[i])]){if(typeof (v=f(v,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,dateformat){return T[typeof obj](obj,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 self=this,me=arguments.callee;if(self.constructor!==me||self.a){return(me._||(me._=new me)).next()}self.a=[-1];self.b=[""];self.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("")}}};Class("linb.Event",null,{Constructor:function(event,node,fordrag,tid){var self=linb.Event,dd=0,id,dragdrop=linb.DragDrop,src,type,pre,obj;if(!(event=event||window.event)||!(src=node)){return false}type=event.type;if(tid){src._tid=tid}if("mouseover"==type||"mouseout"==type){dd=(dragdrop&&dragdrop._profile.isWorking)?1:2;if(dd!=1&&fordrag){return self.$FALSE}if(!self._handleMouseHover(event,src,self.getSrc(event),dd==1)){return self.$FALSE}if(dd==1){pre=dragdrop&&dragdrop._dropElement}}else{if((obj=self._tabHookStack).length&&self._kb[type]&&(event.$key||event.keyCode||event.charCode)==9&&false===self._handleTabHook(self.getSrc(event),obj=obj[obj.length-1])){return }}id=tid||self.getId(src);if(obj=self._getProfile(id)){if(type=="mousedown"){_.tryF(linb.Dom._blurTrigger,[obj,event,src],src)}else{if(type=="resize"){type="size";if(linb.browser.ie&&window===src){var w=linb.browser.contentBox&&document.documentElement.clientWidth||document.body.clientWidth,h=linb.browser.contentBox&&document.documentElement.clientHeight||document.body.clientHeight;if(obj._w==w&&obj._h==h){return }obj._w=w;obj._h=h}}}var j,f,name,r=true,funs=[];for(j=0;j<=2;++j){if(dd==1&&j!==0&&!event.$force){break}if(dd==2&&j===0){continue}name=self._type[type+j]||(self._type[type+j]=self._getEventName(type,self._eventtag[j]));if(!event.$e||event.$all||(name==event.$name)){obj._getEV(funs,id,name,src)}}f=function(a){for(var i=0,v;v=funs[i++];){if(false===v.call(src,obj,a||event,src)){return false}}return true};r=f();if(dragdrop){if(type=="drag"){dragdrop._onDrag=f}else{if(type=="dragover"){dragdrop._onDragover=f}}}if(dd==1){if("mouseover"==type&&dragdrop._dropElement==src&&pre&&pre!=src){self({type:"mouseout",target:pre,$e:true,$name:"beforeMouseout",preventDefault:function(){this.returnValue=false},stopPropagation:function(){this.cancelBubble=true}},pre);dragdrop.setDropElement(src)}if("mouseout"==type&&!dragdrop._dropElement&&pre&&pre==src){self._preDropable=id;_.asyRun(function(){delete linb.Event._preDropable})}if(src==dragdrop._dropElement){r=false}}if(r===false){self.stopBubble(event)}return r}},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(name,pos){var me=arguments.callee,map=me.map||(me.map={});return map[name+pos]||(name=name.charAt(0).toUpperCase()+name.substring(1))&&(map[name+pos]=pos?(pos+name.charAt(0).toUpperCase()+name.substring(1)):function(name){var i,j,a=[];for(i=0;j=linb.Event._eventtag[i];i++){a[i]=j+name}return a}(name))},_getEventType:function(name){var me=arguments.callee,map=me.map||(me.map={});return map[name]||(map[name]=name.replace(/^(on|before|after)/,"").toLowerCase())},_getProfile:function(id,a,b){return id&&((a=(b=linb.cache.dom)[id])?a["linb.UIProfile"]?a:(b=b[id.replace(this._reg,"")])?b:a:b[id.replace(this._reg,"")])},_handleTabHook:function(src,target){if(src===document){return true}var node=src,r;do{if(node==target[0]){return true}}while(node&&(node=node.parentNode)&&node!==document&&node!==window);r=_.tryF(target[1],[target[0]],src);return false},_handleMouseHover:function(event,target,src,dd){if(target==document){return true}var node=(event.type=="mouseover"?event.fromElement:event.toElement)||event.relatedTarget;if(dd&&event.type=="mouseover"&&this._preDropable){try{do{if(node&&node.id&&node.id==this._preDropable){return true}}while(node&&(node=node.parentNode)&&node!==document&&node!==window)}catch(a){}}if(linb.browser.gek){try{do{if(node==target){return false}}while(node&&(node=node.parentNode))}catch(a){var pos=this.getPos(event),node=linb([target]),p=node.offset(),s=node.cssSize(),out=(pos.left<p.left||pos.left>p.left+s.width||pos.top<p.top||pos.top>p.top+s.height);return event.type=="mouseover"?!out:out}}else{do{if(node==target){return false}}while(node&&(node=node.parentNode))}return true},_tabHookStack:[],pushTabOutTrigger:function(boundary,trigger){this._tabHookStack.push([boundary,trigger]);return this},popTabOutTrigger:function(flag){if(flag){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(event){var a;return((a=event.target||event.srcElement||null)&&linb.browser.kde&&a.nodeType==3)?a.parentNode:a},getId:function(node){return window===node?"___window":document===node?"___document":node?node.id:""},getBtn:function(event){return linb.browser.ie?event.button==4?"middle":event.button==2?"right":"left":event.which==2?"middle":event.which==3?"right":"left"},getPos:function(event){event=event||window.event;if("pageX" in event){return{left:event.pageX,top:event.pageY}}else{return{left:event.clientX+this._L,top:event.clientY+this._T}}},getKey:function(event){event=event||window.event;var res=[],t,k=event.$key||event.keyCode||event.charCode||0;if(typeof k=="string"){res[0]=k}else{var key=String.fromCharCode(k),type=event.type;if((type=="keypress"&&k>=33&&k<=128)||((k>=48&&k<=57)||(k>=65&&k<=90))){res[0]=key}else{if(!(t=arguments.callee.map)){t=arguments.callee.map={};var k,arr=("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 i=1,l=arr.length;i<l;i=i+2){t[arr[i-1]]=arr[i]}arr.length=0;t[188]=","}res[0]=t[k]||key}}if((event.modifiers)?(event.modifiers&Event.CONTROL_MASK):(event.ctrlKey||event.ctrlLeft||k==17||k==57391)){if(k==17||k==57391){res[0]=""}res.push("1")}else{res.push("")}if((event.modifiers)?(event.modifiers&Event.SHIFT_MASK):(event.shiftKey||event.shiftLeft||k==16||k==57390)){if(k==16||k==57390){res[0]=""}res.push("1")}else{res.push("")}if((event.modifiers)?false:(event.altKey||event.altLeft||k==18||k==57388)){if(k==18||k==57388){res[0]=""}res.push("1")}else{res.push("")}return res},getEventPara:function(event,mousePos){var keys=this.getKey(event),h={pageX:mousePos&&mousePos.left,pageY:mousePos&&mousePos.top,keyCode:keys[0],ctrlKey:keys[1],shiftKey:keys[2],altKey:keys[3]};for(var i in event){if(i.charAt(0)=="$"){h[i]=event[i]}}return h},stopBubble:function(event){event=event||window.event;if(event.stopPropagation){event.stopPropagation()}event.cancelBubble=true;this.stopDefault(event)},stopDefault:function(event){event=event||window.event;if(event.preventDefault){event.preventDefault()}event.returnValue=false},keyboardHook:function(key,ctrl,shift,alt,fun,args,scope){if(key){var p=linb.cache.hookKey,k=(key||"").toLowerCase()+":"+(ctrl?"1":"")+":"+(shift?"1":"")+":"+(alt?"1":"");if(typeof fun!="function"){delete p[k]}else{p[k]=[fun,args,scope]}}return this}},Initialize:function(){if(linb.browser.ie){this._IE=function(){var d=document,doc=d.documentElement,body=d.body;this._L=(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);this._T=(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0)};this._IE()}}});Class("linb.CSS",null,{Static:{_r:linb.browser.ie?"rules":"cssRules",_baseid:"linb:css:base",_firstid:"linb:css:first",_lastid:"linb:css:last",_rep:function(str){return str.replace(/\.(\w+)\[CLASS~="\1"\]/g,".$1").replace(/\[ID"([^"]+)"\]/g,"#$1").replace(/\*([.#])/g,"$1").replace(/\s+/g," ").replace(/\*\|/g,"").replace(/(\s*,\s*)/g,",").toLowerCase()},_createCss:function(id,last){var ns=this,head=this._getHead(),fid=ns._firstid,lid=ns._lastid,fc,c;fc=document.createElement("style");fc.type="text/css";fc.id=id;if(!last){c=document.getElementById(fid)||head.firstChild;while((c=c.nextSibling)&&!/^(script|link|style)$/i.test(""+c.tagName)){}if(c){head.insertBefore(fc,c)}else{if(c=document.getElementById(lid)){head.insertBefore(fc,c)}else{head.appendChild(fc)}}}else{head.appendChild(fc)}return fc},_getCss:function(id,last){return document.getElementById(id)||this._createCss(id,last)},_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 count=0;for(var head=this._getHead(),i=0,t=head.childNodes,l;l=t[i++];){if(l.type=="text/css"){count++}}return count>20},get:function(property,value){for(var head=this._getHead(),i=0,t=head.childNodes,l;l=t[i++];){if(l.type=="text/css"&&property in l&&l[property]==value){return l}}return false},addStyleSheet:function(txt,id,backOf){var e,ns=this,head=ns._getHead(),add=function(txt,id,backOf){var e=document.createElement("style");e.type="text/css";if(id){e.id=id}if(linb.browser.ie){e.styleSheet.cssText=txt||""}else{try{e.appendChild(document.createTextNode(txt||""))}catch(p){e.styleSheet.cssText=txt||""}}head.insertBefore(e,backOf?ns._getLast():ns._getBase());e.disabled=true;e.disabled=false;return e},merge=function(txt,backOf){var e=backOf?ns._getLast():ns._getBase();e.styleSheet.cssText+=txt;return e};if(id&&(id=id.replace(/[^\w\-\_\.\:]/g,"_"))&&(e=ns.get("id",id))){return e}if(ns._check()){return merge(txt,backOf)}else{return add(txt,id,backOf)}},includeLink:function(href,id,front,attr){var e,ns=this,head=ns._getHead();if(href&&(e=ns.get("href",href))){}else{e=document.createElement("link");e.type="text/css";e.rel="stylesheet";e.href=href;if(id){e.id=id}e.media="all";_.each(attr,function(o,i){e.setAttribute(i,o)})}head.insertBefore(e,front?ns._getBase():ns._getLast());e.disabled=true;e.disabled=false;return e},remove:function(property,value){var head=this._getHead();if(value=this.get(property,value)){value.disabled=true;head.removeChild(value)}},replaceLink:function(href,property,oValue,nValue){var ns=this,head=ns._getHead(),attr={},e,v;attr[property]=nValue;e=ns.includeLink(href,null,false,attr);if(v=ns.get(property,oValue)){head.replaceChild(e,v)}e.disabled=true;e.disabled=false},_build:function(selector,value,flag){var t="";_.each(value,function(o,i){t+=i.replace(/([A-Z])/g,"-$1").toLowerCase()+":"+o+";"});return flag?t:selector+"{"+t+"}"},setStyleRules:function(selector,value,force){var ns=this,add=true,ds=document.styleSheets,target,target2,selectorText,bak,h,e,t,_t;selector=_.str.trim(selector.replace(/\s+/g," "));if(!(value&&force)){bak=selector.toLowerCase();_.arr.each(_.toArr(ds),function(o){try{o[ns._r]}catch(e){return }_.arr.each(_.toArr(o[ns._r]),function(v,i){if(!v.selectorText){return }if(v.disabled){return }selectorText=ns._rep(v.selectorText);_t=_.toArr(selectorText);if(!value){add=false;if(_.arr.indexOf(_t,bak)!=-1&&_t.length>1){_t=_.arr.removeFrom(_t,_.arr.indexOf(_t,bak)).join(",");t=v.cssText.slice(v.cssText.indexOf("{")+1,v.cssText.lastIndexOf("}"));if(o.insertRule){o.insertRule(_t+"{"+t+"}",o[ns._r].length)}else{if(o.addRule){o.addRule(_t,t)}}if(o.deleteRule){o.deleteRule(i)}else{o.removeRule(i)}o.disabled=true;o.disabled=false}else{if(selectorText==bak){if(o.deleteRule){o.deleteRule(i)}else{o.removeRule(i)}o.disabled=true;o.disabled=false}}}else{if(selectorText==bak){target=v;return false}if(_.arr.indexOf(_t,bak)!=-1){target2=v;return false}}},null,true);if(target){add=false;try{_.each(value,function(o,i){i=i.replace(/(-[a-z])/gi,function(m,a){return a.charAt(1).toUpperCase()});target.style[i]=typeof o=="function"?o(target.style[i]):o})}catch(e){}o.disabled=true;o.disabled=false;return false}else{if(target2){add=false;o.insertRule(ns._build(selector,value),o[ns._r].length);o.disabled=true;o.disabled=false;return false}}},null,true)}if(force||add){ns._addRules(selector,value)}return ns},$getCSSValue:function(selector,cssKey){var ns=this,ds=document.styleSheets,r,b,selectorText;selector=_.str.trim(selector.replace(/\s+/g," "));_.arr.each(_.toArr(ds),function(o){try{o[ns._r]}catch(e){return }_.arr.each(_.toArr(o[ns._r]),function(v,i){if(!v.selectorText){return }if(v.disabled){return }selectorText=ns._rep(v.selectorText);if(_.arr.indexOf(_.toArr(selectorText),selector)!=-1&&(r=v.style[cssKey])){return b=false}},null,true);return b},null,true);return r},_addRules:function(selector,value){var ns=this,target=ns._getLast(),changed=target.sheet||target.styleSheet;if(changed.insertRule){changed.insertRule(ns._build(selector,value),changed[ns._r].length)}else{if(changed.addRule){changed.addRule(selector,ns._build(selector,value,true))}}target.disabled=true;target.disabled=false;return ns}},Initialize:function(){var b=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;}"+(b.ie?"input,textarea,select{font-size:100%;}":"")+"legend{color:#000;}del,ins{text-decoration:none;}pre,code,kbd,samp,tt{font-family:monospace;"+(b.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;"+(b.gek?"-moz-user-select:none;":"")+"}a:hover{color:red}"+(b.gek?"a:focus{-moz-outline-offset:-1px !important}":"")+"div{font-size:12px;}span{"+(b.gek?"display:-moz-inline-block;display:-moz-inline-box;display:inline-block;":b.ie6?"display:inline-box;display:inline;":"display:inline-block;")+(b.ie?"zoom:1;":"")+(b.gek3?"":"vertical-align:middle;")+"}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(obj,id,target){var self=this,uid="$"+self.$id;target=target||self;if(obj[uid]){self.unLink(id)}obj[uid]=target;if(obj instanceof Array){obj.push(target)}self._links[id]=obj;return self},unLink:function(id){var self=this,o,uid="$"+self.$id;if(!self._links){return }if(!(o=self._links[id])){return }if(o instanceof Array){_.arr.removeValue(o,o[uid])}delete o[uid];delete self._links[id];return self},unLinkAll:function(){var self=this,id="$"+self.$id,l=self._links,o,i;for(i in l){o=l[i];if(o instanceof Array){_.arr.removeValue(o,o[id])}delete o[id]}self._links={};return self}},Static:{$id:new _.id,$abstract:true}});Class("linb.DomProfile","linb.absProfile",{Constructor:function(domId,domNode){arguments.callee.upper.call(this);var self=this;self.domNode=domNode;linb.cache.dom[self.domId=domId]=self;self.nodeVars={}},Instance:{__gc:function(){var self=this,t;if(self.nodeVars&&(t=self.domNode)){_.each(self.nodeVars,function(o,i){t[i]=null})}delete linb.cache.dom[self.domId];_.breakO(self)},_getEV:function(funs,id,name){var t=linb.cache.dom[id];if(t&&(t=t.events)&&(t=t[name])){for(var i=0,l=t.length;i<l;i++){if(typeof t[t[i]]=="function"){funs[funs.length]=t[t[i]]}}}}},Static:{get:function(id){return linb.cache.dom[id]},$abstract:true}});Class("linb.absBox",null,{Constructor:function(){this._nodes=[]},Before:function(key){var t=linb.absBox;if(t){(t=t.$type)[key.replace("linb.","")]=t[key]=key}},Instance:{get:function(index){var t=this._nodes;return t[index]||t},each:function(fun){var self=this;for(var i=0,j=self._nodes,l=j.length;i<l;i++){if(false===fun.call(self,j[i],i)){break}}return self},isEmpty:function(){return !this._nodes.length},merge:function(obj){if(this==linb.win||this==linb.doc||this==linb("body")){return this}var self=this,c=self.constructor,obj=obj._nodes,i=0,t,n=self._nodes;if(obj.length){for(;t=obj[i++];){n[n.length]=t}self._nodes=c._unique(n)}return self},reBoxing:function(key,ensureValue){var self=this,t=linb.absBox.$type[key||"Dom"];if(t==self.KEY){return self}if(t=linb.SC(t)){return t.pack(self._nodes,ensureValue)}}},Static:{$abstract:true,$type:{},pack:function(arr,ensureValue){var o=new this(false);o._nodes=arr?ensureValue===false?arr:typeof this._ensureValues=="function"?this._ensureValues(arr):arr:[];return o},_unique:function(arr){var h={},a=[],i=0,t,m;for(;t=arr[i++];){m=t.$id;if(!h[m]){h[m]=1;a[a.length]=t}}return a},plugIn:function(name,fun){this.prototype[name]=fun;return this}}});Class("linb.Dom","linb.absBox",{Instance:{serialize:function(){var a=[];this.each(function(o){a[a.length]=o.id});return"linb(['"+a.join("','")+"'])"},id:function(value,ignoreCache){var t,i,cache=linb.cache.dom;if(typeof value=="string"){return this.each(function(o){if((i=o.id)!==value){if(!ignoreCache&&(t=cache[i])){cache[value]=t;delete cache[i]}o.id=value}})}else{return this.get(0).id}},$sum:function(fun,args){var arr=[],r,i;this.each(function(o){r=fun.apply(o,args||[]);if(r){if(_.isArr(r)){for(i=0;o=r[i];i++){arr[arr.length]=o}}else{arr[arr.length]=r}}});return linb(arr)},children:function(){return this.$sum(function(){return _.toArr(this.childNodes)})},clone:function(deep){return this.$sum(function(){return this.cloneNode(deep?true:false)},arguments)},$iterator:function(type,dir,inn,fun,top){return this.$sum(function(type,dir,inn,fun,top){var self=arguments.callee;if(typeof fun!="function"){var count=fun||0;fun=function(n,index){return index==count}}var index=0,m,n=this,flag=0,t;while(n){if(n.nodeType==1){if(fun(n,index++)===true){break}}if(type=="x"){n=dir?n.nextSibling:n.previousSibling}else{if(type=="y"){n=dir?self.call(dir===1?n.lastChild:n.firstChild,"x",(dir!==1),true,0,top):n.parentNode}else{inn=_.isBool(inn)?inn:true;m=null;n=dir?(t=inn&&n.firstChild)?t:(t=n.nextSibling)?t:(m=n.parentNode):(t=inn&&n.lastChild)?t:(t=n.previousSibling)?t:(m=n.parentNode);if(m){while(!(m=dir?n.nextSibling:n.previousSibling)){n=n.parentNode;if(!n){if(flag){return null}else{flag=true;m=dir?document.body.firstChild:document.body.lastChild;break}}}n=m}inn=true}}}return n},arguments)},query:function(tagName,property,expr){tagName=tagName||"*";var f="getElementsByTagName",me=arguments.callee,f1=me.f1||(me.f1=function(tag,attr,expr){var all=this[f](tag),arr=[];if(expr.test(this[attr])){arr[arr.length]=this}for(var o,i=0;o=all[i];i++){if(expr.test(o[attr])){arr[arr.length]=o}}return arr}),f2=me.f2||(me.f2=function(tag,attr,expr){var all=this[f](tag),arr=[];if(this[attr]==expr){arr[arr.length]=this}for(var o,i=0;o=all[i];i++){if(o[attr]==expr){arr[arr.length]=o}}return arr}),f3=me.f3||(me.f3=function(tag,attr,expr){var all=this[f](tag),arr=[];if(this[attr]){arr[arr.length]=this}for(var o,i=0;o=all[i];i++){if(o[attr]){arr[arr.length]=o}}return arr}),f4=me.f4||(me.f4=function(tag){return _.toArr(this[f](tag))}),f5=me.f5||(me.f5=function(tag,attr){var all=this[f](tag),arr=[];if(attr(this)){arr[arr.length]=this}for(var o,i=0;o=all[i];i++){if(attr(o)){arr[arr.length]=o}}return arr});return this.$sum(property?typeof property=="function"?f5:expr?expr.constructor==RegExp?f1:f2:f3:f4,[tagName,property,expr])},$add:function(fun,target,reversed){if(reversed){reversed=linb(target);target=this}else{target=linb(target);reversed=this}if(target._nodes.length){var one=reversed.get(0),ns=target._nodes,dom=linb.Dom,cache=linb.cache.dom,fragment,uiObj,p,i,o,j,v,uiObj,arr=[];target.each(function(o){uiObj=(p=o.id)&&(p=cache[p])&&p.LayoutTrigger&&dom.getStyle(one,"display")!="none"&&p.LayoutTrigger;if(uiObj){arr.push([uiObj,p])}});if(ns.length==1){fragment=ns[0]}else{fragment=document.createDocumentFragment();for(i=0;o=ns[i];i++){fragment.appendChild(o)}}fun.call(one,fragment);for(i=0;o=arr[i];i++){for(j=0;v=o[0][j];j++){v.call(o[1])}if(o[1].onLayout){o[1].boxing().onLayout(o[1])}}arr.length=0}return this},prepend:function(target,reversed){return this.$add(function(node){if(this.firstChild){this.insertBefore(node,this.firstChild)}else{this.appendChild(node)}},target,reversed)},append:function(target,reversed){return this.$add(function(node){this.appendChild(node)},target,reversed)},addPrev:function(target,reversed){return this.$add(function(node){this.parentNode.insertBefore(node,this)},target,reversed)},addNext:function(target,reversed){return this.$add(function(node){if(this.nextSibling){this.parentNode.insertBefore(node,this.nextSibling)}else{this.parentNode.appendChild(node)}},target,reversed)},replace:function(target,triggerGC){target=linb(target);var v,i,c=this.get(0),ns=target.get(),l=ns.length;if(l>0&&(v=ns[l-1])){c.parentNode.replaceChild(v,c);for(i=0;i<l-1;i++){v.parentNode.insertBefore(ns[i],v)}if(triggerGC){this.remove(triggerGC)}}return target},swap:function(target){var self=this,t=linb.Dom.getEmptyDiv().html("*",false);target=linb(target);self.replace(t,false);target.replace(self,false);t.replace(target,false);t.get(0).innerHTML="";document.body.insertBefore(t.get(0),document.body.firstChild);return self},remove:function(triggerGC){var me=arguments.callee,c=me._c||(me._c=document.createElement("div"));if(triggerGC===false){this.each(function(o,i){if(o.parentNode){o.parentNode.removeChild(o)}})}else{this.each(function(o){c.appendChild(o)});c.innerHTML="";_.resetRun("dom.__gc",linb.Dom.__gc,300)}return this},empty:function(triggerGC){return this.each(function(o){linb([o]).html("",triggerGC)})},html:function(content,triggerGC){var s="",t,bak,o=this.get(0);triggerGC=triggerGC!==false;if(content!==undefined){if(o.nodeType==3){o.nodeValue=content}else{if(!(bak=o.firstChild)&&content==""){return this}if(!triggerGC&&linb.browser.ie){while(t=o.firstChild){o.removeChild(t)}}if(triggerGC){o.innerHTML=""}o.innerHTML=content;if(triggerGC&&bak){_.resetRun("dom.__gc",linb.Dom.__gc,300)}}return this}else{return(o.nodeType==3)?o.nodeValue:o.innerHTML}},outerHTML:function(content,triggerGC){var self=this,t,s="",o=self.get(0),id=o.id;if(content!==undefined){if(o.nodeVars&&(t=o.domNode)){_.each(o.nodeVars,function(o,i){t[i]=null})}if(linb.browser.gek){var n=self.replace(_.str.toDom(content),false);self._nodes[0]=n.get(0)}else{var b,r=(b=o.previousSibling)?o.previousSibling:o.parentNode;o.outerHTML=content;if(r){self._nodes[0]=b?r.nextSibling:r.firstChild}}linb([o]).remove(triggerGC);return self}else{if(linb.browser.gek){var dom=linb.Dom,m=dom.getEmptyDiv(),n=dom.getEmptyDiv(2),np=n.parent(),p;if(p=o.parentNode){self.replace(n,false)}m.append(o);s=m.html();if(p){n.replace(o,false)}m.empty();np.prepend(n);return s}else{return o.outerHTML}}},text:function(content){if(content!==undefined){var self=this,arr=[];self.each(function(o){var t=o.firstChild;if(t&&t.nodeType!=1){t.nodeValue=content}else{arr[arr.length]=o}});if(arr.length){linb(arr).empty().each(function(o){o.appendChild(document.createTextNode(content))})}return self}else{return(function(o){var i,a=o.childNodes,l=a.length,content="",me=arguments.callee;for(i=0;i<l;i++){if(a[i].nodeType!=8){content+=(a[i].nodeType!=1)?a[i].nodeValue:me(a[i])}}return content})(this.get(0))}},attr:function(name,value){var self=this,me=arguments.callee,map1=me.map1||(me.map1={"class":"className",readonly:"readOnly",tabindex:"tabIndex","for":"htmlFor",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",value:"value"}),map2=me.map2||(me.map2={href:1,src:1,style:1});if(typeof name=="object"){for(var i in name){me.call(self,i,name[i])}return self}var iestyle=linb.browser.ie&&name=="style",normal=!map2[name=map1[name]||name];if(value!==undefined){return self.each(function(o){if(value===null){if(iestyle){o.style.cssText=""}else{if(normal){try{o[name]=null;if(o.nodeType==1){o.removeAttribute(name)}}catch(e){}}}}else{if(iestyle){o.style.cssText=""+value}else{if(normal){o[name]=value;if(o.nodeType==1&&typeof value=="string"){o.setAttribute(name,value)}}else{o.setAttribute(name,value)}}}})}else{var o=self.get(0);if(iestyle){return o.style.cssText}if(name=="selected"&&linb.browser.kde){o.parentNode.selectedIndex}return((name in o)&&normal)?o[name]:o.getAttribute(name,linb.browser.ie&&!normal?2:undefined)}},css:function(name,value){return(typeof name=="object"||value!==undefined)?this.each(function(o){linb.Dom.setStyle(o,name,value)}):linb.Dom.getStyle(this.get(0),name)},caret:function(begin,end){var input=this.get(0),tn=input.tagName,type=typeof begin,ie=linb.browser.ie,pos;if(!/^(input|textarea)$/i.test(tn)){return this}input.focus();if(type=="number"){if(ie){var r=input.createTextRange();r.collapse(true);r.moveEnd("character",end);r.moveStart("character",begin);r.select()}else{input.setSelectionRange(begin,end)}return this}else{if(type=="string"){var r=this.caret(),l=0,m=0,ret,v=input.value,reg1=/\r/g;if(ie){l=v.substr(0,r[0]).match(reg1);l=(l&&l.length)||0;m=begin.match(reg1);m=(m&&m.length)||0}if(linb.browser.opr){l=begin.match(/\n/g);l=(l&&l.length)||0;m=begin.match(/\r\n/g);m=(m&&m.length)||0;m=l-m;l=0}input.value=v.substr(0,r[0])+begin+v.substr(r[1],v.length);ret=r[0]-l+m+begin.length;this.caret(ret,ret);return ret}else{if(ie){var r=document.selection.createRange(),txt=r.text,l=txt.length,e,m;if(tn.toLowerCase()=="input"){r.moveStart("character",-input.value.length);e=r.text.length;return[e-l,e]}else{var rb=r.duplicate();rb.moveToElementText(input);rb.setEndPoint("EndToEnd",r);e=rb.text.length;return[e-l,e]}}else{return[input.selectionStart,input.selectionEnd]}}}},show:function(left,top){var style,t,auto="auto",v=linb.Dom.HIDE_VALUE;return this.each(function(o){if(o.nodeType!=1){return }style=o.style;if(t=(top||(style.top==v&&(o._top||auto)))){style.top=t}if(t=(left||(style.left==v&&(o._left||auto)))){style.left=t}if(t=o._position){if(style.position!=t){style.position=t}}if(style.visibility!="visible"){style.visibility="visible"}o._linbhide=0})},hide:function(){var style,t;return this.each(function(o){if(o.nodeType!=1){return }style=o.style;t=linb([o]);o._linbhide=1;o._position=style.position;o._top=style.top;o._left=style.left;if(style.position!="absolute"){style.position="absolute"}style.top=style.left=linb.Dom.HIDE_VALUE})},cssRegion:function(region,triggerEvent){var self=this;if(typeof region=="object"){var i,t,m,node=self._nodes[0],dom=linb.Dom,f=dom._setPxStyle,m={};for(var j=0,c=dom._boxArr;i=c[j++];){m[i]=((i in region)&®ion[i]!==null)?f(node,i,region[i]):false}if(triggerEvent){var f=dom.$hasEventHandler;if(f(node,"onsize")&&(m.width||m.height)){self.onSize(true,{width:m.width,height:m.height})}if(f(node,"onlocation")&&(m.left||m.top)){self.onLocation(true,{left:m.left,top:m.top})}}return self}else{var offset=region,parent=triggerEvent,pos=offset?self.offset(null,parent):self.cssPos(),size=self.cssSize();return{left:pos.left,top:pos.top,width:size.width,height:size.height}}},cssSize:function(size,triggerEvent){var self=this,node=self._nodes[0],dom=linb.Dom,f=dom._setPxStyle,b1,b2;if(size){var t;b1=size.width!==null?f(node,"width",size.width):false;b2=size.height!==null?f(node,"height",size.height):false;if(triggerEvent&&(b1||b2)&&dom.$hasEventHandler(node,"onsize")){self.onSize(true,{width:b1,height:b2})}return self}else{return{width:self._W(node,1)||0,height:self._H(node,1)}}},cssPos:function(pos,triggerEvent){var node=this._nodes[0],dom=linb.Dom,f=dom._setPxStyle,b1,b2;if(pos){var t;b1=pos.left!=null?f(node,"left",pos.left):false;b2=pos.top!==null?f(node,"top",pos.top):false;if(triggerEvent&&(b1||b2)&&dom.$hasEventHandler(node,"onlocation")){this.onLocation(true,{left:b1,top:b2})}return this}else{f=dom.getStyle;return{left:parseInt(f(node,"left"))||0,top:parseInt(f(node,"top"))||0}}},offset:function(pos,boundary){var r,t,browser=linb.browser,ns=this,node=ns.get(0),keepNode=node,parent=node.parentNode,op=node.offsetParent,doc=node.ownerDocument,dd=doc.documentElement,db=doc.body,_d=/^inline|table.*$/i,getStyle=linb.Dom.getStyle,fixed=getStyle(node,"position")=="fixed",me=arguments.callee,add=me.add||(me.add=function(pos,l,t){pos.left+=parseInt(l,10)||0;pos.top+=parseInt(t,10)||0}),border=me.border||(me.border=function(node,pos){add(pos,getStyle(node,"borderLeftWidth"),getStyle(node,"borderTopWid
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -