if(!JsNamespace.exist("Eco.XComp.Style")){JsNamespace.declare("Eco.XComp.Style",{getBorderWidth:function(_a){var _b=_a.currentstyle.border;if(_b){var _c=0,_d=0,_e=0,_f=0;_c=_b.left_width;_d=_b.top_width;_e=_b.right_width;_f=_b.bottom_width;_c=Eco.isEmpty(_c)?"0":_c;_d=Eco.isEmpty(_d)?"0":_d;_e=Eco.isEmpty(_e)?"0":_e;_f=Eco.isEmpty(_f)?"0":_f;_c=nexacro.toNumber(_c.replace("px",""));_d=nexacro.toNumber(_d.replace("px",""));_e=nexacro.toNumber(_e.replace("px",""));_f=nexacro.toNumber(_f.replace("px",""));return [_c,_d,_e,_f];}else{return [0,0,0,0];}},getPadding:function(_a){var _b=_a.currentstyle.padding;var _c=0,_d=0,_e=0,_f=0;if(_b){_d=(isNaN(_b.top)?0:_b.top);_f=(isNaN(_b.bottom)?0:_b.bottom);_c=(isNaN(_b.left)?0:_b.left);_e=(isNaN(_b.right)?0:_b.right);}return [_c,_d,_e,_f];},getMargin:function(_a){return [0,0,0,0];},getStyle:function(_a){var _b=_a.style;var _c={};var _d=Eco.isFunction;for(var _e in _b){if(_b.hasOwnProperty(_e)){if(_e.charAt(0)=="_"){continue;}var _f=_b[_e];if(_f){if(!_d(_f)){if(_f===undefined){continue;}value=_f.toString();if(value=="undefined"){continue;}if(value.length){_c[_e]=value;}}}}}return _c;},getCurrentStyle:function(_a){var _b=_a.currentstyle;var _c={};var _d=Eco.isFunction;for(var _e in _b){if(_b.hasOwnProperty(_e)){if(_e.charAt(0)=="_"){continue;}var _f=_b[_e];if(_f){if(!_d(_f)){value=_f.toString();if(value.length){_c[_e]=value;}}}}}return _c;},setStyle:function(_a,_b,_c){var _d=Eco.XComp.Style.getStyle(_a);var _e={},_f;var _g=Eco.isFunction;if(Eco.isEmpty(_c)){_c=true;}if(_c){for(var _h in _d){if(_d.hasOwnProperty(_h)){if(_h.substr(0,1)=="_"){continue;}_a["style"]["set_"+_h]("");}}for(var _h in _b){if(_b.hasOwnProperty(_h)){_e[_h]=_b[_h];}}}else{_d=_a.style;var _i=Eco.isEmpty;var _j;for(var _h in _d){if(_b[_h]&&_b.hasOwnProperty(_h)){_e[_h]=_b[_h];}else{_j=_d[_h];if(!_j||_i(_j.toString())){continue;}_e[_h]=_j;}}}for(var _h in _e){if(_e.hasOwnProperty(_h)){_f=_e[_h];if(!_g(_f)){if(_h.substr(0,1)=="_"){continue;}_a["style"]["set_"+_h](_f);}}}},setStyleIf:function(_a,_b,_c,_d,_e){if(_c===null||_c===undefined){_c="";}var _f=Eco.XComp.Style;if(_a&&_b){if(Eco.isEmpty(_e)){_e=true;}if(_e){var _g=_f.getStyle(_a);for(var _h in _g){if(_g.hasOwnProperty(_h)){if(_h.substr(0,1)=="_"){continue;}_a["style"]["set_"+_h]("");}}}var _i,_j,_k=false;if(_c&&Eco.isFunction(_c)){_k=true;}var _l=_a.style;for(var _h in _b){if(_h.substr(0,1)=="_"){continue;}if(_b.hasOwnProperty(_h)){_i=_b[_h];if(_k){if(_c.call(_d,_a,_h,_i)){_a["style"]["set_"+_h](_i);}}else if(_c==""&&Eco.isEmpty(_l[_h])){_a["style"]["set_"+_h](_i);}else if(_l[_h]==_c){_a["style"]["set_"+_h](_i);}}}}}});}