fun=function(){
                    if(profile.destroyed)return false;
                    var v=((+prop.$UIvalue)||0)+off;
                    v=(xui.isSet(v)&&v!=="")?xui.formatNumeric(profile.box._number(profile, v), prop.precision, prop.groupingSeparator, prop.decimalSeparator, prop.forceFillZero,prop.trimTailZero):"";
                    profile.boxing().setUIValue(v,null,null,'spin');
                    task.delay *=0.9;
                }
: "removeAttribute" doesn't work in IE9+
                o.$xid=null;

                o.id=o.onclick=o.onchange=null;

                //a special node, must delete if from cache here:
                delete profile.$_domid[profile.keys['FILE']];
                xui([o]).addPrev(c).remove(false);
                c=null;

                this.setUIValue(this.getValue(),null,null,'getfile',o);

                return o;
            }
        },
        popFileSelector:function(accept, multiple){
            var profile=this.get(0),prop=profile.properties;
            if(profile.renderId && prop.type=='file'){
                var input = profile.getSubNode('FILE'), fileInput=input.get(0);
                input.attr("accept",accept||prop.fileAccept||null);
                input.attr("multiple",multiple||prop.fileMultiple?"multiple":null);

                // for IE11
                if (xui.browser.ie11)  {
                  var label=document.createElement( "div");
                  fileInput.appendChild(label);
                  label.click();
                  fileInput.removeChild(label);
                }else{
                  fileInput.click();
                }
            }
        },
        resetValue:function(value){
            this.each(function(p){
                if(p.properties.type=='file')
                    p.getSubNode('FILE').attr('value','');
            });
            var upper=arguments.callee.upper,
                rtn=upper.apply(this,xui.toArr(arguments));
            upper=null;
            return rtn;
        },
        _drop:function(e, src, baseNode,ignoreEvent){
            return this.each(function(profile){
                var pro = profile.properties, type=pro.type, cacheDrop=pro.cachePopWnd;
                if(pro.disabled||pro.readonly)return;

                //open already
                if(profile.$poplink)return;
                var o, v, drop,
                    box = profile.boxing(),
                    main = profile.getSubNode('BOX'),
                    btn = profile.getSubNode('RBTN'),
                    pos = main.offset();
                pos.top += main.offsetHeight();

                if(type=='combobox'||type=='listbox'||type=='helpinput'||type=='popbox'||type=='cmdbox'||type=='dropbutton'){
                    if(!ignoreEvent && profile.onInitPopup){
                        if(xui.UI._handleMdlPopup(box.onInitPopup(profile, e, src)), main, profile, null, null, e, src){
                            return;
                        }
                    }
                }
                //special cmd type: getter, 'cmdbox' and 'popbox'
                if(( !ignoreEvent && profile.beforeComboPop && false===box.beforeComboPop(profile, pos, e, src)))
                    return;

                // for standard drop
                if(type=='combobox'||type=='listbox'||type=='helpinput'
                    ||type=='date'
                    ||type=='time'
                    ||type=='datetime'
                    ||type=='color'){

                    if(profile.__tryToHide){
                        xui.clearTimeout(profile.__tryToHide);
                        delete profile.__tryToHide;
                    }

                    //get cache key
                    var cachekey;
                    if(cacheDrop){
                        switch(type){
                            case 'time':
                            case 'date':
                            case 'datetime':
                            case 'color':
                                cachekey=type;
                                break;
                            default:
                                if(pro.listKey)
                                    //function no cache
                                    if(typeof xui.get(xui.$cache,['UIDATA', pro.listKey])=='function')
                                        drop = cachekey = null;
                                    else
                                        cachekey = "!"+pro.listKey;
                                else
                                    cachekey = "$"+profile.$xid;
                        }
                        //get from global cache
                        if(cachekey){
                            //filter first
                            xui.filter(profile.box.$drop,function(o){
                                return !!o.renderId;
                            });
                            drop = profile.box.$drop[cachekey];
                        }
                    }

                    //cache pop
                    if(!drop){
                        switch(type){
                            case 'combobox':
                            case 'listbox':
                            case 'helpinput':
                                o = xui.create('List');
                                o.setHost(profile).setDirtyMark(false).setItems(xui.copy(pro.items)).setListKey(pro.listKey||'');
                                if(pro.dropListWidth) o.setWidth(pro.dropListWidth);
                                else o.setWidth(profile.$forceu( main.offsetWidth() + btn.offsetWidth() ));

                                o.setHeight(pro.dropListHeight||'auto');

                                o.afterClick(function(){
                                    if(!this.destroyed)
                                        this.boxing()._cache('',true);
                                    else
                                        o.destroy(true);
                                    return false;
                                });
                                o.beforeUIValueSet(function(p, ovalue, value){
                                    var b2=this.boxing(),item;
                                    if(type=='combobox'||type=='listbox'){
                                        item=p.queryItems(p.properties.items,function(o){return o.id==value},false,true);
                                        if(type=='combobox' && item.length)
                                            value = item[0].caption;
                                    }
                                    //update value
                                    b2.setUIValue(value,null,null,'pick',item&&item[0]);

                                    //cache pop
                                    return b2._cache('',true);
                                });
                                break;
                            case 'time':
                                o = xui.create('TimePicker');
                                o.setHost(profile);
                                o.beforeClose(function(){
                                   if(!this.destroyed)
                                        this.boxing()._cache('',true);
                                    return false
                                });
                                o.beforeUIValueSet(function(p, o, v){
                                    var b2=this.boxing();
                                    //update value
                                    b2.setUIValue(v,null,null,'pick');
                                    return b2._cache('',true);
                                });
                                break;
                            case 'date':
                            case 'datetime':
                                o = xui.create('DatePicker');

                                if(type=='datetime')
                                    o.setTimeInput(true);

                                o.setHost(profile);
                                o.beforeClose(function(){
                                    if(!this.destroyed)
                                        this.boxing()._cache('',true);
                                    else
                                        o.destroy(true);
                                    return false
                                });
                                o.beforeUIValueSet(function(p, o, v){
                                    var b2=this.boxing();
                                    //update value
                                    b2.setUIValue(String(v.getTime()),null,null,'pick',v);
                                    return b2._cache('',true);
                                });

                                break;
                            case 'color':
                                o = xui.create('ColorPicker');
                                o.setHost(profile);
                                o.beforeClose(function(){
                                    if(!this.destroyed)
                                        this.boxing()._cache('',true);
                                    else
                                        o.destroy(true);
                                    return false
                                });
                                o.beforeUIValueSet(function(p, o, v){
                                    var b2=this.boxing();
                                    //update value
                                    b2.setUIValue((v=='transparent'?'':'#')+v,null,null,'pick');
                                    return b2._cache('',true);
                                });
                                break;
                        }
                        if(xui.isHash(pro.popCtrlProp) && !xui.isEmpty(pro.popCtrlProp))
                            o.setProperties(pro.popCtrlProp);
                        if(xui.isHash(pro.popCtrlEvents) && !xui.isEmpty(pro.popCtrlEvents))
                            o.setEvents(pro.popCtrlEvents);

                        drop = o.get(0);

                        //set to global cache
                        if(cachekey)
                            profile.box.$drop[cachekey]=drop;

                        o.render();
                        xui.UI._doResize(drop,drop.properties.width,drop.properties.height);
                    }

                    o=drop.boxing();
                    o.setHost(profile);

                    //set pop
                    switch(type){
                        case 'combobox':
                        case 'listbox':
                        case 'helpinput':
                        case 'time':
                            o.setValue(profile.properties.$UIvalue, true,'pop');
                            break;
                        case 'date':
                        case 'datetime':
                            var t = drop.properties;
                            if(t=profile.properties.$UIvalue)
                                o.setValue(new Date( parseInt(t,10)), true,'pop');
                            break;
                        case 'color':
                            o.setValue(profile.properties.$UIvalue.replace('#',''), true,'pop');
                            break;
                    }

                    profile.boxing().setPopWnd(o);

                    if(!ignoreEvent && profile.beforePopShow && false===box.beforePopShow(profile, drop, profile.properties.items))
                        return;
                    //pop
                    var node=o.reBoxing(),pid=pro.parentID||xui.ini.$rootContainer;
                    node.popToTop(baseNode||profile.getSubNode('BOX'),null,
                         pid ? xui.get(profile,["host", pid]) ? profile.host[pid].getContainer():xui(pid):null);

                    if(!ignoreEvent){
                        xui.tryF(o.activate,[],o);
                    }

                    //for on blur disappear
                    var sid=profile.key+":"+profile.$xid;
                    node.setBlurTrigger(sid, function(){
                        box._cache('blur',true);
                        xui.Event.keyboardHook('esc',0,0,0,sid);
                    });

                    //for esc
                    xui.Event.keyboardHook('esc',0,0,0,function(){
                        profile.$escclosedrop=1;
                        xui.asyRun(function(){
                            delete profile.$escclosedrop;
                        });

                        box.activate();
                        box._cache('esc',true);

                        //unhook
                        xui.Event.keyboardHook('esc',0,0,0,sid);
                        return false;
                    },sid,null,null,profile.domId);
                }else if(type=='file'){
                    profile.boxing().popFileSelector();
                }

                if(!ignoreEvent && profile.afterPopShow)
                    box.afterPopShow(profile, drop);
            });
        },
        expand:function(node, ignoreEvent, e){
            var profile=this.get(0);
            if(profile.renderId){
              node = node || profile.getSubNode("BOX");
              profile.boxing()._drop(e,node,node,ignoreEvent);
            }
        },
        collapse:function(ignoreEvent){
            var profile=this.get(0);
            if(profile.renderId && profile.$poplink)
                profile.boxing()._cache('call',["collapse",ignoreEvent]);
        },
        getPopWnd:function(){
            var profile=this.get(0);
            if(profile && profile.$poplink)
                return profile.$poplink.boxing();
        }
    },
    /*Initialize