text: function AXgetId(id){return document.getElementById(id)}function AX_A(iterable){if(!iterable)return[];if("toArray"in Object(iterable))return iterable.toArray();for(var length=iterable.length||0,results=new Array(length);length--;)results[length]=iterable[length];return results}if(!window.AXConfig)var AXConfig={anchorHref:'href="javascript:;"',weekDays:[{label:"일"},{label:"월"},{label:"화"},{label:"수"},{label:"목"},{label:"금"},{label:"토"}],AXReq:{async:!0,okCode:"ok",responseType:"",dataType:"",contentType:"application/x-www-form-urlencoded; charset=UTF-8",dataSendMethod:"parameter",crossDomain:!1,resultFormatter:function(){return this}},AXGrid:{passiveMode:!1,passiveRemoveHide:!1,fitToWidthRightMargin:11,fitToWidth:!1,pageSize:10,pageHeight:400,headTdHeight:30,keyResult:"result",keyList:"list",emptyListMSG:"empty of list",listCountMSG:"<b>{listCount}</b> count(s)",pageCountMSG:"page(s)"},AXTree:{fitToWidthRightMargin:10,fitToWidth:!1,pageSize:10,pageHeight:400,keyResult:"result",keyTree:"tree",keyList:"list",emptyListMSG:"목록이 없습니다.",persistExpanded:!1,persistSelected:!1,cookiePrefix:"axtree-",cookieExpiredays:7},AXProgress:{cancelMsg:"프로세스를 취소 하시겠습니까?"},AXUpload5:{buttonTxt:"Upload files",deleteConfirm:"정말 삭제하시겠습니까?",uploadSelectTxt:"업로드 하실 파일을 선택해주세요.",dropZoneTxt:"업로드할 파일을 여기에 놓습니다."},AXModal:{contentDivClass:"bodyHeightDiv",pars:""},AXInput:{errorPrintType:"toast",selectorOptionEmpty:"목록이 없습니다.",yearText:"{year}년",monthText:"{month}월",confirmText:"확인",keyOptions:"options",keyOptionValue:"optionValue",keyOptionText:"optionText"},AXSelect:{keyOptions:"options",keyOptionValue:"optionValue",keyOptionText:"optionText"},AXContextMenu:{title:"선택하세요"},mobile:{responsiveWidth:0},AXEditor:{editor_frameSrc:"/_AXJ/lib/AXEditor.html",iconDirectory:"/ui/icons/"},AXTab:{closable:!1},AXValidator:{validateErrMessage:{required:"[{label}](은)는 필수입력 사항입니다.",requiredstring:"반드시 {required}(으)로 입력하셔야 하는 사항입니다.",match:"[{label}](은)는 입력된 내용이 일치하지 않습니다.",invalid:"[{label}](은)는 입력된 내용이 올바르지 않습니다.",min:"[{label}](은)는 {min} 이상의 값을 입력해주세요.",max:"[{label}](은)는 {max} 이하의 값을 입력해주세요.",minbyte:"[{label}]의 입력된 내용의 길이가 {minbyte}Byte 이상이어야 합니다.",maxbyte:"[{label}]의 입력된 내용의 길이가 {maxbyte}Byte를 초과할 수 없습니다.",minlength:"[{label}]의 입력된 내용의 length가 {minlength} 이상이어야 합니다.",maxlength:"[{label}]의 입력된 내용의 length가 {maxlength}을 초과할 수 없습니다.",number:"숫자로만 입력하셔야 합니다.",email:"이메일 형식이 올바르지 않습니다.",hangul:"한글로만 입력하셔야 합니다.",engonly:"영문으로만 입력하셔야 합니다.",residentno:"주민등록번호 형식이 올바르지 않습니다.",foreignerno:"외국인등록번호 형식이 올바르지 않습니다.",bizno:"사업자등록번호 형식이 올바르지 않습니다.",phone:"전화번호 형식이 올바르지 않습니다.",isdate:"날짜 형식이 올바르지 않습니다.",zip:"우편번호 형식이 올바르지 않습니다.",money:"화폐형식으로만 입력하셔야 합니다.",earlierThan:"[{label}] 보다 빠른 날짜를 입력해야 합니다.",laterThan:"[{label}] 보다 느린 날짜를 입력해야 합니다.",exception:"not found errmessage"}}};var axf=AXUtil={async:!0,ajaxOkCode:"ok",ajaxResponseType:"",ajaxDataType:"",gridPassiveMode:!1,gridPassiveRemoveHide:!1,gridFitToWidthRightMargin:10,uniqueSeq:0,getUniqueId:function(){return axf.uniqueSeq+=1},getId:function(id){return document.getElementById(id)},each:function(obj,callback){if(obj){var name,i=0,length=obj.length,isObj=void 0===length||Object.isFunction(obj);if(isObj){for(name in obj)if(callback.call(obj[name],name,obj[name])===!1)break}else for(;length>i&&callback.call(obj[i],i,obj[i++])!==!1;);}},browser:function(){var ua=navigator.userAgent.toLowerCase(),mobile=-1!=ua.search(/mobile/g);if(-1!=ua.search(/iphone/g))return{name:"iphone",version:0,mobile:!0};if(-1!=ua.search(/ipad/g))return{name:"ipad",version:0,mobile:!0};if(-1!=ua.search(/android/g)){var match=/(android)[ \/]([\w.]+)/.exec(ua)||[],browserVersion=match[2]||"0";return{name:"android",version:browserVersion,mobile:mobile}}var match=/(msie) ([\w.]+)/.exec(ua)||/(trident)(?:.*? rv:([\w.]+)|)/.exec(ua)||/(opera|opr)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||[],browser=match[1]||"",browserVersion=match[2]||"0",browserName={msie:"ie",trident:"ie",opr:"opera"};return browser in browserName&&(browser=browserName[browser]),{name:browser,version:browserVersion,mobile:mobile}}(),docTD:function(){return document.compatMode&&"BackCompat"!=document.compatMode?"S":"Q"}(),timekey:function(){var d=new Date;return"A"+d.getHours().setDigit(2)+d.getMinutes().setDigit(2)+d.getSeconds().setDigit(2)+d.getMilliseconds()},overwriteObject:function(tg,obj,rewrite){return void 0==rewrite&&(rewrite=!0),obj&&AXUtil.each(obj,function(k,v){rewrite?tg[k]=v:void 0==tg[k]&&(tg[k]=v)}),tg},copyObject:function(obj){return Object.toJSON(obj).object()},consonantKR:function(cword){for(var cons=[{c:"ㄱ",re:"[가-깋]"},{c:"ㄲ",re:"[까-낗]"},{c:"ㄴ",re:"[나-닣]"},{c:"ㄷ",re:"[다-딯]"},{c:"ㄸ",re:"[따-띻]"},{c:"ㄹ",re:"[라-맇]"},{c:"ㅁ",re:"[마-밓]"},{c:"ㅂ",re:"[바-빟]"},{c:"ㅃ",re:"[빠-삫]"},{c:"ㅅ",re:"[사-싷]"},{c:"ㅆ",re:"[싸-앃]"},{c:"ㅇ",re:"[아-잏]"},{c:"ㅈ",re:"[자-짛]"},{c:"ㅉ",re:"[짜-찧]"},{c:"ㅊ",re:"[차-칳]"},{c:"ㅋ",re:"[카-킿]"},{c:"ㅌ",re:"[타-팋]"},{c:"ㅍ",re:"[파-핗]"},{c:"ㅎ",re:"[하-힣]"},{c:"(",re:"\\("},{c:")",re:"\\)"},{c:"[",re:"\\["},{c:"]",re:"\\]"}],rword="",cwords=cword.split(""),i=0,l=cwords.length;l>i;i++){var fos=cons.searchObject(function(){return this.item.c==cwords[i]}),fo=fos.first();rword+=fo?fo.re:cwords[i]}return rword},setCookie:function(name,value,expiredays,options){var expireDate;return"number"==typeof expiredays&&(expireDate=new Date,expireDate.setDate(expireDate.getDate()+expiredays)),options=options||{},document.cookie=[encodeURIComponent(name),"=",String(value),expireDate?"; expires="+expireDate.toUTCString():"",options.path?"; path="+options.path:"",options.domain?"; domain="+options.domain:"",options.secure?"; secure":""].join("")},getCookie:function(name){for(var nameOfCookie=name+"=",x=0;x<=document.cookie.length;){var y=x+nameOfCookie.length;if(document.cookie.substring(x,y)==nameOfCookie)return-1==(endOfCookie=document.cookie.indexOf(";",y))&&(endOfCookie=document.cookie.length),decodeURIComponent(document.cookie.substring(y,endOfCookie));if(x=document.cookie.indexOf(" ",x)+1,0==x)break}return""},JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,dayLen:function(y,m){return[3,5,8,10].has(function(){return this.item==m})?30:1==m?y%4==0&&y%100!=0||y%400==0?29:28:31},clientHeight:function(){return"Q"==AXUtil.docTD?document.body.clientHeight:document.documentElement.clientHeight},scrollHeight:function(){return"Q"==AXUtil.docTD?document.body.scrollHeight:document.documentElement.scrollHeight},clientWidth:function(){return"Q"==AXUtil.docTD?document.body.clientWidth:document.documentElement.clientWidth},scrollWidth:function(){return"Q"==AXUtil.docTD?document.body.scrollWidth:document.documentElement.scrollWidth},scrollTop:function(){return document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop},scrollLeft:function(){return document.documentElement&&document.documentElement.scrollLeft||document.body.scrollLeft},Event:{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_SHIFT:16,KEY_CONTROL:17,KEY_ALT:18,KEY_ESC:27,KEY_SPACE:32,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_END:35,KEY_HOME:36,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_INSERT:45,KEY_DELETE:46,KEY_WINDOW:91,KEY_EQUAL:187,KEY_MINUS:189,KEY_PERIOD:190,NUMPAD_EQUAL:12,NUMPAD_MULTIPLY:106,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_COMMA:194,cache:{}},console:function(obj){var po="";if(arguments.length>1)for(i=0;i<arguments.length;i++){var obji=arguments[i],objStr="",type=(typeof obji).toLowerCase();"undefined"==type||"function"==type?objStr=type:"boolean"==type||"number"==type||"string"==type?objStr=obji:"object"==type&&(objStr=Object.toJSON(obji)),""!=po&&(po+=", "),po+="arg["+i+"] : "+objStr}else{var type=(typeof obj).toLowerCase();"undefined"==type||"function"==type?po=type:"boolean"==type||"number"==type||"string"==type?po=obj:"object"==type&&(po=Object.toJSON(obj))}if(axf.mobileConsole)axf.mobileConsole.prepend("<div>"+po+"</div>");else if(void 0==window.console);else try{console.log(po)}catch(e){alert(e)}},alert:function(obj){var po="";if(arguments.length>1)for(i=0;i<arguments.length;i++){var obji=arguments[i],objStr="",type=(typeof obji).toLowerCase();"undefined"==type||"function"==type?objStr=type:"boolean"==type||"number"==type||"string"==type?objStr=obji:"object"==type&&(objStr=Object.toJSON(obji)),""!=po&&(po+=", "),po+="arguments["+i+"] : "+objStr}else{var type=(typeof obj).toLowerCase();"undefined"==type||"function"==type?po=type:"boolean"==type||"number"==type||"string"==type?po=obj:"object"==type&&(po=Object.toJSON(obj))}alert(po)},confirm:function(obj){var po="",type=(typeof obj).toLowerCase();"undefined"==type||"function"==type?po=type:"boolean"==type||"number"==type||"string"==type?po=obj:"object"==type&&(po=Object.toJSON(obj));var result=confirm(po);return result},importJS:function(src){var scriptElement=document.createElement("script");scriptElement.setAttribute("src",src),scriptElement.setAttribute("type","text/javascript"),document.getElementsByTagName("head")[0].appendChild(scriptElement)},bindPlaceholder:function(){},isEmpty:function(obj){return""===obj||null===obj||void 0===obj},getUrlInfo:function(){var url,url_param,param,referUrl,pathName,AXparam,pageProtocol,pageHostName;return url_param=window.location.href,param=window.location.search,referUrl=document.referrer,pathName=window.location.pathname,url=url_param.replace(param,""),param=param.replace(/^\?/,""),pageProtocol=window.location.protocol,pageHostName=window.location.hostname,AXparam=url_param.replace(pageProtocol+"//",""),AXparam=param?AXparam.replace(pageHostName+pathName+"?"+param,""):AXparam.replace(pageHostName+pathName,""),{url:url,param:param,anchorData:AXparam,urlParam:url_param,referUrl:referUrl,pathName:pathName,protocol:pageProtocol,hostName:pageHostName}},encParam:function(str){for(var arr,re=new RegExp("[^&?]*?=[^&?]*","ig"),pars=[];null!=(arr=re.exec(str));){var strContent=arr.toString(),dotIndex=strContent.indexOf("=");pars.push(strContent.substring(0,dotIndex)+"="+strContent.substring(dotIndex+1).enc())}return pars.join("&")},readyMobileConsole:function(){AXUtil.mobileConsole=axdom('<div class="AXMobileConsole"></div>'),axdom(document.body).append(AXUtil.mobileConsole)},parsingTable:function(elemObj,returnType){var head={},body=[];return elemObj.find("thead tr td").each(function(){var elem=axdom(this),attrs={key:elem.attr("name"),label:elem.html()||"",width:elem.attr("width")||"*",align:elem.attr("align")||""};head[attrs.key]=attrs}),elemObj.find("tbody tr").each(function(){var item={};axdom(this).find("td").each(function(){var elem=axdom(this);item[elem.attr("name")]=elem.html()}),body.push(item)}),{head:head,body:body}},mousewheelevt:/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel",get_event_target:function(target,cond){var _target=target;if(_target)for(;function(){var result=!0;if(Object.isFunction(cond))result=cond(_target);else if(Object.isObject(cond))for(var k in cond)if("tagname"===k){if(_target.tagName.lcase()!=cond[k]){result=!1;break}}else if("clazz"===k){for(var klasss=_target.className.split(/ /g),hasClass=!1,a=0;a<klasss.length;a++)if(klasss[a]==cond[k]){hasClass=!0;break}result=hasClass}else{if(!_target.getAttribute){result=!1;break}if(_target.getAttribute(k)!=cond[k]){result=!1;break}}return!result}();){if(!_target.parentNode){_target=!1;break}_target=_target.parentNode}return _target}},axdom;window.jQuery&&(axdom=jQuery),window.axdomConverter&&(axdom=axdomConverter);var Class=function(){function subclass(){}function create(){function klass(){this.initialize.apply(this,arguments)}var parent=null,properties=AX_A(arguments);Object.isFunction(properties[0])&&(parent=properties.shift()),Object.extend(klass,Class.Methods),klass.superclass=parent,klass.subclasses=[],parent&&(subclass.prototype=parent.prototype,klass.prototype=new subclass,parent.subclasses.push(klass));for(var i=0;i<properties.length;i++)klass.addMethods(properties[i]);return klass.prototype.initialize||(klass.prototype.initialize=Prototype.emptyFunction),klass.prototype.constructor=klass,klass}function addMethods(source){var ancestor=this.superclass&&this.superclass.prototype,properties=Object.keys(source);Object.keys({toString:!0}).length||(source.toString!=Object.prototype.toString&&properties.push("toString"),source.valueOf!=Object.prototype.valueOf&&properties.push("valueOf"));for(var i=0,length=properties.length;length>i;i++){var property=properties[i],value=source[property];if(ancestor&&Object.isFunction(value)&&"AXJ_super"==value.argumentNames().first()){var method=value;value=function(m){return function(){return ancestor[m].apply(this,arguments)}}(property).wrap(method),value.valueOf=method.valueOf.bind(method),value.toString=method.toString.bind(method)}this.prototype[property]=value}return this}return{create:create,Methods:{addMethods:addMethods}}}();!function(){function extend(){var target=arguments[0]||{},items=arguments[1],overwrite=arguments[2]||!1;if("object"!=typeof target&&"function"!=typeof target&&(target={}),"string"==typeof items)target=items;else if(overwrite===!0)for(var k in items)target[k]=items[k];else if(overwrite===!1)for(var k in items)"undefined"==typeof target[k]&&(target[k]=items[k]);return target}function inspect(obj){try{return isUndefined(obj)?"undefined":null===obj?"null":obj.inspect?obj.inspect():String(obj)}catch(e){if(e instanceof RangeError)return"...";throw e}}function toJSONfn(object,qoute){var type=typeof object,isqoute=qoute;switch(void 0==isqoute&&(isqoute=!0),type){case"undefined":return"undefined";case"function":try{return toJSONfn(object(),isqoute)}catch(e){return}case"unknown":return"unknown";case"boolean":return object.toString();case"number":return object.toString();case"string":return object.axtoJSON(!0)}if(null===object)return"null";if(object.axtoJSON)return object.axtoJSON(isqoute);if(!isElement(object)){var results=[];for(var property in object)if(object.hasOwnProperty(property)){var value=toJSONfn(object[property],isqoute);isUndefined(value)||results.push(property.axtoJSON(isqoute)+":"+value)}return"{"+results.join(", ")+"}"}}function toJSONforMobile(object){var type=typeof object;switch(type){case"undefined":case"function":return;case"unknown":return;case"boolean":return'"'+object.toString()+'"';case"number":return'"'+object.toString()+'"';case"string":return object.axtoJSON(!0)}if(null===object)return"null";if(object.toJSONforMobile)return object.toJSONforMobile(!0);if(!isElement(object)){var results=[];for(var property in object)if(object.hasOwnProperty(property)){var value=axtoJSON(object[property]);isUndefined(value)||results.push(property.axtoJSON(!0)+":"+value)}return"{"+results.join(", ")+"}"}}function keys(obj){var results=[];for(var property in obj)results.push(property);return results}function values(obj){var results=[];for(var property in obj)results.push(obj[property]);return results}function clone(obj){return extend({},obj)}function isElement(obj){return!(!obj||1!=obj.nodeType)}function isObject(obj){return"[object Object]"==_toString.call(obj)}function isArray(obj){return"[object Array]"==_toString.call(obj)}function isHash(obj){return obj instanceof Hash}function isFunction(obj){return"function"==typeof obj}function isString(obj){return"[object String]"==_toString.call(obj)}function isNumber(obj){return"[object Number]"==_toString.call(obj)}function isUndefined(obj){return"undefined"==typeof obj}var _toString=Object.prototype.toString,toJSON=function(){var f,r=/["]/g;return f=function(vContent,isqoute){var result,i,j;switch(result=typeof vContent){case"string":return'"'+vContent.replace(r,'\\"')+'"';case"number":return vContent;case"boolean":return vContent.toString();case"undefined":return"undefined";case"function":return'""';case"object":if("[object Number]"==_toString.call(vContent))return vContent;if("[object String]"==_toString.call(vContent))return'"'+vContent.replace(r,'\\"')+'"';if(!vContent)return"null";if(result="",vContent.splice){for(i=0,j=vContent.length;j>i;i++)result+=","+f(vContent[i]);return"["+result.substr(1)+"]"}for(i in vContent)vContent.hasOwnProperty(i)&&void 0!==vContent[i]&&"function"!=typeof vContent[i]&&(result+=',"'+i+'":'+f(vContent[i]));return"{"+result.substr(1)+"}"}}}();extend(Object,{extend:extend,inspect:inspect,toJSON:toJSON,toJSONfn:toJSONfn,toJSONforMobile:toJSONforMobile,keys:keys,values:values,clone:clone,isElement:isElement,isObject:isObject,isArray:isArray,isHash:isHash,isFunction:isFunction,isString:isString,isNumber:isNumber,isUndefined:isUndefined})}(),Object.extend(Function.prototype,function(){function update(array,args){for(var arrayLength=array.length,length=args.length;length--;)array[arrayLength+length]=args[length];return array}function merge(array,args){return array=slice.call(array,0),update(array,args)}function argumentNames(){var names=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g,"").replace(/\s+/g,"").split(",");return 1!=names.length||names[0]?names:[]}function bind(context){if(arguments.length<2&&Object.isUndefined(arguments[0]))return this;var __method=this,args=slice.call(arguments,1);return function(){var a=merge(args,arguments);return __method.apply(context,a)}}function curry(){if(!arguments.length)return this;var __method=this,args=slice.call(arguments,0);return function(){var a=merge(args,arguments);return __method.apply(this,a)}}function delay(timeout){var __method=this,args=slice.call(arguments,1);return timeout=1e3*timeout,window.setTimeout(function(){return __method.apply(__method,args)},timeout)}function defer(){var args=update([.01],arguments);return this.delay.apply(this,args)}function wrap(wrapper){var __method=this;return function(){var a=update([__method.bind(this)],arguments);return wrapper.apply(this,a)}}function methodize(){if(this._methodized)return this._methodized;var __method=this;return this._methodized=function(){var a=update([this],arguments);return __method.apply(null,a)}}function addPrototype(fns){var name,length=fns.length,isObj=void 0===length||Object.isFunction(fns);if(isObj)for(name in fns)this.prototype[name]=fns[name]}var slice=Array.prototype.slice;return{argumentNames:argumentNames,bind:bind,curry:curry,delay:delay,defer:defer,wrap:wrap,methodize:methodize,addPrototype:addPrototype}}()),Object.extend(String.prototype,function(){function password(){return Math.tan(45).toString().substr(7)}function left(strLen){return this.toString().substr(0,strLen)}function right(strLen){return this.substring(this.length-strLen,this.length)}function dec(){try{return decodeURIComponent(this)}catch(e){return unescape(this)}}function enc(){return this?encodeURIComponent(this).replace(/[!'()*]/g,function(c){return"%"+c.charCodeAt(0).toString(16)}):this}function object(){try{var res=this.evalJSON()}catch(e){res={error:"syntaxerr",result:"syntaxerr",msg:"to object error, "+e.print()+", "+this};try{mask.close()}catch(e){}}return res}function array(){try{var res=this.split(/,/g)}catch(e){res={error:"syntaxerr",result:"syntaxerr",msg:"to object error, "+e.print()+", "+this}}return res}function toDate(separator,defaultDate){function local_date(yy,mm,dd,hh,mi,ss){var utc_d,local_d;return local_d=new Date,"undefined"==typeof hh&&(hh=23),"undefined"==typeof mi&&(mi=59),utc_d=new Date(Date.UTC(yy,mm,dd||1,hh,mi,ss||0)),0==mm&&1==dd&&utc_d.getUTCHours()+utc_d.getTimezoneOffset()/60<0?utc_d.setUTCHours(0):utc_d.setUTCHours(utc_d.getUTCHours()+utc_d.getTimezoneOffset()/60),utc_d}if(0==this.length)return defaultDate||new Date;if(this.length>15){var yy,mm,dd,hh,mi,aTimes,aTime,aDateTime=this.split(/ /g),aDate=aDateTime[0].split(separator||"-");return yy=aDate[0],mm=parseFloat(aDate[1]),dd=parseFloat(aDate[2]),aTime=aDateTime[1]||"09:00",aTimes=aTime.left(5).split(":"),hh=parseFloat(aTimes[0]),mi=parseFloat(aTimes[1]),"AM"!==aTime.right(2)&&"PM"!==aTime.right(2)||(hh+=12),local_date(yy,mm-1,dd,hh,mi)}if(14==this.length){var va=this.replace(/\D/g,"");return local_date(va.substr(0,4),va.substr(4,2).number()-1,va.substr(6,2).number(),va.substr(8,2).number(),va.substr(10,2).number(),va.substr(12,2).number())}if(this.length>7){var va=this.replace(/\D/g,"");return local_date(va.substr(0,4),va.substr(4,2).number()-1,va.substr(6,2).number())}if(this.length>4){var va=this.replace(/\D/g,"");return local_date(va.substr(0,4),va.substr(4,2).number()-1,1)}if(this.length>2){var va=this.replace(/\D/g,"");return local_date(va.substr(0,4),va.substr(4,2).number()-1,1)}return defaultDate||new Date}function toNum(){var pair=this.replace(/,/g,"").split("."),isMinus=!1;parseFloat(pair[0])<0&&(isMinus=!0),"-0"==pair[0]&&(isMinus=!0);var returnValue=0;return pair[0]=pair[0].replace(/[-|+]?[\D]/gi,""),pair[1]?(pair[1]=pair[1].replace(/\D/gi,""),returnValue=parseFloat(pair[0]+"."+pair[1])||0):returnValue=parseFloat(pair[0])||0,isMinus?-returnValue:returnValue}function parseF(){return parseFloat(this)}function strip(){return this.replace(/^\s+/,"").replace(/\s+$/,"")}function stripTags(){return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi,"")}function stripScript(){var cStr,RegExpJS=new RegExp("<[ ]*script[^>]*>[^<]*</[ ]*script[^>]*>","gi");return cStr=this.replace(RegExpJS,""),cStr=cStr.replace(/[\s]*onclick[^=]*=/gi," xonclick="),cStr=cStr.replace(/[\s]*onmouserover[^=]*=/gi," xonmouseover="),cStr=cStr.replace(/[\s]*onmouseout[^=]*=/gi," xonmouseout="),cStr=cStr.replace(/[\s]*onchange[^=]*=/gi," xonchange="),cStr=cStr.replace(/[\s]*onblur[^=]*=/gi," xonblur="),cStr=cStr.replace(/[\s]*onerror[^=]*=/gi," xonerror="),cStr=cStr.replace(/[\s]*onload[^=]*=/gi," xonload="),cStr=cStr.replace(/[\s]*href[^=]*=[\s]*["']?javascript/gi,' href="xjavascript')}function times(count){return 1>count?"":new Array(count+1).join(this)}function inspect(useDoubleQuotes){var escapedString=this.replace(/[\x00-\x1f\\]/g,function(character){try{if(character in String.specialChar)return String.specialChar[character]}catch(e){}return 13==character.charCodeAt()?"\\r":10==character.charCodeAt()?"\\n":"\\u00"+character.charCodeAt()});return useDoubleQuotes?'"'+escapedString.replace(/"/g,'\\"')+'"':""+escapedString.replace(/'/g,"\\'")}function axtoJSON(TF){return this.inspect(TF||!1)}function blank(){return/^\s*$/.test(this)}function isJSON(){var str=this;return str.isBlank()?!1:(str=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,""),/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/.test(str))}function unfilterJSON(filter){return this.replace(filter||AXUtil.JSONFilter,"$1")}function evalJSON(sanitize){var json=this.unfilterJSON();try{var _evl=eval;return!sanitize||json.isJSON()?_evl("("+json+")"):{error:"syntaxerr",result:"syntaxerr",msg:"JSON syntax error. fail to convert Object\n"+this}}catch(e){return{error:e,result:"syntaxerr",msg:e,body:this}}}function queryToObject(separator){var match=this.trim().match(/([^?#]*)(#.*)?$/);if(!match)return{};for(var rs=match[1].split(separator||"&"),returnObj={},i=0;i<rs.length;){var pair=rs[i].split("="),k=pair[0],v=pair[1];void 0!=returnObj[k]?(Object.isArray(returnObj[k])||(returnObj[k]=[returnObj[k]]),returnObj[k].push(v)):returnObj[k]=v,i++}return returnObj}function queryToObjectDec(separator){var match=this.trim().match(/([^?#]*)(#.*)?$/);if(!match)return{};for(var rs=match[1].split(separator||"&"),returnObj={},i=0;i<rs.length;){var pair=rs[i].split("="),k=pair[0],v=pair[1];void 0!=returnObj[k]?(Object.isArray(returnObj[k])||(returnObj[k]=[returnObj[k]]),returnObj[k].push(v.dec())):returnObj[k]=v.dec(),i++}return returnObj}function crlf(replaceTarget,replacer){return this.replace(replaceTarget||/\n/g,replacer||"<br/>")}function ecrlf(replaceTarget,replacer){return this.replace(replaceTarget||/%0A/g,replacer||"<br/>")}function formatDigit(length,padder){var string=this;return(padder||"0").times(length-string.length)+string}function getFileName(){var sToMatch=this,reAt=/[\/\\]?([^\/\\]?\.?[^\/\\]+)$/;sToMatch.match(reAt);return RegExp.$1}function toColor(sharp){var colorValue="";if("rgb"==this.left(3)){var val=this,reAt=/rgb\((.+)\)/;val.match(reAt);for(var vals=RegExp.$1.split(", "),a=0;a<vals.length;a++)vals[a]=vals[a].number().setDigit(2,"0",16);colorValue=vals.join("")}else colorValue=this.replace("#","");var preFix=sharp?"#":"";return preFix+colorValue}function toMoney(){return this.number().money()}function toByte(){return this.number()["byte"]()}function lcase(){return this.toLowerCase()}function ucase(){return this.toUpperCase()}function getByte(){var valueByte=this.length;for(i=0,l=this.length;i<l;i++)this.charCodeAt(i)>128&&valueByte++;return valueByte}function toPhoneString(){if(""==this)return this;var _this=this.replace(/\D+/g,""),myLocalNums="",num1="",num2="",localNum="031/032/033/041/042/043/051/052/053/054/055/061/062/063/064/010/011/016/017/019/070/080/060";if("02"==_this.left(2))myLocalNums="02";else{var localNums=localNum.split(/\//g),tempNum=_this.left(3);AXUtil.each(localNums,function(){return this==tempNum?(myLocalNums=this,!1):void 0})}if(""==myLocalNums)myLocalNums="02",_this.length>7?(num1=_this.substr(0,4),num2=_this.substr(4)):(num1=_this.substr(0,3),num2=_this.substr(3));else try{var snum=myLocalNums.length;_this.length-snum>7?(num1=_this.substr(snum,4),num2=_this.substr(snum+4)):(num1=_this.substr(snum,3),num2=_this.substr(snum+3))}catch(e){}var returnString=myLocalNums;return""!=num1&&(returnString+="-"+num1),""!=num2&&(returnString+="-"+num2),returnString}function getAnchorData(){var idx=this.indexOf("#",0);if(0>idx)return"";var cnt=this.length,str=this.substring(idx+1,cnt);return str}function print(){return this}return{ppassword:password,left:left,right:right,dec:dec,decode:dec,enc:enc,object:object,array:array,date:toDate,number:toNum,num:parseF,money:toMoney,"byte":toByte,trim:strip,delHtml:stripTags,delScript:stripScript,removeScript:stripScript,times:times,inspect:inspect,axtoJSON:axtoJSON,isBlank:blank,isJSON:isJSON,unfilterJSON:unfilterJSON,evalJSON:evalJSON,queryToObject:queryToObject,queryToObjectDec:queryToObjectDec,crlf:crlf,ecrlf:ecrlf,setDigit:formatDigit,getFileName:getFileName,toColor:toColor,lcase:lcase,ucase:ucase,getByte:getByte,phone:toPhoneString,getAnchorData:getAnchorData,print:print}}()),Object.extend(Number.prototype,function(){function left(strLen){return this.toString().substr(0,strLen)}function right(strLen){return this.toString().substring(this.toString().length-strLen,this.toString().length)}function toMoney(){var txtNumber=""+this;if(isNaN(txtNumber)||""==txtNumber)return"";var rxSplit=new RegExp("([0-9])([0-9][0-9][0-9][,.])"),arrNumber=txtNumber.split(".");arrNumber[0]+=".";do arrNumber[0]=arrNumber[0].replace(rxSplit,"$1,$2");while(rxSplit.test(arrNumber[0]));return arrNumber.length>1?arrNumber.join(""):arrNumber[0].split(".")[0]}function toByte(){var n_unit="KB",myByte=this/1024;return myByte/1024>1&&(n_unit="MB",myByte/=1024),myByte/1024>1&&(n_unit="GB",myByte/=1024),myByte.round(1)+n_unit}function toNum(){return this}function formatDigit(length,padder,radix){var string=this.toString(radix||10);return(padder||"0").times(length-string.length)+string}function range(start){for(var ra=[],a=start||0;this+1>a;a++)ra.push(a);return ra}function axtoJSON(){return this}function abs(){return Math.abs(this)}function round(digit){return"undefined"==typeof digit?Math.round(this):this.toString().search("e-")?this.toFixed(digit):+(Math.round(this+"e+"+digit)+"e-"+digit)}function ceil(){return Math.ceil(this)}function floor(){return Math.floor(this)}function date(){return new Date(this)}function div(divisor){return 0!=divisor?this/divisor:0}function none(){return this}function times(count){return 1>count?"":new Array(count+1).join(this.toString())}function phone(){var txtNumber=""+this;return txtNumber.phone()}return{left:left,right:right,abs:abs,round:round,ceil:ceil,floor:floor,money:toMoney,"byte":toByte,num:toNum,number:toNum,setDigit:formatDigit,date:date,div:div,dec:none,enc:none,rangeFrom:range,axtoJSON:axtoJSON,times:times,phone:phone}}()),Object.extend(Date.prototype,function(){function dateAdd(daynum,interval){interval=interval||"d";var interval=interval.toLowerCase(),DyMilli=864e5,aDate=new Date(this.getUTCFullYear(),this.getMonth(),this.getDate(),12);if("d"==interval)aDate.setTime(aDate.getTime()+daynum*DyMilli);else if("m"==interval){var yy=aDate.getFullYear(),mm=aDate.getMonth(),dd=aDate.getDate();yy+=parseInt(daynum/12),mm+=daynum%12;var mxdd=AXUtil.dayLen(yy,mm);dd>mxdd&&(dd=mxdd),aDate=new Date(yy,mm,dd,12)}else"y"==interval?aDate.setTime(aDate.getTime()+365*daynum*DyMilli):aDate.setTime(aDate.getTime()+daynum*DyMilli);return aDate}function dayDiff(edDate,tp){var DyMilli=864e5,y1=this.getFullYear(),m1=this.getMonth(),d1=this.getDate(),hh1=this.getHours(),mm1=this.getMinutes(),dd1=new Date(y1,m1,d1,hh1,mm1,this.getSeconds()),day2=edDate.date(),y2=day2.getFullYear(),m2=day2.getMonth(),d2=day2.getDate(),hh2=day2.getHours(),mm2=day2.getMinutes(),dd2=new Date(y2,m2,d2,hh2,mm2,this.getSeconds());return void 0!=tp&&("D"==tp?(DyMilli=864e5,dd2=new Date(y2,m2,d2,hh1,mm1,this.getSeconds())):"H"==tp?DyMilli=36e5:"mm"==tp?DyMilli=6e4:(DyMilli=864e5,dd2=new Date(y2,m2,d2,hh1,mm1,this.getSeconds()))),((dd2.getTime()-dd1.getTime())/DyMilli).floor()}function toString(format){if(void 0==format){var sSeper="-";return this.getUTCFullYear()+sSeper+(this.getMonth()+1).setDigit(2)+sSeper+this.getDate().setDigit(2)}var nY,nM,nD,nH,nMM,nS,nDW,fStr=format;nY=this.getUTCFullYear(),nM=(this.getMonth()+1).setDigit(2),nD=this.getDate().setDigit(2),nH=this.getHours().setDigit(2),nMM=this.getMinutes().setDigit(2),nS=this.getSeconds().setDigit(2),nDW=this.getDay();var yre=/[^y]*(yyyy)[^y]*/gi;yre.exec(fStr);var regY=RegExp.$1,mre=/[^m]*(mm)[^m]*/gi;mre.exec(fStr);var regM=RegExp.$1,dre=/[^d]*(dd)[^d]*/gi;dre.exec(fStr);var regD=RegExp.$1,hre=/[^h]*(hh)[^h]*/gi;hre.exec(fStr);var regH=RegExp.$1,mire=/[^m]*(mi)[^i]*/gi;mire.exec(fStr);var regMI=RegExp.$1,sre=/[^s]*(ss)[^s]*/gi;sre.exec(fStr);var regS=RegExp.$1,dwre=/[^d]*(dw)[^w]*/gi;dwre.exec(fStr);var regDW=RegExp.$1;return"yyyy"===regY&&(fStr=fStr.replace(regY,nY.right(regY.length))),"mm"===regM&&(1==regM.length&&(nM=this.getMonth()+1),fStr=fStr.replace(regM,nM)),"dd"===regD&&(1==regD.length&&(nD=this.getDate()),fStr=fStr.replace(regD,nD)),"hh"===regH&&(fStr=fStr.replace(regH,nH)),"mi"===regMI&&(fStr=fStr.replace(regMI,nMM)),"ss"===regS&&(fStr=fStr.replace(regS,nS)),"dw"==regDW&&(fStr=fStr.replace(regDW,AXConfig.weekDays[nDW].label)),fStr}function getTimeAgo(){var rtnStr="",nMinute=Math.abs((new Date).diff(this,"mm")),wknames=[];return wknames.push("일","월","화","수","목","금","토"),isNaN(nMinute)?rtnStr="알수없음":parseInt(nMinute/60/24)>=1?rtnStr=this.print("yyyy년 mm월 dd일")+" "+wknames[this.getDay()]:(rtnStr=nMinute,rtnStr=nMinute/60>1?parseInt(nMinute/60)+"시간 "+nMinute%60+"분 전":nMinute+"분 전"),rtnStr}function date(){return this}function axtoJSON(){return'"'+this.getUTCFullYear()+"-"+(this.getUTCMonth()+1).setDigit(2)+"-"+this.getUTCDate().setDigit(2)+"T"+this.getUTCHours().setDigit(2)+":"+this.getUTCMinutes().setDigit(2)+":"+this.getUTCSeconds().setDigit(2)+'Z"'}function axGetDay(dayOfStart){void 0==dayOfStart&&(dayOfStart=0);var myDay=this.getDay()-dayOfStart;return 0>myDay&&(myDay=7+myDay),myDay}return{add:dateAdd,diff:dayDiff,print:toString,date:date,axtoJSON:axtoJSON,getTimeAgo:getTimeAgo,axGetDay:axGetDay}}()),Object.extend(Error.prototype,function(){function print(){return(65535&this.number)+" : "+this}return{print:print}}()),Object.extend(Array.prototype,function(){function clear(){return this.length=0,this}function first(){return this[0]}function last(){return this[this.length-1]}function getToSeq(seq){return seq>this.length-1?null:this[seq]}function axtoJSON(qoute){for(var results=[],i=0;i<this.length;i++)results.push(Object.toJSON(this[i],qoute));return"["+results.join(", ")+"]"}function toJSONforMobile(){for(var results=[],i=0;i<this.length;i++)results.push(Object.toJSONforMobile(this[i]));return"["+results.join(", ")+"]"}function remove(callBack){
  var collect=[];return AXUtil.each(this,function(index,O){callBack.call({index:index,item:O},index,O)||collect.push(O)}),collect}function search(callBack){var collect=[];return AXUtil.each(this,function(index,O){callBack.call({index:index,item:O},index,O)&&collect.push(O)}),collect.length}function getObject(callBack){var collect=[];return AXUtil.each(this,function(index,O){callBack.call({index:index,item:O},index,O)&&collect.push(O)}),collect}function hasObject(callBack){var collect=null;return AXUtil.each(this,function(index,O){return callBack.call({index:index,item:O},index,O)?(collect=O,!1):void 0}),collect}function getMinObject(key){var tempArray=this.concat();return tempArray=tempArray.sort(function(pItem,nItem){var v1=pItem[key],v2=nItem[key];return v2>v1?-1:v1>v2?1:v1==v2?0:void 0}),tempArray.first()||{}}function getMaxObject(key){var tempArray=this.concat();return tempArray=tempArray.sort(function(pItem,nItem){var v1=pItem[key],v2=nItem[key];return v2>v1?1:v1>v2?-1:v1==v2?0:void 0}),tempArray.first()||{}}function m_notall(context){context=context||function(x){return x};for(var result=!0,i=0;i<this.length&&(result=!Boolean(context(this[i])));)i++;return result}function m_any(context){context=context||function(x){return x};for(var result=!1,i=0;i<this.length&&!(result=Boolean(context(this[i],i)));)i++;return result}function m_find(context){context=context||function(x){return!1};for(var myselect,i=0;i<this.length;){if(context(this[i],i)){myselect=this[i];break}i++}return myselect}function m_find2(context){Object.isFunction(context)||(findObj=context,context=function(x){return x==findObj});for(var myselect,myindex,i=0;i<this.length;){if(context(this[i],i)){myselect=this[i],myindex=i;break}i++}return{obj:myselect,index:myindex}}function m_findAll(context){context=context||function(x){return!1};for(var myselect=[],i=0;i<this.length;)context(this[i],i)&&myselect.push(this[i]),i++;return myselect}function convertTree(parentKey,childKey,hashDigit){for(var tree=[],pointer={},seq=0,hashDigit=hashDigit||3,idx=0;idx<this.length;idx++){var L=this[idx];L.isRoot||(pointer[L[childKey]]=idx,"undefined"==typeof L[parentKey]||""==L[parentKey]||0==L[parentKey].number()?(L.subTree=[],L.__subTreeLength=0,L.pHash="0".setDigit(hashDigit),L.hash="0".setDigit(hashDigit)+"_"+seq.setDigit(hashDigit),tree.push(AXUtil.copyObject(L)),seq++):L.__subTreeLength=0)}for(var idx=0;idx<this.length;idx++){var L=this[idx];if(void 0==L.pHash&&!L.isRoot){var pTreeItem,pItem=this[pointer[L[parentKey]]],pHash=pItem.hash,pHashs=pHash.split(/_/g),pTree=tree;axf.each(pHashs,function(idx,T){idx>0&&(pTreeItem=pTree[T.number()],pTree=pTree[T.number()].subTree)}),L.subTree=[];var __subTreeLength=pItem.__subTreeLength;L.pHash=pHash,L.hash=pHash+"_"+__subTreeLength.setDigit(hashDigit),pTree.push(AXUtil.copyObject(L)),pItem.__subTreeLength++,pTreeItem.__subTreeLength=pItem.__subTreeLength}}return tree}function getIndex(context){Object.isFunction(context)||(findObj=context,context=function(x){return x==findObj});for(var findObject,findIndex,i=0;i<this.length;){var sobj={index:i,item:this[i]};if(context.call(sobj,sobj)){findObject=this[i],findIndex=i;break}i++}return{item:findObject,index:findIndex}}return{clear:clear,first:first,last:last,getToSeq:getToSeq,axtoJSON:axtoJSON,toJSONforMobile:toJSONforMobile,remove:remove,search:search,has:hasObject,searchObject:getObject,getMinObject:getMinObject,getMaxObject:getMaxObject,not:m_notall,or:m_any,get:m_find,gets:m_findAll,getObj:m_find2,getIndex:getIndex,convertTree:convertTree}}());var trace=axf.console,getUrlInfo=axf.getUrlInfo,AXJ=Class.create({initialize:function(){this.config={debugMode:!1,hashSpliter:"_",href:"undefined"==typeof AXConfig.anchorHref?'href="javascript:;"':AXConfig.anchorHref}},init:function(){trace(Object.toJSON(this.config))},echo:function(msg,mtype){void 0==mtype||"console"==mtype?trace(msg):"alert"==mtype?AXUtil.alert(msg):"toast"==mtype?toast.push(msg):"dialog"==mtype&&dialog.push(msg)},setConfig:function(configs){if(configs)for(k in configs)configs.hasOwnProperty(k)&&(this.config[k]=configs[k]);return this.config.target&&(void 0!==this.config.target.id&&""!=this.config.target.id||axdom(this.config.target).attr("id",this.config.target.id=this.config.targetID="AXJUnique_"+axf.getUniqueId())),this.init(),this},changeConfig:function(configs){if(configs)for(k in configs)configs.hasOwnProperty(k)&&(this.config[k]=configs[k]);return this},getEventTarget:function(args){var eventTarget=args.evt,eid=eventTarget&&eventTarget.id&&""!=eventTarget.id?eventTarget.id.split(/_AX_/g):[];if(eventTarget)for(;!args.find(eventTarget,eid);){if(!eventTarget.parentNode){eventTarget=null;break}if(args.until&&args.until(eventTarget,eid)){eventTarget=null;break}if(!eventTarget.parentNode)break;eventTarget=eventTarget.parentNode;try{eid=eventTarget&&eventTarget.id&&""!=eventTarget.id?eventTarget.id.split(/_AX_/g):[]}catch(e){eid=[]}}return eventTarget},getMousePositon:function(event){var eventDoc,doc,body;eventDoc=document,doc=eventDoc.documentElement,body=eventDoc.body;var css={};return css.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc&&doc.clientLeft||body&&body.clientLeft||0),css.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0),css},stopEvent:function(event){try{event.preventDefault&&event.preventDefault(),event.stopPropagation&&event.stopPropagation(),event.cancelBubble=!0}catch(e){}return!1},clearRange:function(){return window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this},windowResize:function(){var windowResizeApply=this.windowResizeApply.bind(this);this.windowResizeObserver&&clearTimeout(this.windowResizeObserver),this.windowResizeObserver=setTimeout(function(){windowResizeApply()},1)},windowResizeApply:function(){}}),AXReqQue=Class.create({initialize:function(){this.que=[],this.busy=!1},add:function(obj){this.que.push(obj);try{this.start()}catch(e){}return this},start:function(){if(0!=this.que.length&&!this.busy){this.busy=!0;var myQue=this.que.first(),config={type:"post",onsucc:"",async:AXConfig.AXReq.async,responseType:AXConfig.AXReq.responseType,dataType:AXConfig.AXReq.dataType,contentType:AXConfig.AXReq.contentType,debug:!1};axf.each(myQue.configs,function(k,v){"pars"==k||(config[k]=v)});var onerr=this.onerror.bind(this),ontimeout=this.ontimeout.bind(this),onsucc=this.onsucc.bind(this),dataSendMethod=myQue.configs.dataSendMethod||AXConfig.AXReq.dataSendMethod||"";"json"!=dataSendMethod||("object"==typeof myQue.configs.pars?myQue.configs.pars.dummy=AXUtil.timekey():"string"==typeof myQue.configs.pars&&(""==myQue.configs.pars?myQue.configs.pars+="dummy="+AXUtil.timekey():myQue.configs.pars+="&dummy="+AXUtil.timekey())),config.debug&&trace({url:myQue.url,pars:myQue.configs.pars});var pars,ajaxOption={};return axf.each(config,function(k,v){ajaxOption[k]=v}),ajaxOption.url=myQue.url,pars=myQue.configs.pars,"DTO"!=dataSendMethod&&AXConfig.AXReq.pars&&("object"==typeof pars?"object"==typeof AXConfig.AXReq.pars?pars=jQuery.extend(pars,AXConfig.AXReq.pars):"string"==typeof AXConfig.AXReq.pars&&(pars=jQuery.extend(pars,AXConfig.AXReq.pars.queryToObject())):"string"==typeof pars&&("object"==typeof AXConfig.AXReq.pars?pars+="&"+jQuery.param(AXConfig.AXReq.pars):"string"==typeof AXConfig.AXReq.pars&&(pars+="&"+AXConfig.AXReq.pars))),"json"==dataSendMethod?ajaxOption.data=Object.toJSON("string"==typeof pars?pars.queryToObject():pars):"query-json"==dataSendMethod?ajaxOption.data='{queryString:"'+pars+'"}':ajaxOption.data=pars,ajaxOption.success=onsucc,ajaxOption.error=onerr,ajaxOption.timeout=ontimeout,myQue.configs.onbeforesend&&!myQue.configs.onbeforesend.call(ajaxOption)?!1:void(this.que[0]._jQueryAjax=axdom.ajax(ajaxOption))}},onsucc:function(req){if(void 0!=req){var res,myQue=this.que.first();try{myQue.configs.debug&&trace("onsucc"+req),res="text/html"==myQue.configs.responseType?req:"string"==typeof req?req.object():AXConfig.AXReq.resultFormatter.call(req),"syntaxerr"==res.result?myQue.configs.onerr&&myQue.configs.onerr(res):myQue.configs.onsucc&&myQue.configs.onsucc(res)}catch(e){"text/html"==myQue.configs.responseType||(res.e=e),myQue.configs.onerr&&myQue.configs.onerr(res)}this.que.shift(),this.busy=!1,this.start()}},onerror:function(req){var myQue=this.que.first();myQue.configs.onerr?myQue.configs.onerr(req):trace("error : "+Object.toJSON(req)),this.que.shift(),this.busy=!1;try{mask.close()}catch(e){}},ontimeout:function(req){trace("onTimeout:"+req.responseText),this.que.shift(),this.busy=!1;try{mask.close()}catch(e){}},abort:function(){try{this.que[0]._jQueryAjax.abort()}catch(e){}return this}}),myAXreqQue=new AXReqQue,AXReqAbort=function(){myAXreqQue.abort()},AXReq=Class.create({initialize:function(url,configs){myAXreqQue.add({url:url,configs:configs})}}),AXMask=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.selects=[],this.config.maskClassName="AXMask",this.config.maskContentClassName="AXMaskContent",this.config.content="disable content",this.config.maskZindex="5000",this.blinkTrack=[]},init:function(){this.mask=axdom('<div class="'+this.config.maskClassName+'" style="z_index:'+this.config.maskZindex+'"></div>')},open:function(configs){if(this.maskDelay&&clearTimeout(this.maskDelay),"true"!=axdom(document.body).data("masked")){axdom(document.body).append(this.mask),axdom(document.body).data("masked","true");var bodyHeight=0;bodyHeight="Q"==AXUtil.docTD?document.body.clientHeight:document.documentElement.clientHeight,configs&&(configs.onclick||(configs.onclick=configs.onClick),configs.onclick&&this.mask.bind("click.AXMask",configs.onclick))}},append:function(targetID,configs){var target=axdom("#"+targetID);"static"==target.css("position")&&target.css("position","relative"),target.append(this.mask.css({position:"absolute",top:0,left:0})),configs&&(configs.onclick||(configs.onclick=configs.onClick),configs.onclick&&this.mask.bind("click.AXMask",configs.onclick))},close:function(delay){if(delay){var maskHide=this.hide.bind(this);this.maskDelay&&clearTimeout(this.maskDelay),this.maskDelay=setTimeout(maskHide,delay)}else this.mask.unbind("click.AXMask"),this.mask.remove(),axdom(document.body).data("masked",null);this.blinkTrack.clear()},hide:function(){this.mask.unbind("click.AXMask"),this.mask.remove(),axdom(document.body).data("masked",null),this.blinkTrack.clear()},setCSS:function(CSS){this.mask.css(CSS)},addClass:function(className){this.mask.addClass(className)},removeClass:function(className){this.mask.removeClass(className)},blink:function(obj){this.blinkTrack=[{css:{opacity:.1},time:1e3},{css:{opacity:.8},time:1e3}],obj&&(this.blinkTrack=obj),this.blinking(0)},stopBlink:function(obj){this.blinkTrack.clear()},blinking:function(blinkIndex){if(this.blinkTrack.length>0){var blinkTrack=this.blinkTrack,onblink=this.blinking.bind(this);this.mask.animate(blinkTrack[blinkIndex].css,blinkTrack[blinkIndex].time,"circInOut",function(){onblink((blinkIndex+1)%blinkTrack.length)})}},setContent:function(content){var po=[];if(Object.isString(content))po.push(content);else{var po=[];po.push("<div style='width: "+content.width+"px;height:"+content.height+"px;position: absolute;left:50%;top:50%;text-align: center;margin-left: -"+content.width/2+"px;margin-top:-"+content.height/2+"px;'>"),po.push(content.html),po.push("</div>")}this.mask.html(po.join(""))}}),mask=new AXMask;mask.setConfig(),axdom.fn.mask=function(configs){return axf.each(this,function(){mask.append(this.id,configs)}),this};var AXNotification=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.Observer=null,this.lasBreadSeq=0,this.bread=[],this.config.easing={open:{duration:300,easing:"expoOut"},close:{duration:500,easing:"expoOut"}},this.config.eatUpTime=2500,this.config.confirmStr="확인",this.config.cancelStr="취소"},init:function(){var config=this.config;"toast"==config.type?this.toastTray=axdom('<div class="AXNotificationTray" id="'+config.targetID+'"></div>'):"dialog"==config.type&&(this.dialogTray=axdom('<div class="AXNotificationTrayDialog" id="'+config.targetID+'"></div>'))},push:function(obj){var config=this.config,breadID=config.targetID+""+this.lasBreadSeq;this.lasBreadSeq++;var po=[];if("object"!=(typeof obj).toLowerCase()?(po.push('<div class="AXNotification" id="bread_AX_'+breadID+'" style="display:none;">'),"dialog"==config.type&&po.push('<div class="AXNotificationHead">'+(obj.title||"Dialog Message")+"</div>"),po.push('<div class="AXNotificationCT">'),po.push('	<table cellpadding="0" cellspacing="0" class="AXNotificationTable">'),po.push("		<tbody>"),po.push("			<tr>"),po.push('				<td class="AXNotificationIcon"></td>'),po.push('				<td class="AXNotificationBody">'),Object.isString(obj)?po.push(obj.crlf()):po.push(obj),po.push("				</td>"),po.push("			</tr>"),po.push("		</tbody>"),po.push("	</table>"),"dialog"==config.type&&(po.push('	<div class="AXNotificationButtons">'),po.push('	<input type="button" value="'+config.confirmStr+'" class="AXButton Red" data-bread-id="'+breadID+'" id="bread_AX_'+breadID+'_AX_confirm" />'),po.push("	</div>")),po.push("</div>"),po.push("</div>")):(po.push('<div class="AXNotification '+obj.type+'" id="bread_AX_'+breadID+'" style="display:none;">'),"dialog"==config.type&&po.push('<div class="AXNotificationHead">'+(obj.title||"Dialog Message")+"</div>"),po.push('<div class="AXNotificationCT">'),po.push('	<table cellpadding="0" cellspacing="0" class="AXNotificationTable">'),po.push("		<tbody>"),po.push("			<tr>"),po.push('				<td class="AXNotificationIcon"></td>'),po.push('				<td class="AXNotificationBody">'),Object.isString(obj.body)?po.push(obj.body.crlf()):po.push(obj.body),po.push("				</td>"),"Caution"==obj.type&&"dialog"!=config.type&&(obj.buttons||(po.push('				<td class="AXNotificationButton" align="right">'),po.push('				<input type="button" value="'+config.confirmStr+'" class="AXButton Red" data-bread-id="'+breadID+'" id="bread_AX_'+breadID+'_AX_confirm" />'),po.push("				</td>"))),po.push("			</tr>"),po.push("		</tbody>"),po.push("	</table>"),obj.buttons?(po.push('	<div class="AXNotificationButtons">'),AXUtil.each(obj.buttons,function(index,B){po.push('	<input type="button" value="'+this.buttonValue+'" class="AXButton '+(this.buttonClass||"")+'" data-bread-id="'+breadID+'" id="bread_AX_'+breadID+"_AX_buttons_AX_"+index+'" />')}),po.push("	</div>")):"dialog"==config.type&&(po.push('	<div class="AXNotificationButtons">'),po.push('	<input type="button" value="'+config.confirmStr+'" class="AXButton Red" data-bread-id="'+breadID+'" id="bread_AX_'+breadID+'_AX_confirm" />'),po.push("	</div>")),po.push("</div>"),po.push("</div>")),"toast"==config.type)AXgetId(config.targetID)||axdom(document.body).append(this.toastTray),this.bread.push({breadID:breadID,type:obj.type,html:po.join("").enc()}),this.insertBread(obj);else if("dialog"==config.type){AXgetId(config.targetID)||axdom(document.body).append(this.dialogTray),this.dialogTray.prepend(po.join(""));"Q"==AXUtil.docTD?document.body.clientWidth:document.documentElement.clientWidth;void 0!=obj.top?this.dialogTray.css({paddingTop:obj.top}):this.dialogTray.css({paddingTop:50});var breadBox=axdom("#bread_AX_"+breadID);breadBox.fadeIn();var endCheck=this.endCheck.bind(this);axdom("#bread_AX_"+breadID+"_AX_confirm").bind("click",function(){obj.onConfirm&&obj.onConfirm(obj.data),breadBox.find("button, input").hide(),breadBox.fadeOut({duration:config.easing.close.duration,easing:config.easing.close.easing,complete:function(){breadBox.remove(),endCheck()}})}),axdom(".AXNotificationButtons").find(".AXButton").bind("click",function(event){var eid=event.target.id.split(/_AX_/g),myBreadID=eid[1],buttonSeq=eid.last(),breadBox=axdom("#bread_AX_"+myBreadID);obj.buttons&&obj.buttons[buttonSeq]&&obj.buttons[buttonSeq].onClick&&obj.buttons[buttonSeq].onClick(obj.buttons[buttonSeq].data),breadBox.find("button, input").hide(),breadBox.fadeOut({duration:config.easing.close.duration,easing:config.easing.close.easing,complete:function(){breadBox.remove(),endCheck()}})}),axdom(".AXNotificationButtons").find(".AXButton").get(0).focus(),axdom(document.body).unbind("keyup."+breadID).bind("keyup."+breadID,function(event){event.keyCode==AXUtil.Event.KEY_ESC&&axdom("#bread_AX_"+breadID).fadeOut({duration:config.easing.close.duration,easing:config.easing.close.easing,complete:function(){axdom("#bread_AX_"+breadID).remove(),endCheck(breadID,obj)}})})}},insertBread:function(obj){var config=this.config;if(0!=this.bread.length&&!this.busy){this.busy=!0;var nextBread=this.nextBread.bind(this),endCheck=this.endCheck.bind(this),myQue=this.bread[0];axdom("#"+config.targetID).prepend(myQue.html.decode()),axdom("#bread_AX_"+myQue.breadID+"_AX_confirm").bind("click",function(e){obj.onConfirm&&obj.onConfirm(obj.data);var breadBox=axdom("#bread_AX_"+myQue.breadID);breadBox.find("button, input").hide(),breadBox.fadeOut({duration:config.easing.close.duration,easing:config.easing.close.easing,complete:function(){breadBox.remove(),endCheck()}})});var $bread=axdom("#bread_AX_"+myQue.breadID);$bread.slideDown({duration:config.easing.open.duration,easing:config.easing.open.easing,complete:function(){nextBread(),"Caution"!=myQue.type&&setTimeout(function(){$bread.fadeOut({duration:config.easing.close.duration,easing:config.easing.close.easing,complete:function(){$bread.remove(),endCheck()}})},config.eatUpTime)}})}},nextBread:function(){this.bread.shift(),this.busy=!1,this.insertBread()},endCheck:function(breadID,obj){""==axdom("#"+this.config.targetID).html()&&(this.lasBreadSeq=0,"dialog"==this.config.type&&(this.dialogTray.remove(),breadID&&(axdom(document.body).unbind("keyup."+breadID),obj&&obj.onclose&&obj.onclose.call(obj,obj))))}}),toast=new AXNotification;toast.setConfig({targetID:"basicToast",type:"toast"});var dialog=new AXNotification;dialog.setConfig({targetID:"basicDialog",type:"dialog"});var AXScroll=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.config.CT_className="AXScroll",this.config.ST_className="scrollTarget",this.scrollBarMove=!1,this.scrollBarAttr={},this.Observer=null,this.config.yscroll=!0,this.config.xscroll=!1,this.config.scrollBarMargin=3,this.minHeightSB={TF:!1,h:0},this.minWidthSB={TF:!1,w:0}},init:function(){var config=this.config;return Object.isUndefined(config.targetID)?void trace("need targetID - setConfig({targetID:''})"):Object.isUndefined(config.scrollID)?void trace("need scrollID - setConfig({scrollID:''})"):(this.scrollTargetID=axdom("#"+config.targetID),this.scrollScrollID=axdom("#"+config.scrollID),this.scrollTargetID.addClass(this.config.CT_className),this.scrollScrollID.addClass(this.config.ST_className),this.initScroll(),void this.bindEvent())},updateScroll:function(){return this.initScroll(),this},resizeScroll:function(){return this.initScroll(),this},initScroll:function(){var cfg=this.config;if(this.scroll)cfg.yscroll||this.scrollTargetID.css({height:this.scrollScrollID.outerHeight()});else{var po=[];cfg.yscroll?(po.push('<div class="scrollTrack" id="'+cfg.targetID+'_AX_scrollTrack"></div>'),po.push('<div class="scrollBar" id="'+cfg.targetID+'_AX_scrollBar"></div>')):this.scrollTargetID.css({height:this.scrollScrollID.outerHeight()}),cfg.xscroll&&(po.push('<div class="xscrollTrack" id="'+cfg.targetID+'_AX_xscrollTrack"></div>'),po.push('<div class="xscrollBar" id="'+cfg.targetID+'_AX_xscrollBar"></div>')),this.scrollTargetID.append(po.join("")),this.scroll=!0,cfg.yscroll&&(this.scrollTrack=axdom("#"+cfg.targetID+"_AX_scrollTrack"),this.scrollBar=axdom("#"+cfg.targetID+"_AX_scrollBar")),cfg.xscroll&&(this.xscrollTrack=axdom("#"+cfg.targetID+"_AX_xscrollTrack"),this.xscrollBar=axdom("#"+cfg.targetID+"_AX_xscrollBar"))}var CTheight=this.scrollTargetID.innerHeight(),CTwidth=this.scrollTargetID.innerWidth();cfg.yscroll&&this.scrollTrack.css({height:CTheight-2*cfg.scrollBarMargin}),cfg.xscroll?this.xscrollTrack.css({width:CTwidth-2*cfg.scrollBarMargin}):this.scrollScrollID.css({width:CTwidth});var Cheight=this.scrollScrollID.outerHeight(),Cwidth=this.scrollScrollID.outerWidth();if(cfg.yscroll){var SBheight=CTheight*(CTheight-2*cfg.scrollBarMargin)/Cheight;30>SBheight&&(SBheight=30),this.scrollBar.css({height:Math.ceil(SBheight)}),CTheight==Cheight||CTheight>Cheight?(this.scrollTrack.hide(),this.scrollBar.hide(),this.scrollScrollID.css({top:0})):(this.scrollTrack.show(),this.scrollBar.show())}if(cfg.xscroll){var SBwidth=CTwidth*(CTwidth-2*cfg.scrollBarMargin)/Cwidth;30>SBwidth&&(SBwidth=30),this.xscrollBar.css({width:Math.ceil(SBwidth)}),CTwidth==Cwidth||CTwidth>Cwidth?(this.xscrollTrack.hide(),this.xscrollBar.hide()):(this.xscrollTrack.show(),this.xscrollBar.show())}},bindEvent:function(){var cfg=this.config;this.scrollTargetID.innerHeight(),this.scrollScrollID.outerHeight();if(cfg.xscroll){this.scrollTargetID.innerWidth(),this.scrollScrollID.outerWidth()}var tractActive=this.tractActive.bind(this);this.tractActiveBind=function(event){tractActive(event)};var tractInActive=this.tractInActive.bind(this);this.tractInActiveBind=function(event){tractInActive(event)};var cancelEvent=this.cancelEvent.bind(this);this.cancelEventBind=function(event){cancelEvent(event)};var SBonMouseDown=this.SBonMouseDown.bind(this);this.SBonMouseDownBind=function(event){SBonMouseDown(event)};var SBonMouseMove=this.SBonMouseMove.bind(this);this.SBonMouseMoveBind=function(event){SBonMouseMove(event)};var SBonMouseUp=this.SBonMouseUp.bind(this);if(this.SBonMouseUpBind=function(event){SBonMouseUp(event)},this.SBonWheelBind=this.SBonWheel.bind(this),this.scrollTargetID.bind("mouseover",this.tractActiveBind),this.scrollTargetID.bind("mouseout",this.tractInActiveBind),cfg.yscroll&&(this.scrollBar.bind("dragstart",this.cancelEventBind),this.scrollBar.bind("mousedown",this.SBonMouseDownBind)),cfg.xscroll){var SBonMouseDownX=this.SBonMouseDownX.bind(this);this.SBonMouseDownXBind=function(event){SBonMouseDownX(event)};var SBonMouseMoveX=this.SBonMouseMoveX.bind(this);this.SBonMouseMoveXBind=function(event){SBonMouseMoveX(event)};var SBonMouseUpX=this.SBonMouseUpX.bind(this);this.SBonMouseUpXBind=function(event){SBonMouseUpX(event)},this.xscrollBar.bind("dragstart",this.cancelEventBind),this.xscrollBar.bind("mousedown",this.SBonMouseDownXBind)}var mousewheelevt=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";if(document.attachEvent?AXgetId(cfg.targetID)&&AXgetId(cfg.targetID).attachEvent("on"+mousewheelevt,this.SBonWheelBind):document.addEventListener&&AXgetId(cfg.targetID)&&AXgetId(cfg.targetID).addEventListener(mousewheelevt,this.SBonWheelBind,!1),document.addEventListener){var touchstart=this.touchstart.bind(this);this.touchstartBind=function(){touchstart()},AXgetId(cfg.targetID)&&AXgetId(cfg.targetID).addEventListener("touchstart",this.touchstartBind,!1)}},tractActive:function(event){var cfg=this.config;cfg.yscroll&&(this.scrollBar.addClass("scrollBar_hover"),this.scrollTrack.addClass("scrollTrack_hover")),cfg.xscroll&&(this.xscrollBar.addClass("xscrollBar_hover"),this.xscrollTrack.addClass("xscrollTrack_hover")),this.Observer&&clearTimeout(this.Observer),this.initScroll()},tractInActive:function(event){var SBonWheelEnd=this.SBonWheelEnd.bind(this);this.Observer=setTimeout(function(){SBonWheelEnd()},500)},getMousePosition:function(event){var pos=(this.config,this.scrollTrack?this.scrollTrack.offset():{left:0,top:0}),posx=this.xscrollTrack?this.xscrollTrack.offset():{left:0,top:0},x=event.pageX-posx.left,y=event.pageY-pos.top;return{x:x,y:y}},getTouchPosition:function(event){var touch=(this.config,event.touches[0]),pos=this.scrollTrack.offset();if(this.config.touchDirection)var x=touch.pageX-pos.left,y=touch.pageY-pos.top;else var x=-touch.pageX-pos.left,y=-touch.pageY-pos.top;return{x:x,y:y}},touchstart:function(e){this.touhEndObserver&&clearTimeout(this.touhEndObserver),this.touhMoveObserver&&clearTimeout(this.touhMoveObserver);var touch,cfg=this.config,event=window.event;if(touch=event.touches[0],touch.pageX){this.touchStartXY={sTime:(new Date).getTime()/1e3,sTop:this.scrollScrollID.position().top,sLeft:this.scrollScrollID.position().left,scrollWidth:this.scrollScrollID.outerWidth(),scrollHeight:this.scrollScrollID.outerHeight(),targetWidth:this.scrollTargetID.outerWidth(),targetHeight:this.scrollTargetID.outerHeight(),x:touch.pageX,y:touch.pageY};var touchEnd=this.touchEnd.bind(this);this.touchEndBind=function(){touchEnd(event)};var touchMove=this.touchMove.bind(this);this.touchMoveBind=function(){touchMove(event)},document.removeEventListener&&(document.removeEventListener("touchend",this.touchEndBind,!1),document.removeEventListener("touchmove",this.touchMoveBind,!1)),document.addEventListener&&(document.addEventListener("touchend",this.touchEndBind,!1),document.addEventListener("touchmove",this.touchMoveBind,!1));var minLeft=0,maxLeft=-(this.touchStartXY.scrollWidth-this.touchStartXY.targetWidth),minTop=0,maxTop=-(this.touchStartXY.scrollHeight-this.touchStartXY.targetHeight),scrollPosition=this.scrollScrollID.position();(scrollPosition.left<minLeft&&scrollPosition.left>maxLeft||scrollPosition.top<minTop&&scrollPosition.top>maxTop)&&(this.scrollScrollID.stop(),cfg.yscroll&&this.scrollBar.stop(),cfg.xscroll&&this.xscrollBar.stop()),this.tractActive()}},touchMove:function(e){this.touhEndObserver&&clearTimeout(this.touhEndObserver),this.touhMoveObserver&&clearTimeout(this.touhMoveObserver);var touch,cfg=this.config,event=window.event;if(touch=event.touches[0],touch.pageX){if((this.touchStartXY.x-touch.pageX).abs()<(this.touchStartXY.y-touch.pageY).abs()){if(cfg.yscroll&&this.touchStartXY.scrollHeight>this.touchStartXY.targetHeight){this.touchMode="ns";var touchDirection=this.touchStartXY.y-touch.pageY<=0?"T":"B";if(touchDirection!=this.touchDirection&&this.touchMoveAfter(touch),this.touchDirection=touchDirection,this.moveBlock({top:touch.pageY-this.touchStartXY.y})){if(!event.preventDefault)return!1;event.preventDefault()}}}else if((this.touchStartXY.x-touch.pageX).abs()>(this.touchStartXY.y-touch.pageY).abs()&&cfg.xscroll&&this.touchStartXY.scrollWidth>this.touchStartXY.targetWidth){this.touchMode="we";var touchDirection=this.touchStartXY.x-touch.pageX<=0?"L":"R";if(touchDirection!=this.touchDirection&&this.touchMoveAfter(touch),this.touchDirection=touchDirection,this.moveBlock({left:touch.pageX-this.touchStartXY.x})){if(!event.preventDefault)return!1;event.preventDefault()}}((this.touchStartXY.x-touch.pageX).abs()-(this.touchStartXY.y-touch.pageY).abs()).abs()<5;var touchMoveAfter=this.touchMoveAfter.bind(this);this.touhMoveObserver=setTimeout(function(){touchMoveAfter(touch)},50)}},touchMoveAfter:function(touch){try{this.touchStartXY.sTime=(new Date).getTime()/1e3,this.touchStartXY.sTop=this.scrollScrollID.position().top,this.touchStartXY.sLeft=this.scrollScrollID.position().left,this.touchStartXY.x=touch.pageX,this.touchStartXY.y=touch.pageY}catch(e){}},touchEnd:function(e){this.config,window.event||e;document.removeEventListener&&(document.removeEventListener("touchend",this.touchEndBind,!1),document.removeEventListener("touchmove",this.touchMoveBind,!1));var moveEndBlock=this.moveEndBlock.bind(this);this.touchStartXY&&(this.touhEndObserver=setTimeout(function(){moveEndBlock()},10))},moveBlock:function(moveXY){var cfg=this.config,returnTF=!0;if(void 0!=moveXY.left){var newLeft=this.touchStartXY.sLeft+moveXY.left,minLeft=0,maxLeft=-(this.touchStartXY.scrollWidth-this.touchStartXY.targetWidth);cfg.bounces&&(minLeft=.4*this.touchStartXY.targetWidth,maxLeft=-(1.2*(this.touchStartXY.scrollWidth-this.touchStartXY.targetWidth))),newLeft>minLeft?(newLeft=minLeft,returnTF=!1):maxLeft>newLeft&&(newLeft=maxLeft,returnTF=!1),this.scrollScrollID.css({left:newLeft}),this.setScrollbarPositionForWheel("left")}else if(void 0!=moveXY.top){var newTop=this.touchStartXY.sTop+moveXY.top,minTop=0,maxTop=-(this.touchStartXY.scrollHeight-this.touchStartXY.targetHeight);cfg.bounces&&(minTop=.4*this.touchStartXY.targetHeight,maxTop=-(1.2*(this.touchStartXY.scrollHeight-this.touchStartXY.targetHeight))),newTop>minTop?(newTop=minTop,returnTF=!1):maxTop>newTop&&(newTop=maxTop,returnTF=!1),this.scrollScrollID.css({top:newTop}),this.setScrollbarPositionForWheel("top")}return returnTF},moveEndBlock:function(){var cfg=this.config;if(this.touchStartXY){var sTime=this.touchStartXY.sTime,eTime=(new Date).getTime()/1e3,dTime=eTime-sTime,tractInActive=this.tractInActive.bind(this);if("we"==this.touchMode){if(this.touchStartXY.scrollWidth<=this.touchStartXY.targetWidth)return;var eLeft=this.scrollScrollID.position().left,dLeft=eLeft-this.touchStartXY.sLeft,velocityLeft=Math.ceil(dLeft/dTime/1),endLeft=Math.ceil(eLeft+velocityLeft);endLeft>0?endLeft=0:endLeft<-(this.touchStartXY.scrollWidth-this.touchStartXY.targetWidth)&&(endLeft=-(this.touchStartXY.scrollWidth-this.touchStartXY.targetWidth));var newLeft=endLeft.abs();if(this.touchStartXY.sLeft=-newLeft,this.scrollScrollID.animate({left:-newLeft},(eLeft+newLeft).abs(),"circOut",function(){tractInActive()}),this.setScrollbarPositionForWheel("left",(eLeft+newLeft).abs(),"circOut",{left:-newLeft}),cfg.yscroll){var eTop=this.scrollScrollID.position().top,topChange=!1;eTop>0?(eTop=0,topChange=!0):eTop<-(this.touchStartXY.scrollHeight-this.touchStartXY.targetHeight)&&(eTop=this.touchStartXY.scrollHeight-this.touchStartXY.targetHeight,topChange=!0),topChange&&this.scrollScrollID.css({top:-eTop})}}else{if(this.touchStartXY.scrollHeight<=this.touchStartXY.targetHeight)return;var eTop=this.scrollScrollID.position().top,dTop=eTop-this.touchStartXY.sTop,velocityTop=Math.ceil(dTop/dTime/1),endTop=Math.ceil(eTop+velocityTop);endTop>0?endTop=0:endTop<-(this.touchStartXY.scrollHeight-this.touchStartXY.targetHeight)&&(endTop=-(this.touchStartXY.scrollHeight-this.touchStartXY.targetHeight));var newTop=endTop.abs();if(this.touchStartXY.sTop=-newTop,this.scrollScrollID.animate({top:-newTop},(eTop+newTop).abs(),"circOut",function(){tractInActive()}),this.setScrollbarPositionForWheel("top",(eTop+newTop).abs(),"circOut",{top:-newTop}),cfg.xscroll){var eLeft=this.scrollScrollID.position().left,leftChange=!1;eLeft>0?(eLeft=0,leftChange=!0):eLeft<-(this.touchStartXY.scrollWidth-this.touchStartXY.targetWidth)&&(eLeft=this.touchStartXY.scrollWidth-this.touchStartXY.targetWidth,leftChange=!0),leftChange&&this.scrollScrollID.css({left:-eLeft})}}this.touchStartXY=null}},SBonMouseDown:function(event){this.config;this.scrollBarMove=!0;var pos=this.getMousePosition(event),SBpos=this.scrollBar.position(),SBh=this.scrollBar.height(),STh=this.scrollTrack.height(),Ch=this.scrollScrollID.outerHeight();this.Ch=Ch,this.STh=STh,this.scrollBarAttr={x:(SBpos.left-pos.x).number(),y:(SBpos.top-pos.y).number(),h:SBh.number(),sth:STh},axdom(document.body).bind("mousemove.AXScroll",this.SBonMouseMoveBind),axdom(document.body).bind("mouseup.AXScroll",this.SBonMouseUpBind),axdom(document.body).bind("mouseleave.AXScroll",this.SBonMouseUpBind)},SBonMouseMove:function(event){var config=this.config;if(this.scrollBarMove){axdom(document.body).attr("onselectstart","return false");var pos=this.getMousePosition(event),SBy=pos.y+this.scrollBarAttr.y;SBy<config.scrollBarMargin&&(SBy=config.scrollBarMargin),SBy+this.scrollBarAttr.h>this.scrollBarAttr.sth&&(SBy=this.scrollBarAttr.sth-this.scrollBarAttr.h+config.scrollBarMargin),this.scrollBar.css({top:SBy}),this.setContentPosition()}},SBonMouseUp:function(event){if(this.scrollBarMove){this.config;this.scrollBarMove=!1,axdom(document.body).removeAttr("onselectstart")}axdom(document.body).unbind("mousemove.AXScroll"),axdom(document.body).unbind("mouseup.AXScroll"),axdom(document.body).unbind("mouseleave.AXScroll")},SBonMouseDownX:function(event){this.config;this.scrollBarMove=!0;var pos=this.getMousePosition(event),SBpos=this.xscrollBar.position(),SBw=this.xscrollBar.width(),STw=this.xscrollTrack.width(),Cw=this.scrollScrollID.outerWidth();this.Cw=Cw,this.STw=STw,this.scrollBarAttr={
  x:(SBpos.left-pos.x).number(),w:SBw.number(),stw:STw},axdom(document.body).bind("mousemove.AXScroll",this.SBonMouseMoveXBind),axdom(document.body).bind("mouseup.AXScroll",this.SBonMouseUpXBind),axdom(document.body).bind("mouseleave.AXScroll",this.SBonMouseUpXBind)},SBonMouseMoveX:function(event){var config=this.config;if(this.scrollBarMove){axdom(document.body).attr("onselectstart","return false");var pos=this.getMousePosition(event),SBx=pos.x+this.scrollBarAttr.x;SBx<config.scrollBarMargin&&(SBx=config.scrollBarMargin),SBx+this.scrollBarAttr.w>this.scrollBarAttr.stw&&(SBx=this.scrollBarAttr.stw-this.scrollBarAttr.w+config.scrollBarMargin),this.xscrollBar.css({left:SBx}),this.setContentPosition("xscroll")}},SBonMouseUpX:function(event){if(this.scrollBarMove){this.config;this.scrollBarMove=!1,axdom(document.body).removeAttr("onselectstart")}axdom(document.body).unbind("mousemove.AXScroll"),axdom(document.body).unbind("mouseup.AXScroll"),axdom(document.body).unbind("mouseleave.AXScroll")},SBonWheel:function(e){var event=(this.config,window.event||e),delta=event.detail?-10*event.detail:event.wheelDelta,Sy=this.scrollScrollID.position().top,Sh=this.scrollScrollID.outerHeight(),TGh=this.scrollTargetID.height();if(!(TGh>Sh)){var eventCancle=!1;return Sy+=delta,Sy>0&&(Sy=0,eventCancle=!0),TGh>Sh+Sy&&(Sy=TGh-Sh,eventCancle=!0),this.scrollScrollID.css({top:Sy}),this.setScrollbarPositionForWheel("top"),eventCancle?void 0:(event.preventDefault&&event.preventDefault(),event.stopPropagation&&event.stopPropagation(),event.cancelBubble=!0,!1)}},SBonWheelEnd:function(){if(!this.scrollBarMove){var config=this.config;config.yscroll&&(this.scrollBar.removeClass("scrollBar_hover"),this.scrollTrack.removeClass("scrollTrack_hover")),config.xscroll&&(this.xscrollBar.removeClass("xscrollBar_hover"),this.xscrollTrack.removeClass("xscrollTrack_hover"))}},cancelEvent:function(event){return event.stopPropagation(),!1},setContentPosition:function(xscroll){var config=this.config;if("xscroll"==xscroll){this.contentScrollXAttr?(this.contentScrollXAttr.scrollWidth=this.scrollScrollID.width(),this.contentScrollXAttr.scrollTrackXWidth=this.xscrollTrack.width(),this.contentScrollXAttr.scrollXHandleWidth=this.xscrollBar.width()):this.contentScrollXAttr={bodyWidth:this.scrollTargetID.width(),scrollWidth:this.scrollScrollID.width(),scrollTrackXWidth:this.xscrollTrack.width(),scrollXHandleWidth:this.xscrollBar.width()};var SBx=this.xscrollBar.position().left-config.scrollBarMargin,L=(this.contentScrollXAttr.scrollWidth*SBx/this.contentScrollXAttr.scrollTrackXWidth).round(0);this.scrollScrollID.css({left:-L})}else{this.contentScrollYAttr?(this.contentScrollYAttr.scrollHeight=this.scrollScrollID.height(),this.contentScrollYAttr.scrollTrackYHeight=this.scrollTrack.height(),this.contentScrollYAttr.scrollYHandleHeight=this.scrollBar.height()):this.contentScrollYAttr={bodyHeight:this.scrollTargetID.height(),scrollHeight:this.scrollScrollID.height(),scrollTrackYHeight:this.scrollTrack.height(),scrollYHandleHeight:this.scrollBar.height()};var SBy=this.scrollBar.position().top-config.scrollBarMargin,T=(this.contentScrollYAttr.scrollHeight-this.contentScrollYAttr.bodyHeight)*(SBy/(this.contentScrollYAttr.scrollTrackYHeight-this.contentScrollYAttr.scrollYHandleHeight)).number();this.scrollScrollID.css({top:-T})}},setScrollbarPositionForWheel:function(direction,duration,easing,position){var config=this.config;if("left"==direction){this.contentScrollXAttr?(this.contentScrollXAttr.scrollWidth=this.scrollScrollID.width(),this.contentScrollXAttr.scrollTrackXWidth=this.xscrollTrack.width(),this.contentScrollXAttr.scrollXHandleWidth=this.xscrollBar.outerWidth()):this.contentScrollXAttr={bodyWidth:this.scrollTargetID.width(),scrollWidth:this.scrollScrollID.width(),scrollTrackXWidth:this.xscrollTrack.width(),scrollXHandleWidth:this.scrollBar.outerWidth()};var Sy=position?position.left:this.scrollScrollID.position().left,L=(this.contentScrollXAttr.scrollTrackXWidth-this.contentScrollXAttr.scrollXHandleWidth)*(Sy/(this.contentScrollXAttr.scrollWidth-this.contentScrollXAttr.bodyWidth));L-=config.scrollBarMargin,easing?this.xscrollBar.animate({left:-L},duration,easing,function(){}):this.xscrollBar.css({left:-L})}else{if(!config.yscroll)return!1;this.contentScrollYAttr?(this.contentScrollYAttr.scrollHeight=this.scrollScrollID.height(),this.contentScrollYAttr.scrollTrackYHeight=this.scrollTrack.height(),this.contentScrollYAttr.scrollYHandleHeight=this.scrollBar.outerHeight()):this.contentScrollYAttr={bodyHeight:this.scrollTargetID.height(),scrollHeight:this.scrollScrollID.height(),scrollTrackYHeight:this.scrollTrack.height(),scrollYHandleHeight:this.scrollBar.outerHeight()};var Sy=position?position.top:this.scrollScrollID.position().top,T=(this.contentScrollYAttr.scrollTrackYHeight-this.contentScrollYAttr.scrollYHandleHeight)*(Sy/(this.contentScrollYAttr.scrollHeight-this.contentScrollYAttr.bodyHeight));T-=config.scrollBarMargin,easing?this.scrollBar.animate({top:-T},duration,easing,function(){}):this.scrollBar.css({top:-T})}},setSBPosition:function(){var config=this.config;try{var Ctop=this.scrollScrollID.position().top,STh=(this.scrollTargetID.innerHeight(),this.scrollTrack.height()),Ch=this.scrollScrollID.outerHeight(),SBh=this.scrollBar.height(),SBtop=-(STh*Ctop)/Ch;SBtop<config.scrollBarMargin&&(SBtop=config.scrollBarMargin),SBtop+SBh>STh&&(SBtop=STh-SBh+config.scrollBarMargin),this.scrollBar.css({top:SBtop})}catch(e){}},focusElement:function(id){this.config;if(AXgetId(id)){var ppos=this.scrollScrollID.offset(),pos=axdom("#"+id).offset(),myNewTop=pos.top-ppos.top,CTheight=this.scrollTargetID.innerHeight(),Cheight=this.scrollScrollID.outerHeight();CTheight>Cheight-myNewTop&&(myNewTop=Cheight-CTheight),0>myNewTop&&(myNewTop=0),this.scrollScrollID.css({top:-myNewTop}),this.setSBPosition()}return this},scrollTop:function(top){var myNewTop=top,CTheight=this.scrollTargetID.innerHeight(),Cheight=this.scrollScrollID.outerHeight();return CTheight>Cheight-myNewTop&&(myNewTop=Cheight-CTheight),0>myNewTop&&(myNewTop=0),this.scrollScrollID.css({top:-myNewTop}),this.setSBPosition(),this},moveTo:function(x,y){var cfg=this.config,css={};return AXUtil.isEmpty(x)||(css.left=-x),AXUtil.isEmpty(y)||(css.top=-y),this.scrollScrollID.css(css),cfg.yscroll&&!AXUtil.isEmpty(css.top)&&this.scrollBar.css({top:css.top}),cfg.xscroll&&!AXUtil.isEmpty(css.left)&&this.xscrollBar.css({left:css.left}),this},unbind:function(){var config=this.config;this.scroll=!1,this.scrollTrack.remove(),this.scrollBar.remove(),this.scrollTargetID.unbind("mouseover",this.tractActiveBind),this.scrollTargetID.unbind("mouseout",this.tractInActiveBind),axdom(document.body).unbind("mousemove.AXScroll",this.SBonMouseMoveBind),axdom(document.body).unbind("mouseup.AXScroll",this.SBonMouseUpBind);var mousewheelevt=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";return document.attachEvent?AXgetId(config.targetID)&&AXgetId(config.targetID).detachEvent("on"+mousewheelevt,this.SBonWheelBind):document.addEventListener&&AXgetId(config.targetID)&&AXgetId(config.targetID).removeEventListener(mousewheelevt,this.SBonWheelBind,!1),document.addEventListener&&AXgetId(config.targetID)&&AXgetId(config.targetID).removeEventListener("touchstart",this.SBtouchstartBind,!1),this}}),AXCalendar=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.config.CT_className="AXCalendar",this.Observer=null,this.config.weeks=[{name:"SUN"},{name:"MON"},{name:"TUE"},{name:"WED"},{name:"THU"},{name:"FRI"},{name:"SAT"}],this.config.printFormat="dd",this.config.titleFormat="yyyy/mm/dd",this.config.valueFormat="yyyy-mm-dd"},init:function(){},getBasicDate:function(){var cfg=this.config;return void 0!=cfg.basicDate?cfg.basicDate.date():new Date},getCalendarStartDate:function(date){var calendarStartDate,monthStartDate,basicDate;this.config;basicDate=date?date.date():this.getBasicDate(),monthStartDate=new Date(basicDate.getFullYear(),basicDate.getMonth(),1,12);var calendarStartDateDay=monthStartDate.getDay();return 0==calendarStartDateDay&&(calendarStartDateDay=7),calendarStartDate=monthStartDate.add(-calendarStartDateDay),{calendarStartDate:calendarStartDate,monthStartDate:monthStartDate}},printDayPage:function(date){var cfg=this.config;if(Object.isUndefined(cfg.targetID))return void trace("need targetID - setConfig({targetID:''})");var calendarDate=this.getCalendarStartDate(date),calendarStartDate=calendarDate.calendarStartDate,monthStartDate=calendarDate.monthStartDate,setDate=(this.getBasicDate(),date?date.date():new Date),po=[];po.push('<div id="'+cfg.targetID+'_AX_box" class="'+cfg.CT_className+'">'),po.push('<table cellspacing="0" cellpadding="0" class="calendarPage">'),po.push("<thead>"),po.push("<tr>"),axf.each(cfg.weeks,function(wi,ww){po.push('<td class="head_'+wi+" dayofweek_"+wi+'">'+ww.name+"</td>")}),po.push("</tr>"),po.push("</thead>"),po.push("<tbody>");var onBeforeShowDay,minTime=-1,maxTime=-1,roopDate=calendarStartDate;cfg.minDate&&(minTime=cfg.minDate.date().getTime()),cfg.maxDate&&(maxTime=cfg.maxDate.date().getTime()),cfg.onBeforeShowDay&&(onBeforeShowDay=cfg.onBeforeShowDay.bind(this));for(var i=0;6>i;){po.push("<tr>");for(var k=0;7>k;){var roopTime=roopDate.getTime(),dayValue=roopDate.print(this.config.printFormat),addClass=[],addStyle="",tdClass=[],printTitle=roopDate.print(this.config.titleFormat),isEnable=!0;if(onBeforeShowDay){var addData=onBeforeShowDay(roopDate);addData&&(addData.className&&addClass.push(addData.className),addData.style&&(addStyle=addData.style),addData.title&&(printTitle=addData.title),addData.isEnable===!1&&(isEnable=!1))}isEnable&&minTime>-1&&(isEnable=!(minTime>roopTime)),isEnable&&maxTime>-1&&(isEnable=!(roopTime>maxTime)),roopDate.getMonth()!=monthStartDate.getMonth()&&addClass.push("notThisMonth"),0==setDate.diff(roopDate,"D")&&tdClass.push("setDate"),isEnable||addClass.push("disabled"),po.push('<td class="bodyCol_'+k+" bodyRow_"+i+" "+tdClass.join(" ")+'"><a '+cfg.href+' class="calendarDate '+addClass.join(" ")+'" id="'+cfg.targetID+"_AX_"+roopDate.print(this.config.valueFormat)+'_AX_date" title="'+printTitle+'">'+dayValue.number()+"</a></td>"),k++,roopDate=roopDate.add(1)}po.push("</tr>"),i++}return po.push("</tbody>"),po.push("</table>"),po.push("</div>"),axdom("#"+cfg.targetID).html(po.join("")),this},dayPageSetDay:function(date){var cfg=this.config;return axdom("#"+cfg.targetID).find(".calendarDate").removeClass("selected"),axdom("#"+cfg.targetID+"_AX_"+date.print(this.config.valueFormat)+"_AX_date").addClass("selected"),this},printMonthPage:function(date){var cfg=this.config;if(Object.isUndefined(cfg.targetID))return void trace("need targetID - setConfig({targetID:''})");var setDate=date?date.date():new Date,po=[];po.push('<div id="'+cfg.targetID+'_AX_box" class="'+cfg.CT_className+'">'),po.push('<table cellspacing="0" cellpadding="0" class="calendarPageMonth">'),po.push("<tbody>");for(var m=1,i=0;4>i;){po.push("<tr>");for(var k=0;3>k;){var tdClass=[];m==setDate.getMonth()+1&&tdClass.push("setDate"),po.push('<td class="bodyCol_'+k+" bodyRow_"+i+" "+tdClass.join(" ")+'"><a '+cfg.href+' class="calendarMonth" id="'+cfg.targetID+"_AX_"+m+'_AX_month" title="">'+m+"월</a></td>"),k++,m++}po.push("</tr>"),i++}return po.push("</tbody>"),po.push("</table>"),po.push("</div>"),axdom("#"+cfg.targetID).html(po.join("")),this},monthPageSetMonth:function(date){var cfg=this.config;axdom("#"+cfg.targetID).find(".calendarMonth").removeClass("selected"),axdom("#"+cfg.targetID+"_AX_"+(date.getMonth()+1)+"_AX_month").addClass("selected")},printYearPage:function(year){var cfg=this.config;if(Object.isUndefined(cfg.targetID))return void trace("need targetID - setConfig({targetID:''})");var po=[];po.push('<div id="'+cfg.targetID+'_AX_box" class="'+cfg.CT_className+'">'),po.push('<table cellspacing="0" cellpadding="0" class="calendarPageMonth">'),po.push("<tbody>");for(var m=year-4,i=0;4>i;){po.push("<tr>");for(var k=0;3>k;){var tdClass=[];m==year&&tdClass.push("setDate"),po.push('<td class="bodyCol_'+k+" bodyRow_"+i+" "+tdClass.join(" ")+'"><a '+cfg.href+' class="calendarMonth" id="'+cfg.targetID+"_AX_"+m+'_AX_year" title="">'+m+"년</a></td>"),k++,m++}po.push("</tr>"),i++}po.push("</tbody>"),po.push("</table>"),po.push("</div>"),axdom("#"+cfg.targetID).html(po.join(""))},yearPageSetYear:function(date){var cfg=this.config;axdom("#"+cfg.targetID).find(".calendarMonth").removeClass("selected"),axdom("#"+cfg.targetID+"_AX_"+date.print("yyyy")+"_AX_year").addClass("selected")},printTimePage:function(displayTime){var cfg=this.config;if(Object.isUndefined(cfg.targetID))return void trace("need targetID - setConfig({targetID:''})");if(displayTime){var now=displayTime.split(":"),hh=now[0].setDigit(2),mm=now[1].left(2).setDigit(2),apm=now[1].right(2);"00"==hh&&"00"==mm&&(apm="AM"),"00"==apm&&(apm="AM")}else{var now=new Date,hh=now.getHours(),mm=now.getMinutes(),apm="AM";hh>12&&(apm="PM",hh-=12),hh=hh.setDigit(2),mm=mm.setDigit(2)}var po=[];po.push('<div id="'+cfg.targetID+'_AX_box" class="'+cfg.CT_className+'" style="padding:0px;">'),po.push("<div class='timeBox'>"),po.push("<div class='hourTitle'>Hour</div>"),po.push("<div class='hourSlider'><input type='text' value='"+hh+"' id='"+cfg.targetID+"_AX_hour' class='AXInput' /></div>"),po.push("<div class='minuteTitle'>Minute</div>"),po.push("<div class='minuteSlider'><input type='text' value='"+mm+"' id='"+cfg.targetID+"_AX_minute' class='AXInput' /></div>"),po.push("<div class='timeDisplay'>"+hh+":"+mm+" "+apm+"</div>"),po.push("<div class='AMPM'><input type='text' id='"+cfg.targetID+"_AX_AMPM' value='"+apm+"' style='width:50px;height:21px;border:0px none;' /></div>"),po.push("</div>"),po.push("</div>"),axdom("#"+cfg.targetID).html(po.join(""));var timePageChange=this.timePageChange.bind(this);axdom("#"+cfg.targetID+"_AX_hour").unbindInput(),axdom("#"+cfg.targetID+"_AX_minute").unbindInput(),axdom("#"+cfg.targetID+"_AX_AMPM").unbindInput(),axdom("#"+cfg.targetID+"_AX_hour").bindSlider({min:0,max:12,onChange:function(objID,objVal){timePageChange(objID,objVal)}}),axdom("#"+cfg.targetID+"_AX_minute").bindSlider({min:0,max:59,onChange:function(objID,objVal){timePageChange(objID,objVal)}}),axdom("#"+cfg.targetID+"_AX_AMPM").bindSwitch({off:"AM",on:"PM",onChange:function(objID,objVal){timePageChange(objID,objVal)}})},timePageChange:function(){var hh,mi,apm,mytime,cfg=this.config;hh=axdom("#"+cfg.targetID+"_AX_hour").val().number(),mi=axdom("#"+cfg.targetID+"_AX_minute").val().number(),apm=axdom("#"+cfg.targetID+"_AX_AMPM").val(),"PM"==apm&&hh>12&&(axdom("#"+cfg.targetID+"_AX_hour").val(12),axdom("#"+cfg.targetID+"_AX_hour").setValueInput(12)),mytime=hh.setDigit(2)+":"+mi.setDigit(2)+" "+apm,axdom("#"+cfg.targetID+"_AX_box").find(".timeDisplay").html(mytime),cfg.onChange&&cfg.onChange(hh.setDigit(2)+":"+mi.setDigit(2))},getTime:function(){var cfg=this.config,hh=(axdom("#"+cfg.targetID+"_AX_hour").val()||0).number(),mi=(axdom("#"+cfg.targetID+"_AX_minute").val()||0).number(),apm=axdom("#"+cfg.targetID+"_AX_AMPM").val();return"PM"==apm&&12>hh&&(hh+=12),hh.setDigit(2)+":"+mi.setDigit(2)}}),AXMultiSelect=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.selects=[],this.moveSens=0,this.touchMode,this.config.selectClassName="readySelect",this.config.beselectClassName="beSelected",this.config.selectingClassName="AX_selecting",this.config.moveSens=5,this.config.useHelper=!0},init:function(){var mouseClick=this.onmouseClick.bind(this);this._selectStage=axdom("#"+this.config.selectStage),this._selectStage.css({position:"relative"}),this._selectStage.bind("mousedown",this.mousedown.bind(this)),this._selectStage.bind("click",function(event){mouseClick(this,event)}),this.helper=axdom("<div class='AXMultiselectorHelper'></div>"),this.collect(),axdom(window).bind("resize.AXMultiSelect",this.collect.bind(this)),axdom(window).bind("keydown.AXMultiSelect",this.onKeydown.bind(this)),this._selectStage.bind("scroll",this.onScrollStage.bind(this)),this._selectStage.bind("touchstart",this.touchstart.bind(this))},onKeydown:function(event){event.keyCode==AXUtil.Event.KEY_ESC&&this.clearSelects()},onScrollStage:function(event){this.config;AXUtil.browser.mobile||(this.helperAppened||this.helperAppenedReady)&&(this.moveSens=0,axdom(document.body).unbind("mousemove.AXMultiSelect"),axdom(document.body).unbind("mouseup.AXMultiSelect"),axdom(document.body).unbind("mouseleave.AXMultiSelect"),axdom(document.body).removeAttr("onselectstart"),this.helperAppenedReady=!1,this.helperAppened=!1,this.helper.remove())},onmouseClick:function(element,event){if(this.helperAppened)return this;var cfg=this.config,eid=event.target.id.split(/_AX_/g),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,until:function(evt,evtIDs){return AXgetId(evt.parentNode)==AXgetId(cfg.selectStage)},find:function(evt,evtIDs){return!!axdom(evt).hasClass(cfg.selectClassName)}});if(myTarget){var selectElement=myTarget;selectElement&&(event.shiftKey?this.shiftSelects(selectElement):event.metaKey||event.ctrlKey?this.toggleSelects(selectElement):this.clickSelects(selectElement))}else event.target.id==cfg.selectStage&&"ie"!=AXUtil.browser.name&&this.clearSelects();return this},collect:function(){var cfg=this.config;this._selectTargets=axdom("#"+cfg.selectStage+" ."+cfg.selectClassName),this.selectTargets=this._selectTargets.get();var scrollLeft=this._selectStage.scrollLeft().number(),scrollTop=this._selectStage.scrollTop().number();return this._selectTargets.each(function(){var jQuerythis=axdom(this),pos=jQuerythis.position();axdom.data(this,"selectableItem",{element:this,jQueryelement:jQuerythis,left:pos.left+scrollLeft,top:pos.top+scrollTop,right:pos.left+scrollLeft+jQuerythis.outerWidth(),bottom:pos.top+scrollTop+jQuerythis.outerHeight(),selected:jQuerythis.hasClass(cfg.beselectClassName),selecting:jQuerythis.hasClass(cfg.selectingClassName)})}),this},clearSelects:function(){var cfg=this.config;this._selectTargets.each(function(){var selectTarget=axdom.data(this,"selectableItem");selectTarget&&(selectTarget.selecting&&(selectTarget.jQueryelement.removeClass(cfg.selectingClassName),selectTarget.selecting=!1),selectTarget.selected&&(selectTarget.jQueryelement.removeClass(cfg.beselectClassName),selectTarget.selected=!1))})},pushSelects:function(Obj){var hasSelect=this.selects.has(function(){return this.item==Obj});hasSelect||this.selects.push(Obj)},clickSelects:function(Obj){var cfg=this.config;this.clearSelects();var selectTarget=axdom.data(Obj,"selectableItem");selectTarget.jQueryelement.addClass(cfg.beselectClassName),selectTarget.selected=!0},toggleSelects:function(Obj){var cfg=this.config,selectTarget=axdom.data(Obj,"selectableItem");selectTarget.selected?(selectTarget.jQueryelement.removeClass(cfg.beselectClassName),selectTarget.selected=!1):(selectTarget.jQueryelement.addClass(cfg.beselectClassName),selectTarget.selected=!0)},shiftSelects:function(Obj){var li,si,cfg=this.config,selectedLength=0;if(this._selectTargets.each(function(stIndex,ST){var selectTarget=axdom.data(this,"selectableItem");selectTarget&&selectTarget.selected&&(selectedLength++,li=stIndex),this===Obj&&(si=stIndex)}),0==selectedLength)this.clickSelects(Obj);else{if(si==li)return;this.clearSelects();var temp;si>li&&(temp=si,si=li,li=temp),this._selectTargets.each(function(stIndex,ST){var selectTarget=axdom.data(this,"selectableItem");selectTarget&&stIndex>=si&&li>=stIndex&&(selectTarget.jQueryelement.addClass(cfg.beselectClassName),selectTarget.selected=!0)})}},mousedown:function(event){this.config;axdom(document.body).bind("mousemove.AXMultiSelect",this.mousemove.bind(this)),axdom(document.body).bind("mouseup.AXMultiSelect",this.mouseup.bind(this)),axdom(document.body).bind("mouseleave.AXMultiSelect",this.mouseup.bind(this)),axdom(document.body).attr("onselectstart","return false"),this.helperAppenedReady=!0},mousemove:function(event){this.config;event.pageX&&(this.config.moveSens>this.moveSens&&this.moveSens++,this.moveSens==this.config.moveSens&&this.selectorHelperMove(event))},mouseup:function(event){var cfg=this.config,_this=this;this.helperAppenedReady=!1,this.moveSens=0,axdom(document.body).unbind("mousemove.AXMultiSelect"),axdom(document.body).unbind("mouseup.AXMultiSelect"),axdom(document.body).unbind("mouseleave.AXMultiSelect"),axdom(document.body).removeAttr("onselectstart"),this.helperAppened&&(setTimeout(function(){_this.helperAppened=!1,_this.helper.remove()},100),this._selectTargets.each(function(){var selectTarget=axdom.data(this,"selectableItem");selectTarget&&selectTarget.selecting&&(selectTarget.jQueryelement.removeClass(cfg.selectingClassName),selectTarget.selecting=!1,selectTarget.jQueryelement.addClass(cfg.beselectClassName),selectTarget.selected=!0)}))},selectorHelperMove:function(event){var cfg=this.config;if(cfg.useHelper)if(this.helperAppened){var tmp,_helperPos=this.helperPos,x1=this.helperPos.x,y1=this.helperPos.y,x2=event.pageX-_helperPos.bodyLeft,y2=event.pageY-_helperPos.bodyTop;x1>x2&&(tmp=x2,x2=x1,x1=tmp),y1>y2&&(tmp=y2,y2=y1,y1=tmp),this.helper.css({left:x1,top:y1,width:x2-x1,height:y2-y1}),this._selectTargets.each(function(){var selectTarget=axdom.data(this,"selectableItem"),hit=!1;if(selectTarget){var stL=selectTarget.left.number(),stR=selectTarget.right.number(),stT=selectTarget.top.number(),stB=selectTarget.bottom.number();stL=stL+_helperPos.stageX-_helperPos.scrollLeft-_helperPos.bodyLeft,stR=stR+_helperPos.stageX-_helperPos.scrollLeft-_helperPos.bodyLeft,stT=stT+_helperPos.stageY-_helperPos.scrollTop-_helperPos.bodyTop,stB=stB+_helperPos.stageY-_helperPos.scrollTop-_helperPos.bodyTop,hit=!(stL>x2||x1>stR||stT>y2||y1>stB),hit?(selectTarget.selected&&(selectTarget.jQueryelement.removeClass(cfg.beselectClassName),selectTarget.selected=!1),selectTarget.selecting||(selectTarget.jQueryelement.addClass(cfg.selectingClassName),selectTarget.selecting=!0)):(selectTarget.selecting&&(selectTarget.jQueryelement.removeClass(cfg.selectingClassName),selectTarget.selecting=!1),selectTarget.selected&&(event.metaKey||event.shiftKey||event.ctrlKey||(selectTarget.jQueryelement.removeClass(cfg.beselectClassName),selectTarget.selected=!1)))}})}else{this.helperAppened=!0,axdom(document.body).append(this.helper);var css={left:event.pageX-axdom(document.body).offset().left,top:event.pageY-axdom(document.body).offset().top,width:0,height:0};this.helper.css(css);var stagePos=this._selectStage.offset();this.helperPos={stageX:stagePos.left.number(),stageY:stagePos.top.number(),x:css.left.number(),y:css.top.number(),scrollLeft:this._selectStage.scrollLeft().number(),scrollTop:this._selectStage.scrollTop().number(),bodyLeft:axdom(document.body).offset().left,bodyTop:axdom(document.body).offset().top}}},touchstart:function(event){var touchEnd=(this.config,this.touchEnd.bind(this));this.touchEndBind=function(){touchEnd(event)};var touchMove=this.touchMove.bind(this);this.touchMoveBind=function(){touchMove(event)},document.addEventListener&&(document.addEventListener("touchend",this.touchEndBind,!1),document.addEventListener("touchmove",this.touchMoveBind,!1)),this.helperAppenedReady=!0},touchMove:function(event){var event=(this.config,window.event||e),touch=event.touches[0];if(touch.pageX){var offset=this._selectStage.offset(),right=offset.left+this._selectStage.width(),bottom=offset.top+this._selectStage.height();return 0==this.moveSens&&(this.touchStartXY={x:touch.pageX,y:touch.pageY,scrollTop:this._selectStage.scrollTop()}),this.config.moveSens>this.moveSens&&this.moveSens++,this.moveSens==this.config.moveSens&&("drag"==this.touchMode?(bottom<touch.pageY?this._selectStage.scrollTop(this.touchStartXY.scrollTop-(bottom-touch.pageY)):offset.top>touch.pageY&&this._selectStage.scrollTop(this.touchStartXY.scrollTop-(offset.top-touch.pageY)),right<touch.pageX?this._selectStage.scrollLeft(this.touchStartXY.scrollLeft-(right-touch.pageX)):offset.left>touch.pageX&&this._selectStage.scrollLeft(this.touchStartXY.scrollLeft-(offset.left-touch.pageX)),this.selectorHelperMoveByTouch(event)):"scrollTop"==this.touchMode?this._selectStage.scrollTop(this.touchStartXY.scrollTop+(this.touchStartXY.y-touch.pageY)):"scrollLeft"==this.touchMode?this._selectStage.scrollLeft(this.touchStartXY.scrollLeft+(this.touchStartXY.x-touch.pageX)):((this.touchStartXY.x-touch.pageX).abs()-(this.touchStartXY.y-touch.pageY).abs()).abs()<5?(this.touchMode="drag",this.selectorHelperMoveByTouch(event)):(this.touchStartXY.x-touch.pageX).abs()<(this.touchStartXY.y-touch.pageY).abs()?(this.touchMode="scrollTop",this._selectStage.scrollTop(this.touchStartXY.scrollTop+(this.touchStartXY.y-touch.pageY))):(this.touchStartXY.x-touch.pageX).abs()>(this.touchStartXY.y-touch.pageY).abs()&&(this.touchMode="scrollLeft",this._selectStage.scrollLeft(this.touchStartXY.scrollLeft+(this.touchStartXY.x-touch.pageX)))),event.preventDefault?void event.preventDefault():!1}},selectorHelperMoveByTouch:function(e){var cfg=this.config,event=window.event||e,touch=event.touches[0];if(this.helperAppened){var tmp,_helperPos=this.helperPos,x1=this.helperPos.x,y1=this.helperPos.y,x2=touch.pageX-_helperPos.bodyLeft,y2=touch.pageY-_helperPos.bodyTop;x1>x2&&(tmp=x2,x2=x1,x1=tmp),y1>y2&&(tmp=y2,y2=y1,y1=tmp),this.helper.css({left:x1,top:y1,width:x2-x1,height:y2-y1}),this._selectTargets.each(function(){var selectTarget=axdom.data(this,"selectableItem"),hit=!1;if(selectTarget){var stL=selectTarget.left.number(),stR=selectTarget.right.number(),stT=selectTarget.top.number(),stB=selectTarget.bottom.number();stL=stL+_helperPos.stageX-_helperPos.scrollLeft-_helperPos.bodyLeft,stR=stR+_helperPos.stageX-_helperPos.scrollLeft-_helperPos.bodyLeft,stT=stT+_helperPos.stageY-_helperPos.scrollTop-_helperPos.bodyTop,stB=stB+_helperPos.stageY-_helperPos.scrollTop-_helperPos.bodyTop,hit=!(stL>x2||x1>stR||stT>y2||y1>stB),hit?(selectTarget.selected&&(selectTarget.jQueryelement.removeClass(cfg.beselectClassName),selectTarget.selected=!1),selectTarget.selecting||(selectTarget.jQueryelement.addClass(cfg.selectingClassName),selectTarget.selecting=!0)):(selectTarget.selecting&&(selectTarget.jQueryelement.removeClass(cfg.selectingClassName),selectTarget.selecting=!1),selectTarget.selected&&(event.metaKey||event.shiftKey||event.ctrlKey||(selectTarget.jQueryelement.removeClass(cfg.beselectClassName),selectTarget.selected=!1)))}})}else{this.helperAppened=!0,axdom(document.body).append(this.helper);var css={left:touch.pageX-axdom(document.body).offset().left,top:touch.pageY-axdom(document.body).offset().top,width:0,height:0};this.helper.css(css);var stagePos=this._selectStage.offset();this.helperPos={stageX:stagePos.left.number(),stageY:stagePos.top.number(),x:css.left.number(),y:css.top.number(),scrollLeft:this._selectStage.scrollLeft().number(),scrollTop:this._selectStage.scrollTop().number(),bodyLeft:axdom(document.body).offset().left,bodyTop:axdom(document.body).offset().top}}},touchEnd:function(e){var cfg=this.config;window.event||e;this.helperAppenedReady=!1,this.moveSens=0,this.touchMode=!1,document.removeEventListener&&(document.removeEventListener("touchend",this.touchEndBind,!1),document.removeEventListener("touchmove",this.touchMoveBind,!1)),this.helperAppened&&(this.helperAppened=!1,this.helper.remove(),this._selectTargets.each(function(){var selectTarget=axdom.data(this,"selectableItem");selectTarget&&(selectTarget.selecting?(selectTarget.jQueryelement.removeClass(cfg.selectingClassName),selectTarget.selecting=!1,selectTarget.jQueryelement.addClass(cfg.beselectClassName),selectTarget.selected=!0):selectTarget.selected)}))},getSelects:function(){var selects=(this.config,[]);return this._selectTargets.each(function(){var selectTarget=axdom.data(this,"selectableItem");selectTarget&&selectTarget.selected&&selects.push(selectTarget.element)}),selects},size:function(){var selects=(this.config,[]);return this._selectTargets.each(function(){var selectTarget=axdom.data(this,"selectableItem");selectTarget&&selectTarget.selected&&selects.push(selectTarget.element)}),selects.length}}),AXResizable=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.moveSens=0,this.objects=[],this.config.moveSens=2,this.config.bindResiableContainer="AXResizable",this.config.bindResiableHandle="AXResizableHandle"},init:function(){this.helper=axdom("<div class='AXResizableHelper'></div>")},bind:function(obj){this.config;if(!obj.id)return void trace("bind 대상 ID가 없어 bind 처리할 수 없습니다.");if(!AXgetId(obj.id))return void trace("bind 대상이 없어 bind 처리할 수 없습니다.");var objID=obj.id,objSeq=null;return AXUtil.each(this.objects,function(idx,O){this.id==objID&&(objSeq=idx)}),null==objSeq?(objSeq=this.objects.length,this.objects.push({id:objID,element:AXgetId(objID),jQueryElement:axdom("#"+objID),config:obj})):(this.objects[objSeq].isDel=void 0,this.objects[objSeq].config=obj),this.bindResizer(objID,objSeq),this},unbind:function(obj){var removeIdx;this.config;return AXUtil.each(this.objects,function(idx,O){O.id!=obj.id||1!=O.isDel&&(removeIdx=idx)}),void 0!=removeIdx&&(this.objects[removeIdx].isDel=!0),this},bindResizer:function(objID,objSeq){var cfg=this.config,obj=this.objects[objSeq],po=[];po.push('<div class="'+cfg.bindResiableHandle+'"></div>'),obj.jQueryElement.addClass(cfg.bindResiableContainer),obj.jQueryElement.append(po.join("")),obj.jQueryElement.bind("mousedown.AXResizable",this.mousedown.bind(this,objID,objSeq))},mousedown:function(objID,objSeq,event){this.config;axdom(window).bind("mousemove.AXResizable",this.mousemove.bind(this,objID,objSeq)),axdom(window).bind("mouseup.AXResizable",this.mouseup.bind(this,objID,objSeq)),axdom(document.body).attr("onselectstart","return false"),this.helperAppenedReady=!0},mousemove:function(objID,objSeq,event){this.config;event.pageX&&(this.config.moveSens>this.moveSens&&this.moveSens++,this.moveSens==this.config.moveSens&&this.selectorHelperMove(objID,objSeq,event))},mouseup:function(objID,objSeq,event){var obj=(this.config,this.objects[objSeq]);if(this.helperAppenedReady=!1,this.moveSens=0,axdom(window).unbind("mousemove.AXResizable"),axdom(window).unbind("mouseup.AXResizable"),axdom(document.body).removeAttr("onselectstart"),this.helperAppened){this.helperAppened=!1;var newWidth=this.helper.width(),newHeight=this.helper.height(),paddingLeft=obj.jQueryElement.css("padding-left"),paddingRight=obj.jQueryElement.css("padding-right"),paddingTop=obj.jQueryElement.css("padding-top"),paddingBottom=obj.jQueryElement.css("padding-bottom"),paddingW=paddingLeft.number()+paddingRight.number(),paddingH=paddingTop.number()+paddingBottom.number();obj.config.animate?obj.jQueryElement.animate({width:newWidth-paddingW,height:newHeight-paddingH},obj.config.animate.duration||300,obj.config.animate.easing||"liner",function(){obj.config.onChange&&obj.config.onChange.call(obj,obj)}):(obj.jQueryElement.css({width:newWidth-paddingW,height:newHeight-paddingH}),obj.config.onChange&&obj.config.onChange.call(obj,obj)),this.helper.remove()}},selectorHelperMove:function(objID,objSeq,event){var obj=(this.config,this.objects[objSeq]);if(this.helperAppened){var _helperPos=this.helperPos,x1=this.helperPos.x,y1=this.helperPos.y,x2=event.pageX-_helperPos.bodyLeft,y2=event.pageY-_helperPos.bodyTop,minWidth=obj.config.minWidth||0,minHeight=obj.config.minHeight||0,maxWidth=obj.config.maxWidth||0,maxHeight=obj.config.maxHeight||0,myWidth=x2-x1,myHeight=y2-y1;0!=minWidth&&minWidth>myWidth&&(myWidth=minWidth),0!=minHeight&&minHeight>myHeight&&(myHeight=minHeight),0!=maxWidth&&myWidth>maxWidth&&(myWidth=maxWidth),0!=maxHeight&&myHeight>maxHeight&&(myHeight=maxHeight),obj.config.aspectRatio&&(myWidth=myHeight*obj.config.aspectRatio),obj.config.snap&&(myWidth=obj.config.snap*(myWidth/obj.config.snap).ceil(),myHeight=obj.config.snap*(myHeight/obj.config.snap).ceil()),this.helper.css({width:myWidth,height:myHeight})}else{this.helperAppened=!0,axdom(document.body).append(this.helper);var bodyLeft=axdom(document.body).offset().left,pos=(axdom(document.body).offset().top,obj.jQueryElement.offset()),css={left:pos.left+bodyLeft,
  top:pos.top+bodyLeft,width:obj.jQueryElement.outerWidth(),height:obj.jQueryElement.outerHeight()};this.helper.css(css),this.helperPos={x:css.left,y:css.top,bodyLeft:axdom(document.body).offset().left,bodyTop:axdom(document.body).offset().top}}}}),AXResizableBinder=new AXResizable;AXResizableBinder.setConfig({targetID:"defaultResizable"}),axdom.fn.bindAXResizable=function(config){return AXUtil.each(this,function(){return config=config||{},config.id=this.id,AXResizableBinder.bind(config),this}),this},axdom.fn.unbindAXResizable=function(config){return AXUtil.each(this,function(){return void 0==config&&(config={}),config.id=this.id,AXResizableBinder.unbind(config),this}),this};var AXContextMenuClass=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.showedItem={},this.objects=[],this.config.theme="AXContextMenu",this.config.width="140",this.config.responsiveMobile=0,this.config.reserveKeys={subMenu:"subMenu"}},init:function(){},bindSetConfig:function(objID,configs){var findIndex=null;if(AXUtil.each(this.objects,function(index,O){return O.id==objID?(findIndex=index,!1):void 0}),null!=findIndex){var _self=this.objects[findIndex];axf.each(configs,function(k,v){_self.config[k]=v})}},bind:function(obj){var cfg=this.config;if(!obj.id)return void trace("ID가 없어 bind 처리할 수 없습니다. AXContentMenu.bind({id:'idValue'});");var objSeq=null;return axf.each(this.objects,function(idx,O){return this.id==obj.id?(objSeq=idx,!1):void 0}),obj.reserveKeys||(obj.reserveKeys=cfg.reserveKeys),null!=objSeq?(this.objects[objSeq]=obj,this):(objSeq=this.objects.length,this.objects.push(obj),this)},filter:function(objSeq,objID,myobj,menu){var obj=(this.config,this.objects[objSeq]);if(myobj.filter){var sendObj={menu:menu,sendObj:obj.sendObj};return myobj.filter.call(sendObj,objID)}return!0},getSubMenu:function(parentID,objSeq,objID,myobj,subMenu,depth){var cfg=this.config,obj=this.objects[objSeq],theme=obj.theme||cfg.theme,width=obj.width||cfg.width,filter=this.filter.bind(this),getSubMenu=this.getSubMenu.bind(this),subMenuID=parentID+"_AX_subMenu",href=void 0==obj.href?cfg.href:obj.href,po=[];return po.push('<div id="'+subMenuID+'" class="'+theme+'" style="width:'+width+"px;left:"+(width.number()-15)+'px;display:none;">'),AXUtil.each(subMenu,function(idx,menu){if(filter(objSeq,objID,myobj,menu)){menu.upperLine&&po.push('<div class="hline"></div>');var className=menu.className?menu.className:"",hasSubMenu=menu[obj.reserveKeys.subMenu]?" hasSubMenu":"";po.push("<a "+href+' class="contextMenuItem '+className+hasSubMenu+'" id="'+subMenuID+"_AX_"+depth+"_AX_"+idx+'">');var checked="";obj.checkbox&&(menu.checked&&(checked=" on"),po.push("<div class='tool-checkbox"+checked+"' id=\""+subMenuID+"_tool_AX_"+depth+"_AX_"+idx+'"></div>')),po.push("<span class='label'>"+menu.label+"</span>"),menu.shotCut&&po.push("<span class='shot-cut'>"+menu.shotCut+"</span>"),po.push("<div class='tool-rightGroup'>"),menu[obj.reserveKeys.subMenu]&&menu[obj.reserveKeys.subMenu].length>0&&po.push('<div class="contextSubMenuIcon"></div>'),po.push("</div>"),po.push("</a>"),menu.__axdomId=subMenuID+"_AX_"+depth+"_AX_"+idx,menu[obj.reserveKeys.subMenu]&&menu[obj.reserveKeys.subMenu].length>0&&po.push(getSubMenu(subMenuID+"_AX_"+depth+"_AX_"+idx,objSeq,objID,myobj,menu[obj.reserveKeys.subMenu],depth+1)),menu.underLine&&po.push('<div class="hline"></div>')}}),po.push("</div>"),po.join("")},open:function(myobj,position){var cfg=this.config;return axf.clientWidth()<cfg.responsiveMobile?this.mobileOpen(myobj,position):this.deskTopOpen(myobj,position),this},mobileOpen:function(myobj,position){var objSeq=(this.config,null);if(AXUtil.each(this.objects,function(index,O){return O.id==myobj.id?(objSeq=index,!1):void 0}),null!=objSeq){var obj=this.objects[objSeq],objID=obj.id;this.modal=new AXMobileModal,this.modal.setConfig({addClass:"",height:388,width:300,head:{close:{onclick:function(){}}},onclose:function(){}});var initMobileModalBind=this.initMobileModal.bind(this),onLoad=function(modalObj){initMobileModalBind(objID,objSeq,myobj,modalObj)};this.modal.open(null,onLoad),this.mobileMode=!0}},initMobileModal:function(objID,objSeq,myobj,modalObj){var cfg=this.config,_this=this,obj=this.objects[objSeq];this.mobileModalObj={myobj:myobj,modalObj:modalObj},myobj.sendObj&&(obj.sendObj=myobj.sendObj);var href=void 0==obj.href?cfg.href:obj.href,filter=this.filter.bind(this),headPo=[];headPo.push("<a "+href+' class="AXContextMenuHome">home</a>'),headPo.push('<span id="'+objID+'_AX_mobileMenuPrevBox"></span>'),modalObj.modalHead.empty(),modalObj.modalHead.append(headPo.join("")),modalObj.modalHead.find(".AXContextMenuHome").bind("click",function(){_this.initMobileModal(objID,objSeq,myobj,modalObj)});var styles=[];styles.push("height:339px;");var menuList=obj.menu,po=[];po.push('<div id="'+objID+'_AX_containerBox" class="AXContextMenuContainer" style="'+styles.join(";")+'">'),po.push('<div id="'+objID+'_AX_scroll" class="AXContextMenuScroll">'),"undefined"==typeof obj.reserveKeys&&(obj.reserveKeys=cfg.reserveKeys),axf.each(menuList,function(idx,menu){if(menu&&filter(objSeq,objID,myobj,menu)){var className=menu.className?" "+menu.className:"",hasSubMenu=menu[obj.reserveKeys.subMenu]?" hasSubMenu":"";po.push("<a "+href+' class="contextMenuItem'+className+hasSubMenu+'" id="'+objID+"_AX_contextMenu_AX_0_AX_"+idx+'">');var checked="";if(obj.checkbox&&(menu.checked&&(checked=" on"),po.push("<div class='tool-checkbox"+checked+"' id=\""+objID+"_AX_contextMenuToolCheck_AX_0_AX_"+idx+'"></div>')),po.push("<span class='label'>"+menu.label+"</label>"),menu.shotCut&&po.push("<span class='shot-cut'>"+menu.shotCut+"</span>"),po.push("<div class='tool-rightGroup'>"),menu[obj.reserveKeys.subMenu]&&menu[obj.reserveKeys.subMenu].length>0&&po.push('<div class="contextSubMenuIcon"></div>'),obj.sortbox){var sortdirect="";menu.sort&&(sortdirect=" "+menu.sort.toString().lcase()),po.push('<div class="tool-sort'+sortdirect+'" id="'+objID+"_AX_contextMenuToolSort_AX_0_AX_"+idx+'"></div>')}po.push("</div>"),po.push("</a>"),menu.__axdomId=objID+"_AX_contextMenu_AX_0_AX_"+idx}}),po.push("</div>"),po.push("</div>"),modalObj.modalBody.empty(),modalObj.modalBody.append(po.join("")),this.myUIScroll=new AXScroll,this.myUIScroll.setConfig({targetID:objID+"_AX_containerBox",scrollID:objID+"_AX_scroll"});var contextMenuItemClick=this.contextMenuItemClick.bind(this);this.closeMobileModal.bind(this);this.contextMenuItemClickBind=function(event){contextMenuItemClick(event,objSeq,objID)},modalObj.modalBody.find(".contextMenuItem").bind("click",this.contextMenuItemClickBind)},mobileModalSubMenu:function(parentID,objSeq,objID,myobj,modalObj,pMenu,depth){var cfg=this.config,_this=this,obj=this.objects[objSeq],filter=(obj.theme||cfg.theme,obj.width||cfg.width,this.filter.bind(this)),subMenuID=(this.mobileModalSubMenu.bind(this),parentID+"_AX_subMenu"),href=void 0==obj.href?cfg.href:obj.href,poi=parentID.split(/_AX_/g),pdepth=poi[poi.length-2].number();axdom("#"+objID+"_AX_mobileMenuPrevBox").html('<a class="AXContextMenuPrev" id="'+objID+"_AX_prev_AX_"+poi.join("_")+'">'+pMenu.label+"</a>"),axdom("#"+objID+"_AX_prev_AX_"+poi.join("_")).bind("click",function(){if(0==pdepth)_this.initMobileModal(objID,objSeq,myobj,modalObj);else{for(var poi=pMenu.__axdomId.split(/_AX_/g),hashs=(poi[poi.length-2].number(),[]),mystrPosition=poi.length-1,r=0;depth+1>r;r++)isNaN(poi[mystrPosition])||hashs.push(poi[mystrPosition]),mystrPosition-=3;hashs=hashs.reverse(),hashs.pop();for(var hash,menu=obj.menu,idx=0,__arr=hashs;idx<__arr.length&&(hash=__arr[idx]);idx++)menu=0==idx?menu[hash]:menu[obj.reserveKeys.subMenu][hash];_this.mobileModalSubMenu(menu.__axdomId,objSeq,objID,_this.mobileModalObj.myobj,_this.mobileModalObj.modalObj,menu,depth-1)}});var styles=[];styles.push("height:339px;");var menuList=pMenu[obj.reserveKeys.subMenu],po=[];po.push('<div id="'+objID+'_AX_containerBox" class="AXContextMenuContainer" style="'+styles.join(";")+'">'),po.push('<div id="'+objID+'_AX_scroll" class="AXContextMenuScroll">'),axf.each(menuList,function(idx,menu){if(menu&&filter(objSeq,objID,myobj,menu)){var className=menu.className?" "+menu.className:"",hasSubMenu=menu[obj.reserveKeys.subMenu]?" hasSubMenu":"";po.push("<a "+href+' class="contextMenuItem'+className+hasSubMenu+'" id="'+subMenuID+"_AX_"+depth+"_AX_"+idx+'">');var checked="";if(obj.checkbox&&(menu.checked&&(checked=" on"),po.push("<div class='tool-checkbox"+checked+"' id=\""+subMenuID+"_AX_contextMenuToolCheck_AX_"+depth+"_AX_"+idx+'"></div>')),po.push("<span class='label'>"+menu.label+"</label>"),menu.shotCut&&po.push("<span class='shot-cut'>"+menu.shotCut+"</span>"),po.push("<div class='tool-rightGroup'>"),menu[obj.reserveKeys.subMenu]&&menu[obj.reserveKeys.subMenu].length>0&&po.push('<div class="contextSubMenuIcon"></div>'),obj.sortbox){var sortdirect="";menu.sort&&(sortdirect=" "+menu.sort.toString().lcase()),po.push('<div class="tool-sort'+sortdirect+'" id="'+subMenuID+"_AX_contextMenuToolSort_AX_"+depth+"_AX_"+idx+'"></div>')}po.push("</div>"),po.push("</a>"),menu.__axdomId=subMenuID+"_AX_"+depth+"_AX_"+idx}}),po.push("</div>"),po.push("</div>"),modalObj.modalBody.empty(),modalObj.modalBody.append(po.join("")),this.myUIScroll=new AXScroll,this.myUIScroll.setConfig({targetID:objID+"_AX_containerBox",scrollID:objID+"_AX_scroll"});var contextMenuItemClick=this.contextMenuItemClick.bind(this);this.closeMobileModal.bind(this);this.contextMenuItemClickBind=function(event){contextMenuItemClick(event,objSeq,objID)},modalObj.modalBody.find(".contextMenuItem").bind("click",this.contextMenuItemClickBind)},closeMobileModal:function(){this.config;this.modal.close()},deskTopOpen:function(myobj,position){var cfg=this.config,objSeq=null;if(this.mobileMode=!1,AXUtil.each(this.objects,function(index,O){return O.id==myobj.id?(objSeq=index,!1):void 0}),null!=objSeq){var obj=this.objects[objSeq],objID=obj.id;if(myobj.sendObj&&(obj.sendObj=myobj.sendObj),!AXgetId(objID)){var theme=obj.theme||cfg.theme,width=obj.width||cfg.width;axdom("#"+objID).remove();var href=void 0==obj.href?cfg.href:obj.href,filter=this.filter.bind(this),getSubMenu=this.getSubMenu.bind(this),displayMenuCount=0,po=[];if(po.push('<div id="'+objID+'" class="'+theme+'" style="width:'+width+'px;">'),AXUtil.each(obj.menu,function(idx,menu){if(menu&&filter(objSeq,objID,myobj,menu)){menu.upperLine&&po.push('<div class="hline"></div>');var className=menu.className?" "+menu.className:"",hasSubMenu=menu[obj.reserveKeys.subMenu]?" hasSubMenu":"";po.push("<a "+href+' class="contextMenuItem'+className+hasSubMenu+'" id="'+objID+"_AX_contextMenu_AX_0_AX_"+idx+'">');var checked="";obj.checkbox&&(menu.checked&&(checked=" on"),po.push("<div class='tool-checkbox"+checked+"' id=\""+objID+"_AX_contextMenuTool_AX_0_AX_"+idx+'"></div>')),po.push("<span class='label'>"+menu.label+"</span>"),menu.shotCut&&po.push("<span class='shot-cut'>"+menu.shotCut+"</span>"),po.push("<div class='tool-rightGroup'>"),menu[obj.reserveKeys.subMenu]&&menu[obj.reserveKeys.subMenu].length>0&&po.push('<div class="contextSubMenuIcon"></div>'),obj.sortbox&&po.push('<div class="tool_sort desc"></div>'),po.push("</div>"),po.push("</a>"),menu.__axdomId=objID+"_AX_contextMenu_AX_0_AX_"+idx,menu[obj.reserveKeys.subMenu]&&menu[obj.reserveKeys.subMenu].length>0&&po.push(getSubMenu(objID+"_AX_contextMenu_AX_0_AX_"+idx,objSeq,objID,myobj,menu[obj.reserveKeys.subMenu],1)),menu.underLine&&po.push('<div class="hline"></div>'),displayMenuCount++}}),po.push("</div>"),0==displayMenuCount)return!1;axdom(document.body).append(po.join("")),axdom("#"+objID+" .contextMenuItem:first-child").addClass("first"),axdom("#"+objID+" .contextMenuItem:last-child").addClass("last");var contextMenuItemMouseOver=this.contextMenuItemMouseOver.bind(this);this.contextMenuItemMouseOverBind=function(event){contextMenuItemMouseOver(event,objSeq,objID)},axdom("#"+objID+" .contextMenuItem").bind("mouseover",this.contextMenuItemMouseOverBind);var css={};if(position.clientX){var mouse=this.getMousePositon(position);css.left=mouse.pageX,css.top=mouse.pageY}else void 0!=position.left?css.left=position.left:css.right=position.right,css.top=position.top;var pElement=axdom("#"+objID).offsetParent(),pBox={width:pElement.width(),height:pElement.height()},clientHeight="Q"==AXUtil.docTD?document.body.scrollHeight:document.documentElement.scrollHeight,clienWidth="Q"==AXUtil.docTD?document.body.scrollWidth:document.documentElement.scrollWidth;clienWidth>pBox.width&&(pBox.width=clienWidth),clientHeight>pBox.height&&(pBox.height=clientHeight);var _box={width:axdom("#"+objID).outerWidth(),height:axdom("#"+objID).outerHeight()};if(_box.height.number()+css.top.number()>pBox.height&&(css.top-=_box.height.number()+css.top.number()-pBox.height+25,this.openTB="up",css.top<0&&(css.top=0)),void 0!=css.left)if(_box.width.number()+css.left.number()>pBox.width){var moveLeft=_box.width.number()+css.left.number()-pBox.width+25;css.left-=moveLeft,this.openLR="left"}else 2*_box.width.number()+css.left.number()>pBox.width&&(this.openLR="left");else css.left="auto",this.openLR="right";axdom("#"+objID).css(css),this.eventBind(objSeq,objID)}}},eventBind:function(objSeq,objID){var contextMenuItemDown=(this.config,this.contextMenuItemDown.bind(this)),contextMenuItemDownBind=function(event){contextMenuItemDown(event,objSeq,objID)};axdom(document).bind("mousedown.AXContenxtMenu",contextMenuItemDownBind),axdom(document).bind("keydown.AXContenxtMenu",contextMenuItemDownBind),axdom(document).find("iframe").each(function(){try{axdom(window[this.name].document).bind("mousedown.AXContenxtMenu",contextMenuItemDownBind),axdom(window[this.name].document).bind("keydown.AXContenxtMenu",contextMenuItemDownBind)}catch(e){}});var contextMenuItemClick=this.contextMenuItemClick.bind(this);this.contextMenuItemClickBind=function(event){contextMenuItemClick(event,objSeq,objID)},axdom("#"+objID).find(".contextMenuItem").bind("click",this.contextMenuItemClickBind)},_close:function(objSeq,objID){var obj=(this.config,this.objects[objSeq]),that={id:obj.id,event_type:"event"};this.mobileMode?this.closeMobileModal():axdom("#"+objID).fadeOut("fast",function(){axdom("#"+objID).remove()}),axdom(document).unbind("keydown.AXContenxtMenu"),axdom(document).unbind("mousedown.AXContenxtMenu"),axdom(document).find("iframe").each(function(){window[this.name]&&(axdom(window[this.name].document).unbind("mousedown.AXContenxtMenu"),axdom(window[this.name].document).unbind("keydown.AXContenxtMenu"))}),this.showedItem={},this.openTB="",this.openLR="",obj.onclose&&obj.onclose.call(that)},close:function(myobj){var objSeq=(this.config,null);if(axf.each(this.objects,function(index,O){return O.id==myobj.id?(objSeq=index,!1):void 0}),null!=objSeq){var obj=this.objects[objSeq],objID=obj.id;({id:obj.id,event_type:"script"});return this.mobileMode?this.closeMobileModal():axdom("#"+objID).fadeOut("fast",function(){axdom("#"+objID).remove()}),axdom(document).unbind("keydown",this.contextMenuItemDownBind),axdom(document).unbind("mousedown",this.contextMenuItemDownBind),this.showedItem={},this.openTB="",this.openLR="",obj.onclose,this}},contextMenuItemMouseOver:function(event,objSeq,objID){var cfg=this.config,obj=this.objects[objSeq],eid=(obj.width||cfg.width,event.target.id.split(/_AX_/g)),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,find:function(evt,evtIDs){return!!axdom(evt).hasClass("contextMenuItem")}});if(myTarget){var poi=myTarget.id.split(/_AX_/g),depth=poi[poi.length-2];if(this.showedItem[depth]&&axdom("#"+this.showedItem[depth]).hide(),axdom(myTarget).hasClass("hasSubMenu")){var pElement=axdom("#"+myTarget.id+"_AX_subMenu").offsetParent(),pBox={width:pElement.width(),height:pElement.height()},clientHeight="Q"==AXUtil.docTD?document.body.scrollHeight:document.documentElement.scrollHeight,clienWidth="Q"==AXUtil.docTD?document.body.scrollWidth:document.documentElement.scrollWidth;clienWidth>pBox.width&&(pBox.width=clienWidth),clientHeight>pBox.height&&(pBox.height=clientHeight);var css,subMenuTop=({width:axdom("#"+myTarget.id+"_AX_subMenu").outerWidth(),height:axdom("#"+myTarget.id+"_AX_subMenu").outerHeight()},axdom("#"+myTarget.id).position().top);if("up"==this.openTB){var ph=axdom("#"+myTarget.id).offsetParent().height(),h=axdom("#"+myTarget.id).height(),bottom=ph-subMenuTop-h;css={top:"auto",bottom:bottom}}else css={top:subMenuTop};"left"==this.openLR&&(css.left=-20),axdom("#"+myTarget.id+"_AX_subMenu").css(css),axdom("#"+myTarget.id+"_AX_subMenu").show(),this.showedItem[depth]=myTarget.id+"_AX_subMenu"}}},contextMenuItemDown:function(event,objSeq,objID){this.config,this.objects[objSeq];if(event.keyCode==AXUtil.Event.KEY_ESC)return void this._close(objSeq,objID,event);var eid=event.target.id.split(/_AX_/g),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,find:function(evt,evtIDs){return!!axdom(evt).hasClass("contextMenuItem")}});myTarget||this._close(objSeq,objID,event)},contextMenuItemClick:function(event,objSeq,objID){var obj=(this.config,this.objects[objSeq]),eid=event.target.id.split(/_AX_/g),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,find:function(evt,evtIDs){return!!(axdom(evt).hasClass("contextMenuItem")||axdom(evt).hasClass("tool-checkbox")||axdom(evt).hasClass("tool-sort"))}});if(myTarget){for(var poi=myTarget.id.split(/_AX_/g),depth=poi[poi.length-2].number(),hashs=[],mystrPosition=poi.length-1,r=0;depth+1>r;r++)hashs.push(poi[mystrPosition]),mystrPosition-=3;hashs=hashs.reverse();for(var hash,menu=obj.menu,idx=0,__arr=hashs;idx<__arr.length&&(hash=__arr[idx]);idx++)menu=0==idx?menu[hash]:menu[obj.reserveKeys.subMenu][hash];if(menu[obj.reserveKeys.subMenu]&&menu[obj.reserveKeys.subMenu].length>0&&this.mobileMode)return this.mobileModalSubMenu(myTarget.id,objSeq,objID,this.mobileModalObj.myobj,this.mobileModalObj.modalObj,menu,depth+1),!1;if(axdom(myTarget).hasClass("tool-checkbox"))return menu.checked=!menu.checked,axdom("#"+menu.__axdomId).find(".tool-checkbox").toggleClass("on"),obj.onchange&&obj.onchange.call({menu:obj.menu,clickMenu:menu,sendObj:obj.sendObj},objID),!0;if(axdom(myTarget).hasClass("tool-sort")){for(var M,midx=0,__arr=obj.menu;midx<__arr.length&&(M=__arr[midx]);midx++)menu!=M&&(M.sort=void 0,axdom("#"+M.__axdomId).find(".tool-sort").removeClass("asc").removeClass("desc"));return void 0==menu.sort&&(menu.sort=""),"asc"==menu.sort.toString().lcase()?(axdom("#"+menu.__axdomId).find(".tool-sort").removeClass("asc").addClass("desc"),menu.sort="desc"):"desc"==menu.sort.toString().lcase()?(axdom("#"+menu.__axdomId).find(".tool-sort").removeClass("desc").addClass("asc"),menu.sort="asc"):(axdom("#"+menu.__axdomId).find(".tool-sort").addClass("desc"),menu.sort="desc"),obj.onsort&&1!=obj.onsort.call({menu:obj.menu,sortMenu:menu,sendObj:obj.sendObj},objID)&&this._close(objSeq,objID,event),!0}if(menu.onclick)return 1!=menu.onclick.call({menu:menu,sendObj:obj.sendObj},objID)&&this._close(objSeq,objID,event),!0;if(obj.onchange)return menu.checked=!menu.checked,axdom("#"+menu.__axdomId).find(".tool-checkbox").toggleClass("on"),obj.onchange&&1!=obj.onchange.call({menu:obj.menu,clickMenu:menu,sendObj:obj.sendObj},objID)&&this._close(objSeq,objID,event),!0}}}),AXContextMenu=new AXContextMenuClass;AXContextMenu.setConfig({});var AXPopOverClass=Class.create(AXContextMenuClass,{open:function(myobj,position){var cfg=this.config,objSeq=null;if(AXUtil.each(this.objects,function(index,O){O.id==myobj.id?objSeq=index:axdom("#"+O.id).remove()}),null!=objSeq){var obj=this.objects[objSeq],objID=obj.id;myobj.sendObj&&(obj.sendObj=myobj.sendObj),this.observer&&clearTimeout(this.observer);var direction=obj.direction||"top";if(AXgetId(objID))return void(position.clientX&&this.contentMenuSetCss(event,position,objSeq,objID));var theme=obj.theme||cfg.theme,width=obj.width||cfg.width,arrowStyle="";position.clientX?arrowStyle="background-position:10px 0px;":position.arrowLeft&&(arrowStyle="background-position:"+position.arrowLeft+"px 0px;"),axdom("#"+objID).remove();var href=void 0==obj.href?cfg.href:obj.href,filter=this.filter.bind(this),getSubMenu=this.getSubMenu.bind(this),po=[];po.push('<div id="'+objID+'" class="'+theme+'" style="width:'+width+'px;">'),po.push('<div class="arrowTop" style="'+arrowStyle+'"></div>'),po.push('<div class="arrowBottom" style="'+arrowStyle+'"></div>'),po.push('<div class="blockContainer">'),obj.menu?AXUtil.each(obj.menu,function(idx,menu){if(!menu)return!1;if(filter(objSeq,objID,myobj,menu)){menu.upperLine&&po.push('<div class="hline"></div>');var className=menu.className?" "+menu.className:"",hasSubMenu=menu.subMenu?" hasSubMenu":"";po.push("<a "+href+' class="contextMenuItem'+className+hasSubMenu+'" id="'+objID+"_AX_contextMenu_AX_0_AX_"+idx+'">'),po.push(menu.label),menu.subMenu&&menu.subMenu.length>0&&po.push('<div class="contextSubMenuIcon"></div>'),po.push("</a>"),menu.subMenu&&menu.subMenu.length>0&&po.push(getSubMenu(objID+"_AX_contextMenu_AX_0_AX_"+idx,objSeq,objID,myobj,menu.subMenu,1)),menu.underLine&&po.push('<div class="hline"></div>')}}):obj.body&&(po.push('<div class="contextMenuBody">'),po.push(obj.body),po.push("</div>")),po.push("</div>"),po.push("</div>"),axdom(document.body).append(po.join("")),"top"==direction?(axdom("#"+objID).find(".arrowTop").show(),axdom("#"+objID).find(".arrowBottom").hide()):"bottom"==direction?(axdom("#"+objID).find(".arrowTop").hide(),axdom("#"+objID).find(".arrowBottom").show()):(axdom("#"+objID).find(".arrowTop").show(),axdom("#"+objID).find(".arrowBottom").hide()),axdom("#"+objID+" .contextMenuItem:first-child").addClass("first"),axdom("#"+objID+" .contextMenuItem:last-child").addClass("last");var contextMenuItemMouseOver=this.contextMenuItemMouseOver.bind(this);this.contextMenuItemMouseOverBind=function(event){contextMenuItemMouseOver(event,objSeq,objID)};var contextMenuMouseOut=this.contextMenuMouseOut.bind(this);this.contextMenuMouseOutBind=function(event){contextMenuMouseOut(event,objSeq,objID)};var eventClear=function(){this.observer&&clearTimeout(this.observer)};return axdom("#"+objID+" .contextMenuItem").bind("mouseover",this.contextMenuItemMouseOverBind),axdom("#"+objID).bind("mouseover",eventClear.bind(this)),axdom("#"+objID).bind("mouseout",this.contextMenuMouseOutBind),this.contentMenuSetCss(null,position,objSeq,objID),this.eventBind(objSeq,objID),this}},contentMenuSetCss:function(event,position,objSeq,objID){var obj=(this.config,this.objects[objSeq]),direction=obj.direction||"top",css={};if(position.clientX){var mouse=this.getMousePositon(position);obj.eventPosition=!0,css.left=mouse.pageX,css.left-=20,css.top=mouse.pageY}else void 0!=position.left?css.left=position.left:(css.left="auto",css.right=position.right),css.top=position.top;var pElement=axdom("#"+objID).offsetParent(),pBox={width:pElement.width(),height:pElement.height()},clientHeight="Q"==AXUtil.docTD?document.body.scrollHeight:document.documentElement.scrollHeight,clienWidth="Q"==AXUtil.docTD?document.body.scrollWidth:document.documentElement.scrollWidth;clienWidth>pBox.width&&(pBox.width=clienWidth),clientHeight>pBox.height&&(pBox.height=clientHeight);var _box={width:axdom("#"+objID).outerWidth(),height:axdom("#"+objID).outerHeight()},openTB="";if("top"==direction?openTB="top":"bottom"==direction?(css.top-=axdom("#"+objID).outerHeight(),openTB="bottom"):_box.height.number()+css.top.number()>pBox.height?(css.top=css.top-_box.height.number()-position.handleHeight-3,axdom("#"+objID).find(".arrowTop").hide(),axdom("#"+objID).find(".arrowBottom").show(),openTB="bottom"):(axdom("#"+objID).find(".arrowTop").show(),axdom("#"+objID).find(".arrowBottom").hide(),openTB="top"),void 0!=css.left&&_box.width.number()+css.left.number()>pBox.width){var moveLeft=_box.width.number()+css.left.number()-pBox.width+5;css.left-=moveLeft,"top"==openTB?axdom("#"+objID).find(".arrowTop").css({"background-position":moveLeft+5+"px 0px;"}):axdom("#"+objID).find(".arrowBottom").css({"background-position":moveLeft+5+"px 0px;"})}axdom("#"+objID).css(css)},contextMenuItemMouseOver:function(event,objSeq,objID){var cfg=this.config,obj=this.objects[objSeq];this.observer&&clearTimeout(this.observer);var eid=(obj.width||cfg.width,event.target.id.split(/_AX_/g)),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,find:function(evt,evtIDs){return!!axdom(evt).hasClass("contextMenuItem")}});if(myTarget){var poi=myTarget.id.split(/_AX_/g),depth=poi[poi.length-2];if(this.showedItem[depth]&&axdom("#"+this.showedItem[depth]).hide(),axdom(myTarget).hasClass("hasSubMenu")){var css,subMenuTop=axdom("#"+myTarget.id).position().top;if("up"==this.openTB){var ph=axdom("#"+myTarget.id).offsetParent().height(),h=axdom("#"+myTarget.id).height(),bottom=ph-subMenuTop-h;css={top:"auto",bottom:bottom}}else css={top:subMenuTop};"left"==this.openLR&&(css.left=-20),axdom("#"+myTarget.id+"_AX_subMenu").css(css),axdom("#"+myTarget.id+"_AX_subMenu").show(),this.showedItem[depth]=myTarget.id+"_AX_subMenu"}}},contextMenuMouseOut:function(event,objSeq,objID){var close=this._close.bind(this);this.observer=setTimeout(function(){close(objSeq,objID)},200)}}),AXPopOver=new AXPopOverClass;AXPopOver.setConfig({theme:"AXPopOver"}),axdom.fn.bindTooltip=function(config){return void 0==config&&(config={}),AXUtil.each(this,function(){var tooltipContent=axdom("#"+this.id+"_AX_tooltip").html();AXPopOver.bind({id:this.id+"_AX_tooltipobj",theme:config.theme||"AXPopOverTooltip",width:config.width||"",direction:config.direction||"top",body:tooltipContent}),axdom(this).bind(config.event||"mouseover",function(){var pos=axdom(this).offset(),direction=config.direction||"top",posTop=pos.top;"bottom"==direction?posTop-=3:posTop+=axdom(this).outerHeight()+3,AXPopOver.open({id:this.id+"_AX_tooltipobj",sendObj:{}},{left:pos.left,top:posTop,handleHeight:axdom(this).outerHeight().number()+3})})}),this};var AXMobileModal=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.config.theme="AXMobileModal",this.config.width="auto",this.config.height="auto",this.config.margin="10px",this.config.align="center",this.config.valign="center"},init:function(){var cfg=this.config;cfg.head||(cfg.head={})},open:function(configs,onLoad){var cfg=this.config;configs||(configs={});var theme=configs.theme||cfg.theme;cfg.addClass&&(theme+=" "+cfg.addClass),this.modalId="AXMobileModal"+AXUtil.timekey();var modalId=this.modalId,po=(configs.clientWidth||AXUtil.clientWidth(),[]);return po.push('<div id="',modalId,'" class="',theme,'" style="left:0px;top:0px;width:100%;height:100%;">'),po.push('	<div  id="',modalId,'_AX_modal" class="AXMobileModalPanel" style="height:50px;width:50px;left:',(AXUtil.clientWidth()-50)/2,"px;top:",(AXUtil.clientHeight()-50)/2,'px;">'),po.push('		<div  id="',modalId,'_AX_head" class="mobileModalHead">'),po.push('			<div class="modalTitle">'+(cfg.head.title||"")+"</div>"),po.push("		</div>"),cfg.head.close&&po.push("		<a "+cfg.href+' class="mobileModelClose">Close</a>'),po.push('		<div  id="',modalId,'_AX_body" class="mobileModalBody"></div>'),po.push('		<div  id="',modalId,'_AX_foot" class="mobileModalFoot"></div>'),po.push("	</div>"),po.push("</div>"),this.jQueryModal=axdom(po.join("")),axdom(document.body).append(this.jQueryModal),this.modalPanel=this.jQueryModal.find(".AXMobileModalPanel"),this.modalHead=this.modalPanel.find(".mobileModalHead"),this.modalBody=this.modalPanel.find(".mobileModalBody"),this.modalFoot=this.modalPanel.find(".mobileModalFoot"),this.openConfigs=configs,this.setSizeModal(this.openConfigs,onLoad),this.modalPanel.find(".mobileModelClose").bind("click",this.close.bind(this)),this.jQueryModal.bind("click",this.modalClick.bind(this)),axdom(window).unbind("resize.AXMobileModal").bind("resize.AXMobileModal",this.reposition.bind(this)),this.opened=!0,{jQueryModal:this.jQueryModal,modalPanel:this.modalPanel,modalHead:this.modalHead,modalBody:this.modalBody,modalFoot:this.modalFoot}},setSizeModal:function(configs,onLoad){var clientWidth,width,height,left,top,margin,align,valign,modalWidth,modalHeight,cfg=this.config,cssStyles={},clientWidth=this.jQueryModal.innerWidth(),clientHeight=AXUtil.clientHeight(),width=configs.width||cfg.width,height=configs.height||cfg.height,margin=configs.margin||cfg.margin,align=configs.align||cfg.align,valign=configs.valign||cfg.valign;this.openModalAttr={width:width,height:height,margin:margin,align:align,valign:valign},modalWidth="auto"==width?"%"==margin.right(1)?clientWidth*(100-2*margin.number())/100:clientWidth-2*margin.number():width,left=(clientWidth-modalWidth)/2,modalHeight="auto"==height?"%"==margin.right(1)?clientHeight*(100-2*margin.number())/100:clientHeight-2*margin.number():height,top=(clientHeight-modalHeight)/2,0>left&&(left=margin),-5>top&&(top=-5);var cssStylesStart={left:(axf.clientWidth()-.8*modalWidth)/2,top:(axf.clientHeight()-.8*modalHeight)/2,width:.8*modalWidth,height:.8*modalHeight};this.modalPanel.css(cssStylesStart),cssStyles.left=left,cssStyles.top=top,cssStyles.width=modalWidth,cssStyles.height=modalHeight,mask.open();var returnObj={jQueryModal:this.jQueryModal,modalPanel:this.modalPanel,modalHead:this.modalHead,modalBody:this.modalBody,modalFoot:this.modalFoot};"android"==AXUtil.browser.name?(this.modalPanel.css(cssStyles),onLoad&&onLoad.call(returnObj,returnObj)):this.modalPanel.animate(cssStyles,300,"expoOut",function(){onLoad&&onLoad.call(returnObj,returnObj)})},modalClick:function(event){this.config;event.target.id==this.modalId&&this.close()},close:function(){var cfg=this.config;mask.close();var modalWidth,modalHeight;modalWidth=this.modalPanel.width(),modalHeight=this.modalPanel.height();var cssStylesStart={left:(AXUtil.clientWidth()-.8*modalWidth)/2,top:(AXUtil.clientHeight()-.8*modalHeight)/2,width:.8*modalWidth,height:.8*modalHeight,opacity:0},remove=this.remove.bind(this);return this.modalPanel.animate(cssStylesStart,300,"expoOut",function(){remove(),cfg.onclose&&cfg.onclose()}),this.modalPanel.empty(),this.opened=!1,axdom(window).unbind("resize.AXMobileModal"),this},remove:function(){this.config;this.jQueryModal.remove()},reposition:function(){var clientWidth=(this.config,AXUtil.clientWidth()),clientHeight=AXUtil.clientHeight();this.jQueryModal.css({width:clientWidth,height:clientHeight});var modalWidth,modalHeight,left,top,width=this.openModalAttr.width,height=this.openModalAttr.height,margin=this.openModalAttr.margin,cssStyles=(this.openModalAttr.align,this.openModalAttr.valign,{});modalWidth="auto"==width?"%"==margin.right(1)?clientWidth*(100-2*margin.number())/100:clientWidth-2*margin.number():width,left=(clientWidth-modalWidth)/2,modalHeight="auto"==height?"%"==margin.right(1)?clientHeight*(100-2*margin.number())/100:clientHeight-2*margin.number():height,top=(clientHeight-modalHeight)/2,0>left&&(left=margin),-5>top&&(top=-5),cssStyles.left=left,cssStyles.top=top,cssStyles.width=modalWidth,cssStyles.height=modalHeight,this.modalPanel.css(cssStyles)}});axdom.extend(!0,{easing:{backIn:function(p,n,f,d){var c=f+d,s=1.70158;return c*(p/=1)*p*((s+1)*p-s)+f},backOut:function(p,n,f,d){var c=f+d,s=1.70158;return c*((p=p/1-1)*p*((s+1)*p+s)+1)+f},backInOut:function(p,n,f,d){var c=f+d,s=1.70158;return(p/=.5)<1?c/2*(p*p*(((s*=1.525)+1)*p-s))+f:c/2*((p-=2)*p*(((s*=1.525)+1)*p+s)+2)+f},bounceIn:function(p,n,f,d){var c=f+d,inv=this.bounceOut(1-p,1,0,d);return c-inv+f},bounceOut:function(p,n,f,d){var c=f+d;return 1/2.75>p?c*(7.5625*p*p)+f:2/2.75>p?c*(7.5625*(p-=1.5/2.75)*p+.75)+f:2.5/2.75>p?c*(7.5625*(p-=2.25/2.75)*p+.9375)+f:c*(7.5625*(p-=2.625/2.75)*p+.984375)+f},circIn:function(p,n,f,d){var c=f+d;return-c*(Math.sqrt(1-(p/=1)*p)-1)+f},circOut:function(p,n,f,d){var c=f+d;return c*Math.sqrt(1-(p=p/1-1)*p)+f},circInOut:function(p,n,f,d){var c=f+d;return(p/=.5)<1?-c/2*(Math.sqrt(1-p*p)-1)+f:c/2*(Math.sqrt(1-(p-=2)*p)+1)+f},cubicIn:function(p,n,f,d){var c=f+d;return c*(p/=1)*p*p+f},cubicOut:function(p,n,f,d){var c=f+d;return c*((p=p/1-1)*p*p+1)+f},cubicInOut:function(p,n,f,d){var c=f+d;return(p/=.5)<1?c/2*p*p*p+f:c/2*((p-=2)*p*p+2)+f;
  },elasticIn:function(p,n,f,d){var c=f+d;if(0==p)return f;if(1==p)return c;var s,peroid=.25,amplitude=c;return amplitude<Math.abs(c)?(amplitude=c,s=peroid/4):s=peroid/(2*Math.PI)*Math.asin(c/amplitude),-(amplitude*Math.pow(2,10*(p-=1))*Math.sin((1*p-s)*(2*Math.PI)/peroid))+f},elasticOut:function(p,n,f,d){var c=f+d;if(0==p)return f;if(1==p)return c;var s,peroid=.25,amplitude=c;return amplitude<Math.abs(c)?(amplitude=c,s=peroid/4):s=peroid/(2*Math.PI)*Math.asin(c/amplitude),-(amplitude*Math.pow(2,-10*p)*Math.sin((1*p-s)*(2*Math.PI)/peroid))+c},expoIn:function(p,n,f,d){var c=f+d;return 0==p?f:c*Math.pow(2,10*(p-1))+f-.001*c},expoOut:function(p,n,f,d){var c=f+d;return 1==p?c:1.001*d*(-Math.pow(2,-10*p)+1)+f},expoInOut:function(p,n,f,d){var c=f+d;return 0==p?f:1==p?c:(p/=.5)<1?c/2*Math.pow(2,10*(p-1))+f-5e-4*c:c/2*1.0005*(-Math.pow(2,-10*--p)+2)+f},quadIn:function(p,n,f,d){var c=f+d;return c*(p/=1)*p+f},quadOut:function(p,n,f,d){var c=f+d;return-c*(p/=1)*(p-2)+f},quadInOut:function(p,n,f,d){var c=f+d;return(p/=.5)<1?c/2*p*p+f:-c/2*(--p*(p-2)-1)+f},quartIn:function(p,n,f,d){var c=f+d;return c*(p/=1)*p*p*p+f},quartOut:function(p,n,f,d){var c=f+d;return-c*((p=p/1-1)*p*p*p-1)+f},quartInOut:function(p,n,f,d){var c=f+d;return(p/=.5)<1?c/2*p*p*p*p+f:-c/2*((p-=2)*p*p*p-2)+f},quintIn:function(p,n,f,d){var c=f+d;return c*(p/=1)*p*p*p*p+f},quintOut:function(p,n,f,d){var c=f+d;return c*((p=p/1-1)*p*p*p*p+1)+f},quintInOut:function(p,n,f,d){var c=f+d;return(p/=.5)<1?c/2*p*p*p*p*p+f:c/2*((p-=2)*p*p*p*p+2)+f},sineIn:function(p,n,f,d){var c=f+d;return-c*Math.cos(p*(Math.PI/2))+c+f},sineOut:function(p,n,f,d){var c=f+d;return c*Math.sin(p*(Math.PI/2))+f},sineInOut:function(p,n,f,d){var c=f+d;return-c/2*(Math.cos(Math.PI*p)-1)+f}}});var __r20=/%20/g,__rbracket=/\[\]$/,__rCRLF=/\r?\n/g,__rinput=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,__rselectTextarea=/^(?:select|textarea)/i,rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|contextmenu)|click/;axf.each("touchstart touchmove touchend".split(" "),function(i,name){axdom.fn[name]=function(data,fn){return null==fn&&(fn=data,data=null),arguments.length>0?this.on(name,null,data,fn):this.trigger(name)},rkeyEvent.test(name)&&(axdom.event.fixHooks[name]=axdom.event.keyHooks),rmouseEvent.test(name)&&(axdom.event.fixHooks[name]=axdom.event.mouseHooks)}),axdom.fn.serializeObject=function(){var myArray=this.map(function(){return this.elements?axdom.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||__rselectTextarea.test(this.nodeName)||__rinput.test(this.type))}).map(function(i,elem){var val=axdom(this).val(),label=axdom(elem).attr("title")||axdom(elem).attr("placeholder")||"";return null==val&&"select"==this.nodeName.lcase()&&(val=""),null==val?null:axdom.isArray(val)?axdom.map(val,function(val,i){return{id:elem.id,name:elem.name,type:elem.type,value:val.replace(__rCRLF,"\r\n"),label:label}}):{id:elem.id,name:elem.name,type:elem.type,value:val.replace(__rCRLF,"\r\n"),label:label}}).get();return myArray},axdom.fn.endFocus=function(){var elem=this,elemLen=elem.val().length;return 0==elemLen?void elem.focus():(document.selection?(elem.focus(),elem.val(elem.val())):(void 0==document.selection||elem.selectionStart||"0"==elem.selectionStart)&&elem.focus().val(elem.val()),this)},axdom.fn.setCaret=function(pos){var input=this[0];if("undefined"==typeof pos&&(pos=input.value.length),input.setSelectionRange)input.focus(),input.setSelectionRange(pos,pos);else if(input.createTextRange){var range=input.createTextRange();range.collapse(!0),range.moveEnd("character",pos),range.moveStart("character",pos),range.select()}else input.selectionStart&&(input.focus(),input.selectionStart=pos,input.selectionEnd=pos);return this},axdom.fn.onwheel=function(handler,callBackFn){return axf.each(this,function(){"undefined"==typeof axf._customerEvents&&(axf._customerEvents={}),axf._customerEvents[this.id+"_AX_"+handler]=callBackFn,document.attachEvent?this.attachEvent("on"+axf.mousewheelevt,axf._customerEvents[this.id+"_AX_"+handler]):document.addEventListener&&this.addEventListener(axf.mousewheelevt,axf._customerEvents[this.id+"_AX_"+handler],!1)}),this},axdom.fn.offwheel=function(handler){return axf.each(this,function(){document.attachEvent?this.detachEvent("on"+axf.mousewheelevt,axf._customerEvents[this.id+"_AX_"+handler]):document.addEventListener&&this.removeEventListener(axf.mousewheelevt,axf._customerEvents[this.id+"_AX_"+handler],!1)}),this},axdom(document.body).ready(function(){axdom("input[type=text]").bind("mousedown",function(){this.focus()}),axdom("textarea").bind("mousedown",function(){this.focus()})});var DOMfix={DF_parentNode:function(node){if("ie"==AXUtil.browser.name||"op"==AXUtil.browser.name){if(!node)return node;for(;node.previousSibling;)node=node.previousSibling;return node.parentNode}return node.parentNode},DF_childNode:function(node){if("ie"==AXUtil.browser.name||"op"==AXUtil.browser.name){var result=null,ni=0;if(node){var result=[];for(node=node.firstChild;node;)result[ni++]=node,node=node.nextSibling}return result}return node.childNodes}},AXDOMRange=Class.create({START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,initialize:function(_document){this._doc=_document||document,this.collapsed=!0,this.commonAncestorContainer=this._doc.body,this.endContainer=this._doc.body,this.endOffset=0,this.startContainer=this._doc.body,this.startOffset=0},cloneContents:function(){var oClonedContents=this._doc.createDocumentFragment(),oTmpContainer=this._doc.createDocumentFragment(),aNodes=this._getNodesInRange();if(aNodes.length<1)return oClonedContents;var oClonedContainers=this.DF_constructClonedTree(aNodes,oTmpContainer),oTopContainer=oTmpContainer.firstChild;if(oTopContainer)for(var elNextNode,elCurNode=oTopContainer.firstChild;elCurNode;)elNextNode=elCurNode.nextSibling,oClonedContents.appendChild(elCurNode),elCurNode=elNextNode;return oClonedContainers=this._splitTextEndNodes({oStartContainer:oClonedContainers.oStartContainer,iStartOffset:this.startOffset,oEndContainer:oClonedContainers.oEndContainer,iEndOffset:this.endOffset}),oClonedContainers.oStartContainer&&oClonedContainers.oStartContainer.previousSibling&&DOMfix.DF_parentNode(oClonedContainers.oStartContainer).removeChild(oClonedContainers.oStartContainer.previousSibling),oClonedContainers.oEndContainer&&oClonedContainers.oEndContainer.nextSibling&&DOMfix.DF_parentNode(oClonedContainers.oEndContainer).removeChild(oClonedContainers.oEndContainer.nextSibling),oClonedContents},DF_constructClonedTree:function(aNodes,oClonedParentNode){var oClonedStartContainer=null,oClonedEndContainer=null,oStartContainer=this.startContainer,oEndContainer=this.endContainer;return recurConstructClonedTree=function(aAllNodes,iCurIdx,oParentNode,oClonedParentNode){if(0>iCurIdx)return iCurIdx;var iChildIdx=iCurIdx-1,oCurNodeCloneWithChildren=aAllNodes[iCurIdx].cloneNode(!1);for(aAllNodes[iCurIdx]==oStartContainer&&(oClonedStartContainer=oCurNodeCloneWithChildren),aAllNodes[iCurIdx]==oEndContainer&&(oClonedEndContainer=oCurNodeCloneWithChildren);iChildIdx>=0&&DOMfix.DF_parentNode(aAllNodes[iChildIdx])==aAllNodes[iCurIdx];)iChildIdx=this.recurConstructClonedTree(aAllNodes,iChildIdx,aAllNodes[iCurIdx],oCurNodeCloneWithChildren,oClonedStartContainer,oClonedEndContainer);return oClonedParentNode.insertBefore(oCurNodeCloneWithChildren,oClonedParentNode.firstChild),iChildIdx},aNodes[aNodes.length]=DOMfix.DF_parentNode(aNodes[aNodes.length-1]),recurConstructClonedTree(aNodes,aNodes.length-1,aNodes[aNodes.length-1],oClonedParentNode),{oStartContainer:oClonedStartContainer,oEndContainer:oClonedEndContainer}},cloneRange:function(){return this.DF_copyRange(new AXDOMRange(this._doc))},DF_copyRange:function(oClonedRange){return oClonedRange.collapsed=this.collapsed,oClonedRange.commonAncestorContainer=this.commonAncestorContainer,oClonedRange.endContainer=this.endContainer,oClonedRange.endOffset=this.endOffset,oClonedRange.startContainer=this.startContainer,oClonedRange.startOffset=this.startOffset,oClonedRange._document=this._doc,oClonedRange},collapse:function(toStart){toStart?(this.endContainer=this.startContainer,this.endOffset=this.startOffset):(this.startContainer=this.endContainer,this.startOffset=this.endOffset),this._updateRangeInfo()},compareBoundaryPoints:function(how,sourceRange){switch(how){case this.START_TO_START:return this._compareEndPoint(this.startContainer,this.startOffset,sourceRange.startContainer,sourceRange.startOffset);case this.START_TO_END:return this._compareEndPoint(this.endContainer,this.endOffset,sourceRange.startContainer,sourceRange.startOffset);case this.END_TO_END:return this._compareEndPoint(this.endContainer,this.endOffset,sourceRange.endContainer,sourceRange.endOffset);case this.END_TO_START:return this._compareEndPoint(this.startContainer,this.startOffset,sourceRange.endContainer,sourceRange.endOffset)}},DF_getBody:function(node){if(!node)return null;for(;node;){if("BODY"==node.tagName)return node;node=DOMfix.DF_parentNode(node)}return null},_compareEndPoint:function(oContainerA,iOffsetA,oContainerB,iOffsetB){var iIdxA,iIdxB;oContainerA&&this.DF_getBody(oContainerA)==this._doc.body||(oContainerA=this._doc.body,iOffsetA=0),oContainerB&&this.DF_getBody(oContainerB)==this._doc.body||(oContainerB=this._doc.body,iOffsetB=0);var compareIdx=function(iIdxA,iIdxB){return-1==iIdxB&&(iIdxB=iIdxA+1),iIdxB>iIdxA?-1:iIdxA==iIdxB?0:1},oCommonAncestor=this._getCommonAncestorContainer(oContainerA,oContainerB),nodeA=oContainerA;if(nodeA!=oCommonAncestor){for(;(oTmpNode=DOMfix.DF_parentNode(nodeA))!=oCommonAncestor;)nodeA=oTmpNode;iIdxA=this._getPosIdx(nodeA)+.5}else iIdxA=iOffsetA;var nodeB=oContainerB;if(nodeB!=oCommonAncestor){for(;(oTmpNode=DOMfix.DF_parentNode(nodeB))!=oCommonAncestor;)nodeB=oTmpNode;iIdxB=this._getPosIdx(nodeB)+.5}else iIdxB=iOffsetB;return compareIdx(iIdxA,iIdxB)},_getCommonAncestorContainer:function(node1,node2){for(var oComparingNode=node2;node1;){for(;oComparingNode;){if(node1==oComparingNode)return node1;oComparingNode=DOMfix.DF_parentNode(oComparingNode)}oComparingNode=node2,node1=DOMfix.DF_parentNode(node1)}return this._doc.body},deleteContents:function(){if(!this.collapsed){this._splitTextEndNodesOfTheRange();var aNodes=this._getNodesInRange();if(!(aNodes.length<1)){for(var oPrevNode=aNodes[0].previousSibling;oPrevNode&&this._isBlankTextNode(oPrevNode);)oPrevNode=oPrevNode.previousSibling;var oNewStartContainer,iNewOffset;oPrevNode||(oNewStartContainer=DOMfix.DF_parentNode(aNodes[0]),iNewOffset=0);for(var i=0;i<aNodes.length;i++){var node=aNodes[i];node.firstChild||(oNewStartContainer==node&&(iNewOffset=this._getPosIdx(oNewStartContainer),oNewStartContainer=DOMfix.DF_parentNode(node)),DOMfix.DF_parentNode(node).removeChild(node))}oPrevNode?"BODY"==oPrevNode.tagName?this.setStartBefore(oPrevNode):this.setStartAfter(oPrevNode):this.setStart(oNewStartContainer,iNewOffset),this.collapse(!0)}}},extractContents:function(){var oClonedContents=this.cloneContents();return this.deleteContents(),oClonedContents},insertNode:function(newNode){var oParentContainer,oFirstNode=null;"3"==this.startContainer.nodeType?(oParentContainer=DOMfix.DF_parentNode(this.startContainer),oFirstNode=this.startContainer.nodeValue.length<=this.startOffset?this.startContainer.nextSibling:this.startContainer.splitText(this.startOffset)):(oParentContainer=this.startContainer,oFirstNode=DOMfix.DF_childNode(this.startContainer)[this.startOffset]),oFirstNode&&DOMfix.DF_parentNode(oFirstNode)||(oFirstNode=null),oParentContainer.insertBefore(newNode,oFirstNode),this.setStartBefore(newNode)},selectNode:function(refNode){this.setStartBefore(refNode),this.setEndAfter(refNode)},selectNodeContents:function(refNode){this.setStart(refNode,0),this.setEnd(refNode,DOMfix.DF_childNode(refNode).length)},_endsNodeValidation:function(node,iOffset){if(!node||this.DF_getBody(node)!=this._doc.body)throw new Error("node error");return 3==node.nodeType?iOffset>node.nodeValue.length&&(iOffset=node.nodeValue.length):iOffset>DOMfix.DF_childNode(node).length&&(iOffset=DOMfix.DF_childNode(node).length),iOffset},setEnd:function(refNode,offset){offset=this._endsNodeValidation(refNode,offset),this.endContainer=refNode,this.endOffset=offset,this.startContainer&&-1==this._compareEndPoint(this.startContainer,this.startOffset,this.endContainer,this.endOffset)||this.collapse(!1),this._updateRangeInfo()},setEndAfter:function(refNode){if(!refNode)throw new Error("setEndAfter");return"BODY"==refNode.tagName?void this.setEnd(refNode,DOMfix.DF_childNode(refNode).length):void this.setEnd(DOMfix.DF_parentNode(refNode),this._getPosIdx(refNode)+1)},setEndBefore:function(refNode){if(!refNode)throw new Error("setEndBefore");return"BODY"==refNode.tagName?void this.setEnd(refNode,0):void this.setEnd(DOMfix.DF_parentNode(refNode),this._getPosIdx(refNode))},setStart:function(refNode,offset){offset=this._endsNodeValidation(refNode,offset),this.startContainer=refNode,this.startOffset=offset,this.endContainer&&-1==this._compareEndPoint(this.startContainer,this.startOffset,this.endContainer,this.endOffset)||this.collapse(!0),this._updateRangeInfo()},setStartAfter:function(refNode){if(!refNode)throw new Error("setStartAfter");return"BODY"==refNode.tagName?void this.setStart(refNode,DOMfix.DF_childNode(refNode).length):void this.setStart(DOMfix.DF_parentNode(refNode),this._getPosIdx(refNode)+1)},setStartBefore:function(refNode){if(!refNode)throw new Error("setStartBefore");return"BODY"==refNode.tagName?void this.setStart(refNode,0):void this.setStart(DOMfix.DF_parentNode(refNode),this._getPosIdx(refNode))},surroundContents:function(newParent){newParent.appendChild(this.extractContents()),this.insertNode(newParent),this.selectNode(newParent)},toString:function(){var oTmpContainer=this._doc.createElement("DIV");return oTmpContainer.appendChild(this.cloneContents()),oTmpContainer.textContent||oTmpContainer.innerText||""},_isBlankTextNode:function(node){return 3==node.nodeType&&""==node.nodeValue},_getPosIdx:function(refNode){for(var idx=0,node=refNode.previousSibling;node;node=node.previousSibling)idx++;return idx},_updateRangeInfo:function(){return this.startContainer?(this.collapsed=this._isCollapsed(this.startContainer,this.startOffset,this.endContainer,this.endOffset),void(this.commonAncestorContainer=this._getCommonAncestorContainer(this.startContainer,this.endContainer))):void this.init(this._doc)},_isCollapsed:function(oStartContainer,iStartOffset,oEndContainer,iEndOffset){var bCollapsed=!1;if(oStartContainer==oEndContainer&&iStartOffset==iEndOffset)bCollapsed=!0;else{var oActualStartNode=this._getActualStartNode(oStartContainer,iStartOffset),oActualEndNode=this._getActualEndNode(oEndContainer,iEndOffset);oActualStartNode=this._getNextNode(this._getPrevNode(oActualStartNode)),oActualEndNode=this._getPrevNode(this._getNextNode(oActualEndNode)),oActualStartNode&&oActualEndNode&&"BODY"!=oActualEndNode.tagName&&(this._getNextNode(oActualEndNode)==oActualStartNode||oActualEndNode==oActualStartNode&&this._isBlankTextNode(oActualEndNode))&&(bCollapsed=!0)}return bCollapsed},_splitTextEndNodesOfTheRange:function(){var oEndPoints=this._splitTextEndNodes({oStartContainer:this.startContainer,iStartOffset:this.startOffset,oEndContainer:this.endContainer,iEndOffset:this.endOffset});this.startContainer=oEndPoints.oStartContainer,this.startOffset=oEndPoints.iStartOffset,this.endContainer=oEndPoints.oEndContainer,this.endOffset=oEndPoints.iEndOffset},_splitTextEndNodes:function(oEndPoints){return oEndPoints=this._splitStartTextNode(oEndPoints),oEndPoints=this._splitEndTextNode(oEndPoints)},_splitStartTextNode:function(oEndPoints){var oStartContainer=oEndPoints.oStartContainer,iStartOffset=oEndPoints.iStartOffset,oEndContainer=oEndPoints.oEndContainer,iEndOffset=oEndPoints.iEndOffset;if(!oStartContainer)return oEndPoints;if(3!=oStartContainer.nodeType)return oEndPoints;if(0==iStartOffset)return oEndPoints;if(oStartContainer.nodeValue.length<=iStartOffset)return oEndPoints;var oLastPart=oStartContainer.splitText(iStartOffset);return oStartContainer==oEndContainer&&(iEndOffset-=iStartOffset,oEndContainer=oLastPart),oStartContainer=oLastPart,iStartOffset=0,{oStartContainer:oStartContainer,iStartOffset:iStartOffset,oEndContainer:oEndContainer,iEndOffset:iEndOffset}},_splitEndTextNode:function(oEndPoints){var oStartContainer=oEndPoints.oStartContainer,iStartOffset=oEndPoints.iStartOffset,oEndContainer=oEndPoints.oEndContainer,iEndOffset=oEndPoints.iEndOffset;return oEndContainer?3!=oEndContainer.nodeType?oEndPoints:iEndOffset>=oEndContainer.nodeValue.length?oEndPoints:0==iEndOffset?oEndPoints:(oEndContainer.splitText(iEndOffset),{oStartContainer:oStartContainer,iStartOffset:iStartOffset,oEndContainer:oEndContainer,iEndOffset:iEndOffset}):oEndPoints},_getNodesInRange:function(){if(this.collapsed)return[];var oStartNode=this._getActualStartNode(this.startContainer,this.startOffset),oEndNode=this._getActualEndNode(this.endContainer,this.endOffset);return this._getNodesBetween(oStartNode,oEndNode)},_getActualStartNode:function(oStartContainer,iStartOffset){var oStartNode=oStartContainer;return 3==oStartContainer.nodeType?iStartOffset>=oStartContainer.nodeValue.length?(oStartNode=this._getNextNode(oStartContainer),"BODY"==oStartNode.tagName&&(oStartNode=null)):oStartNode=oStartContainer:iStartOffset<DOMfix.DF_childNode(oStartContainer).length?oStartNode=DOMfix.DF_childNode(oStartContainer)[iStartOffset]:(oStartNode=this._getNextNode(oStartContainer),"BODY"==oStartNode.tagName&&(oStartNode=null)),oStartNode},_getActualEndNode:function(oEndContainer,iEndOffset){var oEndNode=oEndContainer;return 0==iEndOffset?(oEndNode=this._getPrevNode(oEndContainer),"BODY"==oEndNode.tagName&&(oEndNode=null)):oEndNode=3==oEndContainer.nodeType?oEndContainer:DOMfix.DF_childNode(oEndContainer)[iEndOffset-1],oEndNode},_getNextNode:function(node){return node&&"BODY"!=node.tagName?node.nextSibling?node.nextSibling:this._getNextNode(DOMfix.DF_parentNode(node)):this._doc.body},_getPrevNode:function(node){return node&&"BODY"!=node.tagName?node.previousSibling?node.previousSibling:this._getPrevNode(DOMfix.DF_parentNode(node)):this._doc.body},_getNodesBetween:function(oStartNode,oEndNode){var aNodesBetween=[];return oStartNode&&oEndNode?(this._recurGetNextNodesUntil(oStartNode,oEndNode,aNodesBetween),aNodesBetween):aNodesBetween},_recurGetNextNodesUntil:function(node,oEndNode,aNodesBetween){if(!node)return!1;if(!this._recurGetChildNodesUntil(node,oEndNode,aNodesBetween))return!1;for(var oNextToChk=node.nextSibling;!oNextToChk;){if(!DOMfix.DF_parentNode(node))return!1;if(node=DOMfix.DF_parentNode(node),aNodesBetween[aNodesBetween.length]=node,node==oEndNode)return!1;oNextToChk=node.nextSibling}return this._recurGetNextNodesUntil(oNextToChk,oEndNode,aNodesBetween)},_recurGetChildNodesUntil:function(node,oEndNode,aNodesBetween){if(!node)return!1;var bEndFound=!1,oCurNode=node;if(oCurNode.firstChild)for(oCurNode=oCurNode.firstChild;oCurNode;){if(!this._recurGetChildNodesUntil(oCurNode,oEndNode,aNodesBetween)){bEndFound=!0;break}oCurNode=oCurNode.nextSibling}return aNodesBetween[aNodesBetween.length]=node,bEndFound?!1:node!=oEndNode},getNodes:function(bSplitTextEndNodes,fnFilter){bSplitTextEndNodes&&this._splitTextEndNodesOfTheRange();var aAllNodes=this._getNodesInRange(),aFilteredNodes=[];if(!fnFilter)return aAllNodes;for(var i=0;i<aAllNodes.length;i++)fnFilter(aAllNodes[i])&&(aFilteredNodes[aFilteredNodes.length]=aAllNodes[i]);return aFilteredNodes},getTextNodes:function(bSplitTextEndNodes){var txtFilter=function(oNode){return 3==oNode.nodeType&&"\n"!=oNode.nodeValue&&""!=oNode.nodeValue};return this.getNodes(bSplitTextEndNodes,txtFilter)},surroundContentsWithNewNode:function(sTagName){var oNewParent=this._doc.createElement(sTagName);return this.surroundContents(oNewParent),oNewParent},pasteHTML:function(sHTML){var oTmpDiv=this._doc.createElement("DIV");oTmpDiv.innerHTML=sHTML;for(var oFirstNode=oTmpDiv.firstChild,oLastNode=oTmpDiv.lastChild,clone=this.cloneRange(),sBM=clone.placeStringBookmark();oTmpDiv.lastChild;)this.insertNode(oTmpDiv.lastChild);this.setEndNodes(oFirstNode,oLastNode),clone.moveToBookmark(sBM),clone.deleteContents(),clone.removeStringBookmark(sBM)}});SSelection=function(win){this.init=function(win){this._window=win||window,this._document=this._window.document},this.init(win),"getSelection"in win?SSelectionImpl_FF.apply(this):SSelectionImpl_IE.apply(this),this.selectRange=function(oRng){this.selectNone(),this.addRange(oRng)},this.selectionLoaded=!0,this._oSelection||(this.selectionLoaded=!1)},SSelectionImpl_FF=function(){this._oSelection=this._window.getSelection(),this.getRangeAt=function(iNum){iNum=iNum||0;try{var oFFRange=this._oSelection.getRangeAt(iNum)}catch(e){return new AXDOMRange(this._document)}return this._FFRange2W3CRange(oFFRange)},this.addRange=function(oW3CRange){var oFFRange=this._W3CRange2FFRange(oW3CRange);this._oSelection.addRange(oFFRange)},this.selectNone=function(){this._oSelection.removeAllRanges()},this._FFRange2W3CRange=function(oFFRange){var oW3CRange=new AXDOMRange(this._document);return oW3CRange.setStart(oFFRange.startContainer,oFFRange.startOffset),oW3CRange.setEnd(oFFRange.endContainer,oFFRange.endOffset),oW3CRange},this._W3CRange2FFRange=function(oW3CRange){var oFFRange=this._document.createRange();return oFFRange.setStart(oW3CRange.startContainer,oW3CRange.startOffset),oFFRange.setEnd(oW3CRange.endContainer,oW3CRange.endOffset),oFFRange}},SSelectionImpl_IE=function(){this._oSelection=this._document.selection,this.getRangeAt=function(iNum){if(iNum=iNum||0,"Control"==this._oSelection.type){var oW3CRange=new AXDOMRange(this._document),oSelectedNode=this._oSelection.createRange().item(iNum);return oSelectedNode&&oSelectedNode.ownerDocument==this._document?(oW3CRange.selectNode(oSelectedNode),oW3CRange):oW3CRange}this._document.body.focus();var oSelectedNode=this._oSelection.createRangeCollection().item(iNum).parentElement();if(!oSelectedNode||oSelectedNode.ownerDocument!=this._document){var oW3CRange=new AXDOMRange(this._document);return oW3CRange}return this._IERange2W3CRange(this._oSelection.createRangeCollection().item(iNum))},this.addRange=function(oW3CRange){var oIERange=this._W3CRange2IERange(oW3CRange);oIERange.select()},this.selectNone=function(){this._oSelection.empty()},this._W3CRange2IERange=function(oW3CRange){var oStartIERange=this._getIERangeAt(oW3CRange.startContainer,oW3CRange.startOffset),oEndIERange=this._getIERangeAt(oW3CRange.endContainer,oW3CRange.endOffset);return oStartIERange.setEndPoint("EndToEnd",oEndIERange),oStartIERange},this._getIERangeAt=function(oW3CContainer,iW3COffset){var oIERange=this._document.body.createTextRange(),oEndPointInfoForIERange=this._getSelectableNodeAndOffsetForIE(oW3CContainer,iW3COffset),oSelectableNode=oEndPointInfoForIERange.oSelectableNodeForIE,iIEOffset=oEndPointInfoForIERange.iOffsetForIE;return oIERange.moveToElementText(oSelectableNode),oIERange.collapse(oEndPointInfoForIERange.bCollapseToStart),oIERange.moveStart("character",iIEOffset),oIERange},this._getSelectableNodeAndOffsetForIE=function(oW3CContainer,iW3COffset){var oIERange=this._document.body.createTextRange(),oNonTextNode=null,aChildNodes=null,iNumOfLeftNodesToCount=0;3==oW3CContainer.nodeType?(oNonTextNode=DOMfix.DF_parentNode(oW3CContainer),aChildNodes=DOMfix.DF_childNode(oNonTextNode),iNumOfLeftNodesToCount=aChildNodes.length):(oNonTextNode=oW3CContainer,aChildNodes=DOMfix.DF_childNode(oNonTextNode),iNumOfLeftNodesToCount=iW3COffset);for(var oNodeTester=null,iResultOffset=0,bCollapseToStart=!0,i=0;iNumOfLeftNodesToCount>i;i++)if(oNodeTester=aChildNodes[i],3==oNodeTester.nodeType){if(oNodeTester==oW3CContainer)break;iResultOffset+=oNodeTester.nodeValue.length}else oIERange.moveToElementText(oNodeTester),oNonTextNode=oNodeTester,iResultOffset=0,bCollapseToStart=!1;return 3==oW3CContainer.nodeType&&(iResultOffset+=iW3COffset),{oSelectableNodeForIE:oNonTextNode,iOffsetForIE:iResultOffset,bCollapseToStart:bCollapseToStart}},this._IERange2W3CRange=function(oIERange){var oW3CRange=new AXDOMRange(this._document),oIEPointRange=null,oPosition=null;oIEPointRange=oIERange.duplicate(),oIEPointRange.collapse(!0),oPosition=this._getW3CContainerAndOffset(oIEPointRange,!0),oW3CRange.setStart(oPosition.oContainer,oPosition.iOffset);var oCollapsedChecker=oIERange.duplicate();return oCollapsedChecker.collapse(!0),oCollapsedChecker.isEqual(oIERange)?oW3CRange.collapse(!0):(oIEPointRange=oIERange.duplicate(),oIEPointRange.collapse(!1),oPosition=this._getW3CContainerAndOffset(oIEPointRange),oW3CRange.setEnd(oPosition.oContainer,oPosition.iOffset)),oW3CRange},this._getW3CContainerAndOffset=function(oIEPointRange,bStartPt){for(var oRgOrigPoint=oIEPointRange,oContainer=oRgOrigPoint.parentElement(),offset=-1,oRgTester=this._document.body.createTextRange(),aChildNodes=DOMfix.DF_childNode(oContainer),oPrevNonTextNode=null,pointRangeIdx=0,i=0;i<aChildNodes.length;i++)if(3!=aChildNodes[i].nodeType){if(oRgTester.moveToElementText(aChildNodes[i]),oRgTester.compareEndPoints("StartToStart",oIEPointRange)>=0)break;oPrevNonTextNode=aChildNodes[i]}var pointRangeIdx=i;if(0!=pointRangeIdx&&3==aChildNodes[pointRangeIdx-1].nodeType){var oRgTextStart=this._document.body.createTextRange(),oCurTextNode=null;oPrevNonTextNode?(oRgTextStart.moveToElementText(oPrevNonTextNode),oRgTextStart.collapse(!1),oCurTextNode=oPrevNonTextNode.nextSibling):(oRgTextStart.moveToElementText(oContainer),oRgTextStart.collapse(!0),oCurTextNode=oContainer.firstChild);var oRgTextsUpToThePoint=oRgOrigPoint.duplicate();oRgTextsUpToThePoint.setEndPoint("StartToStart",oRgTextStart);for(var textCount=oRgTextsUpToThePoint.text.length;textCount>oCurTextNode.nodeValue.length&&oCurTextNode.nextSibling;)textCount-=oCurTextNode.nodeValue.length,oCurTextNode=oCurTextNode.nextSibling;oCurTextNode.nodeValue;bStartPt&&oCurTextNode.nextSibling&&3==oCurTextNode.nextSibling.nodeType&&textCount==oCurTextNode.nodeValue.length&&(textCount-=oCurTextNode.nodeValue.length,oCurTextNode=oCurTextNode.nextSibling),oContainer=oCurTextNode,offset=textCount}else oContainer=oRgOrigPoint.parentElement(),offset=pointRangeIdx;return{oContainer:oContainer,iOffset:offset}}};var AXDrag=Class.create(AXJ,{version:"AXJDrag V1.2",author:"tom@axisj.com",logs:["2013-08-21 오후 11:47:11 - modsAX 변환","2013-12-17 오후 4:56:13 - multiselect 와 호환성 작업"],initialize:function(AXJ_super){AXJ_super(),this.config.dragBoxClassName="AXJDragBox",this.config.bedragClassName="bedraged",this.config.bedropClassName="bedroped",this.config.dragClassName="readyDrag",this.config.dropClassName="readyDrop",this.config.sort=!1,this.sortOn=!1,this.config.moveSens=5,this.moveSens=0,this.config.scrollPos=!0},init:function(){this.draged=!1,this.dragBox=jQuery("<div class='"+this.config.dragBoxClassName+"'></div>"),this.dragBox.html('<div class="boxshadow"></div><div class="boxicon"></div><div class="boxcounter">0</div>'),this.config.sort&&(this.sorter=jQuery(this.config.sort.sorter));var mouseMove=this.onmouseMove.bind(this);this.dragBox.bind("mousemove",function(event){mouseMove(this,event)}),this.dragCount=this.dragBox.find("div.boxcounter"),this.dragBoxDim={},this.dragItem=[],this.config.multiSelector&&(this.mselector=new AXMultiSelect,this.config.multiSelector.useHelper=!1,this.mselector.setConfig(this.config.multiSelector))},active:function(){this.mouseDown=this.onmouseDown.bind(this),this.dragStart=this.ondragStart.bind(this),jQuery("#"+this.config.dragStage).bind("mousedown",this.mouseDown),jQuery("#"+this.config.dragStage).bind("dragstart",this.dragStart)},draging:function(power){power?(this.draging(!1),this.mouseMove=this.onmouseMove.bind(this),this.mouseOver=this.onmouseOver.bind(this),this.mouseOut=this.onmouseOut.bind(this),this.mouseUp=this.onmouseUp.bind(this),this.selectstart=this.onselectStart.bind(this),this.keyUp=this.onkeyUp.bind(this),jQuery("#"+this.config.dragStage).bind("mousemove",this.mouseMove),jQuery("#"+this.config.dragStage).bind("mouseover",this.mouseOver),jQuery("#"+this.config.dragStage).bind("mouseout",this.mouseOut),jQuery(document).bind("mouseup",this.mouseUp),jQuery(document).bind("selectstart",this.selectstart),jQuery(document).bind("keyup",this.keyUp)):(this.mouseMove&&jQuery("#"+this.config.dragStage).unbind("mousemove",this.mouseMove),this.mouseOver&&jQuery("#"+this.config.dragStage).unbind("mouseover",this.mouseOver),this.mouseUp&&jQuery(document).unbind("mouseup",this.mouseup),this.selectstart&&jQuery(document).unbind("selectstart",this.selectstart),this.keyUp&&jQuery(document).unbind("keyup",this.keyup))},inactive:function(){this.mouseDown&&jQuery("#"+this.config.dragStage).unbind("mousedown",this.mouseDown),this.dragStart&&jQuery("#"+this.config.dragStage).unbind("dragstart",this.dragStart)},onmouseDown:function(event){if(2!=event.button){var eventTarget=event.target;if(eventTarget)for(;!axdom(eventTarget).hasClass(this.config.dragClassName)&&eventTarget.parentNode;)eventTarget=eventTarget.parentNode;if(jQuery(eventTarget).hasClass(this.config.dragClassName)){var dragElement=eventTarget;dragElement&&("moz"==AXUtil.browser.name&&(this.dragParent=jQuery(dragElement).parent(),"visible"==this.dragParent.css("overflow")&&(this.dragParent=null)),this.config.multiSelector?(event.shiftKey||event.metaKey||event.ctrlKey||this.mselector.clickSelects(dragElement),this.dragReady()):this.dragReady([dragElement]))}}},ondragStart:function(event){return event.stopPropagation(),!1},onselectStart:function(event){return event.stopPropagation(),!1},onmouseUp:function(event){var eventTarget;if(this.config.sort){if(eventTarget=event.target)for(;!axdom(eventTarget).hasClass(this.config.dragClassName)&&eventTarget.parentNode;)eventTarget=eventTarget.parentNode;var isSort=jQuery(eventTarget).hasClass(this.config.dragClassName)}if(!isSort){eventTarget=event.target;var isDrop=jQuery(eventTarget).hasClass(this.config.dropClassName)}isSort?eventTarget&&this.draged&&(this.config.onSort&&this.config.onSort({dragItem:this.dragItem,sortItem:eventTarget}),this.endSort()):isDrop&&eventTarget&&this.draged&&(jQuery(eventTarget).removeClass(this.config.bedropClassName),this.config.onDrop&&this.config.onDrop({dragItem:this.dragItem,dropItem:eventTarget})),this.draging(!1),this.endDrag()},onkeyUp:function(event){},onmouseMove:function(event){if(event.pageX){if(this.config.scrollPos){if(0==document.body.scrollTop)var st=document.documentElement.scrollTop,sl=document.documentElement.scrollLeft;else var st=document.body.scrollTop,sl=document.body.scrollLeft;this.mouse={x:event.pageX-sl||0,y:event.pageY-st||0}}else this.mouse={x:event.pageX||0,y:event.pageY||0};this.config.moveSens>this.moveSens&&this.moveSens++,this.moveSens==this.config.moveSens&&this.dragboxMove()}},onmouseOver:function(event){var eventTarget;if(this.config.sort){if(eventTarget=event.target)for(;!axdom(eventTarget).hasClass(this.config.dragClassName)&&eventTarget.parentNode;)eventTarget=eventTarget.parentNode;var isSort=jQuery(eventTarget).hasClass(this.config.dragClassName)}if(!isSort){eventTarget=event.target;var isDrop=jQuery(eventTarget).hasClass(this.config.dropClassName)}isDrop?(eventTarget&&jQuery(eventTarget).addClass(this.config.bedropClassName),this.endSort()):isSort?eventTarget&&this.startSort(eventTarget):this.sortOn&&this.endSort()},onmouseOut:function(event){if(jQuery(event.target).hasClass(this.config.dropClassName)){var dropElement=event.target;dropElement&&jQuery(dropElement).removeClass(this.config.bedropClassName)}},startSort:function(target){jQuery(target).before(this.sorter),this.sortOn=!0},endSort:function(){this.sortOn&&jQuery(this.sorter).detach(),this.config.onStopDrag&&this.config.onStopDrag({dragItem:this.dragItem})},dragboxMove:function(){if(!this.draged){this.draged=!0,this.dragParent&&this.dragParent.css({overflow:"hidden"});var bedragClassName=this.config.bedragClassName;this.config.appendTarget?jQuery("#"+this.config.appendTarget).append(this.dragBox):jQuery("#"+this.config.dragStage).after(this.dragBox),
  this.dragBoxDim={width:this.dragBox.width(),height:this.dragBox.height()},this.dragCount.html(this.dragItem.length),this.dragTrigger(),jQuery(this.dragItem).addClass(bedragClassName)}this.dragBox.css({left:this.mouse.x+20+"px",top:this.mouse.y+20+"px"})},endDrag:function(){if(this.draged){this.dragParent&&this.dragParent.css({overflow:"auto"});var bedragClassName=this.config.bedragClassName;this.draged=!1,this.dragBox.detach(),this.endSort(),jQuery(this.dragItem).removeClass(bedragClassName),this.config.multiSelector?this.mselector.clearSelects():this.dragItem.clear(),this.moveSens=0}},dragReady:function(dragItems){this.config.multiSelector?this.dragItem=this.mselector.getSelects():this.dragItem=dragItems,this.draging(!0)},dragTrigger:function(){this.config.onDrag&&this.config.onDrag({dragItem:this.dragItem})},collectItem:function(){this.config.multiSelector&&(this.observer&&clearTimeout(this.observer),this.observer=setTimeout(this.collectItemAct.bind(this),100))},collectItemAct:function(){this.mselector.collect()},nothing:function(){}}),AXEditorLang={en:{home:"HOME",attch:"Attachment",table:"Table",layout:"Layouts",option:"Options",external:"External",editor:"Editor",HTML:"HTML",textColor:"TEXT COLOR",textBgColor:"TEXT BGCOLOR",fontFamily:"Font Family",fontSize:"Font Size",fontSample:"가나Ab",lineHeight:"Line Height(em)",url:"Link",upload:"Upload",insertDoc:"Insert",delSelected:"Delete",selectAll:"SelectAll",invalidUrlMsg:"invalid url make fail",volumeOverMsg:"upload Maxium size over",noSelectedFileMsg:"No selected target file",fileDeleteConfirm:"Do you want to delete it?",externalTitle:"Custom AX Pannel",imoticon:"Imoticon"},kr:{home:"홈",attch:"파일첨부",table:"테이블",layout:"레이아웃",option:"옵션",external:"추가기능",editor:"Editor",HTML:"HTML",textColor:"텍스트 컬러",textBgColor:"텍스트 배경컬러",fontFamily:"글꼴",fontSize:"글자크기",fontSample:"가나Ab",lineHeight:"줄간격(em)",url:"링크걸기",upload:"업로드",insertDoc:"본문삽입",delSelected:"선택삭제",selectAll:"전체선택",invalidUrlMsg:"url 형식이 잘못되어 url연결에 실패 하였습니다.",volumeOverMsg:"업로드 용량이 초과 되어 업로드 하실 수 없습니다.",noSelectedFileMsg:"선택된 파일이 없습니다.",fileDeleteConfirm:"정말 삭제 하시겠습니까?",externalTitle:"Custom AX Pannel",imoticon:"이모티콘"},jp:{home:"HOME",attch:"Attachment",table:"Table",layout:"Layouts",option:"Options",external:"External",editor:"Editor",HTML:"HTML",textColor:"TEXT COLOR",textBgColor:"TEXT BGCOLOR",fontFamily:"Font Family",fontSize:"Font Size",fontSample:"가나Ab",lineHeight:"Line Height(em)",url:"Link",upload:"Upload",insertDoc:"Insert",delSelected:"Delete",selectAll:"Select",invalidUrlMsg:"invalid url make fail",volumeOverMsg:"upload Maxium size over",noSelectedFileMsg:"No selected target file",fileDeleteConfirm:"Do you want to delete it?",externalTitle:"Custom AX Pannel",imoticon:"Imoticon"},cn:{home:"HOME",attch:"Attachment",table:"Table",layout:"Layouts",option:"Options",external:"External",editor:"Editor",HTML:"HTML",textColor:"TEXT COLOR",textBgColor:"TEXT BGCOLOR",fontFamily:"Font Family",fontSize:"Font Size",fontSample:"가나Ab",lineHeight:"Line Height(em)",url:"Link",upload:"Upload",insertDoc:"Insert",delSelected:"Delete",selectAll:"Select",invalidUrlMsg:"invalid url make fail",volumeOverMsg:"upload Maxium size over",noSelectedFileMsg:"No selected target file",fileDeleteConfirm:"Do you want to delete it?",externalTitle:"Custom AX Pannel",imoticon:"Imoticon"}},AXEditor=Class.create(AXJ,{_GID:function(ids){for(var myid=[],a=0;a<ids.length;a++)myid.push(ids[a]);return myid.join("_")},_GPT:function(myid,idx){var ids=myid.split(/_/g);return void 0==idx?ids.last():ids[idx]},initialize:function(AXJ_super){AXJ_super(),this.moveSens=0,this.contentMode="editor",this.panelNum=0,this.attchFiles=[],this.readyFiles=[],this.config.containerCss="AXEditor",this.config.headCss="editorHead",this.config.bodyCss="editorBody",this.config.footCss="editorFoot",this.config.height=300,this.config.lang="en",this.config.moveSens=5,this.config.ie67adj=-2,this.config.selectMenuIndex=0,this.config.tabFileUsed=!1,this.config.tabTableUsed=!1,this.config.tabLayoutUsed=!1,this.config.tabOptionUsed=!1,this.config.tabExternalUsed=!1,this.config.frameSrc=AXConfig.AXEditor.editor_frameSrc||"/_AXJ/lib/AXEditor.html",this.config.editorFontSize="12px",this.config.editorFontFamily="Malgun Gothic",this.config.colors=["ffffff","faedd4","fff3b4","ffffbe","ffeaea","ffeaf8","e6ecfe","d6f3f9","e0f0e9","eaf4cf","e8e8e8","e7c991","f3d756","ffe409","f9b4cb","dfb7ee","b1c4fc","96ddf3","b1dab7","b8d63d","c2c2c2","d18e0a","ec9c2c","ff8b16","f3709b","af65dd","7293fa","49b5d5","6abb9a","5fb636","8e8e8e","9d6c08","c84205","e31600","c8056a","801fbf","3058d2","0686a8","318561","2b8400","474747","654505","8c3c04","840000","8c044b","57048c","193da9","004c5f","105738","174600","000000","463003","612a03","5b0000","610334","320251"],this.config.fonts=["Malgun Gothic","Gulim","Dotum","궁서"],this.config.fontsizes=[8,9,10,11,12,14,16,18,20],this.config.lineHeights=[1,1.2,1.5,1.8,2,2.5],this.config.swfUploader="",this.config.uploadUrl="",this.config.uploadPars=["p1=1","p2=2"],this.config.deleteUrl="",this.config.deletePars=[],this.config.uploadVolume=5242880,this.config.uploadFilterName="All,Image",this.config.uploadFilterValue="*.*,*.jpg; *.gif; *.png",this.config.uploadCallBack="mmuCall",this.config.tabExternals=[],this.config.readyTofocus=!0,this.config.msg={alreadyInsertImg:"이미 추가된 이미지 입니다."},this.config.toolbar={fontFamily:!0,fontSize:!0,fontDecoration:!0,color:!0,textAlign:!0,orderList:!0,lineHeight:!0,url:!0,imoticon:!0,pageBreak:!0},this.config.AXEditorIcons=[{categoryNM:"Grimi",copyRights:"<a href='http://jowrney.com/xe/grimi/' target='_blank'>Copyright © Jowrney.com. All rights reserved.</a>",imageFolder:(AXConfig.AXEditor.iconDirectory||"/ui/icons/")+"grimi/",icons:["grimi_big_smile16.png","grimi_cry16.png","grimi_doze16.png","grimi_happy16.png","grimi_love16.png","grimi_smile16.png","grimi_so_what16.png","grimi_vomit16.png"]},{categoryNM:"Fugue Icons",copyRights:"<a href='http://p.yusukekamiyamane.com/' target='_blank'>Copyright © Yusuke Kamiyamane. All rights reserved.</a>",imageFolder:AXConfig.AXEditor.iconDirectory||"/ui/icons/",icons:["address-book.png","alarm-clock.png","arrow-000-medium.png","arrow-045-medium.png","arrow-045.png","arrow-090-medium.png","arrow-090.png","arrow-135-medium.png","arrow-135.png","arrow-180-medium.png","arrow-180.png","arrow-225-medium.png","arrow-225.png","arrow-270-medium.png","arrow-270.png","arrow-315-medium.png","arrow-315.png","arrow.png","asterisk.png","auction-hammer.png","balance.png","balloon-ellipsis.png","balloon-quotation.png","balloon.png","bandaid.png","bell.png","bin.png","binocular.png","block.png","bomb.png","bookmark.png","box.png","briefcase.png","broom.png","building.png","burn.png","calculator.png","camcorder.png","camera.png","car--exclamation.png","car-red.png","clapperboard.png","compass.png","credit-card.png","crown-bronze.png","crown-silver.png","crown.png","currency-euro.png","currency-pound.png","currency-yen.png","currency.png","cursor-small.png","cursor.png","direction.png","drill.png","eraser.png","eye.png","hammer.png","hand.png","heart-break.png","heart.png","inbox.png","keyboard.png","leaf.png","lifebuoy.png","light-bulb.png","mail-open.png","mail.png","marker.png","megaphone.png","microphone.png","mobile-phone.png","money.png","mouse.png","music.png","paint-can.png","pipette-color.png","plug.png","printer.png","safe.png","smiley-confuse.png","smiley-cool.png","smiley-cry.png","smiley-eek.png","smiley-evil.png","smiley-fat.png","smiley-grin.png","smiley-lol.png","smiley-mad.png","smiley-mr-green.png","smiley-neutral.png","smiley-paint-brush.png","smiley-razz.png","smiley-red.png","smiley-roll.png","smiley-sad.png","smiley-slim.png","smiley-surprise.png","smiley-twist.png","smiley-wink.png","smiley-yell.png","smiley.png"]}]},init:function(){this._self=jQuery("#"+this.config.targetID);var config=this.config,po=[];po.push('<div id="'+config.targetID+'_container" class="'+config.containerCss+'">'),po.push('	<div id="'+config.targetID+'_head"   class="'+config.headCss+'"></div>'),po.push('	<div id="'+config.targetID+'_body"   class="'+config.bodyCss+'"></div>'),po.push('	<div id="'+config.targetID+'_foot"   class="'+config.footCss+'"></div>'),po.push("</div>"),this._self.append(po.join("")),this.container=jQuery("#"+config.targetID+"_container"),this.head=jQuery("#"+config.targetID+"_head"),this.body=jQuery("#"+config.targetID+"_body"),this.foot=jQuery("#"+config.targetID+"_foot"),this.initHead(),this.initFoot(),this.initBody()},initHead:function(){var config=this.config,re=config.targetID,po=(AXEditorLang[config.lang],[]);po.push('<div id="'+re+"_headPanel\" class='me___headPanel'></div>"),this.head.append(po.join("")),this.initPanel()},initPanel:function(){var config=this.config,re=config.targetID,po=[];config.toolbar.fontFamily&&(po.push("<div class='me___selectW'>"),po.push("	<a href='#axExecption' class='me___value selectCommand me_ffs' style='font-family:"+config.editorFontFamily+"' id='"+this._GID([re,"fontname"])+"'>"+config.editorFontFamily+"</a>"),po.push("</div>")),config.toolbar.fontSize&&(po.push("<div class='me___selectS'>"),po.push("	<a href='#axExecption' class='me___value selectCommand me_fss' id='"+this._GID([re,"fontsize"])+"'>"+config.editorFontSize+"</a>"),po.push("</div>")),config.toolbar.fontDecoration&&(po.push("<div class='me___vline'></div>"),po.push("<a href='#axExecption' class='me___btnL'>"),po.push("	<span class='me_icon me___bold simpleCommand' id='"+this._GID([re,"bold"])+"'>Bold</span>"),po.push("</a>"),po.push("<a href='#axExecption' class='me___btnM'>"),po.push("	<span class='me_icon me___italic simpleCommand' id='"+this._GID([re,"italic"])+"'>Italic</span>"),po.push("</a>"),po.push("<a href='#axExecption' class='me___btnM'>"),po.push("	<span class='me_icon me___underLine simpleCommand' id='"+this._GID([re,"underline"])+"'>UnderLine</span>"),po.push("</a>"),po.push("<a href='#axExecption' class='me___btnR'>"),po.push("	<span class='me_icon me___strike simpleCommand' id='"+this._GID([re,"strikethrough"])+"'>strike</span>"),po.push("</a>")),config.toolbar.color&&(po.push("<div class='me___vline'></div>"),po.push("<div class='me___selectTL'>"),po.push("	<div class='me___fontColor_disp' style='background:#444444;' id='"+this._GID([re,"foreColorVal"])+"'></div>"),po.push("	<a href='#axExecption' class='me___value colorCommand' id='"+this._GID([re,"foreColor"])+"'>foreColor</a>"),po.push("	<a href='#axExecption' class='me___arrow selectCommand me_picker' id='"+this._GID([re,"foreColorExt"])+"'>+</a>"),po.push("</div>"),po.push("<div class='me___selectTR'>"),po.push("	<div class='me___fontBgColor_disp' style='background:#ffffff;' id='"+this._GID([re,"backColorVal"])+"'></div>"),po.push("	<a href='#axExecption' class='me___value colorCommand' id='"+this._GID([re,"backColor"])+"'>backColor</a>"),po.push("	<a href='#axExecption' class='me___arrow selectCommand me_picker' id='"+this._GID([re,"backColorExt"])+"'>+</a>"),po.push("</div>")),config.toolbar.textAlign&&(po.push("<div class='me___vline'></div>"),po.push("<a href='#axExecption' class='me___btnL'>"),po.push("	<span class='me_icon me___alignLeft simpleCommand' id='"+this._GID([re,"JustifyLeft"])+"'>alignLeft</span>"),po.push("</a>"),po.push("<a href='#axExecption' class='me___btnM'>"),po.push("	<span class='me_icon me___alignCenter simpleCommand' id='"+this._GID([re,"JustifyCenter"])+"'>alignCenter</span>"),po.push("</a>"),po.push("<a href='#axExecption' class='me___btnM'>"),po.push("	<span class='me_icon me___alignRight simpleCommand' id='"+this._GID([re,"JustifyRight"])+"'>alignRight</span>"),po.push("</a>"),po.push("<a href='#axExecption' class='me___btnR'>"),po.push("	<span class='me_icon me___alignJustify simpleCommand' id='"+this._GID([re,"JustifyFull"])+"'>alignJustify</span>"),po.push("</a>")),config.toolbar.orderList&&(po.push("<div class='me___vline'></div>"),po.push("<a href='#axExecption' class='me___btnL'>"),po.push("	<span class='me_icon me___li simpleCommand' id='"+this._GID([re,"InsertUnorderedList"])+"'>li</span>"),po.push("</a>"),po.push("<a href='#axExecption' class='me___btnR'>"),po.push("	<span class='me_icon me___ol simpleCommand' id='"+this._GID([re,"InsertOrderedList"])+"'>ol</span>"),po.push("</a>")),config.toolbar.lineHeight&&(po.push("<div class='me___vline'></div>"),po.push("<a href='#axExecption' class='me___btnSa'>"),po.push("	<span class='me_icon me___lineHeight selectCommand me_lhs' id='"+this._GID([re,"lineHeight"])+"'>lineHeight</span>"),po.push("</a>")),config.toolbar.url&&(po.push("<div class='me___vline'></div>"),po.push("<a href='#axExecption' class='me___btnSa'>"),po.push("	<span class='me_icon me___url selectCommand me_url' id='"+this._GID([re,"url"])+"'>url</span>"),po.push("</a>")),config.toolbar.imoticon&&(po.push("<div class='me___vline'></div>"),po.push("<a href='#axExecption' class='me___btnSa'>"),po.push("	<span class='me_icon me___imoticon selectCommand me_ico' id='"+this._GID([re,"imoticon"])+"'>imoticon</span>"),po.push("</a>")),config.toolbar.pageBreak&&(po.push("<div class='me___vline'></div>"),po.push("<a href='#axExecption' class='me___btnSa'>"),po.push("	<span class='me_icon me___pageBreak pbCommand' id='"+this._GID([re,"pageBreak"])+"'>pageBreak</span>"),po.push("</a>")),jQuery("#"+re+"_headPanel").append(po.join("")),jQuery("#"+re+"_headPanel").find(".simpleCommand").bind("click",this.onSimpleCommandClick.bind(this)),jQuery("#"+re+"_headPanel").find(".colorCommand").bind("click",this.onColorCommandClick.bind(this)),jQuery("#"+re+"_headPanel").find(".selectCommand").bind("click",this.onSelectCommandClick.bind(this)),jQuery("#"+re+"_headPanel").find(".pbCommand").bind("click",this.onInsertCommand.bind(this))},closePanel:function(){var config=this.config,re=config.targetID,items=["home_btn","attch_btn","table_btn","layout_btn","option_btn","external_btn"];jQuery("#"+re+"_"+items[this.panelNum]).parent().removeClass("me___itemOn"),0!=this.panelNum&&(1==this.panelNum&&this.initFlashButtonMoveTo(jQuery("#"+re+"_"+items[this.panelNum]).parent()),this.divPanel.remove(),jQuery("#"+config.targetID+"_head").removeClass("editorHeadExt"))},openPanel:function(){var config=this.config,re=config.targetID,lg=AXEditorLang[config.lang],items=["home_btn","attch_btn","table_btn","layout_btn","option_btn","external_btn"];if(jQuery("#"+re+"_"+items[this.panelNum]).parent().addClass("me___itemOn"),0!=this.panelNum){if(1==this.panelNum){this.divPanel=jQuery("<div id='"+this._GID([re,"divPanel","attch"])+"' class='me___headDivPanel_attch'></div>");var po=[];po.push("<div class='me___headDivPanel_attch_btns' id='"+re+"_divPanel_attchBtns'>"),po.push("	<span class='me___span' style='margin-left:33px;'>&nbsp;</span>"),po.push("	<a href='#axExecption' class='me___btnS1' id='"+this._GID([re,"attbtns","insertDoc"])+"'>"+lg.insertDoc+"</a>"),po.push("	<a href='#axExecption' class='me___btnS1' id='"+this._GID([re,"attbtns","delete"])+"'>"+lg.delSelected+"</a>"),po.push("	<span class='me___span'>&nbsp;</span>"),po.push("	<a href='#axExecption' class='me___btnS1' id='"+this._GID([re,"attbtns","selectAll"])+"'>"+lg.selectAll+"</a>"),po.push("</div>"),po.push("<div class='me___headDivPanel_attch_CT' nowrap='nowrap' align='left'>"),jQuery.each(this.attchFiles,function(si,fo){fo.checked?po.push("<div class='attchItem attchItemON' id='"+re+"_attchItem_"+si+"' title='"+fo.ti.dec()+"'>"):po.push("<div class='attchItem' id='"+re+"_attchItem_"+si+"' title='"+fo.ti.dec()+"'>"),po.push("<div class='attchItemName'>"+fo.ti.dec()+"</div>"),po.push("<div class='attchItemPreview'>");var ty=fo.ty.dec().toLowerCase();".gif"==ty|".jpg"==ty|".png"==ty|".bmp"==ty&&po.push("<img src='"+fo.path.dec()+fo.nm.dec()+"' width='100%' height='100%' alt='' />"),po.push("</div>"),po.push("</div>")}),po.push("	<div class='attchItemEnd' id='"+re+"_divPanel_attchItemEnd'>&nbsp;</div>"),po.push("</div>"),this.divPanel.html(po.join("")),this.openFileStatus()}if(5==this.panelNum){this.divPanel=jQuery("<div id='"+this._GID([re,"divPanel","external"])+"' class='me___headDivPanel_attch'></div>");var po=[];po.push("<div class='me___headDivPanel_attch_btns' id='"+re+"_divPanel_attchBtns'>"),po.push("<div class='headTitle'>"+lg.externalTitle+"</div>"),po.push("</div>"),po.push("<div class='me___headDivPanel_attch_CT' nowrap='nowrap' align='left'>"),jQuery.each(config.tabExternals,function(idx,n){po.push("<div class='componentItem' id='"+n.component+"' title='"+n.title+"'>"),po.push("<div class='componentItemName'>"+n.title+"</div>"),po.push("<div class='componentItemPreview'>"),""!=n.ico&&po.push("<img src='"+n.ico+"' alt='' />"),po.push("</div>"),po.push("</div>")}),po.push("	<div class='attchItemEnd' id='"+re+"_divPanel_attchItemEnd'>&nbsp;</div>"),po.push("</div>"),this.divPanel.html(po.join(""))}jQuery("#"+re+"_headPanel").append(this.divPanel),jQuery("#"+config.targetID+"_head").addClass("editorHeadExt"),1==this.panelNum&&(this.initFlashButtonMoveTo(jQuery("#"+re+"_divPanel_attchBtns")),jQuery("#"+re+"_divPanel_attch").find(".me___btnS1").bind("click",this.onAttbtnsClick.bind(this)),jQuery("#"+re+"_divPanel_attch").find(".attchItem").bind("click",this.onAttchItemClick.bind(this))),5==this.panelNum&&jQuery("#"+re+"_divPanel_external").find(".componentItem").bind("click",this.onClickComponent.bind(this))}},setAttchItem:function(arg){var config=this.config;config.targetID,AXEditorLang[config.lang];if(arg){var useByte=0;config.uploadVolume;jQuery.each(this.attchFiles,function(){useByte+=this.size.number()}),jQuery.each(arg,function(index){useByte+=this.size.number()}),this.readyFiles=arg,this.readyUpload()}},readyUpload:function(){if(0!=this.readyFiles.length){var config=this.config,re=config.targetID,startIndex=this.attchFiles.length,po=[];po.push("<div class='attchItem' id='"+re+"_attchItem_"+startIndex+"'>"),po.push("	<div class='attchItemName'>.....</div>"),po.push("	<div class='attchItemPreviewLoad'></div>"),po.push("</div>"),jQuery("#"+re+"_divPanel_attchItemEnd").before(po.join(""))}},uploadedFile:function(arg){var config=this.config,re=config.targetID,startIndex=this.attchFiles.length;jQuery("#"+re+"_attchItem_"+startIndex).attr("title",arg.ti.dec()),jQuery("#"+re+"_attchItem_"+startIndex).find(".attchItemName").html(arg.ti.dec()),jQuery("#"+re+"_attchItem_"+startIndex).find(".attchItemPreviewLoad").addClass("attchItemPreview"),jQuery("#"+re+"_attchItem_"+startIndex).bind("click",this.onAttchItemClick.bind(this));var ty=arg.ty.dec().toLowerCase();if(".gif"==ty|".jpg"==ty|".png"==ty|".bmp"==ty){jQuery("#"+re+"_attchItem_"+startIndex).find(".attchItemPreviewLoad").html("<img src='"+arg.path.dec()+arg.nm.dec()+"' width='100%' height='100%' alt='' />");var imgObj=new Image;imgObj.src=arg.path.dec()+arg.nm.dec(),imgObj.id="MF_"+arg.nm.replace(arg.ty,"").dec();var pasteHTML=this.__pasteHTML.bind(this),canvasWidth=this.canvas.width()-40;imgObj.onload=function(){var ow=imgObj.width,oh=imgObj.height;imgObj.width>canvasWidth&&(imgObj.width=canvasWidth,imgObj.height=oh*(imgObj.width/ow));try{pasteHTML(imgObj)}catch(e){alert(e.print())}}}this.attchFiles.push(arg),this.readyFiles.pop(),this.readyUpload(),this.updateFileStatus()},insertIMG:function(file){var config=this.config,ty=(config.targetID,file.ty.dec().toLowerCase()),tyReg=/(bmp|jpg|jpeg|gif|png)$/;if(tyReg.test(ty)){var imgTagId="MF_"+file.nm.replace(new RegExp("[.]"+file.ty,"i"),"").dec();if(axdom(this.myEDT.document).find("#"+imgTagId).get(0))return void alert(config.msg.alreadyInsertImg);var imgObj=new Image;imgObj.src=file.path.dec()+file.nm.dec(),imgObj.id=imgTagId;var pasteHTML=this.__pasteHTML.bind(this),canvasWidth=this.canvas.width()-40;imgObj.onload=function(){var ow=imgObj.width,oh=imgObj.height;imgObj.width>canvasWidth&&(imgObj.width=canvasWidth,imgObj.height=oh*(imgObj.width/ow));try{pasteHTML(imgObj)}catch(e){alert(e.print())}}}return this},removeIMG:function(fileID){return this.onFeilDeleteInFrame("#"+fileID),this},initFoot:function(){var config=this.config,po=[];po.push("<a class='me___handle'>resizer</a>"),po.push("<div class='me___container'>"),po.push("	<a href='#axExecption' id='"+config.targetID+"_contentMode_0' class='me____tab me____tabOn'>Editor</a>"),po.push("	<a href='#axExecption' id='"+config.targetID+"_contentMode_1' class='me____tab'>HTML</a>"),po.push("</div>"),this.foot.append(po.join("")),this.foot.find("a.me___handle").bind("mousedown",this.footOnDrag.bind(this)),this.foot.find("a.me____tab").bind("click",this.onContentMode.bind(this))},footOnDrag:function(){this.footOnMover=this.footOnMove.bind(this),jQuery(document).bind("mousemove",this.footOnMover),this.footOnDroper=this.footOnDrop.bind(this),jQuery(document).bind("mouseup",this.footOnDroper),this.selectstart=this.onselectStart.bind(this),jQuery(document).bind("selectstart",this.selectstart),this.canvasMask.show()},footOnMove:function(event){event.pageX&&(this.mouse={x:event.pageX||0,y:event.pageY||0},this.config.moveSens>this.moveSens&&this.moveSens++,this.moveSens==this.config.moveSens&&this.footMove())},footMove:function(){this.draged||(this.draged=!0,this.canvasTop="html"==this.contentMode?this.htmlArea.offset().top:this.canvas.offset().top),this.mouse.y-this.canvasTop>100&&(this.config.height=this.mouse.y-this.canvasTop-2),this.observer&&clearTimeout(this.observer),this.observer=setTimeout(this.footSetCanvasHeight.bind(this),10)},footOnDrop:function(){this.moveSens=0,jQuery(document).unbind("mousemove",this.footOnMover),jQuery(document).unbind("mouseup",this.footOnDroper),jQuery(document).unbind("selectstart",this.selectstart),clearTimeout(this.observer),this.canvasMask.hide(),this.draged=!1},footSetCanvasHeight:function(){this.canvas.css({height:this.config.height+"px"}),"html"==this.contentMode&&this.htmlArea.css({height:this.canvas.height()+"px"}),Object.isFunction(this.config.onresize)&&this.config.onresize.call({canvas:this.canvas,height:this.canvas.height()})},initBody:function(){var config=this.config;this.canvas=jQuery("<iframe src='"+config.frameSrc+"' id='"+config.targetID+"_canvas' name='"+config.targetID+"_canvas' frameBorder='0' allowTransparency='true'></iframe>"),this.canvasMask=jQuery("<div id='"+config.targetID+"_canvasMask' class='me___AXMask' style='display:none;z-index:10;'></div>"),this.body.append(this.canvas),this.body.append(this.canvasMask),this.canvas.css({width:"100%",height:config.height+"px"}),this.canvas.bind("load",this.readyFrame.bind(this))},setHtmlMode:function(power){if("on"==power){var config=this.config,canvasHeight=this.canvas.height();this.canvas.hide(),this.htmlArea=jQuery("<textarea id='"+config.targetID+"_html' name='"+config.targetID+"_html' class='me__htmlArea'></textarea>"),this.body.append(this.htmlArea),this.htmlArea.css({width:"100%",height:canvasHeight+"px"}),this.htmlArea.val(this.__getContent())}else this.setContent(this.htmlArea.val()),this.canvas.show(),this.htmlArea.remove()},readyFrame:function(){var config=this.config;this.myEDT=window[config.targetID+"_canvas"];var editorBody=this.myEDT.document;"ie"==AXUtil.browser.name?editorBody.body.contentEditable=!0:"webkit"==AXUtil.browser.name?(editorBody.body.contentEditable=!0,editorBody.designMode="On"):"mozilla"==AXUtil.browser.name?editorBody.designMode="On":editorBody.designMode="On";try{jQuery(editorBody.body).css({"font-size":config.editorFontSize}),jQuery(editorBody.body).css({"font-family":config.editorFontFamily})}catch(e){}this.bindFocusFrame(),this.config.onReady&&this.config.onReady()},focusFrame:function(){this.closeColorPicker(),this.closeffPicker(),this.closefsPicker(),this.closelhPicker(),this.closeicPicker()},unbindFocusFrame:function(){var editorBody=this.myEDT.document;"mozilla"==AXUtil.browser.name?jQuery(editorBody).unbind("focus",this.focusFrame.bind(this)):jQuery(editorBody.body).unbind("focus",this.focusFrame.bind(this))},bindFocusFrame:function(){var editorBody=this.myEDT.document;"mozilla"==AXUtil.browser.name?jQuery(editorBody).bind("focus",this.focusFrame.bind(this)):jQuery(editorBody.body).bind("focus",this.focusFrame.bind(this))},onselectStart:function(event){return event.stopPropagation(),!1},__command:function(sCommand,bUserInterface,vValue){var myEDT=this.myEDT.document;myEDT.execCommand(sCommand,bUserInterface,vValue)},__pasteHTML:function(sHTML){var myEDT=this.myEDT.document,oTmpDiv=myEDT.createElement("DIV"),oTmpP=myEDT.createElement("P");if(oTmpDiv.appendChild(oTmpP),"string"==typeof sHTML?oTmpDiv.innerHTML=sHTML:oTmpP.appendChild(sHTML),"editor"==this.contentMode){var myRange=new SSelection(this.myEDT),rng=myRange.getRangeAt(0);rng.insertNode(oTmpDiv.lastChild)}else jQuery("#"+this.config.targetID+"_html").val(jQuery("#"+this.config.targetID+"_html").val()+oTmpDiv.innerHTML)},onHeadClick:function(event){if("object"==typeof event){var myID=event.target.id;if(!myID)return;var ids=myID.split(/_/g),headNM=ids[1];ids[2]}else var headNM=event;if("home"==headNM)this.closePanel(),this.panelNum=0,this.openPanel();else if("attch"==headNM){if(1==this.panelNum)return;this.closePanel(),this.panelNum=1,this.openPanel()}else if("external"==headNM){if(5==this.panelNum)return;this.closePanel(),this.panelNum=5,this.openPanel()}},onAttchPanelOpen:function(arg){return 1==this.panelNum?void(arg&&this.setAttchItem(arg)):(this.closePanel(),this.panelNum=1,this.openPanel(),void(arg&&this.setAttchItem(arg)))},onSimpleCommandClick:function(event){var myID=event.target.id;if(myID){var command=this._GPT(myID);this.__command(command)}},onColorCommandClick:function(event){var config=this.config,myEDT=(config.targetID,this.myEDT.document),myID=event.target.id;if(myID){var myCommand=this._GPT(myID),myColor=jQuery("#"+myID+"Val").css("background-color").toColor();this.__command(myCommand,!1,myColor);var myRange=new SSelection(this.myEDT),rng=myRange.getRangeAt(0),nodes=rng.getNodes();if(nodes.length)for(var a=0;a<nodes.length;a++){var myNode=nodes[a],pnode=DOMfix.DF_parentNode(myNode);try{for(;"FONT"!=pnode.tagName&&"SPAN"!=pnode.tagName;)pnode=DOMfix.DF_parentNode(pnode);"foreColor"==myCommand?(pnode.style.color=myColor,pnode.removeAttribute("color")):(pnode.style.backgroundColor=myColor,pnode.removeAttribute("bgcolor"))}catch(e){}}else"foreColor"==myCommand?myEDT.body.style.color=myColor:myEDT.body.style.backgroundColor=myColor}},onInsertCommand:function(event){var myID=event.target.id;if(myID){var command=this._GPT(myID);"pageBreak"==command&&this.__pasteHTML("<hr style='page-break-before:always;border:1px dashed #444;' />")}},onSelectCommandClick:function(event){var myID=(this.myEDT.document,event.target.id);if(myID){var command=this._GPT(myID);"foreColorExt"!=command&&"backColorExt"!=command||this.openColorPicker(command),"fontname"==command&&this.fontFamilyPicker(command),"fontsize"==command&&this.fontSizePicker(command),"lineHeight"==command&&this.lineHeightPicker(command),"url"==command&&this.urlPicker(command),"imoticon"==command&&this.icoPicker(command)}},onAttbtnsClick:function(event){var config=this.config,re=config.targetID,lg=AXEditorLang[config.lang],myID=event.target.id;if(myID){var cmd=myID.split(/_/g).last();if("selectAll"==cmd&&jQuery.each(this.attchFiles,function(idx,f){f.checked=!0,jQuery("#"+re+"_attchItem_"+idx).addClass("attchItemON")}),"delete"==cmd){var delFiles=[];if(jQuery.each(this.attchFiles,function(idx,f){f.checked&&delFiles.push("file="+f.nm+"&path="+f.path)}),0==delFiles.length)return void alert(lg.noSelectedFileMsg);if(!confirm(lg.fileDeleteConfirm))return;var pars=(config.deleteUrl,config.deletePars.join("&"));""!=pars&&(pars+="&"),pars+=delFiles.join("&")+"&dummy="+AXUtil.timekey()}if("insertDoc"==cmd){var insertFiles=jQuery.map(this.attchFiles,function(f){return f.checked?f:void 0});if(0==insertFiles.length)return void alert(lg.noSelectedFileMsg);try{this.myEDT.document.body.focus()}catch(e){}for(var si=0;si<insertFiles.length;si++){var fo=insertFiles[si],ty=fo.ty.dec().toLowerCase();if(".gif"==ty|".jpg"==ty|".png"==ty|".bmp"==ty){var imgObj=new Image;imgObj.src=fo.path.dec()+fo.nm.dec(),imgObj.id="MF_"+fo.nm.replace(fo.ty,"").dec();var pasteHTML=this.__pasteHTML.bind(this),canvasWidth=this.canvas.width()-40;imgObj.onload=function(){var ow=imgObj.width,oh=imgObj.height;imgObj.width>canvasWidth&&(imgObj.width=canvasWidth,imgObj.height=oh*(imgObj.width/ow));try{pasteHTML(imgObj)}catch(e){alert(e.print())}}}else this.__pasteHTML("<a href='"+fo.path.dec()+fo.nm.dec()+"' id='MF_"+fo.nm.replace(fo.ty,"").dec()+"' target='_blank'>"+fo.ti.dec()+"</a>")}}}},onFeilDeleteInFrame:function(rid){var editorBody=this.myEDT.document;"mozilla"==AXUtil.browser.name?jQuery(editorBody).find(rid).remove():jQuery(editorBody.body).find(rid).remove()},onFileDelete:function(res){if("ok"==res.result){var config=this.config,re=config.targetID,removeInFrame=this.onFeilDeleteInFrame.bind(this);if(this.attchFiles=jQuery.map(this.attchFiles,function(f,i){return jQuery("#"+re+"_attchItem_"+i).remove(),f.checked?void removeInFrame("#MF_"+f.nm.replace(f.ty,"").dec()):f}),this.updateFileStatus(),0==this.attchFiles.length)return;jQuery.each(this.attchFiles,function(si,fo){var po=[];po.push("<div class='attchItem' id='"+re+"_attchItem_"+si+"' title='"+fo.ti.dec()+"'>"),po.push("<div class='attchItemName'>"+fo.ti.dec()+"</div>"),po.push("<div class='attchItemPreview'>");var ty=fo.ty.dec().toLowerCase();".gif"==ty|".jpg"==ty|".png"==ty|".bmp"==ty&&po.push("<img src='"+fo.path.dec()+fo.nm.dec()+"' width='100%' height='100%' alt='' />"),po.push("</div>"),po.push("</div>"),jQuery("#"+re+"_divPanel_attchItemEnd").before(po.join(""))}),jQuery("#"+re+"_divPanel_attch").find(".attchItem").bind("click",this.onAttchItemClick.bind(this))}else alert(res.msg.dec())},onAttchItemClick:function(event){var config=this.config,re=config.targetID,myID=event.target.id;if(!myID){try{myID=jQuery(event.target).parents(".attchItem")[0].id}catch(e){}if(!myID)return}var fidx=myID.split(/_/g).last().number();this.attchFiles[fidx].checked=!this.attchFiles[fidx].checked,this.attchFiles[fidx].checked?jQuery("#"+re+"_attchItem_"+fidx).addClass("attchItemON"):jQuery("#"+re+"_attchItem_"+fidx).removeClass("attchItemON")},onClickComponent:function(event){var myID=event.target.id;if(!myID){try{myID=jQuery(event.target).parents(".componentItem")[0].id}catch(e){}if(!myID)return}this.config.onTabExternals&&this.config.onTabExternals(myID)},openColorPicker:function(command){this.colorPicker&&this.colorPicker.remove();var config=this.config,re=config.targetID,lg=AXEditorLang[config.lang],po=[];po.push("<div class='me___selecterBox me_picker' id='"+this._GID([re,command,"picker"])+"'>"),po.push("	<div class='me___selecterArrow me_picker'></div>"),"foreColorExt"==command&&po.push("	<div class='me___selecterTitle me_picker'>"+lg.textColor+"</div>"),"backColorExt"==command&&po.push("	<div class='me___selecterTitle me_picker'>"+lg.textBgColor+"</div>"),jQuery.each(config.colors,function(index,n){po.push("<a href='#AXExex' class='colorItem me_picker' style='background:#"+n+"'>"+n+"</a>")}),po.push("</div>"),this.colorPicker=jQuery(po.join(""));var myHeight=21*(config.colors.length/7).ceil()+28;"foreColorExt"==command&&this.colorPicker.css({width:150,height:myHeight,left:249,top:25}),"backColorExt"==command&&this.colorPicker.css({width:150,height:myHeight,left:287,top:25}),jQuery("#"+re+"_headPanel").append(this.colorPicker),this.clickToClose=this.closeColorPicker.bind(this),jQuery(document).bind("click",this.clickToClose),this.keyDownToClose=this.closeColorPickerKey.bind(this),jQuery(document).bind("keydown",this.keyDownToClose),this.colorPicker.find(".colorItem").bind("click",this.clickColor.bind(this,command))},closeColorPicker:function(event){event?jQuery(event.target).hasClass("me_picker")||(this.clickToClose&&jQuery(document).unbind("click",this.clickToClose),this.keyDownToClose&&jQuery(document).unbind("keydown",this.keyDownToClose),this.colorPicker&&this.colorPicker.remove()):(this.clickToClose&&jQuery(document).unbind("click",this.clickToClose),this.keyDownToClose&&jQuery(document).unbind("keydown",this.keyDownToClose),
  this.colorPicker&&this.colorPicker.remove())},closeColorPickerKey:function(){event.keyCode==AXUtil.Event.KEY_ESC&&(this.clickToClose&&jQuery(document).unbind("click",this.clickToClose),this.keyDownToClose&&jQuery(document).unbind("keydown",this.keyDownToClose),this.colorPicker&&this.colorPicker.remove())},clickColor:function(command,event){var config=this.config,re=config.targetID,myEDT=this.myEDT.document,myColor=jQuery(event.target).css("background-color").toColor(),myCommand=command.replace("Ext","");this.__command(myCommand,!1,myColor);var myRange=new SSelection(this.myEDT),rng=myRange.getRangeAt(0),nodes=rng.getNodes();if(nodes.length)for(var a=0;a<nodes.length;a++){var myNode=nodes[a],pnode=DOMfix.DF_parentNode(myNode);try{for(;"FONT"!=pnode.tagName&&"SPAN"!=pnode.tagName;)pnode=DOMfix.DF_parentNode(pnode);"foreColor"==myCommand?(pnode.style.color=myColor,pnode.removeAttribute("color")):(pnode.style.backgroundColor=myColor,pnode.removeAttribute("bgcolor"))}catch(e){}}else"foreColor"==myCommand?myEDT.body.style.color=myColor:myEDT.body.style.backgroundColor=myColor;jQuery("#"+this._GID([re,myCommand+"Val"])).css({background:"#"+myColor}),this.closeColorPicker()},fontFamilyPicker:function(command){this.ffPicker&&this.ffPicker.remove();var config=this.config,re=config.targetID,lg=AXEditorLang[config.lang],po=[];po.push("<div class='me___selecterBox me_ffs' id='"+this._GID([re,command,"picker"])+"'>"),po.push("	<div class='me___selecterArrow me_ffs'></div>"),po.push("	<div class='me___selecterTitle me_ffs'>"+lg.fontFamily+"</div>"),jQuery.each(config.fonts,function(index,n){po.push("<a href='#AXExex' class='ffItem me_ffs' style='font-family:"+n+"'>"+lg.fontSample+"("+n+")</a>")}),po.push("</div>"),this.ffPicker=jQuery(po.join(""));var myHeight=25*config.fonts.length+30;this.ffPicker.css({width:150,height:myHeight,left:3,top:25}),jQuery("#"+re+"_headPanel").append(this.ffPicker),this.clickToCloseFF=this.closeffPicker.bind(this),jQuery(document).bind("click",this.clickToCloseFF),this.keyDownToCloseFF=this.closeffPickerKey.bind(this),jQuery(document).bind("keydown",this.keyDownToCloseFF),this.ffPicker.find(".ffItem").bind("click",this.clickff.bind(this,command))},closeffPicker:function(event){event?jQuery(event.target).hasClass("me_ffs")||(this.clickToCloseFF&&jQuery(document).unbind("click",this.clickToCloseFF),this.keyDownToCloseFF&&jQuery(document).unbind("keydown",this.keyDownToCloseFF),this.ffPicker&&this.ffPicker.remove()):(this.clickToCloseFF&&jQuery(document).unbind("click",this.clickToCloseFF),this.keyDownToCloseFF&&jQuery(document).unbind("keydown",this.keyDownToCloseFF),this.ffPicker&&this.ffPicker.remove())},closeffPickerKey:function(){event.keyCode==AXUtil.Event.KEY_ESC&&(this.clickToCloseFF&&jQuery(document).unbind("click",this.clickToCloseFF),this.keyDownToCloseFF&&jQuery(document).unbind("keydown",this.keyDownToCloseFF),this.ffPicker&&this.ffPicker.remove())},clickff:function(command,event){var config=this.config,re=config.targetID,myEDT=this.myEDT.document,myfont=jQuery(event.target).css("font-family");this.__command(command,!1,myfont);var myRange=new SSelection(this.myEDT),rng=myRange.getRangeAt(0),nodes=rng.getTextNodes();if(nodes.length)for(var a=0;a<nodes.length;a++){var myNode=nodes[a],pnode=DOMfix.DF_parentNode(myNode);try{for(;"FONT"!=pnode.tagName&&"SPAN"!=pnode.tagName;)pnode=DOMfix.DF_parentNode(pnode);pnode.style.fontFamily=myfont,pnode.removeAttribute("face")}catch(e){}}else myEDT.body.style.fontFamily=myfont;jQuery("#"+this._GID([re,"fontname"])).html(myfont),jQuery("#"+this._GID([re,"fontname"])).css({"font-family":myfont}),this.closeffPicker()},fontSizePicker:function(command){this.fsPicker&&this.fsPicker.remove();var config=this.config,re=config.targetID,lg=AXEditorLang[config.lang],po=[];po.push("<div class='me___selecterBox me_fss' id='"+this._GID([re,command,"picker"])+"'>"),po.push("	<div class='me___selecterArrow me_fss'></div>"),po.push("	<div class='me___selecterTitle me_fss'>"+lg.fontSize+"</div>"),jQuery.each(config.fontsizes,function(index,n){po.push("<a href='#AXExex' class='ffItem me_fss' style='font-size:"+n+"px'>"+lg.fontSample+"("+n+"px)</a>")}),po.push("</div>"),this.fsPicker=jQuery(po.join(""));var myHeight=25*config.fontsizes.length+30;this.fsPicker.css({width:150,height:myHeight,left:95,top:25}),jQuery("#"+re+"_headPanel").append(this.fsPicker),this.clickToCloseFS=this.closefsPicker.bind(this),jQuery(document).bind("click",this.clickToCloseFS),this.keyDownToCloseFS=this.closefsPickerKey.bind(this),jQuery(document).bind("keydown",this.keyDownToCloseFS),this.fsPicker.find(".ffItem").bind("click",this.clickfs.bind(this,command))},closefsPicker:function(event){event?jQuery(event.target).hasClass("me_fss")||(this.clickToCloseFS&&jQuery(document).unbind("click",this.clickToCloseFS),this.keyDownToCloseFS&&jQuery(document).unbind("keydown",this.keyDownToCloseFS),this.fsPicker&&this.fsPicker.remove()):(this.clickToCloseFS&&jQuery(document).unbind("click",this.clickToCloseFS),this.keyDownToCloseFS&&jQuery(document).unbind("keydown",this.keyDownToCloseFS),this.fsPicker&&this.fsPicker.remove())},closefsPickerKey:function(){event.keyCode==AXUtil.Event.KEY_ESC&&(this.clickToCloseFS&&jQuery(document).unbind("click",this.clickToCloseFS),this.keyDownToCloseFS&&jQuery(document).unbind("keydown",this.keyDownToCloseFS),this.fsPicker&&this.fsPicker.remove())},clickfs:function(command,event){var config=this.config,re=config.targetID,myEDT=this.myEDT.document,mysize=jQuery(event.target).css("font-size");this.__command(command,!1,1);var myRange=new SSelection(this.myEDT),rng=myRange.getRangeAt(0),nodes=rng.getTextNodes();if(nodes.length)for(var a=0;a<nodes.length;a++){var myNode=nodes[a],pnode=DOMfix.DF_parentNode(myNode);try{for(;"FONT"!=pnode.tagName&&"SPAN"!=pnode.tagName;)pnode=DOMfix.DF_parentNode(pnode);pnode.style.fontSize=mysize,pnode.removeAttribute("size")}catch(e){}}else myEDT.body.style.fontSize=mysize;jQuery("#"+this._GID([re,"fontsize"])).html(mysize),this.closefsPicker()},lineHeightPicker:function(command){this.lhPicker&&this.lhPicker.remove();var config=this.config,re=config.targetID,lg=AXEditorLang[config.lang],po=[];po.push("<div class='me___selecterBox me_lhs' id='"+this._GID([re,command,"picker"])+"'>"),po.push("	<div class='me___selecterArrow me_lhs'></div>"),po.push("	<div class='me___selecterTitle me_lhs'>"+lg.lineHeight+"</div>"),jQuery.each(config.lineHeights,function(index,n){po.push("<a href='#AXExex' class='ffItem me_lhs' style='text-align:center;'>"+n+"</a>")}),po.push("</div>"),this.lhPicker=jQuery(po.join(""));var myHeight=25*config.lineHeights.length+30;this.lhPicker.css({width:100,height:myHeight,left:491,top:25}),jQuery("#"+re+"_headPanel").append(this.lhPicker),this.clickToCloseLH=this.closelhPicker.bind(this),jQuery(document).bind("click",this.clickToCloseLH),this.keyDownToCloseLH=this.closelhPickerKey.bind(this),jQuery(document).bind("keydown",this.keyDownToCloseLH),this.lhPicker.find(".ffItem").bind("click",this.clicklh.bind(this,command))},closelhPicker:function(event){event?jQuery(event.target).hasClass("me_lhs")||(this.clickToCloseLH&&jQuery(document).unbind("click",this.clickToCloseLH),this.keyDownToCloseLH&&jQuery(document).unbind("keydown",this.keyDownToCloseLH),this.lhPicker&&this.lhPicker.remove()):(this.clickToCloseLH&&jQuery(document).unbind("click",this.clickToCloseLH),this.keyDownToCloseLH&&jQuery(document).unbind("keydown",this.keyDownToCloseLH),this.lhPicker&&this.lhPicker.remove())},closelhPickerKey:function(){event.keyCode==AXUtil.Event.KEY_ESC&&(this.clickToCloseLH&&jQuery(document).unbind("click",this.clickToCloseLH),this.keyDownToCloseLH&&jQuery(document).unbind("keydown",this.keyDownToCloseLH),this.lhPicker&&this.lhPicker.remove())},clicklh:function(command,event){var config=this.config,myEDT=(config.targetID,this.myEDT.document),mylh=jQuery(event.target).text(),myRange=new SSelection(this.myEDT),rng=myRange.getRangeAt(0),nodes=rng.getTextNodes();if(nodes.length)for(var a=0;a<nodes.length;a++){var myNode=nodes[a],pnode=DOMfix.DF_parentNode(myNode);if("BODY"==pnode.tagName)pnode.style.lineHeight=mylh+"em";else{for(;"P"!=pnode.tagName&&"DIV"!=pnode.tagName;)pnode=DOMfix.DF_parentNode(pnode);pnode.style.lineHeight=mylh+"em"}}else myEDT.body.style.lineHeight=mylh+"em";this.closelhPicker()},urlPicker:function(command){this.ulPicker&&this.ulPicker.remove();var config=this.config,re=config.targetID,lg=AXEditorLang[config.lang],inpID=this._GID([re,command,"input"]),target_blank=this._GID([re,command,"target_blank"]),target_self=this._GID([re,command,"target_self"]),po=[];po.push("<div class='me___selecterBox me_url' id='"+this._GID([re,command,"picker"])+"'>"),po.push("	<div class='me___selecterArrow me_url' style='left:240px;'></div>"),po.push("	<div class='me___selecterTitle me_url'>"+lg.url+"</div>"),po.push("	<div class='me___inputUrl me_url'><input type='text' id='"+inpID+"' class='me_url' style='width:280px;'></div>"),po.push("	<div class='me___inputBtn me_url'>"),po.push("	<input type='radio' name='"+this._GID([re,command,"target"])+"' id='"+target_blank+"' class='me_url' value='_blank' checked='checked'> _blank"),po.push("	<input type='radio' name='"+this._GID([re,command,"target"])+"' id='"+target_self+"' class='me_url' value='_self'> _self"),po.push("	<input type='button' value='OK' class='AXButtonSmall me_url me___inputBtnOK' />"),po.push("	</div>"),po.push("</div>"),this.ulPicker=jQuery(po.join(""));var myHeight=90;this.ulPicker.css({width:300,height:myHeight,left:324,top:25}),jQuery("#"+re+"_headPanel").append(this.ulPicker),this.myRange=new SSelection(this.myEDT),this.oSelection=this.myRange.getRangeAt(0);for(var oNode=this.oSelection.commonAncestorContainer;oNode&&"A"!=oNode.tagName;)oNode=DOMfix.DF_parentNode(oNode);if(oNode){var sTarget=oNode.target;sTarget&&"_blank"==sTarget&&(jQuery("#"+target_blank)[0].checked=!0),jQuery("#"+inpID).val(oNode.href?oNode.href:"http://")}else jQuery("#"+inpID).val("http://");jQuery("#"+inpID).select(),this.clickToCloseUL=this.closeulPicker.bind(this),jQuery(document).bind("click",this.clickToCloseUL),this.keyDownToCloseUL=this.closeulPickerKey.bind(this),jQuery(document).bind("keydown",this.keyDownToCloseUL),this.ulPicker.find(".me___inputBtnOK").bind("click",this.clickul.bind(this,command))},closeulPicker:function(event){event?jQuery(event.target).hasClass("me_url")||(this.clickToCloseUL&&jQuery(document).unbind("click",this.clickToCloseUL),this.keyDownToCloseUL&&jQuery(document).unbind("keydown",this.keyDownToCloseUL),this.ulPicker&&this.ulPicker.remove()):(this.clickToCloseUL&&jQuery(document).unbind("click",this.clickToCloseUL),this.keyDownToCloseUL&&jQuery(document).unbind("keydown",this.keyDownToCloseUL),this.ulPicker&&this.ulPicker.remove())},closeulPickerKey:function(){event.keyCode==AXUtil.Event.KEY_ESC&&(this.clickToCloseUL&&jQuery(document).unbind("click",this.clickToCloseUL),this.keyDownToCloseUL&&jQuery(document).unbind("keydown",this.keyDownToCloseUL),this.ulPicker&&this.ulPicker.remove())},clickul:function(command,event){var config=this.config,re=config.targetID,lg=(this.myEDT.document,AXEditorLang[config.lang]),inpID=this._GID([re,command,"input"]),target_blank=this._GID([re,command,"target_blank"]),sURL=(this._GID([re,command,"target_self"]),jQuery("#"+inpID).val());if(this.myRange.selectRange(this.oSelection),this._validateURL(sURL)){var sTarget=jQuery("#"+target_blank)[0].checked?"_blank":"_self";if(this.oSelection.collapsed)this.__pasteHTML("<a href='"+sURL+"' target='"+sTarget+"'>"+sURL+"</a>");else{this.__command("CreateLink",!1,sURL),this.myRange=new SSelection(this.myEDT),this.oSelection=this.myRange.getRangeAt(0);for(var oNode=this.oSelection.commonAncestorContainer;oNode&&"A"!=oNode.tagName;)oNode=DOMfix.DF_parentNode(oNode);oNode&&(oNode.target=sTarget)}}else alert(lg.invalidUrlMsg);this.closeulPicker()},_validateURL:function(sURL){return/^(http|https|ftp|mailto):(?:\/\/)?((\w|-)+(?:[\.:@](\w|-))+)(?:\/|@)?([^"\?]*?)(?:\?([^\?"]*?))?$/.test(sURL)},icoPicker:function(command){this.icPicker&&this.icPicker.remove();var config=this.config,re=config.targetID;AXEditorLang[config.lang];void 0==this.icoCategoryIndex&&(this.icoCategoryIndex=0);var icoCategoryIndex=this.icoCategoryIndex,po=[];po.push("<div class='me___selecterBox me_ico' id='"+this._GID([re,command,"picker"])+"'>"),po.push("	<div class='me___selecterArrow me_ico' style='left:372px;'></div>"),po.push("	<div class='me___selecterTitleTab me_ico'>"),po.push("		<div class='me___selecterTitleTabTray me_ico'>"),jQuery.each(config.AXEditorIcons,function(idx,ca){icoCategoryIndex==idx?po.push("<a href='#AXExec' class='categoryItem me_ico on' id='"+re+"_icoCategory_"+idx+"'>"+ca.categoryNM+"</a>"):po.push("<a href='#AXExec' class='categoryItem me_ico' id='"+re+"_icoCategory_"+idx+"'>"+ca.categoryNM+"</a>")}),po.push("		</div>"),po.push("	</div>"),po.push("	<div class='me___selecterTray me_ico' style='height:120px;' id='"+re+"_icoTray'>");var icoFolder=config.AXEditorIcons[icoCategoryIndex].imageFolder;jQuery.each(config.AXEditorIcons[icoCategoryIndex].icons,function(index,n){po.push("<a href='#AXExex' class='icoItem me_ico'><img src='"+icoFolder+n+"' align='middle' alt='' /></a>")}),po.push("	</div>"),po.push("	<div class='me___selecterBot me_ico' id='"+re+"_icoBot'>"),po.push("	"+config.AXEditorIcons[icoCategoryIndex].copyRights),po.push("	</div>"),po.push("</div>"),this.icPicker=jQuery(po.join(""));var myWidth=396,myHeight=180;this.icPicker.css({width:myWidth,height:myHeight,left:214,top:25}),jQuery("#"+re+"_headPanel").append(this.icPicker),this.clickToCloseIC=this.closeicPicker.bind(this),jQuery(document).bind("click",this.clickToCloseIC),this.keyDownToCloseIC=this.closeicPickerKey.bind(this),jQuery(document).bind("keydown",this.keyDownToCloseIC),this.icPicker.find(".icoItem img").bind("click",this.clickic.bind(this,command)),this.icPicker.find(".me___selecterTitleTabTray .categoryItem").bind("click",this.changeCategory.bind(this))},closeicPicker:function(event){event?jQuery(event.target).hasClass("me_ico")||(this.clickToCloseIC&&jQuery(document).unbind("click",this.clickToCloseIC),this.keyDownToCloseIC&&jQuery(document).unbind("keydown",this.keyDownToCloseIC),this.icPicker&&this.icPicker.remove()):(this.clickToCloseIC&&jQuery(document).unbind("click",this.clickToCloseIC),this.keyDownToCloseIC&&jQuery(document).unbind("keydown",this.keyDownToCloseIC),this.icPicker&&this.icPicker.remove())},closeicPickerKey:function(){event.keyCode==AXUtil.Event.KEY_ESC&&(this.clickToCloseIC&&jQuery(document).unbind("click",this.clickToCloseIC),this.keyDownToCloseIC&&jQuery(document).unbind("keydown",this.keyDownToCloseIC),this.icPicker&&this.icPicker.remove())},clickic:function(command,event){var config=this.config,myEDT=(config.targetID,this.myEDT.document),sHTML="<img src='"+event.target.src+"' align='middle' alt='' style='vertical-align:middle;' />",oTmpDiv=myEDT.createElement("DIV");oTmpDiv.innerHTML=sHTML;var myRange=new SSelection(this.myEDT),rng=myRange.getRangeAt(0);rng.insertNode(oTmpDiv.lastChild),this.closeicPicker()},changeCategory:function(event){var config=this.config,re=config.targetID,idx=event.target.id.split("_").last();void 0!=this.icoCategoryIndex&&jQuery("#"+re+"_icoCategory_"+this.icoCategoryIndex).removeClass("on"),this.icoCategoryIndex=idx,icoCategoryIndex=idx,jQuery("#"+re+"_icoCategory_"+idx).addClass("on");var po=[],icoFolder=config.AXEditorIcons[icoCategoryIndex].imageFolder;jQuery.each(config.AXEditorIcons[icoCategoryIndex].icons,function(index,n){po.push("<a href='#AXExex' class='icoItem me_ico'><img src='"+icoFolder+n+"' align='middle' alt='' /></a>")}),jQuery("#"+re+"_icoTray").html(po.join("")),this.icPicker.find(".icoItem img").bind("click",this.clickic.bind(this,"imoticon")),jQuery("#"+re+"_icoBot").html(config.AXEditorIcons[icoCategoryIndex].copyRights)},onContentMode:function(event){var config=this.config;event.target.id==config.targetID+"_contentMode_0"?"editor"!=this.contentMode&&(this.contentMode="editor",jQuery("#"+config.targetID+"_contentMode_0").addClass("me____tabOn"),jQuery("#"+config.targetID+"_contentMode_1").removeClass("me____tabOn"),this.setHtmlMode("off")):"html"!=this.contentMode&&(this.contentMode="html",jQuery("#"+config.targetID+"_contentMode_0").removeClass("me____tabOn"),jQuery("#"+config.targetID+"_contentMode_1").addClass("me____tabOn"),this.setHtmlMode("on"))},__getContent:function(){var myEDT=this.myEDT.document;return myEDT.body.innerHTML},getContentCheck:function(){var myEDT=this.myEDT.document,editorContent="";return editorContent="editor"==this.contentMode?myEDT.body.innerHTML:this.htmlArea.val(),""!=editorContent.trim()},getContent:function(){var myEDT=this.myEDT.document,ff=myEDT.body.style.fontFamily,fs=myEDT.body.style.fontSize,cl=myEDT.body.style.color,bc=myEDT.body.style.backgroundColor,lh=myEDT.body.style.lineHeight;""==lh&&(lh="1.5em");var sts=[];return ff&&sts.push("font-family:"+ff),fs&&sts.push("font-size:"+fs),cl&&sts.push("color:"+cl),bc&&sts.push("background-color:"+bc),lh&&sts.push("line-height:"+lh),"editor"==this.contentMode?"<div class='AXEditorContentBody' style='"+sts.join(";")+";'>"+myEDT.body.innerHTML+"</div>":"<div class='AXEditorContentBody' style='"+sts.join(";")+";'>"+this.htmlArea.val()+"</div>"},setContent:function(content){var myEDT=this.myEDT.document;if("string"==typeof content)""==content&&(content="<p></p>"),myEDT.body.innerHTML=content;else{var myBody=content.find(".AXEditorContentBody");null==myBody.html()?jQuery(myEDT.body).html(content.html()):(content.children().each(function(){jQuery(this).hasClass("AXEditorContentBody")||myBody.prepend(this)}),jQuery(myEDT.body).html(myBody.html()),jQuery(myEDT.body).css({"font-family":myBody.css("fontFamily")}),jQuery(myEDT.body).css({"font-size":myBody.css("fontSize")}),jQuery(myEDT.body).css({color:myBody.css("color")}),jQuery(myEDT.body).css({"background-color":myBody.css("backgroundColor")}),jQuery(myEDT.body).css({"line-height":myBody.css("lineHeight")}))}return this},getFileList:function(){return this.attchFiles},setFileList:function(files){this.attchFiles=files,this.updateFileStatus()},nothing:function(){}}),AXExcelConvert=Class.create(AXJ,{version:"AXExcelConvert V1",author:"tom@axisj.com",logs:["2013-08-21 오후 11:47:11 - modsAX 변환"],initialize:function(AXJ_super){AXJ_super(),this.ds=[]},init:function(){},readyData:function(){this.ds=[];var re=this.config.targetID,po=[];po.push("<div id='"+re+"_CT'>"),po.push("<div style='padding:5px;'>엑셀데이터 붙여넣기 <span>- 변환하실 엑셀 데이터를 선택하여 아래에 붙여넣기 해주세요.</span></div>"),po.push("<textarea id='"+re+"_TEXT' style='width:"+this.config.ctWidth+"px;height:"+this.config.ctHeight+"px;' class='AXTextarea'></textarea>"),po.push("<div style='padding:10px;' align='right'><input type='button' value='변환하기' class='AXButton' id='"+re+"_convert' /> <input type='button' value='창 닫기' class='AXButton' id='"+re+"_close' /></div>"),po.push("</div>"),jQuery("#"+re).html(po.join("")),setTimeout(function(){jQuery("#"+re+"_TEXT").focus()},500),jQuery("#"+re+"_convert").bind("click",this.onConvert.bind(this)),jQuery("#"+re+"_close").bind("click",this.onClose.bind(this))},onConvert:function(){var re=this.config.targetID,tStr=jQuery("#"+re+"_TEXT").val().trim();if(""==tStr)return void alert("변환할 내용이 없습니다. 내용을 입력하세요.");for(var iePattern2=/["]/gi,iePattern3=/ (?:\r\n|\r|\n)/g,sStr=tStr.replace(iePattern3,"").replace(iePattern2,""),codeR=sStr.split(/\n/g),a=0;a<codeR.length;a++)if(""!=codeR[a].trim()){codeR[a]=codeR[a].replace(/\t\t/gi,"	 	");var codeC=codeR[a].trim().split(/[\t]/gi);this.ds.push(codeC)}this.gridPrint()},onClose:function(){this.config.onClose&&this.config.onClose()},gridPrint:function(){function getCOPT(nm){var copt=[];return copt.push("<select name='colNames' class='colNamesSelect'>"),copt.push("	<option value=''></option>"),jQuery.each(colnames,function(){nm==this.nm?copt.push("	<option value='"+this.nm+"' selected='selected'>"+this.val+"</option>"):copt.push("	<option value='"+this.nm+"'>"+this.val+"</option>")}),copt.push("</select>"),copt.join("")}var re=this.config.targetID,colnames=this.config.colnames,po=[];po.push("<div id='"+re+"_CT'>"),po.push("<div style='padding:5px;'>엑셀데이터 확인</div>"),po.push("<div style='width:"+this.config.ctWidth+"px;height:"+this.config.ctHeight+"px;overflow:auto;border:1px solid #ccc;'>"),po.push("<form name='"+re+"_frm'>"),po.push("	<table cellspacing='0' cellpadding='0'>"),po.push("		<thead>"),po.push("			<tr>"),jQuery.each(colnames,function(){po.push("				<td>"+getCOPT(this.nm)+"</td>")}),po.push("			</tr>"),po.push("		</thead>"),po.push("		<tbody>"),jQuery.each(this.ds,function(idx,R){po.push("			<tr>"),jQuery.each(colnames,function(icx,C){po.push("				<td class='nowrap' title='"+R[icx]+"'>"+R[icx]+"</td>")}),po.push("			</tr>")}),po.push("		</tbody>"),po.push("	</table>"),po.push("</form>"),po.push("</div>"),po.push("<div style='padding:10px;' align='right'><input type='button' value='변환완료' class='AXButton' id='"+re+"_convert' /> <input type='button' value='창 닫기' class='AXButton' id='"+re+"_close' /></div>"),po.push("</div>"),jQuery("#"+re).html(po.join("")),jQuery("#"+re+"_convert").bind("click",this.onInsert.bind(this)),jQuery("#"+re+"_close").bind("click",this.onClose.bind(this)),jQuery(".colNamesSelect").bind("change",this.onColNameSelect.bind(this))},onInsert:function(){for(var re=this.config.targetID,frm=document[re+"_frm"],cols=[],a=0;a<frm.colNames.length;a++)cols.push({nm:frm.colNames[a][frm.colNames[a].selectedIndex].value,val:frm.colNames[a][frm.colNames[a].selectedIndex].text});this.config.onConvert&&this.config.onConvert({cols:cols,ds:this.ds})},onColNameSelect:function(event){var selVal=event.target.value;jQuery(".colNamesSelect").each(function(){event.target!=this&&this.value==selVal&&(this.value="")})}}),AXSplit=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super()},init:function(){var cfg=this.config;if(cfg.onwindowresize||(cfg.onwindowresize=cfg.onWindowResize),cfg.onready||(cfg.onready=cfg.onReady),cfg.onsplitresize||(cfg.onsplitresize=cfg.onSplitResize),cfg.onsplitresizeend||(cfg.onsplitresizeend=cfg.onSplitResizeEnd),$("html, body").css("overflow","hidden"),this.target=axdom("#"+cfg.targetID),this.target.attr("ondragstart","return false"),"function"==typeof cfg.setTargetHeight){var targetHeight=cfg.setTargetHeight.call(this);this.target.height(targetHeight)}this.initChild(this.target),this.initEvent(),axdom(window).resize(this.windowResize.bind(this)),cfg.onready&&cfg.onready.call({}),this.resizeInstances()},windowResize:function(){this.windowResizeApply()},windowResizeApply:function(){var cfg=this.config;this.windowResizeObserver&&clearTimeout(this.windowResizeObserver),this.initChild(this.target),cfg.onwindowresize&&cfg.onwindowresize.call({})},initChild:function(parent){function setMinMaxLength(dom,type){var min=dom.attr("data-min-"+type),max=dom.attr("data-max-"+type),parentLength="height"==type?parentHeight:parentWidth;if(min){var minValue=getPixelValueBind(min,parentLength);dom.css("min-"+type,minValue)}if(max){var maxValue=getPixelValueBind(max,parentLength);dom.css("max-"+type,maxValue)}}var parentWidth=(this.config,parent.innerWidth()),parentHeight=parent.innerHeight(),calcWidth=0,calcHeight=0,uncolCount=0,unrowCount=0,colindex=1,rowindex=1,moreFindTarget=[],getPixelValueBind=this.getPixelValue.bind(this);parent.children().each(function(){var dom_this=axdom(this);if(dom_this.hasClass("AXSplit-cols")){if(dom_this.attr("data-width")){var width=getPixelValueBind(dom_this.attr("data-width"),parentWidth);calcWidth+=width,dom_this.css("width",width)}else uncolCount++;dom_this.attr("data-axsplit-colindex")||dom_this.attr("data-axsplit-colindex",colindex),colindex++}else if(dom_this.hasClass("AXSplit-col-handle"))calcWidth+=dom_this.width().number(),dom_this.attr("data-axsplit-colindex")||dom_this.attr("data-axsplit-colindex",colindex),colindex++;else if(dom_this.hasClass("AXSplit-rows")){if(dom_this.attr("data-height")){var height=getPixelValueBind(dom_this.attr("data-height"),parentHeight);calcHeight+=height,dom_this.css("height",height)}else unrowCount++;dom_this.attr("data-axsplit-rowindex")||dom_this.attr("data-axsplit-rowindex",rowindex),rowindex++}else dom_this.hasClass("AXSplit-row-handle")&&(calcHeight+=dom_this.height().number(),dom_this.attr("data-axsplit-rowindex")||dom_this.attr("data-axsplit-rowindex",rowindex),rowindex++)}),parent.children().each(function(){var dom_this=axdom(this);dom_this.hasClass("AXSplit-cols")?(dom_this.attr("data-width")||dom_this.css({width:(parentWidth-calcWidth)/uncolCount}),setMinMaxLength(dom_this,"width")):dom_this.hasClass("AXSplit-rows")&&(dom_this.attr("data-height")||dom_this.css({height:(parentHeight-calcHeight)/unrowCount}),setMinMaxLength(dom_this,"height")),dom_this.find(".AXSplit-rows, .AXSplit-cols").length>0&&moreFindTarget.push(dom_this)});for(var i=0;i<moreFindTarget.length;i++)this.initChild(moreFindTarget[i])},initEvent:function(){var _this=(this.config,this);this.target.find(".AXSplit-col-handle, .AXSplit-row-handle").bind("mousedown",function(event){_this.readyResize(axdom(this),event)})},readyResize:function(handleDom,event){this.config;this.resizeHandle_data={parentDom:handleDom.parent(),dom:handleDom,isRowHandle:handleDom.hasClass("AXSplit-row-handle")},this.resizeHandle_data.dom.addClass("on"),this.resizeHandle_data.isRowHandle?(this.resizeHandle_data.top=event.pageY,this.resizeHandle_data.hindex=this.resizeHandle_data.dom.attr("data-axsplit-rowindex").number(),this.resizeHandle_data.pitem_dom=this.resizeHandle_data.parentDom.find(".AXSplit-rows[data-axsplit-rowindex="+(this.resizeHandle_data.hindex-1)+"]"),this.resizeHandle_data.nitem_dom=this.resizeHandle_data.parentDom.find(".AXSplit-rows[data-axsplit-rowindex="+(this.resizeHandle_data.hindex+1)+"]"),this.resizeHandle_data.pitem_dom_height=this.resizeHandle_data.pitem_dom.height().number(),this.resizeHandle_data.pitem_dom_min_height=this.resizeHandle_data.pitem_dom.css("min-height").number(),this.resizeHandle_data.pitem_dom_max_height=this.resizeHandle_data.pitem_dom.css("max-height").number(),this.resizeHandle_data.nitem_dom_height=this.resizeHandle_data.nitem_dom.height().number(),this.resizeHandle_data.nitem_dom_min_height=this.resizeHandle_data.nitem_dom.css("min-height").number(),this.resizeHandle_data.nitem_dom_max_height=this.resizeHandle_data.nitem_dom.css("max-height").number()):(this.resizeHandle_data.left=event.pageX,this.resizeHandle_data.hindex=this.resizeHandle_data.dom.attr("data-axsplit-colindex").number(),this.resizeHandle_data.pitem_dom=this.resizeHandle_data.parentDom.find(".AXSplit-cols[data-axsplit-colindex="+(this.resizeHandle_data.hindex-1)+"]"),this.resizeHandle_data.nitem_dom=this.resizeHandle_data.parentDom.find(".AXSplit-cols[data-axsplit-colindex="+(this.resizeHandle_data.hindex+1)+"]"),this.resizeHandle_data.pitem_dom_width=this.resizeHandle_data.pitem_dom.width().number(),this.resizeHandle_data.pitem_dom_min_width=this.resizeHandle_data.pitem_dom.css("min-width").number(),this.resizeHandle_data.pitem_dom_max_width=this.resizeHandle_data.pitem_dom.css("max-width").number(),this.resizeHandle_data.nitem_dom_width=this.resizeHandle_data.nitem_dom.width().number(),this.resizeHandle_data.nitem_dom_min_width=this.resizeHandle_data.nitem_dom.css("min-width").number(),this.resizeHandle_data.nitem_dom_max_width=this.resizeHandle_data.nitem_dom.css("max-width").number()),axdom(document.body).bind("mousemove.axsplit",this.splitResize.bind(this)),axdom(document.body).bind("mouseup.axsplit",this.splitResizeEnd.bind(this))},splitResize:function(event){var cfg=this.config,rdata=this.resizeHandle_data;if(rdata.isRowHandle){var dy=event.pageY-rdata.top,pitem_dom_height=rdata.pitem_dom_height+dy;if(rdata.pitem_dom_min_height>0&&rdata.pitem_dom_min_height>pitem_dom_height)return;if(rdata.pitem_dom_max_height>0&&rdata.pitem_dom_max_height<pitem_dom_height)return;rdata.pitem_dom.css({height:pitem_dom_height}),rdata.pitem_dom.attr("data-height")&&rdata.pitem_dom.attr("data-height",pitem_dom_height);var nitem_dom_height=rdata.nitem_dom_height-dy;if(rdata.nitem_dom_min_height>0&&rdata.nitem_dom_min_height>nitem_dom_height)return;if(rdata.nitem_dom_max_height>0&&rdata.nitem_dom_max_height<nitem_dom_height)return;rdata.nitem_dom.css({height:nitem_dom_height}),rdata.nitem_dom.attr("data-height")&&rdata.nitem_dom.attr("data-height",nitem_dom_height)}else{var dx=event.pageX-rdata.left,pitem_dom_width=rdata.pitem_dom_width+dx;if(rdata.pitem_dom_min_width>0&&rdata.pitem_dom_min_width>pitem_dom_width)return;if(rdata.pitem_dom_max_width>0&&rdata.pitem_dom_max_width<pitem_dom_width)return;rdata.pitem_dom.css({width:pitem_dom_width}),rdata.pitem_dom.attr("data-width")&&rdata.pitem_dom.attr("data-width",pitem_dom_width);var nitem_dom_width=rdata.nitem_dom_width-dx;if(rdata.nitem_dom_min_width>0&&rdata.nitem_dom_min_width>nitem_dom_width)return;if(rdata.nitem_dom_max_width>0&&rdata.nitem_dom_max_width<nitem_dom_width)return;rdata.nitem_dom.css({width:nitem_dom_width}),rdata.nitem_dom.attr("data-width")&&rdata.nitem_dom.attr("data-width",nitem_dom_width)}cfg.onsplitresize&&cfg.onsplitresize.call(this.resizeHandle_data)},splitResizeEnd:function(){var cfg=this.config;this.resizeHandle_data.dom.removeClass("on"),axdom(document.body).unbind("mousemove.axsplit"),axdom(document.body).unbind("mouseup.axsplit"),cfg.onsplitresizeend&&cfg.onsplitresizeend.call({}),this.resizeInstances()},getPixelValue:function(value,parentLength){if("string"!=typeof value||""===value)return 0;if(value.indexOf("%")>-1){var percent=value.number(),pixelValue=parentLength*(percent/100);return pixelValue}return value.number()},resizeInstances:function(){var axGrids=window.AXGrid_instances;axGrids&&"number"==typeof axGrids.length&&axf.each(axGrids,function(gi,grid){if(grid.config.fill===!0){grid.scrollBody.css("border","none");var ph=grid.target.parent().innerHeight(),siblingsHeight=0;grid.target.siblings().each(function(si,sibling){var s=$(sibling);0!==s.height()&&(siblingsHeight+=s.outerHeight(!0))}),grid.setHeight(ph-siblingsHeight+2)}});var axTree=window.AXTree_instances;axTree&&"number"==typeof axTree.length&&axf.each(axTree,function(ti,tree){if(tree.config.fill===!0){tree.scrollBody.css("border","none");var ph=tree.target.parent().innerHeight(),siblingsHeight=0;tree.target.siblings().each(function(si,sibling){var s=$(sibling);0!==s.height()&&(siblingsHeight+=s.outerHeight(!0))}),tree.target.height(ph-siblingsHeight),tree.resetHeight()}})}}),AXGrid=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.Observer=null,this.list=[],this.removedList=[],this.pageActive=!1,this.page={pageNo:0,pageSize:100,pageCount:"",listCount:0},this.moveSens=0,this.config.viewMode="grid",this.config.moveSens=1,this.config.formPaddingRight="11px",this.config.sort=!0,this.config.colHeadTool=!0,this.config.xscroll=!0,this.config.fitToWidth=AXConfig.AXGrid.fitToWidth||!1,this.config.fitToWidthRightMargin=AXConfig.AXGrid.fitToWidthRightMargin||15,this.config.passiveMode=AXConfig.AXGrid.passiveMode,this.config.passiveRemoveHide=AXConfig.AXGrid.passiveRemoveHide,this.config.scrollContentBottomMargin="10",this.config.listCountMargin=12,this.config.headTdHeight=AXConfig.AXGrid.headTdHeight||30,this.config.mergeCells=!1,this.config.control_lock_status=0,this.selectedCells=[],this.selectedRow=[],this.copiedRow=[],this.clipBoard={type:"copy",list:[]},this.isMobile=AXUtil.browser.mobile,this.cachedDom={},this.virtualScroll={startIndex:0,endIndex:0,itemTrHeight:0,printListCount:0,scrollTop:0},this.reserveKeys={parent_hash:"phash",child_hash:"hash",sub_list:"list",hidden:"_hidden"},this.config.resizeable=!0,this.mobileContextMenu=new AXContextMenuClass,this.windowEvents=[],window.AXGrid_instances=window.AXGrid_instances||[],window.AXGrid_instances.push(this)},defineConfig:function(rewrite,_test){var cfg=this.config;if(cfg.colGroup){if(0==cfg.colGroup.length)return void console.log("colGrpup is empty)");var colWidth=0,hasHiddenCell=!1,showColLen=0;
  rewrite||(this.fixedColSeq=cfg.fixedColSeq);var bodyWidth=this.body.width();0==bodyWidth&&(bodyWidth=this.target.innerWidth());for(var CG,astricCount=0,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)void 0==CG.colSeq&&(CG.colSeq=cidx),void 0==CG.display&&(CG.display=!0),CG.display?(rewrite?CG.widthAstric&&(CG.width=0,CG._owidth=CG.width,astricCount++):("*"==CG.width&&(cfg.hasAstricCol=!0,CG.width=0,CG.widthAstric=!0,astricCount++),CG._owidth=CG.width),"undefined"==typeof CG._owidth&&(CG._owidth=CG.width),colWidth+=(CG._owidth||0).number(),showColLen+=1):(hasHiddenCell=!0,rewrite||(CG._owidth=CG.width));if(cfg.fitToWidth)for(var CG,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)CG.display&&CG.widthAstric&&(CG.width=100,CG._owidth=100,colWidth+=(CG._owidth||0).number());else if(bodyWidth-cfg.fitToWidthRightMargin>colWidth+100*astricCount)for(var CG,remainsWidth=bodyWidth-cfg.fitToWidthRightMargin-colWidth,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)CG.display&&CG.widthAstric&&(CG._owidth=(remainsWidth/astricCount).ceil(),CG.width=CG._owidth,colWidth+=(CG._owidth||0).number());else for(var CG,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)CG.display&&CG.widthAstric&&(CG._owidth=100,CG.width=100,colWidth+=(CG._owidth||0).number());if(this.colWidth=colWidth,cfg.fitToWidth)if(bodyWidth>this.colWidth){var _bodyWidth=bodyWidth-cfg.fitToWidthRightMargin,zoomRatio=bodyWidth/this.colWidth;colWidth=0;for(var CG,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)CG.display&&(CG.width=(CG._owidth*zoomRatio).ceil(),_bodyWidth>CG.width?_bodyWidth-=CG.width:CG.width=_bodyWidth,colWidth+=CG.width.number());this.colWidth=colWidth}else{colWidth=0;for(var CG,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)CG.display&&(void 0==CG._owidth&&(CG._owidth=(CG.width||0).number()),CG.width=CG._owidth.number(),colWidth+=CG.width.number());this.colWidth=colWidth}if(this.showColLen=showColLen,rewrite&&cfg.colHead.rows&&(cfg._colHead_rows=axf.copyObject(cfg.colHead.rows)),cfg.colHead||(cfg.colHead={}),cfg.body||(cfg.body={}),cfg.page||(cfg.page={display:!1,paging:!1,status:{formatter:null}}),cfg.colHead.rowsEmpty&&(cfg.colHead.rows=void 0),cfg.body.rowsEmpty&&(cfg.body.rows=void 0),cfg.colHead.rows){cfg.colHead._maps=new Array(cfg.colHead.rows.length);for(var colMaxLen=0,r=0;r<cfg.colHead.rows.length;r++){for(var CH,colLen=0,CHidx=0,__arr=cfg.colHead.rows[r];CHidx<__arr.length&&(CH=__arr[CHidx]);CHidx++)void 0!=CH.rowspan&&null!=CH.rowspan||(CH.rowspan=1),void 0==CH.colspan||null==CH.colspan?(CH.colspan=1,CH._colspan=1):rewrite?CH.colspan=CH._colspan:CH._colspan=CH.colspan,void 0!=CH.valign&&null!=CH.valign||(CH.valign="bottom"),"undefined"==typeof CH.align&&cfg.colHeadAlign&&(CH.align=cfg.colHeadAlign),colLen+=(CH.colspan||0).number();colLen>colMaxLen&&(colMaxLen=colLen)}for(var _m=0;_m<cfg.colHead._maps.length;_m++)cfg.colHead._maps[_m]=new Array(colMaxLen);for(var appendPosToColHeadMap=function(r,c,posR,position){for(var nC=position.c,startPosition=null,rr=posR;posR+r>rr;rr++){r>1&&rr>0&&null!=startPosition&&(nC=startPosition);for(var tC=c,isWhile=!0;isWhile;)try{0==tC?isWhile=!1:void 0==cfg.colHead._maps[rr][nC]?(cfg.colHead._maps[rr][nC]=position,null==startPosition&&(startPosition=nC),tC--):nC++}catch(e){isWhile=!1}}return startPosition},r=0;r<cfg.colHead.rows.length;r++)for(var CH,CHidx=0,__arr=cfg.colHead.rows[r];CHidx<__arr.length&&(CH=__arr[CHidx]);CHidx++){if(void 0!=CH.colSeq)var myCG=cfg.colGroup.getToSeq(CH.colSeq);else var myCG=cfg.colGroup.searchObject(function(){return CH.key==this.item.key}).first();null!=myCG?(CH.sort!=myCG.sort,myCG.colHeadTool="undefined"==typeof CH.colHeadTool?cfg.colHeadTool:CH.colHeadTool,rewrite?AXUtil.overwriteObject(CH,myCG,!0):AXUtil.overwriteObject(CH,myCG,!1)):AXUtil.overwriteObject(CH,{align:"left",valign:"bottom",display:!0,rowspan:1,colspan:1,colHeadTool:"undefined"==typeof CH.colHeadTool?cfg.colHeadTool:CH.colHeadTool},!1),appendPosToColHeadMap(CH.rowspan,CH.colspan,r,{r:r,c:CHidx})}for(var m,midx=0,__arr=cfg.colHead._maps.last();midx<__arr.length&&(m=__arr[midx]);midx++)m&&(cfg.colHead.rows[m.r][m.c].isLastCell=!0);if(hasHiddenCell)for(var CG,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)if(!CG.display)for(var rowPosition=null,a=0;a<cfg.colHead._maps.length;a++)rowPosition!=cfg.colHead._maps[a][cidx]&&(rowPosition=cfg.colHead._maps[a][cidx],cfg.colHead.rows[rowPosition.r][rowPosition.c].colspan--)}else{cfg.colHead._maps=[[]];for(var CG,colHeadRows=[[]],cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++){var adder={key:CG.key,colSeq:CG.colSeq,label:CG.label,align:cfg.colHeadAlign||CG.align||"left",rowspan:1,colspan:1,valign:"bottom",isLastCell:!0,display:CG.display,formatter:CG.formatter,formatterLabel:CG.formatterLabel,checked:CG.checked,disabled:CG.disabled,sort:CG.sort,colHeadTool:"undefined"==typeof CG.colHeadTool?cfg.colHeadTool:CG.colHeadTool,tooltip:CG.tooltip,displayLabel:CG.displayLabel||!1,addClass:CG.addClass};cfg._colHead_rows&&(adder.sort=cfg._colHead_rows[0][cidx].sort),colHeadRows[0].push(adder),cfg.colHead._maps[0].push({r:0,c:cidx})}cfg.colHead.rows=colHeadRows,cfg.colHead.rowsEmpty=!0}for(var mr=0,mrl=cfg.colHead._maps.length;mrl>mr;mr++){var map_p=cfg.colHead._maps[mr].last();cfg.colHead.rows[map_p.r][map_p.c].isTrLastChild=!0}if(cfg.body.rows){cfg.body._maps=new Array(cfg.body.rows.length);for(var colMaxLen=0,r=0;r<cfg.body.rows.length;r++){for(var CH,colLen=0,CHidx=0,__arr=cfg.body.rows[r];CHidx<__arr.length&&(CH=__arr[CHidx]);CHidx++)void 0==CH.colspan||null==CH.colspan?(CH.colspan=1,CH._colspan=1):rewrite?CH.colspan=CH._colspan:CH._colspan=CH.colspan,void 0!=CH.rowspan&&null!=CH.rowspan||(CH.rowspan=1),void 0!=CH.valign&&null!=CH.valign||(CH.valign="middle"),colLen+=CH.colspan.number();colLen>colMaxLen&&(colMaxLen=colLen)}for(var _m=0;_m<cfg.body._maps.length;_m++)cfg.body._maps[_m]=new Array(colMaxLen);for(var appendPosToBodyMap=function(r,c,posR,position){for(var nC=position.c,startPosition=null,rr=posR;posR+r>rr;rr++){r>1&&rr>0&&null!=startPosition&&(nC=startPosition);for(var tC=c,isWhile=!0;isWhile;)try{0==tC?isWhile=!1:void 0==cfg.body._maps[rr][nC]?(rr!=posR&&(position._isRowMerged=!0),cfg.body._maps[rr][nC]=position,null==startPosition&&(startPosition=nC),tC--):nC++}catch(e){isWhile=!1}}},r=0;r<cfg.body.rows.length;r++)for(var CH,CHidx=0,__arr=cfg.body.rows[r];CHidx<__arr.length&&(CH=__arr[CHidx]);CHidx++){if(void 0!=CH.colSeq)var myCG=cfg.colGroup.getToSeq(CH.colSeq);else var myCG=cfg.colGroup.searchObject(function(){return this.item.key==CH.key}).first();null!=myCG?AXUtil.overwriteObject(CH,myCG,!1):AXUtil.overwriteObject(CH,{align:"left",valign:"bottom",display:!0,rowspan:1,colspan:1},!1),appendPosToBodyMap(CH.rowspan,CH.colspan,r,{r:r,c:CHidx})}for(var m,midx=0,__arr=cfg.body._maps.last();midx<__arr.length&&(m=__arr[midx]);midx++)m&&(cfg.body.rows[m.r][m.c].isLastCell=!0);if(hasHiddenCell)for(var CG,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)if(!CG.display)for(var a=0;a<cfg.body._maps.length;a++){var rowPosition=cfg.body._maps[a][cidx];cfg.body.rows[rowPosition.r][rowPosition.c].colspan--}}else{cfg.body._maps=[[]];for(var CG,bodyRows=[[]],cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++){var adder={key:CG.key,colSeq:CG.colSeq,label:CG.label,align:CG.align||"left",rowspan:1,colspan:1,valign:CG.valign||"middle",isLastCell:!0,display:CG.display,checked:CG.checked,disabled:CG.disabled,formatter:CG.formatter,editor:CG.editor,formatterLabel:CG.formatterLabel,tooltip:CG.tooltip,addClass:CG.addClass};bodyRows[0].push(adder),cfg.body._maps[0].push({r:0,c:cidx})}cfg.body.rows=bodyRows,cfg.body.rowsEmpty=!0}if(cfg.body.marker){cfg.body.marker=[].concat(cfg.body.marker);for(var marker,appendPosToMarkerMap=function(r,c,posR,position,marker){for(var nC=position.c,startPosition=null,rr=posR;posR+r>rr;rr++){r>1&&rr>0&&null!=startPosition&&(nC=startPosition);for(var tC=c,isWhile=!0;isWhile;)try{0==tC?isWhile=!1:void 0==marker._maps[rr][nC]?(marker._maps[rr][nC]=position,null==startPosition&&(startPosition=nC),tC--):nC++}catch(e){isWhile=!1}}},m=0,l=cfg.body.marker.length;l>m;m++)if(marker=cfg.body.marker[m],marker.rows){this.bodyHasMarker=!0,marker._maps=new Array(marker.rows.length),colMaxLen=0;for(var r=0;r<marker.rows.length;r++){for(var CH,colLen=0,CHidx=0,__arr=marker.rows[r];CHidx<__arr.length&&(CH=__arr[CHidx]);CHidx++)void 0!=CH.rowspan&&null!=CH.rowspan||(CH.rowspan=1),void 0==CH.colspan||null==CH.colspan?(CH.colspan=1,CH._colspan=1):rewrite?CH.colspan=CH._colspan:CH._colspan=CH.colspan,void 0!=CH.valign&&null!=CH.valign||(CH.valign="bottom"),colLen+=CH.colspan.number();colLen>colMaxLen&&(colMaxLen=colLen)}for(var _m=0;_m<marker._maps.length;_m++)marker._maps[_m]=new Array(colMaxLen);for(var r=0;r<marker.rows.length;r++)for(var CH,CHidx=0,__arr=marker.rows[r];CHidx<__arr.length&&(CH=__arr[CHidx]);CHidx++){if(void 0!=CH.colSeq)var myCG=cfg.colGroup.getToSeq(CH.colSeq);else var myCG=cfg.colGroup.searchObject(function(){return this.item.key==CH.key}).first();null!=myCG?AXUtil.overwriteObject(CH,myCG,!1):AXUtil.overwriteObject(CH,{align:"left",valign:"bottom",display:!0,rowspan:1,colspan:1},!1),appendPosToMarkerMap(CH.rowspan,CH.colspan,r,{r:r,c:CHidx},marker)}for(var rm,midx=0,__arr=marker._maps.last();midx<__arr.length&&(rm=__arr[midx]);midx++)rm&&(marker.rows[rm.r][rm.c].isLastCell=!0);if(hasHiddenCell)for(var CG,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)if(!CG.display)for(var a=0;a<marker._maps.length;a++){var rowPosition=marker._maps[a][cidx];marker.rows[rowPosition.r][rowPosition.c].colspan--}}}if(cfg.head){cfg.head._maps=new Array(cfg.head.rows.length),colMaxLen=0;for(var r=0;r<cfg.head.rows.length;r++){for(var CH,colLen=0,CHidx=0,__arr=cfg.head.rows[r];CHidx<__arr.length&&(CH=__arr[CHidx]);CHidx++)void 0!=CH.rowspan&&null!=CH.rowspan||(CH.rowspan=1),void 0==CH.colspan||null==CH.colspan?(CH.colspan=1,CH._colspan=1):rewrite?CH.colspan=CH._colspan:CH._colspan=CH.colspan,void 0!=CH.valign&&null!=CH.valign||(CH.valign="bottom"),colLen+=CH.colspan.number();colLen>colMaxLen&&(colMaxLen=colLen)}for(var _m=0;_m<cfg.head._maps.length;_m++)cfg.head._maps[_m]=new Array(colMaxLen);for(var appendPosToHeadMap=function(r,c,posR,position){for(var nC=position.c,startPosition=null,rr=posR;posR+r>rr;rr++){r>1&&rr>0&&null!=startPosition&&(nC=startPosition);for(var tC=c,isWhile=!0;isWhile;)try{0==tC?isWhile=!1:void 0==cfg.head._maps[rr][nC]?(cfg.head._maps[rr][nC]=position,null==startPosition&&(startPosition=nC),tC--):nC++}catch(e){isWhile=!1}}},r=0;r<cfg.head.rows.length;r++)for(var CH,CHidx=0,__arr=cfg.head.rows[r];CHidx<__arr.length&&(CH=__arr[CHidx]);CHidx++){if(void 0!=CH.colSeq)var myCG=cfg.colGroup.getToSeq(CH.colSeq);else var myCG=cfg.colGroup.searchObject(function(){return this.item.key==CH.key}).first();null!=myCG?AXUtil.overwriteObject(CH,myCG,!1):AXUtil.overwriteObject(CH,{align:"left",valign:"bottom",display:!0,rowspan:1,colspan:1},!1),appendPosToHeadMap(CH.rowspan,CH.colspan,r,{r:r,c:CHidx})}for(var m,midx=0,__arr=cfg.head._maps.last();midx<__arr.length&&(m=__arr[midx]);midx++)m&&(cfg.head.rows[m.r][m.c].isLastCell=!0);if(hasHiddenCell)for(var CG,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)if(!CG.display)for(var a=0;a<cfg.head._maps.length;a++){var rowPosition=cfg.head._maps[a][cidx];cfg.head.rows[rowPosition.r][rowPosition.c].colspan--}}if(cfg.foot){cfg.foot._maps=new Array(cfg.foot.rows.length),colMaxLen=0;for(var r=0;r<cfg.foot.rows.length;r++){for(var CH,colLen=0,CHidx=0,__arr=cfg.foot.rows[r];CHidx<__arr.length&&(CH=__arr[CHidx]);CHidx++)void 0!=CH.rowspan&&null!=CH.rowspan||(CH.rowspan=1),void 0==CH.colspan||null==CH.colspan?(CH.colspan=1,CH._colspan=1):rewrite?CH.colspan=CH._colspan:CH._colspan=CH.colspan,void 0!=CH.valign&&null!=CH.valign||(CH.valign="bottom"),colLen+=CH.colspan.number();colLen>colMaxLen&&(colMaxLen=colLen)}for(var _m=0;_m<cfg.foot._maps.length;_m++)cfg.foot._maps[_m]=new Array(colMaxLen);for(var appendPosToFootMap=function(r,c,posR,position){for(var nC=position.c,startPosition=null,rr=posR;posR+r>rr;rr++){r>1&&rr>0&&null!=startPosition&&(nC=startPosition);for(var tC=c,isWhile=!0;isWhile;)try{0==tC?isWhile=!1:void 0==cfg.foot._maps[rr][nC]?(cfg.foot._maps[rr][nC]=position,null==startPosition&&(startPosition=nC),tC--):nC++}catch(e){isWhile=!1}}},r=0;r<cfg.foot.rows.length;r++)for(var CH,CHidx=0,__arr=cfg.foot.rows[r];CHidx<__arr.length&&(CH=__arr[CHidx]);CHidx++){if(void 0!=CH.colSeq)var myCG=cfg.colGroup.getToSeq(CH.colSeq);else var myCG=cfg.colGroup.searchObject(function(){return this.item.key==CH.key}).first();null!=myCG?AXUtil.overwriteObject(CH,myCG,!1):AXUtil.overwriteObject(CH,{align:"left",valign:"bottom",display:!0,rowspan:1,colspan:1},!1),appendPosToFootMap(CH.rowspan||1,CH.colspan||1,r,{r:r,c:CHidx})}for(var m,midx=0,__arr=cfg.foot._maps.last();midx<__arr.length&&(m=__arr[midx]);midx++)m&&(cfg.foot.rows[m.r][m.c].isLastCell=!0);if(hasHiddenCell)for(var CG,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)if(!CG.display)for(var a=0;a<cfg.foot._maps.length;a++){var rowPosition=cfg.foot._maps[a][cidx];cfg.foot.rows[rowPosition.r][rowPosition.c].colspan--}}if(cfg.editor&&cfg.editor.rows){this.hasEditor=!0,cfg.editor._maps=new Array(cfg.editor.rows.length),colMaxLen=0;for(var r=0;r<cfg.editor.rows.length;r++){for(var CH,colLen=0,CHidx=0,__arr=cfg.editor.rows[r];CHidx<__arr.length&&(CH=__arr[CHidx]);CHidx++)CH&&(void 0!=CH.rowspan&&null!=CH.rowspan||(CH.rowspan=1),void 0==CH.colspan||null==CH.colspan?(CH.colspan=1,CH._colspan=1):rewrite?CH.colspan=CH._colspan:CH._colspan=CH.colspan,void 0!=CH.valign&&null!=CH.valign||(CH.valign="bottom"),colLen+=CH.colspan.number());colLen>colMaxLen&&(colMaxLen=colLen)}for(var _m=0;_m<cfg.editor._maps.length;_m++)cfg.editor._maps[_m]=new Array(colMaxLen);for(var appendPosToEditorMap=function(r,c,posR,position){for(var nC=position.c,startPosition=null,rr=posR;posR+r>rr;rr++)for(var tC=c,isWhile=!0;isWhile;)try{0==tC?isWhile=!1:void 0==cfg.editor._maps[rr][nC]?(cfg.editor._maps[rr][nC]=position,null==startPosition&&(startPosition=nC),tC--):nC++}catch(e){isWhile=!1}},r=0;r<cfg.editor.rows.length;r++)for(var CH,CHidx=0,__arr=cfg.editor.rows[r];CHidx<__arr.length&&(CH=__arr[CHidx]);CHidx++)if(CH){if(void 0!=CH.colSeq)var myCG=cfg.colGroup.getToSeq(CH.colSeq);else var myCG=cfg.colGroup.searchObject(function(){return this.item.key==CH.key}).first();null!=myCG?AXUtil.overwriteObject(CH,myCG,!1):AXUtil.overwriteObject(CH,{align:"left",valign:"bottom",display:!0,rowspan:1,colspan:1},!1),appendPosToEditorMap(CH.rowspan,CH.colspan,r,{r:r,c:CHidx})}for(var m,midx=0,__arr=cfg.editor._maps.last();midx<__arr.length&&(m=__arr[midx]);midx++)m&&(cfg.editor.rows[m.r][m.c].isLastCell=!0);if(hasHiddenCell)for(var CG,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)if(!CG.display)for(var a=0;a<cfg.editor._maps.length;a++){var rowPosition=cfg.editor._maps[a][cidx];cfg.editor.rows[rowPosition.r][rowPosition.c].colspan--}}if(void 0!=cfg.fixedColSeq&&null!=cfg.fixedColSeq){for(var m,fixedColSeq=this.fixedColSeq,midx=0,__arr=cfg.colHead._maps;midx<__arr.length&&(m=__arr[midx]);midx++)for(var c,cidx=0,__arr2=m;cidx<__arr2.length&&(c=__arr2[cidx]);cidx++)c&&fixedColSeq+1>cidx&&(cfg.colHead.rows[c.r][c.c].isFixedCell=!0);for(var m,midx=0,__arr=cfg.body._maps;midx<__arr.length&&(m=__arr[midx]);midx++)for(var c,cidx=0,__arr2=m;cidx<__arr2.length&&(c=__arr2[cidx]);cidx++)c&&(fixedColSeq==cidx&&(cfg.body.rows[c.r][c.c].isFixedEndCell=!0),fixedColSeq+1>cidx&&(cfg.body.rows[c.r][c.c].isFixedCell=!0));if(cfg.head)for(var m,midx=0,__arr=cfg.head._maps;midx<__arr.length&&(m=__arr[midx]);midx++)for(var c,cidx=0,__arr2=m;cidx<__arr2.length&&(c=__arr2[cidx]);cidx++)c&&(fixedColSeq==cidx&&(cfg.head.rows[c.r][c.c].isFixedEndCell=!0),fixedColSeq+1>cidx&&(cfg.head.rows[c.r][c.c].isFixedCell=!0));if(cfg.foot)for(var m,midx=0,__arr=cfg.foot._maps;midx<__arr.length&&(m=__arr[midx]);midx++)for(var c,cidx=0,__arr2=m;cidx<__arr2.length&&(c=__arr2[cidx]);cidx++)c&&(fixedColSeq==cidx&&(cfg.foot.rows[c.r][c.c].isFixedEndCell=!0),fixedColSeq+1>cidx&&(cfg.foot.rows[c.r][c.c].isFixedCell=!0));if(cfg.body.marker&&cfg.body.marker.rows)for(var m,midx=0,__arr=cfg.body.marker._maps;midx<__arr.length&&(m=__arr[midx]);midx++)for(var c,cidx=0,__arr2=m;cidx<__arr2.length&&(c=__arr2[cidx]);cidx++)c&&(fixedColSeq==cidx&&(cfg.body.marker.rows[c.r][c.c].isFixedEndCell=!0),fixedColSeq+1>cidx&&(cfg.body.marker.rows[c.r][c.c].isFixedCell=!0));if(cfg.editor&&cfg.editor.rows)for(var m,midx=0,__arr=cfg.editor._maps;midx<__arr.length&&(m=__arr[midx]);midx++)for(var c,cidx=0,__arr2=m;cidx<__arr2.length&&(c=__arr2[cidx]);cidx++)c&&(fixedColSeq==cidx&&(cfg.editor.rows[c.r][c.c].isFixedEndCell=!0),fixedColSeq+1>cidx&&(cfg.editor.rows[c.r][c.c].isFixedCell=!0));if(this.hasFixed=!0,hasHiddenCell){for(var CG,minusFixedCol=0,fixedColSeq=this.fixedColSeq,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)CG.display||fixedColSeq+1>cidx&&minusFixedCol++;cfg.fixedColSeq=this.fixedColSeq-minusFixedCol}else cfg.fixedColSeq=this.fixedColSeq;-1==cfg.fixedColSeq&&(this.hasFixed=!1);for(var CG,fixedColSeq=this.fixedColSeq,fixedColWidth=0,fixedColLen=0,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)CG.display&&fixedColSeq+1>cidx&&(fixedColWidth+=CG.width.number(),fixedColLen++);this.showFixedColLen=fixedColLen,this.fixedColWidth=fixedColWidth}for(var ri=cfg.body.rows.length;ri--;)for(var ii=cfg.body.rows[ri].length;ii--;)if(cfg.body.rows[ri][ii].display){cfg.body.rows[ri][ii].isTdEnd=!0;break}if(cfg.editor)for(ri=cfg.editor.rows.length;ri--;)for(var ii=cfg.editor.rows[ri].length;ii--;)if(cfg.editor.rows[ri][ii].display){cfg.editor.rows[ri][ii].isTdEnd=!0;break}if(cfg.foot)for(ri=cfg.foot.rows.length;ri--;)for(var ii=cfg.foot.rows[ri].length;ii--;)if(cfg.foot.rows[ri][ii].display){cfg.foot.rows[ri][ii].isTdEnd=!0;break}if(cfg.head)for(ri=cfg.head.rows.length;ri--;)for(var ii=cfg.head.rows[ri].length;ii--;)if(cfg.head.rows[ri][ii].display){cfg.head.rows[ri][ii].isTdEnd=!0;break}if(cfg.body.marker&&cfg.body.marker.rows)for(ri=cfg.body.marker.rows.length;ri--;)for(var ii=cfg.body.marker.rows[ri].length;ii--;)if(cfg.body.marker.rows[ri][ii].display){cfg.body.marker.rows[ri][ii].isTdEnd=!0;break}}},init:function(){var cfg=this.config;if(Object.isUndefined(cfg.targetID))return void console.log("need targetID - setConfig({targetID:''})");if(!cfg.colGroup)return void console.log("need colGroup - setConfig({colGroup:[]})");if(this.config.reserveKeys=Object.extend(this.reserveKeys,cfg.reserveKeys,!0),"undefined"==typeof cfg.colHeadAlign&&(cfg.colHeadAlign=AXConfig.AXGrid.colHeadAlign),cfg.emptyListMSG=cfg.emptyListMSG||AXConfig.AXGrid.emptyListMSG,cfg.listCountMSG=cfg.listCountMSG||AXConfig.AXGrid.listCountMSG||"전체 <b>{listCount}</b>개의 목록이 있습니다.",cfg.pageCountMSG=cfg.pageCountMSG||AXConfig.AXGrid.pageCountMSG,cfg.mediaQuery){var _viewMode="",clientWidth=axf.clientWidth();axf.each(cfg.mediaQuery,function(k,v){if(Object.isObject(v))if(void 0!=v.min&&void 0!=v.max){if(v.min<=clientWidth&&clientWidth<=v.max)return _viewMode="dx"==k?"grid":"mobile",!1}else if(v.min<=clientWidth)return _viewMode="dx"==k?"grid":"mobile",!1}),""!=_viewMode&&(cfg.viewMode=_viewMode)}if(Object.isObject(cfg.colGroup)){var newColGroup=cfg.colGroup.concat();cfg.colGroup=newColGroup}this.target=axdom("#"+cfg.targetID);var targetInnerHeight=this.target.innerHeight();0==targetInnerHeight&&(targetInnerHeight=AXConfig.AXGrid.pageHeight.number()||400),this.theme=cfg.theme?cfg.theme:"AXGrid",cfg.__height=cfg.height,cfg.height=cfg.height?cfg.height:targetInnerHeight.number()+"px";var theme=this.theme,gridCss=[];gridCss.push("overflow:hidden;"),cfg.width&&gridCss.push("width:"+cfg.width+";"),cfg.height&&gridCss.push("height:"+cfg.height+";");var ol=[];ol.push('<div class="'+theme+'" id="'+cfg.targetID+'_AX_grid" style="'+gridCss.join("")+'">'),ol.push('	<div class="AXgridScrollBody" id="'+cfg.targetID+'_AX_gridScrollBody" style="z-index:2;">'),ol.push('		<div class="AXGridColHead AXUserSelectNone" id="'+cfg.targetID+'_AX_gridColHead" onselectstart="return false;"></div>'),ol.push('		<div class="AXGridToolGroup top" id="'+cfg.targetID+'_AX_gridToolGroupTop"></div>'),ol.push('		<div class="AXGridBody" id="'+cfg.targetID+'_AX_gridBody"></div>'),ol.push('		<div class="AXGridToolGroup bottom" id="'+cfg.targetID+'_AX_gridToolGroupBottom"></div>'),ol.push('<div id="'+cfg.targetID+'_AX_scrollTrackY" class="gridScrollTrackY">'),ol.push('<div id="'+cfg.targetID+'_AX_scrollYHandle" class="gridScrollHandle"></div>'),ol.push('<div id="'+cfg.targetID+'_AX_scrollY_AX_tip" class="gridScroll-tip"><span></span></div>'),ol.push("</div>"),ol.push('<div id="'+cfg.targetID+'_AX_scrollTrackX" class="gridScrollTrackX"><div id="'+cfg.targetID+'_AX_scrollXHandle" class="gridScrollHandle"></div></div>'),ol.push("	</div>"),ol.push('   <div class="AXgridEditor" id="'+cfg.targetID+'_AX_gridEditor" style="z-index:2;"></div>'),ol.push('	<div class="AXgridPageBody" id="'+cfg.targetID+'_AX_gridPageBody" style="z-index:1;">'),ol.push('		<div class="AXgridPagingUnit" id="'+cfg.targetID+'_AX_gridPagingUnit">'),ol.push('			<a class="AXgridPagingPrev">PREV</a>'),ol.push('			<div class="AXgridPageNumber"><select id="'+cfg.targetID+'_AX_gridPageNo" class="AXgridPageNo"><option value="">&nbsp;&nbsp;</option></select></div>'),ol.push('			<div class="AXgridPageNumberCount" id="'+cfg.targetID+'_AX_gridPageCount">/ ...</div>'),ol.push('			<a class="AXgridPagingNext">NEXT</a>'),ol.push("		</div>"),ol.push('		<div class="AXgridStatus" id="'+cfg.targetID+'_AX_gridStatus">'),ol.push("		"+cfg.listCountMSG.replace("{listCount}","0")),ol.push("		</div>"),ol.push("	</div>"),ol.push("</div>"),this.target.html(ol.join("")),this.gridBody=axdom("#"+cfg.targetID+"_AX_grid"),this.scrollBody=axdom("#"+cfg.targetID+"_AX_gridScrollBody"),this.colHead=axdom("#"+cfg.targetID+"_AX_gridColHead"),this.body=axdom("#"+cfg.targetID+"_AX_gridBody"),this.scrollTrackY=axdom("#"+cfg.targetID+"_AX_scrollTrackY"),this.scrollYHandle=axdom("#"+cfg.targetID+"_AX_scrollYHandle"),this.scrollYTip=axdom("#"+cfg.targetID+"_AX_scrollY_AX_tip"),this.scrollYTipSpan=axdom("#"+cfg.targetID+"_AX_scrollY_AX_tip").find("span"),this.scrollTrackX=axdom("#"+cfg.targetID+"_AX_scrollTrackX"),this.scrollXHandle=axdom("#"+cfg.targetID+"_AX_scrollXHandle"),this.editor=axdom("#"+cfg.targetID+"_AX_gridEditor"),this.pageBody=axdom("#"+cfg.targetID+"_AX_gridPageBody"),this.pageBody.data("display","show"),this.pagingUnit=axdom("#"+cfg.targetID+"_AX_gridPagingUnit"),this.status=axdom("#"+cfg.targetID+"_AX_gridStatus"),this.defineConfig(),cfg.page&&(this.page.pageNo=cfg.page.pageNo||1,this.page.pageSize=cfg.page.pageSize||AXConfig.AXGrid.pageSize||100,this.page.onchange=cfg.page.onchange||this.page.onChange),this.setColHead(),this.setBody(),this.editor.hide(),this.gridTargetSetSize(),this.contentScrollResize();var contentScrollTouchstart=this.contentScrollTouchstart.bind(this);this.contentScrollTouchstartBind=function(event){contentScrollTouchstart(event)};var mousewheelevt=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";document.attachEvent?axf.getId(cfg.targetID+"_AX_gridBody")&&axf.getId(cfg.targetID+"_AX_gridBody").attachEvent("on"+mousewheelevt,function(e){this.contentScrollScrollWheel(e||window.event)}.bind(this)):document.addEventListener&&axf.getId(cfg.targetID+"_AX_gridBody")&&axf.getId(cfg.targetID+"_AX_gridBody").addEventListener(mousewheelevt,function(e){this.contentScrollScrollWheel(e||window.event)}.bind(this),!1),document.addEventListener&&axf.getId(cfg.targetID+"_AX_gridBody")&&axf.getId(cfg.targetID+"_AX_gridBody").addEventListener("touchstart",contentScrollTouchstart,!1),this.target.bind("click.axgrid",function(e){if(!this.editorOpend&&!this.inline_edit){var e=e||window.event;"INPUT"==e.target.tagName||"SELECT"==e.target.tagName||"TEXTAREA"==e.target.tagName||"BUTTON"==e.target.tagName}}.bind(this)),cfg.contextMenu&&(AXContextMenu.bind({id:cfg.targetID+"ContextMenu",theme:cfg.contextMenu.theme,width:cfg.contextMenu.width,menu:cfg.contextMenu.menu}),this.target.bind("contextmenu",this.onContextmenu.bind(this)));var goPageMove=this.goPageMove.bind(this);this.pagingUnit.find(".AXgridPagingPrev").bind("click",function(event){goPageMove(-1)}),this.pagingUnit.find(".AXgridPagingNext").bind("click",function(event){goPageMove(1)});var windowResizeApplyEvent=this.windowResizeApply.bind(this);this.windowEvents.push({event:"resize",fn:windowResizeApplyEvent}),axdom(window).bind("resize",windowResizeApplyEvent)},windowResize:function(){var windowResizeApply=this.windowResizeApply.bind(this);this.windowResizeObserver&&clearTimeout(this.windowResizeObserver),this.windowResizeObserver=setTimeout(function(){windowResizeApply()},100)},windowResizeApply:function(){var cfg=this.config;if(this.config.resizeable!==!1){if(cfg.mediaQuery){var _viewMode="",clientWidth=axf.clientWidth();axf.each(cfg.mediaQuery,function(k,v){if(Object.isObject(v))if(void 0!=v.min&&void 0!=v.max){if(v.min<=clientWidth&&clientWidth<=v.max)return _viewMode="dx"==k?"grid":"mobile",!1}else if(v.min<=clientWidth)return _viewMode="dx"==k?"grid":"mobile",!1}),""!=_viewMode&&(cfg.viewMode=_viewMode)}this.redrawGrid(!0)}},gridTargetSetSize:function(react){var cfg=this.config;if("mobile"==cfg.viewMode)this.target.css({height:"auto","max-height":"auto"}),this.gridBody.addClass("AXGridMobile"),this.gridBody.css({height:"auto"}),this.scrollBody.css({height:"auto"}),this.body.css({top:"auto",height:"auto"}),this.pageBody.hide(),this.setPaging();else{if(cfg.page?0==cfg.page.display?(this.pageBody.hide(),this.pageBody.data("display","hide")):(this.pageBody.show(),this.pageBody.data("display","show"),cfg.page.paging?this.setPaging():this.pagingUnit.hide(),0==cfg.page.status&&this.status.hide()):(this.pageBody.hide(),this.pageBody.data("display","hide")),this.gridBody.removeClass("AXGridMobile"),"auto"==cfg.__height){var colHeadHeight=this.colHead.outerHeight();1==colHeadHeight&&(colHeadHeight=0);var scrollBodyHeight=this.scrollContent.height();this.scrollBody.css({height:scrollBodyHeight+colHeadHeight}),this.body.css({top:colHeadHeight,height:scrollBodyHeight}),this.gridBody.css({height:"auto"}),this.target.css({height:"auto","max-height":"auto"})}else{cfg.height&&this.gridBody.css({height:cfg.height});var pageBodyHeight="show"==this.pageBody.data("display")?this.pageBody.outerHeight():0;cfg.foot?this.gridFoot.outerHeight():0;0==cfg.page.display&&(pageBodyHeight=0);var scrollBodyHeight=cfg.height.number()-pageBodyHeight-2;this.scrollBody.css({height:scrollBodyHeight});var colHeadHeight=this.colHead.outerHeight();1==colHeadHeight&&(colHeadHeight=0),this.body.css({top:colHeadHeight,height:scrollBodyHeight-colHeadHeight})}react&&this.contentScrollResize(!1)}},resetHeight:function(){var cfg=this.config,target=axdom("#"+cfg.targetID);if("mobile"!=cfg.viewMode){var targetInnerHeight=target.innerHeight();0==targetInnerHeight&&(targetInnerHeight=400),cfg.height=targetInnerHeight+"px",cfg.height&&this.gridBody&&this.gridBody.css({height:cfg.height}),this.colHead&&(this.redrawGrid(),this.onevent_grid({type:"resetHeight"}))}},setHeight:function(height){var cfg=this.config,target=axdom("#"+cfg.targetID);return"mobile"!=cfg.viewMode&&"number"==typeof height&&(target.css({height:height}),this.resetHeight()),target},getColGroup:function(suffix){var cfg=this.config,fixedColSeq=this.fixedColSeq,po=[];if(po.push("<colgroup>"),"FC"!=suffix&&"FB"!=suffix&&"FE"!=suffix){for(var CG,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)CG.display&&po.push('<col width="'+CG.width+'" style="" id="'+cfg.targetID+"_AX_col_AX_"+CG.colSeq+"_AX_"+suffix+'" />');"CB"==suffix&&po.push("<col />")}else for(var CG,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)CG.display&&fixedColSeq+1>cidx&&po.push('<col width="'+CG.width+'" style="" id="'+cfg.targetID+"_AX_col_AX_"+CG.colSeq+"_AX_"+suffix+'" />');return po.push("</colgroup>"),po.join("")},getColSeqToHead:function(r,c){for(var cfg=this.config,colSeq=null,a=cfg.colHead._maps[r].length-1;a>-1;a--)if(cfg.colHead._maps[r][a].r==r&&cfg.colHead._maps[r][a].c==c){colSeq=a;break}return colSeq},redrawGrid:function(changeGridView){var cfg=this.config;changeGridView&&("grid"==cfg.viewMode?(this.pageBody.show(),this.pageBody.data("display","show")):"icon"==cfg.viewMode?(this.pageBody.show(),this.pageBody.data("display","show")):"mobile"==cfg.viewMode&&(this.scrollTrackX.hide(),this.scrollTrackY.hide(),this.pageBody.hide(),this.pageBody.data("display","hide"))),"undefined"==typeof changeGridView||changeGridView?(this.defineConfig(!0),this.setColHead(),this.gridTargetSetSize(!0),this.setBody(void 0,!0),"grid"==cfg.viewMode&&(cfg.head&&this.printHead(),cfg.foot&&(this.printFoot(),this.contentScrollResize(!1)))):this.contentScrollResize()},checkedColSeq:function(colSeq,checked,itemIndex){var sendObj,cfg=this.config,_this=this,_list=this.list;if("undefined"==typeof itemIndex){this.colHead.find(".gridCheckBox_colHead_colSeq"+colSeq).each(function(){this.checked=checked}),axdom("#"+cfg.targetID+"_AX_fixedColHead").find(".gridCheckBox_colHead_colSeq"+colSeq).each(function(){this.checked=checked}),this.body.find(".gridCheckBox_body_colSeq"+colSeq).each(function(){"disabled"!=axdom("#"+this.id).attr("disabled")&&(this.checked=checked)});for(var item,itemIndex=0,__arr=this.list;itemIndex<__arr.length&&(item=__arr[itemIndex]);itemIndex++){"undefined"==typeof item.___disabled&&(item.___disabled={}),"undefined"==typeof item.___checked&&(item.___checked={});var disabled=!1;cfg.colGroup[colSeq].disabled&&(disabled=cfg.colGroup[colSeq].disabled.call({index:itemIndex,list:this.list,item:item,page:this.page,key:cfg.colGroup[colSeq].key,value:item[cfg.colGroup[colSeq].key]})),disabled||(item.___checked[colSeq]=checked)}cfg.colGroup[colSeq].oncheck&&(sendObj={index:colSeq,list:_list},setTimeout(function(){cfg.colGroup[colSeq].oncheck.call(sendObj,checked)},1)),cfg.body.oncheck&&(sendObj={index:itemIndex,checked:checked,r:0,c:colSeq,list:this.list,page:this.page},cfg.body.oncheck.call(sendObj))}else{if("radio"===cfg.colGroup[colSeq].formatter)for(var ii=0,ll=this.list.length;ll>ii;ii++)"undefined"==typeof _this.list[ii].___checked&&(_this.list[ii].___checked={}),_this.list[ii].___checked[colSeq]=!1;this.body.find(".gridBodyTr_"+itemIndex+" .gridCheckBox_body_colSeq"+colSeq).each(function(){null==checked?this.checked=!this.checked:this.checked=checked});var item=this.list[itemIndex];"undefined"==typeof item.___disabled&&(item.___disabled={}),"undefined"==typeof item.___checked&&(item.___checked={}),null==checked?"radio"===cfg.colGroup[colSeq].formatter?item.___checked[colSeq]=!0:item.___checked[colSeq]=!(1==item.___checked[colSeq]):item.___checked[colSeq]=checked,cfg.colGroup[colSeq].oncheck&&(sendObj={index:checkboxIndex,list:_list},cfg.colGroup[colSeq].oncheck.call(sendObj,checked)),cfg.body.oncheck&&(sendObj={index:itemIndex,checked:checked,r:0,c:colSeq,list:this.list,item:item,page:this.page},cfg.body.oncheck.call(sendObj,itemIndex,item))}return this},getCheckedList:function(colSeq){for(var item,collect=(this.config,[]),itemIndex=(this.list,0),__arr=this.list;itemIndex<__arr.length&&(item=__arr[itemIndex]);itemIndex++)item.___disabled||(item.___disabled={}),item.___checked||(item.___checked={}),1!=item.___disabled[colSeq]&&1==item.___checked[colSeq]&&collect.push(item);return collect},getCheckedListWithIndex:function(colSeq){for(var item,collect=(this.config,[]),itemIndex=(this.list,0),__arr=this.list;itemIndex<__arr.length&&(item=__arr[itemIndex]);itemIndex++)item.___disabled||(item.___disabled={}),item.___checked||(item.___checked={}),1!=item.___disabled[colSeq]&&1==item.___checked[colSeq]&&collect.push({
  index:itemIndex,item:item});return collect},onKeydown:function(event){if(0==this.selectedRow.length)return this;if(this.editorOpend)return this;if(this.inline_edit)return this;if("true"===axdom(document.body).data("masked"))return this;if(event.target){if("INPUT"==event.target.tagName||"TEXTAREA"==event.target.tagName||"SELECT"==event.target.tagName||"BUTTON"==event.target.tagName)return this;if(event.target.id!=this.config.targetID+"_AX_grid_focus"&&"A"==event.target.tagName)return this}var li,c,cfg=this.config;this.body;67==event.keyCode&&event.ctrlKey,event.keyCode==axf.Event.KEY_ESC?this.selectClear():event.keyCode==axf.Event.KEY_RETURN?(li=this.selectedRow.first(),c=this.selectedCells.first(),cfg.colGroup[c].editor&&cfg.control_lock_status<1&&(this.editCell(0,c,li),this.stopEvent(event))):65==event.keyCode&&(event.ctrlKey||event.metaKey)||(event.ctrlKey||event.metaKey||event.shiftKey||event.altKey?event.shiftKey&&(event.keyCode==axf.Event.KEY_UP||event.keyCode==axf.Event.KEY_DOWN):event.keyCode==axf.Event.KEY_UP?this.focusMove(-1,event):event.keyCode==axf.Event.KEY_DOWN?this.focusMove(1,event):event.keyCode==axf.Event.KEY_LEFT?this.focusMove("L",event):event.keyCode==axf.Event.KEY_RIGHT&&this.focusMove("R",event))},onContextmenu:function(event){var cfg=this.config,body=this.body;if(this.readyMoved)return!1;var eid=event.target.id.split(/_AX_/g),eventTarget=event.target;if("input"!=eventTarget.tagName.toLowerCase()){var myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,until:function(evt,evtIDs){return!!axdom(evt.parentNode).hasClass("gridBodyTr")},find:function(evt,evtIDs){return!(!axdom(evt).hasClass("bodyTd")&&!axdom(evt).hasClass("bodyNodeIndent"))}});if(this.isMobile&&null==myTarget&&(myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,until:function(evt,evtIDs){return!!axdom(evt.parentNode).hasClass("gridBodyDiv")},find:function(evt,evtIDs){return!!axdom(evt).hasClass("bodyViewMobile")}})),myTarget){var targetID=myTarget.id,itemIndex=targetID.split(/_AX_/g).last();targetID.split(/_AX_/g);if(this.selectedRow.length<2)this.selectedRow.length>0&&axf.each(this.selectedRow,function(){body.find(".gridBodyTr_"+this).removeClass("selected")}),this.selectedRow.clear(),this.body.find(".gridBodyTr_"+itemIndex).addClass("selected"),this.selectedRow.push(itemIndex);else{var hasItem=!1;axf.each(this.selectedRow,function(){this==itemIndex&&(hasItem=!0)}),hasItem||(axf.each(this.selectedRow,function(){body.find(".gridBodyTr_"+this).removeClass("selected")}),this.selectedRow.clear(),this.body.find(".gridBodyTr_"+itemIndex).addClass("selected"),this.selectedRow.push(itemIndex))}var item=this.list[itemIndex];AXContextMenu.open({id:cfg.targetID+"ContextMenu",filter:cfg.contextMenu.filter,sendObj:{item:item,index:itemIndex}},event)}else AXContextMenu.open({id:cfg.targetID+"ContextMenu",filter:cfg.contextMenu.filter,sendObj:null},event);return!1}},copyData:function(){var copyOut=(this.config,[]);axf.each(this.selectedCells,function(index,n){var html=axdom("#"+n).find(".bodyNode").html();copyOut.push(html+"	")}),window.clipboardData?(window.clipboardData.setData("Text",copyOut.join("")),toast.push("데이터가 복사되었습니다. 원하시는 곳에 붙여넣기 하세요.")):dialog.push({title:"Copy Data",body:copyOut.join(""),type:"alert"})},getHeadMousePosition:function(event){var pos=this.colHead.offset(),x=event.pageX-pos.left,y=event.pageY-pos.top;return{x:x,y:y}},getColHeadTd:function(arg){var cfg=this.config,po=[],colHeadTdText=" colHeadTdText",toolUse=!0,sortClass="";if("html"!=arg.formatter&&"checkbox"!=arg.formatter||arg.displayLabel||(colHeadTdText=" colHeadTdHtml",toolUse=!1,"checkbox"==arg.formatter&&(colHeadTdText=" colHeadTdCheck",arg.tdHtml='<label><input type="checkbox" name="checkAll" class="gridCheckBox gridCheckBox_colHead_colSeq'+arg.colSeq+'" id="'+cfg.targetID+"_AX_checkAll_AX_"+arg.r+"_AX_"+arg.CHidx+'" />'+(arg.formatterLabel||"")+"</label>")),arg.sort&&(sortClass="desc"==arg.sort?" sortDesc":" sortAsc"),toolUse&&(toolUse=arg.colHeadTool),po.push("<td"+arg.valign+arg.rowspan+arg.colspan+" "),arg.ghost||po.push('id="'+cfg.targetID+"_AX_colHead"+(arg.colHeadType||"")+"_AX_"+arg.r+"_AX_"+arg.CHidx+'" '),po.push('class="colHeadTd'+arg.bottomClass+sortClass+'" style="height:'+arg.tdHeight+'px;">'),po.push('<div class="tdRelBlock" style="height:'+arg.tdHeight+'px;">'),po.push('<div class="colHeadNode'+colHeadTdText+'" align="'+arg.align+'" '),arg.ghost||po.push('id="'+cfg.targetID+"_AX_colHeadText"+(arg.colHeadType||"")+"_AX_"+arg.r+"_AX_"+arg.CHidx+'" '),po.push(">"),po.push(arg.tdHtml),po.push("</div>"),!arg.ghost&&toolUse&&null!=arg.colSeq&&void 0!=arg.colSeq&&po.push('<a href="#AXexec" class="colHeadTool" id="'+cfg.targetID+"_AX_colHeadTool"+(arg.colHeadType||"")+"_AX_"+arg.r+"_AX_"+arg.CHidx+'">T</a>'),arg.ghost||po.push('<div class="colHeadResizer" id="'+cfg.targetID+"_AX_colHeadResizer"+(arg.colHeadType||"")+"_AX_"+arg.r+"_AX_"+arg.CHidx+'"></div>'),po.push("</div>"),po.push("</td>"),!arg.ghotst&&arg.sort){var myColHead=cfg.colHead.rows[arg.r][arg.CHidx],tdID=cfg.targetID+"_AX_colHead"+(arg.colHeadType||"")+"_AX_"+arg.r+"_AX_"+arg.CHidx;this.nowSortHeadID=tdID,this.nowSortHeadObj=myColHead}return po.join("")},setColHead:function(){var cfg=this.config,po=[];if("grid"==cfg.viewMode){this.colHead.show();var getColHeadTd=this.getColHeadTd.bind(this),_tdHeight=cfg.headTdHeight;if(this.hasFixed){po.push('<table cellpadding="0" cellspacing="0" class="colHeadTable" style="width:'+this.colWidth+'px;">'),po.push(this.getColGroup("CH")),po.push("<tbody>");for(var r=0;r<cfg.colHead.rows.length;r++){cfg.colHead.rows.length-1==r;po.push("<tr>");var colCount=0;axf.each(cfg.colHead.rows[r],function(CHidx,CH){if(CH.display&&CH.colspan>0){var tdHtml=CH.label||"untitle",rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'"',bottomClass=CH.isLastCell?"":" colHeadBottomBorder",findedCol=!0;do{var _map_col=cfg.colHead._maps[r][colCount];_map_col?_map_col.r==r&&_map_col.c==colCount?findedCol=!1:colCount++:findedCol=!1}while(findedCol);po.push(getColHeadTd({valign:valign,rowspan:rowspan,colspan:colspan,bottomClass:bottomClass,r:r,CHidx:CHidx,align:cfg.colHeadAlign||CH.align||"left",colSeq:CH.colSeq,formatter:CH.formatter,formatterLabel:CH.formatterLabel,sort:CH.sort,colHeadTool:CH.colHeadTool,tdHtml:tdHtml,ghost:colCount<cfg.fixedColSeq+1,tdHeight:function(){if(cfg.colHead.heights&&cfg.colHead.heights[r]){for(var tdHeight=0,i=r;i<r+CH.rowspan;i++)tdHeight+=cfg.colHead.heights[i]||0;return tdHeight}return _tdHeight*(CH.rowspan||1)+(CH.rowspan-1)}()})),colCount+=CH.colspan}}),po.push("</tr>")}po.push("</tbody>"),po.push("</table>");var fpo=[];fpo.push('<div class="AXGridColHead fixedColHead" id="'+cfg.targetID+'_AX_fixedColHead" style="width:'+this.fixedColWidth+'px;">'),fpo.push('<table cellpadding="0" cellspacing="0" class="colHeadTable" style="width:'+this.fixedColWidth+'px;">'),fpo.push(this.getColGroup("FC")),fpo.push("<tbody>");for(var r=0;r<cfg.colHead.rows.length;r++){cfg.colHead.rows.length-1==r;fpo.push("<tr>");var colCount=0;axf.each(cfg.colHead.rows[r],function(CHidx,CH){if(CH.display&&CH.isFixedCell&&CH.colspan>0){var tdHtml=CH.label||"untitle",rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'"',bottomClass=CH.isLastCell?"":" colHeadBottomBorder";fpo.push(getColHeadTd({colHeadType:"FC",valign:valign,rowspan:rowspan,colspan:colspan,bottomClass:bottomClass,r:r,CHidx:CHidx,align:cfg.colHeadAlign||CH.align||"left",colSeq:CH.colSeq,formatter:CH.formatter,formatterLabel:CH.formatterLabel,sort:CH.sort,colHeadTool:CH.colHeadTool,tdHtml:tdHtml,ghost:!1,tdHeight:function(){if(cfg.colHead.heights&&cfg.colHead.heights[r]){for(var tdHeight=0,tdBorder=CH.rowspan-1,i=r;i<r+CH.rowspan;i++)tdHeight+=cfg.colHead.heights[i]||0;return tdHeight+tdBorder}return _tdHeight*(CH.rowspan||1)+(CH.rowspan-1)}()}))}colCount+=CH.colspan}),fpo.push("</tr>")}fpo.push("</tbody>"),fpo.push("</table>"),fpo.push("</div>")}else{var tableWidth=this.colWidth;po.push('<table cellpadding="0" cellspacing="0" class="colHeadTable" style="width:',tableWidth,'px;">'),po.push(this.getColGroup("CH")),po.push("<tbody>");for(var r=0;r<cfg.colHead.rows.length;r++){cfg.colHead.rows.length-1==r;po.push("<tr>");for(var CH,CHidx=0,__arr=cfg.colHead.rows[r];CHidx<__arr.length&&(CH=__arr[CHidx]);CHidx++)if(CH.display&&CH.colspan>0){var tdHtml=CH.label||"untitle",rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'"',bottomClass=CH.isLastCell?"":" colHeadBottomBorder";CH.isTrLastChild&&(bottomClass+=" isTrLastChild"),po.push(getColHeadTd({valign:valign,rowspan:rowspan,colspan:colspan,bottomClass:bottomClass,r:r,CHidx:CHidx,align:cfg.colHeadAlign||CH.align||"left",colSeq:CH.colSeq,formatter:CH.formatter,formatterLabel:CH.formatterLabel,sort:CH.sort,colHeadTool:CH.colHeadTool,tdHtml:tdHtml,ghost:!1,displayLabel:CH.displayLabel,tdHeight:function(){if(cfg.colHead.heights&&cfg.colHead.heights[r]){for(var tdHeight=0,i=r;i<r+CH.rowspan;i++)tdHeight+=cfg.colHead.heights[i]||0;return tdHeight}return _tdHeight*(CH.rowspan||1)+(CH.rowspan-1)}()}))}po.push("</tr>")}po.push("</tbody>"),po.push("</table>")}this.colHead.html(po.join("")),axdom("#"+cfg.targetID+"_AX_fixedColHead").remove(),fpo&&this.colHead.after(fpo.join("")),this.colHead.find(".colHeadResizer").each(function(){var resizerID=this.id,tdID=resizerID.replace("colHeadResizer","colHead"),txtID=resizerID.replace("colHeadResizer","colHeadText"),toolID=resizerID.replace("colHeadResizer","colHeadTool"),valign=(axdom("#"+tdID).attr("rowspan"),axdom("#"+tdID).attr("valign")),tdHeight=axdom("#"+tdID).height(),txtHeight=axdom("#"+txtID).outerHeight();axdom(this).css({height:tdHeight});var cellMarginTop=0;"bottom"==valign&&(cellMarginTop=tdHeight-txtHeight+5),"middle"==valign&&(cellMarginTop=(tdHeight-txtHeight)/2+5),axdom("#"+txtID).css({"padding-top":cellMarginTop+"px"}),axdom("#"+toolID).css({top:cellMarginTop-5+"px"}),cellMarginTop=null}),(cfg.hasAstricCol||cfg.fitToWidth)&&this.colHead.find(".isTrLastChild").css({background:"none"}),this.colHead.bind("mouseover",this.colHeadMouseOver.bind(this)),this.colHead.bind("mouseout",this.colHeadMouseOut.bind(this)),this.colHead.find(".colHeadNode").bind("click",this.colHeadNodeClick.bind(this)),this.colHead.find(".colHeadTool").bind("click",this.colHeadToolClick.bind(this)),this.colHead.find(".colHeadTool").bind("focus",function(){this.blur()}),this.colHead.find(".colHeadResizer").bind("mousedown",this.colHeadResizerMouseDown.bind(this)),this.colHead.find(".gridCheckBox").bind("click",this.colHeadCheckBoxClick.bind(this)),this.hasFixed&&(this.fixedColHead=axdom("#"+cfg.targetID+"_AX_fixedColHead"),this.fixedColHead.find(".colHeadResizer").each(function(){var resizerID=this.id,tdID=resizerID.replace("colHeadResizer","colHead"),txtID=resizerID.replace("colHeadResizer","colHeadText"),toolID=resizerID.replace("colHeadResizer","colHeadTool"),rowspan=axdom("#"+tdID).attr("rowspan"),valign=axdom("#"+tdID).attr("valign");rowspan||(rowspan=1);var tdHeight=axdom("#"+tdID).height(),txtHeight=axdom("#"+txtID).outerHeight();axdom(this).css({height:tdHeight});var cellMarginTop=0;"bottom"==valign&&(cellMarginTop=tdHeight-txtHeight+5),"middle"==valign&&(cellMarginTop=(tdHeight-txtHeight)/2+5),axdom("#"+txtID).css({"padding-top":cellMarginTop+"px"}),axdom("#"+toolID).css({top:cellMarginTop-5+"px"})}),this.fixedColHead.bind("mouseover",this.colHeadMouseOver.bind(this)),this.fixedColHead.bind("mouseout",this.colHeadMouseOut.bind(this)),this.fixedColHead.find(".colHeadNode").bind("click",this.colHeadNodeClick.bind(this)),this.fixedColHead.find(".colHeadTool").bind("click",this.colHeadToolClick.bind(this)),this.fixedColHead.find(".colHeadResizer").bind("mousedown",this.colHeadResizerMouseDown.bind(this)),this.fixedColHead.find(".gridCheckBox").bind("click",this.colHeadCheckBoxClick.bind(this)))}else"icon"==cfg.viewMode?(this.colHead.empty(),this.colHead.hide()):"mobile"==cfg.viewMode&&(this.colHead.empty(),this.colHead.hide())},colHeadMouseOver:function(event){this.config;if(""!=event.target.id){var eid=event.target.id.split(/_AX_/g),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,until:function(evt,evtIDs){return!!axdom(evt.parentNode).hasClass("AXGridColHead")},find:function(evt,evtIDs){return!!axdom(evt).hasClass("colHeadTd")}});if(myTarget){var targetID=myTarget.id,toolID=targetID.replace("colHead","colHeadTool");axdom("#"+toolID).addClass("readyTool")}}},colHeadMouseOut:function(event){this.config;if(""!=event.target.id){var eid=event.target.id.split(/_AX_/g),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,until:function(evt,evtIDs){return!!axdom(evt.parentNode).hasClass("AXGridColHead")},find:function(evt,evtIDs){return!!axdom(evt).hasClass("colHeadTd")}});if(myTarget){var targetID=myTarget.id,toolID=targetID.replace("colHead","colHeadTool");axdom("#"+toolID).removeClass("readyTool")}}},colHeadResizerMouseDown:function(event){var cfg=this.config;if(""!=event.target.id){var eid=event.target.id.split(/_AX_/g),lastIdx=(event.target,eid.length-1),colHeadR=eid[lastIdx-1],colHeadC=eid[lastIdx],myColHead=cfg.colHead.rows[colHeadR][colHeadC],tdID=cfg.targetID+"_AX_colHead_AX_"+colHeadR+"_AX_"+colHeadC;myColHead.isFixedCell&&(tdID=cfg.targetID+"_AX_colHeadFC_AX_"+colHeadR+"_AX_"+colHeadC);var colSeq=this.getColSeqToHead(colHeadR,colHeadC);if(null!=colSeq){this.colResizing&&this.colHeadResizerEnd();var offset=axdom("#"+tdID).find(".tdRelBlock").position(),relBlockWidth=axdom("#"+tdID).find(".tdRelBlock").width(),rightPosition=offset.left.number()+relBlockWidth.number(),blockWidth=axdom("#"+cfg.targetID+"_AX_col_AX_"+colSeq+"_AX_CH").attr("width");this.colResizeTarget={colSeq:colSeq,leftPosition:rightPosition-blockWidth,blockWidth:blockWidth,newWidth:blockWidth};var colHeadResizerMouseMove=this.colHeadResizerMouseMove.bind(this);this.colHeadResizerMouseMoveBind=function(event){colHeadResizerMouseMove(event)};var colHeadResizerMouseUp=this.colHeadResizerMouseUp.bind(this);this.colHeadResizerMouseUpBind=function(event){colHeadResizerMouseUp(event)},axdom(document.body).bind("mousemove.AXGrid",this.colHeadResizerMouseMoveBind),axdom(document.body).bind("mouseup.AXGrid",this.colHeadResizerMouseUpBind),axdom(document.body).bind("mouseleave.AXGrid",this.colHeadResizerMouseUpBind),axdom(document.body).attr("onselectstart","return false"),this.inline_edit&&this.editCellClear()}}},colHeadResizerMouseMove:function(event){event.pageX&&(this.config.moveSens>this.moveSens&&this.moveSens++,this.moveSens==this.config.moveSens&&this.colHeadResizerMove(event))},colHeadResizerMove:function(event){var cfg=this.config,mouse=this.getHeadMousePosition(event),newWidth=(this.colResizeTarget.leftPosition-mouse.x).abs();if(!(31>newWidth)){if(axdom("#"+cfg.targetID+"_AX_col_AX_"+this.colResizeTarget.colSeq+"_AX_CH").attr("width",newWidth),axdom("#"+cfg.targetID+"_AX_col_AX_"+this.colResizeTarget.colSeq+"_AX_CB").attr("width",newWidth),axdom("#"+cfg.targetID+"_AX_col_AX_"+this.colResizeTarget.colSeq+"_AX_EB").attr("width",newWidth),cfg.foot&&axdom("#"+cfg.targetID+"_AX_col_AX_"+this.colResizeTarget.colSeq+"_AX_FH").attr("width",newWidth),cfg.colGroup[this.colResizeTarget.colSeq].width=newWidth,cfg.colGroup[this.colResizeTarget.colSeq].widthAstric||(cfg.colGroup[this.colResizeTarget.colSeq]._owidth=newWidth),this.hasFixed){var fixedColSeq=this.fixedColSeq;axdom("#"+cfg.targetID+"_AX_col_AX_"+this.colResizeTarget.colSeq+"_AX_FC").attr("width",newWidth),axdom("#"+cfg.targetID+"_AX_col_AX_"+this.colResizeTarget.colSeq+"_AX_FB").attr("width",newWidth),axdom("#"+cfg.targetID+"_AX_col_AX_"+this.colResizeTarget.colSeq+"_AX_FE").attr("width",newWidth),cfg.foot&&axdom("#"+cfg.targetID+"_AX_col_AX_"+this.colResizeTarget.colSeq+"_AX_FF").attr("width",newWidth);for(var CG,fixedColWidth=0,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)CG.display&&fixedColSeq+1>cidx&&(fixedColWidth+=CG.width.number());this.fixedColWidth=fixedColWidth,axdom("#"+cfg.targetID+"_AX_fixedColHead").css({width:fixedColWidth}),axdom("#"+cfg.targetID+"_AX_fixedColHead").find(".colHeadTable").css({width:fixedColWidth}),this.fixedScrollContent.css({width:fixedColWidth}),this.fixedScrollContent.find(".gridFixedBodyTable").css({width:fixedColWidth}),axdom("#"+cfg.targetID+"_AX_fixedEditorContent").css({width:fixedColWidth}),axdom("#"+cfg.targetID+"_AX_fixedEditorContent").find(".gridFixedBodyTable").css({width:fixedColWidth})}if(this.editorOpend){for(var colSeq=this.colResizeTarget.colSeq,_m=0;_m<cfg.editor._maps.length;_m++){var rc=cfg.editor._maps[_m][colSeq],CH=cfg.editor.rows[rc.r][rc.c];CH.form.id?CH.form.id:cfg.targetID+"_AX_"+CH.key+"_AX_"+rc.r+"_AX_"+rc.c}AXInput.alignAllAnchor()}this.colResizeTarget.newWidth=newWidth;var newColWidth=this.colWidth-(this.colResizeTarget.blockWidth-this.colResizeTarget.newWidth);this.colHead.find(".colHeadTable").css({width:newColWidth+"px"})}},colHeadResizerMouseUp:function(event){this.colResizeTarget.blockWidth!=this.colResizeTarget.newWidth&&(this.colWidth=this.colWidth-(this.colResizeTarget.blockWidth-this.colResizeTarget.newWidth)),this.colHeadResizerEnd(),this.contentScrollResize(!1)},colHeadResizerEnd:function(){this.moveSens=0,this.colResizing=!1,axdom(document.body).unbind("mousemove.AXGrid"),axdom(document.body).unbind("mouseup.AXGrid"),axdom(document.body).unbind("mouseleave.AXGrid"),axdom(document.body).removeAttr("onselectstart"),window.AXInput&&AXInput.alignAllAnchor()},colHeadNodeClick:function(event){var cfg=this.config;if(""!=event.target.id){var eid=event.target.id.split(/_AX_/g),eventTarget=event.target;if(this.editorOpend)return void toast.push("Editor 활성화 상태에서는 기능을 사용할 수 없습니다.");if(axdom(eventTarget).hasClass("colHeadTdCheck"))return this.colHeadCheckBoxClick(event),this;if(!axdom(eventTarget).hasClass("gridCheckBox")){var lastIdx=eid.length-1,colHeadR=eid[lastIdx-1],colHeadC=eid[lastIdx];try{var myColHead=cfg.colHead.rows[colHeadR][colHeadC]}catch(e){return}if(0!=cfg.sort&&0!=myColHead.sort){var tdID=cfg.targetID+"_AX_colHead_AX_"+colHeadR+"_AX_"+colHeadC;if(myColHead.isFixedCell&&(tdID=cfg.targetID+"_AX_colHeadFC_AX_"+colHeadR+"_AX_"+colHeadC),void 0==myColHead.colSeq||null==myColHead.colSeq)console.log("정렬할 수 없는 컬럼 입니다.");else{this.nowSortHeadID&&this.nowSortHeadID!=tdID&&(axdom("#"+this.nowSortHeadID).removeClass("sortDesc"),axdom("#"+this.nowSortHeadID).removeClass("sortAsc"),this.nowSortHeadObj.sort=void 0),"desc"==cfg.colHead.rows[colHeadR][colHeadC].sort?axdom("#"+tdID).removeClass("sortDesc"):axdom("#"+tdID).removeClass("sortAsc");var nsort="";nsort="desc"==myColHead.sort?"asc":"desc",cfg.colHead.rows[colHeadR][colHeadC].sort=nsort,"desc"==nsort?axdom("#"+tdID).addClass("sortDesc"):axdom("#"+tdID).addClass("sortAsc"),this.nowSortHeadID=tdID,this.nowSortHeadObj=myColHead;var ai=this.ajaxInfo;ai&&cfg.remoteSort?(ai.ajaxPars?Object.isString(ai.ajaxPars)?ai.ajaxPars=$.extend(ai.ajaxPars.dec().queryToObject(),this.getSortParam("one").queryToObject()):Object.isObject(ai.ajaxPars)&&(ai.ajaxPars=$.extend(ai.ajaxPars,this.getSortParam("one").queryToObject())):ai.ajaxPars=this.getSortParam("one"),this.reloadList()):(this.list=this.sortList(nsort,myColHead,this.list),this.printList({sort:!0}),this.contentScrollResize())}if(cfg.colHead.onclick){var sendObj={index:null,r:colHeadR,c:colHeadC,list:this.list,colHead:myColHead,page:this.page};cfg.colHead.onclick.call(sendObj)}}}}},colHeadToolClick:function(event){var cfg=this.config;if(""!=event.target.id){var eid=event.target.id.split(/_AX_/g),eventTarget=event.target;if(this.editorOpend)return void toast.push("Editor 활성화 상태에서는 기능을 사용할 수 없습니다.");var lastIdx=eid.length-1,colHeadR=eid[lastIdx-1],colHeadC=eid[lastIdx];cfg.colHead.rows[colHeadR][colHeadC];axdom("#"+cfg.targetID+"_AX_colHeadMenu").remove();var po=[];po.push('<div id="'+cfg.targetID+'_AX_colHeadMenu" class="AXGridColGroupListBox">');for(var CG,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++){var addClass=CG.display?" on":"",lastClass=cidx==cfg.colGroup.length-1?" last":"";po.push('<a href="#AXexec" class="AXGridColGroupListBoxItem'+addClass+lastClass+'" id="'+cfg.targetID+"_AX_colHeadMenu_AX_"+CG.colSeq+'">'),po.push(CG.label),po.push("</a>")}po.push("</div>"),axdom(document.body).append(po.join(""));var offset=axdom(eventTarget).offset(),css={};css.top=offset.top-5,css.left=offset.left-20,axdom("#"+cfg.targetID+"_AX_colHeadMenu").css(css);var colGroupListClick=this.colGroupListClick.bind(this);this.colGroupListClickBind=function(event){colGroupListClick(event)},axdom(document).bind("click",this.colGroupListClickBind),axdom(document).bind("keydown",this.colGroupListClickBind)}},colGroupListClick:function(event){var cfg=this.config;if(event.keyCode==AXUtil.Event.KEY_ESC)return axdom("#"+cfg.targetID+"_AX_colHeadMenu").remove(),axdom(document).unbind("keydown",this.colGroupListClickBind),void axdom(document).unbind("click",this.colGroupListClickBind);if(""!=event.target.id){var eid=event.target.id.split(/_AX_/g),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,find:function(evt,evtIDs){return!(!axdom(evt).hasClass("AXGridColGroupListBoxItem")&&!axdom(evt).hasClass("colHeadTool"))}});if(myTarget){if(axdom(myTarget).hasClass("colHeadTool"))return;var targetID=myTarget.id,colSeq=targetID.split(/_AX_/g).last();if(cfg.colGroup[colSeq].display?(cfg.colGroup[colSeq].display=!1,axdom("#"+targetID).removeClass("on")):(cfg.colGroup[colSeq].display=!0,axdom("#"+targetID).addClass("on")),cfg.editor)for(var r=0;r<cfg.editor.rows.length;r++)cfg.editor.rows[r][colSeq].display=!cfg.editor.rows[r][colSeq].display;this.redrawGrid("all")}else axdom("#"+cfg.targetID+"_AX_colHeadMenu").remove(),axdom(document).unbind("keydown",this.colGroupListClickBind),axdom(document).unbind("click",this.colGroupListClickBind)}},colHeadCheckBoxClick:function(event){var cfg=this.config;if(""!=event.target.id){var eid=event.target.id.split(/_AX_/g),eventTarget=event.target;axdom(eventTarget).hasClass("colHeadTdCheck")&&(eventTarget=axdom(eventTarget).find("input").get(0),eventTarget.checked=!eventTarget.checked);var lastIdx=eid.length-1,colHeadR=eid[lastIdx-1],colHeadC=eid[lastIdx],myColHead=cfg.colHead.rows[colHeadR][colHeadC];this.checkedColSeq(myColHead.colSeq,eventTarget.checked)}},needBindDBLClick:function(){return"ie"==axf.browser.name&&("Q"===axf.docTD||axf.browser.version<9)},sortList:function(nsort,myColHead,list){var _this=(this.config,this),getValueForSort=function(item,itemIndex){if(myColHead.formatter){var result;if("money"==myColHead.formatter)result=item[myColHead.key];else if("dec"==myColHead.formatter)result=void 0==item[myColHead.key]?"":item[myColHead.key].dec();else if("html"==myColHead.formatter)result=item[myColHead.key];else if("checkbox"==myColHead.formatter||"radio"==myColHead.formatter)result=item[myColHead.key];else{var sendObj={index:itemIndex,list:list,item:item,page:_this.page,key:myColHead.key,value:item[myColHead.key]};result=myColHead.formatter.call(sendObj,itemIndex,item)||"";var moneyCheck=Object.isString(result)?result.replace(/,/g,""):result;axdom.isNumeric(moneyCheck)&&(result=result.number())}return result}return item[myColHead.key]||""};if("desc"==nsort){var listIndex=0;list=list.sort(function(prevItem,nowItem){var v1=getValueForSort(prevItem,listIndex),v2=getValueForSort(nowItem,listIndex);return listIndex++,v2>v1?1:v1>v2?-1:v1==v2?0:void 0})}else{var listIndex=0;list=list.sort(function(prevItem,nowItem){var v1=getValueForSort(prevItem,listIndex),v2=getValueForSort(nowItem,listIndex);return listIndex++,v2>v1?-1:v1>v2?1:v1==v2?0:void 0})}return list},setBody:function(list,rewrite){var cfg=this.config;list&&(this.list=list);var po=[];if(po.push('<div id="'+cfg.targetID+'_AX_scrollContent" class="gridScrollContent">'),"grid"==cfg.viewMode?(po.push('<table cellpadding="0" cellspacing="0" class="gridBodyTable"  id="'+cfg.targetID+'_AX_gridBodyTable">'),po.push(this.getColGroup("CB")),po.push('<thead id="'+cfg.targetID+'_AX_thead"></thead>'),po.push('<tbody id="'+cfg.targetID+"_AX_hpadding\"><tr class='thpadding'><td colspan=\""+(this.showColLen.number()+1)+'"></td></tr></tbody>'),po.push('<tbody id="'+cfg.targetID+'_AX_tbody">'),po.push('<tr class="noListTr">'),po.push('<td colspan="'+this.showColLen+'">'),po.push('<div class="tdRelBlock">'),po.push('<div class="bodyNode bodyTdText" align="center">'),po.push(cfg.emptyListMSG),po.push("</div>"),po.push("</div>"),po.push("</td>"),po.push('<td class="bodyNullTd"><div class="tdRelBlock">&nbsp;</div></td>'),po.push("</tr>"),po.push("</tbody>"),po.push('<tbody id="'+cfg.targetID+'_AX_tfoot"></tbody>'),po.push('<tbody id="'+cfg.targetID+"_AX_fpadding\"><tr class='tfpadding'><td colspan=\""+(this.showColLen.number()+1)+'"></td></tr></tbody>'),po.push("</table>")):"icon"==cfg.viewMode?po.push('<div class="gridBodyDiv" id="'+cfg.targetID+'_AX_gridBodyDiv"></div>'):"mobile"==cfg.viewMode&&po.push('<div class="gridBodyDiv" id="'+cfg.targetID+'_AX_gridBodyDiv"></div>'),po.push("</div>"),"grid"==cfg.viewMode&&this.hasFixed&&(rewrite||"undefined"==typeof rewrite)&&(po.push('<div id="'+cfg.targetID+'_AX_fixedScrollContent" class="gridFixedScrollContent" style="width:'+this.fixedColWidth+'px;">'),po.push('<table cellpadding="0" cellspacing="0" class="gridFixedBodyTable" style="width:'+this.fixedColWidth+'px;">'),po.push(this.getColGroup("FB")),po.push('<thead id="'+cfg.targetID+'_AX_fixedThead"></thead>'),po.push('<tbody id="'+cfg.targetID+"_AX_fhpadding\"><tr class='thpadding'><td colspan=\""+this.showFixedColLen+'"></td></tr></tbody>'),po.push('<tbody id="'+cfg.targetID+'_AX_fixedTbody">'),po.push('<tr class="noListTr">'),po.push('<td colspan="'+this.showFixedColLen+'"></td>'),po.push("</tr>"),po.push("</tbody>"),po.push('<tbody id="'+cfg.targetID+'_AX_fixedTfoot"></tbody>'),po.push('<tbody id="'+cfg.targetID+"_AX_ffpadding\"><tr class='tfpadding'><td colspan=\""+this.showFixedColLen+'"></td></tr></tbody>'),po.push("</table>"),po.push("</div>")),"grid"!=cfg.viewMode&&"icon"!=cfg.viewMode||po.push('<div class="AXGridFoot" id="'+cfg.targetID+'_AX_gridFoot"></div>'),this.body.html(po.join("")),this.gridFoot=axdom("#"+cfg.targetID+"_AX_gridFoot"),this.scrollContent=axdom("#"+cfg.targetID+"_AX_scrollContent"),"grid"==cfg.viewMode&&(this.cachedDom.tbody=axdom("#"+cfg.targetID+"_AX_tbody"),this.hasFixed&&(this.cachedDom.fixed_tbody=axdom("#"+cfg.targetID+"_AX_fixedTbody")),this.cachedDom.thpadding=axdom("#"+cfg.targetID+"_AX_hpadding").find("td"),this.cachedDom.tfpadding=axdom("#"+cfg.targetID+"_AX_fpadding").find("td"),this.hasFixed&&(this.cachedDom.fthpadding=axdom("#"+cfg.targetID+"_AX_fhpadding").find("td"),this.cachedDom.ftfpadding=axdom("#"+cfg.targetID+"_AX_ffpadding").find("td"))),this.fixedScrollContent=axdom("#"+cfg.targetID+"_AX_fixedScrollContent"),cfg.scrollContentBottomMargin=2,this.list.length>0){var _this=this;"undefined"==typeof list?_this.setList(_this.list,!0,"reload"):setTimeout(function(){_this.setList(_this.list)},100)}"grid"!=cfg.viewMode&&"icon"!=cfg.viewMode||(this.scrollYHandle.unbind("mouseover").bind("mouseover",this.contentScrollTipOver.bind(this)),this.scrollYHandle.unbind("mousedown").bind("mousedown",this.contentScrollScrollReady.bind(this)),this.scrollXHandle.unbind("mousedown").bind("mousedown",this.contentScrollScrollReady.bind(this)))},listLoadingDisplay:function(){var cfg=this.config,po=[];"mobile"!=cfg.viewMode?(po.push('<tr class="noListTr">'),po.push('<td colspan="'+this.showColLen+'">'),po.push('<div class="tdRelBlock">'),po.push('<div class="bodyNode bodyTdText" align="center">'),po.push('	<div class="AXLoading"></div>'),po.push("</div>"),po.push("</div>"),po.push("</td>"),po.push('<td class="bodyNullTd"><div class="tdRelBlock">&nbsp;</div></td>'),po.push("</tr>"),axdom("#"+cfg.targetID+"_AX_tbody").html(po.join("")),po=[],po.push('<tr class="noListTr">'),po.push('<td colspan="'+this.showColLen+'">'),po.push("</td>"),po.push("</tr>"),axdom("#"+cfg.targetID+"_AX_fixedTbody").html(po.join(""))):("grid"==cfg.viewMode&&(this.scrollContent.css({top:0}),this.contentScrollContentSync({top:0})),po.push('	<div class="AXLoading"></div>'),axdom("#"+cfg.targetID+"_AX_gridBodyDiv").empty(),axdom("#"+cfg.targetID+"_AX_gridBodyDiv").append(po.join("")))},setList:function(obj,sortDisable,rewrite,exts){var cfg=this.config,nowSortHeadID=this.nowSortHeadID,nowSortHeadObj=this.nowSortHeadObj;if(this.listLoadingDisplay(),obj.ajaxUrl){this.ajaxInfo=obj,this.ajax_sortDisable=sortDisable,this.pageActive=!0;var url=obj.ajaxUrl,appendPars=["pageNo="+("paging"==exts?this.page.pageNo:1),"pageSize="+this.page.pageSize];if(cfg.remoteSort){var sortParam=this.getSortParam("one");sortParam&&appendPars.push(sortParam)}Object.isString(obj.ajaxPars)?appendPars.push(obj.ajaxPars):Object.isObject(obj.ajaxPars)&&appendPars.push(axdom.param(obj.ajaxPars));var pars=appendPars.join("&"),_method="post",_contentType=AXConfig.AXReq.contentType,_headers={},_responseType=AXConfig.AXReq.responseType,_dataType=AXConfig.AXReq.dataType;obj.method&&(_method=obj.method),obj.contentType&&(_contentType=obj.contentType),obj.headers&&(_headers=obj.headers);var ajaxGetList=this.ajaxGetList.bind(this);new AXReq(url,{type:_method,contentType:_contentType,responseType:_responseType,dataType:_dataType,headers:_headers,debug:obj.debug,pars:pars,onsucc:function(res){res.result&&res.result==AXConfig.AXReq.okCode||void 0==res.result&&!res.error?(res._sortDisable=sortDisable,obj.response?obj.response.call(res):ajaxGetList(res),obj.onLoad&&obj.onLoad.call(res)):obj.onError?obj.onError.call(res):axf.alert(res)},onerr:function(res){obj.onError&&obj.onError.call(res)}})}else axdom.isArray(obj)&&(sortDisable||!cfg.sort?this.list=obj:nowSortHeadID?this.list=this.sortList(nowSortHeadObj.sort,nowSortHeadObj,obj):this.list=obj,this.removedList=[],this.printList({reload:rewrite}),this.contentScrollResize(),"reload"!=rewrite&&this.scrollTop(0),this.setStatus(this.list.length),cfg.page.paging||(this.pagingUnit.hide(),this.pageActive=!1))},reloadList:function(){this.config,this.nowSortHeadID,this.nowSortHeadObj;if(this.selectedCells.clear(),this.selectedRow.clear(),this.ajaxInfo){var obj=this.ajaxInfo,sortDisable=this.ajax_sortDisable;this.pageActive=!0,this.listLoadingDisplay();var url=obj.ajaxUrl,appendPars=["pageNo="+this.page.pageNo,"pageSize="+this.page.pageSize];Object.isString(obj.ajaxPars)?appendPars.push(obj.ajaxPars):Object.isObject(obj.ajaxPars)&&appendPars.push(axdom.param(obj.ajaxPars));var pars=appendPars.join("&"),_method="post",_contentType=AXConfig.AXReq.contentType,_headers={},_responseType=AXConfig.AXReq.responseType,_dataType=AXConfig.AXReq.dataType;obj.method&&(_method=obj.method),obj.contentType&&(_contentType=obj.contentType),obj.headers&&(_headers=obj.headers);var scrollTop=function(){this.scrollTop(0)},scrollTopBind=scrollTop.bind(this),ajaxGetList=this.ajaxGetList.bind(this),userResponseSetPaging=function(res){axf.overwriteObject(this.page,res.page,!0),this.setPaging()},userResponse=userResponseSetPaging.bind(this);new AXReq(url,{type:_method,contentType:_contentType,responseType:_responseType,dataType:_dataType,headers:_headers,debug:obj.debug,pars:pars,onsucc:function(res){res.result&&res.result==AXConfig.AXReq.okCode||void 0==res.result&&!res.error?(res._sortDisable=sortDisable,obj.response?(obj.response.call(res),userResponse(res)):ajaxGetList(res),scrollTopBind()):AXUtil.alert(res)}})}},ajaxGetList:function(res){var cfg=this.config,nowSortHeadID=this.nowSortHeadID,nowSortHeadObj=this.nowSortHeadObj;res._sortDisable||!cfg.sort||cfg.remoteSort?this.list=res[AXConfig.AXGrid.keyList]:nowSortHeadID?this.list=this.sortList(nowSortHeadObj.sort,nowSortHeadObj,res[AXConfig.AXGrid.keyList]):this.list=res[AXConfig.AXGrid.keyList],
  axf.overwriteObject(this.page,res.page,!0),this.removedList=[],this.printList(),this.contentScrollResize(),this.scrollTop(0),this.setPaging()},setData:function(res){var cfg=this.config,nowSortHeadID=this.nowSortHeadID,nowSortHeadObj=this.nowSortHeadObj;res._sortDisable||!cfg.sort?this.list=res.list:nowSortHeadID?this.list=this.sortList(nowSortHeadObj.sort,nowSortHeadObj,res.list):this.list=res.list,this.page.onchange||(this.page.onchange=this.page.onChange),axf.overwriteObject(this.page,res.page,!0),this.removedList=[],this.selectClear(),this.printList(),this.contentScrollResize(),this.scrollTop(0),this.setStatus(this.list.length),cfg.page.paging&&this.setPaging()},getFormatterValue:function(formatter,item,itemIndex,value,key,CH,CHidx){var result;this.config;if(!CH.editor||"checkbox"!=CH.editor.type&&"radio"!=CH.editor.type)if(Object.isFunction(formatter)){var sendObj={index:itemIndex,list:this.list,item:item,page:this.page,key:key,value:value};result=formatter.call(sendObj,itemIndex,item)}else result=CH.editor&&CH.editor.type in this.formatter?this.formatter[CH.editor.type].call(this,CH.editor.type,item,itemIndex,value,key,CH,CHidx):Object.isString(formatter)&&formatter in this.formatter?this.formatter[formatter].call(this,formatter,item,itemIndex,value,key,CH,CHidx):"null"==String(value)?"":value;else{var checkedStr="",disabled="",that={index:itemIndex,list:this.list,item:item,page:this.page,key:key,value:value};1!=value&&1!=value&&"1"!=value&&"Y"!=value||(checkedStr=' checked="checked"'),CH.editor.disabled&&CH.editor.disabled.call(that)&&(disabled=' disabled="disabled"'),result='<input type="'+CH.editor.type+'" name="'+key+'" data-editor-key="'+itemIndex+","+CHidx+'" style="margin:0px;" class="inline-editor-checkbox" '+checkedStr+disabled+' onfocus="this.blur();" />'}return result},getTooltipValue:function(formatter,item,itemIndex,value,key,CH){var result,cfg=this.config;if("money"==formatter)result=""==value||"null"==value?"0":value.number().money();else if("dec"==formatter)result=void 0==value?"":value.dec();else if("html"==formatter)result=value;else if("checkbox"==formatter||"radio"==formatter){var checked="";if(CH.checked){var sendObj={index:itemIndex,list:this.list,item:item,page:this.page,key:key,value:value},callResult=CH.checked.call(sendObj);callResult&&(checked=' checked="checked" ')}result='<input type="'+formatter+'" name="'+CH.label+'" class="gridCheckBox_body_colSeq'+CH.colSeq+'" id="'+cfg.targetID+"_AX_checkboxItem_AX_"+CH.colSeq+"_AX_"+itemIndex+'" value="'+value+'" '+checked+" />"}else if(Object.isFunction(formatter)){var sendObj={index:itemIndex,list:this.list,item:item,page:this.page,key:key,value:value};result=formatter.call(sendObj,itemIndex,item)}else result=value;return result},getAddingClass:function(formatter,item,itemIndex,value,key,CH){var result=(this.config,"");if(Object.isString(formatter))result=formatter;else if(Object.isFunction(formatter)){var sendObj={index:itemIndex,list:this.list,item:item,page:this.page,key:key,value:value};result=formatter.call(sendObj,itemIndex,item)}return result},getItem:function(itemIndex,item,isfix,hasTr){if(!item)return"";var cfg=this.config,tpo=[],evenClassName="line"+itemIndex%2,getFormatterValue=this.getFormatterValue.bind(this),getTooltipValue=this.getTooltipValue.bind(this),getAddingClass=this.getAddingClass.bind(this),hasFixed=this.hasFixed,hasTrValue=void 0===hasTr,trAddClass="",lastTdRowspan="";if(cfg.body.addClass)try{trAddClass=cfg.body.addClass.call({index:itemIndex,item:item,list:this.list,page:this.page})||""}catch(e){console.log(e)}for(var r=0,l=cfg.body.rows.length;l>r;r++){var trHeight=0;trHeight=this.cachedDom.tbody.find("#"+cfg.targetID+"_AX_tr_"+r+"_AX_n_AX_"+itemIndex+" td").innerHeight(),hasTrValue&&("fix"==isfix?tpo.push('<tr class="gridBodyTr gridBodyTr_'+itemIndex+" "+evenClassName+" "+trAddClass+'" id="'+cfg.targetID+"_AX_tr_"+r+"_AX_fix_AX_"+itemIndex+'">'):tpo.push('<tr class="gridBodyTr gridBodyTr_'+itemIndex+" "+evenClassName+" "+trAddClass+'" id="'+cfg.targetID+"_AX_tr_"+r+"_AX_n_AX_"+itemIndex+'">'));var CH,CG,colCount=0,CHidx=0;for(cfg.body.rows[r].length;CHidx<cfg.body.rows[r].length;CHidx++)if(CH=cfg.body.rows[r][CHidx],CG=cfg.colGroup[CHidx],CH.display&&CH.colspan>0){var printOk=!1,makeBodyNode=!0;if("n"==isfix&&(printOk=!0,"undefined"==typeof CH.colSeq||"undefined"!=typeof cfg.fixedColSeq&&cfg.fixedColSeq>0&&CH.colSeq<cfg.fixedColSeq+1&&(makeBodyNode=!1)),"fix"==isfix&&CH.isFixedCell&&CH.display&&(printOk=!0),printOk){colCount+=CH.colspan;var rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"";lastTdRowspan=rowspan;var valign=' valign="'+CH.valign+'" ',bottomClass=CH.isLastCell?"":" bodyBottomBorder",fixedClass=CH.isFixedEndCell?" fixedLine":"",styles=' style="vertical-align:'+CH.valign+';"',tdHeight=function(){if(cfg.body.heights&&cfg.body.heights[r]){for(var tdHeight=0,i=r;i<CH.rowspan;i++)tdHeight+=cfg.body.heights[i]||0;return tdHeight}return 0}();tdHeight?styles=' style="vertical-align:'+CH.valign+";height:"+tdHeight+'px;"':trHeight&&CH.rowspan<2&&CH.colspan<2?styles=' style="vertical-align:'+CH.valign+";height:"+trHeight+'px;"':CH.rowspan>1&&(styles=' style="vertical-align:'+CH.valign+";height:"+trHeight+'px;"');var bodyNodeClass="";"checkbox"==CH.formatter||"radio"==CH.formatter?bodyNodeClass=" bodyTdCheckBox":"html"==CH.formatter&&(bodyNodeClass=" bodyTdHtml");var tooltipValue="";CH.tooltip&&(tooltipValue=getTooltipValue(CH.tooltip,item,itemIndex,item[CH.key],CH.key,CH));var addClasses="";CH.addClass&&(addClasses=" "+getAddingClass(CH.addClass,item,itemIndex,item[CH.key],CH.key,CH));var tdEndStyles="";CH.isTdEnd&&cfg.hiddenBorder_tdLastChild&&(tdEndStyles="background-image:none;"),tpo.push("<td"+valign+rowspan+colspan+styles+'  id="'+cfg.targetID+"_AX_"+(isfix||"n")+"body_AX_"+r+"_AX_"+CHidx+"_AX_"+itemIndex+'"  class="bodyTd bodyTd_'+CHidx+" bodyTdr_"+r+" "+bottomClass+fixedClass+'" style="'+tdEndStyles+'">'),makeBodyNode&&(tpo.push('<div class="bodyNode bodyTdText'+bodyNodeClass+addClasses+'"  align="'+CH.align+'"  id="'+cfg.targetID+"_AX_bodyText_AX_"+r+"_AX_"+CHidx+"_AX_"+itemIndex+'"  title="'+tooltipValue+'">'),hasFixed&&!CH.isFixedCell||!hasFixed||void 0!=isfix?CH.formatter?tpo.push(getFormatterValue(CH.formatter,item,itemIndex,item[CH.key],CH.key,CH,CHidx)):CH.editor&&("checkbox"==CH.editor.type||"radio"==CH.editor.type||CH.editor.type in this.formatter)?tpo.push(getFormatterValue("",item,itemIndex,item[CG.key],CH.key,CH,CHidx)):tpo.push("null"==String(item[CH.key])?"":item[CH.key]):tpo.push("&nbsp;"),tpo.push("</div>")),tpo.push("</td>")}}0==r&&"n"==isfix&&tpo.push("<td "+styles+' class="bodyNullTd" id="'+cfg.targetID+"_AX_null_AX_"+itemIndex+'" rowspan="'+cfg.body.rows.length+'"><div class="tdRelBlock" id="'+cfg.targetID+"_AX_tdRelBlock_AX_"+itemIndex+'">&nbsp;</div></td>'),hasTrValue&&tpo.push("</tr>")}return tpo.join("")},getIconItem:function(itemIndex,item,viewIconObj,cssObj){var format,cfg=this.config,tpo=[];this.getFormatterValue.bind(this),this.getTooltipValue.bind(this);try{format=viewIconObj.format.call({index:itemIndex,item:item})}catch(e){console.log(e)}if(tpo.push('<div class="viewIcon bodyViewIcon bodyViewIcon_'+itemIndex+" "+(viewIconObj.addClass||"")+'" style="'+cssObj.box+';" id="'+cfg.targetID+"_AX_viewIcon_AX_"+itemIndex+'">'),format.imgsrc&&(tpo.push('<img src="'),tpo.push(format.imgsrc),tpo.push('" align="middle" alt="'+format.label+'" style="'+cssObj.img+';" class="gridViewIconThumbnail" />')),format.label&&(tpo.push('<div style="'+cssObj.label+';" class="gridViewIconLabel">'),tpo.push(format.label),tpo.push("</div>")),format.description&&(tpo.push('<div style="'+cssObj.description+';" class="gridViewIconDescription">'),tpo.push(format.description),tpo.push("</div>")),viewIconObj.buttons&&viewIconObj.buttons.items){tpo.push('<div style="'+cssObj.buttons+';" class="gridViewIconbuttons">');for(var B,bidx=0;bidx<viewIconObj.buttons.items.length&&(B=viewIconObj.buttons.items[bidx]);bidx++)tpo.push('<button type="button" class="viewIconButtonsItem '+B.addClass+'" id="'+cfg.targetID+"_AX_viewIcon_AX_"+itemIndex+"_AX_"+bidx+'">'),tpo.push(B.label),tpo.push("</button> ");tpo.push("</div>")}return tpo.push("</div>"),tpo.join("")},getMobileItem:function(itemIndex,item,mobileView){var cfg=this.config,tpo=[],evenClassName="line"+itemIndex%2,getFormatterValue=this.getFormatterValue.bind(this),trAddClass=(this.getTooltipValue.bind(this),"");if(cfg.body.addClass)try{trAddClass=cfg.body.addClass.call({index:itemIndex,item:item,list:this.list,page:this.page})||""}catch(e){console.log(e)}tpo.push('<section class="bodyViewMobile bodyViewMobile_'+itemIndex+"  "+evenClassName+" "+(mobileView.addClass||"")+'" id="'+cfg.targetID+"_AX_viewMobile_AX_"+itemIndex+'">');for(var CN,__memoCol=null,displayColumnCount=0,cidx=0,__arr=mobileView.column;cidx<__arr.length&&(CN=__arr[cidx]);cidx++)1!=CN.display&&void 0!=CN.display||displayColumnCount++;for(var CN,cidx=0,__arr=mobileView.column;cidx<__arr.length&&(CN=__arr[cidx]);cidx++)if(1==CN.display||void 0==CN.display){var colClass="",colAddClass=CN.addClass||"";if(1===displayColumnCount&&(colAddClass=""),colClass=CN.col?"col"+CN.col:"colNone",null==__memoCol||CN.col||tpo.push("<div style='clear:both;'></div>"),tpo.push("<div class='column "+colClass+" "+trAddClass+" "+colAddClass+"'>"),0!=mobileView.label?(tpo.push("<span class='label'>"+CN.label+"</span>"),tpo.push("<span class='content'>")):tpo.push("<span class='content solid'>"),CN.formatter){for(var colSeq=0;colSeq<cfg.colGroup.length;colSeq++)if(cfg.colGroup[colSeq].key==CN.key){CN.colSeq=colSeq;break}tpo.push(getFormatterValue(CN.formatter,item,itemIndex,item[CN.key],CN.key,CN))}else tpo.push(item[CN.key]);tpo.push("</span>"),tpo.push("</div>"),__memoCol=CN.col}if(tpo.push("<div class='columnClear'></div>"),tpo.push("<div class='buttonGroup'>"),mobileView.buttons)for(var B,bidx=0,__arr=mobileView.buttons;bidx<__arr.length&&(B=__arr[bidx]);bidx++)tpo.push("<a class='buttonGroupItem "+B.addClass+"' id='"+cfg.targetID+"_AX_mobileViewButton_AX_"+itemIndex+"_AX_"+bidx+"'>"),tpo.push("</a>");return tpo.push("</div>"),tpo.push("</section>"),tpo.join("")},getItemMarker:function(itemIndex,item,isfix,markerIndexs){for(var cfg=this.config,tpo=[],evenClassName="gridBodyMarker",getFormatterValue=this.getFormatterValue.bind(this),hasFixed=this.hasFixed,trAddClass="",mi=0,l=markerIndexs.length;l>mi;mi++){var marker=cfg.body.marker[markerIndexs[mi]];if(marker.addClass)try{trAddClass=marker.addClass.call({index:itemIndex,item:item,list:this.list,page:this.page})||""}catch(e){console.log(e)}for(var r=0;r<marker.rows.length;r++){marker.rows.length-1==r;tpo.push('<tr class="gridBodyTr gridBodyMarkerTr_'+itemIndex+" "+evenClassName+" "+trAddClass+'" id="'+cfg.targetID+"_AX_marker_"+r+"_AX_"+(isfix||"n")+"_AX_"+itemIndex+'">');for(var CH,colCount=0,CHidx=0,__arr=marker.rows[r];CHidx<__arr.length&&(CH=__arr[CHidx]);CHidx++)if(CH.display&&CH.colspan>0&&("n"==isfix||void 0!=isfix&&colCount<cfg.fixedColSeq+1)){colCount+=CH.colspan;var rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'" style="vertical-align:'+CH.valign+';"',bottomClass=CH.isLastCell?"":" bodyBottomBorder",fixedClass=CH.isFixedEndCell?" fixedLine":"",bodyNodeClass="";"checkbox"==CH.formatter||"radio"==CH.formatter?bodyNodeClass=" bodyTdCheckBox":"html"==CH.formatter&&(bodyNodeClass=" bodyTdHtml"),tpo.push("<td"+valign+rowspan+colspan+' id="'+cfg.targetID+"_AX_"+(isfix||"n")+"bodyMarker_AX_"+r+"_AX_"+CHidx+"_AX_"+itemIndex+'" class="bodyTd'+bottomClass+fixedClass+'">'),tpo.push('<div class="bodyNode bodyTdText'+bodyNodeClass+'" align="'+CH.align+'" id="'+cfg.targetID+"_AX_bodyMarkerText_AX_"+r+"_AX_"+CHidx+"_AX_"+itemIndex+'">'),hasFixed&&!CH.isFixedCell||!hasFixed||void 0!=isfix?CH.formatter?tpo.push(getFormatterValue(CH.formatter,item,itemIndex,item[CH.key],CH.key,CH)):tpo.push(item[CH.key]):tpo.push("&nbsp;"),tpo.push("</div>"),tpo.push("</td>")}0==r&&"n"==isfix&&tpo.push('<td class="bodyNullTd" id="'+cfg.targetID+"_AX_nullMarker_AX_"+itemIndex+'" rowspan="'+marker.rows.length+'"><div class="tdRelBlock" id="'+cfg.targetID+"_AX_tdRelBlockMarker_AX_"+itemIndex+'">&nbsp;</div></td>'),tpo.push("</tr>")}}return tpo.join("")},getMarkerDisplay:function(itemIndex,item){var cfg=this.config,bodyHasMarker=this.bodyHasMarker;if(!bodyHasMarker)return[];var sendObj={index:itemIndex,list:this.list,item:item,page:this.page},markerDisplay=[];try{for(var marker,m=0,l=cfg.body.marker.length;l>m;m++)marker=cfg.body.marker[m],marker.display.call(sendObj,itemIndex,item)&&markerDisplay.push(m)}catch(e){console.log(e)}return markerDisplay},printList:function(args){args||(args={});var markerIndex,cfg=this.config,bodyHasMarker=this.bodyHasMarker,getItem=this.getItem.bind(this),getItemMarker=this.getItemMarker.bind(this),getMarkerDisplay=this.getMarkerDisplay.bind(this);this.editorOpend&&this.cancelEditor();var getIconItem=this.getIconItem.bind(this),getMobileItem=this.getMobileItem.bind(this),po=[];if("grid"==cfg.viewMode){if("auto"==cfg.__height)for(var item,itemIndex=0,__arr=this.list;itemIndex<__arr.length&&(item=__arr[itemIndex]);itemIndex++)po.push(getItem(itemIndex,item,"n")),bodyHasMarker&&(markerIndex=getMarkerDisplay(itemIndex,item)).length>0&&po.push(getItemMarker(itemIndex,item,"n",markerIndex));else if(this.list.length>0){var firstItem=this.list[0];po.push(getItem(0,firstItem,"n"))}if(0==this.list.length&&(po.push('<tr class="noListTr">'),po.push('<td colspan="'+this.showColLen+'">'),po.push('<div class="tdRelBlock">'),po.push('<div class="bodyNode bodyTdText" align="center">'),po.push(cfg.emptyListMSG),po.push("</div>"),po.push("</div>"),po.push("</td>"),po.push('<td class="bodyNullTd"><div class="tdRelBlock">&nbsp;</div></td>'),po.push("</tr>")),this.cachedDom.tbody.empty(),this.cachedDom.tbody.append(po.join("")),this.hasFixed){if(po=[],"auto"==cfg.__height)for(var item,itemIndex=0,__arr=this.list;itemIndex<__arr.length&&(item=__arr[itemIndex]);itemIndex++)po.push(getItem(itemIndex,item,"fix")),bodyHasMarker&&(markerIndex=getMarkerDisplay(itemIndex,item)).length>0&&po.push(getItemMarker(itemIndex,item,"fix",markerIndex));else this.list.length>0&&po.push(getItem(0,firstItem,"fix"));this.cachedDom.fixed_tbody.empty(),this.cachedDom.fixed_tbody.append(po.join("")),0==this.list.length?this.fixedScrollContent.hide():this.fixedScrollContent.show()}if("auto"!=cfg.__height&&this.list.length>0){var itemTrHeight,printListCount,$itemTr=this.cachedDom.tbody.find("#"+cfg.targetID+"_AX_null_AX_0");if(!$itemTr.get(0))return;itemTrHeight=$itemTr.outerHeight().number(),this.scrollContent.css({"padding-bottom":itemTrHeight}),po=[],printListCount=(this.body.height()/itemTrHeight).ceil(),this.list.length>printListCount+cfg.listCountMargin?printListCount+=cfg.listCountMargin:printListCount=this.list.length;for(var item,itemIndex=0,__arr=this.list;printListCount>itemIndex&&(item=__arr[itemIndex]);itemIndex++)po.push(getItem(itemIndex,item,"n")),bodyHasMarker&&(markerIndex=getMarkerDisplay(itemIndex,item)).length>0&&po.push(getItemMarker(itemIndex,item,"n",markerIndex));if(this.cachedDom.tbody.empty(),this.cachedDom.tbody.append(po.join("")),this.hasFixed){po=[];for(var item,itemIndex=0,__arr=this.list;printListCount>itemIndex&&(item=__arr[itemIndex]);itemIndex++)po.push(getItem(itemIndex,item,"fix")),bodyHasMarker&&(markerIndex=getMarkerDisplay(itemIndex,item)).length>0&&po.push(getItemMarker(itemIndex,item,"fix",markerIndex));this.cachedDom.fixed_tbody.empty(),this.cachedDom.fixed_tbody.append(po.join(""))}this.virtualScroll={startIndex:0,endIndex:printListCount-1,itemTrHeight:itemTrHeight,printListCount:printListCount,scrollTop:0},cfg.mergeCells&&(this.mergeCells(this.cachedDom.tbody,"n"),this.hasFixed&&this.mergeCells(this.cachedDom.fixed_tbody,"f")),this.cachedDom.thpadding.css({height:0}),this.cachedDom.tfpadding.css({height:cfg.scrollContentBottomMargin.number()+(this.list.length-printListCount)*itemTrHeight}),this.hasFixed&&(this.cachedDom.fthpadding.css({height:0}),this.cachedDom.ftfpadding.css({height:cfg.scrollContentBottomMargin.number()+(this.list.length-printListCount)*itemTrHeight})),this.scrollContent.css({top:0}),this.contentScrollContentSync({top:0})}else"auto"==cfg.__height&&this.list.length>0?(this.virtualScroll={startIndex:0,endIndex:this.list.length,itemTrHeight:this.cachedDom.tbody.find("#"+cfg.targetID+"_AX_null_AX_0").outerHeight().number(),printListCount:this.list.length,scrollTop:0},cfg.foot?(this.cachedDom.thpadding.css({height:0}),this.cachedDom.tfpadding.css({height:cfg.scrollContentBottomMargin.number()}),this.hasFixed&&(this.cachedDom.fthpadding.css({height:0}),this.cachedDom.ftfpadding.css({height:cfg.scrollContentBottomMargin.number()}))):(this.cachedDom.thpadding.css({height:0}),this.cachedDom.tfpadding.css({height:cfg.scrollContentBottomMargin.number()}),this.hasFixed&&(this.cachedDom.fthpadding.css({height:0}),this.cachedDom.ftfpadding.css({height:cfg.scrollContentBottomMargin.number()}))),cfg.mergeCells&&(this.mergeCells(this.cachedDom.tbody,"n"),this.hasFixed&&this.mergeCells(this.cachedDom.fixed_tbody,"f")),this.scrollContent.css({top:0}),this.contentScrollContentSync({top:0}),this.gridTargetSetSize()):(this.virtualScroll={startIndex:0,endIndex:0,itemTrHeight:0,printListCount:0,scrollTop:0},this.cachedDom.thpadding.css({height:0}),this.cachedDom.tfpadding.css({height:cfg.scrollContentBottomMargin.number()}),this.hasFixed&&(this.cachedDom.fthpadding.css({height:0}),this.cachedDom.ftfpadding.css({height:cfg.scrollContentBottomMargin.number()})),this.scrollContent.css({top:0}),this.contentScrollContentSync({top:0}));if(this.body.find(".gridBodyTr").bind("mouseover",this.gridBodyOver.bind(this)),this.body.find(".gridBodyTr").bind("mouseout",this.gridBodyOut.bind(this)),this.body.find(".gridBodyTr:not(.gridBodyMarker)").bind("click",this.gridBodyClick.bind(this)),this.needBindDBLClick()&&this.body.find(".gridBodyTr").bind("dblclick",this.gridBodyDBLClick.bind(this)),this.selectedRow&&this.selectedRow.length>0){for(var itemIndex=0,__arr=this.selectedRow;itemIndex<__arr.length;itemIndex++)this.body.find(".gridBodyTr_"+__arr[itemIndex]).addClass("selected");var itemIndex=this.selectedRow.last(),itemDom=this.body.find(".gridBodyTr_"+itemIndex);if(itemDom[0]){var trHeight,trTop=itemDom.position().top,bodyHeight=(this.scrollContent.height(),this.body.height()),$itemTr=this.cachedDom.tbody.find("#"+cfg.targetID+"_AX_null_AX_0");if(!$itemTr.get(0))return;if(trHeight=$itemTr.outerHeight().number(),trTop.number()+trHeight.number()>bodyHeight){var scrollTop=bodyHeight-(trTop.number()+itemTrHeight.number());this.scrollContent.css({top:scrollTop-cfg.listCountMargin}),this.contentScrollContentSync({top:scrollTop-cfg.listCountMargin},null,args.reload)}else if(0==trTop.number()){var scrollTop=0;this.scrollContent.css({top:scrollTop}),this.contentScrollContentSync({top:scrollTop},null,args.reload)}this.bigDataSync("reload")}}if(cfg.body.onchangeScroll){var sendObj=axf.copyObject(this.virtualScroll);cfg.body.onchangeScroll.call(sendObj,sendObj)}}else if("icon"==cfg.viewMode){var viewIconObj=cfg.view,viewIconCss=[];viewIconCss.push("width:"+viewIconObj.width.number()+"px"),viewIconCss.push("height:"+viewIconObj.height.number()+"px"),viewIconObj.style&&viewIconCss.push(viewIconObj.style);var viewIconImgCss=[];viewIconImgCss.push("left:"+viewIconObj.img.left.number()+"px"),viewIconImgCss.push("top:"+viewIconObj.img.top.number()+"px"),viewIconImgCss.push("width:"+viewIconObj.img.width.number()+"px"),viewIconImgCss.push("height:"+viewIconObj.img.height.number()+"px"),viewIconObj.img.style&&viewIconImgCss.push(viewIconObj.img.style);var viewIconLabelCss=[];viewIconLabelCss.push("left:"+viewIconObj.label.left.number()+"px"),viewIconLabelCss.push("top:"+viewIconObj.label.top.number()+"px"),viewIconLabelCss.push("width:"+viewIconObj.label.width.number()+"px"),viewIconLabelCss.push("height:"+viewIconObj.label.height.number()+"px"),viewIconObj.label.style&&viewIconLabelCss.push(viewIconObj.label.style);var viewIconDescriptionCss=[];viewIconDescriptionCss.push("left:"+viewIconObj.description.left.number()+"px"),viewIconDescriptionCss.push("top:"+viewIconObj.description.top.number()+"px"),viewIconDescriptionCss.push("width:"+viewIconObj.description.width.number()+"px"),viewIconDescriptionCss.push("height:"+viewIconObj.description.height.number()+"px"),viewIconObj.description.style&&viewIconDescriptionCss.push(viewIconObj.description.style);var viewIconButtonsCss=[];viewIconObj.buttons&&(viewIconButtonsCss.push("left:"+viewIconObj.buttons.left.number()+"px"),viewIconButtonsCss.push("top:"+viewIconObj.buttons.top.number()+"px"),viewIconButtonsCss.push("width:"+viewIconObj.buttons.width.number()+"px"),viewIconButtonsCss.push("height:"+viewIconObj.buttons.height.number()+"px"),viewIconObj.buttons.style&&viewIconButtonsCss.push(viewIconObj.buttons.style));for(var item,cssObj={box:viewIconCss.join(";"),img:viewIconImgCss.join(";"),label:viewIconLabelCss.join(";"),description:viewIconDescriptionCss.join(";"),buttons:viewIconButtonsCss.join(";")},itemIndex=0,__arr=this.list;itemIndex<__arr.length&&(item=__arr[itemIndex]);itemIndex++)po.push(getIconItem(itemIndex,item,viewIconObj,cssObj));po.push("<div style='clear:both;'></div>");var gridBodyDiv=axdom("#"+cfg.targetID+"_AX_gridBodyDiv");if(gridBodyDiv.empty(),gridBodyDiv.append(po.join("")),this.body.find(".bodyViewIcon").bind("click",this.gridBodyClick.bind(this)),this.needBindDBLClick()&&this.body.find(".bodyViewIcon").bind("dblclick",this.gridBodyDBLClick.bind(this)),this.selectedRow&&this.selectedRow.length>0)for(var item,body=this.body,itemIndex=0,__arr=this.selectedRow;itemIndex<__arr.length&&(item=__arr[itemIndex]);itemIndex++)body.find(".bodyViewIcon_"+item).addClass("selected");var _list=this.list,iconButtonClick=function(event){var ids=event.target.id.split(/_AX_/g),itemIndex=ids[ids.length-2],buttonIndex=ids[ids.length-1];viewIconObj.buttons.items[buttonIndex].onclick&&viewIconObj.buttons.items[buttonIndex].onclick.call({index:itemIndex,list:_list,item:_list[itemIndex],buttonItem:viewIconObj.buttons.items[buttonIndex]})},iconButtonClickBind=iconButtonClick.bind(this);this.body.find(".bodyViewIcon .viewIconButtonsItem").bind("click",function(event){iconButtonClickBind(event)})}else if("mobile"==cfg.viewMode){var mobileView=cfg.view;if(void 0==mobileView){for(var CG,columns=[],cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++){var col=null,addClass="";CG.widthAstric||CG.width.number()>=200?(col=4,addClass="underLine"):CG.width.number()>=100?col=2:CG.width.number()>=40,columns.push({key:CG.key,label:CG.label,col:col,formatter:CG.formatter,addClass:addClass,sort:CG.sort||"",display:CG.display||!0})}columns=columns.sort(function(pItem,nItem){var v1=pItem.col,v2=nItem.col;return v2>v1?1:v1>v2?-1:v1==v2?0:void 0}),mobileView={labelView:!0,column:columns}}for(var item,itemIndex=0,__arr=this.list;itemIndex<__arr.length&&(item=__arr[itemIndex]);itemIndex++)po.push(getMobileItem(itemIndex,item,mobileView));if(0==this.list.length&&(po.push('<div class="bodyViewMobile" align="center">'),po.push(cfg.emptyListMSG),po.push("</div>")),axdom("#"+cfg.targetID+"_AX_gridBodyDiv").empty(),axdom("#"+cfg.targetID+"_AX_gridBodyDiv").append(po.join("")),this.body.find(".bodyViewMobile").bind("click",this.gridBodyClick.bind(this)),this.needBindDBLClick()&&this.body.find(".bodyViewMobile").bind("dblclick",this.gridBodyDBLClick.bind(this)),this.selectedRow&&this.selectedRow.length>0)for(var item,body=this.body,itemIndex=0,__arr=this.selectedRow;itemIndex<__arr.length&&(item=__arr[itemIndex]);itemIndex++)body.find(".bodyViewMobile_"+item).addClass("selected");var _list=this.list,mobileButtonClick=function(event){var ids=event.target.id.split(/_AX_/g),itemIndex=ids[ids.length-2],buttonIndex=ids[ids.length-1];mobileView.buttons[buttonIndex].onclick&&mobileView.buttons[buttonIndex].onclick.call({index:itemIndex,list:_list,item:_list[itemIndex],buttonItem:mobileView.buttons[buttonIndex]})};mobileButtonClick.bind(this);this.body.find(".bodyViewMobile").find(".buttonGroupItem").bind("click",function(event){mobileButtonClick(event)})}this.selectedCells.clear(),"undefined"==typeof args?this.contentScrollResize():"undefined"!=typeof args&&args.sort&&this.contentScrollResize(!1),this.contentScrollXAttr=null,this.contentScrollYAttr=null},updateList:function(itemIndex,item){var cfg=this.config;if(this.cancelEditor(),"C"==item._CUD);else{if("D"==item._CUD)return void toast.push("삭제된 아이템 입니다. 수정할 수 없습니다.");item._CUD="U"}this.list[itemIndex]=item;var npo=this.getItem(itemIndex,item,"n","notr");if(this.hasFixed)var fpo=this.getItem(itemIndex,item,"fix","notr");axdom("#"+cfg.targetID+"_AX_tbody").find(".gridBodyTr_"+itemIndex).html(npo),this.hasFixed&&axdom("#"+cfg.targetID+"_AX_fixedTbody").find(".gridBodyTr_"+itemIndex).html(fpo);var trAddClass="";if(cfg.body.addClass)try{trAddClass=cfg.body.addClass.call({index:itemIndex,item:item,list:this.list})||""}catch(e){console.log(e)}axdom("#"+cfg.targetID+"_AX_tbody").find(".gridBodyTr_"+itemIndex).addClass(trAddClass),this.hasFixed&&axdom("#"+cfg.targetID+"_AX_fixedTbody").find(".gridBodyTr_"+itemIndex).addClass(trAddClass),this.redrawDataSet()},pushList:function(pushItem,insertIndex){this.config;if(this.inline_edit)return setTimeout(function(){this.pushList(pushItem,insertIndex)}.bind(this),300),this;this.cancelEditor();var pushData=[];if(pushData=Object.isArray(pushItem)?pushItem:[pushItem],pushItem._CUD="C",null!=insertIndex&&"undefined"!=typeof insertIndex){insertIndex>this.list.length&&(insertIndex=this.list.length);for(var L,itemIndex=insertIndex,newList=[],listIndex=0,__arr=this.list;listIndex<__arr.length&&(L=__arr[listIndex]);listIndex++){if(listIndex==itemIndex)for(var li=0;li<pushData.length;li++)newList.push(pushData[li]);newList.push(L)}if(listIndex==itemIndex)for(var li=0;li<pushData.length;li++)newList.push(pushData[li]);this.list=newList,this.printList(),this.contentScrollResize(!1),this.setFocus(itemIndex)}else{for(var li=0;li<pushData.length;li++)this.list.push(pushData[li]);this.printList(),this.contentScrollResize(!1)}return this.setStatus(this.list.length),this.redrawDataSet(),this},fetchList:function(list){var cfg=this.config,VS=this.virtualScroll;this.list=this.list.concat(list),this.cachedDom.tfpadding.css({height:cfg.scrollContentBottomMargin.number()+(this.list.length-VS.startIndex-1)*VS.itemTrHeight}),this.hasFixed&&this.cachedDom.ftfpadding.css({height:cfg.scrollContentBottomMargin.number()+(this.list.length-VS.endIndex-1)*VS.itemTrHeight}),cfg.page.paging||this.setStatus(this.list.length),this.contentScrollResize(!1)},removeList:function(removeList){console.log(removeList);var cfg=this.config;if(cfg.passiveMode){var _list=this.list,collect=[];axf.each(removeList,function(ridx,r){axf.each(_list,function(lidx,l){var isDel=!1;axf.each(r,function(k,v){return l[k]!=v?(isDel=!1,!1):void(isDel=!0)}),isDel?(cfg.passiveRemoveHide?l._isDel=!0:"C"!=l._CUD?l._CUD="D":l._isDel=!0,collect.push(l)):collect.push(l)})}),this.list=collect}else{var collect=[];axf.each(this.list,function(lidx,l){var isPush=!0;axf.each(removeList,function(ridx,r){return axf.each(r,function(k,v){return l[k]==v?(isPush=!1,!1):void 0}),isPush?void 0:!1}),isPush&&collect.push(l)}),this.list=collect}"grid"==cfg.viewMode&&"auto"!=cfg.height?this.bigDataSync(!0):(this.printList(),this.contentScrollResize()),this.setStatus(this.list.length),this.redrawDataSet()},removeListIndex:function(removeList){var cfg=this.config,_list=this.list;if(cfg.passiveMode){axf.each(removeList,function(ridx,r){_list[r.index]&&(cfg.passiveRemoveHide?_list[r.index]._isDel=!0:"C"!=_list[r.index]._CUD?_list[r.index]._CUD="D":_list[r.index]._isDel=!0)});var collect=[],removeCollect=this.removedList;axf.each(_list,function(){this._isDel?"C"!=this._CUD&&removeCollect.push(this):collect.push(this)}),this.list=collect,this.removedList=removeCollect}else{var collect=[];axf.each(removeList,function(ridx,r){_list[r.index]&&(_list[r.index]._isDel=!0)});var collect=[],removeCollect=this.removedList;axf.each(_list,function(){this._isDel?removeCollect.push(this):collect.push(this)}),this.list=collect,this.removedList=removeCollect}this.selectedCells.clear(),this.selectedRow.clear(),"grid"==cfg.viewMode&&"auto"!=cfg.height?this.bigDataSync(!0):(this.printList(),this.contentScrollResize()),this.setStatus(this.list.length),this.redrawDataSet()},restoreList:function(restoreList){for(var cfg=this.config,collect=[],lidx=0;lidx<this.list.length;lidx++){for(var isDel=!1,l=this.list[lidx],ridx=0;ridx<restoreList.length;ridx++){var r=restoreList[ridx];if(axf.each(r,function(k,v){return l[k]!=v?(isDel=!1,!1):void(isDel=!0)}),isDel)break}isDel?("D"==l._CUD&&(l._CUD=""),collect.push(l)):collect.push(l)}this.list=collect,"grid"==cfg.viewMode&&"auto"!=cfg.height?this.bigDataSync(!0):(this.printList(),this.contentScrollResize()),this.setStatus(this.list.length),this.redrawDataSet()},gridBodyOver:function(event){this.config;this.overedItemIndex&&this.body.find(".gridBodyTr_"+this.overedItemIndex).removeClass("hover");var itemIndex=event.target.id.split(/_AX_/g).last();""!=itemIndex&&(this.body.find(".gridBodyTr_"+itemIndex).addClass("hover"),this.overedItemIndex=itemIndex),this.onevent_grid({type:"grid-list-over"})},gridBodyOut:function(event){this.config;this.overedItemIndex&&this.body.find(".gridBodyTr_"+this.overedItemIndex).removeClass("hover")},gridBodyClick:function(event){var cfg=this.config;if("input"!=event.target.tagName.toLowerCase()||"radio"!=event.target.type&&"checkbox"!=event.target.type)if(!cfg.body.ondblclick||event.shiftKey||event.metaKey||event.ctrlKey)this.gridBodyClickAct(event);else if(this.needBindDBLClick())clearTimeout(this.bodyClickObserver),this.gridBodyClickAct(event);else{if(this.bodyClickObserver)return clearTimeout(this.bodyClickObserver),this.gridBodyDBLClick(event),void(this.bodyClickObserver=null);var gridBodyClickAct=this.gridBodyClickAct.bind(this);this.bodyClickObserver=setTimeout(function(){gridBodyClickAct(event)},400)}else this.gridBodyClickAct(event)},gridBodyClickAct:function(event){this.bodyClickObserver=null;var cfg=this.config,eventTarget=event.target;if(""!=event.target.id){var checkedValue,isoncheck=!1;if("input"==eventTarget.tagName.toLowerCase()&&!eventTarget.disabled&&("checkbox"==eventTarget.type.toLowerCase()||"radio"==eventTarget.type.toLowerCase())){isoncheck=!0,checkedValue=eventTarget.checked;var ieid=event.target.id.split(/_AX_/g),checkboxColSeq=ieid[ieid.length-2],checkboxIndex=ieid[ieid.length-1];if(cfg.colGroup[checkboxColSeq]&&cfg.colGroup[checkboxColSeq].oncheck){var sendObj={index:checkboxIndex,list:this.list,item:this.list[checkboxIndex]};try{cfg.colGroup[checkboxColSeq].oncheck.call(sendObj,event.target.checked)}catch(e){console.log(e)}}}}if(isoncheck){var targetID=event.target.id,itemIndex=targetID.split(/_AX_/g).last(),ids=targetID.split(/_AX_/g);if(ids.length<4)return;var item=this.list[itemIndex],r=ids[ids.length-3],c=ids[ids.length-2];if("radio"===cfg.colGroup[c].formatter)for(var ii=0,ll=this.list.length;ll>ii;ii++)"undefined"==typeof this.list[ii].___checked&&(this.list[ii].___checked={}),this.list[ii].___checked[c]=!1;"undefined"==typeof this.list[itemIndex].___checked&&(this.list[itemIndex].___checked={}),this.list[itemIndex].___checked[c]=checkedValue;var sendObj=(event.target,event.target.checked,{index:itemIndex,target:event.target,checked:event.target.checked,r:r,c:c,list:this.list,item:item,page:this.page});try{cfg.body.oncheck&&cfg.body.oncheck.call(sendObj,itemIndex,item)}catch(e){console.log(e)}}else{var myTarget=axf.get_event_target(eventTarget,function(el){var edom=axdom(el);return!edom.hasClass("buttonGroupItem")&&(edom.hasClass("bodyTd")||edom.hasClass("bodyViewIcon")||edom.hasClass("bodyViewMobile"))});if("grid"==cfg.viewMode){if(myTarget){
  var body=this.body,targetID=myTarget.id,itemIndex=targetID.split(/_AX_/g).last(),ids=targetID.split(/_AX_/g),len=this.selectedRow.length,_selectedRow=[],hasItem=!1,r=ids[ids.length-3],c=ids[ids.length-2],CG=cfg.colGroup[cfg.body.rowsEmpty?c:cfg.body.rows[r][c].colSeq||c],i=0;if(this._focusedItemIndex=itemIndex,this.editCellClear(r,c,itemIndex)===!1&&CG.editor)return this;if(event.shiftKey){if(this.selectedCells.length>0&&(axf.each(this.selectedCells,function(){body.find(".bodyTd_"+this).removeClass("selected")}),this.selectedCells.clear()),len>0){var st_index,ed_index,l_itemIndex=this.selectedRow.last().number(),itemIndex=itemIndex.number();itemIndex>l_itemIndex?(st_index=l_itemIndex+1,ed_index=itemIndex):(st_index=itemIndex,ed_index=l_itemIndex);for(var k=st_index;ed_index+1>k;k++){for(hasItem=!1,i=0;len>i;i++)if(k==this.selectedRow[i].number()){hasItem=!0;break}hasItem||(this.body.find(".gridBodyTr_"+k).addClass("selected"),this.selectedRow.push(k))}}else this.body.find(".gridBodyTr_"+itemIndex).addClass("selected"),this.selectedRow.push(itemIndex.number());this.clearRange()}else if(event.metaKey||event.ctrlKey){for(this.selectedCells.length>0&&(axf.each(this.selectedCells,function(){body.find(".bodyTd_"+this).removeClass("selected")}),this.selectedCells.clear());len>i;i++)this.selectedRow[i]==itemIndex.number()?(body.find(".gridBodyTr_"+itemIndex).removeClass("selected"),hasItem=!0):_selectedRow.push(this.selectedRow[i]);this.selectedRow=_selectedRow,hasItem||(body.find(".gridBodyTr_"+itemIndex).addClass("selected"),this.selectedRow.push(itemIndex.number())),this.clearRange()}else{if(this.selectedCells.length>0&&(axf.each(this.selectedCells,function(){body.find(".bodyTd_"+this).removeClass("selected")}),this.selectedCells.clear()),!CG.editor||"checkbox"!=CG.editor.type&&"radio"!=CG.editor.type&&"select"!=CG.editor.type&&"AXSelect"!=CG.editor.type){if(this.selectedRow.length>0){if(CG.editor&&cfg.control_lock_status<1){for(;len>i;i++)if(this.selectedRow[i]==itemIndex){hasItem=!0;break}hasItem&&this.editCell(r,c,itemIndex)}if(!hasItem)for(i=0;len>i;i++)body.find(".gridBodyTr_"+this.selectedRow[i]).removeClass("selected")}}else this.editCell(r,c,itemIndex,0,event);this.selectedRow.clear(),this.body.find(".gridBodyTr_"+itemIndex).addClass("selected"),this.selectedRow.push(itemIndex.number()),cfg.mergeCells&&function(){for(var colGroupLen=0,nowTrTd=this.body.find(".gridBodyTable .gridBodyTr_"+itemIndex).find("td"),i=0,l=cfg.colGroup.length;l>i;i++)cfg.colGroup[i].display&&colGroupLen++;if(colGroupLen==nowTrTd.length-1){for(var i=0,l=nowTrTd.length;l>i;i++)if(nowTrTd[i].getAttribute("rowspan")>1){for(var ai=0;ai<nowTrTd[i].getAttribute("rowspan")-1;ai++)this.body.find(".gridBodyTr_"+(Number(itemIndex)+ai+1)).addClass("selected"),this.selectedRow.push(Number(itemIndex)+ai+1);break}}else{this.selectedRow.clear();var finding=!0,parentItemIndex=itemIndex,safeLoop=0;do{parentItemIndex-=1;var _nowTrTd=this.body.find(".gridBodyTable .gridBodyTr_"+parentItemIndex).find("td");if(colGroupLen==_nowTrTd.length-1){for(var i=0,l=_nowTrTd.length;l>i;i++)if(_nowTrTd[i].getAttribute("rowspan")>1){for(var ai=0;ai<_nowTrTd[i].getAttribute("rowspan");ai++)this.body.find(".gridBodyTr_"+(Number(parentItemIndex)+ai)).addClass("selected"),this.selectedRow.push(Number(parentItemIndex)+ai);break}finding=!1}safeLoop++,safeLoop>1e3&&(finding=!1)}while(finding)}}.call(this),this.body.find(".gridBodyTr_"+itemIndex).find(".bodyTd_"+c+".bodyTdr_"+r).addClass("selected"),this.selectedCells.push(c);var item=this.list[itemIndex];if(!hasItem&&cfg.body.onclick){var sendObj={index:itemIndex,r:r,c:c,list:this.list,item:item,page:this.page};try{cfg.body.onclick.call(sendObj,itemIndex,item)}catch(e){console.log(e)}}}}}else if("icon"==cfg.viewMode){if(myTarget){var targetID=myTarget.id,itemIndex=targetID.split(/_AX_/g).last();if(this._focusedItemIndex=itemIndex,event.shiftKey);else if(!event.metaKey&&!event.ctrlKey){if(this.selectedRow.length>0){var body=this.body;axf.each(this.selectedRow,function(){body.find(".bodyViewIcon_"+this).removeClass("selected")})}this.selectedRow.clear(),this.body.find(".bodyViewIcon_"+itemIndex).addClass("selected"),this.selectedRow.push(itemIndex);var item=this.list[itemIndex];if(cfg.body.onclick){var sendObj={index:itemIndex,list:this.list,item:item,page:this.page};try{cfg.body.onclick.call(sendObj,itemIndex,item)}catch(e){console.log(e)}}}}}else if("mobile"==cfg.viewMode&&myTarget){var targetID=myTarget.id,itemIndex=targetID.split(/_AX_/g).last();if(this._focusedItemIndex=itemIndex,event.shiftKey);else if(event.metaKey||event.ctrlKey);else{if(this.selectedRow.length>0){var body=this.body;axf.each(this.selectedRow,function(){body.find(".bodyViewMobile_"+this).removeClass("selected")})}this.selectedRow.clear(),this.body.find(".bodyViewMobile_"+itemIndex).addClass("selected"),this.selectedRow.push(itemIndex);var item=this.list[itemIndex];if(cfg.body.onclick){var sendObj={index:itemIndex,list:this.list,item:item,page:this.page};try{cfg.body.onclick.call(sendObj,itemIndex,item)}catch(e){console.log(e)}}}}this.onevent_grid({type:"grid-list-click"})}},gridBodyDBLClick:function(event){var cfg=this.config,eventTarget=event.target;if("input"!=eventTarget.tagName.toLowerCase()&&"button"!=eventTarget.tagName.toLowerCase()){var myTarget=axf.get_event_target(eventTarget,function(el){var edom=axdom(el);return!edom.hasClass("buttonGroupItem")&&(edom.hasClass("bodyTd")||edom.hasClass("bodyViewIcon")||edom.hasClass("bodyViewMobile"))});if("grid"==cfg.viewMode){if(myTarget){var targetID=myTarget.id,itemIndex=targetID.split(/_AX_/g).last(),ids=targetID.split(/_AX_/g);if(this.selectedRow.length>0){var body=this.body;axf.each(this.selectedRow,function(){body.find(".gridBodyTr_"+this).removeClass("selected")})}if(this.selectedRow.clear(),this.body.find(".gridBodyTr_"+itemIndex).addClass("selected"),this.selectedRow.push(itemIndex),cfg.body.ondblclick){var r=ids[ids.length-3],c=ids[ids.length-2],item=this.list[itemIndex],sendObj={index:itemIndex,r:r,c:c,list:this.list,item:item,page:this.page};try{cfg.body.ondblclick.call(sendObj,itemIndex,item)}catch(e){console.log(e)}}}}else if("icon"==cfg.viewMode){if(myTarget){var targetID=myTarget.id,itemIndex=targetID.split(/_AX_/g).last();if(this.selectedRow.length>0){var body=this.body;axf.each(this.selectedRow,function(){body.find(".bodyViewIcon_"+this).removeClass("selected")})}if(this.selectedRow.clear(),this.body.find(".bodyViewIcon_"+itemIndex).addClass("selected"),this.selectedRow.push(itemIndex),cfg.body.ondblclick){var item=this.list[itemIndex],sendObj={index:itemIndex,list:this.list,item:item,page:this.page};try{cfg.body.ondblclick.call(sendObj,itemIndex,item)}catch(e){console.log(e)}}}}else if("mobile"==cfg.viewMode&&myTarget){var targetID=myTarget.id,itemIndex=targetID.split(/_AX_/g).last();if(this.selectedRow.length>0){var body=this.body;axf.each(this.selectedRow,function(){body.find(".bodyViewMobile_"+this).removeClass("selected")})}if(this.selectedRow.clear(),this.body.find(".bodyViewMobile_"+itemIndex).addClass("selected"),this.selectedRow.push(itemIndex),cfg.body.ondblclick){var item=this.list[itemIndex],sendObj={index:itemIndex,list:this.list,item:item,page:this.page};try{cfg.body.ondblclick.call(sendObj,itemIndex,item)}catch(e){console.log(e)}}}this.stopEvent(event),this.clearRange()}},editCell:function(r,c,ii,times,event){this.setFocus(ii);var get_editor,_this=this,cfg=this.config,CG=cfg.colGroup[cfg.body.rowsEmpty?c:cfg.body.rows[r][c].colSeq||c],po=[],that={item:this.list[ii],index:ii,CG:CG,r:r,c:c};if(CG.editor.disabled&&CG.editor.disabled.call(that))return this;if(CG.editor.createEdit===!1&&"C"==that.item._CUD)return this;if(CG.editor.updateEdit===!1&&"C"!=that.item._CUD)return this;var trackX=_this.scrollTrackX;if(trackX.is(":visible")){var _r=r,_c=c,colHeadRows=cfg.colHead.rows;if(colHeadRows.length>1){if(!this.config.colHead._headerRow){this.config.colHead._headerRow={};for(var i=0;i<colHeadRows.length;i++)for(var j=0;j<colHeadRows[i].length;j++)this.config.colHead._headerRow[colHeadRows[i][j].key]={r:i,c:j}}_r=this.config.colHead._headerRow[that.CG.key].r,_c=this.config.colHead._headerRow[that.CG.key].c}var selColHeader=jQuery("#"+cfg.targetID+"_AX_colHead_AX_"+_r+"_AX_"+_c),scrollXW=_this.scrollXHandle.width(),trackXW=trackX.width(),editHeaderLW=selColHeader.position().left+selColHeader.width(),absEditHeaderLW=editHeaderLW-Math.abs(_this.colHead.position().left),_leftval=0,scrollSyncFlag=!1;absEditHeaderLW>0&&2*trackXW>absEditHeaderLW?absEditHeaderLW>trackXW?(scrollSyncFlag=!0,_leftval=_this.scrollXHandle.position().left+(absEditHeaderLW-trackXW)/(_this.colHead.width()/trackXW),_leftval+=10):selColHeader.width()>absEditHeaderLW&&(scrollSyncFlag=!0,_leftval=_this.scrollXHandle.position().left-(selColHeader.width()-absEditHeaderLW)/(_this.colHead.width()/trackXW),_leftval-=10):(scrollSyncFlag=!0,_leftval=editHeaderLW/(_this.colHead.width()/trackXW)-scrollXW/2),scrollSyncFlag&&(_leftval=0>_leftval?0:_leftval>trackXW-scrollXW?trackXW-scrollXW:_leftval,_this.contentScrollScrollSync({left:_leftval}),_this.scrollXHandle.css("left",_leftval+"px"))}if(this.editCellClear(),"checkbox"==CG.editor.type||"radio"==CG.editor.type){if("radio"==CG.editor.type)for(var _i=0,_l=this.list.length;_l>_i;_i++)this.list[_i][CG.key]=!1;var checkbox_els=_this.body.find('[data-editor-key="'+ii+","+c+'"]').get(0);return event&&"INPUT"!=event.target.tagName&&"checkbox"==CG.editor.type?_this.updateItem(r,c,ii,!checkbox_els.checked):event&&"INPUT"!=event.target.tagName&&"radio"==CG.editor.type?_this.updateItem(r,c,ii,!0):_this.updateItem(r,c,ii,checkbox_els.checked),this}return"finder"==CG.editor.type?(CG.editor.finder.onclick.call({id:cfg.targetID+"_inline_editor",value:jQuery("#"+cfg.targetID+"_inline_editor").val(),r:r,c:c,index:ii,item:_this.list[ii]}),this):(setTimeout(function(){var td,td_ids,td_val,parent_type,inline_editor_id,inline_editor,inline_css,div=_this.body.find("#"+cfg.targetID+"_AX_bodyText_AX_"+r+"_AX_"+c+"_AX_"+ii),AXBindConfig={};return div.get(0)?(td=div.parent(),td_ids=td.get(0).id.split(/_AX_/g),td_val=_this.list[ii][CG.key],parent_type=td_ids[td_ids.length-4],inline_editor_id=cfg.targetID+"_AX_inline_editor_AX_"+r+"_AX_"+c+"_AX_"+ii,td_val=_this.getFormatterValue(CG.editor.formatter,_this.list[ii],ii,td_val,CG.key,{},0),po.push('<div class="inline-editor" id="'+inline_editor_id+'">'),po.push(get_editor(CG.editor,td_val)),po.push("</div>"),div.after(po.join("")),inline_editor=jQuery("#"+inline_editor_id),inline_css=div.position(),inline_css.width=div.width(),inline_editor.css(inline_css).find("input").select(),_this.inline_edit={editor:inline_editor,r:r,c:c,ii:ii,cell:div},inline_editor.find("input").get(0)&&"calendar"!=CG.editor.type&&"AXSelector"!=CG.editor.type&&jQuery(document.body).unbind("click.axgrid").bind("click.axgrid",function(e){var target=axf.get_event_target(e.target,{id:inline_editor_id});target||(_this.updateItem(r,c,ii,inline_editor.find("input").val()),jQuery(document.body).unbind("click.axgrid"),_this.gridFocus.focus())}),jQuery.extend(AXBindConfig,CG.editor.config),CG.editor.type in _this.inlineEditor&&_this.inlineEditor[CG.editor.type].init.call(_this,inline_editor,AXBindConfig,CG,r,c,ii),void inline_editor.bind("keydown",function(e){if(e||(e=window.event),(e.keyCode==axf.Event.KEY_RETURN||e.keyCode==axf.Event.KEY_TAB)&&!e.altKey)try{e.preventDefault&&event.preventDefault(),e.stopPropagation&&event.stopPropagation(),e.cancelBubble=!0}catch(err){}setTimeout(function(){if(e.keyCode!=axf.Event.KEY_DOWN&&e.keyCode!=axf.Event.KEY_UP&&e.keyCode!=axf.Event.KEY_RETURN&&e.keyCode!=axf.Event.KEY_TAB||e.altKey)e.keyCode==axf.Event.KEY_ESC&&_this.editCellClear();else{if(e.keyCode!=axf.Event.KEY_RETURN&&e.keyCode!=axf.Event.KEY_TAB||(jQuery(document.body).trigger("click.axgrid"),_this.gridFocus.focus()),e.keyCode==axf.Event.KEY_RETURN||e.keyCode==axf.Event.KEY_UP||e.keyCode==axf.Event.KEY_DOWN){var new_ii;new_ii=e.shiftKey&&e.keyCode==axf.Event.KEY_RETURN||e.keyCode==axf.Event.KEY_UP?ii.number()-1:ii.number()+1,0>new_ii&&(new_ii=_this.list.length-1),_this.list.length>new_ii&&_this.editCell(r,c,new_ii)}else if(e.keyCode==axf.Event.KEY_TAB){var new_c,ci,cl;if(ci=0,cl=cfg.colGroup.length,e.shiftKey&&e.keyCode==axf.Event.KEY_TAB){for(ci=cl-1;ci>-1;ci--)if(cfg.colGroup[ci].editor&&"finder"!=cfg.colGroup[ci].editor.type)if("undefined"==typeof new_c)new_c=ci;else if(c>ci){new_c=ci;break}}else for(;cl>ci;ci++)if(cfg.colGroup[ci].editor&&"finder"!=cfg.colGroup[ci].editor.type)if("undefined"==typeof new_c)new_c=ci;else if(ci>c){new_c=ci;break}_this.editCell(r,new_c,ii)}_this.stopEvent(e)}},10)})):(3>(0|times)?_this.editCell(r,c,ii,(0|times)+1):console.log("에디팅 타겟을 찾을 수 없습니다. AXGrid.editCell"),!1)},10),get_editor=function(cond,val){"undefined"==typeof val&&(val="");var _val,po=[],maxLength="";if(cond.maxLength&&(maxLength=' maxLength="'+cond.maxLength+'"'),"select"===cond.type||"AXSelect"===cond.type){if(_val="string"==typeof val||"number"==typeof val||"boolean"==typeof val?val:val[cond.optionValue||"optionValue"],po.push('<select name="inline_editor_item" id="'+cfg.targetID+'_inline_editor" class="inline_editor_select '+cond.type+'">'),$.isFunction(cond.options))!function(options){for(var oi=0;oi<options.length;oi++){var value,text;value=options[oi][cond.optionValue||"optionValue"],text=options[oi][cond.optionText||"optionText"],po.push('<option value="'+value+'"'),value==_val&&po.push(' selected="selected"'),po.push(">"+text+"</option>")}}(cond.options.call({list:_this.list,item:_this.list[ii],value:val}));else if(cond.options)for(var oi=0;oi<cond.options.length;oi++){var value,text;value=cond.options[oi][cond.optionValue||"optionValue"],text=cond.options[oi][cond.optionText||"optionText"],po.push('<option value="'+value+'"'),value==_val&&po.push(' selected="selected"'),po.push(">"+text+"</option>")}po.push("</select>")}else"AXSelector"===cond.type?(_val="string"==typeof val||"number"==typeof val||"boolean"==typeof val?val:cond.config.reserveKeys?val[cond.config.reserveKeys.optionText]:val.optionText,po.push('<input type="text" name="inline_editor_item" id="'+cfg.targetID+'_inline_editor" value="'+_val+'" class="inline_editor_input '+cond.type+'" '+(cond.readonly?'readonly="readonly"':"")+" />")):"finder"==cond.type?(po.push('<input type="text" name="inline_editor_item" id="'+cfg.targetID+'_inline_editor"'+maxLength+' value="'+val+'" '),cond.readonly?(po.push(' class="inline_editor_input '+cond.type+'" '),po.push(' readonly="readonly" ')):po.push(' class="inline_editor_input '+cond.type+'" '),po.push(" />"),po.push('<a class="finder-handle"></a>')):po.push('<input type="'+(cond.textType||"text")+'" name="inline_editor_item" id="'+cfg.targetID+'_inline_editor"'+maxLength+' value="'+val+'" class="inline_editor_input '+cond.type+'" '+(cond.readonly?'readonly="readonly"':"")+" />");return po.join("")},this)},editCellClear:function(){if(this.inline_edit){if(this.inline_edit.r==arguments[0]&&this.inline_edit.c==arguments[1]&&this.inline_edit.ii==arguments[2])return!1;if("undefined"!=typeof arguments[2]&&this.inline_edit&&this.inline_edit.editor.find("input").get(0)){var r,c,ii,ids=this.inline_edit.editor.get(0).id.split(/_AX_/g);r=ids[ids.length-3],c=ids[ids.length-2],ii=ids[ids.length-1],this.updateItem(r,c,ii,this.inline_edit.editor.find("input").val())}else{try{this.inline_edit.editor.find("input").unbindInput()}catch(e){}this.inline_edit.editor.remove(),this.inline_edit=null}}return jQuery(document.body).unbind("click.axgrid"),this},setEditCellValue:function(val){return this.inline_edit&&this.inline_edit.editor.find("input, select, textarea").val(val),this},updateItem:function(r,c,itemIndex,value){function cellUpdate(){if(_this.inline_edit.cell.html(_this.getFormatterValue(CH.formatter,item,itemIndex,item[CH.key],CH.key,CH,c)),CG.editor.updateWith)for(var i=0,l=CG.editor.updateWith.length;l>i;i++){var wCH,wc,v=CG.editor.updateWith[i];axf.each(cfg.colGroup,function(cidx,C){return C.key==v?(wc=cidx,!1):void 0}),"number"==typeof wc&&(wCH=cfg.body.rows[r][wc],_this.body.find("#"+cfg.targetID+"_AX_bodyText_AX_"+r+"_AX_"+wc+"_AX_"+itemIndex).html(_this.getFormatterValue(wCH.formatter,item,itemIndex,item[v],v,wCH,wc)))}}var _this=this,cfg=this.config,CH=cfg.body.rows[r][c],item=this.list[itemIndex],CG=cfg.colGroup[c],that={grid:this,item:item,index:itemIndex,value:item[CG.key],CG:CG,r:r,c:c};if(cfg.control_lock_status>1)return this;var beforeValue=_this.list[itemIndex][CH.key];if(CG.editor&&(CG.editor.type in _this.inlineEditor&&(value=_this.inlineEditor[CG.editor.type].getValue.call(that,value)),CG.editor.beforeUpdate&&(value=CG.editor.beforeUpdate.call(that,value))),_this.list[itemIndex][CH.key]=value,"C"!=_this.list[itemIndex]._CUD&&"D"!=_this.list[itemIndex]._CUD){var isChanged=!1;if(Object.isObject(beforeValue)){var beforeValueString=Object.values(beforeValue).join("_"),valueString=Object.values(value).join("_");isChanged=beforeValueString!=valueString}else isChanged=beforeValue!=value;isChanged&&(_this.list[itemIndex]._CUD="U")}return this.inline_edit&&CG.editor?(cellUpdate(),_this.list[itemIndex][CH.key+"_VAL"]&&(_this.list[itemIndex][CH.key+"_VAL"]._modify=!0),CG.editor.afterUpdate&&CG.editor.afterUpdate.call(that,value),_this.editCellClear()):this.bigDataSyncApply("reload"),this},contentScrollResize:function(resetLeft){var cfg=this.config,_this=this;if("mobile"!=cfg.viewMode){var bodyHeight=_this.body.height(),scrollHeight=_this.scrollContent.height(),bodyWidth=_this.body.width(),_colWidth=_this.colWidth.number()+cfg.fitToWidthRightMargin,scrollWidth=_colWidth>bodyWidth?_colWidth:bodyWidth;_this.scrollContent.css({width:scrollWidth}),_this.colHead.css({width:scrollWidth}),_this.hasEditor&&_this.editor.css({width:bodyWidth}),_this.hasFoot&&(this.cachedDom&&function(){if(this.cachedDom.tbody.find("#"+cfg.targetID+"_AX_null_AX_0").outerHeight()){var itemTrHeight=this.cachedDom.tbody.find("#"+cfg.targetID+"_AX_null_AX_0").outerHeight().number(),printListCount=(this.body.height()/itemTrHeight).ceil(),_count=0;printListCount<this.list.length&&(_count=this.list.length-printListCount),this.cachedDom.tfpadding.css({height:cfg.scrollContentBottomMargin.number()+_count*itemTrHeight}),this.hasFixed&&this.cachedDom.ftfpadding.css({height:cfg.scrollContentBottomMargin.number()+_count*itemTrHeight})}}.call(this),_this.gridFoot.css({width:bodyWidth})),(0!=resetLeft||_this.scrollContent.width()+_this.scrollContent.position().left<_this.body.width())&&(_this.scrollContent.css({left:0}),_this.colHead.css({left:0}),_this.scrollXHandle.css({left:0}),_this.hasEditor&&_this.editor.css({left:0}));var show_scroll_x=!1,show_scroll_y=!1,scrollContentAdjust=0;if(scrollWidth>bodyWidth+4&&cfg.xscroll&&(show_scroll_x=!0),show_scroll_x){_this.scrollTrackX.show(),_this.scrollTrackX.css({width:bodyWidth}),scrollContentAdjust=_this.scrollTrackX.outerHeight();var scrollXHandleWidth=bodyWidth*bodyWidth/scrollWidth;_this.scrollXHandle.data("width",scrollXHandleWidth),30>scrollXHandleWidth&&(scrollXHandleWidth=30),_this.scrollXHandle.css({width:scrollXHandleWidth})}else _this.scrollTrackX.hide();if("auto"==cfg.__height?(_this.scrollBody.css({height:_this.colHead.outerHeight()+_this.scrollContent.height()+scrollContentAdjust}),_this.body.css({top:_this.colHead.outerHeight(),height:_this.scrollContent.height()})):(_this.body.css({height:cfg.height.number()-("show"==this.pageBody.data("display")?this.pageBody.outerHeight():0)-2-this.colHead.outerHeight()-scrollContentAdjust}),_this.scrollTrackY.css({top:_this.colHead.outerHeight(),height:bodyHeight})),bodyHeight=_this.body.height(),scrollHeight=_this.scrollContent.height(),"auto"==cfg.__height?show_scroll_y=!1:scrollHeight>bodyHeight&&(show_scroll_y=!0),show_scroll_y){_this.scrollTrackY.show(),_this.scrollTrackY.css({top:_this.colHead.outerHeight(),height:bodyHeight});var scrollYHandleHeight=bodyHeight*bodyHeight/scrollHeight;_this.scrollYHandle.data("height",scrollYHandleHeight),30>scrollYHandleHeight&&(scrollYHandleHeight=30),_this.scrollYHandle.css({height:scrollYHandleHeight})}else _this.scrollTrackY.hide();return _this.onevent_grid({type:"scroll-resize"}),this}},contentScrollScrollSync:function(pos){var cfg=this.config;if(void 0!=pos.left){if(!this.contentScrollXAttr){var scrollWidth=this.colWidth>this.colHead.width()?this.colWidth:this.colHead.width();this.contentScrollXAttr={bodyWidth:this.body.width(),scrollWidth:scrollWidth,scrollTrackXWidth:this.scrollTrackX.width(),scrollXHandleWidth:this.scrollXHandle.outerHeight()}}var L=function(D){return(D.scrollWidth*pos.left/(D.scrollTrackXWidth-D.scrollXHandleWidth)).round()}(this.contentScrollXAttr);this.contentScrollXAttr.scrollWidth-L<this.body.width()&&(L=this.contentScrollXAttr.scrollWidth-this.body.width()),this.scrollContent.css({left:-L}),this.colHead.css({left:-L}),this.hasFoot&&this.gridFoot_content.css({left:-L}),this.hasEditor&&axdom("#"+cfg.targetID+"_AX_editorContent").css({left:-L})}else{if("auto"==cfg.__height)return;this.contentScrollYAttr?(this.contentScrollYAttr.bodyHeight=this.body.height(),this.contentScrollYAttr.scrollHeight=this.scrollContent.height(),this.contentScrollYAttr.scrollTrackYHeight=this.scrollTrackY.height(),this.contentScrollYAttr.scrollYHandleHeight=this.scrollYHandle.outerHeight()):this.contentScrollYAttr={bodyHeight:this.body.height(),scrollHeight:this.scrollContent.outerHeight(),scrollTrackYHeight:this.scrollTrackY.height(),scrollYHandleHeight:this.scrollYHandle.outerHeight()};var _sh=this.contentScrollYAttr.scrollHeight,_bh=this.contentScrollYAttr.bodyHeight,_th=this.contentScrollYAttr.scrollTrackYHeight,_hh=this.contentScrollYAttr.scrollYHandleHeight,T=pos.top*(_sh-_bh)/(_th-_hh);this.scrollContent.css({top:-T}),axf.getId(cfg.targetID+"_AX_fixedScrollContent")&&this.fixedScrollContent.css({top:-T}),this.editorOpend&&this.editor.css({top:-T+this.editorOpenTop+this.body.position().top}),this.bigDataSyncApply()}},contentScrollContentSync:function(pos,touch,reload){var cfg=this.config;if("undefined"!=typeof pos.left){if(!this.contentScrollXAttr){var scrollWidth=this.colWidth>this.body.width()?this.colWidth:this.body.width();this.contentScrollXAttr={bodyWidth:this.body.width(),scrollWidth:scrollWidth,scrollTrackXWidth:this.scrollTrackX.width(),scrollXHandleWidth:this.scrollXHandle.outerWidth()}}var L=(this.contentScrollXAttr.scrollTrackXWidth-this.contentScrollXAttr.scrollXHandleWidth)*(pos.left/(this.contentScrollXAttr.scrollWidth-this.contentScrollXAttr.bodyWidth));this.scrollXHandle.css({left:-L}),this.colHead.css({left:pos.left}),this.hasFoot&&this.gridFoot_content.css({left:pos.left}),this.hasEditor&&axdom("#"+cfg.targetID+"_AX_editorContent").css({left:pos.left})}else{if("auto"==cfg.__height)return;this.contentScrollYAttr?(this.contentScrollYAttr.bodyHeight=this.body.height(),this.contentScrollYAttr.scrollHeight=this.scrollContent.height(),this.contentScrollYAttr.scrollTrackYHeight=this.scrollTrackY.height(),this.contentScrollYAttr.scrollYHandleHeight=this.scrollYHandle.outerHeight()):this.contentScrollYAttr={bodyHeight:this.body.height(),scrollHeight:this.scrollContent.height(),scrollTrackYHeight:this.scrollTrackY.height(),scrollYHandleHeight:this.scrollYHandle.outerHeight()};var _sh=this.contentScrollYAttr.scrollHeight,_bh=this.contentScrollYAttr.bodyHeight,_th=this.contentScrollYAttr.scrollTrackYHeight,_hh=this.contentScrollYAttr.scrollYHandleHeight,T=pos.top*(_th-_hh)/(_sh-_bh);this.scrollYHandle.css({top:-T}),axf.getId(cfg.targetID+"_AX_fixedScrollContent")&&this.fixedScrollContent.css({top:pos.top}),this.editorOpend&&this.editor.css({top:pos.top+this.editorOpenTop+this.body.position().top})}reload||("undefined"==typeof touch&&this.bigDataSync(),"direct"==touch&&this.bigDataSyncApply())},getMousePositionToContentScroll:function(event,contentScrollID){var pos=axdom("#"+contentScrollID).offset(),x=event.pageX-pos.left,y=event.pageY-pos.top;return{x:x,y:y}},getTouchPositionToContentScroll:function(event){var x,y,cfg=this.config,touch=event.touches[0];return cfg.touchDirection?(x=touch.pageX.round(10),y=touch.pageY.round(10)):(x=-touch.pageX.round(10),y=-touch.pageY.round(10)),{x:x,y:y}},contentScrollScrollReady:function(event){var cfg=this.config,handleName=event.target.id.split(/_AX_/).last();this.contentScrollAttrs={handleName:handleName},this.contentScrollXAttr=null,this.contentScrollYAttr=null,"scrollYHandle"==handleName?this.contentScrollAttrs.scrollTrack=cfg.targetID+"_AX_scrollTrackY":this.contentScrollAttrs.scrollTrack=cfg.targetID+"_AX_scrollTrackX",axdom(event.target).addClass("hover");var pos=this.getMousePositionToContentScroll(event,this.contentScrollAttrs.scrollTrack);this.contentScrollAttrs.x=axdom(event.target).position().left-pos.x,this.contentScrollAttrs.y=axdom(event.target).position().top-pos.y,this.contentScrollAttrs.handleWidth=axdom(event.target).outerWidth(),this.contentScrollAttrs.handleHeight=axdom(event.target).outerHeight(),this.contentScrollAttrs.trackWidth=this.scrollTrackX.width(),this.contentScrollAttrs.trackHeight=this.scrollTrackY.height(),this.contentScrollYAttr?(this.contentScrollYAttr.scrollHeight=this.scrollContent.height(),this.contentScrollYAttr.scrollTrackYHeight=this.scrollTrackY.height(),this.contentScrollYAttr.scrollYHandleHeight=this.scrollYHandle.outerHeight()):this.contentScrollYAttr={bodyHeight:this.body.height(),scrollHeight:this.scrollContent.outerHeight(),scrollTrackYHeight:this.scrollTrackY.height(),scrollYHandleHeight:this.scrollYHandle.outerHeight()};var contentScrollScrollMove=this.contentScrollScrollMove.bind(this);this.contentScrollScrollMoveBind=function(event){contentScrollScrollMove(event)};var contentScrollScrollEnd=this.contentScrollScrollEnd.bind(this);this.contentScrollScrollEndBind=function(event){contentScrollScrollEnd(event)},"scrollYHandle"==handleName&&(this.scrollYTip.show(),this.contentScrollTipOverMove()),axdom(document.body).bind("mousemove.AXGrid",this.contentScrollScrollMoveBind),axdom(document.body).bind("mouseup.AXGrid",this.contentScrollScrollEndBind),axdom(document.body).bind("mouseleave.AXGrid",this.contentScrollScrollEndBind),axdom(document.body).attr("onselectstart","return false"),this.contentScrollScrolling=!0},contentScrollScrollMove:function(event){var pos=(this.config,this.getMousePositionToContentScroll(event,this.contentScrollAttrs.scrollTrack)),handleName=this.contentScrollAttrs.handleName,handleTop=0,handleLeft=0;"scrollYHandle"==handleName?(handleTop=pos.y+this.contentScrollAttrs.y,0>handleTop&&(handleTop=0),handleTop+this.contentScrollAttrs.handleHeight>this.contentScrollAttrs.trackHeight&&(handleTop=this.contentScrollAttrs.trackHeight-this.contentScrollAttrs.handleHeight),this.scrollYHandle.css({top:handleTop}),this.scrollYHandle.data("top",handleTop),this.contentScrollScrollSync({top:handleTop}),this.contentScrollTipOverMove(handleTop)):(handleLeft=pos.x+this.contentScrollAttrs.x,0>handleLeft&&(handleLeft=0),handleLeft+this.contentScrollAttrs.handleWidth>this.contentScrollAttrs.trackWidth&&(handleLeft=this.contentScrollAttrs.trackWidth-this.contentScrollAttrs.handleWidth),this.scrollXHandle.css({left:handleLeft}),this.contentScrollScrollSync({left:handleLeft})),this.onevent_grid({type:"onscroll"})},contentScrollScrollEnd:function(event){var cfg=this.config;axdom(document.body).unbind("mousemove.AXGrid"),axdom(document.body).unbind("mouseup.AXGrid"),axdom(document.body).unbind("mouseleave.AXGrid"),axdom(document.body).removeAttr("onselectstart"),axdom("#"+cfg.targetID+"_AX_"+this.contentScrollAttrs.handleName).removeClass("hover"),this.contentScrollScrolling=!1,"scrollYHandle"==this.contentScrollAttrs.handleName?(this.contentScrollScrollSync({top:this.scrollYHandle.position().top}),this.contentScrollAttrs.trackHeight-this.contentScrollAttrs.handleHeight==this.scrollYHandle.data("top")&&this.contentScrollEnd(),this.scrollYTip.hide()):this.contentScrollScrollSync({left:this.scrollXHandle.position().left})},contentScrollScrollWheel:function(e){var attr,cfg=this.config,scrollTop=this.scrollContent.position().top,scrollLeft=this.scrollContent.position().left,eventCancle=!1,event=e||window.event,deltaX=0,deltaY=0;if("auto"!=cfg.__height){if(attr={bodyHeight:this.body.height(),bodyWidth:this.body.width()},attr.scrollHeight=this.scrollContent.height(),attr.scrollWidth=this.scrollContent.width(),attr.scrollTrackYHeight=this.scrollTrackY.height(),attr.scrollYHandleHeight=this.scrollYHandle.outerHeight(),attr.scrollTrackYWidth=this.scrollTrackY.width(),attr.scrollYHandleWidth=this.scrollYHandle.outerWidth(),event.wheelDeltaX?(deltaX=(event.wheelDeltaX/2).ceil(),deltaY=(event.wheelDeltaY/2).ceil()):deltaY=(event.detail?-20*event.detail:event.wheelDelta/2).ceil(),0==deltaX&&0==deltaY)return!0;if(deltaY.abs()>deltaX.abs()&&deltaY.abs()>0){if(attr.scrollHeight<attr.bodyHeight)return;scrollTop+=deltaY,scrollTop>0?(scrollTop=0,eventCancle=!0):scrollTop.abs()+attr.bodyHeight>attr.scrollHeight?(scrollTop=attr.bodyHeight-attr.scrollHeight,eventCancle=!0):0==scrollTop&&(scrollTop=0,eventCancle=!0),this.scrollContent.css({top:scrollTop}),this.contentScrollContentSync({top:scrollTop},"direct"),this.onevent_grid({type:"onscroll"})}else deltaX.abs()>deltaY.abs()&&deltaX.abs()>0&&(scrollLeft+=deltaX,scrollLeft>0?(scrollLeft=0,eventCancle=!0):scrollLeft.abs()+attr.bodyWidth>attr.scrollWidth?(scrollLeft=attr.bodyWidth-attr.scrollWidth,eventCancle=!0):0==scrollLeft&&(scrollLeft=0,eventCancle=!0),this.scrollContent.css({left:scrollLeft}),this.contentScrollContentSync({left:scrollLeft},"direct"),this.onevent_grid({type:"onscroll"}));if(!eventCancle)return event.preventDefault&&event.preventDefault(),event.stopPropagation&&event.stopPropagation(),event.cancelBubble=!0,!1;if(0!=scrollTop){var contentScrollEnd=this.contentScrollEnd.bind(this);this.contentScrollEndObserver&&clearTimeout(this.contentScrollEndObserver),this.contentScrollEndObserver=setTimeout(function(){contentScrollEnd()},100)}}},contentScrollTouchstart:function(e){var cfg=this.config,event=window.event||e;if("mobile"!=cfg.viewMode){this.contentScrollTouchMoved=!0,this.contentScrollIDOffset=this.scrollContent.offset(),this.contentScrollXAttr=null,this.contentScrollYAttr=null;var pos=this.getTouchPositionToContentScroll(event);this.scrollYHandle.addClass("hover"),this.scrollXHandle.addClass("hover"),this.scrollTouchAttr={y:pos.y,h:this.body.outerHeight(),th:this.scrollContent.height(),nt:this.scrollContent.position().top,x:pos.x,w:this.body.outerWidth(),tw:this.scrollContent.width(),nl:this.scrollContent.position().left};var contentScrollTouchEnd=this.contentScrollTouchEnd.bind(this);this.contentScrollTouchEndBind=function(){contentScrollTouchEnd(event)};var contentScrollTouchMove=this.contentScrollTouchMove.bind(this);this.contentScrollTouchMoveBind=function(){contentScrollTouchMove(event)},document.addEventListener&&(document.addEventListener("touchend",this.contentScrollTouchEndBind,!1),document.addEventListener("touchmove",this.contentScrollTouchMoveBind,!1))}},contentScrollTouchMove:function(e){var cfg=this.config,event=window.event||e;if(this.contentScrollTouchMoved){var pos=this.getTouchPositionToContentScroll(event),scrollTouchAttr=this.scrollTouchAttr,eventCancle=!1;if(scrollTouchAttr.th>scrollTouchAttr.h&&"auto"!=cfg.height){var scrollTop=scrollTouchAttr.nt-(pos.y-scrollTouchAttr.y);scrollTop>0?(scrollTop=0,eventCancle=!0):scrollTop.abs()+scrollTouchAttr.h>scrollTouchAttr.th?(scrollTop=scrollTouchAttr.h-scrollTouchAttr.th,eventCancle=!0):0==scrollTop&&(scrollTop=0,eventCancle=!0),this.scrollContent.css({top:scrollTop}),this.contentScrollContentSync({top:scrollTop},"touch")}else eventCancle=!0;if(this.show_scrollTrackX&&(pos.x-scrollTouchAttr.x).abs()>8){eventCancle=!1;var scrollLeft=scrollTouchAttr.nl-(pos.x-scrollTouchAttr.x);scrollLeft>0?(scrollLeft=0,eventCancle=!0):scrollLeft.abs()+scrollTouchAttr.w>scrollTouchAttr.tw?(scrollLeft=scrollTouchAttr.w-scrollTouchAttr.tw,eventCancle=!0):0==scrollLeft&&(scrollLeft=0,eventCancle=!0),
  this.scrollContent.css({left:scrollLeft}),this.contentScrollContentSync({left:scrollLeft},"touch")}if(eventCancle){if(0!=scrollTop){var contentScrollEnd=this.contentScrollEnd.bind(this);this.contentScrollEndObserver&&clearTimeout(this.contentScrollEndObserver),this.contentScrollEndObserver=setTimeout(function(){contentScrollEnd()},100)}}else event.preventDefault&&event.preventDefault()}},contentScrollTouchEnd:function(e){var cfg=this.config;window.event||e;this.contentScrollTouchMoved&&("auto"!=cfg.height&&this.bigDataSync(),this.scrollXHandle.removeClass("hover"),this.scrollYHandle.removeClass("hover"),document.removeEventListener&&(document.removeEventListener("touchend",this.contentScrollTouchEndBind,!1),document.removeEventListener("touchmove",this.contentScrollTouchMoveBind,!1)),this.contentScrollTouchMoved=!1)},contentScrollEnd:function(){this.contentScrollEndObserver&&clearTimeout(this.contentScrollEndObserver);var cfg=this.config;if(cfg.body.onscrollend)try{cfg.body.onscrollend.call({list:this.list,page:this.page})}catch(e){console.log(e)}},contentScrollTipOver:function(event){},contentScrollTipOverMove:function(handleTop){var hTop=(this.config,handleTop||this.scrollYHandle.position().top),T=(this.contentScrollYAttr.scrollHeight-this.contentScrollYAttr.bodyHeight)*(hTop/(this.contentScrollYAttr.scrollTrackYHeight-this.contentScrollYAttr.scrollYHandleHeight)).number();this.scrollYTipSpan.empty(),this.scrollYTipSpan.append((T.abs()/this.virtualScroll.itemTrHeight).floor().money()+"/"+this.list.length.money()),this.scrollYTip.css({top:hTop})},contentScrollTipOverOut:function(event){this.config;this.scrollYHandle.unbind("mousemove"),this.scrollYHandle.unbind("mouseout"),this.scrollYTip.hide()},dataSync:function(){return this.bigDataSync(!0),this},bigDataSync:function(reload){var cfg=this.config,_this=this;"grid"==cfg.viewMode&&(this.bigDataSyncObserver&&clearTimeout(this.bigDataSyncObserver),this.bigDataSyncObserver=setTimeout(function(){_this.bigDataSyncApply(reload)},10))},bigDataSyncApply:function(reload){var cfg=this.config;if("grid"!=cfg.viewMode)return this;var scrollContentScrollTop,item,bodyHasMarker=this.bodyHasMarker,getItem=this.getItem.bind(this),getItemMarker=this.getItemMarker.bind(this),getMarkerDisplay=this.getMarkerDisplay.bind(this),markerIndex=0,VS=this.virtualScroll,po=[];if(VS.scrollTop!=(scrollContentScrollTop=this.scrollContent.position().top)||reload){var newStartIndex=(scrollContentScrollTop.abs()/VS.itemTrHeight).ceil()-6;0>newStartIndex&&(newStartIndex=0);var newEndIndex=newStartIndex+VS.printListCount;if(newEndIndex>this.list.length&&(newEndIndex=this.list.length),VS.startIndex!=newStartIndex||reload){po=[];for(var itemIndex=newStartIndex;newEndIndex>itemIndex;itemIndex++)item=this.list[itemIndex],po.push(getItem(itemIndex,item,"n")),bodyHasMarker&&(markerIndex=getMarkerDisplay(itemIndex,item)).length>0&&po.push(getItemMarker(itemIndex,item,"n",markerIndex));if(this.cachedDom.tbody.empty(),this.cachedDom.tbody.append(po.join("")),VS.startIndex=newStartIndex,VS.endIndex=newEndIndex,VS.scrollTop=scrollContentScrollTop,cfg.mergeCells&&this.mergeCells(this.cachedDom.tbody,"n"),this.hasFixed){po=[];for(var itemIndex=newStartIndex;newEndIndex>itemIndex;itemIndex++)item=this.list[itemIndex],po.push(getItem(itemIndex,item,"fix")),bodyHasMarker&&(markerIndex=getMarkerDisplay(itemIndex,item)).length>0&&po.push(getItemMarker(itemIndex,item,"fix",markerIndex));this.cachedDom.fixed_tbody.empty(),this.cachedDom.fixed_tbody.append(po.join("")),cfg.mergeCells&&this.mergeCells(this.cachedDom.fixed_tbody,"f")}this.cachedDom.thpadding.css({height:newStartIndex*VS.itemTrHeight});var tfpaddingHeight=cfg.scrollContentBottomMargin.number()+(this.list.length-newEndIndex-1)*VS.itemTrHeight;if(tfpaddingHeight<cfg.scrollContentBottomMargin.number()&&(tfpaddingHeight=cfg.scrollContentBottomMargin.number()),this.cachedDom.tfpadding.css({height:tfpaddingHeight}),this.hasFixed&&(this.cachedDom.fthpadding.css({height:newStartIndex*VS.itemTrHeight}),this.cachedDom.ftfpadding.css({height:tfpaddingHeight})),this.body.find(".gridBodyTr").bind("mouseover",this.gridBodyOver.bind(this)),this.body.find(".gridBodyTr").bind("mouseout",this.gridBodyOut.bind(this)),this.body.find(".gridBodyTr").bind("click",this.gridBodyClick.bind(this)),this.needBindDBLClick()&&this.body.find(".gridBodyTr").bind("dblclick",this.gridBodyDBLClick.bind(this)),cfg.body.onchangeScroll){var sendObj=axf.copyObject(this.virtualScroll);cfg.body.onchangeScroll.call(sendObj,sendObj)}if(this.editCellClear(),"undefined"!=typeof this.selectedRow&&this.selectedRow.length>0){for(var body=this.body,ri=0;ri<this.selectedRow.length;ri++)body.find(".gridBodyTr_"+this.selectedRow[ri]).addClass("selected"),body.find(".gridBodyTr_"+this.selectedRow[ri]).find(".bodyTd_"+this.selectedCells[0]+".bodyTdr_0").addClass("selected");if("undefined"!=typeof reload){var itemIndex=this.selectedRow.last(),itemDom=this.body.find(".gridBodyTr_"+itemIndex);if(itemDom[0]){var trTop=itemDom.position().top,bodyHeight=(this.scrollContent.height(),this.body.height()),trHeight=this.body.find(".bodyNullTd").outerHeight().number();if(trTop.number()+trHeight.number()>bodyHeight){var scrollTop=bodyHeight-(trTop.number()+trHeight.number());this.scrollContent.css({top:scrollTop-cfg.listCountMargin}),this.contentScrollContentSync({top:scrollTop-cfg.listCountMargin})}else if(0==trTop.number()){var scrollTop=0;this.scrollContent.css({top:scrollTop}),this.contentScrollContentSync({top:scrollTop})}}}}}}},scrollTop:function(itemIndex){var cfg=this.config;if("auto"!=cfg.__height)try{var trTop=this.body.find(".gridBodyTr_"+itemIndex).position().top,trHeight=this.body.find(".gridBodyTr_"+itemIndex).height(),scrollHeight=this.scrollContent.height(),bodyHeight=this.body.height();this.scrollYHandle.outerHeight(),this.scrollTrackY.height();if(trTop.number()+trHeight.number()>bodyHeight){var scrollTop=bodyHeight-(trTop.number()+trHeight.number());this.body.height()<scrollHeight&&(this.scrollContent.css({top:scrollTop}),this.contentScrollContentSync({top:scrollTop}))}else if(0==trTop.number()){var scrollTop=0;this.scrollContent.css({top:scrollTop}),this.contentScrollContentSync({top:scrollTop})}}catch(e){var scrollTop=0;this.scrollContent.css({top:scrollTop}),this.contentScrollContentSync({top:scrollTop})}},setFocus:function(itemIndex){var cfg=this.config,_this=this;if("grid"==cfg.viewMode){var c_index=this.selectedCells.first();if(this.selectedRow.length>0){var body=this.body;axf.each(this.selectedRow,function(ridx,Row){body.find(".gridBodyTr_"+Row).removeClass("selected"),_this.selectedCells.length>0&&axf.each(_this.selectedCells,function(){body.find(".gridBodyTr_"+Row).find(".bodyTd_"+this).removeClass("selected")})})}if(this._focusedItemIndex=itemIndex,this.virtualScroll.startIndex<=itemIndex&&this.virtualScroll.endIndex>=itemIndex){this.selectedRow.clear(),0==itemIndex&&(itemIndex=""+itemIndex),this.body.find(".gridBodyTr_"+itemIndex).addClass("selected"),this.selectedRow.push(itemIndex),cfg.mergeCells&&function(){for(var colGroupLen=0,nowTrTd=this.body.find(".gridBodyTr_"+itemIndex).find("td"),i=0,l=cfg.colGroup.length;l>i;i++)cfg.colGroup[i].display&&colGroupLen++;if(colGroupLen==nowTrTd.length-1){for(var i=0,l=nowTrTd.length;l>i;i++)if(nowTrTd[i].getAttribute("rowspan")>1){for(var ai=0;ai<nowTrTd[i].getAttribute("rowspan")-1;ai++)this.body.find(".gridBodyTr_"+(Number(itemIndex)+ai+1)).addClass("selected"),this.selectedRow.push(Number(itemIndex)+ai+1);break}}else{this.selectedRow.clear();var finding=!0,parentItemIndex=itemIndex,safeLoop=0;do{parentItemIndex-=1;var _nowTrTd=this.body.find(".gridBodyTr_"+parentItemIndex).find("td");if(colGroupLen==_nowTrTd.length-1){for(var i=0,l=_nowTrTd.length;l>i;i++)if(_nowTrTd[i].getAttribute("rowspan")>1){for(var ai=0;ai<_nowTrTd[i].getAttribute("rowspan");ai++)this.body.find(".gridBodyTr_"+(Number(parentItemIndex)+ai)).addClass("selected"),this.selectedRow.push(Number(parentItemIndex)+ai);break}finding=!1}safeLoop++,safeLoop>1e3&&(finding=!1)}while(finding)}}.call(this),this.body.find(".gridBodyTr_"+itemIndex).find(".bodyTd_"+c_index+".bodyTdr_0").addClass("selected");var scrollTop,trTop=this.body.find(".gridBodyTr_"+itemIndex).position().top,trHeight=this.body.find(".gridBodyTr_"+itemIndex).height(),scrollHeight=this.scrollContent.height(),bodyHeight=this.body.height(),scrollContentTop=(this.scrollYHandle.outerHeight(),this.scrollTrackY.height(),this.scrollContent.position().top);_this.hasFoot&&(bodyHeight-=this.gridFoot.height()),cfg.body.rowsEmpty||(trHeight=cfg.body.rows.length*trHeight),trTop.number()+scrollContentTop<0?(scrollTop=-trTop.number(),this.scrollContent.css({top:scrollTop}),this.contentScrollContentSync({top:scrollTop})):trTop.number()+trHeight.number()+scrollContentTop>bodyHeight?(scrollTop=bodyHeight-(trTop.number()+trHeight.number()),this.scrollContent.css({top:scrollTop}),this.contentScrollContentSync({top:scrollTop})):0==trTop.number()&&(scrollTop=0,this.scrollContent.css({top:scrollTop}),this.contentScrollContentSync({top:scrollTop}))}else if(this.list.length>itemIndex&&itemIndex>-1){0==itemIndex&&(itemIndex=""+itemIndex);var scrollHeight=this.scrollContent.height(),bodyHeight=this.body.height(),scrollTop=(this.scrollYHandle.outerHeight(),this.scrollTrackY.height(),this.virtualScroll.itemTrHeight*itemIndex);bodyHeight>=scrollHeight&&(scrollTop=0),this.scrollContent.css({top:scrollTop}),this.contentScrollContentSync({top:scrollTop},"direct"),setTimeout(function(){if(_this.body.find(".gridBodyTr_"+itemIndex).get(0)){var trTop=_this.body.find(".gridBodyTr_"+itemIndex).position().top,trHeight=_this.body.find(".gridBodyTr_"+itemIndex).height();trTop.number()+trHeight.number()>bodyHeight?(scrollTop=bodyHeight-(trTop.number()+trHeight.number()),itemIndex==_this.list.length-1&&(scrollTop-=10),_this.scrollContent.css({top:scrollTop}),_this.contentScrollContentSync({top:scrollTop},"direct")):0==trTop.number()&&(scrollTop=0,_this.scrollContent.css({top:scrollTop}),_this.contentScrollContentSync({top:scrollTop},"direct")),_this.selectedRow.clear(),_this.selectedRow.push(itemIndex),_this.body.find(".gridBodyTr_"+itemIndex).addClass("selected"),cfg.mergeCells&&function(){for(var colGroupLen=0,nowTrTd=this.body.find(".gridBodyTr_"+itemIndex).find("td"),i=0,l=cfg.colGroup.length;l>i;i++)cfg.colGroup[i].display&&colGroupLen++;if(colGroupLen==nowTrTd.length-1){for(var i=0,l=nowTrTd.length;l>i;i++)if(nowTrTd[i].getAttribute("rowspan")>1){for(var ai=0;ai<nowTrTd[i].getAttribute("rowspan")-1;ai++)this.body.find(".gridBodyTr_"+(Number(itemIndex)+ai+1)).addClass("selected"),this.selectedRow.push(Number(itemIndex)+ai+1);break}}else{this.selectedRow.clear();var finding=!0,parentItemIndex=itemIndex,safeLoop=0;do{parentItemIndex-=1;var _nowTrTd=this.body.find(".gridBodyTr_"+parentItemIndex).find("td");if(colGroupLen==_nowTrTd.length-1){for(var i=0,l=_nowTrTd.length;l>i;i++)if(_nowTrTd[i].getAttribute("rowspan")>1){for(var ai=0;ai<_nowTrTd[i].getAttribute("rowspan");ai++)this.body.find(".gridBodyTr_"+(Number(parentItemIndex)+ai)).addClass("selected"),this.selectedRow.push(Number(parentItemIndex)+ai);break}finding=!1}safeLoop++,safeLoop>1e3&&(finding=!1)}while(finding)}}.call(_this)}})}else this._focusedItemIndex=void 0;this.onevent_grid({type:"grid-list-focus"})}else if("icon"==cfg.viewMode);else if("mobile"==cfg.viewMode){if(this.selectedCells.length>0&&(axf.each(this.selectedCells,function(){axdom("#"+this).removeClass("selected")}),this.selectedCells.clear()),this.selectedRow.length>0){var body=this.body;axf.each(this.selectedRow,function(){body.find(".bodyViewMobile_"+this).removeClass("selected")})}this.selectedRow.clear(),this.body.find(".bodyViewMobile_"+itemIndex).addClass("selected"),this.selectedRow.push(itemIndex),this.body.find(".bodyViewMobile_"+itemIndex).focus()}},focusMove:function(direction,event){var myIndex,my_c,itemIndex,cfg=this.config,body=this.body;if("L"==direction||"R"==direction)this.selectedCells.length>0&&(myIndex=this.selectedRow.first(),my_c=this.selectedCells.first(),"L"==direction?(my_c-=1,0>my_c&&(my_c=0)):(my_c=my_c.number()+1,my_c>=cfg.colGroup.length&&(my_c=cfg.colGroup.length-1)),axf.each(this.selectedCells,function(){body.find(".gridBodyTr_"+myIndex).find(".bodyTd_"+this).removeClass("selected")}),this.selectedCells.clear(),this.body.find(".gridBodyTr_"+myIndex).find(".bodyTd_"+my_c+".bodyTdr_0").addClass("selected"),this.selectedCells.push(my_c),this.stopEvent(event));else{for(myIndex=this.selectedRow.first(),cfg.mergeCells&&this.selectedRow.length>1&&direction>0&&1==Math.abs(this.selectedRow[0]-this.selectedRow[1])&&(myIndex=this.selectedRow.last()),itemIndex=myIndex.number()+direction,0>itemIndex?itemIndex=0:itemIndex>this.list.length-1&&(itemIndex=this.list.length-1);this.list[itemIndex][cfg.reserveKeys.hidden];)0>direction?(itemIndex--,0>itemIndex&&(itemIndex=0)):(itemIndex++,itemIndex>this.list.length-1&&(itemIndex=this.list.length-1));this.setFocus(itemIndex),this.stopEvent(event)}return!1},getSelectedItem:function(){this.config;if(void 0!=this.selectedRow&&null!=this.selectedRow&&this.selectedRow.length>0){if(1==this.selectedRow.length)return{index:this.selectedRow.first().number(),item:this.list[this.selectedRow.first()]};for(var selectedList=[],len=this.selectedRow.length,i=0;len>i;i++)selectedList.push(this.list[this.selectedRow[i]]);return{index:this.selectedRow,item:selectedList}}return{error:"noselected",description:"선택된 item이 없습니다."}},click:function(itemIndex){var cfg=this.config;this.setFocus(itemIndex);var item=this.list[itemIndex];if(cfg.body.onclick){var sendObj={index:itemIndex,list:this.list,item:item,page:this.page};try{cfg.body.onclick.call(sendObj,itemIndex,item)}catch(e){console.log(e)}}},mergeCells:function(tgDom,typ){for(var cfg=this.config,rows=[],typn="f"==typ?"fix":"n",tri=this.virtualScroll.startIndex;tri<=this.virtualScroll.endIndex;tri++){var row=[];if(this.list[tri]){for(var tdi=0;tdi<cfg.colGroup.length;tdi++){var tdn=cfg.colGroup[tdi].key,item={tdom:tgDom.find("#"+cfg.targetID+"_AX_"+typn+"body_AX_0_AX_"+tdi+"_AX_"+tri),rowspan:1};if(cfg.colGroup[tdi]&&cfg.colGroup[tdi].display&&0==item.tdom.length)break;item.tdom.hasClass("bodyNullTd")||(item.html=this.list[tri][tdn],item.tri=tri,item.tdi=tdi,row.push(item))}rows.push(row)}}var _val={};if(Object.isArray(cfg.mergeCells))for(var tri=0;tri<rows.length;tri++)for(var isMerge=!0,mci=0;mci<cfg.mergeCells.length;mci++){var tdi;rows[tri][tdi=cfg.mergeCells[mci]]&&(_val["td_"+tdi]&&_val["td_"+tdi].html==rows[tri][tdi].html&&isMerge?(rows[_val["td_"+tdi].tri][tdi].rowspan++,rows[tri][tdi].rowspan=0,isMerge=!0):(_val["td_"+tdi]={tri:tri,tdi:tdi,rowspan:1,html:rows[tri][tdi].html},isMerge=!1))}else for(var tri=0;tri<rows.length;tri++)for(var tdi=0;tdi<rows[tri].length;tdi++)_val["td_"+tdi]&&_val["td_"+tdi].html==rows[tri][tdi].html?(rows[_val["td_"+tdi].tri][tdi].rowspan++,rows[tri][tdi].rowspan=0):_val["td_"+tdi]={tri:tri,tdi:tdi,rowspan:1,html:rows[tri][tdi].html};if(_val=null,"n"==typ)for(var tri=0;tri<rows.length;tri++)for(var tdi=0;tdi<rows[tri].length;tdi++)0==rows[tri][tdi].rowspan?rows[tri][tdi].tdom.remove():rows[tri][tdi].tdom.attr("rowspan",rows[tri][tdi].rowspan);else if("f"==typ)for(var tri=0;tri<rows.length;tri++)for(var tdi=0;tdi<rows[tri].length;tdi++)0==rows[tri][tdi].rowspan?rows[tri][tdi].tdom.remove():(rows[tri][tdi].tdom.attr("rowspan",rows[tri][tdi].rowspan),(tdi>0||0==cfg.fixedColSeq)&&rows[tri][tdi].tdom.css({height:this.virtualScroll.itemTrHeight*rows[tri][tdi].rowspan-1}));return rows=null,this},getDataSetFormatterValue:function(formatter,dataSet,value,key,CH){var result;this.config;if("money"==formatter)result=""==value||"null"==value||void 0==value?"0":value.number().money();else if("dec"==formatter)result=void 0==value?"":value.dec();else if("html"==formatter)result=value;else if("checkbox"==formatter||"radio"==formatter)result=value;else{var sendObj={index:null,list:this.list,item:dataSet,dataSet:dataSet,page:this.page,key:key,value:value};try{result=formatter.call(sendObj)}catch(e){console.log(e)}}return result},getHeadDataSet:function(dataSet,isfix){var cfg=this.config;if(void 0!=dataSet){var tpo=[],getDataSetFormatterValue=this.getDataSetFormatterValue.bind(this);axf.each(cfg.colGroup,function(){void 0==dataSet[this.key]&&(dataSet[this.key]="")});for(var hasFixed=this.hasFixed,r=0;r<cfg.head.rows.length;r++){cfg.head.rows.length-1==r;tpo.push('<tr class="gridBodyTr gridBodyTr_foot" id="'+cfg.targetID+"_AX_head_"+r+"_AX_"+(isfix||"n")+'">');var colCount=0;axf.each(cfg.head.rows[r],function(CHidx,CH){if(CH.display&&CH.colspan>0&&(void 0==isfix||void 0!=isfix&&colCount<cfg.fixedColSeq+1)){colCount+=CH.colspan;var rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'" style="vertical-align:'+CH.valign+';"',bottomClass=CH.isLastCell?"":" bodyBottomBorder",fixedClass=CH.isFixedEndCell?" fixedLine":"",bodyNodeClass="";"checkbox"==CH.formatter||"radio"==CH.formatter?bodyNodeClass=" bodyTdCheckBox":"html"==CH.formatter&&(bodyNodeClass=" bodyTdHtml"),tpo.push("<td"+valign+rowspan+colspan+' id="'+cfg.targetID+"_AX_"+(isfix||"n")+"head_AX_"+r+"_AX_"+CHidx+'" class="bodyTd'+bottomClass+fixedClass+'">'),tpo.push('<div class="bodyNode bodyTdText'+bodyNodeClass+'" align="'+CH.align+'" id="'+cfg.targetID+"_AX_headText_AX_"+r+"_AX_"+CHidx+'">'),hasFixed&&!CH.isFixedCell||!hasFixed||void 0!=isfix?CH.formatter?tpo.push(getDataSetFormatterValue(CH.formatter,dataSet,dataSet[CH.key],CH.key,CH)):tpo.push(dataSet[CH.key]):tpo.push("&nbsp;"),tpo.push("</div>"),tpo.push("</td>")}}),0==r&&void 0==isfix&&tpo.push('<td class="bodyNullTd" id="'+cfg.targetID+'_AX_headnull" rowspan="'+cfg.head.rows.length+'"><div class="tdRelBlock">&nbsp;</div></td>'),tpo.push("</tr>")}return tpo.join("")}},getFootDataSet:function(dataSet,isfix){var cfg=this.config;if(void 0!=dataSet){var tpo=[],getDataSetFormatterValue=this.getDataSetFormatterValue.bind(this);axf.each(cfg.colGroup,function(){void 0==dataSet[this.key]&&(dataSet[this.key]="")});for(var hasFixed=this.hasFixed,r=0;r<cfg.foot.rows.length;r++){cfg.foot.rows.length-1==r;tpo.push('<tr class="gridBodyTr gridBodyTr_foot" id="'+cfg.targetID+"_AX_foot_"+r+"_AX_"+(isfix||"n")+'">');var colCount=0;axf.each(cfg.foot.rows[r],function(CHidx,CH){if(CH.display&&CH.colspan>0&&("undefined"==typeof isfix||"undefined"!=typeof isfix&&CH.isFixedEndCell)){colCount+=CH.colspan;var rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'" style="vertical-align:'+CH.valign+';"',bottomClass=CH.isLastCell?"":" bodyBottomBorder",fixedClass=CH.isFixedEndCell?" fixedLine":"",bodyNodeClass="";"checkbox"==CH.formatter||"radio"==CH.formatter?bodyNodeClass=" bodyTdCheckBox":"html"==CH.formatter&&(bodyNodeClass=" bodyTdHtml"),tpo.push("<td"+valign+rowspan+colspan+' id="'+cfg.targetID+"_AX_"+(isfix||"n")+"foot_AX_"+r+"_AX_"+CHidx+'" class="bodyTd'+bottomClass+fixedClass+'">'),tpo.push('<div class="bodyNode bodyTdText'+bodyNodeClass+'" align="'+CH.align+'" id="'+cfg.targetID+"_AX_footText_AX_"+r+"_AX_"+CHidx+'">'),hasFixed&&!CH.isFixedCell||!hasFixed||void 0!=isfix?CH.formatter?tpo.push(getDataSetFormatterValue(CH.formatter,dataSet,dataSet[CH.key],CH.key,CH)):tpo.push(dataSet[CH.key]):tpo.push("&nbsp;"),tpo.push("</div>"),tpo.push("</td>")}}),0==r&&void 0==isfix&&tpo.push('<td class="bodyNullTd" id="'+cfg.targetID+'_AX_footnull" rowspan="'+cfg.foot.rows.length+'"><div class="tdRelBlock">&nbsp;</div></td>'),tpo.push("</tr>")}return tpo.join("")}},setDataSet:function(obj){var cfg=this.config;obj.ajaxUrl||axdom.isPlainObject(obj)&&(this.dataSet=obj,cfg.head&&this.printHead(),cfg.foot&&this.printFoot(),this.contentScrollResize(!1))},redrawDataSet:function(){var cfg=this.config;this.dataSet&&(cfg.head&&this.printHead(),cfg.foot&&this.printFoot())},printHead:function(){var cfg=this.config,getDataSet=this.getHeadDataSet.bind(this),po=[];po.push(getDataSet(this.dataSet)),axdom("#"+cfg.targetID+"_AX_thead").html(po.join("")),this.hasFixed&&(po=[],po.push(getDataSet(this.dataSet,"fix")),axdom("#"+cfg.targetID+"_AX_fixedThead").html(po.join("")))},printFoot:function(){var _tdHeight,cfg=this.config,tableWidth=this.colWidth,getDataSet=this.getFootDataSet.bind(this),po=[];this.hasFoot=!0,po.push('<div class="gridFootContent">'),po.push('<table cellpadding="0" cellspacing="0" class="gridFootTable" style="width:',tableWidth,'px;">'),po.push(this.getColGroup("FH")),po.push("<tbody>"),po.push(getDataSet(this.dataSet)),po.push("</tbody>"),po.push("</table>"),po.push("</div>"),this.hasFixed&&(po.push('<div class="gridFootfixedContent" style="width:'+this.fixedColWidth+'px;">'),po.push('<table cellpadding="0" cellspacing="0" class="gridFootTable" style="width:',this.fixedColWidth,'px;">'),po.push(this.getColGroup("FF")),po.push("<tbody>"),po.push(getDataSet(this.dataSet,"fix")),po.push("</tbody>"),po.push("</table>"),po.push("</div>")),this.gridFoot.html(po.join("")),this.gridFoot.show(),this.gridFoot_content=this.gridFoot.find(".gridFootContent"),this.gridFoot.css({height:this.gridFoot_content.height()}),_tdHeight=void 0,this.gridFoot.find(".bodyTd").each(function(){var tdHeight,td_dom=$(this),rowspan=td_dom.attr("rowspan");td_dom.attr("valign");rowspan||(rowspan=1),"undefined"==typeof _tdHeight&&(_tdHeight=td_dom.height()/rowspan),tdHeight=_tdHeight*rowspan,rowspan>1&&td_dom.css({height:tdHeight+1})}),cfg.scrollContentBottomMargin=this.gridFoot_content.height()},getEditorFormatterValue:function(formatter,dataSet,value,key,CH,idAttr){var result,sendObj;this.config;if("money"==formatter)result=""==value||"null"==value||void 0==value?"0":value.number().money();else if("dec"==formatter)result=void 0==value?"":value.dec();else if("html"==formatter)result=value;else if("checkbox"==formatter||"radio"==formatter)result=value;else{sendObj={index:null,list:this.list,item:dataSet,dataSet:dataSet,page:this.page,key:key,value:value};try{result=formatter.call(sendObj)}catch(e){console.log(e)}}return result},getEditorFormValue:function(form,dataSet,value,key,CH,idAttr){var cfg=this.config,paddingRight=cfg.formPaddingRight,result=[],formClass=form.addClass?" "+form.addClass:"",formWidth=form.width?"width:"+form.width+";":"width:100%;",formHeight=form.height?"height:"+form.height+";":"",formStyle=form.style?form.style:"",formID=form.id?form.id:cfg.targetID+"_AX_"+key+"_AX_"+idAttr,getFormValue=function(formvalue,value){if("itemValue"==formvalue||"itemText"==formvalue)return"undefined"!=typeof value&&axdom.isArray(value)?value:"boolean"==typeof value?value:"string"==typeof value?value.dec():value;if(axdom.isFunction(formvalue)){var sendObj={key:key,value:value,list:this.list,page:this.page};return formvalue.call(sendObj,key,value)}return formvalue};if("hidden"==form.type)result.push("&nbsp;"),result.push('<input type="hidden" id="'+formID+'" name="'+key+'" value="'+getFormValue(form.value,dataSet[key])+'" class="AXInput'+formClass+'" style="'+formWidth+formHeight+formStyle+'" />');else if("text"==form.type)result.push('<div style="padding-right:'+paddingRight+';">'),result.push('<input type="text" id="'+formID+'" name="'+key+'" value="'+getFormValue(form.value,dataSet[key])+'" class="AXInput'+formClass+'" style="'+formWidth+formHeight+formStyle+'" />'),result.push("</div>");else if("readonly"==form.type)result.push('<div style="padding-right:'+paddingRight+';">'),result.push('<input type="text" readonly="readonly" id="'+formID+'" name="'+key+'" value="'+getFormValue(form.value,dataSet[key])+'" class="AXInput'+formClass+'" style="'+formWidth+formHeight+formStyle+'" />'),result.push("</div>");else if("textarea"==form.type)result.push('<div style="padding-right:'+paddingRight+';">'),result.push('<textarea id="'+formID+'" name="'+key+'" class="AXTextarea'+formClass+'" style="'+formWidth+formHeight+formStyle+'" >'+getFormValue(form.value,dataSet[key])+"</textarea>"),result.push("</div>");else if("select"==form.type){var formValue=getFormValue(form.value,dataSet[key]);result.push('<div style="padding-right:1px;">'),result.push('<select id="'+formID+'" name="'+key+'" class="AXSelect'+formClass+'" style="'+formWidth+formHeight+formStyle+'" >'),form.isspace&&result.push('<option value="">',(form.isspaceTitle||"").dec(),"</option>"),axf.each(form.options,function(){result.push('<option value="'+(this.value||this.optionValue)+'"'),"itemText"==form.value?formValue==(this.text||this.optionText).dec()&&result.push(' selected="selected"'):formValue==(this.value||this.optionValue)&&result.push(' selected="selected"'),result.push(">"+(this.text||this.optionText).dec()+"</option>")}),result.push("</select>"),result.push("</div>")}else if("radio"==form.type){var formValue=getFormValue(form.value,dataSet[key]);axf.each(form.options,function(oidx,opt){result.push('<input type="radio" id="'+formID+"_AX_"+oidx+'" name="'+key+'" value="'+this.value+'"'),formValue==this.value&&result.push(' checked="checked"'),result.push('><label for="'+formID+"_AX_"+oidx+'">'+this.text.dec()+"</label><br/>")})}else if("checkbox"==form.type){var formValue=getFormValue(form.value,dataSet[key]);axf.each(form.options,function(oidx,opt){if(result.push('<input type="checkbox" id="'+formID+"_AX_"+oidx+'" name="'+key+'" value="'+this.value+'"'),axdom.isArray(formValue)){var isChecked=!1,_value=this.value;axf.each(formValue,function(){return this==_value?(isChecked=!0,!1):void 0}),isChecked&&result.push(' checked="checked"')}else formValue==this.value&&result.push(' checked="checked"');result.push('><label for="'+formID+"_AX_"+oidx+'">'+this.text.dec()+"</label><br/>")})}return result.join("")},getEditorBody:function(dataSet,isfix){for(var cfg=this.config,getEditorFormatterValue=this.getEditorFormatterValue.bind(this),getEditorFormValue=this.getEditorFormValue.bind(this),tpo=[],hasFixed=this.hasFixed,r=0;r<cfg.editor.rows.length;r++){cfg.editor.rows.length-1==r;tpo.push('<tr class="gridBodyTr gridBodyTr_editor" id="'+cfg.targetID+"_AX_editor_"+r+"_AX_"+(isfix||"n")+'">');var colCount=0;axf.each(cfg.editor.rows[r],function(CHidx,CH){if(CH.display&&CH.colspan>0){if(void 0==isfix||void 0!=isfix&&colCount<cfg.fixedColSeq+1){colCount+=CH.colspan;var rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'" style="vertical-align:'+CH.valign+';"',bottomClass=CH.isLastCell?"":" bodyBottomBorder",fixedClass=CH.isFixedEndCell?" fixedLine":"",bodyNodeClass="";"checkbox"==CH.formatter?bodyNodeClass=" bodyTdCheckBox":"html"==CH.formatter&&(bodyNodeClass=" bodyTdHtml"),tpo.push("<td"+valign+rowspan+colspan+' id="'+cfg.targetID+"_AX_"+(isfix||"n")+"editor_AX_"+r+"_AX_"+CHidx+'" class="bodyTd'+bottomClass+fixedClass+'">'),tpo.push('<div class="bodyNode bodyTdText'+bodyNodeClass+'" align="'+CH.align+'" id="'+cfg.targetID+"_AX_editorText_AX_"+r+"_AX_"+CHidx+'">'),hasFixed&&!CH.isFixedCell||!hasFixed||void 0!=isfix?CH.form?tpo.push(getEditorFormValue(CH.form,dataSet,dataSet[CH.key],CH.key,CH,r+"_AX_"+CHidx)):CH.formatter?tpo.push(getEditorFormatterValue(CH.formatter,dataSet,dataSet[CH.key],CH.key,CH,r+"_AX_"+CHidx,CH.form)):tpo.push(dataSet[CH.key]):tpo.push("&nbsp;"),tpo.push("</div>"),tpo.push("</td>")}}else tpo.push('<td style="display:none">'),CH.form?tpo.push(getEditorFormValue(CH.form,dataSet,dataSet[CH.key],CH.key,CH,r+"_AX_"+CHidx)):CH.formatter?tpo.push(getEditorFormatterValue(CH.formatter,dataSet,dataSet[CH.key],CH.key,CH,r+"_AX_"+CHidx,CH.form)):tpo.push(dataSet[CH.key]),tpo.push("</td>")}),0==r&&void 0==isfix&&tpo.push('<td class="bodyNullTd" id="'+cfg.targetID+'_AX_editornull" rowspan="'+cfg.editor.rows.length+'"><div class="tdRelBlock">&nbsp;</div></td>'),tpo.push("</tr>")}return tpo.join("")},setEditor:function(item,itemIndex,insertIndex){var itemTrHeight,cfg=this.config,_this=this;if(this.editorItemIndex=null,!this.hasEditor)return void alert("setConfig 에 editor 가 설정 되지 않아 요청을 처리 할 수 없습니다.");this.unbindAXbind(),this.editorButtonPosition="bottom";var dataSet={};item&&(dataSet=item),axf.each(cfg.colGroup,function(){void 0==dataSet[this.key]&&(dataSet[this.key]="")});var po=[];if(po.push('<div id="'+cfg.targetID+'_AX_editorContent" class="editorContent" style="padding-left:1px;">'),po.push('<table cellpadding="0" cellspacing="0" class="gridBodyTable" style="">'),po.push(this.getColGroup("EB")),po.push('<tbody id="'+cfg.targetID+'_AX_editor_AX_tbody">'),po.push(this.getEditorBody(dataSet)),po.push("</tbody>"),po.push("</table>"),po.push("</div>"),this.hasFixed&&(po.push('<div id="'+cfg.targetID+'_AX_fixedEditorContent" class="fixedEditorContent" style="width:'+this.fixedColWidth+'px;padding-left:1px;">'),po.push('<table cellpadding="0" cellspacing="0" class="gridFixedBodyTable" style="width:'+this.fixedColWidth+'px;">'),po.push(this.getColGroup("FE")),po.push('<tbody id="'+cfg.targetID+'_AX_editor__AX_fixedTbody">'),po.push(this.getEditorBody(dataSet,"fix")),po.push("</tbody>"),po.push("</table>"),po.push("</div>")),po.push('<div id="'+cfg.targetID+'_AX_editorButtons" class="editorButtons">'),po.push('	<input type="button" id="'+cfg.targetID+'_AX_editorButtons_AX_save" value="Save" class="AXButtonSmall Classic" />'),po.push('	<input type="button" id="'+cfg.targetID+'_AX_editorButtons_AX_cancel" value="Cancel" class="AXButtonSmall" />'),po.push("</div>"),this.editor.html(po.join("")),"undefined"!=typeof itemIndex){var scrollTop=this.scrollContent.position().top,list=this.list;if("auto"==cfg.__height){var editorTop=axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+itemIndex).position().top;itemTrHeight=function(){if(0==list.length)return 0;if(1==list.length){var p2=axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+itemIndex).height();return p2}if(list.length-1==itemIndex){var p1=axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+(itemIndex-1)).position().top,p2=axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+itemIndex).position().top;return p2-p1}var p1=axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+itemIndex).position().top,p2=axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+(itemIndex.number()+1)).position().top;return p2-p1}()}else var editorTop=itemIndex*(itemTrHeight=this.virtualScroll.itemTrHeight);this.editor.css({top:editorTop+scrollTop+this.body.position().top}),this.editorOpend=!0,this.editorOpenTop=editorTop+this.body.position().top,this.editorItemIndex=itemIndex,this.editorButtonPosition="bottom";var trTop=-editorTop;editorTop+scrollTop+this.body.position().top>this.body.height()-this.body.position().top&&this.scrollContent.height()+this.editor.height()-31>this.body.height()&&0!=this.list.length&&(trTop=this.body.height()-this.scrollContent.height(),this.editorButtonPosition="top")}else if("undefined"!=typeof insertIndex){var scrollTop=this.scrollContent.position().top,list=this.list;if("auto"==cfg.__height){var editorTop=axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+insertIndex).position().top,trHeight=axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+insertIndex).outerHeight();itemTrHeight=function(){if(0==list.length)return 0;if(1==list.length){var p2=axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+insertIndex).height();return p2}if(list.length-1==itemIndex){var p1=axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+(insertIndex-1)).position().top,p2=axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+insertIndex).position().top;return p2-p1}var p1=axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+insertIndex).position().top,p2=(axdom("#"+cfg.targetID+"_AX_tr_0_AX_n_AX_"+(insertIndex.number()+1)).position()||0).top;return p2-p1}(),editorTop+=trHeight}else var editorTop=insertIndex*(itemTrHeight=this.virtualScroll.itemTrHeight);this.editor.css({top:editorTop+this.body.position().top}),this.editorOpend=!0,this.editorOpenTop=editorTop,this.editorInsertIndex=insertIndex,this.editorButtonPosition="bottom";var trTop=-editorTop;trTop.abs()+this.body.height()>this.scrollContent.height()&&this.scrollContent.height()+this.editor.height()-31>this.body.height()&&this.list.length>0&&(trTop=this.body.height()-this.scrollContent.height(),
  this.editorButtonPosition="top"),this.body.height()<this.scrollContent.height()&&(this.scrollContent.css({top:trTop}),this.contentScrollContentSync({top:trTop}))}else{var editorTop=0,itemTrHeight=this.virtualScroll.itemTrHeight;this.editor.css({top:editorTop+this.body.position().top}),this.editorOpend=!0,this.editorOpenTop=editorTop,this.editorItemIndex=null,this.editorButtonPosition="bottom",this.body.height()<this.scrollContent.height()&&(this.scrollContent.css({top:0}),this.contentScrollContentSync({top:0}))}this.editor.show(),this.editor.find("input[type=text],textarea").bind("mousedown.AXGrid",function(){this.focus()}),this.editor.find("input,textarea,select").bind("focus.AXGrid",function(){}),cfg.editor.onkeyup&&this.editor.find("input[type=text],textarea").unbind("keyup.AXGrid").bind("keyup.AXGrid",function(event){cfg.editor.onkeyup.call({list:_this.list,item:item,element:this},event,this)});for(var r=0;r<cfg.editor.rows.length;r++)axf.each(cfg.editor.rows[r],function(CHidx,CH){if(CH.display&&CH.colspan>0){var formID="";CH.AXBind&&(formID=CH.form.id?CH.form.id:cfg.targetID+"_AX_"+CH.key+"_AX_"+r+"_AX_"+CHidx,"number"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).bindNumber(CH.AXBind.config||{}):"money"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).bindMoney(CH.AXBind.config||{}):"selector"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).bindSelector(CH.AXBind.config||{}):"slider"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).bindSlider(CH.AXBind.config||{}):"twinSlider"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).bindTwinSlider(CH.AXBind.config||{}):"date"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).bindDate(CH.AXBind.config||{}):"twinDate"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).bindTwinDate(CH.AXBind.config||{}):"dateTime"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).bindDateTime(CH.AXBind.config||{}):"switch"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).bindSwitch(CH.AXBind.config||{}):"select"==CH.AXBind.type&&"select"==CH.form.type&&axdom("#"+formID).bindSelect(CH.AXBind.config||{})),CH.form&&(formID=CH.form.id?CH.form.id:cfg.targetID+"_AX_"+CH.key+"_AX_"+r+"_AX_"+CHidx,CH.form.onChange&&axdom("#"+formID).bind("change",function(){CH.form.onChange.call({key:CH.key,position:CHidx,value:axdom("#"+formID).val(),text:axf.getId(formID).options[axf.getId(formID).options.selectedIndex].text})}),CH.form.onClick&&axdom("#"+formID).bind("click",function(){CH.form.onClick.call({key:CH.key,position:CHidx,value:axdom("#"+formID).val()})}),CH.form.onBlur&&axdom("#"+formID).bind("blur",function(){CH.form.onBlur.call({key:CH.key,position:CHidx,value:axdom("#"+formID).val()})}),CH.form.onFocus&&axdom("#"+formID).bind("focus",function(){CH.form.onFocus.call({key:CH.key,position:CHidx,value:axdom("#"+formID).val()})}))}});var editorContent=axdom("#"+cfg.targetID+"_AX_editorContent"),fixedEditorContent=axdom("#"+cfg.targetID+"_AX_fixedEditorContent"),editorButtons=axdom("#"+cfg.targetID+"_AX_editorButtons"),editorContentHeight=editorContent.height(),fixedEditorContentHeight=fixedEditorContent.height();fixedEditorContentHeight>editorContentHeight?(editorContentHeight=fixedEditorContentHeight,editorContent.find(".gridBodyTable").css({height:editorContentHeight})):fixedEditorContent.find(".gridFixedBodyTable").css({height:editorContentHeight}),editorButtons.css({top:editorContentHeight});editorContentHeight.number();itemTrHeight>editorContentHeight&&(editorContentHeight=itemTrHeight,editorContent.find(".gridBodyTable").css({height:editorContentHeight}),fixedEditorContent.find(".gridFixedBodyTable").css({height:editorContentHeight}),this.editor.css({height:editorContentHeight.number()}),editorButtons.css({top:editorContentHeight}));var scrollLeft=this.scrollContent.position().left;editorContent.css({left:scrollLeft}),"top"==this.editorButtonPosition&&(void 0!=insertIndex?this.editor.css({top:this.editor.position().top-editorContentHeight}):this.editor.css({top:this.editor.position().top-editorContentHeight+itemTrHeight}),editorButtons.addClass("top"),editorButtons.css({top:-editorButtons.outerHeight()+1})),axdom("#"+cfg.targetID+"_AX_editorButtons_AX_save").bind("click",this.saveEditor.bind(this)),axdom("#"+cfg.targetID+"_AX_editorButtons_AX_cancel").bind("click",this.cancelEditor.bind(this))},setEditorForm:function(obj){var cfg=this.config,formID=cfg.targetID+"_AX_"+obj.key+"_AX_"+obj.position.join("_AX_");axf.getId(formID)||alert(formID+"로 Element를 찾을 수 없습니다."),axdom("#"+formID).val(obj.value)},focusEditorForm:function(key){this.config;this.editor.find("input[type=text],textarea").each(function(){return this.name==key?(this.focus(),!1):void 0})},saveEditor:function(){var cfg=this.config,editorFormItem={};null==this.editorItemIndex?editorFormItem.requestType="new":editorFormItem.requestType="edit";for(var setEditorFormItemValue=function(k,v,type){editorFormItem[k]&&"checkbox"==type?Object.isArray(editorFormItem[k])?editorFormItem[k].push(v):(editorFormItem[k]=[editorFormItem[k]],editorFormItem[k].push(v)):editorFormItem[k]=v},r=0;r<cfg.editor.rows.length;r++)axf.each(cfg.editor.rows[r],function(CHidx,CH){if(CH.form){var formID=CH.form.id?CH.form.id:cfg.targetID+"_AX_"+CH.key+"_AX_"+r+"_AX_"+CHidx;if("radio"==CH.form.type){axf.each(CH.form.options,function(oidx,opt){var opt_formID=formID+"_AX_"+oidx;axdom("#"+opt_formID).get(0).checked&&setEditorFormItemValue(CH.key,axdom("#"+opt_formID).val(),"radio")})}else if("checkbox"==CH.form.type){axf.each(CH.form.options,function(oidx,opt){var opt_formID=formID+"_AX_"+oidx;axdom("#"+opt_formID).get(0).checked?setEditorFormItemValue(CH.key,axdom("#"+opt_formID).val(),"checkbox"):setEditorFormItemValue(CH.key,"","checkbox")})}else"select"==CH.form.type?"itemText"==CH.form.value?setEditorFormItemValue(CH.key,axf.getId(formID).options[axf.getId(formID).options.selectedIndex].text,"select"):setEditorFormItemValue(CH.key,axdom("#"+formID).val(),"select"):setEditorFormItemValue(CH.key,axdom("#"+formID).val(),"text")}else{var formID=cfg.targetID+"_AX_"+CH.key+"_AX_"+r+"_AX_"+CHidx;axf.getId(formID)&&setEditorFormItemValue(CH.key,axdom("#"+formID).val(),"text")}});for(var validate=function(formID,CH){var value,checkedValues=[];"radio"==CH.form.type?(axf.each(CH.form.options,function(oidx,opt){var opt_formID=formID+"_AX_"+oidx;axdom("#"+opt_formID).get(0).checked&&checkedValues.push(axdom("#"+opt_formID).val())}),value=checkedValues.join(",")):"checkbox"==CH.form.type?(axf.each(CH.form.options,function(oidx,opt){var opt_formID=formID+"_AX_"+oidx;axdom("#"+opt_formID).get(0).checked?checkedValues.push(axdom("#"+opt_formID).val()):checkedValues.push(CH.key+"=")}),value=checkedValues.join(",")):value="select"==CH.form.type?"itemText"==CH.form.value?axf.getId(formID).options[axf.getId(formID).options.selectedIndex].text:axdom("#"+formID).val():axdom("#"+formID).val().trim();var sendObj={formID:formID,value:value,checkedValues:checkedValues,form:CH.form};return CH.form.validate.call(sendObj,formID,value)},validateError=!1,r=0;r<cfg.editor.rows.length;r++)axf.each(cfg.editor.rows[r],function(CHidx,CH){if(CH.form&&CH.form.validate){var formID=CH.form.id?CH.form.id:cfg.targetID+"_AX_"+CH.key+"_AX_"+r+"_AX_"+CHidx,result=validate(formID,CH);result||(validateError=!0,axdom("#"+formID).focus())}});if(!validateError){if(cfg.editor.request){this.unbindAXbind();var po=[];po.push('<div class="editorContent" style="background:#fff;">'),po.push('<div class="AXLoading"></div>'),po.push("</div>"),this.editor.html(po.join(""));var saveEditorRequest=this.saveEditorRequest.bind(this),cancelEditor=this.cancelEditor.bind(this),ajax=cfg.editor.request,url=ajax.ajaxUrl,formPars=[];axf.each(editorFormItem,function(k,v){formPars.push(k+"="+v.enc())}),Object.isString(obj.ajaxPars)?formPars.push(obj.ajaxPars):Object.isObject(obj.ajaxPars)&&formPars.push(axdom.param(obj.ajaxPars));var pars=formPars.join("&"),_method="post",_contentType=AXConfig.AXReq.contentType,_headers={},_responseType=AXConfig.AXReq.responseType,_dataType=AXConfig.AXReq.dataType;return ajax.method&&(_method=ajax.method),ajax.contentType&&(_contentType=ajax.contentType),ajax.headers&&(_headers=ajax.headers),new AXReq(url,{type:_method,contentType:_contentType,responseType:_responseType,dataType:_dataType,headers:_headers,debug:ajax.debug,pars:pars,onsucc:function(res){res.result&&res.result==AXConfig.AXReq.okCode||void 0==res.result&&!res.error?saveEditorRequest(res):(toast.push({body:res.msg.dec(),type:"Caution"}),cancelEditor())},onerr:function(res){if(cfg.editor.response){var sendObj={error:!0,res:res,index:this.editorItemIndex,insertIndex:this.editorInsertIndex,list:this.list,page:this.page};cfg.editor.response.call(sendObj,this.editorItemIndex)}cancelEditor()}}),!0}var saveEditorRequest=this.saveEditorRequest.bind(this),cancelEditor=this.cancelEditor.bind(this);saveEditorRequest({item:editorFormItem})}},saveEditorRequest:function(res){var cfg=this.config;if(this.editorOpend)if(cfg.editor.response){var sendObj={res:res,index:this.editorItemIndex,insertIndex:this.editorInsertIndex,list:this.list,page:this.page};cfg.editor.response.call(sendObj,this.editorItemIndex)}else this.unbindAXbind(),null!=this.editorItemIndex&&void 0!=this.editorItemIndex?(AXUtil.overwriteObject(this.list[this.editorItemIndex],res.item,!0),this.updateList(this.editorItemIndex,this.list[this.editorItemIndex])):null!=this.editorInsertIndex&&void 0!=this.editorInsertIndex?this.pushList(res.item,this.editorInsertIndex):this.pushList(res.item),this.editorItemIndex=null,this.editorInsertIndex=null,this.editor.hide(),this.editorOpend=!1},cancelEditor:function(){this.editor.hide(),this.editorOpend=!1,this.unbindAXbind()},unbindAXbind:function(){var cfg=this.config;try{if(cfg.editor&&cfg.editor.rows)for(var r=0;r<cfg.editor.rows.length;r++)axf.each(cfg.editor.rows[r],function(CHidx,CH){if(CH.display&&CH.colspan>0&&CH.AXBind){var formID=CH.form.id?CH.form.id:cfg.targetID+"_AX_"+CH.key+"_AX_"+r+"_AX_"+CHidx;"number"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).unbindInput():"money"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).unbindInput():"selector"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).unbindInput():"slider"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).unbindInput():"twinSlider"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).unbindInput():"date"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).unbindInput():"twinDate"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).unbindInput():"dateTime"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).unbindInput():"switch"==CH.AXBind.type&&"text"==CH.form.type?axdom("#"+formID).unbindInput():"select"==CH.AXBind.type&&"select"==CH.form.type&&axdom("#"+formID).unbindSelect()}})}catch(e){console.log(e)}},appendList:function(item,insertIndex){insertIndex>=this.list.length&&(insertIndex=this.list.length),this.setEditor(item,void 0,insertIndex)},setMobileTool:function(){var cfg=this.config,toolGroupTop=axdom("#"+cfg.targetID+"_AX_gridToolGroupTop"),toolGroupBottom=axdom("#"+cfg.targetID+"_AX_gridToolGroupBottom"),po=[];po.push('<a name="'+cfg.targetID+'_AX_top"></a>'),po.push('<a class="tool-config"><span class="displayNone">congif</span></a>'),cfg.page&&cfg.page.paging&&(po.push('<div class="tool-pageGroup">'),po.push('<a class="tool-prevPage"><span class="displayNone">prev</span></a>'),po.push('<div class="tool-pageNo"><span id="'+cfg.targetID+'_AX_gridToolTopPageNoDisplay"></span><select id="'+cfg.targetID+'_AX_gridToolTopPageNo"></select></div>'),po.push('<a class="tool-nextPage"><span class="displayNone">next</span></a>'),po.push("</div>")),po.push('<a href="#'+cfg.targetID+'_AX_bottom" class="tool-gotoTop"><span class="displayNone">top</span></a>'),toolGroupTop.empty(),toolGroupTop.append(po.join("")),po=[],po.push('<a name="'+cfg.targetID+'_AX_bottom"></a>'),po.push('<a class="tool-config"><span class="displayNone">congif</span></a>'),cfg.page&&cfg.page.paging&&(po.push('<div class="tool-pageGroup">'),po.push('<a class="tool-prevPage"><span class="displayNone">prev</span></a>'),po.push('<div class="tool-pageNo"><span id="'+cfg.targetID+'_AX_gridToolBottomPageNoDisplay"></span><select id="'+cfg.targetID+'_AX_gridToolBottomPageNo"></select></div>'),po.push('<a class="tool-nextPage"><span class="displayNone">next</span></a>'),po.push("</div>")),po.push('<a href="#'+cfg.targetID+'_AX_top" class="tool-gotoBottom"><span class="displayNone">bottom</span></a>'),toolGroupBottom.empty(),toolGroupBottom.append(po.join(""));var pgCount=this.page.pageCount.number(),pageNo=this.page.pageNo.number();if(cfg.page){if(cfg.page.paging){if(0==pgCount)po=[],po.push('<option value="">..</option>'),axdom("#"+cfg.targetID+"_AX_gridToolTopPageNo").html(po.join("")),axdom("#"+cfg.targetID+"_AX_gridToolTopPageNoDisplay").html(po.join("")),axdom("#"+cfg.targetID+"_AX_gridToolBottomPageNo").html(po.join("")),axdom("#"+cfg.targetID+"_AX_gridToolBottomPageNoDisplay").html(po.join(""));else{axdom("#"+cfg.targetID+"_AX_gridToolTopPageNo").html(""),axdom("#"+cfg.targetID+"_AX_gridToolTopPageNoDisplay").html(pageNo);var mySelect=axf.getId(cfg.targetID+"_AX_gridToolTopPageNo");axdom("#"+cfg.targetID+"_AX_gridToolBottomPageNo").html(""),axdom("#"+cfg.targetID+"_AX_gridToolBottomPageNoDisplay").html(pageNo);for(var mySelectBottom=axf.getId(cfg.targetID+"_AX_gridToolBottomPageNo"),oi=0,p=1;pgCount+1>p;p++)mySelect.options[oi]=new Option(p,p.money()),mySelectBottom.options[oi]=new Option(p,p.money()),pageNo==p&&(mySelect.options[oi].selected=!0,mySelectBottom.options[oi].selected=!0),oi++}axdom("#"+cfg.targetID+"_AX_gridToolTopPageNo").bind("change",this.onPageChange.bind(this)),axdom("#"+cfg.targetID+"_AX_gridToolBottomPageNo").bind("change",this.onPageChange.bind(this));var goPageMove=this.goPageMove.bind(this);toolGroupTop.find(".tool-prevPage").bind("click",function(event){goPageMove(-1)}),toolGroupBottom.find(".tool-prevPage").bind("click",function(event){goPageMove(-1)}),toolGroupTop.find(".tool-nextPage").bind("click",function(event){goPageMove(1)}),toolGroupBottom.find(".tool-nextPage").bind("click",function(event){goPageMove(1)})}var openMobileConfig=this.openMobileConfig.bind(this);toolGroupTop.find(".tool-config").bind("click",function(event){openMobileConfig(event)}),toolGroupBottom.find(".tool-config").bind("click",function(event){openMobileConfig(event)})}},setPaging:function(){var cfg=this.config;if("mobile"==cfg.viewMode)return this.setMobileTool(),this;axdom("#"+cfg.targetID+"_AX_gridToolGroupTop").empty(),axdom("#"+cfg.targetID+"_AX_gridToolGroupBottom").empty();var pgCount=(axf.getId(cfg.targetID+"_AX_gridPageNo"),this.page.pageCount.number()),pageNo=this.page.pageNo.number();if(0===pgCount){var po=[];po.push('<option value="">..</option>'),axdom("#"+cfg.targetID+"_AX_gridPageNo").html(po.join(""))}else{axdom("#"+cfg.targetID+"_AX_gridPageNo").html("");var mySelect=axf.getId(cfg.targetID+"_AX_gridPageNo");if(pgCount>1e3){var oi=0,pageStart=1,pageEnd=pageNo+49;pageNo>50&&(pageStart=pageNo-50),pageEnd>pgCount&&(pageEnd=pgCount);for(var p=pageStart;pageEnd+1>p;p++)mySelect.options[oi]=new Option(p,p.money()),pageNo==p&&(mySelect.options[oi].selected=!0),oi++}else for(var oi=0,p=1;pgCount+1>p;p++)mySelect.options[oi]=new Option(p,p.money()),pageNo==p&&(mySelect.options[oi].selected=!0),oi++}if(axdom("#"+cfg.targetID+"_AX_gridPageCount").html("/ "+pgCount.money()+" "+cfg.pageCountMSG),0==this.page.listCount.number()&&(this.page.listCount=this.list.length),axdom("#"+cfg.targetID+"_AX_gridStatus").html(cfg.listCountMSG.replace("{listCount}",this.page.listCount.number().money())),this.isMobile)axdom("#"+cfg.targetID+"_AX_gridPageNo").bind("change",this.onPageChange.bind(this));else{var onPageChange=this.onPageChange.bind(this);axdom("#"+cfg.targetID+"_AX_gridPageNo").bindSelect({onchange:function(arg){onPageChange()}})}},goPageMove:function(pageAdd){var cfg=this.config;if(this.page.pageCount.number()>0){var pgCount=this.page.pageCount.number(),pageNo=this.page.pageNo.number();if(1>pageNo+pageAdd)return!1;if(pageNo+pageAdd>pgCount)return!1;pageNo+=pageAdd,"mobile"==cfg.viewMode?(axdom("#"+cfg.targetID+"_AX_gridToolTopPageNo").val(pageNo),axdom("#"+cfg.targetID+"_AX_gridToolBottomPageNo").val(pageNo),this.onPageChange()):axdom("#"+cfg.targetID+"_AX_gridPageNo").setValueSelect(pageNo)}},onPageChange:function(e){var pgCount,pageNo,npageNo,cfg=this.config;if(pgCount=this.page.pageCount.number(),pageNo=this.page.pageNo.number(),npageNo="mobile"==cfg.viewMode?e?e.target.value:axdom("#"+cfg.targetID+"_AX_gridToolTopPageNo").val():axdom("#"+cfg.targetID+"_AX_gridPageNo").val(),this.page.pageNo=npageNo,this.page.onchange)this.page.onchange.call(this.page,npageNo);else if("mobile"!=cfg.viewMode){var scrollTop=0;this.scrollContent.css({top:scrollTop}),this.contentScrollContentSync({top:scrollTop}),this.pageActive&&this.ajaxInfo&&(this.setList(this.ajaxInfo,this.ajax_sortDisable,null,"paging"),this.contentScrollResize())}else this.pageActive&&this.ajaxInfo&&this.setList(this.ajaxInfo,this.ajax_sortDisable,null,"paging")},setStatus:function(listLength){var listCount,cfg=this.config;if("undefined"!=typeof listLength)listCount=listLength;else{var page;this.page&&(page=this.page),listCount=page.listCount||0}axdom("#"+cfg.targetID+"_AX_gridStatus").html(cfg.listCountMSG.replace("{listCount}",listCount.number().money()))},getSortParam:function(ty){var sortObj=(this.config,this.nowSortHeadObj);return sortObj?"one"==ty?"sortBy="+sortObj.key+" "+sortObj.sort:axdom.param({sortKey:sortObj.key,sortWay:sortObj.sort}):""},getExcelColHeadTd:function(arg,filter){var cfg=this.config,po=[];return filter&&!filter.call(cfg.colGroup[arg.colSeq])?"":("html"!=arg.formatter&&"checkbox"!=arg.formatter||arg.displayLabel||(colHeadTdText=" colHeadTdHtml",toolUse=!1,"checkbox"==arg.formatter&&(colHeadTdText=" colHeadTdCheck")),po.push("<td"+arg.valign+arg.rowspan+arg.colspan+">"),po.push(arg.tdHtml),po.push("</td>"),po.join(""))},getExcelItem:function(itemIndex,item,filter){for(var cfg=this.config,tpo=[],_this=this,getTooltipValue=(this.getFormatterValue.bind(this),this.getTooltipValue.bind(this)),r=0;r<cfg.body.rows.length;r++)tpo.push("<tr>"),cfg.body.rows[r].forEach(function(CH,CHidx){var result="";if(CH.display&&CH.colspan>0)if(filter&&!filter.call(CH));else{var rowspan=CH.rowspan>1?" rowspan='"+CH.rowspan+"'":"",colspan=CH.colspan>1?" colspan='"+CH.colspan+"'":"",valign=" valign='"+CH.valign+"' style='vertical-align:"+CH.valign+";mso-number-format:\\@ ;'",tooltipValue="";if(CH.tooltip&&(tooltipValue=getTooltipValue(CH.tooltip,item,itemIndex,item[CH.key],CH.key,CH)),tpo.push("<td"+valign+rowspan+colspan+">"),CH.formatter){if(Object.isFunction(CH.formatter)){var sendObj={index:itemIndex,list:this.list,item:item,page:this.page,key:CH.key,value:item[CH.key]||""};result=CH.formatter.call(sendObj,itemIndex,item),result=(""+result).delHtml()}else result=Object.isString(CH.formatter)&&CH.formatter in _this.formatter&&"checkbox"==CH.formatter?item[CH.key]:_this.formatter[CH.formatter].call(_this,CH.formatter,item,itemIndex,item[CH.key],CH.key,CH,CHidx);tpo.push(result||"")}else tpo.push(item[CH.key]||"");tpo.push("</td>")}}),tpo.push("</tr>");return tpo.join("")},getExcelItemMarker:function(itemIndex,item,isfix,filter,markerIndexs){for(var cfg=this.config,tpo=[],getFormatterValue=this.getFormatterValue.bind(this),mi=0,l=markerIndexs.length;l>mi;mi++)for(var marker=cfg.body.marker[markerIndexs[mi]],r=0;r<marker.rows.length;r++){marker.rows.length-1==r;tpo.push("<tr>"),axf.each(marker.rows[r],function(CHidx,CH){if(CH.display&&CH.colspan>0)if(filter&&!filter.call(CH));else{var rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'" style="vertical-align:'+CH.valign+';"';tpo.push("<td"+valign+rowspan+colspan+">"),CH.formatter?tpo.push(getFormatterValue(CH.formatter,item,itemIndex,item[CH.key],CH.key,CH)):tpo.push(item[CH.key]),tpo.push("</td>")}}),tpo.push("</tr>")}return tpo.join("")},getExcelHeadDataSet:function(dataSet,isfix,filter){var cfg=this.config;if(void 0!=dataSet){var tpo=[],getDataSetFormatterValue=this.getDataSetFormatterValue.bind(this);axf.each(cfg.colGroup,function(){void 0==dataSet[this.key]&&(dataSet[this.key]="")});for(var r=0;r<cfg.head.rows.length;r++){cfg.head.rows.length-1==r;tpo.push("<tr>");axf.each(cfg.head.rows[r],function(CHidx,CH){if(CH.display&&CH.colspan>0)if(filter&&!filter.call(CH));else{var rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'" style="vertical-align:'+CH.valign+';"',bodyNodeClass="";"checkbox"==CH.formatter||"radio"==CH.formatter?bodyNodeClass=" bodyTdCheckBox":"html"==CH.formatter&&(bodyNodeClass=" bodyTdHtml"),tpo.push("<td"+valign+rowspan+colspan+">"),CH.formatter?tpo.push(getDataSetFormatterValue(CH.formatter,dataSet,dataSet[CH.key],CH.key,CH)):tpo.push(dataSet[CH.key]),tpo.push("</td>")}}),tpo.push("</tr>")}return tpo.join("")}},getExcelFootDataSet:function(dataSet,isfix,filter){var cfg=this.config;if(void 0!=dataSet){var tpo=[],getDataSetFormatterValue=this.getDataSetFormatterValue.bind(this);axf.each(cfg.colGroup,function(){void 0==dataSet[this.key]&&(dataSet[this.key]="")});for(var r=(this.hasFixed,0);r<cfg.foot.rows.length;r++){cfg.foot.rows.length-1==r;tpo.push("<tr>"),axf.each(cfg.foot.rows[r],function(CHidx,CH){if(CH.display&&CH.colspan>0)if(filter&&!filter.call(CH));else{var rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'" style="vertical-align:'+CH.valign+';"',bodyNodeClass=(CH.isLastCell?"":" bodyBottomBorder",CH.isFixedEndCell?" fixedLine":"","");"checkbox"==CH.formatter||"radio"==CH.formatter?bodyNodeClass=" bodyTdCheckBox":"html"==CH.formatter&&(bodyNodeClass=" bodyTdHtml"),tpo.push("<td"+valign+rowspan+colspan+">"),CH.formatter?tpo.push(getDataSetFormatterValue(CH.formatter,dataSet,dataSet[CH.key],CH.key,CH)):tpo.push(dataSet[CH.key]),tpo.push("</td>")}}),tpo.push("</tr>")}return tpo.join("")}},getExcelFormat:function(format,filter){var markerIndex,cfg=this.config,getExcelColHeadTd=this.getExcelColHeadTd.bind(this),bodyHasMarker=this.bodyHasMarker,getExcelItem=this.getExcelItem.bind(this),getExcelItemMarker=this.getExcelItemMarker.bind(this),getMarkerDisplay=this.getMarkerDisplay.bind(this),getHeadDataSet=this.getExcelHeadDataSet.bind(this),getFootDataSet=this.getExcelFootDataSet.bind(this),po=[];if("html"==format){po.push("<table border='1'>"),po.push("	<thead>");for(var r=0;r<cfg.colHead.rows.length;r++){cfg.colHead.rows.length-1==r;po.push("<tr>"),axf.each(cfg.colHead.rows[r],function(CHidx,CH){if(CH.display&&CH.colspan>0){var tdHtml=CH.label||"untitle",rowspan=CH.rowspan>1?" rowspan='"+CH.rowspan+"'":"",colspan=CH.colspan>1?" colspan='"+CH.colspan+"'":"",valign=" valign='"+CH.valign+"'";po.push(getExcelColHeadTd({valign:valign,rowspan:rowspan,colspan:colspan,align:CH.align,colSeq:CH.colSeq,formatter:CH.formatter,sort:CH.sort,tdHtml:tdHtml,displayLabel:CH.displayLabel},filter))}}),po.push("</tr>")}return po.push("	</thead>"),po.push("	<tbody>"),cfg.head&&po.push(getHeadDataSet(this.dataSet,!1,filter)),axf.each(this.list,function(itemIndex,item){po.push(getExcelItem(itemIndex,item,filter)),bodyHasMarker&&(markerIndex=getMarkerDisplay(itemIndex,item)).length>0&&po.push(getExcelItemMarker(itemIndex,item,"n",filter,markerIndex))}),cfg.foot&&po.push(getFootDataSet(this.dataSet,!1,filter)),po.push("	</tbody>"),po.push("</table>"),po.join("")}return"json"==format?{colGroup:cfg.colGroup,list:this.list}:void 0},changeGridView:function(JSObject){var cfg=this.config;cfg.viewMode!=JSObject.viewMode&&(cfg.viewMode=JSObject.viewMode,"icon"==JSObject.viewMode?(JSObject.view&&(cfg.view=JSObject.view),this.redrawGrid("changeGridView")):"grid"==JSObject.viewMode?this.redrawGrid("changeGridView"):"mobile"==JSObject.viewMode&&(JSObject.view&&(cfg.view=JSObject.view),this.redrawGrid("changeGridView")))},openMobileConfig:function(event){var cfg=this.config,_this=this,mobileView=cfg.view;if(void 0==mobileView){for(var CG,columns=[],cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++){var col=null,addClass="";CG.widthAstric||CG.width.number()>=200?(col=4,addClass="underLine"):CG.width.number()>=100?col=2:CG.width.number()>=40,columns.push({key:CG.key,label:CG.label,col:col,formatter:CG.formatter,addClass:addClass,sort:CG.sort||"",display:CG.display||!0})}columns=columns.sort(function(pItem,nItem){var v1=pItem.col,v2=nItem.col;return v2>v1?1:v1>v2?-1:v1==v2?0:void 0}),mobileView={labelView:!0,column:columns},cfg.view=mobileView}for(var CN,cidx=0,__arr=mobileView.column;cidx<__arr.length&&(CN=__arr[cidx]);cidx++)void 0!=CN.display&&1!=CN.display||(CN.display=!0,CN.checked=!0);var contextMenu=mobileView.column.concat();this.mobileContextMenu.setConfig({responsiveMobile:9e5}),this.mobileContextMenu.bind({id:cfg.targetID+"myContextMenu",theme:"AXContextMenu",width:"150",checkbox:"checkbox",sortbox:!0,menu:contextMenu,onchange:function(){for(var CN,cidx=0,__arr=this.menu;cidx<__arr.length&&(CN=__arr[cidx]);cidx++)CN.display=CN.checked;cfg.view.column=axf.copyObject(this.menu),_this.printList(),this.contentScrollResize()},onsort:function(){return _this.list=_this.sortList(this.sortMenu.sort,this.sortMenu,_this.list),_this.printList(),this.contentScrollResize(),!0}}),this.mobileContextMenu.open({id:cfg.targetID+"myContextMenu"},event)},clipBoardClear:function(){var body=this.body;return axf.each(this.copiedRow,function(){body.find(".gridBodyTr_"+this).removeClass("copied")}),this.copiedRow.clear(),this.clipBoard.type="",this.clipBoard.list=[],this},selectClear:function(){var body=this.body;return this.selectedCells.length>0&&(axf.each(this.selectedCells,function(){body.find(".bodyTd_"+this).removeClass("selected")}),this.selectedCells.clear()),this.selectedRow.length>0&&(axf.each(this.selectedRow,function(){body.find(".gridBodyTr_"+this).removeClass("selected")}),this.selectedRow.clear()),this.copiedRow.length>0&&(axf.each(this.copiedRow,function(){body.find(".gridBodyTr_"+this).removeClass("copied")}),this.copiedRow.clear()),this.clipBoard.type="",this.clipBoard.list=[],this},getCheckedParams:function(colSeq,traditional){var colName=this.config.colGroup[colSeq].key,checkedList=this.getCheckedList(colSeq),params=[];return colName?checkedList&&0!==checkedList.length?($.each(checkedList,function(idx,item){if(traditional){var p={};p[colName]=item[colName]||"",params.push(p)}else params.push({name:colName,value:item[colName]||""})}),params):params:(console.log("colSeq invalid. Please check the colSeq value."),params)},getList:function(filter,clone){var filteredList=[];if(filter===!1||Object.isUndefined(filter))filteredList=this.list,clone=!1;else if(filter===!0)filteredList=this.list,clone=!0;else if(Object.isString(filter))axf.each(this.list,function(idx,item){filter.indexOf(item._CUD)>-1&&filteredList.push(item)}),filter.indexOf("D")>-1&&axf.each(this.removedList,function(idx,item){filteredList.push(item)});else if(Object.isFunction(filter)){var fnFilter=filter.bind(this);axf.each(this.list,function(idx,item){fnFilter(idx,item)&&filteredList.push(item)})}if(clone){var clonedList=[];return axf.each(filteredList,function(idx,item){clonedList.push(Object.clone(item))}),clonedList}return filteredList},validateCheck:function(filter){var cfg=this.config,_self=this;if(Object.isString(filter)){if(!cfg.colGroup)return!1;var item,editorItem,__arr=cfg.colGroup,arrKeyEditor={};for(var i in __arr)if(item=__arr[i],editorItem=item.editor,Object.isObject(editorItem)){var validateflag=!1;Object.isUndefined(editorItem.notEmpty)||(validateflag=!0,item.editor.notEmpty=editorItem.notEmpty===!0?item.label+" 필수 입력항목입니다.":Object.isString(editorItem.notEmpty)?editorItem.notEmpty:!1),Object.isUndefined(editorItem.range)||(validateflag=!0,item.editor.range.msg=Object.isUndefined(item.editor.range.msg)?item.label+" 입력 값을 초과 하였습니다.":item.editor.range.msg),validateflag&&(arrKeyEditor[i]={},arrKeyEditor[i].editor=item.editor,arrKeyEditor[i].key=item.key)}var _colseq,_idx,reval=!0;axf.each(this.list,function(idx,item){if(filter.indexOf(item._CUD)>-1){var itemval;for(var colseq in arrKeyEditor){if(editorItem=arrKeyEditor[colseq].editor,itemval=item[arrKeyEditor[colseq].key],_colseq=colseq,_idx=idx,editorItem.notEmpty&&""==$.trim(itemval))return editorItem.notEmpty&&alert(editorItem.notEmpty),reval=!1,!1;if(itemval=itemval?itemval+"":"money"!=editorItem.type?"":"0","money"==editorItem.type&&editorItem.range){var rangeval=editorItem.range.val,rangeArr=rangeval.split(","),decimalNum=rangeArr[0],decimalPoint=rangeArr.length>1?rangeArr[1]:0,numval="",pointval="";if(decimalNum=isNaN(decimalNum)?0:parseInt(decimalNum,10),decimalPoint=isNaN(decimalPoint)?0:parseInt(decimalPoint,10),numval=itemval.replace(/[$,]+/g,""),isNaN(numval))return alert("숫자만 입력가능합니다."),reval=!1,!1;if(itemval.indexOf(".")>-1){var valArr=itemval.split(".");numval=valArr[0],pointval=valArr[1]}if((numval.length>decimalNum||pointval.length>decimalPoint)&&editorItem.range.msg)return editorItem.range.msg&&alert(editorItem.range.msg+"\n"+itemval),reval=!1,!1}}}}),reval===!1&&(_self.editCell(0,_colseq,_idx),_self.setFocus(_idx),_self.scrollTop(_idx))}return reval},onevent_grid:function(){},clearSort:function(){var cfg=this.config,rows=cfg.colHead.rows,sort="",removeTg="";$.each(rows,function(idx,o){""==sort&&$.each(o,function(idx_idx,o_o){return void 0!=o_o.sort?(sort=o_o.sort,delete o_o.sort,!1):void 0})}),""!=sort&&("desc"==sort?removeTg="sortDesc":"asc"==sort&&(removeTg="sortAsc"),document.getElementById(this.nowSortHeadID).classList.remove(removeTg),this.nowSortHeadObj=void 0,this.nowSortHeadID=void 0)},reorderColGroup:function(rColgroup){var cfg=this.config,oldColGroup=[].concat(cfg.colGroup),newColGroup=[];return rColgroup&&(rColgroup.forEach(function(c){jQuery.each(oldColGroup,function(idx,oc){return oc.key==c.key?(delete oc.colSeq,newColGroup.push(oc),oldColGroup.splice(idx,1),!1):void 0})}),cfg.colGroup=newColGroup.concat(oldColGroup),function(){for(var oldBodyRows=[],r=0;r<cfg.body.rows.length;r++)oldBodyRows.push([].concat(cfg.body.rows[r]));for(var r=0;r<oldBodyRows.length;r++)oldBodyRows[r].forEach(function(c,cidx){var matchIdx=cidx;jQuery.each(cfg.colGroup,function(idx,cg){return cg.key==c.key?(matchIdx=idx,!1):void 0}),oldBodyRows[r][cidx].matchIdx=matchIdx}),oldBodyRows[r].sort(function(a,b){return a.matchIdx-b.matchIdx}),oldBodyRows[r].forEach(function(c){delete c.matchIdx,delete c.colSeq});cfg.body.rows=[];for(var r=0;r<oldBodyRows.length;r++)cfg.body.rows.push(oldBodyRows[r])}.call(this),function(){function convertMarker(marker){if(marker.rows){for(var oldMarkerRows=[],r=0;r<marker.rows.length;r++)oldMarkerRows.push([].concat(marker.rows[r]));for(var r=0;r<oldMarkerRows.length;r++)oldMarkerRows[r].forEach(function(c,cidx){var matchIdx=cidx;jQuery.each(cfg.colGroup,function(idx,cg){return cg.key==c.key?(matchIdx=idx,!1):void 0}),oldMarkerRows[r][cidx].matchIdx=matchIdx}),oldMarkerRows[r].sort(function(a,b){return a.matchIdx-b.matchIdx}),oldMarkerRows[r].forEach(function(c){delete c.matchIdx,delete c.colSeq});marker.rows=[];for(var r=0;r<oldMarkerRows.length;r++)marker.rows.push(oldMarkerRows[r])}}if(cfg.body.marker)if(Object.isArray(cfg.body.marker))for(var m=0,l=cfg.body.marker.length;l>m;m++)convertMarker(cfg.body.marker[m]);else convertMarker(cfg.body.marker)}.call(this),function(){if(cfg.foot){for(var oldFootRows=[],r=0;r<cfg.foot.rows.length;r++)oldFootRows.push([].concat(cfg.foot.rows[r]));for(var r=0;r<oldFootRows.length;r++)oldFootRows[r].forEach(function(c,cidx){var matchIdx=cidx;jQuery.each(cfg.colGroup,function(idx,cg){return cg.key==c.key?(matchIdx=idx,!1):void 0}),oldFootRows[r][cidx].matchIdx=matchIdx}),oldFootRows[r].sort(function(a,b){return a.matchIdx-b.matchIdx;
  }),oldFootRows[r].forEach(function(c){delete c.matchIdx,delete c.colSeq});cfg.foot.rows=[];for(var r=0;r<oldFootRows.length;r++)cfg.foot.rows.push(oldFootRows[r])}}.call(this),this.defineConfig(!1,!0),this.redrawGrid()),this},removeGrid:function(){return axf.each(this.windowEvents,function(i,we){axdom(window).unbind(we.event,we.fn)}),axdom("#"+myGrid.config.targetID).remove(),axf.each(AXGrid_instances,function(i,instance){if(instance===this){var klass=AXGrid_instances.splice(i,1);return delete klass,!1}}),this}});AXGrid.prototype.formatter=function(){function boxFormatter(formatter,item,itemIndex,value,key,CH,CHidx){var cfg=this.config,checkedStr="",disabled="",sendObj={index:itemIndex,list:this.list,item:item,page:this.page,key:key,value:value};return this.list[itemIndex].___checked&&this.list[itemIndex].___checked[CHidx]?this.list[itemIndex].___checked[CHidx]&&(checkedStr=' checked="checked" '):Object.isFunction(CH.checked)&&CH.checked.call(sendObj)&&(checkedStr=' checked="checked" ',this.list[itemIndex].___checked||(this.list[itemIndex].___checked={}),this.list[itemIndex].___checked[CHidx]=!0),CH.disabled&&CH.disabled.call(sendObj)&&(disabled=' disabled="disabled" ',this.list[itemIndex].___checked||(this.list[itemIndex].___disabled={}),this.list[itemIndex].___disabled[CHidx]=!0),'<input type="'+formatter+'" name="'+CH.label+'" class="gridCheckBox_body_colSeq'+CH.colSeq+'" id="'+cfg.targetID+"_AX_checkboxItem_AX_"+CH.colSeq+"_AX_"+itemIndex+'" value="'+value+'" '+checkedStr+disabled+' onfocus="this.blur();" />'}return{wordwrap:function(formatter,item,itemIndex,value,key,CH,CHidx){return value?'<span class="AXWordwrap">'+value.dec().crlf().replace(/ /g,"&nbsp;")+"</span>":""},money:function(formatter,item,itemIndex,value,key,CH,CHidx){return""==value||"null"==value||null==value||void 0==value?"0":(value||0).number().money()},dec:function(formatter,item,itemIndex,value,key,CH,CHidx){return void 0==value?"":value.toString().dec()},html:function(formatter,item,itemIndex,value,key,CH,CHidx){return value},checkbox:boxFormatter,radio:boxFormatter,select:function(formatter,item,itemIndex,value,key,CH,CHidx){var txtKey=CH.editor.optionText,valKey=CH.editor.optionValue,options=CH.editor.options||[],text="";if(!txtKey&&AXConfig&&AXConfig.AXSelect&&AXConfig.AXSelect.keyOptionText&&(txtKey=AXConfig.AXSelect.keyOptionText||"optionText"),!valKey&&AXConfig&&AXConfig.AXSelect&&AXConfig.AXSelect.keyOptionValue&&(valKey=AXConfig.AXSelect.keyOptionValue||"optionValue"),0===options.length)return text;for(var isObjectVal=Object.isObject(value),optionVal=isObjectVal?value[valKey]:value,i=0;i<options.length;i++)if(options[i][valKey]==optionVal){text=options[i][txtKey];break}return text}}}(),AXGrid.prototype.inlineEditor=function(){var getOptionValueKey=function(AXBindConfig){return AXBindConfig&&AXBindConfig.reserveKeys&&AXBindConfig.reserveKeys.optionValue?AXBindConfig.reserveKeys.optionValue:AXConfig&&AXConfig.AXSelect&&AXConfig.AXSelect.keyOptionValue?AXConfig.AXSelect.keyOptionValue:"optionValue"},getOptionTextKey=function(AXBindConfig){return AXBindConfig&&AXBindConfig.reserveKeys&&AXBindConfig.reserveKeys.optionText?AXBindConfig.reserveKeys.optionText:AXConfig&&AXConfig.AXSelect&&AXConfig.AXSelect.keyOptionText?AXConfig.AXSelect.keyOptionText:"optionValue"};return{number:{init:function(inline_editor,AXBindConfig,CG,r,c,ii){inline_editor.find("input").bindNumber(AXBindConfig).select()},getValue:function(value){return String(value||"").number()}},money:{init:function(inline_editor,AXBindConfig,CG,r,c,ii){inline_editor.find("input").bindMoney(AXBindConfig),setTimeout(function(){inline_editor.find("input").select()},100)},getValue:function(value){return String(value||"").money()}},calendar:{init:function(inline_editor,AXBindConfig,CG,r,c,ii){var _this=this;AXBindConfig.expand=!0,jQuery.extend(AXBindConfig,CG.editor.config,!0),AXBindConfig.onchange=function(){_this.updateItem(r,c,ii,this.value)},inline_editor.find("input").bindDate(AXBindConfig)},getValue:function(value){return value||""}},select:{init:function(inline_editor,AXBindConfig,CG,r,c,ii){var _this=this,cfg_key_value=getOptionValueKey(AXBindConfig),cfg_key_text=getOptionTextKey(AXBindConfig);inline_editor.find("select").bind("change",function(){var sdom=inline_editor.find("select").get(0),obj={};obj[cfg_key_value]=sdom.options[sdom.selectedIndex].value,obj[cfg_key_text]=sdom.options[sdom.selectedIndex].text,_this.updateItem(r,c,ii,obj)}),setTimeout(function(){inline_editor.find("select").focus()},100),jQuery(document.body).unbind("click.axgrid").bind("click.axgrid",function(e){var target=axf.get_event_target(e.target,{id:inline_editor.attr("id")});if(!target){var sdom=inline_editor.find("select").get(0);if(sdom.options[sdom.selectedIndex]){var obj={};obj[cfg_key_value]=sdom.options[sdom.selectedIndex].value,obj[cfg_key_text]=sdom.options[sdom.selectedIndex].text,_this.updateItem(r,c,ii,obj)}else _this.editCellClear();_this.gridFocus.focus(),jQuery(document.body).unbind("click.axgrid")}})},getValue:function(value){return"string"==typeof value?value:value[getOptionValueKey(this.CG.editor.config)]}},AXSelect:{init:function(inline_editor,AXBindConfig,CG,r,c,ii){var _this=this,cfg=this.config,cfg_key_value=getOptionValueKey(AXBindConfig),cfg_key_text=getOptionTextKey(AXBindConfig);AXBindConfig.onchange=function(){var obj={};obj[cfg_key_value]=this.value,obj[cfg_key_text]=this.text,setTimeout(function(){_this.updateItem(r,c,ii,obj)},100)};var td_val=_this.list[ii][CG.key];AXBindConfig.setValue=td_val[cfg_key_value],inline_editor.find("select").bindSelect(AXBindConfig),setTimeout(function(){inline_editor.find("select").focus()},100),jQuery(document.body).unbind("click.axgrid").bind("click.axgrid",function(e){var select_id=(cfg.targetID+"_inline_editor").lcase(),target=axf.get_event_target(e.target,function(el){return el.id?(el.id.split(/_AX_/g)[1]||"").lcase()==select_id:!1});if(!target){var sdom=inline_editor.find("select").get(0);if(sdom.options[sdom.selectedIndex]){var obj={};obj[cfg_key_value]=sdom.options[sdom.selectedIndex].value,obj[cfg_key_text]=sdom.options[sdom.selectedIndex].text,_this.updateItem(r,c,ii,obj)}else _this.editCellClear();_this.gridFocus.focus(),jQuery(document.body).unbind("click.axgrid")}})},getValue:function(value){return value}},AXSelector:{init:function(inline_editor,AXBindConfig,CG,r,c,ii){var _this=this,cfg_key_value=(this.config,getOptionValueKey(AXBindConfig)),cfg_key_text=getOptionTextKey(AXBindConfig);AXBindConfig.onchange=function(){var obj={};this.selectedOption?(obj[cfg_key_value]=this.selectedOption[cfg_key_value],obj[cfg_key_text]=this.selectedOption[cfg_key_text]):(obj[cfg_key_value]="",obj[cfg_key_text]=""),setTimeout(function(){_this.updateItem(r,c,ii,obj)},100)};var td_val=_this.list[ii][CG.key];"undefined"==typeof td_val?AXBindConfig.setValue="":"string"==typeof td_val||"number"==typeof td_val||"boolean"==typeof td_val?AXBindConfig.setValue=td_val:AXBindConfig.setValue=td_val[cfg_key_value],inline_editor.find("input").bindSelector(AXBindConfig),setTimeout(function(){inline_editor.find("input").focus()},100)},getValue:function(value){return value}}}}(),axdom.fn.loadHtmlElement=function(arg){void 0==arg&&(arg={});var varObj=new AXHtmlElement;return arg.target=this.get(0).id,varObj.setConfig(arg),this};var AXHtmlElement=Class.create(AXJ,{version:"AXHtmlElement V1.0",author:"tom@axisj.com",logs:["2013-04-17 - mods에서 변환했음 - json@axisj.com"],initialize:function(AXJ_super){AXJ_super(),this.config.defaultValue="",this.config.firstEmpty=!1,this.config.firstChecked=!0},init:function(){var config=this.config;if(config.loadUrl){var url=config.loadUrl,qs=config.loadPars,pars=qs,onLoad=this.onLoad.bind(this);new AXReq(url,{pars:pars,onsucc:function(res){"00"==res.result?onLoad(res):alert(res.msg.dec())}})}else config.options&&this.onLoad({ds:config.options})},onLoad:function(res){var config=this.config;"select"==config.displayType&&(this.setSelectOption({tg:axdom("#"+config.target)[0],ds:res.ds},config.defaultValue,config.firstEmpty,config.firstEmptyItemName),axdom("#"+config.target).unbind("change",this.onchange.bind(this)),axdom("#"+config.target).bind("change",this.onchange.bind(this))),"radio"==config.displayType&&this.setInputOption({tg:axdom("#"+config.target),ds:res.ds},config.defaultValue),"checkbox"==config.displayType&&this.setInputOption({tg:axdom("#"+config.target),ds:res.ds},config.defaultValue)},setSelectOption:function(obj,selectValue,firstEmpty,firstEmptyItemName){this.config;try{obj.tg.innerHTML=""}catch(e){return}if(firstEmpty){var opts=document.createElement("option");opts.value="",firstEmptyItemName?opts.text=firstEmptyItemName:opts.text="모두",obj.tg.appendChild(opts)}axdom.each(obj.ds,function(index,n){if(n.optgroup){var oGroup=document.createElement("optgroup");oGroup.label=n.optgroup.dec(),axdom.each(n.option,function(){if(null!=this.value){var opts=document.createElement("option");opts.value=this.value.dec(),opts.innerText=this.text.dec(),void 0!=selectValue&&selectValue==this.value.dec()&&(opts.selected=!0),oGroup.appendChild(opts)}}),obj.tg.appendChild(oGroup)}else{var opts=document.createElement("option");opts.value=n.value.dec(),opts.innerText=n.text.dec(),void 0!=selectValue&&selectValue==n.value.dec()&&(opts.selected=!0),obj.tg.appendChild(opts)}});var robj=obj.tg.selectedIndex>-1?{value:obj.tg.options[obj.tg.selectedIndex].value,text:obj.tg.options[obj.tg.selectedIndex].text}:{value:"",text:""};this.loadSucc(robj)},setInputOption:function(obj,selectValue){var config=this.config;obj.tg.empty();var po=[],robj={value:"",text:""};this.ids=obj.ds,axdom.each(obj.ds,function(index,n){config.title?po.push('<input type="'+config.displayType+'" name="'+config.name+'" value="'+n.value.dec()+'" title="'+config.title.dec()+'" class="'+config.className+'" '):po.push('<input type="'+config.displayType+'" name="'+config.name+'" value="'+n.value.dec()+'" class="'+config.className+'" '),""!=selectValue&&selectValue==n.value.dec()?(po.push(' checked="checked" '),robj.value=n.value.dec(),robj.text=n.text.dec()):""==selectValue&&1==config.firstChecked&&0==index&&(po.push(' checked="checked" '),robj.value=n.value.dec(),robj.text=n.text.dec()),po.push("/>"),po.push(n.text.dec()+"&nbsp;")}),obj.tg.html(po.join("")),this.loadSucc(robj),axdom("#"+config.target).find("input").unbind("click",this.onchange2.bind(this)),axdom("#"+config.target).find("input").bind("click",this.onchange2.bind(this))},loadSucc:function(obj){var config=this.config;config.onLoad&&config.onLoad({target:config.target,value:obj.value,text:obj.text})},onchange:function(event){var tg=event.target,config=this.config;config.onChange&&config.onChange({target:config.target,value:tg.options[tg.selectedIndex].value,text:tg.options[tg.selectedIndex].text})},onchange2:function(event){var tg=event.target,config=this.config,myText="";axdom.each(this.ids,function(idx,D){D.value.dec()==tg.value&&(myText=D.text.dec())}),config.onChange&&config.onChange({target:config.target,value:tg.value,text:myText})}}),AXInputConverter=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.objects=[],this.inputTypes=[{type:"search"},{type:"number"},{type:"money"},{type:"slider"},{type:"twinSlider"},{type:"selector"},{type:"switch"},{type:"segment"},{type:"date"},{type:"dateTime"},{type:"twinDate"},{type:"twinDateTime"},{type:"checked"},{type:"pattern"}],this.config.anchorClassName="AXanchor",this.config.anchorPlaceHolderClassName="AXanchorPlaceHolder",this.config.anchorSearchClassName="AXanchorSearch",this.config.anchorNumberContainerClassName="AXanchorNumberContainer",this.config.anchorIncreaseClassName="AXanchorIncrease",this.config.anchorDecreaseClassName="AXanchorDecrease",this.config.anchorSelectorHandleContainerClassName="AXanchorSelectorHandleContainer",this.config.anchorSelectorFinderContainerClassName="AXanchorSelectorFinderContainer",this.config.anchorSelectorHandleClassName="AXanchorSelectorHandle",this.config.anchorSelectorFinderClassName="AXanchorSelectorFinder",this.config.anchorSelectorExpandBoxClassName="AXanchorSelectorExpandBox",this.config.anchorSelectorExpandScrollClassName="AXanchorSelectorExpandScroll",this.config.anchorSliderBoxClassName="AXanchorSliderBox",this.config.anchorSwitchBoxClassName="AXanchorSwitchBox",this.config.anchorSegmentBoxClassName="AXanchorSegmentBox",this.config.anchorDateHandleClassName="AXanchorDateHandle",this.config.bindDateExpandBoxClassName="AXbindDateExpandBox",this.config.bindTwinDateExpandBoxClassName="AXbindTwinDateExpandBox",this.config.anchorCheckedContainerClassName="AXbindCheckedHandle",this.config.responsiveMobile=AXConfig.mobile.responsiveWidth,this.config.reserveKeys={options:AXConfig.AXSelect&&AXConfig.AXSelect.keyOptions||"options",optionValue:AXConfig.AXSelect&&AXConfig.AXSelect.keyOptionValue||"optionValue",optionText:AXConfig.AXSelect&&AXConfig.AXSelect.keyOptionText||"optionText",optionData:AXConfig.AXSelect&&AXConfig.AXSelect.keyOptionData||"optionData",optionDesc:AXConfig.AXSelect&&AXConfig.AXSelect.keyOptionDesc||"optionDesc"}},init:function(){axdom(window).resize(this.alignAllAnchor.bind(this)),this.config.reserveKeys={options:AXConfig.AXInput&&AXConfig.AXInput.keyOptions||"options",optionValue:AXConfig.AXInput&&AXConfig.AXInput.keyOptionValue||"optionValue",optionText:AXConfig.AXInput&&AXConfig.AXInput.keyOptionText||"optionText",optionDesc:AXConfig.AXSelect&&AXConfig.AXSelect.keyOptionDesc||"optionDesc"}},windowResize:function(){var windowResizeApply=this.windowResizeApply.bind(this);this.windowResizeObserver&&clearTimeout(this.windowResizeObserver),this.windowResizeObserver=setTimeout(function(){windowResizeApply()},1)},windowResizeApply:function(){this.windowResizeObserver&&clearTimeout(this.windowResizeObserver),this.alignAllAnchor()},alignAllAnchor:function(){for(var i=0;i<this.objects.length;i++)this.alignAnchor(this.objects[i].id,i)},msgAlert:function(msg){var errorPrintType="toast";AXConfig.AXInput&&(errorPrintType=AXConfig.AXInput.errorPrintType||"toast"),"toast"==errorPrintType?toast.push(msg):"dialog"==errorPrintType?dialog.push(msg):"alert"==errorPrintType&&AXUtil.alert(msg)},bindSetConfig:function(objID,configs){var findIndex=null;if(axf.each(this.objects,function(index,O){return O.id==objID?(findIndex=index,!1):void 0}),null!=findIndex){var _self=this.objects[findIndex];axf.each(configs,function(k,v){_self.config[k]=v})}},bind:function(obj){var cfg=this.config;if(!AXgetId(obj.id))return void trace("bind 대상이 없어 bind 처리할 수 없습니다.");obj.reserveKeys&&(cfg.reserveKeys=jQuery.extend(cfg.reserveKeys,obj.reserveKeys,!0));var objID=obj.id,objSeq=null;axf.each(this.objects,function(idx,O){return this.id==objID?(objSeq=idx,!1):void 0}),"undefined"==typeof obj.href&&(obj.href=cfg.href),null==objSeq?(objSeq=this.objects.length,this.objects.push({id:objID,anchorID:cfg.targetID+"_AX_"+objID,config:obj,bindType:obj.bindType})):(this.objects[objSeq].isDel=void 0,this.objects[objSeq].config=obj),this.appendAnchor(objID,objSeq,obj.bindType),"placeHolder"==obj.bindType?this.bindPlaceHolder(objID,objSeq):"search"==obj.bindType?this.bindSearch(objID,objSeq):"number"==obj.bindType?this.bindNumber(objID,objSeq):"money"==obj.bindType?this.bindMoney(objID,objSeq):"selector"==obj.bindType?this.bindSelector(objID,objSeq):"slider"==obj.bindType?this.bindSlider(objID,objSeq):"twinSlider"==obj.bindType?this.bindTwinSlider(objID,objSeq):"switch"==obj.bindType?this.bindSwitch(objID,objSeq):"segment"==obj.bindType?this.bindSegment(objID,objSeq):"date"==obj.bindType?this.bindDate(objID,objSeq):"twinDate"==obj.bindType?this.bindTwinDate(objID,objSeq):"twinDateTime"==obj.bindType?this.bindTwinDate(objID,objSeq,"time"):"checked"==obj.bindType?this.bindChecked(objID,objSeq):"pattern"==obj.bindType&&this.bindPattern(objID,objSeq)},unbind:function(obj){var removeAnchorId,removeIdx,cfg=this.config;axf.each(this.objects,function(idx,O){O.id!=obj.id||1!=O.isDel&&(removeAnchorId=this.anchorID,removeIdx=idx)});var objID=obj.id,obj=this.objects[removeIdx];if(obj){obj.documentclickEvent&&axdom(document).unbind("click.AXInput",obj.documentclickEvent);var objDom=axdom("#"+objID);objDom.unbind("keydown.AXInput"),objDom.unbind("keydown.AXInputCheck"),objDom.unbind("change.AXInput"),objDom.unbind("focus.AXInput"),objDom.unbind("blur.AXInput")}removeAnchorId&&(this.objects[removeIdx].isDel=!0,axdom("#"+obj.id).removeAttr("data-axbind"),axdom("#"+removeAnchorId).remove(),obj.bindSliderMouseMove&&axdom(document.body).unbind("mousemove.AXInput",obj.bindSliderMouseMove),obj.bindSliderMouseUp&&axdom(document.body).unbind("mouseup.AXInput",obj.bindSliderMouseUp),obj.bindSliderTouchMove&&document.removeEventListener("touchmove.AXInput",obj.bindSliderTouchMove,!1),obj.bindSliderTouchEnd&&document.removeEventListener("touchend.AXInput",obj.bindSliderTouchEnd,!1),obj.bindTwinSliderMouseMove&&axdom(document.body).unbind("mousemove.AXInput",obj.bindTwinSliderMouseMove),obj.bindTwinSliderMouseUp&&axdom(document.body).unbind("mouseup.AXInput",obj.bindTwinSliderMouseUp),AXgetId(cfg.targetID+"_AX_"+objID+"_AX_expandBox")&&(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").remove(),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Handle").removeClass("on")))},bindInputDisabled:function(objID,_disabled){for(var O,findIndex=null,index=0;index<this.objects.length&&(O=this.objects[index]);index++)if(O.id==objID&&1!=O.isDel){findIndex=index;break}if(null!=findIndex){var obj=this.objects[findIndex],elDisabled=(this.config,!axf.getId(objID).disabled);axf.getId(objID).disabled="boolean"==typeof _disabled?_disabled:elDisabled,"twinDate"==obj.bindType&&(axf.getId(obj.config.startTargetID).disabled="boolean"==typeof _disabled?_disabled:elDisabled),obj.bindAnchorTarget.data("disabled",axf.getId(objID).disabled),axf.getId(objID).disabled?(obj.bindAnchorTarget.addClass("disable"),obj.bindAnchorTarget.attr("disable","disable"),obj.bindAnchorTarget.find("a").bind("mousedown.AXInputDisabled",function(e){var event=window.event||e;return event.preventDefault&&event.preventDefault(),event.stopPropagation&&event.stopPropagation(),event.cancelBubble=!0,!1})):(obj.bindAnchorTarget.removeClass("disable"),obj.bindAnchorTarget.removeAttr("disable"),obj.bindAnchorTarget.find("a").unbind("mousedown.AXInputDisabled"))}},appendAnchor:function(objID,objSeq,bindType){var cfg=this.config,obj=this.objects[objSeq];axdom("#"+cfg.targetID+"_AX_"+objID).remove();var anchorNode=axdom('<div id="'+cfg.targetID+"_AX_"+objID+'" class="'+cfg.anchorClassName+'" style="display:none;"></div>'),iobj=axdom("#"+objID);iobj.attr("data-axbind",bindType),iobj.after(anchorNode),obj.bindAnchorTarget=axdom("#"+cfg.targetID+"_AX_"+objID),obj.bindTarget=iobj;var iobjPosition=iobj.position(),l=iobjPosition.left,t=iobjPosition.top,w=0,h=0,marginW=(iobj.css("border-left-width").number(),iobj.css("border-top-width").number(),iobj.css("margin-left").number());iobj.css("margin-top").number();l+=marginW,w=iobj.outerWidth(),h="content-box"==iobj.css("box-sizing")?iobj.outerHeight():iobj.height();var css={left:l,top:t,width:w,height:0};obj.bindAnchorTarget.css(css),obj.bindAnchorTarget.data("height",h);var _this=this;setTimeout(function(){_this.alignAnchor(objID,objSeq)}),setTimeout(function(){_this.alignAnchor(objID,objSeq)},500)},alignAnchor:function(objID,objSeq){var cfg=this.config;if("undefined"==typeof objSeq)for(var i=0;i<this.objects.length;i++)if(this.objects[i].id==objID&&!this.objects[i].isDel){objSeq=i;break}var obj=this.objects[objSeq];if(AXgetId(objID)){obj.bindTarget||(obj.bindTarget=axdom("#"+objID),obj.bindAnchorTarget=axdom("#"+cfg.targetID+"_AX_"+objID));var iobjPosition=obj.bindTarget.position(),l=iobjPosition.left,t=iobjPosition.top,w=obj.bindTarget.outerWidth(),h=obj.bindTarget.outerHeight();if("none"==obj.bindTarget.css("display")){h=obj.bindAnchorTarget.data("height");var css={width:w}}else var css={left:l,top:t,width:w,height:0};if(obj.bindAnchorTarget||(obj.bindAnchorTarget=axdom("#"+cfg.targetID+"_AX_"+objID),obj.bindTarget=axdom("#"+objID)),obj.bindAnchorTarget&&(obj.bindAnchorTarget.css(css),obj.bindAnchorTarget.data("height",h)),"placeHolder"==obj.bindType);else if("search"==obj.bindType);else if("number"==obj.bindType){var UPh=parseInt((h-2)/2)-1,DNh=parseInt((h-2)/2)-2,handleWidth=h-2;handleWidth>20&&(handleWidth=20),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_HandleContainer").css({width:handleWidth,height:h-2}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_increase").css({width:handleWidth,height:UPh}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_decrease").css({top:UPh+1,width:handleWidth,height:DNh})}else if("money"==obj.bindType);else if("selector"==obj.bindType)h-=2,axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_HandleContainer").css({width:h,height:h}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Handle").css({width:h,height:h}),obj.config.finder&&(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_FinderContainer").css({right:h,width:h,height:h}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Finder").css({width:h,height:h}));else if("slider"==obj.bindType);else if("twinSlider"==obj.bindType);else if("switch"==obj.bindType)axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SwitchBox").css({width:w,height:h}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SwitchDisplay").css({height:h,"line-height":h+"px"}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SwitchHandle").css({height:h}),obj.bindAnchorTarget.css({height:h});else if("segment"==obj.bindType){obj.bindAnchorTarget.css({height:h+"px",position:"relative",display:"inline-block",left:"auto",top:"auto"});var borderTop=obj.bindAnchorTarget.find(".AXanchorSegmentHandle").css("border-top-width").number(),borderBot=obj.bindAnchorTarget.find(".AXanchorSegmentHandle").css("border-bottom-width").number();obj.bindAnchorTarget.find(".AXanchorSegmentHandle").css({height:obj.bindAnchorTarget.innerHeight()-borderTop-borderBot+"px","line-height":obj.bindAnchorTarget.innerHeight()-borderTop-borderBot+"px"})}else if("date"==obj.bindType){var handleWidth=h-2;handleWidth>20&&(handleWidth=20),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_dateHandle").css({width:h,height:h})}else if("twinDate"==obj.bindType){var handleWidth=h-2;handleWidth>20&&(handleWidth=20),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_dateHandle").css({width:h,height:h})}else if("twinDateTime"==obj.bindType){var handleWidth=h-2;handleWidth>20&&(handleWidth=20),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_dateHandle").css({width:h,height:h})}else"checked"==obj.bindType}},bindSetValue:function(objID,value){var objSeq=(this.config,null);if(axf.each(this.objects,function(index,O){return O.id==objID?(objSeq=index,!1):void 0}),null!=objSeq){var obj=this.objects[objSeq];"search"==obj.bindType||"number"==obj.bindType||"money"==obj.bindType||("selector"==obj.bindType?this.bindSelectorSetValue(objID,objSeq,value):"slider"==obj.bindType?this.bindSliderSetValue(objID,objSeq,value):"twinSlider"==obj.bindType?this.bindTwinSliderSetValue(objID,objSeq,value):"switch"==obj.bindType?this.bindSwitchSetValue(objID,objSeq,value):"segment"==obj.bindType?this.bindSegmentSetValue(objID,objSeq,value):"date"==obj.bindType||"twinDate"==obj.bindType)}},bindPlaceHolder:function(objID,objSeq){var cfg=this.config,obj=this.objects[objSeq];if("ie"==AXUtil.browser.name&&!("ie"==AXUtil.browser.name&&AXUtil.browser.version>9)){var w=axdom("#"+cfg.targetID+"_AX_"+objID).width(),h=axdom("#"+cfg.targetID+"_AX_"+objID).data("height"),placeholder=axdom("#"+objID).attr("placeholder");"undefined"==placeholder&&(placeholder="");var po=["<a "+obj.config.href+' id="'+cfg.targetID+"_AX_"+objID+'_AX_PlaceHolder" class="'+cfg.anchorPlaceHolderClassName+'" style="left:0px;top:0px;width:'+w+"px;height:"+h+"px;line-height:"+h+'px;">'+placeholder+"</a>"];axdom("#"+cfg.targetID+"_AX_"+objID).append(po.join(""));var bindPlaceHolderKeyup=this.bindPlaceHolderSyncAnchor.bind(this);axdom("#"+objID).unbind("keyup.AXInput").bind("keyup.AXInput",function(){bindPlaceHolderKeyup(objID,objSeq)}),bindPlaceHolderKeyup(objID,objSeq),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_PlaceHolder").unbind("click.AXInput").bind("click.AXInput",function(){axdom("#"+objID).focus(),bindPlaceHolderKeyup(objID,objSeq)})}},bindPlaceHolderSyncAnchor:function(objID,objSeq){var cfg=this.config;""==axdom("#"+objID).val().trim()?axdom("#"+cfg.targetID+"_AX_"+objID).show():axdom("#"+cfg.targetID+"_AX_"+objID).hide()},bindSearch:function(objID,objSeq){var cfg=this.config,obj=this.objects[objSeq],w=axdom("#"+cfg.targetID+"_AX_"+objID).width(),h=axdom("#"+cfg.targetID+"_AX_"+objID).data("height"),placeholder=axdom("#"+objID).attr("placeholder");void 0==placeholder&&(placeholder="");var po=[];"ie"==AXUtil.browser.name&&AXUtil.browser.version<10&&""!=placeholder&&(po.push("<a "+obj.config.href+' id="'+cfg.targetID+"_AX_"+objID+'_AX_PlaceHolder" class="'+cfg.anchorPlaceHolderClassName+'" '),po.push(' style="left:0px;top:0px;width:'+w+"px;height:"+h+"px;line-height:"+h+'px;">'+placeholder+"</a>")),po.push("<a "+obj.config.href+' id="'+cfg.targetID+"_AX_"+objID+'_AX_Search" class="'+cfg.anchorSearchClassName+'" '),po.push(' style="right:0px;top:0px;width:'+h+"px;height:"+h+'px;">Search</a>'),axdom("#"+cfg.targetID+"_AX_"+objID).append(po.join(""));var bindSearchKeyup=this.bindSearchSyncAnchor.bind(this);axdom("#"+objID).unbind("keydown.AXInput").bind("keydown.AXInput",function(){bindSearchKeyup(objID,objSeq)}),bindSearchKeyup(objID,objSeq),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Search").unbind("click.AXInput").bind("click.AXInput",function(){axdom("#"+objID).val(""),axdom("#"+objID).focus(),bindSearchKeyup(objID,objSeq)})},bindSearchSyncAnchor:function(objID,objSeq){var cfg=this.config;axdom("#"+cfg.targetID+"_AX_"+objID).show(),""==axdom("#"+objID).val()?(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Search").hide(),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_PlaceHolder").show()):(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Search").show(),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_PlaceHolder").hide())},bindNumber:function(objID,objSeq){var cfg=this.config,obj=this.objects[objSeq];obj.bindAnchorTarget||(obj.bindAnchorTarget=axdom("#"+cfg.targetID+"_AX_"+objID)),obj.bindTarget||(obj.bindTarget=axdom("#"+objID));var h=obj.bindAnchorTarget.data("height"),po=[],UPh=parseInt((h-2)/2)-1,DNh=parseInt((h-2)/2)-2,handleWidth=h-2;handleWidth>20&&(handleWidth=20),po.push('<div id="'+cfg.targetID+"_AX_"+objID+'_AX_HandleContainer" class="'+cfg.anchorNumberContainerClassName+'" style="right:0px;top:0px;width:'+handleWidth+"px;height:"+(h-2)+'px;" onselectstart="return false;">'),po.push('	<a id="'+cfg.targetID+"_AX_"+objID+'_AX_increase" class="'+cfg.anchorIncreaseClassName+'" style="right:0px;top:0px;width:'+handleWidth+"px;height:"+UPh+'px;">increase</a>'),po.push('	<a id="'+cfg.targetID+"_AX_"+objID+'_AX_decrease" class="'+cfg.anchorDecreaseClassName+'" style="right:0px;top:'+(UPh+1)+"px;width:"+handleWidth+"px;height:"+DNh+'px;">decrease</a>'),po.push("</div>"),obj.bindAnchorTarget.append(po.join("")),obj.bindAnchorTarget.show();var bindNumberAdd=this.bindNumberAdd.bind(this),bindNumberCheck=this.bindNumberCheck.bind(this);axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_increase").unbind("mousedown.AXInput").bind("mousedown.AXInput",function(event){bindNumberAdd(objID,1,objSeq),bindNumberCheck(objID,objSeq,event)}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_decrease").unbind("mousedown.AXInput").bind("mousedown.AXInput",function(event){bindNumberAdd(objID,-1,objSeq),bindNumberCheck(objID,objSeq,event)}),obj.bindTarget.unbind("keydown.AXInput").bind("keydown.AXInput",function(event){event.keyCode==AXUtil.Event.KEY_UP?bindNumberAdd(objID,1,objSeq):event.keyCode==AXUtil.Event.KEY_DOWN&&bindNumberAdd(objID,-1,objSeq)}),obj.bindTarget.unbind("blur.AXInput").bind("blur.AXInput",function(event){bindNumberCheck(objID,objSeq,event)})},bindNumberAdd:function(objID,adder,objSeq){var obj=this.objects[objSeq];if("disable"==obj.bindAnchorTarget.attr("disable")||"disable"==obj.bindTarget.attr("disable"))return!1;var maxval=obj.config.max,minval=obj.config.min,nval=obj.bindTarget.val().number();if(adder>0){if(minval>nval+adder&&(nval=minval),void 0!=maxval&&null!=maxval&&nval+adder>maxval)return}else if(void 0!=minval&&null!=minval&&minval>nval+adder)return;obj.bindTarget.val(nval+adder),obj.bindTarget.change()},bindNumberCheck:function(objID,objSeq,event){var obj=this.objects[objSeq];return"disable"==obj.bindAnchorTarget.attr("disable")||"disable"==obj.bindTarget.attr("disable")?!1:(this.numbercheck_obs&&clearTimeout(this.numbercheck_obs),void(this.numbercheck_obs=setTimeout(function(){var nval,maxval=obj.config.max,minval=obj.config.min;if(nval=""==obj.bindTarget.val()&&void 0!=minval&&null!=minval?minval:obj.bindTarget.val().number(),void 0!=maxval&&null!=maxval){if(nval>maxval){obj.bindTarget.val("");try{this.msgAlert("설정된 최대값을 넘어서는 입력입니다.")}catch(e){}}else if(void 0!=minval&&null!=minval)if(minval>nval){obj.bindTarget.val("");try{this.msgAlert("설정된 최소값보다 작은 입력입니다.")}catch(e){}}else obj.bindTarget.val(nval)}else if(void 0!=minval&&null!=minval){if(minval>nval){obj.bindTarget.val("");try{this.msgAlert("설정된 최소값보다 작은 입력입니다.")}catch(e){}}}else obj.bindTarget.val(nval);obj.bindTarget.trigger("change"),event&&"mousedown"==event.type&&obj.bindTarget.setCaret(),obj.config.onChange&&obj.config.onChange.call({objID:objID,objSeq:objSeq,value:axdom("#"+objID).val()}),obj.config.onchange&&obj.config.onchange.call({objID:objID,objSeq:objSeq,value:axdom("#"+objID).val()})},1)))},bindMoney:function(objID,objSeq){var obj=this.objects[objSeq];obj.bindTarget.css({"text-align":"right"});var bindMoneyCheck=this.bindMoneyCheck.bind(this),val=obj.bindTarget.val().trim();""!=val&&(val=obj.bindTarget.val().number().money()),obj.bindTarget.val(val),obj.bindTarget.unbind("keydown.AXInput").bind("keydown.AXInput",function(event){event.ctrlKey||event.metaKey?obj.bindTarget.data("ctrlKey","T"):obj.bindTarget.data("ctrlKey","F")}),obj.bindTarget.unbind("keyup.AXInput").bind("keyup.AXInput",function(event){var elem=obj.bindTarget.get(0);if("number"!=elem.type)if(event=window.event||event,event.keyCode&&9!=event.keyCode&&16!=event.keyCode&&17!=event.keyCode&&("T"!=obj.bindTarget.data("ctrlKey")||65!=event.keyCode&&91!=event.keyCode)){var elemFocusPosition;if("selectionStart"in elem)elemFocusPosition=elem.selectionStart;else if(document.selection){var sel=document.selection.createRange(),selLen=document.selection.createRange().text.length;sel.moveStart("character",-elem.value.length),elemFocusPosition=sel.text.length-selLen}obj.bindTarget.data("focusPosition",elemFocusPosition),obj.bindTarget.data("prevLen",elem.value.length),event.keyCode!=AXUtil.Event.KEY_DELETE&&event.keyCode!=AXUtil.Event.KEY_BACKSPACE&&event.keyCode!=AXUtil.Event.KEY_LEFT&&event.keyCode!=AXUtil.Event.KEY_RIGHT?bindMoneyCheck(objID,objSeq,"keyup"):event.keyCode!=AXUtil.Event.KEY_DELETE&&event.keyCode!=AXUtil.Event.KEY_BACKSPACE||bindMoneyCheck(objID,objSeq,"keyup")}else jQuery.removeData(obj.bindTarget.get(0),"focusPosition")})},bindMoneyCheck:function(objID,objSeq,eventType){var nval,obj=this.objects[objSeq],maxval=obj.config.max,minval=obj.config.min;if("disable"==obj.bindAnchorTarget.attr("disable")||"disable"==obj.bindTarget.attr("disable"))return!1;if(obj.config.onChange||(obj.config.onChange=obj.config.onchange),nval=""==obj.bindTarget.val()?void 0!=minval&&null!=minval?minval:"":"-"!=obj.bindTarget.val()?obj.bindTarget.val().number():"",void 0!=maxval&&null!=maxval)if(nval>maxval){obj.bindTarget.val(maxval.money());try{"change"==eventType&&this.msgAlert("설정된 최대값{"+maxval.number().money()+"} 을 넘어서는 입력입니다.")}catch(e){}}else if(void 0!=minval&&null!=minval)if(minval>nval){obj.bindTarget.val(minval.money());try{"change"==eventType&&this.msgAlert("설정된 최소값{"+minval.number().money()+"}보다 작은 입력입니다.")}catch(e){}}else obj.bindTarget.val(nval.money());else obj.bindTarget.val(nval.money());else if(void 0!=minval&&null!=minval)if(minval>nval){obj.bindTarget.val(minval.money());try{"change"==eventType&&this.msgAlert("설정된 최소값{"+minval.number().money()+"}보다 작은 입력입니다.");
  }catch(e){}}else""!=nval&&"-"!=nval&&obj.bindTarget.val(nval.money());else""!=nval&&"-"!=nval&&obj.bindTarget.val(nval.money());obj.bindTarget.trigger("change"),axf.isEmpty(obj.bindTarget.data("focusPosition"))||obj.bindTarget.setCaret(obj.bindTarget.data("focusPosition").number()+(obj.bindTarget.val().length-obj.bindTarget.data("prevLen"))),obj.config.onChange&&obj.config.onChange.call({objID:objID,objSeq:objSeq,value:obj.bindTarget.val().number()}),"change"==eventType&&"-"==obj.bindTarget.val()&&obj.bindTarget.val("")},bindSelector:function(objID,objSeq){var _this=this,cfg=this.config,obj=this.objects[objSeq];obj.config.onChange||(obj.config.onChange=obj.config.onchange),obj.bindAnchorTarget||(obj.bindAnchorTarget=axdom("#"+cfg.targetID+"_AX_"+objID)),obj.bindTarget||(obj.bindTarget=axdom("#"+objID)),obj.bindTarget.data("val",obj.bindTarget.val());var reserveKeys=jQuery.extend({},cfg.reserveKeys);"undefined"==typeof obj.config.reserveKeys&&(obj.config.reserveKeys={}),obj.config.reserveKeys=jQuery.extend(reserveKeys,obj.config.reserveKeys,!0);var h=obj.bindAnchorTarget.data("height")-2,po=[];po.push('<div id="'+cfg.targetID+"_AX_"+objID+'_AX_HandleContainer" class="bindSelectorNodes '+cfg.anchorSelectorHandleContainerClassName+'" style="right:0px;top:0px;width:'+h+"px;height:"+h+'px;">'),po.push("	<a "+obj.config.href+' id="'+cfg.targetID+"_AX_"+objID+'_AX_Handle" class="bindSelectorNodes '+cfg.anchorSelectorHandleClassName+'" style="right:0px;top:0px;width:'+h+"px;height:"+h+'px;">expand</a>'),po.push("</div>"),obj.config.finder&&(po.push('<div id="'+cfg.targetID+"_AX_"+objID+'_AX_FinderContainer" class="bindSelectorNodes '+cfg.anchorSelectorFinderContainerClassName+'" style="right:'+h+"px;top:0px;width:"+h+"px;height:"+h+'px;">'),po.push("	<a "+obj.config.href+' id="'+cfg.targetID+"_AX_"+objID+'_AX_Finder" class="bindSelectorNodes '+cfg.anchorSelectorFinderClassName+'" style="right:0px;top:0px;width:'+h+"px;height:"+h+'px;">finder</a>'),po.push("</div>")),obj.bindAnchorTarget.append(po.join("")),obj.bindAnchorTarget.show();var bindSelectorExpand=this.bindSelectorExpand.bind(this),bindSelectorClose=this.bindSelectorClose.bind(this);axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Handle").unbind("click.AXInput").bind("click.AXInput",function(event){AXgetId(cfg.targetID+"_AX_"+objID+"_AX_expandBox")?bindSelectorClose(objID,objSeq,event):bindSelectorExpand(objID,objSeq,!0,event)}),obj.bindTarget.unbind("focus.AXInput").bind("focus.AXInput",function(event){if("disable"==obj.bindAnchorTarget.attr("disable")||"disable"==obj.bindTarget.attr("disable"))return!1;try{this.select()}catch(e){}!AXgetId(cfg.targetID+"_AX_"+objID+"_AX_expandBox")}),obj.bindTarget.unbind("keydown.AXInputCheck").bind("keydown.AXInputCheck",function(event){return"disable"==obj.bindAnchorTarget.attr("disable")||"disable"==obj.bindTarget.attr("disable")?!1:event.which==axf.Event.KEY_UP||event.which==axf.Event.KEY_DOWN?(AXgetId(cfg.targetID+"_AX_"+objID+"_AX_expandBox")||bindSelectorExpand(objID,objSeq,!1,event),_this.stopEvent(event),!1):void(event.which==axf.Event.KEY_RETURN||event.which==axf.Event.KEY_TAB||AXgetId(cfg.targetID+"_AX_"+objID+"_AX_expandBox")||bindSelectorExpand(objID,objSeq,!1,event))}),obj.config.finder&&obj.config.finder.onclick&&axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Finder").unbind("click.AXInput").bind("click.AXInput",function(event){return"disable"==obj.bindAnchorTarget.attr("disable")||"disable"==obj.bindTarget.attr("disable")?!1:(obj.config.finder.onclick.call({targetID:objID,value:axdom("#"+objID).val()},objID),void bindSelectorClose(objID,objSeq,event))})},bindSelectorExpand:function(objID,objSeq,isToggle,event){var cfg=this.config,obj=this.objects[objSeq];obj.config.reserveKeys;if("disable"==obj.bindAnchorTarget.attr("disable")||"disable"==obj.bindTarget.attr("disable"))return!1;obj.bindTarget.data("val",obj.bindTarget.val().enc()),this.opendExpandBox&&this.bindSelectorClose(this.opendExpandBox.objID,this.opendExpandBox.objSeq,event);var jqueryTargetObjID=axdom("#"+cfg.targetID+"_AX_"+objID);if(!axdom("#"+cfg.targetID+"_AX_"+objID).data("blurEvent")){if(isToggle&&AXgetId(cfg.targetID+"_AX_"+objID+"_AX_expandBox"))return axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").remove(),void axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Handle").removeClass("on");axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").remove(),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Handle").removeClass("on");var anchorWidth=jqueryTargetObjID.width()-2,anchorHeight=jqueryTargetObjID.data("height")-1,styles=[];styles.push("top:"+anchorHeight+"px"),styles.push("width:"+(obj.config.anchorWidth||anchorWidth)+"px"),styles.push("z-index:5100");var po=[];po.push('<div id="'+cfg.targetID+"_AX_"+objID+'_AX_expandBox" class="bindSelectorNodes '+cfg.anchorSelectorExpandBoxClassName+'" style="'+styles.join(";")+'">'),po.push('<div id="'+cfg.targetID+"_AX_"+objID+'_AX_expandScroll" class="bindSelectorNodes '+cfg.anchorSelectorExpandScrollClassName+'">'),po.push('	<div class="AXLoadingSmall bindSelectorNodes"></div>'),po.push("</div>"),po.push("</div>"),axdom(document.body).append(po.join("")),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Handle").addClass("on");var expandBox=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox");obj.config.positionFixed&&expandBox.css({position:"fixed"});var offset=(expandBox.outerHeight(),obj.config.positionFixed?jqueryTargetObjID.position():jqueryTargetObjID.offset());obj.config.position&&(offset=jqueryTargetObjID.offset(),void 0!=obj.config.position.top&&(offset.top=obj.config.position.top));var css={};if(css.top=offset.top+anchorHeight,"bottom"==obj.config.direction&&(css.top-=expandBox.outerHeight()),css.left=offset.left,expandBox.css(css),this.opendExpandBox={objID:objID,objSeq:objSeq},obj.config.onsearch)this.bindSelectorKeyupChargingUp(objID,objSeq,event);else if(obj.config.ajaxUrl)this.bindSelectorKeyupChargingUp(objID,objSeq,event);else{if(!obj.config.options)return void trace("options 항목이 없어 bind selector 를 완성 할 수 없습니다.");this.bindSelectorSetOptions(objID,objSeq),this.bindSelectorKeyupChargingUp(objID,objSeq,event)}var bindSelectorOptionsClick=this.bindSelectorOptionsClick.bind(this);obj.documentclickEvent=function(event){bindSelectorOptionsClick(objID,objSeq,event)},axdom(document).unbind("click.AXInput").bind("click.AXInput",obj.documentclickEvent)}},bindSelectorBlur:function(objID){var objSeq=(this.config,null);axf.each(this.objects,function(idx,O){this.id==objID&&(objSeq=idx)}),null!=objSeq&&this.bindSelectorClose(objID,objSeq)},bindSelectorClose:function(objID,objSeq,event,originChangeCall){var cfg=this.config,obj=this.objects[objSeq],reserveKeys=obj.config.reserveKeys;if(obj.bindTarget||(obj.bindTarget=axdom("#"+objID)),obj.inProgress&&AXReqAbort(),"disable"==obj.bindAnchorTarget.attr("disable")||"disable"==obj.bindTarget.attr("disable"))return!1;if(AXgetId(cfg.targetID+"_AX_"+objID+"_AX_expandBox")){if(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").remove(),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Handle").removeClass("on"),axdom(document).unbind("click.AXInput"),obj.bindTarget.unbind("keydown.AXInput"),obj.bindTarget.unbind("change.AXInput"),obj.bindTarget.data("val")==obj.bindTarget.val().enc()&&!obj.config.isSelectorClick,obj.config.isChangedSelect){var myVal="";if(obj.config.selectedObject&&(myVal=obj.config.selectedObject[reserveKeys.optionText]),obj.config.appendable?""!=myVal&&axdom("#"+objID).val(myVal):axdom("#"+objID).val(myVal),obj.config.onChange){var sendObj={targetID:objID,options:obj.config.options,selectedIndex:obj.config.selectedIndex,selectedOption:obj.config.selectedObject};obj.config.onChange?obj.config.onChange.call(sendObj):obj.config.onchange&&obj.config.onchange.call(sendObj)}obj.config.isChangedSelect=!1,originChangeCall&&obj.bindTarget.change()}obj.config.selectedObject?this.bindSelectorInputChange(objID,objSeq):obj.config.appendable||obj.config.selectedObject||obj.inProgress||axdom("#"+objID).val("")}},bindSelectorSetOptions:function(objID,objSeq){var obj=this.objects[objSeq],cfg=this.config,reserveKeys=obj.config.reserveKeys,maxHeight=obj.config.maxHeight||130,optionPrintLength=obj.config.optionPrintLength||100;if(obj.config.options){var expandBox=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox"),jqueryTargetObjID=axdom("#"+cfg.targetID+"_AX_"+objID),po=[];if(axf.each(obj.config.options,function(index,O){if(!isNaN(optionPrintLength)&&index>optionPrintLength-1)return!1;O[reserveKeys.optionText]=O[reserveKeys.optionText]?O[reserveKeys.optionText].dec():"",O.desc=O.desc?O.desc.dec():"",O.optionDesc=O[reserveKeys.optionDesc]?O[reserveKeys.optionDesc].dec():"";var descStr=O.desc||O.optionDesc;""!=descStr&&(descStr="<span>"+descStr+"</span>"),po.push("<a "+obj.config.href+' id="'+cfg.targetID+"_AX_"+objID+"_AX_"+index+'_AX_option" class="bindSelectorNodes">'+O[reserveKeys.optionText]+descStr+"</a>")}),0==po.length){var selectorOptionEmpty="";AXConfig.AXInput&&(selectorOptionEmpty=AXConfig.AXInput.selectorOptionEmpty||"empty options"),po.push('<div class="empty">'+selectorOptionEmpty+"</div>")}axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandScroll").html(po.join("")),obj.config.isSelectorClick=!1;var expandScrollHeight=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandScroll").outerHeight();expandScrollHeight>maxHeight&&(expandScrollHeight=maxHeight),expandBox.css({height:expandScrollHeight+"px"});var bindSelectorOptionsClick=this.bindSelectorOptionsClick.bind(this);obj.documentclickEvent=function(event){bindSelectorOptionsClick(objID,objSeq,event)};var bindSelectorKeyup=this.bindSelectorKeyup.bind(this);if(obj.inputKeyup=function(event){bindSelectorKeyup(objID,objSeq,event)},axdom(document).unbind("click.AXInput").bind("click.AXInput",obj.documentclickEvent),axdom("#"+objID).unbind("keydown.AXInput").bind("keydown.AXInput",obj.inputKeyup),obj.myUIScroll&&obj.myUIScroll.unbind(),obj.myUIScroll=new AXScroll,obj.myUIScroll.setConfig({CT_className:"AXScrollSmall",targetID:cfg.targetID+"_AX_"+objID+"_AX_expandBox",scrollID:cfg.targetID+"_AX_"+objID+"_AX_expandScroll",touchDirection:!1}),obj.myUIScroll.scrollTop(0),void 0!=obj.config.selectedIndex&&(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_"+obj.config.selectedIndex+"_AX_option").addClass("on"),obj.myUIScroll.focusElement(cfg.targetID+"_AX_"+objID+"_AX_"+obj.config.selectedIndex+"_AX_option"),obj.config.focusedIndex=obj.config.selectedIndex),"bottom"==obj.config.direction){var offset=obj.config.positionFixed?jqueryTargetObjID.position():jqueryTargetObjID.offset();obj.config.position&&(offset=jqueryTargetObjID.offset(),void 0!=obj.config.position.top&&(offset.top=obj.config.position.top)),expandBox.css({top:offset.top-expandBox.outerHeight()})}}},bindSelectorOptionsClick:function(objID,objSeq,event){var obj=this.objects[objSeq],eid=(this.config,obj.config.reserveKeys,event.target.id.split(/_AX_/g)),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,until:function(evt,evtIDs){return"body"==evt.parentNode.tagName},find:function(evt,evtIDs){return""==evt.id?!1:!(evt.id!=objID&&!axdom(evt).hasClass("bindSelectorNodes"))}}),isSelectorClick=!!myTarget;if(isSelectorClick){if(eid=myTarget.id.split(/_AX_/g),"option"==eid.last()){var selectedIndex=eid[eid.length-2];obj.config.selectedIndex=selectedIndex,obj.config.focusedIndex=selectedIndex,obj.config.selectedObject=obj.config.options[selectedIndex],obj.config.isChangedSelect=!0,obj.config.isSelectorClick=!0,this.bindSelectorClose(objID,objSeq,event,"bindTarget_onchange")}}else this.bindSelectorClose(objID,objSeq,event)},bindSelectorKeyup:function(objID,objSeq,event){var obj=this.objects[objSeq],_this=this,reserveKeys=(this.config,obj.config.reserveKeys);if(obj.inProgress)return void(obj.inProgressReACT=!0);if(event.keyCode==AXUtil.Event.KEY_TAB)return this.bindSelectorClose(objID,objSeq,event),void this.stopEvent(event);if(event.keyCode==AXUtil.Event.KEY_UP){if(!obj.config.options)return;if(0==obj.config.options.length)return;var focusIndex=obj.config.options.length-1;void 0==obj.config.focusedIndex||0==obj.config.focusedIndex||(focusIndex=obj.config.focusedIndex-1),this.bindSelectorSelect(objID,objSeq,focusIndex),this.stopEvent(event)}else if(event.keyCode==AXUtil.Event.KEY_DOWN){if(!obj.config.options)return;if(0==obj.config.options.length)return;var focusIndex=0;void 0==obj.config.focusedIndex||obj.config.focusedIndex==obj.config.options.length-1||(focusIndex=obj.config.focusedIndex.number()+1),this.bindSelectorSelect(objID,objSeq,focusIndex),this.stopEvent(event)}else if(event.keyCode==AXUtil.Event.KEY_RETURN)null==obj.config.focusedIndex?_this.bindSelectorClose(objID,objSeq,event):(obj.config.selectedObject=obj.config.options[obj.config.focusedIndex],obj.config.selectedIndex=obj.config.focusedIndex,obj.config.isChangedSelect=!0,axdom("#"+objID).val(obj.config.selectedObject[reserveKeys.optionText]),_this.bindSelectorClose(objID,objSeq,event,"bindTarget_onchange")),this.stopEvent(event);else{var bindSelectorKeyupChargingUp=this.bindSelectorKeyupChargingUp.bind(this);obj.Observer&&clearTimeout(obj.Observer),obj.Observer=setTimeout(function(){bindSelectorKeyupChargingUp(objID,objSeq,event)},500)}},bindSelectorKeyupChargingUp:function(objID,objSeq,event){var obj=this.objects[objSeq],reserveKeys=(this.config,obj.config.reserveKeys),objVal=axdom("#"+objID).val(),bindSelectorSearch=this.bindSelectorSearch.bind(this);if(obj.config.onsearch){var res=obj.config.onsearch.call({id:objID,value:objVal},objID,objVal,function(res){obj.config.options=res.options,obj.config.focusedIndex=null,this.bindSelectorSetOptions(objID,objSeq),this.bindSelectorSearch(objID,objSeq,objVal)}.bind(this));res&&(res.options=res.options||[],obj.config.options=res.options,obj.config.focusedIndex=null,this.bindSelectorSetOptions(objID,objSeq),this.bindSelectorSearch(objID,objSeq,objVal))}else if(obj.config.ajaxUrl){obj.inProgress=!0;var bindSelectorSetOptions=this.bindSelectorSetOptions.bind(this),bindSelectorKeyupChargingUp=this.bindSelectorKeyupChargingUp.bind(this),url=obj.config.ajaxUrl,pars=obj.config.ajaxPars||{},_method="post",_headers={},_contentType=AXConfig.AXReq.contentType,_responseType=AXConfig.AXReq.responseType,_dataType=AXConfig.AXReq.dataType,_async=AXConfig.AXReq.async;obj.config.method&&(_method=obj.config.method),obj.config.headers&&(_headers=obj.config.headers),obj.config.contentType&&(_contentType=obj.config.contentType),obj.config.responseType&&(_responseType=obj.config.responseType),obj.config.dataType&&(_dataType=obj.config.dataType),obj.config.ajaxAsync&&(_async=obj.config.ajaxAsync);var selectorName=obj.config.selectorName||axdom("#"+objID).attr("name");""==pars?pars=selectorName+"="+(objVal||"").enc():"string"==(typeof pars).toLowerCase()?pars+="&"+selectorName+"="+objVal.enc():"object"==(typeof pars).toLowerCase()&&(pars[selectorName]=objVal.enc());var msgAlert=this.msgAlert.bind(this);new AXReq(url,{type:_method,headers:_headers,contentType:_contentType,responseType:_responseType,dataType:_dataType,async:_async,debug:"undefined"!=typeof obj.config.debug?obj.config.debug:!1,pars:pars,onsucc:function(res){res.result&&res.result==AXConfig.AXReq.okCode||void 0==res.result&&!res.error?(obj.config.options=res[reserveKeys.options]||[],obj.config.focusedIndex=null,bindSelectorSetOptions(objID,objSeq),bindSelectorSearch(objID,objSeq,objVal),obj.inProgressReACT&&bindSelectorKeyupChargingUp(objID,objSeq,event)):msgAlert(res),obj.inProgress=!1,obj.inProgressReACT=!1}})}else bindSelectorSearch(objID,objSeq,objVal)},bindSelectorInputChange:function(objID,objSeq,event){var obj=this.objects[objSeq],reserveKeys=(this.config,obj.config.reserveKeys);axdom("#"+objID).val()!=obj.config.selectedObject[reserveKeys.optionText]&&(obj.config.appendable||axdom("#"+objID).val(""),obj.config.selectedObject=null,obj.config.selectedIndex=null,obj.config.focusedIndex=null,obj.config.onChange&&obj.config.onChange(null))},bindSelectorSetValue:function(objID,objSeq,value){var obj=this.objects[objSeq],reserveKeys=(this.config,obj.config.reserveKeys);if(obj.config.options){var selectedIndex=null;if(axf.each(obj.config.options,function(oidx,opt){opt[reserveKeys.optionValue]==value&&(selectedIndex=oidx)}),null!=selectedIndex&&(obj.config.focusedIndex=selectedIndex,obj.config.selectedObject=obj.config.options[selectedIndex],obj.config.isChangedSelect=!0,axdom("#"+objID).val(obj.config.selectedObject[reserveKeys.optionText]),obj.config.onChange||obj.config.onchange)){var sendObj={targetID:objID,options:obj.config.options,selectedIndex:obj.config.selectedIndex,selectedOption:obj.config.selectedObject};obj.config.onChange?obj.config.onChange.call(sendObj):obj.config.onchange&&obj.config.onchange.call(sendObj)}}},bindSelectorSearch:function(objID,objSeq,kword){var obj=this.objects[objSeq],reserveKeys=(this.config,obj.config.reserveKeys);if(""==kword)return void this.bindSelectorSelectClear(objID,objSeq);kword=kword.replace(/\//g,"\\/");for(var sw=AXUtil.consonantKR((kword||"").dec()),reAt=new RegExp("^"+sw+".*","i"),ix=null,a=0;a<obj.config.options.length;a++)if(reAt.test(obj.config.options[a][reserveKeys.optionText]||"")){ix=a;break}null!=ix?this.bindSelectorSelect(objID,objSeq,ix,"dont change value"):this.bindSelectorSelectClear(objID,objSeq)},bindSelectorSelect:function(objID,objSeq,index,changeValue){var obj=this.objects[objSeq],cfg=this.config;obj.config.reserveKeys;void 0!=obj.config.focusedIndex&&axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_"+obj.config.focusedIndex+"_AX_option").removeClass("on"),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_"+index+"_AX_option").addClass("on"),obj.config.focusedIndex=index,obj.myUIScroll.focusElement(cfg.targetID+"_AX_"+objID+"_AX_"+index+"_AX_option")},bindSelectorSelectClear:function(objID,objSeq){var obj=this.objects[objSeq],cfg=this.config;obj.config.reserveKeys;void 0!=obj.config.selectedIndex&&axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_"+obj.config.selectedIndex+"_AX_option").removeClass("on"),obj.config.selectedIndex=null,obj.config.focusedIndex=null,obj.config.selectedObject=null,obj.config.isChangedSelect=!0},bindSlider:function(objID,objSeq){var cfg=this.config,obj=this.objects[objSeq];obj.bindAnchorTarget||(obj.bindAnchorTarget=axdom("#"+cfg.targetID+"_AX_"+objID)),obj.bindTarget||(obj.bindTarget=axdom("#"+objID)),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderBox").remove();var w=obj.bindAnchorTarget.width(),h=obj.bindAnchorTarget.data("height"),objVal=obj.bindTarget.val().number().money();objVal.number()<obj.config.min.number()?objVal=obj.config.min:objVal.number()>obj.config.max.number()&&(objVal=obj.config.max),obj.config.unit||(obj.config.unit="");var po=[];po.push('<div id="'+cfg.targetID+"_AX_"+objID+'_AX_SliderBox" class="'+cfg.anchorSliderBoxClassName+'" style="left:0px;width:'+w+"px;height:"+h+'px;">'),po.push('	<div class="AXanchorSliderMinTitle">'+obj.config.min.number().money()+obj.config.unit+"</div>"),po.push('	<div id="'+cfg.targetID+"_AX_"+objID+'_AX_SliderBar" class="AXanchorSliderBar">'),po.push('		<div id="'+cfg.targetID+"_AX_"+objID+'_AX_SliderInside" class="AXanchorSliderBarInside"><div id="'+cfg.targetID+"_AX_"+objID+'_AX_SliderHandleTitle" class="AXanchorSliderHandleTitle">'+objVal.number().money()+obj.config.unit+"</div></div>"),po.push("		<a "+obj.config.href+' id="'+cfg.targetID+"_AX_"+objID+'_AX_SliderHandle" class="AXanchorSliderHandle">&nbsp;</a>'),po.push("	</div>"),po.push('	<div class="AXanchorSliderMaxTitle">'+obj.config.max.number().money()+obj.config.unit+"</div>"),po.push("</div>"),obj.bindAnchorTarget.append(po.join("")),obj.bindAnchorTarget.css({height:h+"px",position:"relative",display:"inline-block",left:"auto",top:"auto"});var maxTitleWidth=axdom("#"+cfg.targetID+"_AX_"+objID).find(".AXanchorSliderMaxTitle").outerWidth().number()+10,minTitleWidth=axdom("#"+cfg.targetID+"_AX_"+objID).find(".AXanchorSliderMinTitle").outerWidth().number()+10;30>maxTitleWidth&&(maxTitleWidth=30),30>minTitleWidth&&(minTitleWidth=30),axdom("#"+cfg.targetID+"_AX_"+objID).find(".AXanchorSliderMinTitle").css({width:minTitleWidth+"px"}),axdom("#"+cfg.targetID+"_AX_"+objID).find(".AXanchorSliderMaxTitle").css({width:maxTitleWidth+"px"});var sliderBarWidth=w-minTitleWidth-maxTitleWidth;obj.bindAnchorTarget.find(".AXanchorSliderBar").css({width:sliderBarWidth+"px",left:minTitleWidth+"px",top:h/2+2}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleTitle").css({width:maxTitleWidth}),obj.config._maxTitleWidth=maxTitleWidth,obj.config._handleWidth=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandle").width(),obj.config._trackWidth=sliderBarWidth,this.bindSliderSetValue(objID,objSeq);var onmousedown=this.bindSliderMouseDown.bind(this);if(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandle").unbind("mousedown.AXInput").bind("mousedown.AXInput",function(){onmousedown(objID,objSeq)}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandle").unbind("dragstart.AXInput").bind("dragstart.AXInput",function(event){return event.stopPropagation(),!1}),document.addEventListener){var ontouchstart=this.sliderTouchStart.bind(this);obj.bindSliderTouchStart=function(event){ontouchstart(objID,objSeq)},AXgetId(cfg.targetID+"_AX_"+objID+"_AX_SliderHandle").addEventListener("touchstart",obj.bindSliderTouchStart,!1)}obj.bindAnchorTarget.show(),obj.bindTarget.hide()},bindSliderMouseDown:function(objID,objSeq){var obj=(this.config,this.objects[objSeq]);if("disable"==obj.bindAnchorTarget.attr("disable")||"disable"==obj.bindTarget.attr("disable"))return!1;if(!obj.config.isMoving){var bindSliderMouseMove=this.bindSliderMouseMove.bind(this);obj.bindSliderMouseMove=function(event){bindSliderMouseMove(objID,objSeq,event)};var bindSliderMouseUp=this.bindSliderMouseUp.bind(this);obj.bindSliderMouseUp=function(event){bindSliderMouseUp(objID,objSeq,event)},axdom(document.body).unbind("mousemove.AXInput").bind("mousemove.AXInput",obj.bindSliderMouseMove),axdom(document.body).unbind("mouseup.AXInput").bind("mouseup.AXInput",obj.bindSliderMouseUp),obj.config.isMoving=!0}},bindSliderMouseMove:function(objID,objSeq,event){var cfg=this.config,obj=this.objects[objSeq],eX=event.pageX,cX=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderBar").offset().left,rX=eX-cX,valueWidth=obj.config.max.number()-obj.config.min.number(),pixelWidth=obj.config._trackWidth,objVal=rX*valueWidth/pixelWidth,snap=obj.config.snap;"undefined"==typeof snap&&(snap=1),snap>=1?(objVal=(objVal.number()+obj.config.min.number()).round(),objVal=parseInt(objVal/snap,10)*snap):(objVal=(objVal.number()+obj.config.min.number()).round(snap.toString().length-2),objVal=(parseFloat(objVal/snap)*snap).round(snap.toString().length-2));var rX=(objVal-obj.config.min)*pixelWidth/valueWidth;objVal<obj.config.min?(objVal=obj.config.min,rX=0):objVal>obj.config.max&&(objVal=obj.config.max,rX=pixelWidth),rX>pixelWidth&&(rX=pixelWidth);var sX=rX-obj.config._handleWidth/2,stX=rX-obj.config._maxTitleWidth/2;axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandle").css({left:sX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderInside").css({width:rX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleTitle").css({left:stX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleTitle").text(objVal.number().money()+obj.config.unit),axdom("#"+objID).val(objVal)},bindSliderMouseUp:function(objID,objSeq,event){var obj=(this.config,this.objects[objSeq]),objVal=axdom("#"+objID).val();if(obj.config.onChange||obj.config.onchange){var onchange=obj.config.onChange||obj.config.onchange;onchange.call({id:objID,value:objVal},objID,objVal)}obj.bindTarget||(obj.bindTarget=axdom("#"+objID)),obj.bindTarget.change(),axdom(document.body).unbind("mousemove.AXInput"),axdom(document.body).unbind("mouseup.AXInput"),obj.config.isMoving=!1},bindSliderSetValue:function(objID,objSeq,value){var cfg=this.config,obj=this.objects[objSeq];if(void 0!=value)var objVal=value;else var objVal=axdom("#"+objID).val();objVal.number()<obj.config.min.number()?objVal=obj.config.min:objVal.number()>obj.config.max.number()&&(objVal=obj.config.max);var valueWidth=obj.config.max.number()-obj.config.min.number(),pixelWidth=obj.config._trackWidth,pixelLeft=(objVal-obj.config.min)*pixelWidth/valueWidth;axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandle").css({left:pixelLeft-obj.config._handleWidth/2}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderInside").css({width:pixelLeft}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleTitle").css({left:pixelLeft-obj.config._maxTitleWidth/2}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleTitle").text(objVal.number().money()+obj.config.unit),axdom("#"+objID).val(objVal)},sliderTouchStart:function(objID,objSeq){var obj=(this.config,this.objects[objSeq]);if("disable"==obj.bindAnchorTarget.attr("disable")||"disable"==obj.bindTarget.attr("disable"))return!1;if(!obj.config.isMoving){var bindSliderTouchMove=this.sliderTouchMove.bind(this);obj.bindSliderTouchMove=function(event){bindSliderTouchMove(objID,objSeq,event)};var bindSliderTouchEnd=this.sliderTouchEnd.bind(this);obj.bindSliderTouchEnd=function(event){bindSliderTouchEnd(objID,objSeq,event)},document.addEventListener&&(document.addEventListener("touchmove",obj.bindSliderTouchMove,!1),document.addEventListener("touchend",obj.bindSliderTouchEnd,!1)),obj.config.isMoving=!0}},sliderTouchMove:function(objID,objSeq,event){var cfg=this.config,obj=this.objects[objSeq];event.preventDefault();var touch=event.touches[0],eX=touch.pageX,cX=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderBar").offset().left,rX=eX-cX,valueWidth=obj.config.max.number()-obj.config.min.number(),pixelWidth=obj.config._trackWidth,objVal=rX*valueWidth/pixelWidth,snap=obj.config.snap;snap||(snap=1),objVal=(objVal.number()+obj.config.min.number()).round(),objVal=parseInt(objVal/snap)*snap;var rX=(objVal-obj.config.min)*pixelWidth/valueWidth;objVal<obj.config.min?(objVal=obj.config.min,rX=0):objVal>obj.config.max&&(objVal=obj.config.max,rX=pixelWidth),rX>pixelWidth&&(rX=pixelWidth);var sX=rX-obj.config._handleWidth/2,stX=rX-obj.config._maxTitleWidth/2;axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandle").css({left:sX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderInside").css({width:rX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleTitle").css({left:stX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleTitle").text(objVal.number().money()+obj.config.unit),axdom("#"+objID).val(objVal),obj.config.onChange?obj.config.onChange(objID,objVal):obj.config.onchange&&obj.config.onchange(objID,objVal),obj.bindTarget||(obj.bindTarget=axdom("#"+objID)),obj.bindTarget.change()},sliderTouchEnd:function(objID,objSeq,event){var obj=(this.config,this.objects[objSeq]),objVal=axdom("#"+objID).val();if(obj.config.onChange||obj.config.onchange){var onchange=obj.config.onChange||obj.config.onchange;onchange.call({id:objID,value:objVal},objID,objVal)}obj.bindTarget||(obj.bindTarget=axdom("#"+objID)),obj.bindTarget.change(),document.addEventListener&&(document.removeEventListener("touchmove",obj.bindSliderTouchMove,!1),document.removeEventListener("touchend",obj.bindSliderTouchEnd,!1)),obj.config.isMoving=!1},bindTwinSliderGetVals:function(objValString,separator){var objVals=objValString.split(separator),objVal={min:0,max:0};return objVal=objVals.length<2?{min:objVals[0],max:objVals[0]}:{min:objVals[0],max:objVals[1]}},bindTwinSlider:function(objID,objSeq){var cfg=this.config,obj=this.objects[objSeq];obj.bindAnchorTarget||(obj.bindAnchorTarget=axdom("#"+cfg.targetID+"_AX_"+objID)),obj.bindTarget||(obj.bindTarget=axdom("#"+objID));var w=obj.bindAnchorTarget.width(),h=obj.bindAnchorTarget.data("height"),objValString=obj.bindTarget.val(),separator=obj.config.separator||"~",objVal=this.bindTwinSliderGetVals(objValString,separator);obj.vals=objVal,objVal.min.number()<obj.config.min.number()?objVal.min=obj.config.min:objVal.min.number()>obj.config.max.number()&&(objVal.min=obj.config.max),objVal.max.number()<obj.config.min.number()?objVal.max=obj.config.min:objVal.max.number()>obj.config.max.number()&&(objVal.max=obj.config.max),obj.config.unit||(obj.config.unit="");var po=[];po.push('<div id="'+cfg.targetID+"_AX_"+objID+'_AX_SliderBox" class="'+cfg.anchorSliderBoxClassName+'" style="left:0px;width:'+w+"px;height:"+h+'px;">'),po.push("	<a "+obj.config.href+' class="AXanchorSliderMinTitle">'+obj.config.min.number().money()+obj.config.unit+"</a>"),po.push("	<a "+obj.config.href+' class="AXanchorSliderMaxTitle">'+obj.config.max.number().money()+obj.config.unit+"</a>"),po.push('	<div id="'+cfg.targetID+"_AX_"+objID+'_AX_SliderBar" class="AXanchorSliderBar">'),po.push('		<div id="'+cfg.targetID+"_AX_"+objID+'_AX_SliderInside" class="AXanchorSliderBarInside"></div>'),po.push('		<div id="'+cfg.targetID+"_AX_"+objID+'_AX_SliderHandleMinTitle" class="AXanchorSliderHandleMinTitle">'+objVal.min.number().money()+obj.config.unit+"</div>"),po.push('		<div id="'+cfg.targetID+"_AX_"+objID+'_AX_SliderHandleMaxTitle" class="AXanchorSliderHandleMaxTitle">'+objVal.max.number().money()+obj.config.unit+"</div>"),po.push("		<a "+obj.config.href+' id="'+cfg.targetID+"_AX_"+objID+'_AX_SliderHandleMin" class="AXanchorSliderHandleMin">&nbsp;</a>'),po.push("		<a "+obj.config.href+' id="'+cfg.targetID+"_AX_"+objID+'_AX_SliderHandleMax" class="AXanchorSliderHandleMax">&nbsp;</a>'),po.push("	</div>"),po.push("</div>"),obj.bindAnchorTarget.append(po.join("")),obj.bindAnchorTarget.css({height:h+"px",position:"relative",display:"inline-block",left:"auto",top:"auto"}),obj.bindAnchorTarget.show(),obj.bindTarget.hide();var maxTitleWidth=obj.bindAnchorTarget.find(".AXanchorSliderMaxTitle").outerWidth().number()+10,minTitleWidth=obj.bindAnchorTarget.find(".AXanchorSliderMinTitle").outerWidth().number()+10;obj.bindAnchorTarget.find(".AXanchorSliderMinTitle").css({width:minTitleWidth+"px"}),obj.bindAnchorTarget.find(".AXanchorSliderMaxTitle").css({width:maxTitleWidth+"px"});var sliderBarWidth=w-minTitleWidth-maxTitleWidth;obj.bindAnchorTarget.find(".AXanchorSliderBar").css({width:sliderBarWidth+"px",left:minTitleWidth+"px",top:h/2+2}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMinTitle").css({width:maxTitleWidth}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMaxTitle").css({width:maxTitleWidth}),obj.config._maxTitleWidth=maxTitleWidth,obj.config._handleWidth=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMin").width(),obj.config._trackWidth=sliderBarWidth,this.bindTwinSliderSetValue(objID,objSeq);var onmousedown=this.bindTwinSliderMouseDown.bind(this);if(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMin").unbind("mousedown.AXInput").bind("mousedown.AXInput",function(){onmousedown(objID,objSeq,"min")}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMax").unbind("mousedown.AXInput").bind("mousedown.AXInput",function(){onmousedown(objID,objSeq,"max")}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMin").unbind("dragstart.AXInput").bind("dragstart.AXInput",function(event){return event.stopPropagation(),!1}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMax").unbind("dragstart.AXInput").bind("dragstart.AXInput",function(event){return event.stopPropagation(),!1}),document.addEventListener){var ontouchstart=this.twinSliderTouchStart.bind(this);obj.bindTwinSliderTouchStartMin=function(event){ontouchstart(objID,objSeq,"min")},obj.bindTwinSliderTouchStartMax=function(event){ontouchstart(objID,objSeq,"max")},AXgetId(cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMin").addEventListener("touchstart",obj.bindTwinSliderTouchStartMin,!1),AXgetId(cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMax").addEventListener("touchstart",obj.bindTwinSliderTouchStartMax,!1)}},bindTwinSliderMouseDown:function(objID,objSeq,handleName){var obj=(this.config,this.objects[objSeq]);if("disable"==obj.bindAnchorTarget.attr("disable")||"disable"==obj.bindTarget.attr("disable"))return!1;if(!obj.config.isMoving){var bindTwinSliderMouseMove=this.bindTwinSliderMouseMove.bind(this);obj.bindTwinSliderMouseMove=function(event){bindTwinSliderMouseMove(objID,objSeq,event,handleName)};var bindTwinSliderMouseUp=this.bindTwinSliderMouseUp.bind(this);
  obj.bindTwinSliderMouseUp=function(event){bindTwinSliderMouseUp(objID,objSeq,event,handleName)},axdom(document.body).unbind("mousemove.AXInput").bind("mousemove.AXInput",obj.bindTwinSliderMouseMove),axdom(document.body).unbind("mouseup.AXInput").bind("mouseup.AXInput",obj.bindTwinSliderMouseUp),obj.config.isMoving=!0}},bindTwinSliderMouseMove:function(objID,objSeq,event,handleName){var cfg=this.config,obj=this.objects[objSeq],eX=event.pageX,cX=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderBar").offset().left,rX=eX-cX,valueWidth=obj.config.max.number()-obj.config.min.number(),pixelWidth=obj.config._trackWidth,objVal=rX*valueWidth/pixelWidth,snap=obj.config.snap;snap||(snap=1),objVal=(objVal.number()+obj.config.min.number()).round(),objVal=parseInt(objVal/snap)*snap;var rX=(objVal-obj.config.min)*pixelWidth/valueWidth;if(objVal<obj.config.min?(objVal=obj.config.min,rX=0):objVal>obj.config.max&&(objVal=obj.config.max,rX=pixelWidth),rX>pixelWidth&&(rX=pixelWidth),"min"==handleName){objVal>obj.vals.max&&(objVal=obj.vals.max,rX=obj.handleMaxLeft);var sX=rX-obj.config._handleWidth,stX=rX-obj.config._maxTitleWidth;obj.handleMinLeft=rX,axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMin").css({left:sX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMinTitle").css({left:stX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMinTitle").text(objVal.number().money()+obj.config.unit),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderInside").css({width:rX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderInside").css({left:obj.handleMinLeft,width:obj.handleMaxLeft-obj.handleMinLeft}),obj.vals.min=objVal}else{objVal<obj.vals.min&&(objVal=obj.vals.min,rX=obj.handleMinLeft);var sX=rX,stX=rX;obj.handleMaxLeft=rX,axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMax").css({left:sX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMaxTitle").css({left:stX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMaxTitle").text(objVal.number().money()+obj.config.unit),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderInside").css({left:obj.handleMinLeft,width:obj.handleMaxLeft-obj.handleMinLeft}),obj.vals.max=objVal}var separator=obj.config.separator||"~";axdom("#"+objID).val(obj.vals.min+separator+obj.vals.max)},bindTwinSliderMouseUp:function(objID,objSeq,event){var obj=(this.config,this.objects[objSeq]),objVal=axdom("#"+objID).val();if(obj.config.onChange||obj.config.onchange){var onchange=obj.config.onChange||obj.config.onchange;onchange.call({id:objID,value:objVal},objID,objVal)}obj.bindTarget||(obj.bindTarget=axdom("#"+objID)),obj.bindTarget.change(),axdom(document.body).unbind("mousemove.AXInput"),axdom(document.body).unbind("mouseup.AXInput"),obj.config.isMoving=!1},bindTwinSliderSetValue:function(objID,objSeq,value){var cfg=this.config,obj=this.objects[objSeq];if(void 0!=value)var objValString=value;else var objValString=axdom("#"+objID).val();var separator=obj.config.separator||"~",objVal=this.bindTwinSliderGetVals(objValString,separator);obj.vals=objVal,objVal.min.number()<obj.config.min.number()?objVal.min=obj.config.min:objVal.min.number()>obj.config.max.number()&&(objVal.min=obj.config.max),objVal.max.number()<obj.config.min.number()?objVal.max=obj.config.min:objVal.max.number()>obj.config.max.number()&&(objVal.max=obj.config.max);var valueWidth=obj.config.max.number()-obj.config.min.number(),pixelWidth=obj.config._trackWidth,pixelMinLeft=(objVal.min-obj.config.min)*pixelWidth/valueWidth,pixelMaxLeft=(objVal.max-obj.config.min)*pixelWidth/valueWidth;axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMin").css({left:pixelMinLeft-obj.config._handleWidth}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMinTitle").css({left:pixelMinLeft-obj.config._maxTitleWidth}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMinTitle").text(objVal.min.number().money()+obj.config.unit),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMax").css({left:pixelMaxLeft}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMaxTitle").css({left:pixelMaxLeft}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMaxTitle").text(objVal.max.number().money()+obj.config.unit),obj.handleMinLeft=pixelMinLeft,obj.handleMaxLeft=pixelMaxLeft,axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderInside").css({left:pixelMinLeft,width:pixelMaxLeft-pixelMinLeft}),axdom("#"+objID).val(obj.vals.min+separator+obj.vals.max)},twinSliderTouchStart:function(objID,objSeq,handleName){var obj=(this.config,this.objects[objSeq]);if("disable"==obj.bindAnchorTarget.attr("disable")||"disable"==obj.bindTarget.attr("disable"))return!1;if(!obj.config.isMoving){var bindTwinSliderTouchMove=this.twinSliderTouchMove.bind(this);obj.bindTwinSliderTouchMove=function(event){bindTwinSliderTouchMove(objID,objSeq,event,handleName)};var bindTwinSliderTouchEnd=this.twinSliderTouchEnd.bind(this);obj.bindTwinSliderTouchEnd=function(event){bindTwinSliderTouchEnd(objID,objSeq,event,handleName)},document.addEventListener&&(document.addEventListener("touchmove",obj.bindTwinSliderTouchMove,!1),document.addEventListener("touchend",obj.bindTwinSliderTouchEnd,!1)),obj.config.isMoving=!0}},twinSliderTouchMove:function(objID,objSeq,event,handleName){var cfg=this.config,obj=this.objects[objSeq];event.preventDefault();var touch=event.touches[0],eX=touch.pageX,cX=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderBar").offset().left,rX=eX-cX,valueWidth=obj.config.max.number()-obj.config.min.number(),pixelWidth=obj.config._trackWidth,objVal=rX*valueWidth/pixelWidth,snap=obj.config.snap;snap||(snap=1),objVal=(objVal.number()+obj.config.min.number()).round(),objVal=parseInt(objVal/snap)*snap;var rX=(objVal-obj.config.min)*pixelWidth/valueWidth;if(objVal<obj.config.min?(objVal=obj.config.min,rX=0):objVal>obj.config.max&&(objVal=obj.config.max,rX=pixelWidth),rX>pixelWidth&&(rX=pixelWidth),"min"==handleName){objVal>obj.vals.max&&(objVal=obj.vals.max,rX=obj.handleMaxLeft);var sX=rX-obj.config._handleWidth,stX=rX-obj.config._maxTitleWidth;obj.handleMinLeft=rX,axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMin").css({left:sX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMinTitle").css({left:stX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMinTitle").text(objVal.number().money()+obj.config.unit),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderInside").css({width:rX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderInside").css({left:obj.handleMinLeft,width:obj.handleMaxLeft-obj.handleMinLeft}),obj.vals.min=objVal}else{objVal<obj.vals.min&&(objVal=obj.vals.min,rX=obj.handleMinLeft);var sX=rX,stX=rX;obj.handleMaxLeft=rX,axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMax").css({left:sX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMaxTitle").css({left:stX}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderHandleMaxTitle").text(objVal.number().money()+obj.config.unit),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SliderInside").css({left:obj.handleMinLeft,width:obj.handleMaxLeft-obj.handleMinLeft}),obj.vals.max=objVal}var separator=obj.config.separator||"~";axdom("#"+objID).val(obj.vals.min+separator+obj.vals.max),obj.config.onChange?obj.config.onChange(objID,obj.vals.min+separator+obj.vals.max):obj.config.onchange&&obj.config.onchange(objID,obj.vals.min+separator+obj.vals.max),obj.bindTarget||(obj.bindTarget=axdom("#"+objID)),obj.bindTarget.change()},twinSliderTouchEnd:function(objID,objSeq,event){var obj=(this.config,this.objects[objSeq]),objVal=axdom("#"+objID).val();if(obj.config.onChange||obj.config.onchange){var onchange=obj.config.onChange||obj.config.onchange;onchange.call({id:objID,value:objVal},objID,objVal)}obj.bindTarget||(obj.bindTarget=axdom("#"+objID)),obj.bindTarget.change(),document.removeEventListener("touchmove",obj.bindTwinSliderTouchMove,!1),document.removeEventListener("touchend",obj.bindTwinSliderTouchEnd,!1),obj.config.isMoving=!1},bindSwitch:function(objID,objSeq){var cfg=this.config,obj=this.objects[objSeq];obj.bindAnchorTarget||(obj.bindAnchorTarget=axdom("#"+cfg.targetID+"_AX_"+objID)),obj.bindTarget||(obj.bindTarget=axdom("#"+objID));var w=obj.bindAnchorTarget.width(),h=obj.bindAnchorTarget.data("height"),objVal=obj.bindTarget.val(),switchValue=obj.config.on;objVal==switchValue?obj.switchValue="on":(switchValue=obj.config.off,obj.switchValue="off"),obj.bindTarget.val(switchValue);var po=[];po.push('<div id="'+cfg.targetID+"_AX_"+objID+'_AX_SwitchBox" class="'+cfg.anchorSwitchBoxClassName+'" style="left:0px;top:0px;width:'+w+"px;height:"+h+'px;">'),po.push('<div id="'+cfg.targetID+"_AX_"+objID+'_AX_SwitchDisplay" class="AXanchorSwitchDisplay" style="height:'+h+"px;line-height:"+h+'px;">'+switchValue+"</div>"),po.push("<a "+obj.config.href+' id="'+cfg.targetID+"_AX_"+objID+'_AX_SwitchHandle" class="AXanchorSwitchHandle" style="height:'+h+'px;">&nbsp;</a>'),po.push("</div>"),obj.bindAnchorTarget.append(po.join("")),obj.bindAnchorTarget.css({height:h+"px",position:"relative",display:"inline-block",left:"auto",top:"auto"}),obj.bindTarget_switchBox=obj.bindAnchorTarget.find("."+cfg.anchorSwitchBoxClassName),obj.bindTarget_switchDisplay=obj.bindAnchorTarget.find(".AXanchorSwitchDisplay"),obj.bindTarget_switchHandle=obj.bindAnchorTarget.find(".AXanchorSwitchHandle"),"on"==obj.switchValue&&obj.bindAnchorTarget.find("."+cfg.anchorSwitchBoxClassName).addClass("on"),obj.bindAnchorTarget.show(),obj.bindTarget.hide();var bindSwitchClick=this.bindSwitchClick.bind(this);obj.bindSwitchClick=function(event){bindSwitchClick(objID,objSeq,event)},obj.bindAnchorTarget.find("."+cfg.anchorSwitchBoxClassName).unbind("click.AXInput").bind("click.AXInput",obj.bindSwitchClick)},bindSwitchClick:function(objID,objSeq,event){var cfg=this.config,obj=this.objects[objSeq];if("disable"==obj.bindAnchorTarget.attr("disable")||"disable"==obj.bindTarget.attr("disable"))return!1;if("on"==obj.switchValue?(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SwitchBox").removeClass("on"),obj.switchValue="off",axdom("#"+objID).val(obj.config.off),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SwitchDisplay").html(obj.config.off)):(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SwitchBox").addClass("on"),obj.switchValue="on",axdom("#"+objID).val(obj.config.on),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SwitchDisplay").html(obj.config.on)),obj.config.onChange||obj.config.onchange){var sendObj={targetID:objID,on:obj.config.on,off:obj.config.off,value:axdom("#"+objID).val()};obj.config.onChange&&obj.config.onChange.call(sendObj),obj.config.onchange&&obj.config.onchange.call(sendObj)}obj.bindTarget||(obj.bindTarget=axdom("#"+objID)),obj.bindTarget.change()},bindSwitchSetValue:function(objID,objSeq,value){var cfg=this.config,obj=this.objects[objSeq],objVal=value,switchValue=obj.config.on;if(objVal==switchValue?obj.switchValue="on":(switchValue=obj.config.off,obj.switchValue="off"),axdom("#"+objID).val(switchValue),"off"==obj.switchValue?(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SwitchBox").removeClass("on"),obj.switchValue="off",axdom("#"+objID).val(obj.config.off),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SwitchDisplay").html(obj.config.off)):(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SwitchBox").addClass("on"),obj.switchValue="on",axdom("#"+objID).val(obj.config.on),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SwitchDisplay").html(obj.config.on)),obj.config.onChange||obj.config.onchange){var sendObj={targetID:objID,on:obj.config.on,off:obj.config.off,value:axdom("#"+objID).val()};obj.config.onChange?obj.config.onChange.call(sendObj):obj.config.onchange&&obj.config.onchange.call(sendObj)}obj.bindTarget||(obj.bindTarget=axdom("#"+objID)),obj.bindTarget.change()},bindSwitch_touchstart:function(){},bindSwitch_touchMove:function(){},bindSwitch_touchEnd:function(){},bindSegment:function(objID,objSeq){var cfg=this.config,obj=this.objects[objSeq];obj.bindAnchorTarget||(obj.bindAnchorTarget=axdom("#"+cfg.targetID+"_AX_"+objID)),obj.bindTarget||(obj.bindTarget=axdom("#"+objID));var w=obj.bindAnchorTarget.width(),h=obj.bindAnchorTarget.data("height"),objVal=obj.bindTarget.val(),segmentOptions=obj.config.options;obj.selectedSegmentIndex=null,axf.each(segmentOptions,function(idx,seg){this.optionValue==objVal&&(obj.selectedSegmentIndex=idx,obj.selectedSegment=seg)}),null==obj.selectedSegmentIndex&&(obj.selectedSegmentIndex=0,obj.selectedSegment=segmentOptions[0]),obj.bindTarget.val(obj.selectedSegment.optionValue);var handleWidth=(w/segmentOptions.length).round()-2,po=[],theme=obj.config.theme||cfg.anchorSegmentBoxClassName;po.push('<div id="'+cfg.targetID+"_AX_"+objID+'_AX_SegmentBox" class="'+theme+'" style="left:0px;top:0px;width:'+w+'px;">'),axf.each(segmentOptions,function(idx,seg){var addClass="";0==idx?addClass=" segmentLeft":idx==segmentOptions.length-1&&(addClass=" segmentRight"),obj.selectedSegmentIndex==idx&&(addClass+=" on"),seg.addClass&&(addClass+=" "+seg.addClass),po.push("<a "+obj.config.href+' id="'+cfg.targetID+"_AX_"+objID+"_AX_SegmentHandle_AX_"+idx+'" class="AXanchorSegmentHandle'+addClass+'" style="width:'+handleWidth+'px;">'+seg.optionText+"</a>")}),po.push("</div>"),obj.bindAnchorTarget.append(po.join("")),obj.bindAnchorTarget.css({height:h+"px",position:"relative",display:"inline-block",left:"auto",top:"auto"});var borderTop=obj.bindAnchorTarget.find(".AXanchorSegmentHandle").css("border-top-width").number(),borderBot=obj.bindAnchorTarget.find(".AXanchorSegmentHandle").css("border-bottom-width").number();obj.bindAnchorTarget.find(".AXanchorSegmentHandle").css({height:obj.bindAnchorTarget.innerHeight()-borderTop-borderBot+"px","line-height":obj.bindAnchorTarget.innerHeight()-borderTop-borderBot+"px"}),obj.bindAnchorTarget.show(),obj.bindTarget.hide();var bindSegmentClick=this.bindSegmentClick.bind(this);obj.bindSegmentClick=function(event){bindSegmentClick(objID,objSeq,event)},axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SegmentBox").find(".AXanchorSegmentHandle").unbind("click.AXInput").bind("click.AXInput",obj.bindSegmentClick)},bindSegmentClick:function(objID,objSeq,event){var cfg=this.config,obj=this.objects[objSeq];if("disable"==obj.bindAnchorTarget.attr("disable")||"disable"==obj.bindTarget.attr("disable"))return!1;var segmentOptions=obj.config.options,myTarget=axf.get_event_target(event.target,{tagname:"a",clazz:"AXanchorSegmentHandle"});if(myTarget){var seq=myTarget.id.split(/_AX_/g).last();if(obj.selectedSegmentIndex!=seq&&(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SegmentHandle_AX_"+obj.selectedSegmentIndex).removeClass("on"),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SegmentHandle_AX_"+seq).addClass("on"),obj.selectedSegmentIndex=seq,obj.selectedSegment=segmentOptions[seq]),axdom("#"+objID).val(obj.selectedSegment.optionValue),obj.config.onChange||obj.config.onchange){var sendObj={targetID:objID,options:segmentOptions,selectedIndex:obj.selectedSegmentIndex,selectedOption:obj.selectedSegment};obj.config.onChange?obj.config.onChange.call(sendObj):obj.config.onchange&&obj.config.onchange.call(sendObj)}obj.bindTarget||(obj.bindTarget=axdom("#"+objID)),obj.bindTarget.change()}},bindSegmentSetValue:function(objID,objSeq,value){var cfg=this.config,obj=this.objects[objSeq],selectedSegmentIndex=obj.selectedSegmentIndex,objVal=value,segmentOptions=obj.config.options;if(obj.selectedSegmentIndex=null,axf.each(segmentOptions,function(idx,seg){this.optionValue==objVal&&(obj.selectedSegmentIndex=idx,obj.selectedSegment=seg)}),null==obj.selectedSegmentIndex&&(obj.selectedSegmentIndex=0,obj.selectedSegment=segmentOptions[0]),axdom("#"+objID).val(obj.selectedSegment.optionValue),selectedSegmentIndex!=obj.selectedSegmentIndex&&(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SegmentHandle_AX_"+selectedSegmentIndex).removeClass("on"),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SegmentHandle_AX_"+obj.selectedSegmentIndex).addClass("on")),obj.config.onChange||obj.config.onchange){var sendObj={targetID:objID,options:segmentOptions,selectedIndex:obj.selectedSegmentIndex,selectedOption:obj.selectedSegment};obj.config.onChange?obj.config.onChange.call(sendObj):obj.config.onchange&&obj.config.onchange.call(sendObj)}obj.bindTarget||(obj.bindTarget=axdom("#"+objID)),obj.bindTarget.change()},bindDate:function(objID,objSeq){var cfg=this.config,obj=this.objects[objSeq];obj.bindAnchorTarget||(obj.bindAnchorTarget=axdom("#"+cfg.targetID+"_AX_"+objID)),obj.bindTarget||(obj.bindTarget=axdom("#"+objID));var h=obj.bindAnchorTarget.data("height"),po=[];po.push("<a "+obj.config.href+' id="'+cfg.targetID+"_AX_"+objID+'_AX_dateHandle" class="'+cfg.anchorDateHandleClassName+'" style="right:0px;top:0px;width:'+h+"px;height:"+h+'px;">&nbsp;</a>'),obj.bindAnchorTarget.append(po.join("")),obj.bindAnchorTarget.show();var bindDateExpand=this.bindDateExpand.bind(this),bindDateExpandClose=this.bindDateExpandClose.bind(this);axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_dateHandle").unbind("click.AXInput").bind("click.AXInput",function(event){if(AXgetId(cfg.targetID+"_AX_"+objID+"_AX_expandBox"))bindDateExpandClose(objID,objSeq,event);else{var isReadOnly=obj.bindTarget.attr("readonly"),isDisabled=obj.bindTarget.attr("disabled");isReadOnly&&(isReadOnly="true"==isReadOnly.lcase()||"readonly"==isReadOnly.lcase()),isDisabled&&(isDisabled="true"==isDisabled.lcase()||"disabled"==isDisabled.lcase()),isReadOnly||isDisabled||bindDateExpand(objID,objSeq,!0,event)}}),obj.bindTarget.unbind("focus.AXInput").bind("focus.AXInput",function(event){setTimeout(function(){obj.bindTarget.select()},1)});var separator=obj.config.separator||AXConfig.AXInput.dateSeparator||"-";obj.bindTarget.unbind("keydown.AXInput").bind("keydown.AXInput",function(event){var _this=this;setTimeout(function(){if(event.keyCode==axf.Event.KEY_RETURN)_this.blur();else if(event.keyCode!=AXUtil.Event.KEY_BACKSPACE&&event.keyCode!=AXUtil.Event.KEY_DELETE&&event.keyCode!=AXUtil.Event.KEY_LEFT&&event.keyCode!=AXUtil.Event.KEY_RIGHT){var va=_this.value.replace(/\D/gi,"");"y"==obj.config.selectType?va.length>4&&(_this.value=va.left(4)):"m"==obj.config.selectType?4==va.length?(va+=separator,_this.value=va):va.length>4&&(va=va.substr(0,4)+separator+va.substr(4,2),_this.value=va):va.length<4?_this.value=va:4==va.length?(va+=separator,_this.value=va):va.length<=6?(va=va.substr(0,4)+separator+va.substr(4,2)+separator,_this.value=va):va.length<=8?(va=va.substr(0,4)+separator+va.substr(4,2)+separator+va.substr(6,2),obj.config.expandTime&&(va+=" "),_this.value=va):obj.config.expandTime?va.length<=10?(va=va.substr(0,4)+separator+va.substr(4,2)+separator+va.substr(6,2)+" "+va.substr(8,2)+":",_this.value=va):va.length>12&&(va=va.substr(0,4)+separator+va.substr(4,2)+separator+va.substr(6,2)+" "+va.substr(8,2)+":"+va.substr(10,2),_this.value=va):(va=va.substr(0,4)+separator+va.substr(4,2)+separator+va.substr(6,2),_this.value=va)}})});var bindDateInputBlur=this.bindDateInputBlur.bind(this);obj.bindTarget.unbind("blur.AXInput").bind("blur.AXInput",function(event){bindDateInputBlur(objID,objSeq,event)}),obj.config.expand===!0&&(bindDateExpand(objID,objSeq,!0,event),setTimeout(function(){obj.bindTarget.focus()},100))},bindDateExpand:function(objID,objSeq,isToggle,event){var cfg=this.config,obj=this.objects[objSeq];if("disable"==obj.bindAnchorTarget.attr("disable")||"disable"==obj.bindTarget.attr("disable"))return!1;for(var OO,oidx=0,__arr=this.objects;oidx<__arr.length&&(OO=__arr[oidx]);oidx++)OO.expandBox_axdom&&(OO.expandBox_axdom.remove(),OO.expandBox_axdom=null);if(AXUtil.clientWidth()<cfg.responsiveMobile)return void this.bindDateExpandMobile(objID,objSeq,isToggle,event);var obj=this.objects[objSeq],separator=obj.config.separator||AXConfig.AXInput.dateSeparator||"-";if(isToggle&&AXgetId(cfg.targetID+"_AX_"+objID+"_AX_expandBox"))return axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").remove(),void axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Handle").removeClass("on");axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").remove();var objVal=axdom("#"+objID).val();obj.config.expandTime&&"d"==obj.config.selectType;new Date;"y"==obj.config.selectType?""!=objVal&&(objVal=objVal.left(4)+separator+"01"+separator+"01"):"m"==obj.config.selectType&&""!=objVal&&(objVal=objVal+separator+"02");var dfDate=(obj.config.defaultDate||"").date(),myDate=objVal.date(separator,dfDate),myYear=myDate.getUTCFullYear(),myMonth=(myDate.getUTCMonth()+1).setDigit(2),po=[];if(po.push('<div id="'+cfg.targetID+"_AX_"+objID+'_AX_expandBox" class="'+cfg.bindDateExpandBoxClassName+'" style="z-index:5100;">'),po.push("	<div>"),po.push('		<div class="dateControlBox">'),po.push("			<a "+obj.config.href+' class="yearbutton" id="'+cfg.targetID+"_AX_"+objID+'_AX_controlYear">'+myYear+"년</a>"),po.push("			<a "+obj.config.href+' class="monthbutton" id="'+cfg.targetID+"_AX_"+objID+'_AX_controlMonth">'+myMonth+"월</a>"),po.push("			<a "+obj.config.href+' class="prevbutton" id="'+cfg.targetID+"_AX_"+objID+'_AX_expandPrev">P</a>'),po.push("			<a "+obj.config.href+' class="nextbutton" id="'+cfg.targetID+"_AX_"+objID+'_AX_expandNext">N</a>'),po.push("		</div>"),po.push('		<div class="dateDisplayBox" id="'+cfg.targetID+"_AX_"+objID+'_AX_displayBox"></div>'),obj.config.expandTime&&po.push('		<div class="timeDisplayBox" id="'+cfg.targetID+"_AX_"+objID+'_AX_displayTimeBox"></div>'),po.push("	</div>"),po.push("</div>"),axdom(document.body).append(po.join("")),obj.nDate=myDate,obj.mycalendar=new AXCalendar,obj.mycalendar.setConfig({targetID:cfg.targetID+"_AX_"+objID+"_AX_displayBox",basicDate:myDate,href:obj.config.href,minDate:obj.config.minDate,maxDate:obj.config.maxDate,onBeforeShowDay:obj.config.onBeforeShowDay}),obj.config.expandTime){obj.nDate=myDate;var mycalendartimeChange=this.bindDateTimeChange.bind(this);obj.mycalendartimeChange=function(myTime){mycalendartimeChange(objID,objSeq,myTime)},obj.mycalendartime=new AXCalendar,obj.mycalendartime.setConfig({targetID:cfg.targetID+"_AX_"+objID+"_AX_displayTimeBox",onChange:obj.mycalendartimeChange});var apm="AM",myTimes=myDate.print("hh:mi").split(":"),myHH=myTimes[0].number(),myMI=myTimes[1];12==myHH&&myMI>0?apm="PM":myHH>12&&(apm="PM",myHH-=12),obj.mycalendartime.printTimePage(myHH.setDigit(2)+":"+myMI.setDigit(2)+" "+apm)}var printDate="";"y"==obj.config.selectType?(obj.mycalendarPageType="y",obj.mycalendar.printYearPage(myDate.print("yyyy")),printDate=myDate.print("yyyy")):"m"==obj.config.selectType?(obj.mycalendarPageType="m",obj.mycalendar.printMonthPage(myDate),printDate=myDate.print("yyyy"+separator+"mm")):obj.config.defaultSelectType?("y"==obj.config.defaultSelectType?(obj.mycalendarPageType="y",obj.mycalendar.printYearPage(myDate.print("yyyy"))):"m"==obj.config.defaultSelectType?(obj.mycalendarPageType="m",obj.mycalendar.printMonthPage(myDate)):(obj.mycalendarPageType="d",obj.mycalendar.printDayPage(myDate)),printDate=myDate.print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime&&(printDate+=" "+myDate.print("hh:mi"))):(obj.mycalendarPageType="d",obj.mycalendar.printDayPage(myDate),printDate=myDate.print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime&&(printDate+=" "+myDate.print("hh:mi"))),obj.config.expandSetValue&&axdom("#"+objID).val(printDate);var expandBox=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox"),expBoxWidth=expandBox.outerWidth(),expBoxHeight=expandBox.outerHeight(),offset=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_dateHandle").offset(),handleWidth=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_dateHandle").width(),css=(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_dateHandle").height(),{});"left"==obj.config.align?css.left=offset.left.number()-expBoxWidth:"center"==obj.config.align?css.left=offset.left.number()-expBoxWidth/2+handleWidth:"right"==obj.config.align?css.left=offset.left.number()+handleWidth:css.left=offset.left.number()+handleWidth,"top"==obj.config.valign?css.top=offset.top:"middle"==obj.config.valign?css.top=offset.top.number()-expBoxHeight/2+handleWidth/2:"bottom"==obj.config.valign?css.top=offset.top.number()-expBoxHeight+handleWidth:css.top=offset.top,void 0!=obj.config.customPos&&(css.top=css.top+obj.config.customPos.top,css.left=css.left+obj.config.customPos.left);var pElement=expandBox.offsetParent(),pBox={width:pElement.width(),height:pElement.height()},clientHeight="Q"==AXUtil.docTD?document.body.scrollHeight:document.documentElement.scrollHeight,clienWidth="Q"==AXUtil.docTD?document.body.scrollWidth:document.documentElement.scrollWidth;clienWidth>pBox.width&&(pBox.width=clienWidth),clientHeight>pBox.height&&(pBox.height=clientHeight);var _box={width:expandBox.outerWidth()+10,height:expandBox.outerHeight()+10};_box.height.number()+css.top.number()>pBox.height&&(css.top=css.top-(_box.height.number()+css.top.number()-pBox.height)),css.top<0&&(css.top=0),_box.width.number()+css.left.number()>pBox.width&&(css.left=css.left-(_box.width.number()+css.left.number()-pBox.width)),css.left<0&&(css.left=0),expandBox.css(css),obj.expandBox_axdom=expandBox;var bindDateExpandBoxClick=this.bindDateExpandBoxClick.bind(this);obj.documentclickEvent=function(event){bindDateExpandBoxClick(objID,objSeq,event)};var bindDateKeyup=this.bindDateKeyup.bind(this);obj.inputKeyup=function(event){bindDateKeyup(objID,objSeq,event)},"y"==obj.config.selectType&&(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlYear").css({left:"70px"}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlMonth").hide()),axdom(document).unbind("click.AXInput").bind("click.AXInput",obj.documentclickEvent),axdom("#"+objID).bind("keydown.AXInput",obj.inputKeyup)},bindDateExpandMobile:function(objID,objSeq,isToggle,event){var cfg=this.config,obj=this.objects[objSeq];if("disable"==obj.bindAnchorTarget.attr("disable")||"disable"==obj.bindTarget.attr("disable"))return!1;if(axdom("#"+objID).unbind("keydown.AXInput").bind("keydown.AXInput",obj.inputKeyup),isToggle&&obj.modal&&obj.modal.opened)return obj.modal.close(),void axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Handle").removeClass("on");obj.modal=new AXMobileModal,obj.modal.setConfig({addClass:"",height:obj.config.expandTime?532:388,width:300,head:{},onclose:function(){}});var initBindDateMobileModal=this.initBindDateMobileModal.bind(this),onLoad=function(modalObj){initBindDateMobileModal(objID,objSeq,modalObj)};obj.modal.open(null,onLoad)},initBindDateMobileModal:function(objID,objSeq,modalObj){var cfg=this.config,obj=this.objects[objSeq],separator=obj.config.separator||AXConfig.AXInput.dateSeparator||"-",objVal=axdom("#"+objID).val();obj.config.expandTime&&"d"==obj.config.selectType;new Date;"y"==obj.config.selectType?""!=objVal&&(objVal=objVal.left(4)+separator+"01"+separator+"01"):"m"==obj.config.selectType&&""!=objVal&&(objVal=objVal+separator+"01");var dfDate=(obj.config.defaultDate||"").date(),myDate=objVal.date(separator,dfDate),myYear=myDate.getFullYear(),myMonth=(myDate.getMonth()+1).setDigit(2),headPo=[];headPo.push('<div class="AXDateControlBox">'),headPo.push("	<a "+obj.config.href+' class="AXDateControl yearbutton" id="'+cfg.targetID+"_AX_"+objID+'_AX_controlYear">'+(AXConfig.AXInput.yearText||"{year}년").replace("{year}",myYear)+"</a>"),headPo.push("	<a "+obj.config.href+' class="AXDateControl monthbutton" id="'+cfg.targetID+"_AX_"+objID+'_AX_controlMonth">'+(AXConfig.AXInput.monthText||"{month}월").replace("{month}",myMonth)+"</a>"),headPo.push("	<a "+obj.config.href+' class="AXDateControl prevbutton" id="'+cfg.targetID+"_AX_"+objID+'_AX_expandPrev">P</a>'),headPo.push("	<a "+obj.config.href+' class="AXDateControl nextbutton" id="'+cfg.targetID+"_AX_"+objID+'_AX_expandNext">N</a>'),headPo.push("</div>");var bodyPo=[];bodyPo.push('<div class="AXDateContainer">'),bodyPo.push('<div class="AXDateDisplayBox" id="'+cfg.targetID+"_AX_"+objID+'_AX_displayBox"></div>'),obj.config.expandTime&&bodyPo.push('		<div class="AXTimeDisplayBox" id="'+cfg.targetID+"_AX_"+objID+'_AX_displayTimeBox"></div>'),bodyPo.push("</div>");var footPo=[];if(footPo.push('<div class="AXDateButtonBox" id="'+cfg.targetID+"_AX_"+objID+'_AX_buttonBox">'),footPo.push('	<button class="AXButtonSmall W80 AXBindDateConfirm" type="button" id="'+cfg.targetID+"_AX_"+objID+'_AX_button_AX_confirm">'+(AXConfig.AXInput.confirmText||"확인")+"</button>"),footPo.push("</div>"),modalObj.modalHead.empty(),modalObj.modalHead.append(headPo.join("")),modalObj.modalBody.empty(),modalObj.modalBody.append(bodyPo.join("")),modalObj.modalFoot.empty(),modalObj.modalFoot.append(footPo.join("")),obj.nDate=myDate,obj.mycalendar=new AXCalendar,obj.mycalendar.setConfig({targetID:cfg.targetID+"_AX_"+objID+"_AX_displayBox",basicDate:myDate,href:obj.config.href}),obj.config.expandTime){obj.nDate=myDate;var mycalendartimeChange=this.bindDateTimeChange.bind(this);obj.mycalendartimeChange=function(myTime){mycalendartimeChange(objID,objSeq,myTime)},obj.mycalendartime=new AXCalendar,obj.mycalendartime.setConfig({targetID:cfg.targetID+"_AX_"+objID+"_AX_displayTimeBox",onChange:obj.mycalendartimeChange});var apm="AM",myTimes=myDate.print("hh:mi").split(":"),myHH=myTimes[0].number(),myMI=myTimes[1];12==myHH&&myMI>0?apm="PM":myHH>12&&(apm="PM",myHH-=12),obj.mycalendartime.printTimePage(myHH.setDigit(2)+":"+myMI.setDigit(2)+" "+apm)}var printDate="";"y"==obj.config.selectType?(obj.mycalendarPageType="y",obj.mycalendar.printYearPage(myDate.print("yyyy")),printDate=myDate.print("yyyy"),axdom("#"+objID).val(printDate)):"m"==obj.config.selectType?(obj.mycalendarPageType="m",obj.mycalendar.printMonthPage(myDate),printDate=myDate.print("yyyy"+separator+"mm"),axdom("#"+objID).val(printDate)):obj.config.defaultSelectType?("y"==obj.config.defaultSelectType?(obj.mycalendarPageType="y",obj.mycalendar.printYearPage(myDate.print("yyyy"))):"m"==obj.config.defaultSelectType?(obj.mycalendarPageType="m",obj.mycalendar.printMonthPage(myDate)):(obj.mycalendarPageType="d",obj.mycalendar.printDayPage(myDate)),printDate=myDate.print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime&&(printDate+=" "+myDate.print("hh:mi")),axdom("#"+objID).val(printDate)):(obj.mycalendarPageType="d",obj.mycalendar.printDayPage(myDate),printDate=myDate.print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime&&(printDate+=" "+myDate.print("hh:mi")),axdom("#"+objID).val(printDate));var _this=this;modalObj.modalHead.unbind("click.AXInput").bind("click.AXInput",function(event){_this.bindDateMobileModalHeadClick(objID,objSeq,event)}),modalObj.modalBody.unbind("click.AXInput").bind("click.AXInput",function(event){_this.bindDateMobileModalBodyClick(objID,objSeq,event)}),modalObj.modalFoot.unbind("click.AXInput").bind("click.AXInput",function(event){_this.bindDateMobileModalFootClick(objID,objSeq,event)})},bindDateMobileModalHeadClick:function(objID,objSeq,event){var obj=this.objects[objSeq],eid=(this.config,event.target.id.split(/_AX_/g)),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,until:function(evt,evtIDs){return!!axdom(evt.parentNode).hasClass("AXDateControlBox")},find:function(evt,evtIDs){return!!axdom(evt).hasClass("AXDateControl")}});if(myTarget){var act=myTarget.id.split(/_AX_/g).last(),nDate=obj.nDate;"controlYear"==act?this.bindDateChangePage(objID,objSeq,nDate,"y"):"controlMonth"==act?"y"!=obj.config.selectType&&this.bindDateChangePage(objID,objSeq,nDate,"m"):"expandPrev"==act?"d"==obj.mycalendarPageType?this.bindDateChangePage(objID,objSeq,nDate.add(-1,"m"),"d"):"m"==obj.mycalendarPageType?this.bindDateChangePage(objID,objSeq,nDate.add(-1,"y"),"m"):"y"==obj.mycalendarPageType&&this.bindDateChangePage(objID,objSeq,nDate.add(-12,"y"),"y"):"expandNext"==act&&("d"==obj.mycalendarPageType?this.bindDateChangePage(objID,objSeq,nDate.add(1,"m"),"d"):"m"==obj.mycalendarPageType?this.bindDateChangePage(objID,objSeq,nDate.add(1,"y"),"m"):"y"==obj.mycalendarPageType&&this.bindDateChangePage(objID,objSeq,nDate.add(12,"y"),"y"))}},bindDateMobileModalBodyClick:function(objID,objSeq,event){var obj=this.objects[objSeq],eid=(this.config,event.target.id.split(/_AX_/g)),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,until:function(evt,evtIDs){return!!axdom(evt.parentNode).hasClass("AXDateContainer")},find:function(evt,evtIDs){return!(!axdom(evt).hasClass("calendarDate")&&!axdom(evt).hasClass("calendarMonth"));
  }});if(myTarget){var ids=myTarget.id.split(/_AX_/g),act=ids.last(),nDate=obj.nDate,separator=obj.config.separator||AXConfig.AXInput.dateSeparator||"-";if("date"==act){obj.nDate=ids[ids.length-2].date();var printDate=obj.nDate.print("yyyy"+separator+"mm"+separator+"dd");obj.config.expandTime&&(printDate+=" "+obj.mycalendartime.getTime()),axdom("#"+objID).val(printDate),this.bindDateExpandClose(objID,objSeq,event)}else if("month"==act){var myMonth=ids[ids.length-2].number()-1;if("m"==obj.config.selectType){var yy=nDate.getFullYear(),dd=1;obj.nDate=new Date(Date.UTC(yy,myMonth,dd)),this.bindDateExpandClose(objID,objSeq,event)}else{var yy=nDate.getFullYear(),dd=1;obj.nDate=new Date(Date.UTC(yy,myMonth,dd)),this.bindDateChangePage(objID,objSeq,obj.nDate,"d")}}else if("year"==act){var myYear=ids[ids.length-2];if("y"==obj.config.selectType){var mm=0,dd=1;obj.nDate=new Date(Date.UTC(myYear,mm,dd)),this.bindDateExpandClose(objID,objSeq,event)}else{var mm=0,dd=1;obj.nDate=new Date(Date.UTC(myYear,mm,dd)),this.bindDateChangePage(objID,objSeq,obj.nDate,"m")}}}},bindDateMobileModalFootClick:function(objID,objSeq,event){var obj=this.objects[objSeq],eid=(this.config,event.target.id.split(/_AX_/g)),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,until:function(evt,evtIDs){return!!axdom(evt.parentNode).hasClass("AXDateButtonBox")},find:function(evt,evtIDs){return!!axdom(evt).hasClass("AXBindDateConfirm")}});if(myTarget){var act=myTarget.id.split(/_AX_/g).last();"confirm"==act&&obj.modal.close()}},bindDateExpandClose:function(objID,objSeq,event){var obj=this.objects[objSeq],cfg=this.config;if(!obj)return void axdom(document).unbind("click.AXInput");if(obj.modal&&obj.modal.opened){var objVal=axdom("#"+objID).val();if(""==objVal);else{var separator=obj.config.separator||AXConfig.AXInput.dateSeparator||"-";"y"==obj.config.selectType?axdom("#"+objID).val(obj.nDate.print("yyyy")):"m"==obj.config.selectType?axdom("#"+objID).val(obj.nDate.print("yyyy"+separator+"mm")):(printDate=obj.nDate.print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime&&(printDate+=" "+obj.mycalendartime.getTime()),axdom("#"+objID).val(printDate))}if(obj.config.onChange||(obj.config.onChange=obj.config.onchange),obj.config.onChange)if(axdom.isFunction(obj.config.onChange))obj.config.onChange.call({objID:objID,value:axdom("#"+objID).val()});else{var st_date,ed_date;if(obj.config.onChange.earlierThan?(st_date=axdom("#"+objID).val(),ed_date=axdom("#"+obj.config.onChange.earlierThan).val()):obj.config.onChange.laterThan&&(ed_date=axdom("#"+objID).val(),st_date=axdom("#"+obj.config.onChange.laterThan).val()),""!=st_date&&""!=ed_date&&st_date.date().diff(ed_date)<0)return this.msgAlert(obj.config.onChange.err),void axdom("#"+objID).val("");obj.config.onChange.onChange.call({objID:objID,value:axdom("#"+objID).val(),eventType:"expandClose"})}return obj.bindTarget||(obj.bindTarget=axdom("#"+objID)),obj.bindTarget.trigger("change"),obj.modal.close(),void axdom(document).unbind("click.AXInput")}if(AXgetId(cfg.targetID+"_AX_"+objID+"_AX_expandBox")){var objVal=axdom("#"+objID).val();if(""==objVal);else{var separator=obj.config.separator||AXConfig.AXInput.dateSeparator||"-";"y"==obj.config.selectType?axdom("#"+objID).val(obj.nDate.print("yyyy")):"m"==obj.config.selectType?axdom("#"+objID).val(obj.nDate.print("yyyy"+separator+"mm")):(printDate=obj.nDate.print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime&&(printDate+=" "+obj.mycalendartime.getTime()),axdom("#"+objID).val(printDate))}if(obj.config.onChange||(obj.config.onChange=obj.config.onchange),obj.config.onChange)if(axdom.isFunction(obj.config.onChange))obj.config.onChange.call({objID:objID,value:axdom("#"+objID).val()});else{var st_date,ed_date;if(obj.config.onChange.earlierThan?(st_date=axdom("#"+objID).val(),ed_date=axdom("#"+obj.config.onChange.earlierThan).val()):obj.config.onChange.laterThan&&(ed_date=axdom("#"+objID).val(),st_date=axdom("#"+obj.config.onChange.laterThan).val()),""!=st_date&&""!=ed_date&&st_date.date().diff(ed_date)<0)return this.msgAlert(obj.config.onChange.err),void axdom("#"+objID).val("");obj.config.onChange.onChange?obj.config.onChange.onChange.call({objID:objID,value:axdom("#"+objID).val()}):obj.config.onChange.onchange&&obj.config.onChange.onchange.call({objID:objID,value:axdom("#"+objID).val()})}return obj.bindTarget||(obj.bindTarget=axdom("#"+objID)),obj.bindTarget.trigger("change"),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").remove(),obj.expandBox_axdom=null,obj.mycalendartime=null,axdom(document).unbind("click.AXInput"),void event.stopPropagation()}},bindDateInputBlur:function(objID,objSeq,event){var obj=this.objects[objSeq],objVal=(this.config,axdom("#"+objID).val());if(""==objVal);else{var clearDate=!1,nDate=obj.nDate||new Date,va=axdom("#"+objID).val().replace(/\D/gi,"");if(-1==va.search(/\d+/g)&&(clearDate=!0),clearDate)axdom("#"+objID).val("");else{var separator=obj.config.separator||AXConfig.AXInput.dateSeparator||"-";if("y"==obj.config.selectType){var yy=va.left(4).number();0==yy&&(yy=nDate.getFullYear()),1e3>yy&&(yy+=2e3);var mm=nDate.getMonth(),dd=nDate.getDate();obj.nDate=new Date(Date.UTC(yy,mm,dd,12)),axdom("#"+objID).val(obj.nDate.print("yyyy"))}else if("m"==obj.config.selectType){if(va.length>4)var yy=va.left(4).number(),mm=va.substr(4,2).number()-1,dd=1;else var yy=va.left(4).number(),mm=0,dd=1;0==yy&&(yy=nDate.getFullYear()),1e3>yy&&(yy+=2e3),obj.nDate=new Date(Date.UTC(yy,mm,dd,12)),axdom("#"+objID).val(obj.nDate.print("yyyy"+separator+"mm"))}else{var needAlert=!1;if(va.length>5)var yy=va.left(4).number(),mm=va.substr(4,2).number()-1,dd=va.substr(6,2).number();else if(va.length>3)var yy="20"+va.substr(0,2),mm=va.substr(2,2).number()-1,dd=va.substr(4,2).number();else if(va.length>2)var yy=nDate.getFullYear(),mm=va.substr(0,2).number()-1,dd=va.substr(2,2).number();else var yy=nDate.getFullYear(),mm=nDate.getMonth(),dd=va.substr(0,2).number();if(0==yy&&(needAlert=!0),0==yy&&(yy=nDate.getFullYear()),1e3>yy&&(yy+=2e3),obj.nDate=new Date(Date.UTC(yy,mm,dd,12)),obj.nDate.getFullYear()==yy.number()&&obj.nDate.getMonth()==mm.number()&&obj.nDate.getDate()==dd.number()||(needAlert=!0,obj.nDate=new Date),printDate=obj.nDate.print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime){var hh,mi;try{printDate+=" "+obj.mycalendartime.getTime(),trace(printDate)}catch(e){va.length>11?(hh=va.substr(8,2).number(),mi=va.substr(10,2).number()):va.length>9?(hh=va.substr(8,2).number(),mi="00"):(hh="12",mi="00"),printDate+=" "+hh.setDigit(2)+":"+mi.setDigit(2)}}needAlert&&this.msgAlert("날짜 형식이 올바르지 않습니다."),axdom("#"+objID).val(printDate)}}}if(obj.config.onChange||(obj.config.onChange=obj.config.onchange),obj.config.onChange&&axdom("#"+objID).data("val")&&axdom("#"+objID).data("val")!=axdom("#"+objID).val()){if(axdom.isFunction(obj.config.onChange))obj.config.onChange.call({objID:objID,value:axdom("#"+objID).val()});else{var st_date,ed_date;obj.config.onChange.earlierThan?(st_date=axdom("#"+objID).val(),ed_date=axdom("#"+obj.config.onChange.earlierThan).val()):obj.config.onChange.laterThan&&(ed_date=axdom("#"+objID).val(),st_date=axdom("#"+obj.config.onChange.laterThan).val()),""!=st_date&&""!=ed_date&&st_date.date().diff(ed_date)<0&&(this.msgAlert(obj.config.onChange.err),axdom("#"+objID).val("")),obj.config.onChange.onChange.call({objID:objID,value:axdom("#"+objID).val(),eventType:"blur"})}axdom("#"+objID).data("val",axdom("#"+objID).val())}event.stopPropagation()},unbindDate:function(obj){var cfg=this.config,objID=obj.id,objSeq=null;if(axf.each(this.objects,function(oidx,O){return this.id==objID?(objSeq=oidx,!1):void 0}),null!=objSeq){var obj=this.objects[objSeq];axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").remove(),axdom(document).unbind("click.AXInput"),axdom("#"+objID).unbind("keydown.AXInput")}var removeAnchorId,collect=[];axf.each(this.objects,function(){this.id!=obj.id?collect.push(this):removeAnchorId=this.anchorID}),this.objects=collect,axdom("#"+removeAnchorId).remove()},bindDateTimeChange:function(objID,objSeq,myTime){var obj=this.objects[objSeq],separator=(this.config,obj.config.separator||AXConfig.AXInput.dateSeparator||"-"),printDate=obj.nDate.print("yyyy"+separator+"mm"+separator+"dd");obj.config.expandTime&&(printDate+=" "+obj.mycalendartime.getTime()),axdom("#"+objID).val(printDate)},bindDateExpandBoxClick:function(objID,objSeq,event){var obj=this.objects[objSeq],cfg=this.config,isDateClick=!1,eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,until:function(evt,evtIDs){return"BODY"==evt.parentNode.tagName},find:function(evt,evtIDs){if(!evt.id)return!1;var checkID=cfg.targetID+"_AX_"+objID;return evt.id==objID||evt.id.substr(0,checkID.length)==checkID}});if(isDateClick=!!myTarget){if(axdom(myTarget).hasClass("disabled"))return;var ids=myTarget.id.split(/_AX_/g),ename=ids.last(),nDate=obj.nDate,separator=obj.config.separator||AXConfig.AXInput.dateSeparator||"-";if("expandPrev"==ename)"d"==obj.mycalendarPageType?this.bindDateChangePage(objID,objSeq,nDate.add(-1,"m"),"d"):"m"==obj.mycalendarPageType?this.bindDateChangePage(objID,objSeq,nDate.add(-1,"y"),"m"):"y"==obj.mycalendarPageType&&this.bindDateChangePage(objID,objSeq,nDate.add(-12,"y"),"y");else if("expandNext"==ename)"d"==obj.mycalendarPageType?this.bindDateChangePage(objID,objSeq,nDate.add(1,"m"),"d"):"m"==obj.mycalendarPageType?this.bindDateChangePage(objID,objSeq,nDate.add(1,"y"),"m"):"y"==obj.mycalendarPageType&&this.bindDateChangePage(objID,objSeq,nDate.add(12,"y"),"y");else if("controlYear"==ename)this.bindDateChangePage(objID,objSeq,nDate,"y");else if("controlMonth"==ename)"y"!=obj.config.selectType&&this.bindDateChangePage(objID,objSeq,nDate,"m");else if("date"==ename){obj.nDate=ids[ids.length-2].date();var printDate=obj.nDate.print("yyyy"+separator+"mm"+separator+"dd");obj.config.expandTime&&(printDate+=" "+obj.mycalendartime.getTime()),axdom("#"+objID).val(printDate),this.bindDateExpandClose(objID,objSeq,event)}else if("month"==ename){var myMonth=ids[ids.length-2].number()-1;if("m"==obj.config.selectType){var yy=nDate.getFullYear(),dd=1;obj.nDate=new Date(Date.UTC(yy,myMonth,dd,12)),axdom("#"+objID).val(obj.nDate.print("yyyy"+separator+"mm")),this.bindDateExpandClose(objID,objSeq,event)}else{var yy=nDate.getFullYear(),dd=1;obj.nDate=new Date(Date.UTC(yy,myMonth,dd,12)),this.bindDateChangePage(objID,objSeq,obj.nDate,"d")}}else if("year"==ename){var myYear=ids[ids.length-2];if("y"==obj.config.selectType){var mm=0,dd=1;obj.nDate=new Date(Date.UTC(myYear,mm,dd,12)),axdom("#"+objID).val(obj.nDate.print("yyyy")),this.bindDateExpandClose(objID,objSeq,event)}else{var mm=0,dd=1;obj.nDate=new Date(Date.UTC(myYear,mm,dd,12)),this.bindDateChangePage(objID,objSeq,obj.nDate,"m")}}}else this.bindDateExpandClose(objID,objSeq,event)},bindDateKeyup:function(objID,objSeq,event){var obj=this.objects[objSeq];this.config;"y"==obj.config.selectType||"m"==obj.config.selectType},bindDateChangePage:function(objID,objSeq,setDate,pageType){var obj=this.objects[objSeq],cfg=this.config,separator=obj.config.separator||AXConfig.AXInput.dateSeparator||"-";if("m"==pageType){obj.mycalendarPageType="m",obj.nDate=setDate,obj.mycalendar.printMonthPage(setDate);var myYear=setDate.getFullYear();axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlYear").html(myYear+"년")}else if("y"==pageType){obj.mycalendarPageType="y",obj.nDate=setDate,obj.mycalendar.printYearPage(setDate.getFullYear());var myYear=setDate.getFullYear();axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlYear").html(myYear+"년")}else{obj.mycalendarPageType="d",obj.nDate=setDate,obj.mycalendar.printDayPage(setDate);var myYear=setDate.getFullYear(),myMonth=(setDate.getMonth()+1).setDigit(2);axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlYear").html(myYear+"년"),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlMonth").html(myMonth+"월")}if("y"==obj.config.selectType)axdom("#"+objID).val(obj.nDate.print("yyyy"));else if("m"==obj.config.selectType)axdom("#"+objID).val(obj.nDate.print("yyyy"+separator+"mm"));else{var printDate=obj.nDate.print("yyyy"+separator+"mm"+separator+"dd");obj.config.expandTime&&(printDate+=" "+obj.mycalendartime.getTime()),axdom("#"+objID).val(printDate)}},bindTwinDate:function(objID,objSeq,option){var cfg=this.config,obj=this.objects[objSeq];obj.bindAnchorTarget||(obj.bindAnchorTarget=axdom("#"+cfg.targetID+"_AX_"+objID)),obj.bindTarget||(obj.bindTarget=axdom("#"+objID)),obj.bindTargetStart=axdom("#"+obj.config.startTargetID);var h=obj.bindAnchorTarget.data("height"),po=[],handleLeft=0;obj.config&&(handleLeft=(obj.config.handleLeft||0).number()),po.push("<a "+obj.config.href+' id="'+cfg.targetID+"_AX_"+objID+'_AX_dateHandle" class="'+cfg.anchorDateHandleClassName+'" style="right:'+(0-handleLeft)+"px;top:0px;width:"+h+"px;height:"+h+'px;">&nbsp;</a>'),obj.bindAnchorTarget.append(po.join("")),obj.bindAnchorTarget.show();var bindDateExpand=this.bindTwinDateExpand.bind(this),bindTwinDateExpandClose=this.bindTwinDateExpandClose.bind(this);axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_dateHandle").unbind("click.AXInput").bind("click.AXInput",function(event){if(AXgetId(cfg.targetID+"_AX_"+objID+"_AX_expandBox"))bindTwinDateExpandClose(objID,objSeq,event);else{var isReadOnly=obj.bindTarget.attr("readonly"),isDisabled=obj.bindTarget.attr("disabled");isReadOnly&&(isReadOnly="true"==isReadOnly.lcase()||"readonly"==isReadOnly.lcase()),isDisabled&&(isDisabled="true"==isDisabled.lcase()||"disabled"==isDisabled.lcase()),isReadOnly||isDisabled||bindDateExpand(objID,objSeq,!0,event)}}),obj.bindTarget.unbind("focus.AXInput").bind("focus.AXInput",function(event){setTimeout(function(){},1)}),obj.bindTargetStart.unbind("focus.AXInput").bind("focus.AXInput",function(event){setTimeout(function(){},1)});var separator=obj.config.separator||AXConfig.AXInput.dateSeparator||"-";axdom("#"+objID+", #"+obj.config.startTargetID).unbind("keyup.AXInput").bind("keyup.AXInput",function(event){if(event.keyCode!=AXUtil.Event.KEY_BACKSPACE&&event.keyCode!=AXUtil.Event.KEY_DELETE&&event.keyCode!=AXUtil.Event.KEY_LEFT&&event.keyCode!=AXUtil.Event.KEY_RIGHT){var va=this.value.replace(/\D/gi,""),_this=this;"y"==obj.config.selectType?va.length>4&&(_this.value=va.left(4)):"m"==obj.config.selectType?4==va.length?(va+=separator,_this.value=va):va.length>4&&(va=va.substr(0,4)+separator+va.substr(4,2),_this.value=va):va.length<4?_this.value=va:va.length<=6?(va=va.substr(0,4)+separator+va.substr(4,2),_this.value=va):va.length<=8?(va=va.substr(0,4)+separator+va.substr(4,2)+separator+va.substr(6,2),_this.value=va):va.length<=10?obj.config.expandTime?(va=va.substr(0,4)+separator+va.substr(4,2)+separator+va.substr(6,2)+" "+va.substr(8,2),_this.value=va):(va=va.substr(0,4)+separator+va.substr(4,2)+separator+va.substr(6,2),_this.value=va):va.length>10&&(obj.config.expandTime?(va=va.substr(0,4)+separator+va.substr(4,2)+separator+va.substr(6,2)+" "+va.substr(8,2)+":"+va.substr(10,2),_this.value=va):(va=va.substr(0,4)+separator+va.substr(4,2)+separator+va.substr(6,2),_this.value=va))}});var bindTwinDateInputBlur=this.bindTwinDateInputBlur.bind(this);obj.bindTarget.unbind("blur.AXInput").bind("blur.AXInput",function(event){bindTwinDateInputBlur(objID,objSeq,event,2)}),axdom("#"+obj.config.startTargetID).unbind("blur.AXInput").bind("blur.AXInput",function(event){bindTwinDateInputBlur(objID,objSeq,event,1)});var objVal1=obj.bindTargetStart.val(),objVal2=obj.bindTarget.val(),myDate1=objVal1.date(separator),myDate2=objVal2.date(separator);obj.nDate1=myDate1,obj.nDate2=myDate2},bindTwinDateExpand:function(objID,objSeq,isToggle,event){for(var OO,cfg=this.config,obj=this.objects[objSeq],oidx=0,__arr=this.objects;oidx<__arr.length&&(OO=__arr[oidx]);oidx++)OO.expandBox_axdom&&(OO.expandBox_axdom.remove(),OO.expandBox_axdom=null);var obj=this.objects[objSeq];if("disable"==obj.bindAnchorTarget.attr("disable")||"disable"==obj.bindTarget.attr("disable"))return!1;var separator=obj.config.separator||AXConfig.AXInput.dateSeparator||"-";if(isToggle&&AXgetId(cfg.targetID+"_AX_"+objID+"_AX_expandBox"))return axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").remove(),void axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Handle").removeClass("on");axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").remove();var objVal1=axdom("#"+obj.config.startTargetID).val(),objVal2=axdom("#"+objID).val();obj.config.expandTime&&"d"==obj.config.selectType;var objVal1Empty=(new Date,!1);"y"==obj.config.selectType?(""!=objVal1?objVal1=objVal1.left(4)+separator+"01"+separator+"02":objVal1Empty=!0,""!=objVal2&&(objVal2=objVal2.left(4)+separator+"01"+separator+"02")):"m"==obj.config.selectType&&(""!=objVal1?objVal1=objVal1+separator+"02":objVal1Empty=!0,""!=objVal2&&(objVal2=objVal2+separator+"02")),AXUtil.isEmpty(objVal1)&&(objVal1="",objVal1Empty=!0);var myDate1=objVal1.date(separator),myDate2=objVal2.date(separator),myYear1=myDate1.getFullYear(),myYear2=myDate2.getFullYear(),myMonth1=(myDate1.getMonth()+1).setDigit(2),myMonth2=(myDate2.getMonth()+1).setDigit(2),buttonText=obj.config.buttonText||"OK",po=[];if(po.push('<div id="'+cfg.targetID+"_AX_"+objID+'_AX_expandBox" class="'+cfg.bindTwinDateExpandBoxClassName+'" style="z-index:5100;">'),po.push("	<div>"),po.push('		<table cellpadding="0" cellspacing="0">'),po.push("			<tbody>"),po.push("				<tr>"),po.push('					<td style="padding-right:3px;">'),po.push('					<div class="dateTypeName">START</div>'),po.push('					<div class="dateControlBox">'),po.push("						<a "+obj.config.href+' class="yearbutton" id="'+cfg.targetID+"_AX_"+objID+'_AX_controlYear1">'+myYear1+"년</a>"),po.push("						<a "+obj.config.href+' class="monthbutton" id="'+cfg.targetID+"_AX_"+objID+'_AX_controlMonth1">'+myMonth1+"월</a>"),po.push("						<a "+obj.config.href+' class="prevbutton" id="'+cfg.targetID+"_AX_"+objID+'_AX_expandPrev1">P</a>'),po.push("						<a "+obj.config.href+' class="nextbutton" id="'+cfg.targetID+"_AX_"+objID+'_AX_expandNext1">N</a>'),po.push("					</div>"),po.push('					<div class="dateDisplayBox" id="'+cfg.targetID+"_AX_"+objID+'_AX_displayBox1"></div>'),obj.config.expandTime&&po.push('					<div class="timeDisplayBox" id="'+cfg.targetID+"_AX_"+objID+'_AX_displayTimeBox1"></div>'),po.push("					</td>"),po.push('					<td style="padding-left:3px;">'),po.push('					<div class="dateTypeName">END</div>'),po.push('					<div class="dateControlBox">'),po.push("						<a "+obj.config.href+' class="yearbutton" id="'+cfg.targetID+"_AX_"+objID+'_AX_controlYear2">'+myYear2+"년</a>"),po.push("						<a "+obj.config.href+' class="monthbutton" id="'+cfg.targetID+"_AX_"+objID+'_AX_controlMonth2">'+myMonth2+"월</a>"),po.push("						<a "+obj.config.href+' class="prevbutton" id="'+cfg.targetID+"_AX_"+objID+'_AX_expandPrev2">P</a>'),po.push("						<a "+obj.config.href+' class="nextbutton" id="'+cfg.targetID+"_AX_"+objID+'_AX_expandNext2">N</a>'),po.push("					</div>"),po.push('					<div class="dateDisplayBox" id="'+cfg.targetID+"_AX_"+objID+'_AX_displayBox2"></div>'),obj.config.expandTime&&po.push('					<div class="timeDisplayBox" id="'+cfg.targetID+"_AX_"+objID+'_AX_displayTimeBox2"></div>'),po.push("					</td>"),po.push("				</tr>"),po.push("			</tbody>"),po.push("		</table>"),po.push("	</div>"),po.push('	<div style="padding-top:5px;" align="center">'),po.push('		<input type="button" value="'+buttonText+'" class="AXButton Classic W70" id="'+cfg.targetID+"_AX_"+objID+'_AX_closeButton">'),po.push("	</div>"),po.push("</div>"),axdom(document.body).append(po.join("")),obj.nDate1=myDate1,obj.mycalendar1=new AXCalendar,obj.mycalendar1.setConfig({targetID:cfg.targetID+"_AX_"+objID+"_AX_displayBox1",basicDate:myDate1,minDate:obj.config.minDate,maxDate:obj.config.maxDate,onBeforeShowDay:obj.config.onBeforeShowDay}),obj.nDate2=myDate2,obj.mycalendar2=new AXCalendar,obj.mycalendar2.setConfig({targetID:cfg.targetID+"_AX_"+objID+"_AX_displayBox2",basicDate:myDate2,minDate:obj.config.minDate,maxDate:obj.config.maxDate,onBeforeShowDay:obj.config.onBeforeShowDay}),obj.config.expandTime){obj.nDate1=myDate1;var mycalendartimeChange1=this.bindTwinDateTimeChange.bind(this);obj.mycalendartimeChange1=function(myTime){mycalendartimeChange1(objID,objSeq,myTime,1)},obj.mycalendartime1=new AXCalendar,obj.mycalendartime1.setConfig({targetID:cfg.targetID+"_AX_"+objID+"_AX_displayTimeBox1",onChange:obj.mycalendartimeChange1});var apm="AM",myTimes=myDate1.print("hh:mi").split(":"),myHH=myTimes[0].number(),myMI=myTimes[1];myHH>12&&(apm="PM",myHH-=12),obj.mycalendartime1.printTimePage(myHH.setDigit(2)+":"+myMI.setDigit(2)+" "+apm),obj.nDate2=myDate2;var mycalendartimeChange2=this.bindTwinDateTimeChange.bind(this);obj.mycalendartimeChange2=function(myTime){mycalendartimeChange2(objID,objSeq,myTime,2)},obj.mycalendartime2=new AXCalendar,obj.mycalendartime2.setConfig({targetID:cfg.targetID+"_AX_"+objID+"_AX_displayTimeBox2",onChange:obj.mycalendartimeChange2});var apm="AM",myTimes=myDate2.print("hh:mi").split(":"),myHH=myTimes[0].number(),myMI=myTimes[1];myHH>12&&(apm="PM",myHH-=12),obj.mycalendartime2.printTimePage(myHH.setDigit(2)+":"+myMI.setDigit(2)+" "+apm)}var printDate1="",printDate2="";"y"==obj.config.selectType?(obj.mycalendarPageType="y",obj.mycalendar1.printYearPage(myDate1.print("yyyy")),obj.mycalendar2.printYearPage(myDate2.print("yyyy")),printDate1=myDate1.print("yyyy"),printDate2=myDate2.print("yyyy")):"m"==obj.config.selectType?(obj.mycalendarPageType="m",obj.mycalendar1.printMonthPage(myDate1),obj.mycalendar2.printMonthPage(myDate2),printDate1=myDate1.print("yyyy"+separator+"mm"),printDate2=myDate2.print("yyyy"+separator+"mm")):(obj.mycalendarPageType="d",obj.mycalendar1.printDayPage(myDate1),obj.mycalendar2.printDayPage(myDate2),printDate1=myDate1.print("yyyy"+separator+"mm"+separator+"dd"),printDate2=myDate2.print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime&&(printDate1+=" "+myDate1.print("hh:mi"),printDate2+=" "+myDate2.print("hh:mi"))),obj.config.expandSetValue&&(axdom("#"+obj.config.startTargetID).val(printDate1),axdom("#"+objID).val(printDate2));var expandBox=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox"),expBoxWidth=expandBox.outerWidth(),expBoxHeight=expandBox.outerHeight(),offset=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_dateHandle").offset(),handleWidth=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_dateHandle").width(),css=(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_dateHandle").height(),{});"left"==obj.config.align?css.left=offset.left.number()-expBoxWidth:"center"==obj.config.align?css.left=offset.left.number()-expBoxWidth/2+handleWidth:"right"==obj.config.align?css.left=offset.left.number()+handleWidth:css.left=offset.left.number()+handleWidth,"top"==obj.config.valign?css.top=offset.top:"middle"==obj.config.valign?css.top=offset.top.number()-expBoxHeight/2+handleWidth/2:"bottom"==obj.config.valign?css.top=offset.top.number()-expBoxHeight+handleWidth:css.top=offset.top,void 0!=obj.config.customPos&&(css.top=css.top+obj.config.customPos.top,css.left=css.left+obj.config.customPos.left);var pElement=expandBox.offsetParent(),pBox={width:pElement.width(),height:pElement.height()},clientHeight="Q"==AXUtil.docTD?document.body.scrollHeight:document.documentElement.scrollHeight,clienWidth="Q"==AXUtil.docTD?document.body.scrollWidth:document.documentElement.scrollWidth;clienWidth>pBox.width&&(pBox.width=clienWidth),clientHeight>pBox.height&&(pBox.height=clientHeight);var _box={width:expandBox.outerWidth()+10,height:expandBox.outerHeight()+10};_box.height.number()+css.top.number()>pBox.height&&(css.top=css.top-(_box.height.number()+css.top.number()-pBox.height)),css.top<0&&(css.top=0),_box.width.number()+css.left.number()>pBox.width&&(css.left=css.left-(_box.width.number()+css.left.number()-pBox.width)),css.left<0&&(css.left=0),expandBox.css(css),obj.expandBox_axdom=expandBox;var bindTwinDateExpandBoxClick=this.bindTwinDateExpandBoxClick.bind(this);obj.documentclickEvent=function(event){bindTwinDateExpandBoxClick(objID,objSeq,event)};var bindTwinDateKeyup=this.bindTwinDateKeyup.bind(this);obj.inputKeyup=function(event){bindTwinDateKeyup(objID,objSeq,event)},"y"==obj.config.selectType&&(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlYear1").css({left:"70px"}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlMonth1").hide(),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlYear2").css({left:"70px"}),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlMonth2").hide()),axdom(document).unbind("click.AXInput").bind("click.AXInput",obj.documentclickEvent),axdom("#"+objID).unbind("keydown.AXInput").bind("keydown.AXInput",obj.inputKeyup);var bindTwinDateExpandClose=this.bindTwinDateExpandClose.bind(this);axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_closeButton").unbind("click.AXInput").bind("click.AXInput",function(event){bindTwinDateExpandClose(objID,objSeq,event)})},bindTwinDateTimeChange:function(objID,objSeq,myTime,seq){var obj=this.objects[objSeq];this.config;if(1==seq){var separator=obj.config.separator||AXConfig.AXInput.dateSeparator||"-",printDate=obj.nDate1.print("yyyy"+separator+"mm"+separator+"dd");obj.config.expandTime&&(printDate+=" "+obj.mycalendartime1.getTime()),axdom("#"+obj.config.startTargetID).val(printDate)}else{var separator=obj.config.separator||AXConfig.AXInput.dateSeparator||"-",printDate=obj.nDate2.print("yyyy"+separator+"mm"+separator+"dd");obj.config.expandTime&&(printDate+=" "+obj.mycalendartime2.getTime()),axdom("#"+objID).val(printDate)}},bindTwinDateExpandClose:function(objID,objSeq,event){var obj=this.objects[objSeq],cfg=this.config;if(AXgetId(cfg.targetID+"_AX_"+objID+"_AX_expandBox")){var objVal1=axdom("#"+obj.config.startTargetID).val(),objVal2=axdom("#"+objID).val(),separator=obj.config.separator||AXConfig.AXInput.dateSeparator||"-";return""==objVal1&&""==objVal2||("y"==obj.config.selectType?(objVal1.length<4?axdom("#"+obj.config.startTargetID).val(obj.nDate1.print("yyyy")):(objVal1=objVal1.left(4),axdom("#"+obj.config.startTargetID).val(objVal1),axdom("#"+obj.config.startTargetID).trigger("change")),objVal2.length<4?axdom("#"+objID).val(obj.nDate2.print("yyyy")):(objVal2=objVal2.left(4),axdom("#"+objID).val(objVal2),axdom("#"+objID).trigger("change"))):"m"==obj.config.selectType?(axdom("#"+obj.config.startTargetID).val(obj.nDate1.print("yyyy"+separator+"mm")),axdom("#"+obj.config.startTargetID).trigger("change"),axdom("#"+objID).val(obj.nDate2.print("yyyy"+separator+"mm")),axdom("#"+objID).trigger("change")):(printDate1=obj.nDate1.print("yyyy"+separator+"mm"+separator+"dd"),printDate2=obj.nDate2.print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime&&(printDate1+=" "+obj.mycalendartime1.getTime(),printDate2+=" "+obj.mycalendartime2.getTime()),axdom("#"+obj.config.startTargetID).val(printDate1),axdom("#"+objID).val(printDate2),axdom("#"+obj.config.startTargetID).trigger("change"),axdom("#"+objID).trigger("change")),obj.config.onChange||(obj.config.onChange=obj.config.onchange),obj.config.onChange&&obj.config.onChange.call({ST_objID:obj.config.startTargetID,ED_objID:objID,ST_value:axdom("#"+obj.config.startTargetID).val(),ED_value:axdom("#"+objID).val()}),obj.bindTarget||(obj.bindTarget=axdom("#"+objID)),obj.bindTarget.trigger("change")),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").remove(),obj.expandBox_axdom=null,axdom(document).unbind("click.AXInput"),axdom("#"+objID).unbind("keydown.AXInput"),void event.stopPropagation()}},bindTwinDateExpandBoxClick:function(objID,objSeq,event){var obj=this.objects[objSeq],cfg=this.config,isDateClick=!1,eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,until:function(evt,evtIDs){return"body"==evt.parentNode.tagName},find:function(evt,evtIDs){return""==evt.id||null==evt.id||void 0==evt.id?!1:evt.id==objID||evt.id==obj.config.startTargetID||evt.id.substr(0,cfg.targetID.length)==cfg.targetID&&(-1!=evt.id.search(objID)||-1!=evt.id.search(obj.config.startTargetID))}});if(isDateClick=!!myTarget){if(axdom(myTarget).hasClass("disabled"))return;var ids=myTarget.id.split(/_AX_/g),ename=ids.last(),boxType=ids[ids.length-3],nDate1=obj.nDate1,nDate2=obj.nDate2,separator=obj.config.separator||AXConfig.AXInput.dateSeparator||"-";if("expandPrev1"==ename)"d"==obj.mycalendarPageType?this.bindTwinDateChangePage(objID,objSeq,1,nDate1.add(-1,"m"),"d"):"m"==obj.mycalendarPageType?this.bindTwinDateChangePage(objID,objSeq,1,nDate1.add(-1,"y"),"m"):"y"==obj.mycalendarPageType&&this.bindTwinDateChangePage(objID,objSeq,1,nDate1.add(-12,"y"),"y");else if("expandPrev2"==ename)"d"==obj.mycalendarPageType?this.bindTwinDateChangePage(objID,objSeq,2,nDate2.add(-1,"m"),"d"):"m"==obj.mycalendarPageType?this.bindTwinDateChangePage(objID,objSeq,2,nDate2.add(-1,"y"),"m"):"y"==obj.mycalendarPageType&&this.bindTwinDateChangePage(objID,objSeq,2,nDate2.add(-12,"y"),"y");else if("expandNext1"==ename)"d"==obj.mycalendarPageType?this.bindTwinDateChangePage(objID,objSeq,1,nDate1.add(1,"m"),"d"):"m"==obj.mycalendarPageType?this.bindTwinDateChangePage(objID,objSeq,1,nDate1.add(1,"y"),"m"):"y"==obj.mycalendarPageType&&this.bindTwinDateChangePage(objID,objSeq,1,nDate1.add(12,"y"),"y");else if("expandNext2"==ename)"d"==obj.mycalendarPageType?this.bindTwinDateChangePage(objID,objSeq,2,nDate2.add(1,"m"),"d"):"m"==obj.mycalendarPageType?this.bindTwinDateChangePage(objID,objSeq,2,nDate2.add(1,"y"),"m"):"y"==obj.mycalendarPageType&&this.bindTwinDateChangePage(objID,objSeq,2,nDate2.add(12,"y"),"y");else if("controlYear1"==ename)this.bindTwinDateChangePage(objID,objSeq,1,nDate1,"y");else if("controlYear2"==ename)this.bindTwinDateChangePage(objID,objSeq,2,nDate2,"y");else if("controlMonth1"==ename)"y"!=obj.config.selectType&&this.bindTwinDateChangePage(objID,objSeq,1,nDate1,"m");else if("controlMonth2"==ename)"y"!=obj.config.selectType&&this.bindTwinDateChangePage(objID,objSeq,2,nDate2,"m");else if("date"==ename){if("displayBox1"==boxType){obj.nDate1=ids[ids.length-2].date();var printDate=obj.nDate1.print("yyyy"+separator+"mm"+separator+"dd");obj.config.expandTime&&(printDate+=" "+obj.mycalendartime1.getTime()),axdom("#"+obj.config.startTargetID).val(printDate),obj.mycalendar1.dayPageSetDay(obj.nDate1)}else{obj.nDate2=ids[ids.length-2].date();var printDate=obj.nDate2.print("yyyy"+separator+"mm"+separator+"dd");obj.config.expandTime&&(printDate+=" "+obj.mycalendartime2.getTime()),axdom("#"+objID).val(printDate),obj.mycalendar2.dayPageSetDay(obj.nDate2)}if(obj.nDate1.diff(obj.nDate2)<0)if("displayBox1"==boxType){obj.nDate2=obj.nDate1;var printDate=obj.nDate2.print("yyyy"+separator+"mm"+separator+"dd");obj.config.expandTime&&(printDate+=" "+obj.mycalendartime2.getTime()),axdom("#"+objID).val(printDate),obj.mycalendar2.dayPageSetDay(obj.nDate2)}else{obj.nDate1=obj.nDate2;var printDate=obj.nDate1.print("yyyy"+separator+"mm"+separator+"dd");obj.config.expandTime&&(printDate+=" "+obj.mycalendartime1.getTime()),axdom("#"+obj.config.startTargetID).val(printDate),obj.mycalendar1.dayPageSetDay(obj.nDate1)}}else if("month"==ename){var myMonth=ids[ids.length-2].number()-1;if("displayBox1"==boxType)if("m"==obj.config.selectType){var yy=nDate1.getFullYear(),dd=nDate1.getDate();obj.nDate1=new Date(Date.UTC(yy,myMonth,dd));var printDate=obj.nDate1.print("yyyy"+separator+"mm");axdom("#"+obj.config.startTargetID).val(printDate),obj.mycalendar1.monthPageSetMonth(obj.nDate1)}else{var yy=nDate1.getFullYear(),dd=nDate1.getDate();obj.nDate1=new Date(Date.UTC(yy,myMonth,dd)),this.bindTwinDateChangePage(objID,objSeq,1,obj.nDate1,"d")}else if("m"==obj.config.selectType){var yy=nDate2.getFullYear(),dd=nDate2.getDate();obj.nDate2=new Date(Date.UTC(yy,myMonth,dd));var printDate=obj.nDate2.print("yyyy"+separator+"mm");axdom("#"+objID).val(printDate),obj.mycalendar2.monthPageSetMonth(obj.nDate2)}else{var yy=nDate2.getFullYear(),dd=nDate2.getDate();obj.nDate2=new Date(Date.UTC(yy,myMonth,dd)),this.bindTwinDateChangePage(objID,objSeq,2,obj.nDate2,"d")}if("m"==obj.config.selectType&&obj.nDate1.diff(obj.nDate2)<0){obj.nDate2=obj.nDate1;var printDate=obj.nDate2.print("yyyy"+separator+"mm");axdom("#"+objID).val(printDate),axdom("#"+obj.config.startTargetID).val(printDate),
  obj.mycalendar2.monthPageSetMonth(obj.nDate2)}}else if("year"==ename){var myYear=ids[ids.length-2];if("displayBox1"==boxType)if("y"==obj.config.selectType){var mm=nDate1.getMonth(),dd=nDate1.getDate();obj.nDate1=new Date(Date.UTC(myYear,mm,dd));var printDate=obj.nDate1.print("yyyy");axdom("#"+obj.config.startTargetID).val(printDate),obj.mycalendar1.yearPageSetYear(obj.nDate1)}else{var mm=nDate1.getMonth(),dd=nDate1.getDate();obj.nDate1=new Date(Date.UTC(myYear,mm,dd)),this.bindTwinDateChangePage(objID,objSeq,1,obj.nDate1,"m")}else if("y"==obj.config.selectType){var mm=nDate2.getMonth(),dd=nDate2.getDate();obj.nDate2=new Date(Date.UTC(myYear,mm,dd));var printDate=obj.nDate2.print("yyyy");axdom("#"+objID).val(printDate),obj.mycalendar2.yearPageSetYear(obj.nDate2)}else{var mm=nDate2.getMonth(),dd=nDate2.getDate();obj.nDate2=new Date(Date.UTC(myYear,mm,dd)),this.bindTwinDateChangePage(objID,objSeq,2,obj.nDate2,"m")}if("y"==obj.config.selectType&&obj.nDate1.print("yyyy").number()>obj.nDate2.print("yyyy").number()){obj.nDate2=obj.nDate1;var printDate=obj.nDate2.print("yyyy");axdom("#"+obj.config.startTargetID).val(printDate),axdom("#"+objID).val(printDate),obj.mycalendar2.yearPageSetYear(obj.nDate2)}}}else this.bindTwinDateExpandClose(objID,objSeq,event)},bindTwinDateKeyup:function(objID,objSeq,event){"y"==obj.config.selectType||"m"==obj.config.selectType},bindTwinDateChangePage:function(objID,objSeq,objType,setDate,pageType){var obj=this.objects[objSeq],cfg=this.config,separator=obj.config.separator||AXConfig.AXInput.dateSeparator||"-";if("m"==pageType)if(1==objType){obj.nDate1=setDate,obj.mycalendar1.printMonthPage(setDate);var myYear=setDate.getFullYear();axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlYear1").html(myYear+"년")}else{obj.nDate2=setDate,obj.mycalendar2.printMonthPage(setDate);var myYear=setDate.getFullYear();axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlYear2").html(myYear+"년")}else if("y"==pageType)if(1==objType){obj.nDate1=setDate,obj.mycalendar1.printYearPage(setDate.getFullYear());var myYear=setDate.getFullYear();axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlYear1").html(myYear+"년")}else{obj.nDate2=setDate,obj.mycalendar2.printYearPage(setDate.getFullYear());var myYear=setDate.getFullYear();axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlYear2").html(myYear+"년")}else if(1==objType){obj.nDate1=setDate,obj.mycalendar1.printDayPage(setDate);var myYear=setDate.getFullYear(),myMonth=(setDate.getMonth()+1).setDigit(2);axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlYear1").html(myYear+"년"),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlMonth1").html(myMonth+"월")}else{obj.nDate2=setDate,obj.mycalendar2.printDayPage(setDate);var myYear=setDate.getFullYear(),myMonth=(setDate.getMonth()+1).setDigit(2);axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlYear2").html(myYear+"년"),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_controlMonth2").html(myMonth+"월")}if(1==objType)if("y"==obj.config.selectType)axdom("#"+obj.config.startTargetID).val(obj.nDate1.print("yyyy"));else if("m"==obj.config.selectType)axdom("#"+obj.config.startTargetID).val(obj.nDate1.print("yyyy"+separator+"mm"));else{var printDate=obj.nDate1.print("yyyy"+separator+"mm"+separator+"dd");obj.config.expandTime&&(printDate+=" "+obj.mycalendartime1.getTime()),axdom("#"+obj.config.startTargetID).val(printDate)}else if("y"==obj.config.selectType)axdom("#"+objID).val(obj.nDate2.print("yyyy"));else if("m"==obj.config.selectType)axdom("#"+objID).val(obj.nDate2.print("yyyy"+separator+"mm"));else{var printDate=obj.nDate2.print("yyyy"+separator+"mm"+separator+"dd");obj.config.expandTime&&(printDate+=" "+obj.mycalendartime2.getTime()),axdom("#"+objID).val(printDate)}},bindTwinDateInputBlur:function(objID,objSeq,event,seq){var objVal,targetObjID,obj=this.objects[objSeq];this.config;if(1==seq?(targetObjID=obj.config.startTargetID,objVal=axdom("#"+obj.config.startTargetID).val()):(targetObjID=objID,objVal=axdom("#"+objID).val()),""==objVal);else{var clearDate=!1,nDate=obj["nDate"+seq]||new Date,va=axdom("#"+targetObjID).val().replace(/\D/gi,"");if(-1==va.search(/\d+/g)&&(clearDate=!0),clearDate)axdom("#"+targetObjID).val("");else{var separator=obj.config.separator||AXConfig.AXInput.dateSeparator||"-";if("y"==obj.config.selectType){var yy=va.left(4).number();0==yy&&(yy=nDate.getFullYear()),1e3>yy&&(yy+=2e3);var mm=nDate.getMonth(),dd=nDate.getDate();obj["nDate"+seq]=new Date(Date.UTC(yy,mm,dd,12)),axdom("#"+targetObjID).val(obj["nDate"+seq].print("yyyy"))}else if("m"==obj.config.selectType){if(va.length>5)var yy=va.left(4).number(),mm=va.substr(4,2).number()-1,dd=1;else var yy=va.left(4).number(),mm=0,dd=1;0==yy&&(yy=nDate.getFullYear()),1e3>yy&&(yy+=2e3),obj["nDate"+seq]=new Date(Date.UTC(yy,mm,dd,12)),axdom("#"+targetObjID).val(obj["nDate"+seq].print("yyyy"+separator+"mm"))}else{var yy,mm,dd,hh,mi,needAlert=!1;if(va.length>7?(yy=va.left(4).number(),mm=va.substr(4,2).number()-1,dd=va.substr(6,2).number()):va.length>4?(yy="20"+va.substr(0,2),mm=va.substr(2,2).number()-1,dd=va.substr(4,2).number()):va.length>2?(yy=nDate.getFullYear(),mm=va.substr(0,2).number()-1,dd=va.substr(2,2).number()):(yy=nDate.getFullYear(),mm=nDate.getMonth(),dd=va.substr(0,2).number()),va.length>=9?(hh=va.substr(8,2).number(),mi=va.substr(10,2).number()):(hh="00",mi="00"),0==yy&&(needAlert=!0),0==yy&&(yy=nDate.getFullYear()),1e3>yy&&(yy+=2e3),obj["nDate"+seq]=new Date(Date.UTC(yy,mm,dd,12)),obj["nDate"+seq].getFullYear()==yy.number()&&obj["nDate"+seq].getMonth()==mm.number()&&obj["nDate"+seq].getDate()==dd.number()||(needAlert=!0,obj["nDate"+seq]=new Date),printDate=obj["nDate"+seq].print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime&&(printDate+=" "+hh.setDigit(2)+":"+mi.setDigit(2)),needAlert&&this.msgAlert("날짜 형식이 올바르지 않습니다."),axdom("#"+targetObjID).val(printDate),void 0==obj.nDate1){var va=axdom("#"+obj.config.startTargetID).val().replace(/\D/gi,"");if(-1!=va.search(/\d+/g)){if(va.length>7)var yy=va.left(4).number(),mm=va.substr(4,2).number()-1,dd=va.substr(6,2).number();else if(va.length>5)var yy=va.left(4).number(),mm=va.substr(4,2).number()-1,dd=1;else var yy=va.left(4).number(),mm=nDate.getMonth(),dd=nDate.getDate();0==yy&&(needAlert=!0),0==yy&&(yy=nDate.getFullYear()),1e3>yy&&(yy+=2e3),obj.nDate1=new Date(Date.UTC(yy,mm,dd,12))}}void 0==obj.nDate2&&(obj.nDate2=obj.nDate1,printDate=obj.nDate2.print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime&&obj.mycalendartime2&&(printDate+=" "+obj.mycalendartime2.getTime()),axdom("#"+objID).val(printDate)),obj.nDate1.diff(obj.nDate2)<0&&(1==seq?(obj.nDate2=obj.nDate1,printDate=obj.nDate2.print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime&&obj.mycalendartime2&&(printDate+=" "+obj.mycalendartime2.getTime()),axdom("#"+objID).val(printDate)):(obj.nDate1=obj.nDate2,printDate=obj.nDate1.print("yyyy"+separator+"mm"+separator+"dd"),obj.config.expandTime&&obj.mycalendartime1&&(printDate+=" "+obj.mycalendartime1.getTime()),axdom("#"+obj.config.startTargetID).val(printDate)))}}}obj.config.onChange||(obj.config.onChange=obj.config.onchange),obj.config.onChange&&obj.config.onChange.call({event:event,ST_objID:obj.config.startTargetID,ED_objID:objID,ST_value:axdom("#"+obj.config.startTargetID).val(),ED_value:axdom("#"+objID).val()}),event.stopPropagation()},bindChecked:function(objID,objSeq){var cfg=this.config,_this=this,obj=this.objects[objSeq];obj.bindAnchorTarget||(obj.bindAnchorTarget=axdom("#"+cfg.targetID+"_AX_"+objID)),obj.bindTarget||(obj.bindTarget=axdom("#"+objID)),obj.bindTarget.css({opacity:0});var anchorHandle,h=obj.bindAnchorTarget.data("height"),marginWidth=obj.bindTarget.css("margin-left").number()+obj.bindTarget.css("margin-right").number(),marginHeight=obj.bindTarget.css("margin-top").number()+obj.bindTarget.css("margin-bottom").number(),chk_size=Math.max(h+marginWidth,h+marginHeight)-1,left=(obj.bindTarget.css("margin-left").number()-obj.bindTarget.css("margin-right").number()).abs(),linked_items=[],onchange=function(e){if(obj.bindTarget.get(0).checked?anchorHandle.addClass("checked"):anchorHandle.removeClass("checked"),linked_items.length>0)for(var li=0;li<linked_items.length;li++){var aHandle=jQuery(linked_items[li]).next().find("."+cfg.anchorCheckedContainerClassName+"_radio");linked_items[li].checked?aHandle.addClass("checked"):aHandle.removeClass("checked")}},po=[];if(po.push('<div id="'+cfg.targetID+"_AX_"+objID+'_AX_HandleContainer"'),"radio"==obj.bindTarget.attr("type")?po.push(' class="'+cfg.anchorCheckedContainerClassName+'_radio" '):po.push(' class="'+cfg.anchorCheckedContainerClassName+'" '),po.push(' style="left:'+left+"px;top:0px;width:"+chk_size+"px;height:"+chk_size+'px;"'),po.push(' onselectstart="return false;">'),po.push('<a class="checked-icon"></a>'),po.push("</div>"),obj.bindAnchorTarget.append(po.join("")),obj.bindAnchorTarget.show(),anchorHandle="radio"==obj.bindTarget.attr("type")?obj.bindAnchorTarget.find("."+cfg.anchorCheckedContainerClassName+"_radio"):obj.bindAnchorTarget.find("."+cfg.anchorCheckedContainerClassName),obj.bindTarget.unbind("change.AXInput").bind("change.AXInput",onchange),anchorHandle.bind("click",function(e){obj.bindTarget.get(0).checked=!obj.bindTarget.get(0).checked,obj.bindTarget.trigger("change"),_this.stopEvent(e)}),"radio"==obj.bindTarget.attr("type")){var nm=obj.bindTarget.attr("name");jQuery("input[name="+nm+"]").each(function(){objID!=this.id&&linked_items.push(this)})}onchange()}}),AXInput=new AXInputConverter;AXInput.setConfig({targetID:"inputBasic",href:AXConfig.anchorHref}),axdom.fn.unbindInput=function(config){return axf.each(this,function(){void 0==config&&(config={}),config.id=this.id,AXInput.unbind(config)}),this},axdom.fn.bindSearch=function(config){return axf.each(this,function(){this.id||(this.id="AXInput-"+axf.getUniqueId()),void 0==config&&(config={}),config.id=this.id,config.bindType="search",AXInput.bind(config)}),this},axdom.fn.bindNumber=function(config){return axf.each(this,function(){this.id||(this.id="AXInput-"+axf.getUniqueId()),config=config||{},config.id=this.id,config.bindType="number",config.href=AXConfig.anchorHref,AXInput.bind(config)}),this},axdom.fn.bindMoney=function(config){return axf.each(this,function(){this.id||(this.id="AXInput-"+axf.getUniqueId()),config=config||{},config.id=this.id,config.bindType="money",AXInput.bind(config)}),this},axdom.fn.bindSelector=function(config){return axf.each(this,function(){this.id||(this.id="AXInput-"+axf.getUniqueId()),config=config||{},config.id=this.id,config.bindType="selector",config.href=AXConfig.anchorHref,AXInput.bind(config)}),this},axdom.fn.bindSelectorBlur=function(config){return axf.each(this,function(){AXInput.bindSelectorBlur(this.id)}),this},axdom.fn.bindSlider=function(config){return axf.each(this,function(){this.id||(this.id="AXInput-"+axf.getUniqueId()),config=config||{},config.id=this.id,config.bindType="slider",AXInput.bind(config)}),this},axdom.fn.bindTwinSlider=function(config){return axf.each(this,function(){this.id||(this.id="AXInput-"+axf.getUniqueId()),config=config||{},config.id=this.id,config.bindType="twinSlider",AXInput.bind(config)}),this},axdom.fn.bindSwitch=function(config){axf.each(this,function(){return this.id||(this.id="AXInput-"+axf.getUniqueId()),config=config||{},config.id=this.id,config.bindType="switch",AXInput.bind(config),this})},axdom.fn.bindSegment=function(config){return axf.each(this,function(){this.id||(this.id="AXInput-"+axf.getUniqueId()),config=config||{},config.id=this.id,config.bindType="segment",AXInput.bind(config)}),this},axdom.fn.bindDate=function(config){return axf.each(this,function(){this.id||(this.id="AXInput-"+axf.getUniqueId()),config=config||{},config.id=this.id,config.bindType="date",config.href=AXConfig.anchorHref,AXInput.bind(config)}),this},axdom.fn.unbindDate=function(config){return axf.each(this,function(){config=config||{},config.id=this.id,AXInput.unbindDate(config)}),this},axdom.fn.bindDateTime=function(config){return axf.each(this,function(){this.id||(this.id="AXInput-"+axf.getUniqueId()),config=config||{},config.id=this.id,config.bindType="date",config.expandTime=!0,AXInput.bind(config)}),this},axdom.fn.bindTwinDate=function(config){return axf.each(this,function(){this.id||(this.id="AXInput-"+axf.getUniqueId()),config=config||{},config.id=this.id,config.bindType="twinDate",config.href=AXConfig.anchorHref,AXInput.bind(config)}),this},axdom.fn.bindTwinDateTime=function(config){return axf.each(this,function(){this.id||(this.id="AXInput-"+axf.getUniqueId()),config=config||{},config.id=this.id,config.bindType="twinDateTime",config.expandTime=!0,config.href=AXConfig.anchorHref,AXInput.bind(config)}),this},axdom.fn.bindPlaceHolder=function(config){return axf.each(this,function(){this.id||(this.id="AXInput-"+axf.getUniqueId()),config=config||{},config.id=this.id,config.bindType="placeHolder",config.href=AXConfig.anchorHref,AXInput.bind(config)}),this},axdom.fn.bindChecked=function(config){return axf.each(this,function(){config=config||{},config.id=this.id||(this.id="axchecked-"+axf.getUniqueId()),config.bindType="checked",AXInput.bind(config)}),this},axdom.fn.setConfigInput=function(config){return axf.each(this,function(){AXInput.bindSetConfig(this.id,config)}),this},axdom.fn.setValueInput=function(value){return axf.each(this,function(){AXInput.bindSetValue(this.id,value)}),this},jQuery.fn.bindInputDisabled=function(Disabled){return axf.each(this,function(){AXInput.bindInputDisabled(this.id,Disabled)}),this};var AXInputConverterPro=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.objects=[],this.inputTypes=[{type:"pattern",type:"tagSelector"}],this.config.anchorClassName="AXanchor",this.config.anchorSelectorExpandBoxClassName="AXanchorSelectorExpandBox",this.config.anchorSelectorExpandScrollClassName="AXanchorSelectorExpandScroll",this.config.responsiveMobile=AXConfig.mobile.responsiveWidth},init:function(){axdom(window).resize(this.alignAllAnchor.bind(this)),this.config.reserveKeys={options:AXConfig.AXInput&&AXConfig.AXInput.keyOptions||"options",optionValue:AXConfig.AXInput&&AXConfig.AXInput.keyOptionValue||"optionValue",optionText:AXConfig.AXInput&&AXConfig.AXInput.keyOptionText||"optionText"}},windowResize:function(){var windowResizeApply=this.windowResizeApply.bind(this);this.windowResizeObserver&&clearTimeout(this.windowResizeObserver),this.windowResizeObserver=setTimeout(function(){windowResizeApply()},10)},windowResizeApply:function(){this.windowResizeObserver&&clearTimeout(this.windowResizeObserver),this.alignAllAnchor()},alignAllAnchor:function(){for(var i=0;i<this.objects.length;i++)this.alignAnchor(this.objects[i].id,i)},bindSetConfig:function(objID,configs){var findIndex=null;if(axf.each(this.objects,function(index,O){return O.id==objID?(findIndex=index,!1):void 0}),null!=findIndex){var _self=this.objects[findIndex];axf.each(configs,function(k,v){_self.config[k]=v})}},bind:function(obj){var cfg=this.config;if(!AXgetId(obj.id))return void trace("bind 대상이 없어 bind 처리할 수 없습니다.");for(var objID=obj.id,objSeq=null,index=0;index<this.objects.length;index++)if(this.objects[index].id==objID){objSeq=index;break}void 0==obj.href&&(obj.href=cfg.href),null==objSeq?(objSeq=this.objects.length,this.objects.push({id:objID,anchorID:cfg.targetID+"_AX_"+objID,config:obj,bindType:obj.bindType})):(this.objects[objSeq].isDel=void 0,this.objects[objSeq].config=obj),"checked"!=obj.bindType&&this.appendAnchor(objID,objSeq,obj.bindType),"null"==obj.bindType||("pattern"==obj.bindType?this.bindPattern(objID,objSeq):"tagSelector"==obj.bindType&&(this.objects[objSeq].config.reserveKeys||(this.objects[objSeq].config.reserveKeys=axdom.extend({},this.config.reserveKeys)),this.bindTagSelector(objID,objSeq)))},unbind:function(obj){var removeAnchorId,removeIdx,cfg=this.config;if(axf.each(this.objects,function(idx,O){O.id!=obj.id||1!=O.isDel&&(removeAnchorId=this.anchorID,removeIdx=idx)}),removeAnchorId){this.objects[removeIdx].isDel=!0,axdom("#"+obj.id).removeAttr("data-axbind"),axdom("#"+removeAnchorId).remove();var objID=obj.id,obj=this.objects[removeIdx];obj.documentclickEvent&&axdom(document).unbind("click.AXInput",obj.documentclickEvent),axdom("#"+objID).unbind("keydown.AXInput"),axdom("#"+objID).unbind("keydown.AXInputCheck"),axdom("#"+objID).unbind("change.AXInput"),obj.bindSliderMouseMove&&axdom(document.body).unbind("mousemove.AXInput",obj.bindSliderMouseMove),obj.bindSliderMouseUp&&axdom(document.body).unbind("mouseup.AXInput",obj.bindSliderMouseUp),obj.bindSliderTouchMove&&document.removeEventListener("touchmove.AXInput",obj.bindSliderTouchMove,!1),obj.bindSliderTouchEnd&&document.removeEventListener("touchend.AXInput",obj.bindSliderTouchEnd,!1),obj.bindTwinSliderMouseMove&&axdom(document.body).unbind("mousemove.AXInput",obj.bindTwinSliderMouseMove),obj.bindTwinSliderMouseUp&&axdom(document.body).unbind("mouseup.AXInput",obj.bindTwinSliderMouseUp),AXgetId(cfg.targetID+"_AX_"+objID+"_AX_expandBox")&&(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").remove(),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_Handle").removeClass("on"))}},appendAnchor:function(objID,objSeq,bindType){var cfg=this.config,obj=this.objects[objSeq];axdom("#"+cfg.targetID+"_AX_"+objID).remove();var anchorNode=axdom('<div id="'+cfg.targetID+"_AX_"+objID+'" class="'+cfg.anchorClassName+'" style="display:none;"></div>'),iobj=axdom("#"+objID);iobj.attr("data-axbind",bindType),iobj.after(anchorNode),obj.bindAnchorTarget=axdom("#"+cfg.targetID+"_AX_"+objID),obj.bindTarget=iobj;var iobjPosition=iobj.position(),l=iobjPosition.left,t=iobjPosition.top,w=0,h=0,marginW=(iobj.css("border-left-width").number(),iobj.css("border-top-width").number(),iobj.css("margin-left").number());iobj.css("margin-top").number();l+=marginW,w=iobj.outerWidth(),h=iobj.outerHeight();var css={left:l,top:t,width:w,height:0};obj.bindAnchorTarget.css(css),obj.bindAnchorTarget.data("height",h);var _this=this;setTimeout(function(){_this.alignAnchor(objID,objSeq)},10)},alignAnchor:function(objID,objSeq){var obj=(this.config,this.objects[objSeq]);if(AXgetId(objID))if("tagSelector"==obj.bindType)obj.tagList.length>0&&obj.bindTarget.css({"padding-top":obj.tagContainer.height()});else{var iobjPosition=obj.bindTarget.position(),l=iobjPosition.left,t=iobjPosition.top,w=obj.bindTarget.outerWidth(),h=obj.bindTarget.outerHeight();if("none"==obj.bindTarget.css("display")){h=obj.bindAnchorTarget.data("height");var css={width:w}}else var css={left:l,top:t,width:w,height:0};obj.bindAnchorTarget.css(css),obj.bindAnchorTarget.data("height",h),"null"==obj.bindType||"pattern"==obj.bindType}},bindPattern:function(objID,objSeq){var obj=this.objects[objSeq],cfg=this.config,_this=this;if(obj.bindAnchorTarget||(obj.bindAnchorTarget=axdom("#"+cfg.targetID+"_AX_"+objID)),obj.bindTarget||(obj.bindTarget=axdom("#"+objID)),"_custom"==obj.config.pattern){var h=obj.bindAnchorTarget.data("height");obj.bindAnchorTarget.css({height:h});var po=[],inputCoverClass=obj.bindTarget.attr("class"),inputCoverFont=obj.bindTarget.css("font-family");po.push('<div id="'+cfg.targetID+"_AX_"+objID+'_AX_inputCover" class="'+inputCoverClass+'" style="background:transparent;cursor:text;font-family:'+inputCoverFont+';white-space:nowrap;"></div>'),obj.bindAnchorTarget.append(po.join("")),obj.bindAnchorTarget.show(),obj.bindTarget.css({color:obj.bindTarget.css("background-color")}),obj.bindTargetCover=obj.bindAnchorTarget.find("#"+cfg.targetID+"_AX_"+objID+"_AX_inputCover"),obj.bindTargetCover.bind("click",function(){obj.bindTarget.focus()});var val=obj.bindTarget.val().trim();return""!=val&&(val=this.bindPatternGetValue(objID,objSeq,obj.bindTarget.val())),obj.bindTarget.val(val),obj.bindTarget.attr("onselectstart","return false"),obj.bindTarget.unbind("keypress.AXInput").bind("keypress.AXInput",function(event){}),obj.bindTarget.unbind("keyup.AXInput").bind("keyup.AXInput",function(event){obj.bindTargetCover.html(_this.bindPatternGetValue(objID,objSeq,event.target.value)+"<div class='edit-input-cursor'>|</div>")}),obj.bindTarget.unbind("focus.AXInput").bind("focus.AXInput",function(event){obj.bindTargetCover.html(_this.bindPatternGetValue(objID,objSeq,event.target.value)+"<div class='edit-input-cursor'>|</div>")}),void obj.bindTarget.unbind("blur.AXInput").bind("blur.AXInput",function(event){obj.bindTargetCover.find(".edit-input-cursor").remove()})}if("_custom"==obj.config.pattern)return obj.bindTarget.unbind("keypress.AXInput").bind("keypress.AXInput",function(event){var elemFocusPosition,elemFocusEndPosition,elem=event.target;if("selectionStart"in elem)elemFocusPosition=elem.selectionStart,elemFocusEndPosition=elem.selectionEnd;else if(document.selection){var sel=document.selection.createRange(),selLen=document.selection.createRange().text.length;sel.moveStart("character",-elem.value.length),elemFocusPosition=sel.text.length-selLen,elemFocusEndPosition=elemFocusPosition+selLen}obj.DSP=elemFocusPosition,obj.DEP=elemFocusEndPosition,""==elem.value&&(obj.originalValue=""),obj.prevValue=event.target.value}),void obj.bindTarget.unbind("keyup.AXInput").bind("keyup.AXInput",function(event){var elemFocusPosition,elem=event.target;if("selectionStart"in elem)elemFocusPosition=elem.selectionStart,elemFocusEndPosition=elem.selectionEnd;else if(document.selection){var sel=document.selection.createRange(),selLen=document.selection.createRange().text.length;sel.moveStart("character",-elem.value.length),elemFocusPosition=sel.text.length-selLen,elemFocusEndPosition=elemFocusPosition+selLen}obj.USP=elemFocusPosition,obj.UEP=elemFocusEndPosition;var v1=elem.value,v2=obj.prevValue,editedText=(v2.substring(obj.DSP,obj.DEP),v1.substring(obj.DEP,obj.UEP));if(v1!=v2&&v1.length>v2.length)if(obj.DSP==obj.DEP&&obj.USP==obj.UEP&&obj.DSP+1==obj.USP){if(obj.USP==v1.length)obj.originalValue+=editedText;else if(obj.USP<v1.length){obj.originalValue=obj.originalValue.substring(0,obj.DEP)+editedText+obj.originalValue.substr(obj.DEP)}}else obj.USP==v1.length?obj.originalValue+=editedText:obj.USP<v1.length&&trace("중간에서 다중문자 타이핑");else v1!=v2&&v1.length<v2.length?obj.DSP==obj.DEP&&obj.USP==obj.UEP&&obj.DSP-1==obj.USP?obj.USP==v1.length?trace("끝에서 한글자 삭제"):obj.USP<v1.length&&trace("중간에서 한글자 삭제"):obj.USP==v1.length?trace("끝에서 다중문자 삭제"):obj.USP<v1.length&&trace("중간에서 다중문자 삭제"):obj.DSP==obj.DEP&&obj.USP==obj.UEP&&obj.DSP+1==obj.USP?trace("커서 우로 이동"):obj.DSP==obj.DEP&&obj.USP==obj.UEP&&obj.DSP==obj.USP+1?trace("커서 좌로 이동"):obj.DSP==obj.DEP&&obj.USP==obj.UEP&&obj.DSP==obj.USP&&trace("제자리")});var eventStop=function(event){return event.preventDefault&&event.preventDefault(),event.stopPropagation&&event.stopPropagation(),event.cancelBubble=!0,!1},bindPatternCheck=this.bindPatternCheck.bind(this),val=obj.bindTarget.val().trim();""!=val&&(val=this.bindPatternGetValue(objID,objSeq,obj.bindTarget.val(),"blur")),obj.bindTarget.val(val),obj.bindTarget.unbind("focus.AXInput").bind("focus.AXInput",function(event){"custom"==obj.config.pattern&&("undefined"==typeof obj.originalValue&&(obj.originalValue=event.target.value),event.target.value=_this.bindPatternGetValue(objID,objSeq,obj.originalValue,"keyup"))}),obj.bindTarget.unbind("keydown.AXInput").bind("keydown.AXInput",function(event){if(event.which&&(event.which>47&&event.which<58||event.which>36&&event.which<41||event.which>95&&event.which<106||event.which==axf.Event.KEY_BACKSPACE||event.which==axf.Event.KEY_TAB||event.which==axf.Event.KEY_RETURN||event.which==axf.Event.KEY_DELETE||event.which==axf.Event.NUMPAD_SUBTRACT||event.which==axf.Event.NUMPAD_DECIMAL||event.which==axf.Event.KEY_MINUS||event.which==axf.Event.KEY_EQUAL||event.which==axf.Event.KEY_PERIOD||event.which==axf.Event.KEY_HOME||event.which==axf.Event.KEY_END)){var isStop=!1;if(190!=event.which||"moneyint"!=obj.config.pattern&&"numberint"!=obj.config.pattern)if(event.which==axf.Event.KEY_MINUS||event.which==axf.Event.KEY_EQUAL||event.which==axf.Event.KEY_PERIOD)("money"!=obj.config.pattern&&"moneyint"!=obj.config.pattern&&"number"!=obj.config.pattern&&"numberint"!=obj.config.pattern||!obj.config.allow_minus)&&(isStop=!0);else if(event.which==axf.Event.KEY_BACKSPACE||event.which==axf.Event.KEY_TAB||event.which==axf.Event.KEY_RETURN||event.which==axf.Event.KEY_LEFT||event.which==axf.Event.KEY_RIGHT||event.which==axf.Event.KEY_DELETE||event.which==axf.Event.KEY_HOME||event.which==axf.Event.KEY_END)13==event.which&&obj.bindTarget.trigger("blur");else if("datetime"==obj.config.pattern.left(8))14==event.target.value.replace(/\D/g,"").length&&(isStop=!0);else if("date"==obj.config.pattern.left(4))8==event.target.value.replace(/\D/g,"").length&&(isStop=!0);else if("bizno"==obj.config.pattern)10==event.target.value.replace(/\D/g,"").length&&(isStop=!0);else if("money"==obj.config.pattern||"moneyint"==obj.config.pattern||"number"==obj.config.pattern||"numberint"==obj.config.pattern){if(Object.isNumber(obj.config.max_length)&&event.target.value.replace(/\D/g,"").length>=obj.config.max_length&&(isStop=!0),!isStop&&Object.isNumber(obj.config.max_round)){var dotIndex=0;(dotIndex=event.target.value.indexOf("."))>-1&&event.target.value.substr(dotIndex+1).length>=obj.config.max_round&&(isStop=!0)}}else Object.isNumber(obj.config.max_length)&&event.target.value.replace(/[^A-Za-z0-9]/g,"").length==obj.config.max_length.number()&&(isStop=!0);else isStop=!0;isStop&&eventStop(event)}else event.ctrlKey||event.metaKey?obj.bindTarget.data("ctrlKey","T"):(obj.bindTarget.data("ctrlKey","F"),eventStop(event))}),obj.bindTarget.unbind("keyup.AXInput").bind("keyup.AXInput",function(event){var elemFocusPosition,elem=obj.bindTarget.get(0);if("selectionStart"in elem)elemFocusPosition=elem.selectionStart;else if(document.selection){var sel=document.selection.createRange(),selLen=document.selection.createRange().text.length;sel.moveStart("character",-elem.value.length),elemFocusPosition=sel.text.length-selLen}obj.bindTarget.data("focusPosition",elemFocusPosition),obj.bindTarget.data("prevLen",elem.value.length);var event=window.event||event;event.keyCode&&event.keyCode!=axf.Event.KEY_TAB&&16!=event.keyCode&&17!=event.keyCode&&event.which!=axf.Event.KEY_HOME&&event.which!=axf.Event.KEY_END&&("T"!=obj.bindTarget.data("ctrlKey")||65!=event.keyCode&&91!=event.keyCode)&&(event.keyCode!=AXUtil.Event.KEY_DELETE&&event.keyCode!=AXUtil.Event.KEY_BACKSPACE&&event.keyCode!=AXUtil.Event.KEY_LEFT&&event.keyCode!=AXUtil.Event.KEY_RIGHT?bindPatternCheck(objID,objSeq,"keyup"):event.keyCode!=AXUtil.Event.KEY_DELETE&&event.keyCode!=AXUtil.Event.KEY_BACKSPACE||bindPatternCheck(objID,objSeq,"keyup"))}),obj.bindTarget.unbind("change.AXInput").bind("change.AXInput",function(event){}),obj.bindTarget.unbind("blur.AXInput").bind("blur.AXInput",function(event){bindPatternCheck(objID,objSeq,"blur")})},bindPatternCheck:function(objID,objSeq,eventType){var val,nval,obj=this.objects[objSeq];obj.config.onBlur||(obj.config.onBlur=obj.config.onBlur),obj.config.onChange||(obj.config.onChange=obj.config.onchange),"blur"==eventType?(val=obj.bindTarget.val(),nval=this.bindPatternGetValue(objID,objSeq,val,eventType),obj.bindTarget.val(nval),val!=nval&&obj.bindTarget.trigger("change"),Object.isFunction(obj.config.onBlur)&&obj.config.onBlur.call({objID:objID,objSeq:objSeq,value:nval})):(val=obj.bindTarget.val(),nval=this.bindPatternGetValue(objID,objSeq,val,eventType),obj.bindTarget.val(nval),val!=nval&&obj.bindTarget.trigger("change"),axf.isEmpty(obj.bindTarget.data("focusPosition"))||obj.bindTarget.setCaret(obj.bindTarget.data("focusPosition").number()+(obj.bindTarget.val().length-obj.bindTarget.data("prevLen"))),Object.isFunction(obj.config.onChange)&&obj.config.onChange.call({objID:objID,objSeq:objSeq,value:nval}))},bindPatternGetValue:function(objID,objSeq,val,eventType){var regExpPattern,obj=this.objects[objSeq],returnValue="",getFormatterDate=function(_val,_pattern,ynm,mnd,dnt,tnt){var returnValue="";if(""==_val);else if("blur"==eventType){var nDate=new Date,needAlert=!1;if(_val.length>7)var yy=_val.left(4).number(),mm=_val.substr(4,2).number()-1,dd=_val.substr(6,2).number();else if(_val.length>4)var yy="20"+_val.substr(0,2),mm=_val.substr(2,2).number()-1,dd=_val.substr(4,2).number();else if(_val.length>2)var yy=nDate.getFullYear(),mm=_val.substr(0,2).number()-1,dd=_val.substr(2,2).number();else var yy=nDate.getFullYear(),mm=nDate.getMonth(),dd=_val.substr(0,2).number();if(0==yy&&(needAlert=!0),0==yy&&(yy=nDate.getFullYear()),1e3>yy&&(yy+=2e3),nDate=new Date(yy,mm,dd,12),nDate.getFullYear()==yy.number()&&nDate.getMonth()==mm.number()&&nDate.getDate()==dd.number()||(needAlert=!0,nDate=new Date),printDate=nDate.print("yyyy"+ynm+"mm"+mnd+"dd")," "!=dnt&&(printDate+=dnt),"datetime"==_pattern.left(8)){" "==dnt&&(printDate+=dnt);var hh,mm,ss=null;_val.length>11?(hh=_val.substr(8,2).number().setDigit(2),mm=_val.substr(10,2).number().setDigit(2),ss=_val.substr(12,2).number().setDigit(2)):_val.length>8?(hh=_val.substr(8,2).number().setDigit(2),mm="00"):(hh="12",mm="00"),printDate+=hh+tnt+mm+function(){return null!=ss?tnt+ss:void 0}()}returnValue=printDate}else _val.length<5?returnValue=_val:_val.length<7?returnValue=_val.substr(0,4)+ynm+_val.substr(4):_val.length<9?(returnValue=_val.substr(0,4)+ynm+_val.substr(4,2)+mnd+_val.substr(6,2)," "!=dnt&&(returnValue+=dnt)):returnValue=_val.length<11&&"datetime"==_pattern.left(8)?_val.substr(0,4)+ynm+_val.substr(4,2)+mnd+_val.substr(6,2)+dnt+_val.substr(8,2):"datetime"==_pattern.left(8)?_val.substr(0,4)+ynm+_val.substr(4,2)+mnd+_val.substr(6,2)+dnt+_val.substr(8,2)+tnt+_val.substr(10,2)+function(){return""!=_val.substr(12,2)?tnt+_val.substr(12,2):""}():_val.substr(0,4)+ynm+_val.substr(4,2)+mnd+_val.substr(6,2);return returnValue},getNumberApplyConfig=function(_val,valType){if("float"==valType&&Object.isNumber(obj.config.max_round)){var dotIndex=0;(dotIndex=_val.indexOf("."))>-1&&(_val=_val.substring(0,dotIndex+1)+_val.substr(dotIndex+1).replace(/\D/g,"").left(obj.config.max_round))}var __val=_val.replace(/\D/g,"");return Object.isNumber(obj.config.max_length)&&__val.length>obj.config.max_length&&(_val=obj.config.allow_minus&&"-"==val.left(1)?"-"+__val.left(obj.config.max_length):__val.left(obj.config.max_length)),__val=null,_val},getFormatterTime=function(_val,_pattern,tnt){var returnValue="";if(""==_val);else if("blur"==eventType){new Date;if(_val.length>2)var hh=_val.substr(0,2).number(),mi=_val.substr(2,2).number();else if(_val.length>0)var hh=_val.substr(0,2).number(),mi=0;else var hh=0,mi=0;hh>23&&(hh=23),mi>59&&(mi=59),returnValue=hh.setDigit(2)+tnt+mi.setDigit(2)}else returnValue=_val.length<3?_val:_val.substr(0,2)+tnt+_val.substr(2,2);return returnValue};if("money"==obj.config.pattern||"moneyint"==obj.config.pattern||"number"==obj.config.pattern||"numberint"==obj.config.pattern){if("moneyint"==obj.config.pattern)val=val.replace(/[^0-9^\-]/g,""),"blur"==eventType&&(val=getNumberApplyConfig(val,"int")),returnValue=""==val?"":Math.ceil(val).money();else if("money"==obj.config.pattern){val=val.replace(/[^0-9^\.^\-]/g,""),"blur"==eventType&&(val=getNumberApplyConfig(val,"float")),regExpPattern=new RegExp("([0-9])([0-9][0-9][0-9][,.])");var arrNumber=val.split(".");arrNumber[0]+=".";do arrNumber[0]=arrNumber[0].replace(regExpPattern,"$1,$2");while(regExpPattern.test(arrNumber[0]));returnValue=arrNumber.length>1?Object.isNumber(obj.config.max_round)?arrNumber[0]+arrNumber[1].left(obj.config.max_round):arrNumber.join(""):arrNumber[0].split(".")[0],"blur"==eventType&&"."==returnValue.right(1)&&(returnValue=returnValue.replace(/\./g,""))}else if("numberint"==obj.config.pattern)val=val.replace(/[^0-9^\-]/g,""),"blur"==eventType&&(val=getNumberApplyConfig(val,"int")),returnValue=""==val?"":Math.ceil(val);else if("number"==obj.config.pattern){val=val.replace(/[^0-9^\.^\-]/g,""),"blur"==eventType&&(val=getNumberApplyConfig(val,"float"));var arrNumber=val.split(".");arrNumber[0]+=".",returnValue=arrNumber.length>1?Object.isNumber(obj.config.max_round)?arrNumber[0]+arrNumber[1].left(obj.config.max_round):arrNumber.join(""):arrNumber[0].split(".")[0],"blur"==eventType&&"."==returnValue.right(1)&&(returnValue=returnValue.replace(/\./g,""));
  }returnValue=obj.config.allow_minus?returnValue.toString().substring(0,1)+returnValue.toString().substr(1).replace(/\-/g,""):returnValue.toString().replace(/\-/g,"")}else if("bizno"==obj.config.pattern)val=val.replace(/\D/g,""),regExpPattern=/^([0-9]{3})\-?([0-9]{1,2})?\-?([0-9]{1,5})?.*$/,returnValue=val.replace(regExpPattern,function(a,b){var nval=[arguments[1]];return arguments[2]&&nval.push(arguments[2]),arguments[3]&&nval.push(arguments[3]),nval.join("-")});else if("phone"==obj.config.pattern){val=val.replace(/\D/g,""),regExpPattern=/^(010|011|016|017|018|019)(\d+)*$/;var regExpPattern2=/^(070|080|060|050|02|031|032|033|041|042|043|051|052|053|054|055|061|062|063|064)(\d+)*$/;if(regExpPattern.test(val))returnValue=val.replace(regExpPattern,function(a,b){var nval=[arguments[1]];return arguments[2]&&(arguments[2].length<4?nval.push(arguments[2]):arguments[2].length<8?nval.push(arguments[2].substring(0,3)+"-"+arguments[2].substr(3)):arguments[2].length>8?nval.push(arguments[2].substring(0,4)+"-"+arguments[2].substr(4,4)+", "+arguments[2].substr(8)):nval.push(arguments[2].substring(0,4)+"-"+arguments[2].substr(4,4))),nval.join("-")});else if(regExpPattern2.test(val))returnValue=val.replace(regExpPattern2,function(a,b){var nval=[arguments[1]];return arguments[2]&&(arguments[2].length<4?nval.push(arguments[2]):arguments[2].length<8?nval.push(arguments[2].substring(0,3)+"-"+arguments[2].substr(3)):arguments[2].length>8?nval.push(arguments[2].substring(0,4)+"-"+arguments[2].substr(4,4)+", "+arguments[2].substr(8)):nval.push(arguments[2].substring(0,4)+"-"+arguments[2].substr(4,4))),nval.join("-")});else{var regExpPattern3=/^([0-9]{3})\-?([0-9]{1,4})?\-?([0-9]{1,4})?\-?([0-9]{1,4})?\-?([0-9]{1,4})?/;returnValue=val.replace(regExpPattern3,function(a,b){var nval=[arguments[1]];return arguments[2]&&nval.push(arguments[2]),arguments[3]&&nval.push(arguments[3]),arguments[4]&&nval.push(arguments[4]),arguments[5]&&nval.push(arguments[5]),nval.join("-")})}}else if("date"==obj.config.pattern)val=val.replace(/\D/g,""),returnValue=getFormatterDate(val,obj.config.pattern,"-","-"," ",":");else if("date(/)"==obj.config.pattern)val=val.replace(/\D/g,""),returnValue=getFormatterDate(val,obj.config.pattern,"/","/"," ",":");else if("date(년월일)"==obj.config.pattern)val=val.replace(/\D/g,""),returnValue=getFormatterDate(val,obj.config.pattern,"년","월","일",":");else if("datetime"==obj.config.pattern)val=val.replace(/\D/g,""),returnValue=getFormatterDate(val,obj.config.pattern,"-","-"," ",":");else if("datetime(/)"==obj.config.pattern)val=val.replace(/\D/g,""),returnValue=getFormatterDate(val,obj.config.pattern,"/","/"," ",":");else if("datetime(년월일)"==obj.config.pattern)val=val.replace(/\D/g,""),returnValue=getFormatterDate(val,obj.config.pattern,"년","월","일","시");else if("time"==obj.config.pattern)val=val.replace(/\D/g,""),returnValue=getFormatterTime(val,obj.config.pattern,":");else{if("custom"==obj.config.pattern){val=val.replace(/[^0-9^a-z^A-Z]/g,"");var ess=val.split(""),pss=obj.config.patternString.split("");"blur"==eventType&&(obj.originalValue=val);for(var newText="",eidx=0,pidx=0;ess[eidx];)"9"==pss[pidx]?(newText+=ess[eidx].number(),pidx++,eidx++):"Z"==pss[pidx]?(newText+=ess[eidx]>0?ess[eidx]:"1",pidx++,eidx++):"X"==pss[pidx]?(newText+="blur"==eventType?"*":ess[eidx],pidx++,eidx++):"undefined"!=typeof pss[pidx]?(newText+=pss[pidx],pidx++):(newText+=ess[eidx],eidx++);return newText}returnValue=Object.isFunction(obj.config.pattern)?obj.config.pattern.call({val:val,objID:objID,config:obj.config},val):val}return returnValue},bindPatternGetText:function(objID,objSeq){if(!Object.isNumber(objSeq))for(var index=0;index<this.objects.length;index++)if(this.objects[index].id==objID){objSeq=index;break}if(Object.isNumber(objSeq)){var obj=this.objects[objSeq],val=obj.bindTarget.val(),returnValue="";return returnValue="moneyint"==obj.config.pattern?val.replace(/[\D]/g,""):"money"==obj.config.pattern?""==val?"":val.number():"bizno"==obj.config.pattern?val.replace(/\D/g,""):"phone"==obj.config.pattern?val.replace(/\D/g,""):"date"==obj.config.pattern||"date(/)"==obj.config.pattern||"date(년월일)"==obj.config.pattern?val.replace(/\D/g,""):"datetime"==obj.config.pattern||"datetime(/)"==obj.config.pattern||"datetime(년월일)"==obj.config.pattern?val.replace(/\D/g,""):"time"==obj.config.pattern?val.replace(/\D/g,""):"custom"==obj.config.pattern?obj.originalValue:Object.isFunction(obj.config.depattern)?obj.config.depattern.call({val:val,objID:objID,config:obj.config},val):val}},bindPatternGetDisplayText:function(objID,objSeq){if(!Object.isNumber(objSeq))for(var index=0;index<this.objects.length;index++)if(this.objects[index].id==objID){objSeq=index;break}if(Object.isNumber(objSeq)){var obj=this.objects[objSeq],val=obj.bindTarget.val(),returnValue="";return returnValue=Object.isFunction(obj.config.depattern)?obj.config.depattern.call({val:val,objID:objID,config:obj.config},val):val}},bindPatternSetText:function(objID,objSeq,val){if(!Object.isNumber(objSeq))for(var index=0;index<this.objects.length;index++)if(this.objects[index].id==objID){objSeq=index;break}if(Object.isNumber(objSeq)){var obj=this.objects[objSeq];obj.bindTarget.val(this.bindPatternGetValue(objID,objSeq,val,"blur")),obj.bindTarget.trigger("change")}},bindTagSelector:function(objID,objSeq){var po,h,_this=this,cfg=this.config,obj=this.objects[objSeq];obj.config.onchange||(obj.config.onchange=obj.config.onChange),obj.bindAnchorTarget||(obj.bindAnchorTarget=axdom("#"+cfg.targetID+"_AX_"+objID)),obj.bindTarget||(obj.bindTarget=axdom("#"+objID)),obj.bindTarget_paddingTop||(obj.bindTarget_paddingTop=obj.bindTarget.css("padding-top")),obj.bindTarget.css({"box-sizing":"content-box",padding:obj.bindTarget_paddingTop}),obj.tagList=[],obj.deletedTagList=[],obj.bindAnchorTarget.show(),h=obj.bindAnchorTarget.data("height")-2,po=[],po.push('<div id="'+cfg.targetID+"_AX_"+objID+'_AX_tagContainer" class="AXTag-selector-tagcontainer">'),po.push("</div>"),obj.bindAnchorTarget.html(po.join("")),obj.tagContainer=obj.bindAnchorTarget.find("#"+cfg.targetID+"_AX_"+objID+"_AX_tagContainer"),obj.tagContainer.bind("click",function(e){var event_type="";e=e||window.event;var target=axf.get_event_target(e.target,function(el){return axdom(el).hasClass("AXTag-selector-tagitem-remove")?(event_type="remove",!0):axdom(el).hasClass("AXTag-selector-tagitem")?(event_type="item",!0):void 0});target&&"remove"==event_type?this.bindTagSelector_removeItem(objID,objSeq,axdom(target).attr("data-tag-index")):target||obj.bindTarget.focus()}.bind(this)),obj.tagExpandBoxId=cfg.targetID+"_AX_"+objID+"_AX_expandBox",obj.bindTarget.unbind("focus.AXTagSelector").bind("focus.AXTagSelector",function(event){obj.keydownTimer&&clearTimeout(obj.keydownTimer),obj.keydownTimer=setTimeout(function(event){""!=event.target.value&&_this.bindTagSelector_onkeydown(event,objID,objSeq)}.bind(_this,event),100)}),obj.bindTarget.unbind("keydown.AXTagSelector").bind("keydown.AXTagSelector",function(event){return"disable"==obj.bindAnchorTarget.attr("disable")||"disable"==obj.bindTarget.attr("disable")?!1:(obj.keydownTimer&&clearTimeout(obj.keydownTimer),void(obj.keydownTimer=setTimeout(function(event){_this.bindTagSelector_onkeydown(event,objID,objSeq)}.bind(_this,event),100)))})},bindTagSelector_onkeydown:function(e,objID,objSeq){var po,anchorWidth,anchorHeight,styles,focusedIndex,_this=this,cfg=this.config,obj=this.objects[objSeq];if("keydown"==e.type){if(""==e.target.value&&e.keyCode==axf.Event.KEY_BACKSPACE)return obj.tagList.length>0&&(obj.ready_backspace?(this.bindTagSelector_removeItem(objID,objSeq,obj.tagList.length-1),this.bindTagSelector_close(objID,objSeq),obj.config.focusedIndex=void 0,delete obj.ready_backspace):obj.ready_backspace=!0),this;if(delete obj.ready_backspace,e.keyCode==axf.Event.KEY_RETURN||e.keyCode==axf.Event.KEY_DOWN||e.keyCode==axf.Event.KEY_UP)return AXgetId(obj.tagExpandBoxId)?(e.keyCode==axf.Event.KEY_RETURN?"undefined"!=typeof obj.config.focusedIndex&&(this.bindTagSelector_addItem(objID,objSeq,obj.config.focusedIndex),this.bindTagSelector_close(objID,objSeq),obj.config.focusedIndex=void 0):e.keyCode==axf.Event.KEY_DOWN?(focusedIndex=0,"undefined"!=typeof obj.config.focusedIndex&&(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_"+obj.config.focusedIndex+"_AX_option").removeClass("on"),focusedIndex=Number(obj.config.focusedIndex)+1,obj.config.options.length<=focusedIndex&&(focusedIndex=obj.config.options.length-1)),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_"+focusedIndex+"_AX_option").addClass("on"),obj.config.focusedIndex=focusedIndex,obj.myUIScroll.focusElement(cfg.targetID+"_AX_"+objID+"_AX_"+focusedIndex+"_AX_option")):e.keyCode==axf.Event.KEY_UP&&(focusedIndex=0,"undefined"!=typeof obj.config.focusedIndex&&(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_"+obj.config.focusedIndex+"_AX_option").removeClass("on"),focusedIndex=Number(obj.config.focusedIndex)-1,0>focusedIndex&&(focusedIndex=0)),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_"+focusedIndex+"_AX_option").addClass("on"),obj.config.focusedIndex=focusedIndex,obj.myUIScroll.focusElement(cfg.targetID+"_AX_"+objID+"_AX_"+focusedIndex+"_AX_option")),this):this}if(!AXgetId(obj.tagExpandBoxId)){anchorWidth=obj.bindAnchorTarget.width()-2,anchorHeight=obj.bindAnchorTarget.data("height")-1,styles=[],styles.push("top:"+anchorHeight+"px"),styles.push("width:"+(obj.config.selectorWidth||anchorWidth)+"px"),styles.push("z-index:10000"),po=[],po.push('<div id="'+obj.tagExpandBoxId+'" class="bindSelectorNodes '+cfg.anchorSelectorExpandBoxClassName+'" style="'+styles.join(";")+'">'),po.push('<div id="'+cfg.targetID+"_AX_"+objID+'_AX_expandScroll" class="bindSelectorNodes '+cfg.anchorSelectorExpandScrollClassName+'">'),po.push('	<div class="AXLoadingSmall bindSelectorNodes"></div>'),po.push("</div>"),po.push("</div>"),axdom(document.body).append(po.join("")),obj.tagExpandBox=axdom("#"+obj.tagExpandBoxId),obj.tagExpandBoxScroll=obj.tagExpandBox.find("#"+cfg.targetID+"_AX_"+objID+"_AX_expandScroll"),obj.config.positionFixed&&obj.tagExpandBox.css({position:"fixed"});var offset=(obj.tagExpandBox.outerHeight(),obj.config.positionFixed?obj.bindAnchorTarget.position():obj.bindAnchorTarget.offset());obj.config.position&&(offset=obj.bindAnchorTarget.offset(),void 0!=obj.config.position.top&&(offset.top=obj.config.position.top));var css={};css.top=offset.top+anchorHeight,"bottom"==obj.config.direction&&(css.top-=obj.tagExpandBox.outerHeight()),css.left=offset.left,obj.tagExpandBox.css(css),axdom(document.body).unbind("click.AXTagSelector").bind("click.AXTagSelector",function(e){obj.blurTimer&&clearTimeout(obj.blurTimer),obj.blurTimer=setTimeout(function(){_this.bindTagSelector_onclick(e||window.event,objID,objSeq)},100)}.bind(this)),obj.bindTarget.unbind("blur.AXTagSelector").bind("blur.AXTagSelector",function(e){obj.blurTimer&&clearTimeout(obj.blurTimer),obj.blurTimer=setTimeout(function(){_this.bindTagSelector_onclick(e||window.event,objID,objSeq)},700)}.bind(this))}this.bindTagSelector_setOptions(objID,objSeq,obj.bindTarget.val())},bindTagSelector_setOptions:function(objID,objSeq,kword){var po,next_fn,_this=this,cfg=this.config,obj=this.objects[objSeq],maxHeight=obj.config.maxHeight||130;obj.deletedTagList=[],next_fn=function(){if(0==po.length){var selectorOptionEmpty="";AXConfig.AXInput&&(selectorOptionEmpty=AXConfig.AXInput.selectorOptionEmpty||"empty options"),po.push('<div class="empty">'+selectorOptionEmpty+"</div>")}obj.tagExpandBoxScroll.html(po.join(""));var expandScrollHeight=obj.tagExpandBoxScroll.outerHeight();if(expandScrollHeight>maxHeight&&(expandScrollHeight=maxHeight),obj.tagExpandBox.css({height:expandScrollHeight+"px"}),obj.myUIScroll&&obj.myUIScroll.unbind(),obj.myUIScroll=new AXScroll,obj.myUIScroll.setConfig({CT_className:"AXScrollSmall",targetID:cfg.targetID+"_AX_"+objID+"_AX_expandBox",scrollID:cfg.targetID+"_AX_"+objID+"_AX_expandScroll",touchDirection:!1}),obj.myUIScroll.scrollTop(0),void 0!=obj.config.selectedIndex&&(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_"+obj.config.selectedIndex+"_AX_option").addClass("on"),obj.myUIScroll.focusElement(cfg.targetID+"_AX_"+objID+"_AX_"+obj.config.selectedIndex+"_AX_option"),obj.config.focusedIndex=obj.config.selectedIndex),"bottom"==obj.config.direction){var offset=obj.config.positionFixed?obj.bindAnchorTarget.position():obj.bindAnchorTarget.offset();obj.config.position&&(offset=obj.bindAnchorTarget.offset(),void 0!=obj.config.position.top&&(offset.top=obj.config.position.top)),obj.tagExpandBox.css({top:offset.top-obj.tagExpandBox.outerHeight()})}if("undefined"!=typeof kword&&""!=kword){kword=kword.replace(/\//g,"\\/");for(var sw=axf.consonantKR((kword||"").dec()),reAt=new RegExp("^"+sw+".*","i"),ix=null,i=0,l=obj.config.options.length;l>i;i++)if(reAt.test(obj.config.options[i][obj.config.reserveKeys.optionText]||"")){ix=i;break}null!=ix&&("undefined"!=typeof obj.config.focusedIndex&&axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_"+obj.config.focusedIndex+"_AX_option").removeClass("on"),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_"+ix+"_AX_option").addClass("on"),obj.config.focusedIndex=ix,obj.myUIScroll.focusElement(cfg.targetID+"_AX_"+objID+"_AX_"+ix+"_AX_option"))}else void 0!=obj.config.focusedIndex&&axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_"+obj.config.focusedIndex+"_AX_option").removeClass("on")};var get_options=function(options){for(var npo=[],i=0,l=options.length;l>i;i++){var O=options[i];O[obj.config.reserveKeys.optionText]=O[obj.config.reserveKeys.optionText]?O[obj.config.reserveKeys.optionText].dec():"",O.desc=O.desc?O.desc.dec():"",O.optionDesc=O.optionDesc?O.optionDesc.dec():"";var styles,descStr=O.desc||O.optionDesc;""!=descStr&&(descStr="<span>"+descStr+"</span>"),styles="";for(var tag,ti=0,tl=obj.tagList.length;tl>ti;ti++)tag=obj.tagList[ti],tag[obj.config.reserveKeys.optionValue]==O[obj.config.reserveKeys.optionValue]&&(styles=' style="text-decoration: line-through;"');npo.push("<a "+obj.config.href+' id="'+cfg.targetID+"_AX_"+objID+"_AX_"+i+'_AX_option" class="bindSelectorNodes" '+styles+">"+O[obj.config.reserveKeys.optionText]+descStr+"</a>")}return npo};if(obj.config.ajaxUrl&&""!=kword){obj.inProgress=!0;var url=obj.config.ajaxUrl,pars=obj.config.ajaxPars||{},_method="post",_headers={},_contentType=AXConfig.AXReq.contentType,_responseType=AXConfig.AXReq.responseType,_dataType=AXConfig.AXReq.dataType,_async=AXConfig.AXReq.async;obj.config.method&&(_method=obj.config.method),obj.config.headers&&(_headers=obj.config.headers),obj.config.contentType&&(_contentType=obj.config.contentType),obj.config.responseType&&(_responseType=obj.config.responseType),obj.config.dataType&&(_dataType=obj.config.dataType),obj.config.ajaxAsync&&(_async=obj.config.ajaxAsync);var selectorName=obj.config.selectorName||obj.bindTarget.attr("name");""==pars?pars=selectorName+"="+(kword||"").enc():"string"==(typeof pars).toLowerCase()?pars+="&"+selectorName+"="+kword.enc():"object"==(typeof pars).toLowerCase()&&(pars[selectorName]=kword.enc()),new AXReq(url,{type:_method,headers:_headers,contentType:_contentType,responseType:_responseType,dataType:_dataType,async:_async,debug:"undefined"!=typeof obj.config.debug?obj.config.debug:!1,pars:pars,onsucc:function(res){res.error?axf.alert(res.error):(obj.config.options=res[obj.config.reserveKeys.options]||[],obj.config.focusedIndex=void 0,po=get_options(obj.config.options),next_fn.call(_this)),obj.inProgress=!1}})}else if(obj.config.onsearch){obj.config.onsearch.call({id:objID,value:kword},objID,kword,function(res){obj.config.options=res,obj.config.focusedIndex=void 0,po=get_options(obj.config.options),next_fn.call(_this)}.bind(this))}else{if(!obj.config.options)return console.log("config.options is not defined"),this;po=get_options(obj.config.options),next_fn.call(this)}},bindTagSelector_onclick:function(e,objID,objSeq){this.config,this.objects[objSeq];if("blur"==e.type)this.bindTagSelector_close(objID,objSeq);else if("click"==e.type){var click_type="",target=axf.get_event_target(e.target,function(el){return axdom(el).hasClass("bindSelectorNodes")?(click_type="option",!0):el.id==objID?(click_type="input",!0):void 0});if(target){if("option"==click_type){var ids=target.id.split(/_AX_/g),optionIndex=ids[ids.length-2];this.bindTagSelector_addItem(objID,objSeq,optionIndex),this.bindTagSelector_close(objID,objSeq)}}else this.bindTagSelector_close(objID,objSeq)}},bindTagSelector_close:function(objID,objSeq){var obj=(this.config,this.objects[objSeq]);obj.tagExpandBox&&obj.tagExpandBox.remove(),axdom(document.body).unbind("click.AXTagSelector"),obj.bindTarget.unbind("blur.AXTagSelector")},bindTagSelector_addItem:function(objID,objSeq,optionIndex){var objName,po,addOption,pass_add,obj=(this.config,this.objects[objSeq]);if(isNaN(Number(optionIndex)))return console.log("optionIndex is NaN"),this;addOption=obj.config.options[optionIndex],pass_add=!0;for(var tag,i=0,l=obj.tagList.length;l>i;i++)if(tag=obj.tagList[i],tag[obj.config.reserveKeys.optionValue]==addOption[obj.config.reserveKeys.optionValue]){pass_add=!1;break}pass_add&&(objName=obj.bindTarget.attr("name"),po=[],obj.config.optionValue_inputName||(obj.config.optionValue_inputName=objName),po.push('<span class="AXTag-selector-tagitem" data-option-value="'+addOption[obj.config.reserveKeys.optionValue]+'">'),obj.config.optionValue_inputName&&po.push('<input type="hidden" name="'+obj.config.optionValue_inputName+'" value="'+addOption[obj.config.reserveKeys.optionValue]+'" />'),obj.config.optionText_inputName&&po.push('<input type="hidden" name="'+obj.config.optionText_inputName+'" value="'+addOption[obj.config.reserveKeys.optionText]+'" />'),po.push(addOption[obj.config.reserveKeys.optionText]),po.push('<span class="AXTag-selector-tagitem-remove" data-tag-index="'+obj.tagList.length+'"></span>'),po.push("</span>"),obj.tagContainer.append(po.join("")),obj.tagList.push(addOption),obj.bindTarget.css({"padding-top":obj.tagContainer.height()}).val(""),obj.bindAnchorTarget.data("height",obj.bindTarget.outerHeight()),axdom(window).resize())},bindTagSelector_removeItem:function(objID,objSeq,tagIndex){var po,obj=(this.config,this.objects[objSeq]),objName=obj.bindTarget.attr("name");"undefined"!=typeof tagIndex&&(obj.tagContainer.find('[data-tag-index="'+tagIndex+'"]').remove(),obj.deletedTagList.push(obj.tagList[tagIndex]),obj.tagList.splice(tagIndex,1)),po=[];for(var tag,i=0,l=obj.tagList.length;l>i;i++)tag=obj.tagList[i],po.push('<span class="AXTag-selector-tagitem" data-option-value="'+tag[obj.config.reserveKeys.optionValue]+'">'),po.push('<input type="hidden" name="'+objName+'" value="'+tag[obj.config.reserveKeys.optionValue]+'" />'),po.push(tag[obj.config.reserveKeys.optionText]),po.push('<span class="AXTag-selector-tagitem-remove" data-tag-index="'+i+'"></span>'),po.push("</span>");obj.tagContainer.html(po.join("")),0==obj.tagList.length?obj.bindTarget.css({"padding-top":obj.bindTarget_paddingTop}).val(""):obj.bindTarget.css({"padding-top":obj.tagContainer.height()}).val(""),obj.bindAnchorTarget.data("height",obj.bindTarget.outerHeight()),axdom(window).resize()},bindTagSelector_setItem:function(objID,tags){for(var obj,objSeq=(this.config,null),i=0,l=this.objects.length;l>i;i++)if(this.objects[i].id===objID){objSeq=i;break}if(obj=this.objects[objSeq],obj.deletedTagList=[],Object.isArray(tags)){obj.tagList=[];for(var tag,i=0,l=tags.length;l>i;i++){var tag=tags[i];"undefined"==typeof tag[obj.config.reserveKeys.optionValue]&&(tag[obj.config.reserveKeys.optionValue]=tag.toString()),"undefined"==typeof tag[obj.config.reserveKeys.optionText]&&(tag[obj.config.reserveKeys.optionText]=tag.toString()),obj.tagList.push(tag)}this.bindTagSelector_removeItem(objID,objSeq)}return this},bindTagSelector_getItem:function(objID){for(var obj,objSeq=(this.config,null),i=0,l=this.objects.length;l>i;i++)if(this.objects[i].id===objID){objSeq=i;break}return obj=this.objects[objSeq],{list:obj.tagList,deletedList:obj.deletedTagList}}}),AXInputPro=new AXInputConverterPro;AXInputPro.setConfig({targetID:"inputBasic"}),axdom.fn.bindPattern=function(config){return axf.each(this,function(){this.id||(this.id="AXInputPro-"+axf.getUniqueId()),config=config||{},config.id=this.id,config.bindType="pattern",AXInputPro.bind(config)}),this},axdom.fn.bindPatternSetConfig=function(config){return axf.each(this,function(){AXInputPro.bindSetConfig(this.id,config)}),this},axdom.fn.bindPatternGetText=function(){var returnVals="";return axf.each(this,function(){var getVal=AXInputPro.bindPatternGetText(this.id);""==returnVals?returnVals=getVal:Object.isString(returnVals)?(returnVals=[returnVals],returnVals.push(getVal)):Object.isArray(returnVals)&&returnVals.push(getVal)}),returnVals},axdom.fn.bindPatternSetText=function(val){return axf.each(this,function(){AXInputPro.bindPatternSetText(this.id,null,val)}),this},axdom.fn.bindPatternGetDisplayText=function(){var returnVals="";return axf.each(this,function(){var getVal=AXInputPro.bindPatternGetDisplayText(this.id);""==returnVals?returnVals=getVal:Object.isString(returnVals)?(returnVals=[returnVals],returnVals.push(getVal)):Object.isArray(returnVals)&&returnVals.push(getVal)}),returnVals},axdom.fn.bindTagSelector=function(config){return axf.each(this,function(){this.id||(this.id="AXInputPro-"+axf.getUniqueId()),config=config||{},config.id=this.id,config.bindType="tagSelector",AXInputPro.bind(config)}),this},axdom.fn.bindTagSelector_setItem=function(list){return axf.each(this,function(){AXInputPro.bindTagSelector_setItem(this.id,list)}),this},axdom.fn.bindTagSelector_getItem=function(){return this[0]?AXInputPro.bindTagSelector_getItem(this[0].id):void 0};var AXMobileMenu=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.moveSens=0,this.config.moveSens=1,this.touchMode,this.selectedPoi=null,this.config.width=300,this.config.height=388,this.config.reserveKeys={labelKey:"label",urlKey:"url",targetKey:"target",addClassKey:"addClass",subMenuKey:"cn"}},init:function(){var cfg=this.config;cfg.onclick||(cfg.onclick=cfg.onClick),cfg.menuBoxID&&(cfg.menu=this.collectMenuItem(cfg.menuBoxID)),this.modal=new AXMobileModal,this.modal.setConfig({addClass:"AXMobileMenu",height:cfg.height,width:cfg.width,head:{close:{onclick:function(){}}},onclose:function(){}})},open:function(){var onLoad=(this.config,this.initMenu.bind(this));return this.modal.open(null,onLoad),this},initMenu:function(obj){var cfg=this.config;if(this.modalObj=obj,this.modalID=obj.jQueryModal.get(0).id,this.selectedPoi){var lpoi=this.selectedPoi.last(),apoi=this.selectedPoi.concat();apoi.pop();var menu=cfg.menu;if(axf.each(apoi,function(idx,P){menu=0==idx?menu[P]:menu[cfg.reserveKeys.subMenuKey][P]}),menu[cfg.reserveKeys.subMenuKey]&&menu[cfg.reserveKeys.subMenuKey][lpoi][cfg.reserveKeys.subMenuKey]&&menu[cfg.reserveKeys.subMenuKey][lpoi][cfg.reserveKeys.subMenuKey].length>0){apoi.push(lpoi);var tpl=this.getMenu(this.modalID,menu[cfg.reserveKeys.subMenuKey][lpoi],apoi)}else var tpl=this.getMenu(this.modalID,menu,apoi)}else var tpl=this.getMenu(this.modalID,cfg.menu);if(AXUtil.browser.mobile){var modalBodyID=obj.modalBody.get(0).id,touchstart=this.touchstart.bind(this);this.touchstartBind=function(){touchstart()},document.addEventListener&&AXgetId(modalBodyID).addEventListener("touchstart",this.touchstartBind,!1)}else obj.modalBody.unbind("mousedown.AXMobileMenu").bind("mousedown.AXMobileMenu",this.touchstart.bind(this));obj.modalBody.attr("onselectstart","return false"),obj.modalBody.bind("click.AXMobileMenu",this.onclickModalBody.bind(this)),this.printMenu(tpl)},printMenu:function(tpl){var obj=this.modalObj;obj.modalHead.empty(),obj.modalHead.append(tpl.headPo),obj.modalBody.empty(),obj.modalBody.append(tpl.bodyPo),obj.modalFoot.empty(),obj.modalFoot.append(tpl.pagePo),obj.modalHead.find(".mobileMenuHome").bind("click",this.onclickHome.bind(this)),obj.modalHead.find(".mobileMenuPrev").bind("click",this.onclickPrev.bind(this)),this.menuPageWidth=obj.modalBody.find(".mobileMenuBodyPage").width()+9,this.mobileMenuBodyScroll=obj.modalBody.find(".mobileMenuBodyScroll"),obj.modalBody.find(".mobileMenuBodyScroll").css({width:tpl.pageNum*this.menuPageWidth})},getMenu:function(modalID,_menu,poi){var cfg=this.config,countPerBlock=9,menu=_menu,menuTitle="";void 0==poi||0==poi.length?poi=[]:(menuTitle=menu[cfg.reserveKeys.labelKey],menu=menu[cfg.reserveKeys.subMenuKey]);var headPo=[];headPo.push("<a "+cfg.href+' class="mobileMenuHome">home</a>'),""!=menuTitle&&headPo.push("<a "+cfg.href+' class="mobileMenuPrev" id="',modalID,"_AX_menuTitle_AX_",poi.join("_"),'">',menuTitle,"</a>");var bodyPo=[];bodyPo.push('<div class="mobileMenuBody">'),bodyPo.push('	<div class="mobileMenuBodyScroll" id="',modalID,'_AX_bodyScroll">'),bodyPo.push('		<div class="mobileMenuBodyPage">');var ppoi=poi.join("_");""!=ppoi&&(ppoi+="_");var selectedPoi="";this.selectedPoi&&(selectedPoi=this.selectedPoi.join("_")),axf.each(menu,function(midx,M){midx%countPerBlock==0&&midx>0&&(bodyPo.push("	</div>"),bodyPo.push('	<div class="mobileMenuBodyPage">'));var addClass=[];this[cfg.reserveKeys.addClassKey]&&addClass.push(this[cfg.reserveKeys.addClassKey]),selectedPoi==ppoi+midx&&addClass.push("selected"),bodyPo.push("<a "+cfg.href+' class="mobileMenuItem '+addClass.join(" ")+'" id="',modalID,"_AX_",ppoi,midx,'">'),bodyPo.push(this[cfg.reserveKeys.labelKey]),this[cfg.reserveKeys.subMenuKey]&&this[cfg.reserveKeys.subMenuKey].length>0&&bodyPo.push('<span class="hasSubMenu"></span>'),bodyPo.push("</a>")}),bodyPo.push("		</div>"),bodyPo.push("	</div>"),bodyPo.push("</div>");var pageNum=(menu.length/countPerBlock).ceil();this.pageNo=0,this.pageNum=pageNum;var pagePo=[];return pagePo.push('<div class="mobileMenuFoot">'),axf.each(pageNum.rangeFrom(1),function(pidx,p){0==pidx?pagePo.push('<div class="pageNav on" '):pagePo.push('<div class="pageNav" '),pagePo.push(' id="',modalID,"_AX_pageNav_AX_",pidx,'"></div>')}),pagePo.push("</div>"),{headPo:headPo.join(""),bodyPo:bodyPo.join(""),pagePo:pagePo.join(""),pageNum:pageNum}},close:function(){this.config;return this.modal.close(),this},setHighLight:function(menuID){var cfg=this.config,menu=cfg.menu,pois="",treeFn=function(subTree,parentPoi){axf.each(subTree,function(idx,M){return M[cfg.reserveKeys.primaryKey]==menuID?(pois=parentPoi+"_"+idx,!1):void(M[cfg.reserveKeys.subMenuKey]&&M[cfg.reserveKeys.subMenuKey].length>0&&treeFn(M[cfg.reserveKeys.subMenuKey],parentPoi+"_"+idx))})};axf.each(menu,function(idx,M){return M[cfg.reserveKeys.primaryKey]==menuID?(pois=idx+"",!1):void(M[cfg.reserveKeys.subMenuKey]&&M[cfg.reserveKeys.subMenuKey].length>0&&treeFn(M[cfg.reserveKeys.subMenuKey],idx))});var poi;return""!=pois&&(poi=pois.split(/_/g)),this.selectedPoi=poi,this},setHighLightMenu:function(menuID){return this.setHighLight(menuID)},setHighLightOriginID:function(menuID){var cfg=this.config,menu=cfg.menu,pois="",treeFn=function(subTree,parentPoi){axf.each(subTree,function(idx,M){return M._id==menuID?(pois=parentPoi+"_"+idx,!1):void(M[cfg.reserveKeys.subMenuKey]&&M[cfg.reserveKeys.subMenuKey].length>0&&treeFn(M[cfg.reserveKeys.subMenuKey],parentPoi+"_"+idx))})};axf.each(menu,function(idx,M){return M._id==menuID?(pois=idx+"",!1):void(M[cfg.reserveKeys.subMenuKey]&&M[cfg.reserveKeys.subMenuKey].length>0&&treeFn(M[cfg.reserveKeys.subMenuKey],idx))});var poi;""!=pois&&(poi=pois.split(/_/g)),this.selectedPoi=poi},onclickModalBody:function(event){var cfg=this.config,eid=event.target.id.split(/_AX_/g),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,until:function(evt,evtIDs){return!!axdom(evt.parentNode).hasClass("mobileMenuBodyScroll")},find:function(evt,evtIDs){return!!axdom(evt).hasClass("mobileMenuItem")}});if(myTarget){var poi=myTarget.id.split(/_AX_/g).last(),menu=cfg.menu,apoi=poi.split(/_/g);if(axf.each(apoi,function(idx,P){menu=0==idx?menu[P]:menu[cfg.reserveKeys.subMenuKey][P]}),menu[cfg.reserveKeys.subMenuKey]&&menu[cfg.reserveKeys.subMenuKey].length>0){var menuItem=this.modalObj.modalBody.find("#"+myTarget.id);menuItem.css({opacity:0});var menuItemPos=menuItem.position(),mobileMenuBody=this.modalObj.modalBody.find(".mobileMenuBodyScroll"),bodyPos=mobileMenuBody.position(),cloneMenuItem=axdom("<div class='mobileMenuItemGhost' id='"+this.modalID+"_AX_cloneMenuItem'>"+menuItem.html()+"</div>");mobileMenuBody.append(cloneMenuItem),cloneMenuItem.css({position:"absolute",left:menuItemPos.left,top:menuItemPos.top});var getMenuBind=this.getMenu.bind(this),printMenuBind=this.printMenu.bind(this),modalID=this.modalID;return void cloneMenuItem.animate({left:9-bodyPos.left,top:0,width:270,height:270},300,"backInOut").animate({opacity:0},100,"expoOut",function(){var tpl=getMenuBind(modalID,menu,apoi);printMenuBind(tpl)})}cfg.onclick&&cfg.onclick.call(menu,menu)}},onclickHome:function(event){var cfg=this.config,tpl=this.getMenu(this.modalID,cfg.menu);this.printMenu(tpl)},onclickPrev:function(event){var cfg=this.config,poi=event.target.id.split(/_AX_/g).last(),menu=cfg.menu,apoi=poi.split(/_/g);apoi.pop(),axf.each(apoi,function(idx,P){menu=0==idx?menu[P]:menu[cfg.reserveKeys.subMenuKey][P]});var tpl=this.getMenu(this.modalID,menu,apoi);this.printMenu(tpl)},setTree:function(tree){return this.config.menu=tree,this},collectMenuItem:function(targetID){var cfg=this.config,menuBox=axdom("#"+targetID),tree=[],initChilds=function(EL,cid,_tree){var childDiv=jQuery(EL).children("."+cfg.childsMenu.className).get(0);if(childDiv){var childDivID=cid.replace("PMA","PMC");childDiv.id?childDivID=childDiv.id:childDiv.id=childDivID,jQuery("#"+childDivID+">ul>li").each(function(ci,EL){var citem={},c_domEL=axdom(EL);c_domEL.children("A").attr("data-axmenuid")?citem._id=c_domEL.children("A").attr("data-axmenuid"):c_domEL.children("A").get(0).id?citem._id=c_domEL.children("A").get(0).id:c_domEL.children("A").get(0).id=citem._id=cid+"_"+ci,citem[cfg.reserveKeys.primaryKey]=cid+"_"+ci,citem[cfg.reserveKeys.labelKey]=c_domEL.children("A").text(),citem[cfg.reserveKeys.urlKey]=c_domEL.children("A").attr("href"),citem[cfg.reserveKeys.targetKey]=c_domEL.children("A").attr("target")||"_self",citem[cfg.reserveKeys.addClassKey]=c_domEL.children("A").attr("class")||"",citem[cfg.reserveKeys.subMenuKey]=[],_tree[cfg.reserveKeys.subMenuKey].push(citem),initChilds(EL,citem[cfg.reserveKeys.primaryKey],_tree[cfg.reserveKeys.subMenuKey][ci])})}};return menuBox.find("."+cfg.parentMenu.className).each(function(pi,EL){EL.id||(EL.id=cfg.menuBoxID+"_PM_"+pi);var item={},domEL=axdom(EL),nid="";domEL.children("A").attr("data-axmenuid")?item._id=domEL.children("A").attr("data-axmenuid"):domEL.children("A").get(0).id?item._id=domEL.children("A").get(0).id:domEL.children("A").get(0).id=item._id=cfg.menuBoxID+"_PMA_"+pi,nid=domEL.children("A").get(0).id?domEL.children("A").get(0).id:cfg.menuBoxID+"_PMA_"+pi,item._child_id=nid.replace("PMA","PMC"),item[cfg.reserveKeys.primaryKey]=targetID+"_PM_"+pi,item[cfg.reserveKeys.labelKey]=domEL.children("A").text(),item[cfg.reserveKeys.urlKey]=domEL.children("A").attr("href"),item[cfg.reserveKeys.targetKey]=domEL.children("A").attr("target")||"_self",item[cfg.reserveKeys.addClassKey]=domEL.children("A").attr("class")||"",item[cfg.reserveKeys.subMenuKey]=[],tree.push(item);var child=domEL.children("."+cfg.childMenu.className).get(0);child&&(child.id||(child.id=item._child_id),jQuery("#"+item._child_id+">ul>li").each(function(ci,EL){var citem={},c_domEL=axdom(EL);c_domEL.children("A").attr("data-axmenuid")?citem._id=c_domEL.children("A").attr("data-axmenuid"):c_domEL.children("A").get(0).id?citem._id=c_domEL.children("A").get(0).id:c_domEL.children("A").get(0).id=citem._id=item._child_id.replace("PMC","PMA")+"_"+ci,citem[cfg.reserveKeys.primaryKey]=item._child_id.replace("PMC","PMA")+"_"+ci,citem[cfg.reserveKeys.labelKey]=c_domEL.children("A").text(),citem[cfg.reserveKeys.urlKey]=c_domEL.children("A").attr("href"),citem[cfg.reserveKeys.targetKey]=c_domEL.children("A").attr("target")||"_self",citem[cfg.reserveKeys.addClassKey]=c_domEL.children("A").attr("class")||"",citem[cfg.reserveKeys.subMenuKey]=[],tree[pi][cfg.reserveKeys.subMenuKey].push(citem),
  initChilds(EL,citem[cfg.reserveKeys.primaryKey],tree[pi][cfg.reserveKeys.subMenuKey][ci])}))}),tree},touchstart:function(e){var touch,event=(this.config,window.event);if(AXUtil.browser.mobile){if(touch=event.touches[0],!touch.pageX)return}else{var event=e;touch={pageX:e.pageX,pageY:e.pageY}}if(this.touchStartXY={sTime:(new Date).getTime()/1e3,sLeft:this.mobileMenuBodyScroll.position().left,x:touch.pageX,y:touch.pageY},AXUtil.browser.mobile){var event=window.event,touchEnd=this.touchEnd.bind(this);this.touchEndBind=function(){touchEnd(event)};var touchMove=this.touchMove.bind(this);this.touchMoveBind=function(){touchMove(event)},document.addEventListener&&(document.addEventListener("touchend",this.touchEndBind,!1),document.addEventListener("touchmove",this.touchMoveBind,!1))}else axdom(document.body).bind("mouseup.AXMobileMenu",this.touchEnd.bind(this)),axdom(document.body).bind("mousemove.AXMobileMenu",this.touchMove.bind(this));this.mobileMenuBodyScroll.stop()},touchMove:function(e){this.touhEndObserver&&clearTimeout(this.touhEndObserver);var touch,event=(this.config,window.event);if(AXUtil.browser.mobile){if(touch=event.touches[0],!touch.pageX)return}else{var event=e;touch={pageX:e.pageX,pageY:e.pageY}}if((this.touchStartXY.x-touch.pageX).abs()<(this.touchStartXY.y-touch.pageY).abs());else if((this.touchStartXY.x-touch.pageX).abs()>(this.touchStartXY.y-touch.pageY).abs()){if(this.moveBlock(touch.pageX-this.touchStartXY.x),!event.preventDefault)return!1;event.preventDefault()}((this.touchStartXY.x-touch.pageX).abs()-(this.touchStartXY.y-touch.pageY).abs()).abs()<5},touchEnd:function(e){this.config,window.event||e;AXUtil.browser.mobile?document.removeEventListener&&(document.removeEventListener("touchend",this.touchEndBind,!1),document.removeEventListener("touchmove",this.touchMoveBind,!1)):(axdom(document.body).unbind("mouseup.AXMobileMenu"),axdom(document.body).unbind("mousemove.AXMobileMenu"));var moveEndBlock=this.moveEndBlock.bind(this);this.touhEndObserver=setTimeout(function(){moveEndBlock()},10)},moveBlock:function(moveX){var newLeft=(this.config,this.touchStartXY.sLeft+1*moveX);newLeft>.5*this.menuPageWidth?newLeft=.5*this.menuPageWidth:newLeft<1.5*-this.mobileMenuBodyScroll.width()&&(newLeft=1.5*-this.mobileMenuBodyScroll.width()),this.mobileMenuBodyScroll.css({left:newLeft})},moveEndBlock:function(){if(this.touchStartXY){var sTime=this.touchStartXY.sTime,eTime=(new Date).getTime()/1e3,dTime=eTime-sTime,eLeft=this.mobileMenuBodyScroll.position().left,dLeft=eLeft-this.touchStartXY.sLeft,velocity=Math.ceil(dLeft/dTime/10),endLeft=Math.ceil(eLeft+velocity);endLeft>0&&(endLeft=0);var calLeft=endLeft.abs()%this.menuPageWidth,absPage=(endLeft.abs()/this.menuPageWidth).floor(),newLeft=0;calLeft<this.menuPageWidth/2||(absPage+=1),absPage>this.pageNum-1&&(absPage=this.pageNum-1),newLeft=this.menuPageWidth*absPage,this.touchStartXY.sLeft=-newLeft,this.mobileMenuBodyScroll.animate({left:-newLeft},(this.mobileMenuBodyScroll.position().left+newLeft).abs(),"cubicOut",function(){}),this.modalObj.modalFoot.find("#"+this.modalID+"_AX_pageNav_AX_"+this.pageNo).removeClass("on"),this.modalObj.modalFoot.find("#"+this.modalID+"_AX_pageNav_AX_"+absPage).addClass("on"),this.pageNo=absPage,this.touchStartXY=null}},cancelEvent:function(event){return event.stopPropagation(),!1}}),AXModal=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.config.maskCss="AXMask",this.config.windowBoxCss="AXModalBox",this.config.padding="0",this.config.defaultTop=10,this.config.animateDuration=300,this.config.autoHide=!1,this.config.windowID="AXModal"+AXUtil.timekey(),this.config.contentDivClass=AXConfig.AXModal?AXConfig.AXModal.contentDivClass:"bodyHeightDiv",this.config.displayLoading=!0,this.config.viewMode="dx",this.config.opendModalID="",this.config.scrollLock=!1,this.config.closeButton=!0},init:function(){var cfg=this.config;if(this.mask=axdom('<div class="'+cfg.maskCss+'"></div>'),cfg.mediaQuery){var _viewMode="",clientWidth=axf.clientWidth();axf.each(cfg.mediaQuery,function(k,v){if(Object.isObject(v))if(void 0!=v.min&&void 0!=v.max){if(v.min<=clientWidth&&clientWidth<=v.max)return _viewMode="dx"==k?"dx":"mx",!1}else if(v.min<=clientWidth)return _viewMode="dx"==k?"dx":"mx",!1}),""!=_viewMode&&(cfg.viewMode=_viewMode)}},setWidth:function(width){var cfg=this.config;width?(cfg.width=width,this.config.fixedWidth=!0):(cfg.width=void 0,this.config.fixedWidth=!1),axdom("#"+cfg.windowID).css({width:width});var maskWidth=axdom("#"+cfg.windowID).outerWidth(),maskLeft=axdom(document.body).width()/2-maskWidth/2;0>maskLeft&&(maskLeft=0),axdom("#"+cfg.windowID).css({left:maskLeft})},open:function(http){var cfg=this.config;if(!this._windowOpend){mask.open(),this.winID="mdw"+AXUtil.timekey(),this.frmID="frm"+AXUtil.timekey();var maskWidth,maskLeft;this.config.width?(maskWidth=this.config.width,maskLeft=axdom(document.body).width()/2-this.config.width/2,this.config.fixedWidth=!0):(maskWidth=axdom(document.body).width()-50,maskLeft=10,this.config.fixedWidth=!1),http.width&&(maskWidth=http.width,maskLeft=axdom(document.body).width()/2-http.width/2,this.config.fixedWidth=!0);var maskTop=this.config.defaultTop;maskTop=void 0!=http.top?http.top:axdom(window).scrollTop()+100,0>maskLeft&&(maskLeft=0);var po=[];po.push("<div id='"+this.config.windowID+"' class='"+this.config.windowBoxCss+"' style='top:"+maskTop+"px;left:"+maskLeft+"px;width:"+maskWidth+"px;'>"),po.push("	<div class='windowbox' id='"+this.winID+"_box' style='padding:"+this.config.padding+"px'>"),cfg.displayLoading&&(po.push("		<div id='"+this.config.windowID+"_loading' style='position:absolute;left:0px;top:0px;width:100%;padding:50px 0px 0px 0px;' align='center'>"),po.push('		<div class="AXLoading"></div>'),po.push("		<br/><br><span class='blue'>페이지를 로딩 중입니다. 잠시만 기다려 주세요.</span></div>"));var closeButton=void 0==http.closeButton?cfg.closeButton:http.closeButton;if(closeButton&&po.push("		<a id='"+this.config.windowID+"_close' class='closeBtn'>닫기</a>"),po.push("		<form name='"+this.frmID+"' method='"+(http.method||"post")+"' target='"+this.winID+"' action='"+http.url+"'>"),po.push("		<input type='hidden' name='winID' value='"+this.winID+"' />"),isNaN(http.pars.length)?axdom.each(http.pars,function(key,val){po.push("		<input type='hidden' name='"+key+"' value='"+val+"' />")}):axdom.each(http.pars,function(){axdom.each(this,function(key,val){po.push("		<input type='hidden' name='"+key+"' value='"+val+"' />")})}),AXConfig.AXModal.pars){var appendPars={};Object.isString(AXConfig.AXModal.pars)&&(appendPars=AXConfig.AXModal.pars.queryToObject()),axdom.each(appendPars,function(key,val){po.push("<input type='hidden' name='"+key+"' value='"+val+"' />")})}po.push("		</form>"),po.push("		<iframe src='' name='"+this.winID+"' id='"+this.winID+"' frameborder='0' class='windowboxFrame' style='width:100%;overflow:-y:hidden;' scrolling='no'></iframe>"),po.push("	</div>"),po.push("</div>"),this.config.appendTargetID?axdom("#"+this.config.appendTargetID).append(po.join("")):axdom(document.body).append(po.join("")),axdom("#"+cfg.windowID).data("width",maskWidth),axdom("#"+cfg.windowID).data("top",maskTop),"mx"==cfg.viewMode&&axdom("#"+cfg.windowID).css({left:0,top:axdom(window).scrollTop(),width:"100%"});var loadingID=this.config.windowID+"_loading",_winID=this.winID,_frmID=this.frmID;document[_frmID].submit();var keydown=this.keydown.bind(this);axdom("#"+this.winID).bind("load",function(){var myIframe=window[_winID],bodyHeight=axdom(myIframe.document).innerHeight();axdom(myIframe.document.body).find("."+cfg.contentDivClass).get(0)&&(bodyHeight=axdom(myIframe.document.body).find("."+cfg.contentDivClass).outerHeight()),axdom(this).css({height:bodyHeight},cfg.animateDuration,"cubicInOut"),axdom("#"+_winID+"_box").css({height:bodyHeight},cfg.animateDuration,"cubicInOut"),cfg.displayLoading&&axdom("#"+loadingID).fadeOut("slow"),axdom("#"+_winID).addClass("loaded"),http.closeByEscKey&&axdom(myIframe.document.body).bind("keydown.AXModal",keydown)}),axdom("#"+this.config.windowID+"_close").bind("click",this.close.bind(this)),http.closeByEscKey&&axdom(document.body).bind("keydown.AXModal",keydown),this._windowOpend=!0,axdom(window).unbind("resize.AXModal"),axdom(window).bind("resize.AXModal",this.onDocResize.bind(this)),1==cfg.scrollLock&&axdom(document.body).css({overflow:"hidden"})}},openI:function(http){var cfg=this.config;if(!this._windowOpend){mask.open(),this.winID="mdw"+AXUtil.timekey(),this.frmID="frm"+AXUtil.timekey();var maskWidth,maskLeft;this.config.width?(maskWidth=this.config.width,maskLeft=axdom(document.body).width()/2-this.config.width/2,this.config.fixedWidth=!0):(maskWidth=axdom(document.body).width()-50,maskLeft=10,this.config.fixedWidth=!1),http.width&&(maskWidth=http.width,maskLeft=axdom(document.body).width()/2-http.width/2,this.config.fixedWidth=!0);var maskTop=this.config.defaultTop;maskTop=void 0!=http.top?http.top:axdom(window).scrollTop()+100,0>maskLeft&&(maskLeft=0);var po=[];po.push("<div id='"+this.config.windowID+"' class='"+this.config.windowBoxCss+"' style='top:"+maskTop+"px;left:"+maskLeft+"px;width:"+maskWidth+"px;'>"),po.push("	<div class='windowbox' id='"+this.winID+"_box' style='padding:"+this.config.padding+"px'>"),po.push("		<div id='"+this.config.windowID+"_loading' style='position:absolute;left:0px;top:0px;width:"+maskWidth+"px;padding:50px 0px 0px 0px;' align='center'>"),po.push('		<div class="AXLoading"></div>'),po.push("		<br/><br><span class='blue'>페이지를 로딩 중입니다. 잠시만 기다려 주세요.</span></div>");var closeButton=void 0==http.closeButton?cfg.closeButton:http.closeButton;if(closeButton&&po.push("		<a href='#modsExecption' id='"+this.config.windowID+"_close' class='closeBtn'>닫기</a>"),po.push("		<form name='"+this.frmID+"' method='post' target='"+this.winID+"' action='"+http.url+"'>"),po.push("		<input type='hidden' name='winID' value='"+this.winID+"' />"),isNaN(http.pars.length)?axdom.each(http.pars,function(key,val){po.push("		<input type='hidden' name='"+key+"' value='"+val+"' />")}):axdom.each(http.pars,function(){axdom.each(this,function(key,val){po.push("		<input type='hidden' name='"+key+"' value='"+val+"' />")})}),AXConfig.AXModal.pars){var appendPars={};Object.isString(AXConfig.AXModal.pars)&&(appendPars=AXConfig.AXModal.pars.queryToObject()),axdom.each(appendPars,function(key,val){po.push("<input type='hidden' name='"+key+"' value='"+val+"' />")})}po.push("		</form>"),http.maxHeight?po.push("		<iframe src='' name='"+this.winID+"' id='"+this.winID+"' frameborder='0' class='windowboxFrame' style='width:100%;overflow:-y:hidden;' scrolling='auto'></iframe>"):po.push("		<iframe src='' name='"+this.winID+"' id='"+this.winID+"' frameborder='0' class='windowboxFrame' style='width:100%;overflow:-y:hidden;' scrolling='no'></iframe>"),po.push("	</div>"),po.push("</div>"),this.config.appendTargetID?axdom("#"+this.config.appendTargetID).append(po.join("")):axdom(document.body).append(po.join(""));var loadingID=this.config.windowID+"_loading",_winID=this.winID,_frmID=this.frmID;document[_frmID].submit(),axdom("#"+this.winID).bind("load",function(){var myIframe=window[_winID],bodyHeight=axdom(myIframe.document).innerHeight();axdom(myIframe.document.body).find("."+cfg.contentDivClass).get(0)&&(bodyHeight=axdom(myIframe.document.body).find("."+cfg.contentDivClass).outerHeight()),http.maxHeight&&http.maxHeight<bodyHeight.number()+maskTop.number()+10&&(bodyHeight=http.maxHeight-maskTop.number()-10),axdom(this).css({height:bodyHeight},cfg.animateDuration,"cubicInOut"),axdom("#"+_winID+"_box").css({height:bodyHeight},cfg.animateDuration,"cubicInOut"),axdom("#"+loadingID).fadeOut("slow"),axdom("#"+_winID).addClass("loaded")}),axdom("#"+this.config.windowID+"_close").bind("click",this.close.bind(this)),this._windowOpend=!0,axdom(window).unbind("resize.AXModal"),axdom(window).bind("resize.AXModal",this.onDocResize.bind(this)),1==cfg.scrollLock&&axdom(document.body).css({overflow:"hidden"})}},windowResizeApply:function(){this.onDocResize()},openDiv:function(args){var cfg=this.config;mask.open();var modalID=cfg.opendModalID=args.modalID;if(AXgetId(modalID)){var modalTarget=$("#"+modalID);modalTarget.show();var maskTop=this.config.defaultTop;if(maskTop=void 0!=args.top?axdom(window).scrollTop()+args.top:axdom(window).scrollTop()+50,"mx"==cfg.viewMode&&(maskTop=axdom(window).scrollTop()),args.verticalAlign?modalTarget.css({top:axf.clientHeight()/2-modalTarget.height()/2+axdom(window).scrollTop()}):modalTarget.css({top:maskTop}),args.closeByEscKey){var keydown=this.keydown.bind(this),keydownBind=function(){keydown(event,modalID)};axdom(document.body).bind("keydown.AXModal",keydownBind)}}else{var maskWidth,maskLeft;this.config.width?(maskWidth=this.config.width,maskLeft=axdom(document.body).width()/2-this.config.width/2,this.config.fixedWidth=!0):(maskWidth=axdom(document.body).width()-50,maskLeft=10,this.config.fixedWidth=!1),args.width&&(maskWidth=args.width,maskLeft=axdom(document.body).width()/2-args.width/2,this.config.fixedWidth=!0);var maskTop=this.config.defaultTop;maskTop=void 0!=args.top?axdom(window).scrollTop()+args.top:axdom(window).scrollTop()+50,0>maskLeft&&(maskLeft=0);var po=[];po.push("<div id='"+modalID+"' class='"+this.config.windowBoxCss+"' style='top:"+maskTop+"px;left:"+maskLeft+"px;width:"+maskWidth+"px;'>"),po.push("	<div class='windowbox' style='padding:"+this.config.padding+"px'>");var closeButton=void 0==args.closeButton?cfg.closeButton:args.closeButton;closeButton&&po.push("		<a href='#modsExecption' id='"+modalID+"_close' class='closeBtn'>닫기</a>"),po.push("		<div id='"+modalID+"_content'></div>"),po.push("	</div>"),po.push("</div>"),axdom(document.body).append(po.join("")),axdom("#"+modalID+"_content").append(axdom("#"+args.targetID)),axdom("#"+cfg.opendModalID).data("width",maskWidth),axdom("#"+cfg.opendModalID).data("top",maskTop),"mx"==cfg.viewMode&&axdom("#"+cfg.opendModalID).css({left:0,top:axdom(window).scrollTop(),width:"100%"});var closeBind=this.close.bind(this),closeModal=function(event){closeBind(event,modalID)};if(axdom("#"+modalID+"_close").bind("click",closeModal),args.closeByEscKey){var keydown=this.keydown.bind(this),keydownBind=function(){keydown(event,modalID)};axdom(document.body).bind("keydown.AXModal",keydownBind)}if(axdom(window).unbind("resize.AXModal"),axdom(window).bind("resize.AXModal",this.onDocResize.bind(this)),1==cfg.scrollLock&&axdom(document.body).css({overflow:"hidden"}),args.verticalAlign){var modalTarget=$("#"+modalID);$("#"+modalID).css({top:axf.clientHeight()/2-modalTarget.height()/2+axdom(window).scrollTop()})}}},openNew:function(http){this.winID="mdw"+AXUtil.timekey(),this.frmID="frm"+AXUtil.timekey(),this.openWindow&&this.openWindow.close(),this.openWindow=window.open("",http.name||this.winID,http.options),this.openWindow.focus(),void 0!=http.title&&(this.openWindow.document.title=http.title),AXgetId(this.config.windowID)&&axdom("#"+this.config.windowID).remove();var po=[];po.push("<div id='"+this.config.windowID+"'>"),po.push("		<form name='"+this.frmID+"' method='"+(http.method||"post")+"' target='"+(http.name||this.winID)+"' action='"+http.url+"'>"),po.push("		<input type='hidden' name='winID' value='"+this.winID+"' />"),isNaN(http.pars.length)?axdom.each(http.pars,function(key,val){po.push("		<input type='hidden' name='"+key+"' value='"+val+"' />")}):axdom.each(http.pars,function(){axdom.each(this,function(key,val){po.push("		<input type='hidden' name='"+key+"' value='"+val+"' />")})}),po.push("		</form>"),po.push("</div>"),axdom(document.body).append(po.join("")),document[this.frmID].submit(),axdom("#"+this.config.windowID).remove()},keydown:function(event,modalID){event.keyCode==AXUtil.Event.KEY_ESC&&this.close(event,modalID)},close:function(event,modalID){var cfg=this.config;if(this.openWindow&&this.openWindow.close(),event&&void 0==event.type&&(modalID=event),modalID)axdom("#"+modalID).hide(),this.config.opendModalID="",mask.close();else if(window[this.winID]){window[this.winID].location.href="about:blank";var windowID=this.config.windowID;setTimeout(function(){axdom("#"+windowID).remove()},1),mask.close(),this._windowOpend=!1}axdom(document.body).unbind("keydown.AXModal"),this.config.onclose&&this.config.onclose.call({winID:this.winID,windowID:this.config.windowID,modalID:modalID}),1==cfg.scrollLock&&axdom(document.body).css({overflow:"auto"})},remove:function(event){var windowID=this.config.windowID;setTimeout(function(){axdom("#"+windowID).remove()},1),mask.close(),axdom(document.body).css({overflow:"auto"}),this._windowOpend=!1},resize:function(event){var cfg=this.config,_winID=this.winID;setTimeout(function(){try{var myIframe=window[_winID],bodyHeight=axdom(myIframe.document).innerHeight();axdom(myIframe.document.body).find("."+cfg.contentDivClass).get(0)&&(bodyHeight=axdom(myIframe.document.body).find("."+cfg.contentDivClass).outerHeight()),axdom("#"+_winID).css({height:bodyHeight},cfg.animateDuration,"cubicInOut"),axdom("#"+_winID+"_box").css({height:bodyHeight},cfg.animateDuration,"cubicInOut")}catch(e){}try{parent.fcObj.contentResetHeight()}catch(e){}try{parent.fnObj.contentResetHeight(null,bodyHeight+100)}catch(e){}},50)},onDocResize:function(){var cfg=this.config;if(cfg.mediaQuery){var _viewMode="",clientWidth=axf.clientWidth();axf.each(cfg.mediaQuery,function(k,v){if(Object.isObject(v))if(void 0!=v.min&&void 0!=v.max){if(v.min<=clientWidth&&clientWidth<=v.max)return _viewMode="dx"==k?"dx":"mx",!1}else if(v.min<=clientWidth)return _viewMode="dx"==k?"dx":"mx",!1}),""!=_viewMode&&(cfg.viewMode=_viewMode)}if("dx"==cfg.viewMode)try{if(cfg.fixedWidth){var maskWidth,maskLeft;""!=cfg.opendModalID?(maskWidth=axdom("#"+cfg.opendModalID).outerWidth(),maskWidth!=axdom("#"+cfg.opendModalID).data("width")&&axdom("#"+cfg.opendModalID).css({top:axdom("#"+cfg.opendModalID).data("top"),width:axdom("#"+cfg.opendModalID).data("width")}),maskLeft=axdom(document.body).width()/2-maskWidth/2,0>maskLeft&&(maskLeft=0),axdom("#"+cfg.opendModalID).css({left:maskLeft})):(maskWidth=axdom("#"+cfg.windowID).outerWidth(),maskWidth!=axdom("#"+cfg.windowID).data("width")&&axdom("#"+cfg.windowID).css({top:axdom("#"+cfg.windowID).data("top"),width:axdom("#"+cfg.windowID).data("width")}),maskLeft=axdom(document.body).width()/2-maskWidth/2,0>maskLeft&&(maskLeft=0),axdom("#"+cfg.windowID).css({left:maskLeft}))}else""!=cfg.opendModalID?(maskWidth=axdom(".container").width()-50,axdom("#"+cfg.opendModalID).css({width:maskWidth})):(maskWidth=axdom(".container").width()-50,axdom("#"+cfg.windowID).css({width:maskWidth}))}catch(e){}else"mx"==cfg.viewMode&&(""!=cfg.opendModalID?axdom("#"+cfg.opendModalID).css({left:0,top:axdom(window).scrollTop(),width:"100%"}):axdom("#"+cfg.windowID).css({left:0,top:axdom(window).scrollTop(),width:"100%"}))},loaded:function(){var cfg=this.config,_winID=this.winID,loadingID=this.config.windowID+"_loading",myIframe=window[this.winID],bodyHeight=axdom(myIframe.document).innerHeight();axdom(myIframe.document.body).find("."+cfg.contentDivClass).get(0)&&(bodyHeight=axdom(myIframe.document.body).find("."+cfg.contentDivClass).outerHeight()),axdom(this).css({height:bodyHeight},cfg.animateDuration,"cubicInOut"),axdom("#"+_winID+"_box").css({height:bodyHeight},cfg.animateDuration,"cubicInOut"),cfg.displayLoading&&axdom("#"+loadingID).fadeOut("slow"),axdom("#"+_winID).addClass("loaded")}}),AXModelControl=Class.create(AXJ,{version:"AXModelControl V0.1",author:"tom@axisj.com",logs:["2013-12-03 오후 5:27:18"],initialize:function(AXJ_super){AXJ_super(),this.config.theme="",this.config.collectSelector="",this.config.subModelDetectClassName="AXModelDetect",this.config.excludeClassName="",this.config.cursorFocus=!1,this.returnJSData={}},init:function(){var cfg=this.config;return Object.isUndefined(cfg.targetID)?void trace("need targetID - setConfig({targetID:''})"):void(this.target=jQuery("#"+cfg.targetID))},collectModelItem:function(){var cfg=this.config,finderCSS="";finderCSS=""!=cfg.collectSelector?cfg.collectSelector:"input[type=text], input[type=hidden], input[type=radio], input[type=checkbox], select, textarea";var getParentSubModel=function(ele){for(var result=!1,checkEle=ele,rooping=!0;rooping;){if(!checkEle.get(0)){rooping=!1;break}if(checkEle.get(0).id==cfg.targetID){rooping=!1;break}if(checkEle.parent().hasClass(cfg.subModelDetectClassName)){result=!0,rooping=!1;break}checkEle=checkEle.parent()}return{result:result,parents:ele.parentsUntil("#"+cfg.targetID)}},collectItem=[],oncursorKeyup=this.oncursorKeyup.bind(this);this.target.find(finderCSS).each(function(){var jQueryObj=axdom(this),getSubModel=getParentSubModel(axdom(this));if(getSubModel.result){jQueryObj.attr("data-axisjModelId",collectItem.length);var relationKey=[];axdom.each(getSubModel.parents,function(){if(""!=this.id&&this.id.left(cfg.subModelDetectClassName.length)==cfg.subModelDetectClassName){var myKey=this.id.substr(this.id.lastIndexOf("_").number()+1);relationKey.push(myKey)}}),relationKey.push(this.name),collectItem.push({keys:relationKey,jQueryObj:jQueryObj,axisjModelId:collectItem.length,name:this.name,type:this.type})}else{var collectOk=!1;collectOk=""!=cfg.excludeClassName?!jQueryObj.hasClass(cfg.excludeClassName):!0,collectOk&&(jQueryObj.attr("data-axisjModelId",collectItem.length),collectItem.push({keys:[this.name],jQueryObj:jQueryObj,axisjModelId:collectItem.length,name:this.name,type:this.type}))}jQueryObj=null}),this.collectItem=collectItem;var returnJSData={};axdom.each(this.collectItem,function(itemIndex,item){for(var key,keys=item.keys,targetJS=returnJSData,kidx=0;kidx<keys.length-1;kidx++)key=keys[kidx],void 0==targetJS[key]&&(targetJS[key]={}),targetJS=targetJS[key];key=keys.last();var nVal="";if(void 0==targetJS[key]){if("checkbox"==this.type){var keyLength=0;axdom.each(collectItem,function(){this.keys.join(".")==keys.join(".")&&keyLength++}),1==keyLength?targetJS[key]="":targetJS[key]=[]}else targetJS[key]="";this.keySeq=0}else if(Object.isArray(targetJS[key]))"checkbox"!=this.type&&(targetJS[key].push(nVal),this.keySeq=targetJS[key].length-1);else{var oVal=targetJS[key];if("radio"==this.type);else if("checkbox"==this.type){var keyLength=0;axdom.each(collectItem,function(){this.keys.join(".")==keys.join(".")&&keyLength++}),1==keyLength?targetJS[key]=oVal:(targetJS[key]=[oVal],targetJS[key].push(nVal),this.keySeq=targetJS[key].length-1)}else targetJS[key]=[oVal],targetJS[key].push(nVal),this.keySeq=targetJS[key].length-1}if(cfg.cursorFocus){var jQueryObj=item.jQueryObj;"select"==jQueryObj.attr("data-axbind")?jQueryObj.bindSelectGetAnchorObject().unbind("keydown.AXModelControl").bind("keydown.AXModelControl",function(event){setTimeout(function(){oncursorKeyup(jQueryObj,event,itemIndex)},10)}):jQueryObj.unbind("keydown.AXModelControl").bind("keydown.AXModelControl",function(event){setTimeout(function(){oncursorKeyup(jQueryObj,event,itemIndex)},10)})}}),this.returnJSData=returnJSData},sync:function(){this.config;this.collectItem||this.collectModelItem()},clearCollect:function(){this.collectItem=void 0},getData:function(){this.config;this.sync();var getElementValue=function(jQueryObj,type){return"radio"!=type&&"checkbox"!=type?jQueryObj.val():jQueryObj.get(0).checked?jQueryObj.val():void 0},returnJSData=this.returnJSData,collectItem=this.collectItem;return axdom.each(this.collectItem,function(){for(var key,keys=this.keys,targetJS=returnJSData,kidx=0;kidx<keys.length-1;kidx++)key=keys[kidx],void 0==targetJS[key]&&(targetJS[key]={}),targetJS=targetJS[key];if(key=keys.last(),"checkbox"==this.type){var keyLength=0;axdom.each(collectItem,function(){this.keys.join(".")==keys.join(".")&&keyLength++}),keyLength>1?targetJS[key]=[]:targetJS[key]=""}}),axdom.each(this.collectItem,function(){for(var key,keys=this.keys,targetJS=returnJSData,kidx=0;kidx<keys.length-1;kidx++)key=keys[kidx],void 0==targetJS[key]&&(targetJS[key]={}),targetJS=targetJS[key];key=keys.last();var nVal=getElementValue(this.jQueryObj,this.type);if("checkbox"==this.type){if(!AXUtil.isEmpty(nVal)){var keyLength=0;axdom.each(collectItem,function(){this.keys.join(".")==keys.join(".")&&keyLength++}),keyLength>1?targetJS[key].push(nVal):targetJS[key]=nVal}}else"radio"==this.type?AXUtil.isEmpty(nVal)||(targetJS[key]=nVal):Object.isArray(targetJS[key])?targetJS[key][this.keySeq]=nVal:targetJS[key]=nVal}),this.returnJSData=returnJSData,Object.clone(this.returnJSData)},setData:function(jsPathObj,val){if(Object.isString(val)||Object.isArray(val)||Object.isNumber(val))this.applyValue(jsPathObj,val);else{var applyValue=this.applyValue.bind(this),fnApplyValue=function(prefixKey,_val,depth){depth>5||(""!=prefixKey&&(prefixKey+="."),axf.each(_val,function(k,v){Object.isString(v)||Object.isArray(v)||AXUtil.isEmpty(v)||Object.isNumber(v)?applyValue({key:prefixKey+k},v):fnApplyValue(prefixKey+k,v,depth+1)}))};fnApplyValue("",val,0)}return!0},applyValue:function(jsPathObj,val){var cfg=this.config;this.getData();var returnJSData=this.returnJSData;if(jsPathObj.key)try{eval("returnJSData = returnJSData."+jsPathObj.key)}catch(e){trace(e)}if(void 0!=returnJSData)if(Object.isString(val)||Object.isNumber(val)){var findedItem=!1;if(axdom.each(this.collectItem,function(){if(this.keys.join(".")==jsPathObj.key)if(void 0!=jsPathObj.keySeq){if(jsPathObj.keySeq==this.keySeq)return this.jQueryObj.val(val),findedItem=!0,!1}else{if("radio"!=this.type&&"checkbox"!=this.type)return this.jQueryObj.val(val),findedItem=!0,!1;this.jQueryObj.get(0).value==val?(this.jQueryObj.get(0).checked=!0,findedItem=!0):(this.jQueryObj.get(0).checked=!1,findedItem=!0)}}),!findedItem)return{error:"not found keySeq"}}else if(Object.isArray(val)){var findedItem=!1;if(axdom.each(this.collectItem,function(){if(this.keys.join(".")==jsPathObj.key)if(void 0!=jsPathObj.keySeq){if(jsPathObj.keySeq==this.keySeq)return this.jQueryObj.val(val.join(",")),findedItem=!0,!1}else if("checkbox"==this.type||"radio"==this.type){var jQueryObj=this.jQueryObj;0==val.length?jQueryObj.get(0).checked=!1:(jQueryObj.get(0).checked=!1,axf.each(val,function(){jQueryObj.get(0).value==this&&(jQueryObj.get(0).checked=!0)})),findedItem=!0}else void 0!=val[this.keySeq]&&(this.jQueryObj.val(val[this.keySeq]),findedItem=!0)}),!findedItem)return{error:"not found keySeq"}}return!0},oncursorKeyup:function(jQueryObj,event,itemIndex){var cfg=this.config;if(!event.ctrlKey&&cfg.oncursor){var axbind=jQueryObj.attr("data-axbind"),htmlTag=jQueryObj.get(0).type,direction="";if(event.keyCode==AXUtil.Event.KEY_UP?direction="U":event.keyCode==AXUtil.Event.KEY_DOWN?direction="D":event.keyCode==AXUtil.Event.KEY_LEFT?direction="L":event.keyCode==AXUtil.Event.KEY_RIGHT?direction="R":event.keyCode==AXUtil.Event.KEY_RETURN&&"select"!=axbind&&"textarea"!=htmlTag&&(direction="E"),cfg.oncursor.call({event:event,direction:direction,itemIndex:itemIndex,jQueryObj:jQueryObj})===!1)return!1;if(""==direction)return;if("U"==direction||"D"==direction||"L"==direction||"R"==direction)return;if("E"==direction&&(event.shiftKey||event.metaKey)){if(0==itemIndex)return void(cfg.oncursorEmpty&&cfg.oncursorEmpty({type:"indexOver",index:-1}));this.blurItem(jQueryObj);for(var nextItemIndex=itemIndex-1,ii=nextItemIndex;ii>-1;ii--)if(!this.collectItem[ii].jQueryObj.get(0).disabled){nextItemIndex=ii;break}this.focusItem(this.collectItem[nextItemIndex].jQueryObj)}else if("E"==direction){if(itemIndex>=this.collectItem.length-1)return void(cfg.oncursorEmpty&&cfg.oncursorEmpty({type:"indexOver",index:1}));this.blurItem(jQueryObj);for(var nextItemIndex=itemIndex+1,ii=nextItemIndex;ii<this.collectItem.length;ii++)if(!this.collectItem[ii].jQueryObj.get(0).disabled){nextItemIndex=ii;break}this.focusItem(this.collectItem[nextItemIndex].jQueryObj)}}},blurItem:function(jQueryObj){var axbind=(this.config,jQueryObj.attr("data-axbind"));axbind&&("select"==axbind?jQueryObj.bindSelectBlur():"selector"==axbind&&jQueryObj.bindSelectorBlur())},focusItem:function(jQueryObj){var axbind=(this.config,jQueryObj.attr("data-axbind"));axbind?"select"==axbind?jQueryObj.bindSelectFocus():"selector"==axbind?jQueryObj.focus():jQueryObj.focus():jQueryObj.focus()},focus:function(focusIndex){this.config;void 0==focusIndex&&(focusIndex=0),Object.isString(focusIndex)?"first"==focusIndex?focusIndex=0:"last"==focusIndex&&(focusIndex=this.collectItem.length-1):(0>focusIndex&&(focusIndex=0),focusIndex>=this.collectItem.length&&(focusIndex=this.collectItem.length-1)),this.focusItem(this.collectItem[focusIndex].jQueryObj)}}),AXModelControlGrid=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.config.theme="AXModelControlGrid",this.removedList=[]},init:function(){var cfg=this.config;if(Object.isUndefined(cfg.targetID))return void trace("need targetID - setConfig({targetID:''})");this.target=jQuery("#"+cfg.targetID);var theme=cfg.theme,ol=[];ol.push('<div class="'+theme+'" id="'+cfg.targetID+'_AX_grid" style="">'),ol.push('	<div class="AXgridScrollBody" id="'+cfg.targetID+'_AX_gridScrollBody" style="z-index:2;">'),ol.push('		<div class="AXGridColHead AXUserSelectNone" id="'+cfg.targetID+'_AX_gridColHead" onselectstart="return false;"></div>'),ol.push('		<div class="AXGridBody" id="'+cfg.targetID+'_AX_gridBody"></div>'),ol.push("	</div>"),this.target.empty(),this.target.append(ol.join("")),this.gridBody=jQuery("#"+cfg.targetID+"_AX_grid"),this.scrollBody=jQuery("#"+cfg.targetID+"_AX_gridScrollBody"),this.colHead=jQuery("#"+cfg.targetID+"_AX_gridColHead"),this.body=jQuery("#"+cfg.targetID+"_AX_gridBody"),this.setColHead(),this.myUIScroll=new AXScroll,this.myUIScroll.setConfig({targetID:cfg.targetID+"_AX_grid",scrollID:cfg.targetID+"_AX_gridScrollBody",touchDirection:!1,yscroll:!1,xscroll:!0}),jQuery(window).bind("resize",this.windowResize.bind(this))},windowResizeApply:function(){var cfg=this.config,bodyWidth=this.gridBody.width()-2,colWidth=0,astricCount=0;axdom.each(cfg.colGroup,function(cidx,CG){CG.widthAstric&&(CG.width=0,CG._owidth=CG.width,astricCount++),colWidth+=(CG._owidth||0).number()}),this.colWidth=colWidth;var newColWidth=0;if(bodyWidth>colWidth+100*astricCount){var remainsWidth=bodyWidth-colWidth;axdom.each(cfg.colGroup,function(cidx,CG){CG.widthAstric&&(CG._owidth=remainsWidth/astricCount,CG.width=CG._owidth,colWidth+=(CG._owidth||0).number()),newColWidth+=CG.width.number()})}else axdom.each(cfg.colGroup,function(cidx,CG){CG.widthAstric&&(CG._owidth=200,CG.width=200,colWidth+=(CG._owidth||0).number()),newColWidth+=CG.width.number()});this.colWidth=newColWidth,axdom.each(cfg.colGroup,function(cidx,CG){axdom("#"+cfg.targetID+"_AX_col_AX_"+cidx+"_AX_head").attr("width",this.width),axdom("#"+cfg.targetID+"_AX_col_AX_"+cidx+"_AX_body").attr("width",this.width)}),this.scrollBody.css({width:this.colWidth}),this.colHead.find("table").css({width:this.colWidth}),this.body.find("table").css({width:this.colWidth}),this.myUIScroll.resizeScroll(),this.myUIScroll.moveTo(0)},getColGroup:function(subfix){var cfg=this.config,po=[];return po.push("<colgroup>"),axdom.each(cfg.colGroup,function(cidx,CG){po.push('<col width="'+CG.width+'" style="" id="'+cfg.targetID+"_AX_col_AX_"+cidx+"_AX_"+subfix+'" />')}),po.push("</colgroup>"),po.join("")},getHeadItem:function(arg){var po=(this.config,[]);if(po.push('<td class="colHeadTd">'),po.push('	<div class="tdRelBlock" style="text-align:'+(arg.align||"left")+';">'),arg.html){var html=arg.html.call({rowIndex:arg.rowIndex,colIndex:arg.colIndex,data:arg.data});po.push(html)}else po.push(arg.label);return po.push("	</div>"),po.push("</td>"),po.join("")},setColHead:function(rewrite){var cfg=this.config,bodyWidth=this.gridBody.width()-2,colWidth=0,astricCount=0;axdom.each(cfg.colGroup,function(cidx,CG){rewrite?CG.widthAstric&&(CG.width=0,CG._owidth=CG.width,astricCount++):("*"==CG.width&&(CG.width=0,CG.widthAstric=!0,astricCount++),CG._owidth=CG.width),colWidth+=(CG._owidth||0).number()}),this.colWidth=colWidth;var newColWidth=0;if(bodyWidth>colWidth+100*astricCount){var remainsWidth=bodyWidth-colWidth;axdom.each(cfg.colGroup,function(cidx,CG){CG.widthAstric&&(CG._owidth=remainsWidth/astricCount,
  CG.width=CG._owidth,colWidth+=(CG._owidth||0).number()),newColWidth+=CG.width.number()})}else axdom.each(cfg.colGroup,function(cidx,CG){CG.widthAstric&&(CG._owidth=200,CG.width=200,colWidth+=(CG._owidth||0).number()),newColWidth+=CG.width.number()});this.colWidth=newColWidth,this.scrollBody.css({width:this.colWidth});var getHeadItem=this.getHeadItem.bind(this),po=[];po.push('<table class="colHeadTable" style="width:'+this.colWidth+'px;">'),po.push(this.getColGroup("head")),po.push("<tbody>"),po.push("<tr>");var colCount=0;axdom.each(cfg.colGroup,function(CHidx,CH){po.push(getHeadItem({rowIndex:0,colIndex:CHidx,align:CH.align,label:CH.label,html:CH.html,data:CH.data})),colCount+=CH.colspan}),po.push("</tr>"),po.push("</tbody>"),po.push("</table>"),this.colHead.empty(),this.colHead.append(po.join(""))},setList:function(list,setType){this.config;"undefined"==typeof setType?(this.list=list,this.removedList=[]):this.list=list,this.printList(),this.myUIScroll.resizeScroll()},appendList:function(item){this.config;item._CUD="C",this.list.push(item);var lidx=this.list.length-1;this.printItem(lidx,this.list[lidx]),this.printFootItem(),this.myUIScroll.resizeScroll()},getItem:function(arg,update){var po=(this.config,[]);if(void 0==update&&po.push('<td class="bodyTd">'),po.push('	<div class="tdRelBlock" style="text-align:'+(arg.align||"left")+';">'),arg.html){var html=arg.html.call({rowIndex:arg.rowIndex,colIndex:arg.colIndex,data:arg.data,item:this.list[arg.rowIndex],list:this.list});po.push(html)}else po.push("&nbsp;");return po.push("	</div>"),void 0==update&&po.push("</td>"),po.join("")},printList:function(){var printItem=(this.config,this.printItem.bind(this)),po=[];po.push('<table class="gridBodyTable" style="width:'+this.colWidth+'px;">'),po.push(this.getColGroup("body")),po.push("<tbody>"),po.push("</tbody>"),po.push("<tfoot>"),po.push("</tfoot>"),po.push("</table>"),this.body.empty(),this.body.append(po.join("")),axdom.each(this.list,function(lidx,L){printItem(lidx,L)}),this.printFootItem()},printItem:function(lidx,L,update,event){var cfg=this.config,getItem=this.getItem.bind(this),AXbindOnchange=this.AXbindOnchange.bind(this),_body=this.body.find("tbody");if(L){var tr=[];void 0==update&&tr.push("<tr class='modelControlTR' id='"+cfg.targetID+"_tbodyTR_"+lidx+"'>"),axdom.each(cfg.body.form,function(fidx,form){form&&tr.push(getItem({rowIndex:lidx,colIndex:fidx,align:form.align||"left",html:form.html,data:form.data}))}),void 0==update&&tr.push("</tr>"),void 0==update?_body.append(tr.join("")):_body.find("#"+cfg.targetID+"_tbodyTR_"+lidx).html(tr.join(""));var oncursorKeyup=this.oncursorKeyup.bind(this);axdom.each(cfg.body.form,function(fidx,form){if(form&&form.AXBind){var bindID=form.AXBind.id.replace(/@rowIndex/g,lidx),myConfig=AXUtil.copyObject(form.AXBind.config);axdom.each(myConfig,function(k,v){Object.isString(v)&&(myConfig[k]=v.replace(/@rowIndex/g,lidx))}),myConfig.onchange=function(){AXbindOnchange(lidx,fidx,this)},"TwinDate"==form.AXBind.type?jQuery("#"+bindID).bindTwinDate(myConfig):"Date"==form.AXBind.type?jQuery("#"+bindID).bindDate(myConfig):"Select"==form.AXBind.type?(jQuery("#"+bindID).unbindSelect(),jQuery("#"+bindID).bindSelect(myConfig),cfg.cursorFocus&&jQuery("#"+bindID).bindSelectGetAnchorObject().bind("keydown.AXModelControlGrid",function(event){setTimeout(function(){oncursorKeyup(jQuery("#"+bindID),event,lidx)},10)})):"Selector"==form.AXBind.type?jQuery("#"+bindID).bindSelector(myConfig):"Money"==form.AXBind.type?jQuery("#"+bindID).bindMoney(myConfig):"Number"==form.AXBind.type&&jQuery("#"+bindID).bindNumber(myConfig)}}),cfg.cursorFocus&&_body.find("#"+cfg.targetID+"_tbodyTR_"+lidx).find("input[type=text],input[type=checkbox],input[type=radio],select,textarea").unbind("keydown.AXModelControlGrid").bind("keydown.AXModelControlGrid",function(event){setTimeout(function(){oncursorKeyup(jQuery(event.target),event,lidx)},10)});var printFootItem=this.printFootItem.bind(this),_this=this;_body.find("#"+cfg.targetID+"_tbodyTR_"+lidx).find("input[type=text],input[type=checkbox],input[type=radio],select,textarea").unbind("change.AXModelControlGrid").bind("change.AXModelControlGrid",function(){_this.list[lidx][this.name]=axdom(this).val(),printFootItem()})}},oncursorKeyup:function(jQueryObj,event,lidx){var cfg=this.config;if(event.target&&!(event.shiftKey||event.metaKey||event.ctrlKey)){var eventName=jQueryObj.get(0).name;if(cfg.oncursor){var axbind=jQueryObj.attr("data-axbind"),direction="";if(event.keyCode==AXUtil.Event.KEY_UP?direction="U":event.keyCode==AXUtil.Event.KEY_DOWN?direction="D":event.keyCode==AXUtil.Event.KEY_LEFT?direction="L":event.keyCode==AXUtil.Event.KEY_RIGHT?direction="R":event.keyCode==AXUtil.Event.KEY_RETURN&&"select"!=axbind&&(direction="R"),cfg.oncursor.call({event:event,direction:direction,listIndex:lidx,jQueryObj:jQueryObj})===!1)return!1;if(""==direction)return;if(axbind&&("U"==direction||"D"==direction))return;if(("U"==direction||"D"==direction)&&"SELECT"==jQueryObj.get(0).tagName)return;if("U"==direction){if(0==lidx)return;this.blurItem(jQueryObj);var findItem,nextItemList=this.body.find("#"+cfg.targetID+"_tbodyTR_"+(lidx-1)).find("input[type=text],input[type=checkbox],input[type=radio],select,textarea");nextItemList.each(function(){this.name==eventName&&(findItem=this)}),this.focusItem(jQuery(findItem))}else if("D"==direction){if(lidx>=this.list.length-1)return;this.blurItem(jQueryObj);var findItem,nextItemList=this.body.find("#"+cfg.targetID+"_tbodyTR_"+(lidx+1)).find("input[type=text],input[type=checkbox],input[type=radio],select,textarea");nextItemList.each(function(){this.name==eventName&&(findItem=this)}),this.focusItem(jQuery(findItem))}else if("L"==direction){var colIndex,itemList=this.body.find("#"+cfg.targetID+"_tbodyTR_"+lidx).find("input[type=text],input[type=checkbox],input[type=radio],select,textarea");if(itemList.each(function(cidx,item){this.name==eventName&&(colIndex=cidx)}),0==colIndex){if(0==lidx)return;this.blurItem(jQueryObj);var nextItemList=this.body.find("#"+cfg.targetID+"_tbodyTR_"+(lidx-1)).find("input[type=text],input[type=checkbox],input[type=radio],select,textarea");this.focusItem(jQuery(nextItemList.last()))}else this.blurItem(jQueryObj),this.focusItem(jQuery(itemList[colIndex-1]))}else if("R"==direction){var colIndex,itemList=this.body.find("#"+cfg.targetID+"_tbodyTR_"+lidx).find("input[type=text],input[type=checkbox],input[type=radio],select,textarea");if(itemList.each(function(cidx,item){this.name==eventName&&(colIndex=cidx)}),colIndex>=itemList.length-1){if(lidx>=this.list.length-1)return;this.blurItem(jQueryObj);var nextItemList=this.body.find("#"+cfg.targetID+"_tbodyTR_"+(lidx+1)).find("input[type=text],input[type=checkbox],input[type=radio],select,textarea");this.focusItem(jQuery(nextItemList.first()))}else this.blurItem(jQueryObj),this.focusItem(jQuery(itemList[colIndex+1]))}}}},blurItem:function(jQueryObj){var axbind=(this.config,jQueryObj.attr("data-axbind"));axbind&&("select"==axbind?jQueryObj.bindSelectBlur():"selector"==axbind&&jQueryObj.bindSelectorBlur())},focusItem:function(jQueryObj){var axbind=(this.config,jQueryObj.attr("data-axbind"));axbind?"select"==axbind?jQueryObj.bindSelectFocus():"selector"==axbind?jQueryObj.focus():jQueryObj.focus():jQueryObj.focus()},focusIndex:function(rowIndex,colIndex){var cfg=this.config,myTd=this.body.find("tbody tr#"+cfg.targetID+"_tbodyTR_"+rowIndex+" td:nth-child("+(colIndex+1)+")"),item=myTd.find("input[type=text],input[type=checkbox],input[type=radio],select,textarea").get(0);item.focus()},AXbindOnchange:function(lidx,fidx,AXBindThis){var cfg=this.config;if(cfg.body.form[fidx].AXBind.onchange||(cfg.body.form[fidx].AXBind.onchange=cfg.body.form[fidx].AXBind.onChange),cfg.body.form[fidx].AXBind.onchange){var sendObj={rowIndex:lidx,colIndex:fidx,data:cfg.body.form[fidx].data,item:this.list[lidx],list:this.list};axf.each(AXBindThis,function(k,v){sendObj[k]=v}),cfg.body.form[fidx].AXBind.onchange.call(sendObj)}},printFootItem:function(){var cfg=this.config;if(cfg.foot&&cfg.foot.form){var _body=this.body.find("tfoot"),_list=this.list,foot=[];foot.push("<tr class='modelControlTR' id='"+cfg.targetID+"_tbodyTR_foot'>"),axdom.each(cfg.foot.form,function(fidx,arg){if(foot.push('<td class="bodyTd" colspan="'+(arg.colspan||1)+'">'),foot.push('	<div class="tdRelBlock" style="text-align:'+(arg.align||"left")+';">'),arg.html){var html=arg.html.call({rowIndex:0,colIndex:fidx,data:arg.data,list:_list});foot.push(html)}else foot.push("&nbsp;");foot.push("	</div>"),foot.push("</td>")}),foot.push("</tr>"),_body.empty(),_body.append(foot.join(""))}},updateItem:function(lidx,item,onlyDataChane,event){var cfg=this.config,getItem=this.getItem.bind(this);if(item._CUD="U",this.list[lidx]=AXUtil.overwriteObject(this.list[lidx],item,!0),onlyDataChane){var _body=this.body;axdom.each(cfg.body.form,function(fidx,form){if(form.updateReload){var td=getItem({rowIndex:lidx,colIndex:fidx,align:form.align,html:form.html,data:form.data},"update"),myTD=jQuery(_body.find("tbody tr#"+cfg.targetID+"_tbodyTR_"+lidx+" td").get(fidx));myTD.html(td)}});var oncursorKeyup=this.oncursorKeyup.bind(this);cfg.cursorFocus&&_body.find("#"+cfg.targetID+"_tbodyTR_"+lidx).find("input[type=text],input[type=checkbox],input[type=radio],select,textarea").unbind("keyup.AXModelControlGrid").bind("keyup.AXModelControlGrid",function(event){oncursorKeyup(jQuery(event.target),event,lidx)})}else this.printItem(lidx,this.list[lidx],"update",event);this.printFootItem()},removeItem:function(collectIdx){var _this=(this.config,this);this.list=this.getList();var newList=[];axf.each(this.list,function(lidx,L){if(Object.isArray(collectIdx)){var isOk=!0;axf.each(collectIdx,function(){this==lidx&&(isOk=!1)}),isOk?newList.push(L):"C"!=L._CUD&&"D"!=L._CUD&&_this.removedList.push(L)}else collectIdx!=lidx?newList.push(L):"C"!=L._CUD&&"D"!=L._CUD&&_this.removedList.push(L)}),this.setList(newList,"update")},getValue:function(name){var returnValues=(this.config,[]);return this.body.find("input[type=checkbox][name="+name+"]").each(function(){returnValues.push(this.value)}),returnValues},getCheckedValue:function(name){var returnValues=(this.config,[]);return this.body.find("input[type=checkbox][name="+name+"]:checked").each(function(){returnValues.push(this.value)}),returnValues},getList:function(){var cfg=this.config,_body=this.body.find("tbody");return axf.each(this.list,function(lidx,L){var item={};_body.find("#"+cfg.targetID+"_tbodyTR_"+lidx).find("input[type=text],select,textarea").each(function(){item[this.name]=axdom(this).val()});var checkNames={};_body.find("#"+cfg.targetID+"_tbodyTR_"+lidx).find("input[type=checkbox],input[type=radio]").each(function(){"checkbox"==this.type&&(checkNames[this.name]?checkNames[this.name].count+=1:(checkNames[this.name]={name:this.name,count:1},item[this.name]="")),this.checked&&("checkbox"==this.type?item[this.name]?item[this.name].push(this.value):item[this.name]=[this.value]:item[this.name]=this.value)}),axdom.each(checkNames,function(k,v){1==v.count&&Object.isArray(item[v.name])&&(item[v.name]=item[v.name].join(","))}),L=AXUtil.overwriteObject(L,item,!0)}),this.list},getRemovedList:function(){return this.removedList}}),AXMultiSelector=Class.create(AXJ,{version:"AXMultiSelector v1.21",author:"tom@axisj.com",logs:["2013-08-01 오후 3:08:07","2014-03-21 오후 2:19:52 : tom multiselect 기본값 설정 함수 추가"],initialize:function(AXJ_super){AXJ_super()},init:function(){var cfg=this.config;axdom("#"+cfg.targetID).bind("click",this.expandOptionBox.bind(this))},expandOptionBox:function(){var cfg=this.config;axdom.each(cfg.optionGroup,function(gidx,G){G.getOptionValue&&axdom.each(cfg.optionGroup[gidx].options,function(oidx,O){cfg.optionGroup[gidx].options[oidx].selected=!1})});var po=[];po.push('<div id="'+cfg.targetID+'_AX_expandBox" class="AXMultiSelector_expandBox">');var boxWidth=0;axdom.each(cfg.optionGroup,function(gidx,G){po.push('<div id="'+cfg.targetID+"_AX_expandScrollBox_AX_"+gidx+'" class="AXMultiSelector_scrollBox" style="width:'+this.width+'px;">'),po.push('	<div id="'+cfg.targetID+"_AX_expandScroll_AX_"+gidx+'" class="AXMultiSelector_scroll">'),axdom.each(this.options,function(index,O){var selectedClass=O.selected?" on":"";po.push('<a href="#AXexec" id="'+cfg.targetID+"_AX_"+gidx+"_AX_option_AX_"+index+'" class="bindSelectorNodes '+selectedClass+'">'+O.optionText+"</a>")}),po.push("	</div>"),po.push("</div>"),boxWidth+=this.width+2}),po.push('<div style="clear:both"></div>'),po.push('<div align="center" style="padding-top:5px;">'),po.push('	<input type="button" value="확인" class="AXButton" id="'+cfg.targetID+'_AX_expandScrollBox_AX_confirm" />'),po.push('	<input type="button" value="취소" class="AXButton" id="'+cfg.targetID+'_AX_expandScrollBox_AX_cancel" />'),po.push("</div>"),po.push("</div>"),axdom(document.body).append(po.join("")),boxWidth=boxWidth+5*cfg.optionGroup.length+5,axdom("#"+cfg.targetID+"_AX_expandBox").css({width:boxWidth});var css={},offset=axdom("#"+cfg.targetID).offset();css.top=offset.top,css.left=offset.left,axdom("#"+cfg.targetID+"_AX_expandBox").css(css),axdom.each(cfg.optionGroup,function(gidx,G){G.myUIScroll=new AXScroll,G.myUIScroll.setConfig({CT_className:"AXScrollSmall",targetID:cfg.targetID+"_AX_expandScrollBox_AX_"+gidx,scrollID:cfg.targetID+"_AX_expandScroll_AX_"+gidx,touchDirection:!1});var selectedValue="";G.getOptionValue&&(selectedValue=G.getOptionValue.call(G)),axdom.each(cfg.optionGroup[gidx].options,function(oidx,O){G.getOptionValue?O.optionValue==selectedValue&&(O.selected=!0,axdom("#"+cfg.targetID+"_AX_"+gidx+"_AX_option_AX_"+oidx).addClass("on"),G.myUIScroll.focusElement(cfg.targetID+"_AX_"+gidx+"_AX_option_AX_"+oidx)):O.selected?(O.selected=!0,axdom("#"+cfg.targetID+"_AX_"+gidx+"_AX_option_AX_"+oidx).addClass("on"),G.myUIScroll.focusElement(cfg.targetID+"_AX_"+gidx+"_AX_option_AX_"+oidx)):cfg.optionGroup[gidx].options[oidx].selected=!1})}),axdom("#"+cfg.targetID+"_AX_expandScrollBox_AX_confirm").bind("click",function(){if(cfg.onChange){var selectObj={};axdom.each(cfg.optionGroup,function(gidx,G){selectObj[G.name]={},axdom.each(cfg.optionGroup[gidx].options,function(oidx,O){O.selected&&(selectObj[G.name]=O)})}),cfg.onChange.call(selectObj)}axdom("#"+cfg.targetID+"_AX_expandBox").remove()}),axdom("#"+cfg.targetID+"_AX_expandScrollBox_AX_cancel").bind("click",function(){axdom("#"+cfg.targetID+"_AX_expandBox").remove()}),axdom("#"+cfg.targetID+"_AX_expandBox").find(".bindSelectorNodes").bind("click",function(event){var idx=event.target.id.split(/_AX_/g),gidx=idx[idx.length-3],index=idx[idx.length-1];axdom("#"+cfg.targetID+"_AX_"+gidx+"_AX_option_AX_"+index).addClass("on"),axdom.each(cfg.optionGroup[gidx].options,function(oidx,O){O.selected&&(axdom("#"+cfg.targetID+"_AX_"+gidx+"_AX_option_AX_"+oidx).removeClass("on"),delete O.selected)}),cfg.optionGroup[gidx].options[index].selected=!0})},setValue:function(obj){var cfg=this.config;axdom.each(cfg.optionGroup,function(gidx,G){axdom.each(obj,function(k,v){G.name==k&&axdom.each(G.options,function(){this.optionValue+""==v+""?this.selected=!0:delete this.selected})})})}}),AXProgress=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.Observer=null,this.config.duration=50,this.config.theme="AXlineProgress"},init:function(){},start:function(callBack,options){var config=this.config;config.callBack=callBack,config.options=options;var totalCount=config.totalCount||100;this.loadedCount=0;var loadedCount=this.loadedCount,loadedRate=(loadedCount/totalCount*100).round(1),progressWidth=config.width||200,progressTitle=config.title||"",progressTop=config.top||0;this.progressID="progress_AX_"+AXUtil.timekey();var progressID=this.progressID;this.progressStop=!1;var theme=config.theme,hasCancel=!1;config.options&&(config.options.totalCount&&(totalCount=config.options.totalCount),config.options.width&&(progressWidth=config.options.width),config.options.top&&(progressTop=config.options.top),config.options.title&&(progressTitle=config.options.title),config.options.cancel&&(hasCancel=config.options.cancel),config.options.theme&&(theme=config.options.theme));var po=[];po.push('<div class="AXprogressTray '+theme+'" id="'+progressID+'_AX_tray" align="center" style="top:'+progressTop+'px;">'),""!=progressTitle&&po.push('	<div class="AXprogressTitle" id="'+progressID+'_AX_title" style="width:'+progressWidth+'px;" align="left">'+progressTitle+"</div>"),po.push('<div class="AXprogress" id="'+progressID+'" style="width:'+progressWidth+'px;">'),po.push('	<div class="AXprogressContainer" id="'+progressID+'_AX_container" align="left" style="overflow:hidden;">'),"AXlineProgress"==theme?po.push('		<div class="AXprogressBar" id="'+progressID+'_AX_bar" style="width:'+loadedRate+'%;"></div>'):po.push('		<div class="AXprogressBar" id="'+progressID+'_AX_bar"></div>'),po.push("	</div>"),po.push('    <div class="AXprogressLoadedText" id="'+progressID+'_AX_loadedText">'+loadedRate+"%</div>"),hasCancel&&po.push(' <a href="#axexec" id="'+progressID+'_AX_cancel" class="AXprogressCancel">Cancel</a>'),po.push("</div>"),po.push("</div>"),this.progress=axdom(po.join("")),axdom(document.body).append(this.progress),axdom("#"+progressID+"_AX_cancel").bind("click",this.cancel.bind(this)),this.loadedCount=1,this.update()},update:function(){var config=this.config,theme=config.theme;if(!this.progressStop){var totalCount=config.totalCount||100;config.options&&(config.options.totalCount&&(totalCount=config.options.totalCount),config.options.theme&&(theme=config.options.theme));var loadedCount=this.loadedCount,progressID=this.progressID,loadedRate=((loadedCount-1)/totalCount.number()*100).round(1);loadedRate>100&&(loadedRate=100),axdom("#"+progressID+"_AX_loadedText").html(loadedRate+"%<span>"+(loadedCount-1).money()+"/"+totalCount.money()+"</span>"),"AXlineProgress"==theme?axdom("#"+progressID+"_AX_bar").animate({width:loadedRate+"%"},config.duration,"",function(){config.callBack&&config.callBack.call({totalCount:totalCount,loadedCount:loadedCount,loadedRate:(loadedCount/(totalCount.number()+1)*100).round(1),isEnd:loadedCount-1==totalCount})}):setTimeout(function(){axdom("#"+progressID+"_AX_bar").addClass("percent"+5*((loadedCount/totalCount.number()*100).round(0)/5).round()),config.callBack&&config.callBack.call({totalCount:totalCount,loadedCount:loadedCount-1,loadedRate:(loadedCount/(totalCount.number()+1)*100).round(1),isEnd:loadedCount-1==totalCount})},config.duration),this.loadedCount++}},cancel:function(){var config=this.config,cancelMSg=(this.progressID,AXConfig.AXProgress.cancelMsg);if(config.options){var cancel=config.options.cancel;if(cancel.confirmMsg&&(cancelMSg=cancel.confirmMsg),confirm(cancelMSg)){this.progressStop=!0;var totalCount=config.totalCount||100,loadedCount=this.loadedCount;cancel.oncancel.call({totalCount:totalCount,loadedCount:loadedCount,loadedRate:(loadedCount/totalCount*100).round(1),isEnd:loadedCount==totalCount})}}},restart:function(){this.progressStop=!1,this.update()},close:function(){var progressID=(this.config,this.progressID);axdom("#"+progressID+"_AX_tray").remove()}}),AXSearch=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.formbindMethod="script",this.config.theme="AXSearch",this.config.viewMode="dx"},init:function(){var cfg=this.config;if(Object.isUndefined(cfg.targetID))return void trace("need targetID - setConfig({targetID:''})");if(cfg.mediaQuery){var _viewMode="",clientWidth=axf.clientWidth();axf.each(cfg.mediaQuery,function(k,v){if(Object.isObject(v))if(void 0!=v.min&&void 0!=v.max){if(v.min<=clientWidth&&clientWidth<=v.max)return _viewMode="dx"==k?"dx":"mx",!1}else if(v.min<=clientWidth)return _viewMode="dx"==k?"dx":"mx",!1}),""!=_viewMode&&(cfg.viewMode=_viewMode)}this.target=axdom("#"+cfg.targetID),cfg.rows?(this.formbindMethod="script",this.setBody(),axdom(window).bind("resize",this.windowResize.bind(this))):"form"==this.target.get(0).tagName.lcase()&&(this.formbindMethod="tag",this.target.bind("submit",function(event){return cfg.onsubmit(),!1}),cfg.onkeydown&&(cfg.keydown_check_classname?this.target.find("."+cfg.keydown_check_classname).bind("keydown.axsearch",function(event){cfg.onkeydown(event)}):this.target.bind("keydown",function(event){cfg.onkeydown(event)})),cfg.onkeyup&&(cfg.keyup_check_classname?this.target.find("."+cfg.keyup_check_classname).bind("keyup.axsearch",function(event){cfg.onkeyup(event)}):this.target.bind("keyup",function(event){cfg.onkeyup(event)})),cfg.onreturn&&(cfg.return_check_classname?this.target.find("."+cfg.return_check_classname).bind("keydown.axsearch",function(event){event.keyCode==axf.Event.KEY_RETURN&&cfg.onreturn(event)}):this.target.bind("keydown",function(event){event.keyCode==axf.Event.KEY_RETURN&&cfg.onreturn(event)})),cfg.onchange&&(cfg.change_check_classname?this.target.find("."+cfg.change_check_classname).bind("change.axsearch",function(event){cfg.onchange(event)}):this.target.find("input, select, textarea").bind("change.axsearch",function(event){cfg.onchange(event)})),cfg.onfocus&&(cfg.focus_check_classname?this.target.find("."+cfg.focus_check_classname).bind("focus.axsearch",function(event){cfg.onfocus(event)}):this.target.find("input, select, textarea").bind("focus.axsearch",function(event){cfg.onfocus(event)})))},windowResizeApply:function(){var cfg=this.config;if(cfg.mediaQuery){var _viewMode="",clientWidth=axf.clientWidth();axf.each(cfg.mediaQuery,function(k,v){if(Object.isObject(v))if(void 0!=v.min&&void 0!=v.max){if(v.min<=clientWidth&&clientWidth<=v.max)return _viewMode="dx"==k?"dx":"mx",!1}else if(v.min<=clientWidth)return _viewMode="dx"==k?"dx":"mx",!1}),""!=_viewMode&&(cfg.viewMode=_viewMode)}this.target.find("."+cfg.theme).removeClass("dx"),this.target.find("."+cfg.theme).removeClass("mx"),this.target.find("."+cfg.theme).addClass(cfg.viewMode)},getItemHtml:function(gr,itemIndex,item){var cfg=this.config,po=[],itemAddClass=[],itemAddStyles=[],poAttr=[];if(item.addClass&&itemAddClass.push(item.addClass),item.style&&itemAddStyles.push(item.style),item.addAttr&&axdom.each(item.addAttr,function(idx,attr){poAttr.push(attr.attrKey+"="+attr.attrValue)}),"label"==item.type)po.push('<div class="searchItem searchLabel ',itemAddClass.join(" "),'" style="width:',item.width||"","px;text-align:",item.align||"center",";",itemAddStyles.join(""),'">'),po.push(item.value),po.push("</div>");else if("link"==item.type)po.push('<div class="searchItem searchLink ',itemAddClass.join(" "),'" style="width:',item.width||"","px;text-align:",item.align||"center",";",itemAddStyles.join(""),'">'),po.push('<input type="hidden" name="',item.key,'" id="',cfg.targetID+"_AX_"+gr+"_AX_"+itemIndex+"_AX_"+item.key,'" value="',item.value,'" />'),po.push('<label class="itemTable">'),item.label&&(po.push('<span class="th" style="min-width:',item.labelWidth||100,'px;">'),po.push(item.label),po.push("</span>")),po.push('<span class="td" style="',item.valueBoxStyle||"",'" title="',item.title||"",'">'),axdom.each(item.options,function(idx,Opt){idx>0&&po.push(" | ");var classOn="";item.value==Opt.optionValue&&(classOn=" on",item.selectedIndex=idx),po.push('<a href="#Axexec" class="searchLinkItem',classOn,'" id="',cfg.targetID+"_AX_"+gr+"_AX_"+itemIndex+"_AX_"+item.key+"_AX_"+idx,'" title="',Opt.title||"",'">',Opt.optionText,"</a>")}),po.push("</span>"),po.push("</label>"),po.push("</div>");else if("checkBox"==item.type){po.push('<div class="searchItem searchCheckbox ',itemAddClass.join(" "),'" style="width:',item.width||"","px;text-align:",item.align||"center",";",itemAddStyles.join(""),'">'),po.push('<span class="itemTable">'),item.label&&(po.push('<span class="th" style="min-width:',item.labelWidth||100,'px;">'),po.push(item.label),po.push("</span>")),po.push('<span class="td" style="',item.valueBoxStyle||"",'" title="',item.title||"",'">');var values=item.value.split(/,/g);axdom.each(item.options,function(idx,Opt){var isCheck=!1;axdom.each(values,function(){return this==Opt.optionValue?(isCheck=!0,!1):void 0}),po.push('<input type="checkbox" class="searchCheckboxItem ',itemAddClass.join(" "),'" name="',item.key,'" id="',cfg.targetID+"_AX_"+gr+"_AX_"+itemIndex+"_AX_"+item.key,"_AX_",idx,'" title="',Opt.title||"",'" value="',Opt.optionValue,'" '),isCheck&&po.push(' checked="checked" '),po.push(">"),po.push('<label for="',cfg.targetID+"_AX_"+gr+"_AX_"+itemIndex+"_AX_"+item.key,"_AX_",idx,'">',Opt.optionText," </label>")}),po.push("</span>"),po.push("</span>"),po.push("</div>")}else if("radioBox"==item.type){po.push('<div class="searchItem searchCheckbox ',itemAddClass.join(" "),'" style="width:',item.width||"","px;text-align:",item.align||"center",";",itemAddStyles.join(""),'">'),po.push('<label class="itemTable">'),item.label&&(po.push('<span class="th" style="min-width:',item.labelWidth||100,'px;">'),po.push(item.label),po.push("</span>")),po.push('<span class="td" style="',item.valueBoxStyle||"",'" title="',item.title||"",'">');var values=item.value.split(/,/g);axdom.each(item.options,function(idx,Opt){var isCheck=!1;axdom.each(values,function(){return this==Opt.optionValue?(isCheck=!0,!1):void 0}),po.push('<input type="radio" class="searchCheckboxItem ',itemAddClass.join(" "),'" name="',item.key,'" id="',cfg.targetID+"_AX_"+gr+"_AX_"+itemIndex+"_AX_"+item.key,"_AX_",idx,'" title="',item.title||"",'" value="',Opt.optionValue,'" '),isCheck&&po.push(' checked="checked" '),po.push(">"),po.push('<label for="',cfg.targetID+"_AX_"+gr+"_AX_"+itemIndex+"_AX_"+item.key,"_AX_",idx,'">',Opt.optionText," </label>")}),po.push("</span>"),po.push("</label>"),po.push("</div>")}else if("selectBox"==item.type){po.push('<div class="searchItem searchSelectbox ',itemAddClass.join(" "),'" style="text-align:',item.align||"center",";",itemAddStyles.join(""),'">'),po.push('<label class="itemTable">'),item.label&&(po.push('<span class="th" style="min-width:',item.labelWidth||100,'px;">'),po.push(item.label),po.push("</span>")),po.push('<span class="td selectBox" style="',item.valueBoxStyle||"",'" title="',item.title||"",'">');var selectWidth=item.width?item.width+"px":"auto";po.push('	<select name="',item.key,'" id="',cfg.targetID+"_AX_"+gr+"_AX_"+itemIndex+"_AX_"+item.key,'" title="',item.title||"",'" class="AXSelect searchSelectboxItem ',itemAddClass.join(" "),'" style="width:',selectWidth,';" '+poAttr.join(" ")+" >");var values=item.value.split(/,/g);axdom.each(item.options,function(idx,Opt){var isCheck=!1;axdom.each(values,function(){return this==Opt.optionValue?(isCheck=!0,!1):void 0}),po.push('<option value="',Opt.optionValue,'"'),isCheck&&po.push(' selected="selected"'),po.push(">",Opt.optionText,"</option>")}),po.push("	</select>"),po.push("</span>"),po.push("</label>"),po.push("</div>")}else if("inputText"==item.type){po.push('<div class="searchItem ',itemAddClass.join(" "),'" style="text-align:',item.align||"center",";",itemAddStyles.join(""),'">'),po.push('<label class="itemTable">'),item.label&&(po.push('<span class="th" style="min-width:',item.labelWidth||100,'px;">'),po.push(item.label),po.push("</span>")),po.push('<span class="td inputText" style="',item.valueBoxStyle||"",'" title="',item.title||"",'">');var inputWidth=(item.width||100).number();po.push('				<input type="text" name="',item.key,'" id="',cfg.targetID+"_AX_"+gr+"_AX_"+itemIndex+"_AX_"+item.key,'" title="',item.title||"",'" placeholder="'+(item.placeholder||"")+'" value="',item.value,'" class="AXInput searchInputTextItem ',itemAddClass.join(" "),'" style="width:',inputWidth,'px;" '+poAttr.join(" ")+" />"),po.push("</span>"),po.push("</label>"),po.push("</div>")}else if("hidden"==item.type)po.push('<input type="hidden" name="',item.key,'" id="',cfg.targetID+"_AX_"+gr+"_AX_"+itemIndex+"_AX_"+item.key,'" value="',item.value,'" />');else if("button"==item.type||"submit"==item.type){po.push('<div class="searchItem ',itemAddClass.join(" "),'" style="text-align:',item.align||"center",";",itemAddStyles.join(""),'">'),po.push('<label class="itemTable">'),item.label&&(po.push('<span class="th" style="min-width:',item.labelWidth||100,'px;">'),po.push(item.label),po.push("</span>")),po.push('<span class="td button" style="',item.valueBoxStyle||"",'" title="',item.title||"",'">');var inputWidth=(item.width||100).number();po.push('<button type="'+item.type+'" id="',cfg.targetID+"_AX_"+gr+"_AX_"+itemIndex+"_AX_"+item.key,'" title="',item.title||"",'" placeholder="',item.placeholder||"",'" style="width:',inputWidth,'px;" class="AXButton searchButtonItem ',itemAddClass.join(" "),'">',item.value,"</button>"),po.push("</span>"),po.push("</label>"),po.push("</div>")}return po.join("")},setBody:function(){var cfg=this.config,getItemHtml=this.getItemHtml.bind(this),po=[],AXBinds=[];po.push('<div class="'+cfg.theme+" "+cfg.viewMode+'">'),po.push('<form name="',cfg.targetID+"_AX_form",'" onsubmit="return false;">');for(var gr=0,hasHide=!1;gr<cfg.rows.length;){var styles=[],classs=[];cfg.rows[gr].display||(styles.push("display:none;"),classs.push("expandGroup"),hasHide=!0),cfg.rows[gr].addClass&&classs.push(cfg.rows[gr].addClass),po.push('<div class="searchGroup ',classs.join(" "),'" style="',styles.join(";"),'">'),axdom.each(cfg.rows[gr].list,function(itemIndex,item){po.push(getItemHtml(gr,itemIndex,item)),item.AXBind&&AXBinds.push({display:cfg.rows[gr].display,gr:gr,itemIndex:itemIndex,item:item}),po.push('<div class="itemClear"></div>')}),po.push('<div class="groupClear"></div>'),po.push("</div>"),gr++}hasHide&&(po.push('<a href="#axexec" class="expandHandle" id="',cfg.targetID,'_AX_expandHandle">'),po.push("상세검색"),po.push("</a>")),po.push("</form>"),po.push("</div>"),this.target.html(po.join("")),cfg.onsubmit&&(document[cfg.targetID+"_AX_form"].onsubmit=function(){return cfg.onsubmit(),!1}),axdom("#"+cfg.targetID+"_AX_expandHandle").bind("click",this.expandToggle.bind(this)),this.target.find(".searchLinkItem").bind("click",this.onclickLinkItem.bind(this)),this.target.find(".searchCheckboxItem").bind("click",this.onclickCheckboxItem.bind(this)),this.target.find(".searchSelectboxItem").bind("change",this.onChangeSelect.bind(this)),this.target.find(".searchInputTextItem").bind("change",this.onChangeInput.bind(this)),this.target.find(".searchButtonItem").bind("click",this.onclickButton.bind(this)),this.target.find(".searchInputTextItem").bind("focus",this.onFocusInput.bind(this)),this.target.find(".searchInputTextItem").bind("keydown",this.onKeyDownInput.bind(this)),this.target.find(".searchInputTextItem").bind("keyup",this.onKeyUpInput.bind(this)),this.AXBinds=AXBinds;var _this=this;setTimeout(function(){_this.AXBindItems()},10)},AXBindItems:function(){var cfg=this.config;axdom.each(this.AXBinds,function(){var gr=this.gr,itemIndex=this.itemIndex,item=this.item,display=this.display,itemID=cfg.targetID+"_AX_"+gr+"_AX_"+itemIndex+"_AX_"+item.key;if(display)if("selector"==item.AXBind.type)axdom("#"+itemID).bindSelector(item.AXBind.config);else if("select"==item.AXBind.type)try{axdom("#"+itemID).bindSelect(item.AXBind.config)}catch(e){}else if("date"==item.AXBind.type)axdom("#"+itemID).bindDate(item.AXBind.config);else if("twinDate"==item.AXBind.type){var startTargetID=item.AXBind.config.startTargetID,findItemID="";axdom.each(cfg.rows,function(gidx,G){axdom.each(this.list,function(itemIndex,item){item.key==startTargetID&&(findItemID=cfg.targetID+"_AX_"+gidx+"_AX_"+itemIndex+"_AX_"+item.key)})}),item.AXBind.config.startTargetID=findItemID,axdom("#"+itemID).bindTwinDate(item.AXBind.config)}})},expandToggle:function(){var cfg=this.config;this.expanded?(axdom("#"+cfg.targetID+"_AX_expandHandle").html("상세검색"),this.target.find(".expandGroup").hide(),this.expanded=!1):(axdom("#"+cfg.targetID+"_AX_expandHandle").html("상세검색창 닫기"),this.target.find(".expandGroup").show(),this.expanded=!0,axdom.each(this.AXBinds,function(){var gr=this.gr,itemIndex=this.itemIndex,item=this.item,display=this.display,itemID=cfg.targetID+"_AX_"+gr+"_AX_"+itemIndex+"_AX_"+item.key;if(!display)if("selector"==item.AXBind.type)axdom("#"+itemID).bindSelector(item.AXBind.config);else if("select"==item.AXBind.type)axdom("#"+itemID).bindSelect(item.AXBind.config);else if("date"==item.AXBind.type)axdom("#"+itemID).bindDate(item.AXBind.config);else if("twinDate"==item.AXBind.type){
  var startTargetID=item.AXBind.config.startTargetID.split(/_AX_/g).last(),findItemID="";axdom.each(cfg.rows,function(gidx,G){axdom.each(this.list,function(itemIndex,item){item.key==startTargetID&&(findItemID=cfg.targetID+"_AX_"+gidx+"_AX_"+itemIndex+"_AX_"+item.key)})}),item.AXBind.config.startTargetID=findItemID,axdom("#"+itemID).bindTwinDate(item.AXBind.config)}}))},onclickLinkItem:function(event){var cfg=this.config,ids=event.target.id.split(/_AX_/g),index=ids.pop(),gr=ids[ids.length-3],itemIndex=ids[ids.length-2],item=cfg.rows[gr].list[itemIndex],targetID="";axdom.each(ids,function(ii,io){ii>0&&(targetID+="_AX_"),targetID+=this}),void 0!=item.selectedIndex&&axdom("#"+targetID+"_AX_"+item.selectedIndex).removeClass("on"),item.selectedIndex=index,item.value=item.options[index].optionValue,axdom("#"+targetID+"_AX_"+index).addClass("on"),axdom("#"+targetID).val(item.options[index].optionValue),item.onChange&&item.onChange.call(item,item.options[index],item.options[index].optionValue)},onclickCheckboxItem:function(event){var cfg=this.config,ids=event.target.id.split(/_AX_/g),index=ids.pop(),gr=ids[ids.length-3],itemIndex=ids[ids.length-2],item=cfg.rows[gr].list[itemIndex],frm=document[cfg.targetID+"_AX_form"],selectedValue="";if(isNaN(frm[item.key].length))frm[item.key].checked&&(selectedValue=frm[item.key].value);else for(var i=0;i<frm[item.key].length;i++)frm[item.key][i].checked&&(selectedValue+=""==selectedValue?frm[item.key][i].value:","+frm[item.key][i].value);item.selectedIndex=index,item.value=selectedValue,item.onChange&&item.onChange.call(item,item.options[index],selectedValue)},onChangeSelect:function(event){var cfg=this.config,ids=event.target.id.split(/_AX_/g),gr=ids[ids.length-3],itemIndex=ids[ids.length-2],item=cfg.rows[gr].list[itemIndex],frm=document[cfg.targetID+"_AX_form"],selectedIndex=frm[item.key].selectedIndex,selectedValue=frm[item.key].options[selectedIndex].value;item.onChange&&item.onChange.call(item,item.options[selectedIndex],selectedValue)},onChangeInput:function(event){var cfg=this.config,ids=event.target.id.split(/_AX_/g),gr=ids[ids.length-3],itemIndex=ids[ids.length-2],item=cfg.rows[gr].list[itemIndex],frm=document[cfg.targetID+"_AX_form"],changeValue=frm[item.key].value;item.onChange&&item.onChange.call(item,changeValue)},onFocusInput:function(event){var cfg=this.config,ids=event.target.id.split(/_AX_/g),gr=ids[ids.length-3],itemIndex=ids[ids.length-2],item=cfg.rows[gr].list[itemIndex],frm=document[cfg.targetID+"_AX_form"],focusValue=frm[item.key].value;item.onFocus&&item.onFocus.call(item,focusValue,frm[item.key])},onclickButton:function(event){var cfg=this.config,target=axf.get_event_target(event.target,function(el){return"BUTTON"==(el.tagName||"").ucase()?!0:void 0});if(target){var ids=target.id.split(/_AX_/g),gr=ids[ids.length-3],itemIndex=ids[ids.length-2],item=cfg.rows[gr].list[itemIndex];item.onclick&&item.onclick.call(item)}},onKeyDownInput:function(event){var cfg=this.config,ids=event.target.id.split(/_AX_/g),gr=ids[ids.length-3],itemIndex=ids[ids.length-2],item=cfg.rows[gr].list[itemIndex],frm=document[cfg.targetID+"_AX_form"],changeValue=frm[item.key].value;item.onkeydown&&item.onkeydown.call(item,event,changeValue)},onKeyUpInput:function(event){var cfg=this.config,ids=event.target.id.split(/_AX_/g),gr=ids[ids.length-3],itemIndex=ids[ids.length-2],item=cfg.rows[gr].list[itemIndex],frm=document[cfg.targetID+"_AX_form"],changeValue=frm[item.key].value;item.onkeyup&&item.onkeyup.call(item,event,changeValue)},getParam:function(){var cfg=this.config,frm="script"==this.formbindMethod?document[cfg.targetID+"_AX_form"]:this.target;return axdom(frm).serialize()},reset:function(){var cfg=this.config,frm="script"==this.formbindMethod?document[cfg.targetID+"_AX_form"]:this.target;return axdom(frm).get(0).reset(),axdom(frm).find("[data-axbind=select]").bindSelectUpdate(),this},getItemId:function(key,value){for(var itemID,cfg=this.config,gr=0;gr<cfg.rows.length;)axdom.each(cfg.rows[gr].list,function(itemIndex,item){if(item.key==key){if("checkBox"!=item.type&&"radioBox"!=item.type)return itemID=cfg.targetID+"_AX_"+gr+"_AX_"+itemIndex+"_AX_"+item.key,!1;itemID=[],axdom.each(item.options,function(idx,Opt){itemID.push(cfg.targetID+"_AX_"+gr+"_AX_"+itemIndex+"_AX_"+item.key+"_AX_"+idx)})}}),gr++;return itemID},setItemValue:function(key,value){for(var cfg=this.config,gr=0;gr<cfg.rows.length;)axdom.each(cfg.rows[gr].list,function(itemIndex,item){if(item.key==key)if("checkBox"==item.type||"radioBox"==item.type){var values=[];Object.isArray(value)?values=value:""==value||values.push(value),axdom.each(item.options,function(idx,Opt){var itemID=cfg.targetID+"_AX_"+gr+"_AX_"+itemIndex+"_AX_"+item.key+"_AX_"+idx,isCheck=!1;axdom.each(values,function(){return this==Opt.optionValue?(isCheck=!0,!1):void 0}),AXgetId(itemID).checked=isCheck,itemID=null})}else if("selectBox"==item.type){var itemID=cfg.targetID+"_AX_"+gr+"_AX_"+itemIndex+"_AX_"+item.key,item_dom=axdom("#"+itemID);item_dom.attr("data-axbind")?item_dom.bindSelectSetValue(value||""):item_dom.val(value||"")}else{var itemID=cfg.targetID+"_AX_"+gr+"_AX_"+itemIndex+"_AX_"+item.key;axdom("#"+itemID).val(value||""),itemID=null}}),gr++},submit:function(){var cfg=this.config;return cfg.onsubmit&&cfg.onsubmit(),this}}),AXSelectConverter=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.objects=[],this.config.anchorClassName="AXanchor",this.config.anchorSelectClassName="AXanchorSelect"},init:function(){var browser=AXUtil.browser;this.isMobile=browser.mobile,axdom(window).resize(this.alignAllAnchor.bind(this)),this.config.reserveKeys={options:AXConfig.AXSelect&&AXConfig.AXSelect.keyOptions||"options",optionValue:AXConfig.AXSelect&&AXConfig.AXSelect.keyOptionValue||"optionValue",optionText:AXConfig.AXSelect&&AXConfig.AXSelect.keyOptionText||"optionText",optionData:AXConfig.AXSelect&&AXConfig.AXSelect.keyOptionData||"optionData"}},windowResize:function(){var windowResizeApply=this.windowResizeApply.bind(this);this.windowResizeObserver&&clearTimeout(this.windowResizeObserver),this.windowResizeObserver=setTimeout(function(){windowResizeApply()},10)},windowResizeApply:function(){this.windowResizeObserver&&clearTimeout(this.windowResizeObserver),this.alignAllAnchor()},alignAllAnchor:function(){for(var i=0;i<this.objects.length;i++)this.alignAnchor(this.objects[i].id,i)},bindSetConfig:function(objID,configs){for(var O,findIndex=null,index=0;index<this.objects.length&&(O=this.objects[index]);index++)if(O.id==objID&&1!=O.isDel){findIndex=index;break}if(null==findIndex);else{var _self=this.objects[findIndex];axdom.each(configs,function(k,v){_self.config[k]=v})}},unbind:function(obj){for(var removeAnchorId,removeIdx,O,index=0;index<this.objects.length&&(O=this.objects[index]);index++)O.id!=obj.id||1!=O.isDel&&(removeAnchorId=O.anchorID,removeIdx=index);if(removeAnchorId){var objDom=axdom("#"+obj.id),objAnchorDom=axdom("#"+removeAnchorId);this.objects[removeIdx].isDel=!0,objDom.removeAttr("data-axbind"),objDom.css({visibility:"visible"}),this.isMobile?(objAnchorDom.before(axdom("#"+obj.id)),objAnchorDom.remove()):(objAnchorDom.remove(),objDom.show())}},bind:function(obj){var cfg=this.config;AXgetId(obj.id)||(obj.id="AXSelect-"+axf.getUniqueId());var objID=obj.id,objSeq=null,objConfig={},reserveKeys=jQuery.extend({},cfg.reserveKeys);objConfig=jQuery.extend(objConfig,obj,!0),"undefined"==typeof objConfig.reserveKeys&&(objConfig.reserveKeys={}),objConfig.reserveKeys=jQuery.extend(reserveKeys,objConfig.reserveKeys,!0);for(var O,index=0;index<this.objects.length&&(O=this.objects[index]);index++)if(O.id==objID&&1!=O.isDel){objSeq=index;break}"undefined"==typeof objConfig.href&&(objConfig.href=cfg.href),null==objSeq?(objSeq=this.objects.length,this.objects.push({id:objID,anchorID:cfg.targetID+"_AX_"+objID,config:objConfig})):(this.objects[objSeq].isDel=void 0,this.objects[objSeq].config=objConfig),this.appendAnchor(objID,objSeq),this.bindSelect(objID,objSeq),this.windowResize()},appendAnchor:function(objID,objSeq){var cfg=this.config,obj=this.objects[objSeq];AXgetId(cfg.targetID+"_AX_"+objID)&&axdom("#"+cfg.targetID+"_AX_"+objID).remove();var anchorNode=axdom('<div id="'+cfg.targetID+"_AX_"+objID+'" class="'+cfg.anchorClassName+'" style="display:none;"></div>'),iobj=axdom("#"+objID);iobj.attr("data-axbind","select"),this.isMobile?iobj.before(anchorNode):iobj.after(anchorNode);var iobjPosition=iobj.position(),l=iobjPosition.left,t=iobjPosition.top,w=0,h=0;w=iobj.outerWidth(),h=iobj.outerHeight();var css={left:l,top:t,width:w,height:h},objDom=axdom("#"+cfg.targetID+"_AX_"+objID);objDom.css(css),objDom.data("height",h),obj.iobj=iobj,obj.objDom=objDom},alignAnchor:function(objID,objSeq){var cfg=this.config,obj=this.objects[objSeq],iobj=obj.iobj,iobjPosition=iobj.position(),l=iobjPosition.left,t=iobjPosition.top,w=0,h=0,borderT=(iobj.css("border-left-width").number(),iobj.css("border-top-width").number()),borderB=iobj.css("border-bottom-width").number(),marginW=iobj.css("margin-left").number();iobj.css("margin-top").number();l+=marginW,w=iobj.outerWidth(),h=iobj.outerHeight();var css={left:l,top:t,width:w,height:h};obj.objDom.css(css),obj.objDom.data("height",h),obj.objDom.find("#"+cfg.targetID+"_AX_"+objID+"_AX_SelectBox").css({width:w,height:h}),obj.objDom.find("#"+cfg.targetID+"_AX_"+objID+"_AX_SelectTextBox").css({height:h-(borderT+borderB)+"px"}),obj.objDom.find("#"+cfg.targetID+"_AX_"+objID+"_AX_SelectText").css({"line-height":h-(borderT+borderB)+"px"}),obj.objDom.find("#"+cfg.targetID+"_AX_"+objID+"_AX_SelectBoxArrow").css({height:h})},bindSelect:function(objID,objSeq){var options,sendObj,cfg=this.config,_this=this,obj=this.objects[objSeq],iobj=obj.iobj,objDom=obj.objDom;obj.config.onChange||(obj.config.onChange=obj.config.onchange),obj.config.onLoad||(obj.config.onLoad=obj.config.onload);var w=objDom.width(),h=objDom.data("height"),borderT=iobj.css("border-top-width").number(),borderB=iobj.css("border-bottom-width").number(),fontSize=iobj.css("font-size").number(),tabIndex=iobj.attr("tabindex"),po=[];po.push('<div id="'+cfg.targetID+"_AX_"+objID+'_AX_SelectBox" class="'+cfg.anchorSelectClassName+'" style="width:'+w+"px;height:"+h+'px;">'),po.push("<a "+obj.config.href+' class="selectedTextBox" id="'+cfg.targetID+"_AX_"+objID+'_AX_SelectTextBox" style="height:'+(h-(borderT+borderB))+'px;"'),po.push(' data-ax-anchor="axselect" '),iobj.attr("data-return-tab-next-focus-id")&&po.push(' data-return-tab-next-focus-id = "'+iobj.attr("data-return-tab-next-focus-id")+'"'),iobj.attr("data-return-tab-prev-focus-id")&&po.push(' data-return-tab-prev-focus-id = "'+iobj.attr("data-return-tab-prev-focus-id")+'"'),void 0!=tabIndex&&po.push(' tabindex="'+tabIndex+'"'),po.push(">"),po.push('	<div class="selectedText" id="'+cfg.targetID+"_AX_"+objID+'_AX_SelectText" style="line-height:'+(h-(borderT+borderB))+"px;padding:0px 4px;font-size:"+fontSize+'px;"></div>'),po.push('	<div class="selectBoxArrow" id="'+cfg.targetID+"_AX_"+objID+'_AX_SelectBoxArrow" style="height:'+h+'px;"></div>'),po.push("</a>"),po.push("</div>"),objDom.empty(),objDom.append(po.join("")),objDom.show();var objDom_selectTextBox=objDom.find("#"+cfg.targetID+"_AX_"+objID+"_AX_SelectTextBox");obj.selectedIndex=AXgetId(objID).options.selectedIndex;for(var options=[],oi=0;oi<AXgetId(objID).options.length;oi++)options.push({optionValue:AXgetId(objID).options[oi].value,optionText:AXgetId(objID).options[oi].text.enc()});if(obj.options=AXUtil.copyObject(options),this.isMobile){iobj.css({opacity:0});var bindSelectChange=this.bindSelectChange.bind(this);obj.objOnChange=function(){bindSelectChange(objID,objSeq),obj.config.onChange&&(obj.selectedIndex=AXgetId(objID).options.selectedIndex,AXgetId(objID).options[obj.selectedIndex].selected=!0,obj.config.selectedObject=obj.options[obj.selectedIndex],options=AXgetId(objID).options[obj.selectedIndex],sendObj={optionIndex:obj.selectedIndex,optionValue:options.value,optionText:options.text,value:options.value,text:options.text},obj.config.onChange.call(sendObj,sendObj))},objDom_selectTextBox.unbind("click.AXSelect").bind("click.AXSelect",function(event){axdom("#"+objID).click()}),iobj.addClass("rootSelectBox"),iobj.bind("change.AXSelect",obj.objOnChange)}else{iobj.css({visibility:"hidden"});var bindSelectExpand=this.bindSelectExpand.bind(this),bindSelectFocus=(this.bindSelectClose.bind(this),this.bindSelectFocus.bind(this)),bindSelectBlur=this.bindSelectBlur.bind(this);objDom_selectTextBox.bind("click.AXSelect",function(event){axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SelectTextBox").focus(),bindSelectExpand(objID,objSeq,!0,event)}),objDom_selectTextBox.bind("keydown.AXSelect",function(event){event.keyCode==AXUtil.Event.KEY_SPACE&&(bindSelectExpand(objID,objSeq,!0,event),_this.stopEvent(event)),event.keyCode!=AXUtil.Event.KEY_TAB&&event.keyCode!=AXUtil.Event.KEY_RETURN&&(_this.selectTextBox_onkeydown_obj?(clearTimeout(_this.selectTextBox_onkeydown_obj),_this.selectTextBox_onkeydown_data+=String.fromCharCode(event.keyCode)):_this.selectTextBox_onkeydown_data=String.fromCharCode(event.keyCode),_this.selectTextBox_onkeydown_obj=setTimeout(function(){_this.selectTextBox_onkeydown(objID,objSeq,event)},300))}),objDom_selectTextBox.bind("focus.AXSelect",function(event){bindSelectFocus(objID)}),objDom_selectTextBox.bind("blur.AXSelect",function(event){bindSelectBlur(objID)})}if(obj.config.ajaxUrl){var bindSelectChangeBind=this.bindSelectChange.bind(this),bindSelectChange=function(){bindSelectChangeBind(objID,objSeq,"load")},url=obj.config.ajaxUrl,pars=obj.config.ajaxPars,_method="post",_headers={},_contentType=AXConfig.AXReq.contentType,_responseType=AXConfig.AXReq.responseType,_dataType=AXConfig.AXReq.dataType,_async=AXConfig.AXReq.async;obj.config.method&&(_method=obj.config.method),obj.config.headers&&(_headers=obj.config.headers),obj.config.contentType&&(_contentType=obj.config.contentType),obj.config.responseType&&(_responseType=obj.config.responseType),obj.config.dataType&&(_dataType=obj.config.dataType),obj.config.ajaxAsync&&(_async=obj.config.ajaxAsync),obj.selectedIndex=null,iobj.html("<option></option>"),obj.inProgress=!0,new AXReq(url,{type:_method,headers:_headers,contentType:_contentType,responseType:_responseType,dataType:_dataType,async:_async,debug:"undefined"!=typeof obj.config.debug?obj.config.debug:!1,pars:pars,onsucc:function(res){if(res.result&&res.result==AXConfig.AXReq.okCode||void 0==res.result&&!res.error){var po=[],adj=0;obj.config.options=res[obj.config.reserveKeys.options],obj.config.isspace&&(po.push("<option value='"+(obj.config.isspaceValue||"")+"'"),0==obj.selectedIndex&&po.push(' selected="selected"'),po.push(">"+(obj.config.isspaceTitle||"&nbsp;")+"</option>"),adj=-1);for(var opts,oidx=0;oidx<res[obj.config.reserveKeys.options].length&&(opts=res[obj.config.reserveKeys.options][oidx]);oidx++)po.push('<option value="'+opts[obj.config.reserveKeys.optionValue]+'" data-option="'+opts[obj.config.reserveKeys.optionData]+'" '),(obj.config.setValue==opts[obj.config.reserveKeys.optionValue]||opts.selected||(obj.selectedIndex||0).number()+adj==oidx)&&po.push(' selected="selected"'),po.push(">"+opts[obj.config.reserveKeys.optionText].dec()+"</option>");axdom("#"+objID).html(po.join(""));for(var options=[],oi=0;oi<AXgetId(objID).options.length;oi++)options.push({optionValue:AXgetId(objID).options[oi].value,optionText:AXgetId(objID).options[oi].text.enc(),optionData:AXgetId(objID).options[oi].getAttribute("data-option")});obj.options=AXUtil.copyObject(options),obj.selectedIndex=AXgetId(objID).options.selectedIndex,obj.config.onChange&&obj.config.alwaysOnChange&&(obj.config.focusedIndex=obj.selectedIndex,obj.config.selectedObject=obj.options[obj.selectedIndex],sendObj={optionIndex:obj.selectedIndex,optionValue:obj.options[obj.selectedIndex].optionValue,optionText:obj.options[obj.selectedIndex].optionText,optionData:obj.options[obj.selectedIndex].optionData,value:obj.options[obj.selectedIndex].optionValue,text:obj.options[obj.selectedIndex].optionText,data:obj.options[obj.selectedIndex].optionData},obj.config.onChange.call(sendObj,sendObj,"isPostBack")),bindSelectChange(),obj.config.onLoad&&(sendObj={selectedIndex:obj.selectedIndex,selectedObject:obj.options[obj.selectedIndex],options:obj.options,response:res},obj.config.onLoad.call(sendObj,sendObj)),_this.alignAnchor(objID,objSeq)}obj.inProgress=!1}})}else if(obj.config.options){iobj.html("<option></option>");var po=[],adj=0;obj.config.isspace&&(po.push("<option value='"+(obj.config.isspaceValue||"")+"'"),0==obj.selectedIndex&&po.push(' selected="selected"'),po.push(">"+(obj.config.isspaceTitle||"&nbsp;")+"</option>"),adj=-1);for(var opts,oidx=0;oidx<obj.config.options.length&&(opts=obj.config.options[oidx]);oidx++){var optionText=(opts[obj.config.reserveKeys.optionText]||"").dec();po.push('<option value="'+opts[obj.config.reserveKeys.optionValue]+'"'),(obj.config.setValue==opts[obj.config.reserveKeys.optionValue]||opts.selected||obj.selectedIndex.number()+adj==oidx)&&po.push(' selected="selected"'),po.push(">"+optionText+"</option>")}iobj.html(po.join(""));for(var options=[],oi=0;oi<AXgetId(objID).options.length;oi++)options.push({optionValue:AXgetId(objID).options[oi].value,optionText:AXgetId(objID).options[oi].text.enc()});if(obj.options=AXUtil.copyObject(options),obj.selectedIndex=AXgetId(objID).options.selectedIndex,this.bindSelectChange(objID,objSeq,"load"),obj.config.onChange&&obj.config.alwaysOnChange&&(obj.config.focusedIndex=obj.selectedIndex,obj.config.selectedObject=obj.options[obj.selectedIndex],options=AXgetId(objID).options[obj.selectedIndex],options||(options={value:"",text:""}),sendObj={optionIndex:obj.selectedIndex,optionValue:options.value,optionText:options.text,value:options.value,text:options.text},obj.config.onChange.call(sendObj,sendObj,"isPostBack")),obj.config.onLoad){var selectedOption=this.getSelectedOption(objID,objSeq);obj.config.onLoad.call({selectedIndex:obj.selectedIndex,selectedObject:{optionValue:selectedOption.value,optionText:selectedOption.text}})}this.alignAnchor(objID,objSeq)}else{if(this.bindSelectChange(objID,objSeq,"load"),obj.config.onChange&&obj.config.alwaysOnChange){var selectedOption=this.getSelectedOption(objID,objSeq);selectedOption&&(sendObj={optionIndex:selectedOption.index,optionValue:selectedOption.value,optionText:selectedOption.text,value:selectedOption.value,text:selectedOption.text},obj.config.onChange.call(sendObj,sendObj,"isPostBack"))}if(obj.config.onLoad){var selectedOption=this.getSelectedOption(objID,objSeq);obj.config.onLoad.call({selectedIndex:obj.selectedIndex,selectedObject:{optionValue:selectedOption.value,optionText:selectedOption.text}})}this.alignAnchor(objID,objSeq)}},selectTextBox_onkeydown:function(objID,objSeq,event){for(var O,_this=(this.config,this),obj=this.objects[objSeq],bindSelectClose=this.bindSelectClose.bind(this),chkVal=_this.selectTextBox_onkeydown_data||"",chkIndex=null,index=0;index<obj.options.length&&(O=obj.options[index]);index++)if(O.optionValue.left(chkVal.length).lcase()==chkVal.lcase()||O.optionText.left(chkVal.length).lcase()==chkVal.lcase()){chkIndex=index;break}null!=chkIndex&&(obj.selectedIndex=chkIndex,obj.config.focusedIndex=chkIndex,obj.config.selectedObject=obj.options[chkIndex],obj.config.isChangedSelect=!0,bindSelectClose(objID,objSeq,event)),_this.selectTextBox_onkeydown_data=""},getSelectedOption:function(objID,objSeq){var obj=(this.config,this.objects[objSeq]);if(AXgetId(objID)&&AXgetId(objID).options.selectedIndex>-1){try{obj.selectedIndex!=AXgetId(objID).options.selectedIndex&&(obj.selectedIndex=AXgetId(objID).options.selectedIndex)}catch(e){}var options=AXgetId(objID).options[AXgetId(objID).options.selectedIndex];return{value:options.value,text:options.text,data:options.getAttribute("data-option"),index:AXgetId(objID).options.selectedIndex}}obj.selectedIndex=0;var options=AXgetId(objID).options[0];return options=options?{value:options.value,text:options.text,data:options.getAttribute("data-option")}:{value:"",text:"",data:""},{value:options.value,text:options.text,data:options.data,index:0}},bindSelectChange:function(objID,objSeq,isLoad){var cfg=this.config,obj=this.objects[objSeq],selectedOption=this.getSelectedOption(objID,objSeq);selectedOption&&axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SelectText").html(selectedOption.text),obj&&!this.isMobile&&(obj.iobj||(obj.iobj=axdom("#"+objID)),"load"!=isLoad&&obj.iobj.trigger("change"))},bindSelectExpand:function(objID,objSeq,isToggle,event){var _this=this,cfg=this.config,obj=this.objects[objSeq],jqueryTargetObjID=axdom("#"+cfg.targetID+"_AX_"+objID);if(!jqueryTargetObjID.data("disabled")){if(isToggle&&AXgetId(cfg.targetID+"_AX_"+objID+"_AX_expandBox"))return void(obj.config.isChangedSelect?this.bindSelectClose(objID,objSeq,event):(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").remove(),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SelectBoxArrow").removeClass("on"),axdom(document).unbind("click.AXSelect"),axdom(document).unbind("keydown.AXSelect")));axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").remove(),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SelectBoxArrow").removeClass("on");var anchorWidth=axdom("#"+cfg.targetID+"_AX_"+objID).width()-2,anchorHeight=axdom("#"+cfg.targetID+"_AX_"+objID).data("height")-1,styles=[];styles.push("width:"+anchorWidth+"px");var po=[];po.push('<div id="'+cfg.targetID+"_AX_"+objID+'_AX_expandBox" class="AXselectExpandBox" style="'+styles.join(";")+'">'),po.push('<div id="'+cfg.targetID+"_AX_"+objID+'_AX_expandScroll" class="AXselectExpandScroll">'),po.push('	<div class="AXLoadingSmall"></div>'),po.push("</div>"),po.push("</div>"),axdom(document.body).append(po.join("")),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SelectBoxArrow").addClass("on");var expandBox=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox");obj.config.positionFixed&&expandBox.css({position:"fixed"});var expBoxHeight=expandBox.outerHeight(),offset=obj.config.positionFixed?jqueryTargetObjID.position():jqueryTargetObjID.offset();obj.config.position&&(offset=jqueryTargetObjID.offset(),void 0!=obj.config.position.top&&(offset.top=obj.config.position.top));var css={};css.top=offset.top+anchorHeight,css.left=offset.left;var bodyHeight;bodyHeight="Q"==AXUtil.docTD?document.body.scrollHeight:document.documentElement.scrollHeight,obj.config.positionFixed||bodyHeight<css.top.number()+expBoxHeight&&(css={top:offset.top-expBoxHeight,left:offset.left}),expandBox.css(css),obj.config.onexpand?obj.config.onexpand.call({obj:obj,objID:objID,objSeq:objSeq},function(args){if("undefined"!=typeof args){obj.options=obj.config.options=axf.copyObject(args.options);var po=[],adj=0;obj.config.isspace&&(po.push("<option value='"+(obj.config.isspaceValue||"")+"'"),0==obj.selectedIndex&&po.push(' selected="selected"'),po.push(">"+(obj.config.isspaceTitle||"&nbsp;")+"</option>"),adj=-1);for(var opts,oidx=0;oidx<obj.options.length;oidx++){var opts=obj.options[oidx];po.push('<option value="'+opts[obj.config.reserveKeys.optionValue]+'" data-option="'+opts[obj.config.reserveKeys.optionData]+'" '),(obj.config.setValue==opts[obj.config.reserveKeys.optionValue]||opts.selected||(obj.selectedIndex||0).number()+adj==oidx)&&po.push(' selected="selected"'),po.push(">"+opts[obj.config.reserveKeys.optionText].dec()+"</option>")}axdom("#"+objID).html(po.join("")),_this.bindSelectSetOptions(objID,objSeq),_this.alignAnchor(objID,objSeq)}}):this.bindSelectSetOptions(objID,objSeq)}},bindSelectClose:function(objID,objSeq,event){var options,sendObj,obj=this.objects[objSeq],cfg=this.config;return AXgetId(cfg.targetID+"_AX_"+objID+"_AX_expandBox")?(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").remove(),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SelectBoxArrow").removeClass("on"),axdom(document).unbind("click.AXSelect"),axdom(document).unbind("keydown.AXSelect"),axdom(document.body).off("focus.AXSelect","input,select,button,a,textarea"),obj.config.isChangedSelect&&(AXgetId(objID).options[obj.selectedIndex].selected=!0,obj.config.onChange&&(options=AXgetId(objID).options[obj.selectedIndex],sendObj={optionIndex:obj.selectedIndex,optionValue:options.value,optionText:options.text,optionData:options.getAttribute("data-option"),value:options.value,text:options.text,data:options.data},obj.config.onChange.call(sendObj,sendObj)),obj.config.isChangedSelect=!1,this.bindSelectChange(objID,objSeq)),void(event&&event.stopPropagation())):void(obj.config.isChangedSelect&&(AXgetId(objID).options[obj.selectedIndex].selected=!0,obj.config.onChange&&(options=AXgetId(objID).options[obj.selectedIndex],sendObj={optionIndex:obj.selectedIndex,optionValue:options.value,optionText:options.text,optionData:options.getAttribute("data-option"),value:options.value,text:options.text,data:options.data},obj.config.onChange.call(sendObj,sendObj)),obj.config.isChangedSelect=!1,this.bindSelectChange(objID,objSeq)))},bindSelectSetOptions:function(objID,objSeq){var obj=this.objects[objSeq],cfg=this.config,jqueryTargetObjID=axdom("#"+cfg.targetID+"_AX_"+objID),maxHeight=obj.config.maxHeight||200;if(obj.options){0==obj.options.length&&axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").hide();for(var O,po=[],index=0;index<obj.options.length&&(O=obj.options[index]);index++)po.push("<a "+obj.config.href+' id="'+cfg.targetID+"_AX_"+objID+"_AX_"+index+'_AX_option">'+O.optionText.dec()+"</a>");axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandScroll").html(po.join(""));var expandScrollHeight=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandScroll").height();expandScrollHeight>maxHeight&&(expandScrollHeight=maxHeight),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox").css({height:expandScrollHeight+"px"});var bindSelectOptionsClick=this.bindSelectOptionsClick.bind(this);obj.documentclickEvent=function(event){bindSelectOptionsClick(objID,objSeq,event)};var bindSelectKeyup=this.bindSelectKeyup.bind(this);obj.documentKeyup=function(event){bindSelectKeyup(objID,objSeq,event)},axdom(document).unbind("click.AXSelect").bind("click.AXSelect",obj.documentclickEvent),axdom(document).unbind("keydown.AXSelect").bind("keydown.AXSelect",obj.documentKeyup),axdom(document.body).off("focus.AXSelect").on("focus.AXSelect","input,select,button,a,textarea",obj.documentclickEvent),obj.myUIScroll&&obj.myUIScroll.unbind(),obj.myUIScroll=new AXScroll,obj.myUIScroll.setConfig({CT_className:"AXScrollSmall",targetID:cfg.targetID+"_AX_"+objID+"_AX_expandBox",scrollID:cfg.targetID+"_AX_"+objID+"_AX_expandScroll",touchDirection:!1}),void 0!=obj.selectedIndex&&(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_"+obj.selectedIndex+"_AX_option").addClass("on"),obj.myUIScroll.focusElement(cfg.targetID+"_AX_"+objID+"_AX_"+obj.selectedIndex+"_AX_option"),obj.config.focusedIndex=obj.selectedIndex);var bodyHeight;bodyHeight="Q"==AXUtil.docTD?document.body.clientHeight:document.documentElement.clientHeight;var anchorHeight=jqueryTargetObjID.data("height")-1,expandBox=axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_expandBox"),expBoxHeight=expandBox.outerHeight(),offset=obj.config.positionFixed?jqueryTargetObjID.position():jqueryTargetObjID.offset();obj.config.position&&(offset=jqueryTargetObjID.offset(),void 0!=obj.config.position.top&&(offset.top=obj.config.position.top));var css={};css.top=offset.top+anchorHeight,obj.config.positionFixed||bodyHeight<css.top.number()+expBoxHeight&&(css={top:offset.top-expBoxHeight,left:offset.left},expandBox.css(css))}},bindSelectOptionsClick:function(objID,objSeq,event){var obj=this.objects[objSeq],cfg=this.config,isSelectorClick=!1,eid=event.target.id.split(/_AX_/g),tgid=event.target.id;if(""==event.target.id?isSelectorClick=!1:(event.target.id==objID||eid[0]==cfg.targetID&&tgid.substr(eid[0].length+4,objID.length)==objID)&&(isSelectorClick=!0),isSelectorClick){if("option"==eid.last()){var selectedIndex=eid[eid.length-2];obj.selectedIndex=selectedIndex,obj.config.focusedIndex=selectedIndex,obj.config.selectedObject=obj.options[selectedIndex],obj.config.isChangedSelect=!0,this.bindSelectClose(objID,objSeq,event)}}else this.bindSelectClose(objID,objSeq,event)},bindSelectKeyup:function(objID,objSeq,event){var obj=this.objects[objSeq];this.config;if(event.keyCode==AXUtil.Event.KEY_TAB||event.keyCode==AXUtil.Event.KEY_ESC)return void this.bindSelectClose(objID,objSeq,event);if(event.keyCode==AXUtil.Event.KEY_UP){if(!obj.options)return;if(0==obj.options.length)return;var focusIndex=obj.options.length-1;void 0==obj.config.focusedIndex||0==obj.config.focusedIndex||(focusIndex=obj.config.focusedIndex-1),this.bindSelectorSelect(objID,objSeq,focusIndex),this.stopEvent(event)}else if(event.keyCode==AXUtil.Event.KEY_DOWN){if(!obj.options)return;if(0==obj.options.length)return;var focusIndex=0;void 0==obj.config.focusedIndex||obj.config.focusedIndex==obj.options.length-1||(focusIndex=obj.config.focusedIndex.number()+1),this.bindSelectorSelect(objID,objSeq,focusIndex),this.stopEvent(event)}else event.keyCode==AXUtil.Event.KEY_RETURN},bindSelectorSelect:function(objID,objSeq,index,changeValue){var obj=this.objects[objSeq],cfg=this.config;void 0!=obj.config.focusedIndex&&axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_"+obj.config.focusedIndex+"_AX_option").removeClass("on"),axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_"+index+"_AX_option").addClass("on"),obj.config.focusedIndex=index,obj.selectedIndex=index,obj.config.selectedObject=obj.options[index],obj.config.isChangedSelect=!0,obj.myUIScroll.focusElement(cfg.targetID+"_AX_"+objID+"_AX_"+index+"_AX_option")},bindSelectorSelectClear:function(objID,objSeq){var obj=this.objects[objSeq],cfg=this.config;void 0!=obj.selectedIndex&&axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_"+obj.selectedIndex+"_AX_option").removeClass("on"),obj.selectedIndex=null,obj.config.focusedIndex=null,obj.config.selectedObject=null,obj.config.isChangedSelect=!0},bindSelectChangeValue:function(objID,value,onEnd){for(var O,findIndex=null,index=0;index<this.objects.length&&(O=this.objects[index]);index++)if(O.id==objID&&1!=O.isDel){findIndex=index;break}if(null!=findIndex){var options,sendObj,obj=this.objects[findIndex];this.config;if(this.isMobile){for(var oi=0;oi<AXgetId(objID).options.length;oi++)if(AXgetId(objID).options[oi].value==value){var selectedIndex=oi;AXgetId(objID).options[oi].selected=!0,obj.config.selectedObject={optionIndex:oi,optionValue:AXgetId(objID).options[oi].value,optionText:AXgetId(objID).options[oi].text.enc()},this.bindSelectChange(objID,findIndex),obj.config.onChange&&(options=AXgetId(objID).options[oi],sendObj={optionIndex:oi,optionValue:options.value,optionText:options.text,value:options.value,text:options.text},obj.config.onChange.call(sendObj,sendObj));break}}else{for(var O,selectedIndex=null,oidx=0;oidx<obj.options.length&&(O=obj.options[oidx]);oidx++)if((O.optionValue||O.value||"")==value){selectedIndex=oidx;break}null!=selectedIndex&&(obj.selectedIndex=selectedIndex,obj.config.focusedIndex=selectedIndex,AXgetId(objID).options[obj.selectedIndex].selected=!0,obj.config.selectedObject=obj.options[selectedIndex],this.bindSelectChange(objID,findIndex),obj.config.onChange&&(options=AXgetId(objID).options[selectedIndex],sendObj={optionIndex:selectedIndex,optionValue:options.value,optionText:options.text,value:options.value,text:options.text},obj.config.onChange.call(sendObj,sendObj)))}}},bindSelectDisabled:function(objID,_disabled){for(var O,findIndex=null,index=0;index<this.objects.length&&(O=this.objects[index]);index++)if(O.id==objID&&1!=O.isDel){findIndex=index;break}if(null!=findIndex){var cfg=(this.objects[findIndex],this.config);if("boolean"==typeof _disabled?axf.getId(objID).disabled=_disabled:axf.getId(objID).disabled=!AXgetId(objID).disabled,this.isMobile);else{var bindTarget=axdom("#"+cfg.targetID+"_AX_"+objID);bindTarget.data("disabled",axf.getId(objID).disabled),axf.getId(objID).disabled?bindTarget.find(".AXanchorSelect").addClass("disable"):bindTarget.find(".AXanchorSelect").removeClass("disable")}}},bindSelectUpdate:function(objID){for(var O,findIndex=null,index=0;index<this.objects.length&&(O=this.objects[index]);index++)if(O.id==objID&&1!=O.isDel){
  findIndex=index;break}if(null!=findIndex){var selectedIndex,options,sendObj,obj=this.objects[findIndex];obj.config.onChange&&(selectedIndex=AXgetId(objID).options.selectedIndex,options=AXgetId(objID).options[selectedIndex],sendObj={optionIndex:selectedIndex,optionValue:options.value,optionText:options.text,value:options.value,text:options.text},obj.config.onChange.call(sendObj,sendObj)),this.bindSelectChange(objID,findIndex)}},bindSelectFocus:function(objID,elFocus){for(var O,cfg=this.config,findIndex=null,index=0;index<this.objects.length&&(O=this.objects[index]);index++)if(O.id==objID&&1!=O.isDel){findIndex=index;break}null!=findIndex&&(axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SelectTextBox").addClass("focus"),elFocus&&axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SelectTextBox").focus())},bindSelectBlur:function(objID){for(var O,cfg=this.config,findIndex=null,index=0;index<this.objects.length&&(O=this.objects[index]);index++)if(O.id==objID&&1!=O.isDel){findIndex=index;break}null!=findIndex&&axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SelectTextBox").removeClass("focus")},bindSelectGetAnchorObject:function(objID){for(var O,cfg=this.config,findIndex=null,index=0;index<this.objects.length&&(O=this.objects[index]);index++)if(O.id==objID&&1!=O.isDel){findIndex=index;break}return null!=findIndex?axdom("#"+cfg.targetID+"_AX_"+objID+"_AX_SelectTextBox"):void 0},bindSelectGetValue:function(objID,onEnd){for(var O,findIndex=null,index=0;index<this.objects.length&&(O=this.objects[index]);index++)if(O.id==objID&&1!=O.isDel){findIndex=index;break}if(null==findIndex)return{optionValue:null,optionText:null,error:"바인드 된 오브젝트를 찾을 수 없습니다."};var obj=this.objects[findIndex];this.config;if(void 0!=obj.selectedIndex){var options=AXgetId(objID).options[obj.selectedIndex];return{optionValue:options.value,optionText:options.text,optionData:options.getAttribute("data-option")}}return{optionValue:null,optionText:null}},bindSelectAddOptions:function(objID,options){for(var O,objSeq=(this.config,null),index=0;index<this.objects.length&&(O=this.objects[index]);index++)if(O.id==objID&&1!=O.isDel){objSeq=index;break}if(null==objSeq)return void trace("not found element id");var obj=this.objects[objSeq],iobj=obj.iobj;if(!Object.isArray(options))return void trace("options 아규먼트가 없습니다.");for(var newOptions=obj.options,i=0;i<options.length;i++){for(var hasValue=!1,oi=0;oi<obj.options.length;oi++)obj.options[oi].optionValue==options[i].optionValue&&(hasValue=!0);hasValue||newOptions.push({optionText:options[i].optionText.enc(),optionValue:options[i].optionValue})}obj.options=newOptions,iobj.css({opacity:100});for(var opts,po=[],oidx=0;oidx<obj.options.length&&(opts=obj.options[oidx]);oidx++){var optionText=(opts.optionText||"").dec();po.push('<option value="'+opts.optionValue+'"'),obj.selectedIndex==oidx&&po.push(' selected="selected"'),po.push(">"+optionText+"</option>")}return iobj.empty(),iobj.append(po.join("")),this.alignAnchor(objID,objSeq),obj.options},bindSelectRemoveOptions:function(objID,options){for(var O,objSeq=(this.config,null),index=0;index<this.objects.length&&(O=this.objects[index]);index++)if(O.id==objID&&1!=O.isDel){objSeq=index;break}if(null==objSeq)return void trace("not found element id");var obj=this.objects[objSeq],iobj=obj.iobj;if(!Object.isArray(options))return void trace("options 아규먼트가 없습니다.");for(var newOptions=[],oi=0;oi<obj.options.length;oi++){for(var hasValue=!1,i=0;i<options.length;i++)obj.options[oi].optionValue==options[i].optionValue&&(hasValue=!0);hasValue||newOptions.push({optionText:obj.options[oi].optionText,optionValue:obj.options[oi].optionValue})}obj.options=newOptions,iobj.css({opacity:100});for(var opts,po=[],oidx=0;oidx<obj.options.length&&(opts=obj.options[oidx]);oidx++){var optionText=(opts.optionText||"").dec();po.push('<option value="'+opts.optionValue+'"'),obj.selectedIndex==oidx&&po.push(' selected="selected"'),po.push(">"+optionText+"</option>")}return iobj.empty(),iobj.append(po.join("")),this.alignAnchor(objID,objSeq),obj.options},bindSelectUpdateOptions:function(objID,options,optionIndex){for(var O,objSeq=(this.config,null),index=0;index<this.objects.length&&(O=this.objects[index]);index++)if(O.id==objID&&1!=O.isDel){objSeq=index;break}if(null==objSeq)return void trace("not found element id");var obj=this.objects[objSeq],iobj=obj.iobj;if("undefined"==typeof optionIndex&&!Object.isArray(options))return void trace("options 아규먼트가 없습니다.");var newOptions=[];if("undefined"==typeof optionIndex){for(var i=0;i<options.length;i++)newOptions.push(jQuery.extend({optionText:options[i].optionText.enc(),optionValue:options[i].optionValue},options[i]));obj.selectedIndex=0}else{var _adj=0;obj.config.isspace&&(_adj=1);for(var i=0;i<obj.config.options.length;i++)i+_adj==optionIndex?newOptions.push(jQuery.extend({optionText:options.optionText.enc(),optionValue:options.optionValue},options)):newOptions.push(obj.config.options[i])}obj.config.options=newOptions,iobj.css({opacity:100}),iobj.html("<option></option>");var po=[],adj=0;obj.config.isspace&&(po.push("<option value='"+(obj.config.isspaceValue||"")+"'"),0==obj.selectedIndex&&po.push(' selected="selected"'),po.push(">"+(obj.config.isspaceTitle||"&nbsp;")+"</option>"),adj=-1);for(var opts,oidx=0;oidx<obj.config.options.length&&(opts=obj.config.options[oidx]);oidx++){var optionText=(opts.optionText||"").dec();po.push('<option value="'+opts.optionValue+'"'),(obj.config.setValue==opts.optionValue||opts.selected||(obj.selectedIndex||0).number()+adj==oidx)&&po.push(' selected="selected"'),po.push(">"+optionText+"</option>")}iobj.html(po.join(""));for(var options=[],oi=0;oi<AXgetId(objID).options.length;oi++)options.push({optionValue:AXgetId(objID).options[oi].value,optionText:AXgetId(objID).options[oi].text.enc()});return obj.options=AXUtil.copyObject(options),obj.selectedIndex=AXgetId(objID).options.selectedIndex,this.bindSelectChange(objID,objSeq,"load"),obj.config.onChange&&obj.config.alwaysOnChange&&(obj.config.focusedIndex=obj.selectedIndex,obj.config.selectedObject=obj.options[obj.selectedIndex],options=AXgetId(objID).options[obj.selectedIndex],sendObj={optionIndex:obj.selectedIndex,optionValue:options.value,optionText:options.text,value:options.value,text:options.text},obj.config.onChange.call(sendObj,sendObj,"isPostBack")),this.alignAnchor(objID,objSeq),iobj.css({opacity:0}),this}}),AXSelect=new AXSelectConverter;AXSelect.setConfig({targetID:"AXselect"}),axdom.fn.unbindSelect=function(config){return axdom.each(this,function(){void 0==config&&(config={}),config.id=this.id,AXSelect.unbind(config)}),this},axdom.fn.bindSelect=function(config){return axdom.each(this,function(){this.id||(this.id="AXInput-"+axf.getUniqueId()),void 0==config&&(config={}),config.id=this.id,AXSelect.bind(config)}),this},axdom.fn.setConfigSelect=function(config){return axdom.each(this,function(){AXSelect.bindSetConfig(this.id,config)}),this},axdom.fn.bindSelectSetValue=function(value,onEnd){return axdom.each(this,function(){AXSelect.bindSelectChangeValue(this.id,value,onEnd)}),this},axdom.fn.bindSelectGetValue=function(onEnd){return AXSelect.bindSelectGetValue(this[0].id,onEnd)},axdom.fn.setValueSelect=function(value,onEnd){return axdom.each(this,function(){AXSelect.bindSelectChangeValue(this.id,value,onEnd)}),this},axdom.fn.bindSelectDisabled=function(Disabled){return axdom.each(this,function(){AXSelect.bindSelectDisabled(this.id,Disabled)}),this},axdom.fn.bindSelectUpdate=function(){return axdom.each(this,function(){AXSelect.bindSelectUpdate(this.id)}),this},axdom.fn.bindSelectFocus=function(){return axdom.each(this,function(){AXSelect.bindSelectFocus(this.id,!0)}),this},axdom.fn.bindSelectBlur=function(){return axdom.each(this,function(){AXSelect.bindSelectBlur(this.id)}),this},axdom.fn.bindSelectGetAnchorObject=function(){var returnObj;return axdom.each(this,function(){returnObj=AXSelect.bindSelectGetAnchorObject(this.id)}),returnObj},axdom.fn.bindSelectAddOptions=function(options){var returnObj;return axdom.each(this,function(){returnObj=AXSelect.bindSelectAddOptions(this.id,options)}),returnObj},axdom.fn.bindSelectRemoveOptions=function(options){var returnObj;return axdom.each(this,function(){returnObj=AXSelect.bindSelectRemoveOptions(this.id,options)}),returnObj},axdom.fn.bindSelectUpdateOptions=function(options,oidx){var returnObj;return axdom.each(this,function(){returnObj=AXSelect.bindSelectUpdateOptions(this.id,options,oidx)}),returnObj};var AXSlideViewer=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.config.theme="AXSlideViewer",this.config.id=axf.getUniqueId(),this.config.fitToHeight=!1;var _parent=this;this.config;this.touchUpdater={firstTouch:{},firstBoxModel:{},moveType:"",item:{},lastTouch:{},watch:function(){var _this=this;axf.browser.mobile?(axdom(document.body).bind("touchmove.axsliderviewer",function(){_this.update(window.event)}),axdom(document.body).bind("touchend.axsliderviewer",function(){_this.watchEnd(window.event)})):(axdom(document.body).bind("mousemove.axsliderviewer",function(event){_this.update(event)}),axdom(document.body).bind("mouseup.axsliderviewer",function(event){_this.watchEnd(event)}),axdom(document.body).bind("mouseleave.axsliderviewer",function(event){_this.watchEnd(event)}))},update:function(event){var touch={};return axf.browser.mobile?(touch.pageX1=event.touches[0].pageX-this.item._boxModel.dL,touch.pageY1=event.touches[0].pageY-this.item._boxModel.dT,2==event.touches.length?(touch.pageX2=event.touches[1].pageX-this.item._boxModel.dL,touch.pageY2=event.touches[1].pageY-this.item._boxModel.dT,touch.centerX=(touch.pageX2+touch.pageX1)/2,touch.centerY=(touch.pageY2+touch.pageY1)/2):(touch.centerX=touch.pageX1,touch.centerY=touch.pageY1),this.lastTouch=touch,_parent.imgTouchUpdate({firstTouch:this.firstTouch,firstBoxModel:this.firstBoxModel,touch:touch,moveType:this.moveType,item:this.item},event),event.stopPropagation&&event.stopPropagation(),event.preventDefault&&event.preventDefault(),!1):(touch.pageX1=event.pageX-this.item._boxModel.dL,touch.pageY1=event.pageY-this.item._boxModel.dT,touch.centerX=touch.pageX1,touch.centerY=touch.pageY1,this.lastTouch=touch,_parent.imgTouchUpdate({firstTouch:this.firstTouch,firstBoxModel:this.firstBoxModel,touch:touch,moveType:this.moveType,item:this.item},event),void 0)},watchEnd:function(event){axf.browser.mobile?(axdom(document.body).unbind("touchmove.axsliderviewer"),axdom(document.body).unbind("touchend.axsliderviewer")):(axdom(document.body).unbind("mousemove.axsliderviewer"),axdom(document.body).unbind("mouseup.axsliderviewer"),axdom(document.body).unbind("mouseleave.axsliderviewer")),_parent.imgTouchEnd({firstTouch:this.firstTouch,firstBoxModel:this.firstBoxModel,moveType:this.moveType,item:this.item},event)}},this.touchClicked=!1,this.touchDblClicked=!1,this.touchAndMoved=!1},init:function(){var cfg=this.config,reserveKeys={title:"title",description:"description",url:"url"};cfg.reserveKeys?(axf.overwriteObject(reserveKeys,cfg.reserveKeys,!0),cfg.reserveKeys=reserveKeys):cfg.reserveKeys=reserveKeys},open:function(jsObject){var cfg=this.config,_this=this;this.isOpend=!0,axdom(document.body).data("scrollTop",axdom(document.body).scrollTop()),this.screenSize={width:axf.clientWidth(),height:axf.clientHeight()};var po=[];if(po.push('<div id="'+cfg.id+'_AX_viewer" class="'+cfg.theme+' AXUserSelectNone" onselectstart="return false">'),po.push('<div class="background" id="'+cfg.id+'_AX_background"></div>'),po.push('<div class="slideItemGroup" id="'+cfg.id+'_AX_slideItemGrop">'),po.push("</div>"),po.push('<div class="controller" id="'+cfg.id+'_AX_controller">'),po.push('<div class="hgroup">'),po.push("<h1></h1>"),po.push("<span></span>"),po.push("</div>"),po.push('<div class="navigation"></div>'),po.push('<div class="buttonGroup">'),po.push('<a class="ToggleHandle" type="button">Toggle</a>'),po.push('<a class="Prev" type="button">Prev</a>'),po.push('<a class="Next" type="button">Next</a>'),po.push('<a class="ZoomIn" type="button">Next</a>'),po.push('<a class="ZoomOut" type="button">Next</a>'),po.push("</div>"),po.push('<a class="Close" type="button">Close</a>'),po.push("</div>"),po.push("</div>"),axdom(document.body).append(po.join("")),this.target=axdom("#"+cfg.id+"_AX_viewer"),this.background=axdom("#"+cfg.id+"_AX_background"),this.slideItemGrop=axdom("#"+cfg.id+"_AX_slideItemGrop"),this.controller=axdom("#"+cfg.id+"_AX_controller"),this.controller.find(".Close").bind("click.AXSlideViewer",function(event){_this.close()}),this.controller.find(".ToggleHandle").bind("click.AXSlideViewer",function(event){_this.controller.find(".buttonGroup").toggleClass("open")}),this.controller.find(".Prev").bind("click.AXSlideViewer",function(event){_this.prev()}),this.controller.find(".Next").bind("click.AXSlideViewer",function(event){_this.next()}),this.controller.find(".ZoomIn").bind("click.AXSlideViewer",function(event){_this.zoomIn()}),this.controller.find(".ZoomOut").bind("click.AXSlideViewer",function(event){_this.zoomOut()}),this.list=jsObject.list,this.selectedIndex=jsObject.selectedIndex||0,this.openImage(this.selectedIndex),axdom(window).bind("resize.AXSliderViewer",this.windowResize.bind(this)),axf.browser.mobile){var eventBodyID=cfg.id+"_AX_slideItemGrop";document.addEventListener&&AXgetId(eventBodyID).addEventListener("touchstart",function(event){var touch={},item=_this.list[_this.selectedIndex];_this.touhEndObserver&&clearTimeout(_this.touhEndObserver),_this.velocityDX=0,_this.velocityDY=0,touch.pageX1=event.touches[0].pageX-item._boxModel.dL,touch.pageY1=event.touches[0].pageY-item._boxModel.dT,2==event.touches.length?(touch.pageX2=event.touches[1].pageX-item._boxModel.dL,touch.pageY2=event.touches[1].pageY-item._boxModel.dT,touch.centerX=(touch.pageX2+touch.pageX1)/2,touch.centerY=(touch.pageY2+touch.pageY1)/2,_this.touchUpdater.moveType="zoom"):(touch.centerX=touch.pageX1,touch.centerY=touch.pageY1,_this.touchUpdater.moveType="move"),_this.touchUpdater.firstTouch=touch,_this.touchUpdater.firstBoxModel=axf.copyObject(item._boxModel),_this.touchUpdater.item=item,_this.touchUpdater.watch()},!1)}else{var eventBodyID=cfg.id+"_AX_slideItemGrop";axdom("#"+eventBodyID).bind("mousedown.axsliderviewer",function(event){var touch={},item=_this.list[_this.selectedIndex];_this.touhEndObserver&&clearTimeout(_this.touhEndObserver),_this.velocityDX=0,_this.velocityDY=0,touch.pageX1=event.pageX-item._boxModel.dL,touch.pageY1=event.pageY-item._boxModel.dT,touch.centerX=touch.pageX1,touch.centerY=touch.pageY1,_this.touchUpdater.moveType="move",_this.touchUpdater.firstTouch=touch,_this.touchUpdater.firstBoxModel=axf.copyObject(item._boxModel),_this.touchUpdater.item=item,_this.touchUpdater.watch()});var mousewheelevt=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel",contentScrollScrollWheel=function(){_this.wheelEndObserver&&clearTimeout(_this.wheelEndObserver);var event=window.event,delta=event.detail?-1*event.detail:event.wheelDelta,item=_this.list[_this.selectedIndex],cx=event.pageX-item._boxModel.dL,cy=event.pageY-item._boxModel.dT,dLen=delta>0?50:-50;_this.imgResize(item,item._boxModel,dLen,cx,cy),_this.wheelEndObserver=setTimeout(function(){var pos=item._axdom.position(),sL=0,eL=0,sT=0,eT=0,scW=_this.screenSize.width,scH=_this.screenSize.height,iW=item._axdom.width(),iH=item._axdom.height(),imgAnmate=!1,css={left:pos.left,top:pos.top,opacity:1};css.left,css.top;scW>iW&&scH>iH&&(iW=css.width=item._boxModel.width,iH=css.height=item._boxModel.height),scW>iW?(sL=(scW-iW)/2,eL=sL):(sL=0,eL=scW-iW),scH>iH?(sT=(scH-iH)/2,eT=sT):(sT=0,eT=scH-iH),css.left>sL?(css.left=sL,imgAnmate=!0):css.left<eL&&(css.left=eL,imgAnmate=!0),css.top>sT?(css.top=sT,imgAnmate=!0):css.top<eT&&(css.top=eT,imgAnmate=!0),imgAnmate&&(item._axdom.stop(),item._axdom.animate(css),isNaN(css.left)||(item._boxModel.dL=css.left),isNaN(css.top)||(item._boxModel.dT=css.top),isNaN(css.width)||(item._boxModel.dW=css.width),isNaN(css.height)||(item._boxModel.dH=css.height))},300)};document.attachEvent?AXgetId(eventBodyID).attachEvent("on"+mousewheelevt,contentScrollScrollWheel):document.addEventListener&&AXgetId(eventBodyID).addEventListener(mousewheelevt,contentScrollScrollWheel,!1)}},windowResizeApply:function(){var cfg=this.config,_this=this;this.screenSize={width:axf.clientWidth(),height:axf.clientHeight()};var selectedIndex=this.selectedIndex;selectedIndex>0&&axdom("#"+cfg.id+"_AX_slide_AX_"+(selectedIndex-1)).css({left:-this.screenSize.width}),selectedIndex<this.list.length-1&&axdom("#"+cfg.id+"_AX_slide_AX_"+(selectedIndex.number()+1)).css({left:this.screenSize.width});var item=this.list[selectedIndex];_this.renderImage(axdom("#"+cfg.id+"_AX_slide_AX_"+selectedIndex),item)},openImage:function(selectedIndex){var cfg=this.config,_this=this;selectedIndex=selectedIndex.number();var item=this.list[selectedIndex],slides=[];selectedIndex>0&&slides.push({id:cfg.id+"_AX_slide_AX_"+(selectedIndex-1),index:selectedIndex-1,left:-this.screenSize.width}),slides.push({id:cfg.id+"_AX_slide_AX_"+selectedIndex,index:selectedIndex,left:0}),selectedIndex<this.list.length-1&&slides.push({id:cfg.id+"_AX_slide_AX_"+(selectedIndex.number()+1),index:selectedIndex.number()+1,left:this.screenSize.width}),this.slideItemGrop.find(".slideItem").each(function(){for(var ii,i=0;i<slides.length&&(ii=slides[i]);i++)ii.id!=this.id&&axdom(this).remove()});for(var ii,i=0;i<slides.length&&(ii=slides[i]);i++)AXgetId(ii.id)||this.slideItemGrop.append('<div class="slideItem AXLoadingBlack" id="'+ii.id+'" style="left:'+ii.left+'px;"></div>');var hgroup=this.controller.find(".hgroup");hgroup.find("h1").html(item[cfg.reserveKeys.title]),hgroup.find("span").html(item[cfg.reserveKeys.description]),0==selectedIndex?(this.controller.find(".Prev").addClass("disabled"),this.controller.find(".Next").removeClass("disabled")):selectedIndex==this.list.length-1?(this.controller.find(".Prev").removeClass("disabled"),this.controller.find(".Next").addClass("disabled")):(this.controller.find(".Prev").removeClass("disabled"),this.controller.find(".Next").removeClass("disabled")),this.controller.find(".navigation").html(selectedIndex+1+" / "+this.list.length);var mySlide=axdom("#"+cfg.id+"_AX_slide_AX_"+selectedIndex),myImg=new Image;item._boxModel?(myImg.src=item[cfg.reserveKeys.url],_this.renderImage(mySlide,item)):(myImg.onload=function(){item._boxModel={originalWidth:this.width,originalHeight:this.height},_this.renderImage(mySlide,item)},myImg.src=item[cfg.reserveKeys.url])},renderImage:function(target,item){var cfg=this.config,imgRatio=(item._boxModel.originalHeight/item._boxModel.originalWidth).round(2),imgWidth=item._boxModel.originalWidth;imgHeight=item._boxModel.originalHeight,1==cfg.fitToHeight?(imgHeight=this.screenSize.height,imgWidth=imgHeight/imgRatio,this.screenSize.width>imgWidth&&(imgWidth=this.screenSize.width,imgHeight=imgWidth*imgRatio)):1>imgRatio?(this.screenSize.width<imgWidth&&(imgWidth=this.screenSize.width,imgHeight=imgWidth*imgRatio),this.screenSize.height<imgHeight&&(imgHeight=this.screenSize.height,imgWidth=imgHeight/imgRatio)):(this.screenSize.height<imgHeight&&(imgHeight=this.screenSize.height,imgWidth=imgHeight/imgRatio),this.screenSize.width<imgWidth&&(imgWidth=this.screenSize.width,imgHeight=imgWidth*imgRatio)),item._boxModel.width=item._boxModel.dW=imgWidth,item._boxModel.height=item._boxModel.dH=imgHeight;var styles=[];styles.push("width:"+imgWidth+"px"),styles.push("height:"+imgHeight+"px"),item._boxModel.left=item._boxModel.dL=this.screenSize.width/2-imgWidth/2,item._boxModel.top=item._boxModel.dT=this.screenSize.height/2-imgHeight/2,styles.push("left:"+item._boxModel.left+"px"),styles.push("top:"+item._boxModel.top+"px");var po=[];po.push('<div class="img" style="'+styles.join(";")+'">'),po.push('<img src="'+item[cfg.reserveKeys.url]+'" style="width:100%;" ondragstart="return false;" />'),po.push("</div>"),target.empty(),target.append(po.join("")),target.find(".img").fadeIn(),target.removeClass("AXLoadingBlack"),item._axdom=target.find(".img")},close:function(){var cfg=this.config,_this=this;axdom(document.body).scrollTop(axdom(document.body).data("scrollTop")),cfg.onClose&&cfg.onClose.call(cfg),this.target.fadeOut(function(){_this.target.remove()}),this.isOpend=!1,axdom(window).unbind("resize.AXSliderViewer")},prev:function(){var cfg=this.config,_this=this,screenWidth=this.screenSize.width,selectedIndex=this.selectedIndex;if(0>=selectedIndex)return!1;var prevIndex=selectedIndex.number()-1,nowDomTarget=axdom("#"+cfg.id+"_AX_slide_AX_"+selectedIndex),prevDomTarget=axdom("#"+cfg.id+"_AX_slide_AX_"+prevIndex);return nowDomTarget.animate({left:screenWidth},500,"expoOut",function(){}),prevDomTarget.animate({left:0},300,"expoOut",function(){_this.selectedIndex=prevIndex,_this.openImage(prevIndex)}),!0},next:function(){var cfg=this.config,_this=this,screenWidth=this.screenSize.width,selectedIndex=this.selectedIndex;if(selectedIndex>=this.list.length-1)return!1;var nextIndex=selectedIndex.number()+1,nowDomTarget=axdom("#"+cfg.id+"_AX_slide_AX_"+selectedIndex),nextDomTarget=axdom("#"+cfg.id+"_AX_slide_AX_"+nextIndex);return nowDomTarget.animate({left:-screenWidth},500,"expoOut",function(){}),nextDomTarget.animate({left:0},300,"expoOut",function(){_this.selectedIndex=nextIndex,_this.openImage(nextIndex)}),!0},zoomIn:function(){var item=(this.config,this.list[this.selectedIndex]),cx=this.screenSize.width/2-item._boxModel.dL,cy=this.screenSize.height/2-item._boxModel.dT,dLen=this.screenSize.width>this.screenSize.height?this.screenSize.height:this.screenSize.width;return this.imgResize(item,item._boxModel,dLen,cx,cy,"animate"),this},zoomOut:function(){var item=(this.config,this.list[this.selectedIndex]),cx=this.screenSize.width/2-item._boxModel.dL,cy=this.screenSize.height/2-item._boxModel.dT,dLen=this.screenSize.width>this.screenSize.height?this.screenSize.height:this.screenSize.width;return this.imgResize(item,item._boxModel,-dLen,cx,cy,"animate"),this},imgResize:function(item,firstBoxModel,dLen,cx,cy,animate){var newW,newH,newL,newT,css=(this.config,{}),imgRatio=(item._boxModel.originalHeight/item._boxModel.originalWidth).round(3);null==dLen?(newL=item._boxModel.left,newT=item._boxModel.top,newW=item._boxModel.width,newH=item._boxModel.height):(newW=firstBoxModel.dW+dLen,newH=newW*imgRatio,null==cx?(newL=this.screenSize.width/2,mewT=this.screenSize.width/2):(newL=-(newW*cx/firstBoxModel.dW-cx)+firstBoxModel.dL,newT=-(newH*cy/firstBoxModel.dH-cy)+firstBoxModel.dT)),css={left:newL,top:newT,width:newW,height:newH,opacity:1},this.changeImgCss(item._axdom,css,animate)&&(item._boxModel.dL=newL,item._boxModel.dT=newT,item._boxModel.dW=newW,item._boxModel.dH=newH)},imgTouchUpdate:function(args){this.config;if(this.touchAndMoved=!0,this.touhEndObserver&&clearTimeout(this.touhEndObserver),"zoom"==args.moveType){var l1dx,l1dy,l2dx,l2dy,l1,l2,dLen;l1dx=args.firstTouch.pageX2>args.firstTouch.pageX1?args.firstTouch.pageX2-args.firstTouch.pageX1:args.firstTouch.pageX1-args.firstTouch.pageX2,l1dy=args.firstTouch.pageY2>args.firstTouch.pageY1?args.firstTouch.pageY2-args.firstTouch.pageY1:args.firstTouch.pageY1-args.firstTouch.pageY2,l2dx=args.touch.pageY2>args.touch.pageY1?args.touch.pageY2-args.touch.pageY1:args.touch.pageY1-args.touch.pageY2,l2dy=args.touch.pageY2>args.touch.pageY1?args.touch.pageY2-args.touch.pageY1:args.touch.pageY1-args.touch.pageY2,l1=Math.sqrt(Math.pow(l1dx,2)+Math.pow(l1dy,2)),l2=Math.sqrt(Math.pow(l2dx,2)+Math.pow(l2dy,2)),dLen=(1.2*(l2-l1)).round(3),isNaN(dLen)||this.imgResize(args.item,args.firstBoxModel,dLen,args.firstTouch.centerX,args.firstTouch.centerY)}else{var mx,my,newL,newT;mx=(args.firstTouch.centerX-args.touch.centerX).round(),my=(args.firstTouch.centerY-args.touch.centerY).round(),null==this._mx?(this.velocityDX=0,this.velocityDY=0):(this.velocityDX=this._mx-mx,this.velocityDY=this._my-my),this._mx=mx,this._my=my,args.item._boxModel.width==args.item._boxModel.dW?mx.abs()>my.abs()?(newL=args.firstBoxModel.dL-mx,newT=args.firstBoxModel.dT):(newL=args.firstBoxModel.dL,newT=args.firstBoxModel.dT-my):(newL=args.firstBoxModel.dL-mx,newT=args.firstBoxModel.dT-my),this.changeImgCss(args.item._axdom,{left:newL,top:newT})}},imgTouchEnd:function(args,event){var _this=(this.config,this),pos=args.item._axdom.position();args.item._boxModel.dL=pos.left,args.item._boxModel.dT=pos.top;var sL=0,eL=0,sT=0,eT=0,scW=this.screenSize.width,scH=this.screenSize.height,iW=args.item._axdom.width(),iH=args.item._axdom.height(),imgAnmate=!1;if("move"==args.moveType)var css={left:pos.left+10*(this.velocityDX||0),top:pos.top+10*(this.velocityDY||0),opacity:1};else var css={left:pos.left,top:pos.top,opacity:1};css.left,css.top;if(scW>iW&&scH>iH&&(iW=css.width=args.item._boxModel.width,iH=css.height=args.item._boxModel.height),scW>iW?(sL=(scW-iW)/2,eL=sL):(sL=0,eL=scW-iW),scH>iH?(sT=(scH-iH)/2,eT=sT):(sT=0,eT=scH-iH),css.left>sL){if("move"==args.moveType&&css.left+iW-scW>.35*scW&&this.prev())return"prev";css.left=sL,imgAnmate=!0}else if(css.left<eL){if("move"==args.moveType&&css.left+iW<.35*scW&&this.next())return"next";css.left=eL,imgAnmate=!0}if(css.top>sT){if("move"==args.moveType&&args.item._boxModel.width==args.item._boxModel.dW&&css.top+iH-scH>.35*scH)return this.close(),"close";css.top=sT,imgAnmate=!0}else if(css.top<eT){if("move"==args.moveType&&args.item._boxModel.width==args.item._boxModel.dW&&css.top+iH<.35*scH)return this.close(),"close";css.top=eT,imgAnmate=!0}imgAnmate&&(args.item._axdom.stop(),args.item._axdom.animate(css),isNaN(css.left)||(args.item._boxModel.dL=css.left),isNaN(css.top)||(args.item._boxModel.dT=css.top),"zoom"==args.moveType&&(isNaN(css.width)||(args.item._boxModel.dW=css.width),isNaN(css.height)||(args.item._boxModel.dH=css.height))),this._mx=null,this._my=null,this.touchAndMoved||(this.touchClicked?(this.imgDblClick(args.item,event),this.touchDblClicked=!0):this.touchClicked=!0),this.touhEndObserver=setTimeout(function(){_this.touchAndMoved||_this.touchDblClicked||!_this.touchClicked||_this.imgClick(args.item,event),_this.touchClicked=!1,_this.touchDblClicked=!1,_this.touchAndMoved=!1},200)},changeImgCss:function(img,css,animate){return void 0!=css.width&&css.width<100?void 0:(animate?img.animate(css):img.css(css),css)},imgClick:function(item,event){this.config;this.controller.toggle(),this.touchClicked=!1,this.touchDblClicked=!1},imgDblClick:function(item,event){this.config;if(item._boxModel.dW>this.screenSize.width)this.imgResize(item,this.touchUpdater.firstBoxModel,null,this.touchUpdater.firstTouch.centerX,this.touchUpdater.firstTouch.centerY,"animate");else{var dLen=2*this.screenSize.width;this.imgResize(item,this.touchUpdater.firstBoxModel,dLen,this.touchUpdater.firstTouch.centerX,this.touchUpdater.firstTouch.centerY,"animate")}this.touchClicked=!1,this.touchDblClicked=!1}}),AXTabClass=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.objects=[],this.config.handleWidth=22,this.config.responsiveMobile=AXConfig.mobile.responsiveWidth,this.config.bounces=!0,this.config.closable=AXConfig&&AXConfig.AXTab&&AXConfig.AXTab.closable?AXConfig.AXTab.closable:!1},init:function(){axdom(window).bind("resize",this.windowResize.bind(this))},windowResize:function(){var windowResizeApply=this.windowResizeApply.bind(this);this.windowResizeObserver&&clearTimeout(this.windowResizeObserver),this.windowResizeObserver=setTimeout(function(){windowResizeApply()},500)},windowResizeApply:function(){this.resizeCheck()},bind:function(obj){this.config;if(!obj.id)return void trace("bind 대상 ID가 없어 bind 처리할 수 없습니다.");if(!AXgetId(obj.id))return void trace("bind 대상이 없어 bind 처리할 수 없습니다.");var objID=obj.id,objSeq=null;obj.theme=obj.theme||"AXTabs",obj.overflow=obj.overflow||"visible",obj.scrollAmount=obj.scrollAmount||5,obj.options=obj.options||[{optionValue:"null",optionText:"빈 탭"}],axdom.each(this.objects,function(idx,O){return this.id==objID?(objSeq=idx,!1):void 0}),null==objSeq?(objSeq=this.objects.length,this.objects.push({id:objID,config:obj})):(this.objects[objSeq].isDel=void 0,this.objects[objSeq].config=obj),null!=objSeq?this.initTab(objID,objSeq):trace("object find error")},initTab:function(objID,objSeq){var cfg=this.config,_this=this,obj=this.objects[objSeq],po=[],subOptions=[];po.push('<div class="'+obj.config.theme+'" id="'+objID+'_AX_tabContainer">'),po.push('<div class="AXTabsTray" id="'+objID+'_AX_tabTray">'),"visible"!=obj.config.overflow&&po.push('	<div class="trayScroll" id="'+objID+'_AX_tabScroll">'),po.push('	<div class="clear"></div>'),"visible"!=obj.config.overflow&&(po.push("	</div>"),po.push('	<div class="leftArrowHandleBox" style="display:none;"><a href="javascript:;" class="tabArrow" id="'+objID+'_AX_Arrow_AX_Left">arrow</a></div>'),po.push('	<div class="rightArrowHandleBox" style="display:none;"><a href="javascript:;" class="tabArrow" id="'+objID+'_AX_Arrow_AX_Right">arrow</a></div>'),po.push('	<div class="rightArrowMoreBox" style="display:none;"><a href="javascript:;" class="tabArrow" id="'+objID+'_AX_Arrow_AX_More">arrow</a></div>')),po.push("</div>"),subOptions.length>0,po.push("</div>"),obj.jQueryObjID=axdom("#"+objID),obj.jQueryObjID.html(po.join("")),obj.jQueryObjID.data("objSeq",objSeq),obj.tabTray=axdom("#"+objID+"_AX_tabTray"),obj.tabScroll=axdom("#"+objID+"_AX_tabScroll"),obj.tabContainer=axdom("#"+objID+"_AX_tabContainer"),AXContextMenu.bind({id:objID+"_AX_tabMore",theme:"AXContextMenu",width:"200",menu:[]}),this.addTabs(objID,obj.config.options);var bindTabMove=this.bindTabMove.bind(this),bindTabMoveClick=this.bindTabMoveClick.bind(this),bindTabMoreClick=this.bindTabMoreClick.bind(this);axdom("#"+objID+"_AX_Arrow_AX_Left").bind("mouseover",function(event){bindTabMove(objID,objSeq,"left",event)}),axdom("#"+objID+"_AX_Arrow_AX_Right").bind("mouseover",function(event){bindTabMove(objID,objSeq,"right",event)}),axdom("#"+objID+"_AX_Arrow_AX_Left, #"+objID+"_AX_Arrow_AX_Right").bind("mouseout",function(event){obj.moveobj&&clearTimeout(obj.moveobj)}),axdom("#"+objID+"_AX_Arrow_AX_Left").bind("mousedown",function(event){bindTabMoveClick(objID,objSeq,"left",event)}),axdom("#"+objID+"_AX_Arrow_AX_Right").bind("mousedown",function(event){bindTabMoveClick(objID,objSeq,"right",event)}),axdom("#"+objID+"_AX_Arrow_AX_More").bind("click",function(event){bindTabMoreClick(objID,objSeq,"right",event)}),"visible"!=obj.overflow&&setTimeout(function(){var tabsWidth=axf.clientWidth()<cfg.responsiveMobile?40:30,tabsMargin=(axf.clientWidth()<cfg.responsiveMobile,5);obj.tabContainer.find(".AXTab").each(function(){tabsWidth+=axdom(this).outerWidth().number()+axdom(this).css("marginLeft").number()+axdom(this).css("marginRight").number()+tabsMargin}),obj.tabScroll.css({width:tabsWidth,left:cfg.handleWidth}),obj.tabTray.css({height:obj.tabScroll.outerHeight()});var trayWidth=obj.tabTray.outerWidth(),scrollWidth=obj.tabScroll.outerWidth();trayWidth>scrollWidth?(obj.tabContainer.find(".leftArrowHandleBox").hide(),obj.tabContainer.find(".rightArrowHandleBox").hide(),obj.tabContainer.find(".rightArrowMoreBox").hide(),obj.tabScroll.css({left:0})):null!=obj.config.selectedIndex&&(obj.tabContainer.find(".leftArrowHandleBox").show(),obj.tabContainer.find(".rightArrowHandleBox").show(),obj.tabContainer.find(".rightArrowMoreBox").show(),_this.focusingItem(objID,objSeq,obj.config.selectedIndex)),scrollWidth>trayWidth&&AXUtil.clientWidth()<cfg.responsiveMobile&&(obj.tabContainer.find(".leftArrowHandleBox").hide(),obj.tabContainer.find(".rightArrowHandleBox").hide(),obj.tabScroll.css({left:0}));var touchstart=_this.touchstart.bind(_this);if(AXUtil.browser.mobile){var touchBodyID=obj.tabTray.get(0).id;_this.touchstartBind=function(){touchstart(objID,objSeq)},document.addEventListener&&AXgetId(touchBodyID).addEventListener("touchstart",_this.touchstartBind,!1)}else _this.touchstartBind=function(event){touchstart(objID,objSeq,event)},obj.tabTray.unbind("mousedown.AXMobileTouch").bind("mousedown.AXMobileTouch",_this.touchstartBind);obj.tabTray.attr("onselectstart","return false"),obj.tabTray.addClass("AXUserSelectNone"),obj.tabTray.unbind("dragstart.AXMobileTouch").bind("dragstart.AXMobileTouch",_this.cancelEvent.bind(_this));
  },50)},addTabs:function(objID,options){var target,cfg=this.config,objSeq=axdom("#"+objID).data("objSeq"),obj=this.objects[objSeq],po=[];target=axdom("visible"==obj.config.overflow?"#"+objID+"_AX_tabTray div.clear":"#"+objID+"_AX_tabScroll div.clear");var tabsCnt=obj.tabContainer.find(".AXTab").length,selectedIndex=null;axdom.each(options,function(oidx,O){var closable=O.closable||obj.config.closable||cfg.closable;oidx+=tabsCnt,po.push('<a href="javascript:;" id="'+objID+"_AX_Tabs_AX_"+oidx+'" class="AXTab '+(O.addClass||"")),closable&&po.push(" closable"),O.optionValue==obj.config.value&&(selectedIndex=oidx,po.push(" on")),po.push('">'),po.push(O.optionText.dec()),closable&&po.push('<span class="AXTabClose"></span>'),po.push("</a>"),po.push("<span class='AXTabSplit'></span>")}),null!=selectedIndex&&(obj.config.selectedIndex=selectedIndex),target.before(po.join(""));var tabsWidth=axf.clientWidth()<cfg.responsiveMobile?40:30,tabsMargin=(axf.clientWidth()<cfg.responsiveMobile,5);obj.tabContainer.find(".AXTab").each(function(){tabsWidth+=axdom(this).outerWidth().number()+axdom(this).css("marginLeft").number()+axdom(this).css("marginRight").number()+tabsMargin}),obj.tabScroll.css({width:tabsWidth});var setValueTab=this.setValueTab.bind(this),myMenu=[];axdom.each(obj.config.options,function(oidx,O){myMenu.push({label:O.optionText,value:O.optionValue,className:"",onclick:function(){setValueTab(objID,this.menu.value)}})});var tabMoreID=objID+"_AX_tabMore";axdom.each(AXContextMenu.objects,function(oidx,O){return O.id==tabMoreID?(O.menu=myMenu,!1):void 0});var bindTabClick=this.bindTabClick.bind(this);obj.tabContainer.find(".AXTab").unbind("click").bind("click",function(event){bindTabClick(objID,objSeq,event)});var closeTab=this.closeTab.bind(this);obj.tabContainer.find(".AXTabClose").unbind("click").bind("click",function(event){var tabIndex=obj.tabContainer.find(".AXTab").index(axdom(event.target).parent());-1!==tabIndex&&closeTab(objID,tabIndex,event)}),this.resizeCheck()},closeTab:function(objID,tabIndex,event){var objSeq=axdom("#"+objID).data("objSeq"),obj=this.objects[objSeq];if(obj.config.options){tabIndex=void 0===tabIndex?obj.config.options.length-1:tabIndex,"number"!=typeof tabIndex&&axdom.each(obj.config.options,function(oidx,O){return O.optionValue===tabIndex?(tabIndex=oidx,!1):void 0});var removeTargetOption=obj.config.options.splice(tabIndex,1)[0];if(obj.config.selectedIndex==tabIndex){var selectedIndex=tabIndex-1;selectedIndex>-1?this.setValueTab(objID,obj.config.options[selectedIndex].optionValue):this.setValueTab(objID,obj.config.options[0].optionValue)}else if(obj.config.selectedIndex>tabIndex){var selectedIndex=obj.config.selectedIndex-1;selectedIndex>-1&&(obj.config.selectedIndex=selectedIndex)}this.initTab(objID,objSeq),axdom.isFunction(obj.config.onclose)&&obj.config.onclose.call({options:obj.config.options,item:removeTargetOption,index:tabIndex},removeTargetOption,removeTargetOption.optionValue)}},bindTabClick:function(objID,objSeq,event){var obj=(this.config,this.objects[objSeq]),eid=event.target.id.split(/_AX_/g),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,until:function(evt,evtIDs){return!!axdom(evt.parentNode).hasClass("AXTabsTray")},find:function(evt,evtIDs){return!!axdom(evt).hasClass("AXTab")}});if(myTarget){var targetID=myTarget.id,itemIndex=targetID.split(/_AX_/g).last(),selectedObject=obj.config.options[itemIndex];selectedObject&&obj.config.value!=selectedObject.optionValue?(axdom("#"+objID+"_AX_Tabs_AX_"+obj.config.selectedIndex).removeClass("on"),axdom("#"+objID+"_AX_Tabs_AX_"+itemIndex).addClass("on"),obj.config.value=selectedObject.optionValue,obj.config.selectedIndex=itemIndex,this.focusingItem(objID,objSeq,obj.config.selectedIndex),obj.config.onclick&&obj.config.onclick.call({options:obj.config.options,item:obj.config.options[itemIndex],index:itemIndex},obj.config.options[itemIndex],obj.config.options[itemIndex].optionValue),obj.config.onchange&&obj.config.onchange.call({options:obj.config.options,item:obj.config.options[itemIndex],index:itemIndex},obj.config.options[itemIndex],obj.config.options[itemIndex].optionValue)):obj.config.onclick&&obj.config.onclick.call({options:obj.config.options,item:obj.config.options[itemIndex],index:itemIndex},obj.config.options[itemIndex],obj.config.options[itemIndex].optionValue)}},setValueTab:function(objID,value){var objSeq=(this.config,null);if(axdom.each(this.objects,function(index,O){return O.id==objID?(objSeq=index,!1):void 0}),null!=objSeq){var obj=this.objects[objSeq],itemIndex=null;if(axdom.each(obj.config.options,function(oidx,O){return O.optionValue==value?(itemIndex=oidx,!1):void 0}),null!=itemIndex){var selectedObject=obj.config.options[itemIndex];if(obj.config.value!=selectedObject.optionValue){var tabs=obj.tabContainer.find(".AXTab");tabs.eq(obj.config.selectedIndex).removeClass("on"),tabs.eq(itemIndex).addClass("on"),this.focusingItem(objID,objSeq,itemIndex),obj.config.value=selectedObject.optionValue,obj.config.selectedIndex=itemIndex,obj.config.onchange&&obj.config.onchange.call({options:obj.config.options,item:obj.config.options[itemIndex],index:itemIndex},obj.config.options[itemIndex],obj.config.options[itemIndex].optionValue)}}}},bindTabMove:function(objID,objSeq,direction,event){var cfg=this.config,obj=this.objects[objSeq],trayWidth=obj.tabTray.outerWidth();if(AXUtil.clientWidth()<cfg.responsiveMobile)var rightMargin=40;else var rightMargin=29+cfg.handleWidth;trayWidth-=rightMargin;var scrollWidth=obj.tabScroll.outerWidth(),scrollLeft=obj.tabScroll.position().left,animateStyles={};if("left"==direction){if(!(scrollLeft<cfg.handleWidth))return;scrollLeft+=obj.config.scrollAmount,animateStyles={left:scrollLeft},scrollLeft>cfg.handleWidth&&(scrollLeft=cfg.handleWidth,animateStyles={left:scrollLeft})}else scrollWidth+scrollLeft>trayWidth&&(scrollLeft-=obj.config.scrollAmount,animateStyles={left:scrollLeft}),trayWidth>scrollWidth+scrollLeft&&(scrollLeft=trayWidth-scrollWidth-cfg.handleWidth,animateStyles={left:scrollLeft});obj.tabScroll.css(animateStyles);var bindTabMove=this.bindTabMove.bind(this);obj.moveobj&&clearTimeout(obj.moveobj),obj.moveobj=setTimeout(function(){bindTabMove(objID,objSeq,direction,event)},20)},bindTabMoveClick:function(objID,objSeq,direction,event){var cfg=this.config,obj=this.objects[objSeq];obj.moveobj&&clearTimeout(obj.moveobj);var scrollAmount=500,trayWidth=obj.tabTray.outerWidth();if(AXUtil.clientWidth()<cfg.responsiveMobile)var rightMargin=40;else var rightMargin=29+cfg.handleWidth;trayWidth-=rightMargin;var scrollWidth=obj.tabScroll.outerWidth(),scrollLeft=obj.tabScroll.position().left,animateStyles={};if("left"==direction){if(!(scrollLeft<cfg.handleWidth))return;scrollLeft+=scrollAmount,animateStyles={left:scrollLeft},scrollLeft>cfg.handleWidth&&(scrollLeft=cfg.handleWidth,animateStyles={left:scrollLeft})}else scrollWidth+scrollLeft>trayWidth&&(scrollLeft-=scrollAmount,animateStyles={left:scrollLeft}),trayWidth-cfg.handleWidth>scrollWidth+scrollLeft&&(scrollLeft=trayWidth-scrollWidth-cfg.handleWidth,animateStyles={left:scrollLeft});return obj.tabScroll.stop(),obj.tabScroll.animate(animateStyles,500,"sineInOut",function(){}),event.preventDefault&&event.preventDefault(),event.stopPropagation&&event.stopPropagation(),event.cancelBubble=!0,!1},bindTabMoreClick:function(objID,objSeq,direction,event){var cfg=this.config;this.objects[objSeq];axf.clientWidth()<cfg.responsiveMobile&&AXContextMenu.setConfig({responsiveMobile:640}),AXContextMenu.open({id:objID+"_AX_tabMore",title:AXConfig.AXContextMenu.title},event)},resizeCheck:function(){var cfg=this.config,focusingItem=this.focusingItem.bind(this);axdom.each(this.objects,function(objSeq,O){var objID=this.id,obj=this,trayWidth=obj.tabTray.outerWidth(),scrollWidth=obj.tabScroll.outerWidth();trayWidth>scrollWidth?(obj.tabContainer.find(".leftArrowHandleBox").hide(),obj.tabContainer.find(".rightArrowHandleBox").hide(),obj.tabContainer.find(".rightArrowMoreBox").hide(),obj.tabScroll.css({left:0})):(AXUtil.clientWidth()<cfg.responsiveMobile?(obj.tabContainer.find(".leftArrowHandleBox").hide(),obj.tabContainer.find(".rightArrowHandleBox").hide()):(obj.tabContainer.find(".leftArrowHandleBox").show(),obj.tabContainer.find(".rightArrowHandleBox").show()),obj.tabContainer.find(".rightArrowMoreBox").show(),AXUtil.isEmpty(obj.config.selectedIndex)||focusingItem(objID,objSeq,obj.config.selectedIndex)),obj.tabTray.css({height:obj.tabScroll.outerHeight()})})},focusingItem:function(objID,objSeq,optionIndex){var cfg=this.config,obj=this.objects[objSeq];if(obj.tabScroll.position()&&!(obj.tabTray.outerWidth()>obj.tabScroll.outerWidth())){var tabs=obj.tabContainer.find(".AXTab"),targetTab=tabs.eq(optionIndex);if(AXUtil.clientWidth()<cfg.responsiveMobile)var scrollLeft=targetTab.position().left,itemWidth=targetTab.outerWidth(),handleWidth=0,rightMargin=40;else var scrollLeft=targetTab.position().left-cfg.handleWidth,itemWidth=targetTab.outerWidth(),handleWidth=cfg.handleWidth,rightMargin=29+cfg.handleWidth;scrollLeft>obj.tabScroll.position().left.abs()&&scrollLeft+itemWidth<=obj.tabScroll.position().left.abs()+obj.tabTray.outerWidth()-rightMargin-handleWidth||(obj.tabTray.outerWidth()-handleWidth>obj.tabScroll.outerWidth()-scrollLeft&&(scrollLeft=obj.tabScroll.outerWidth()-obj.tabTray.outerWidth()+rightMargin),setTimeout(function(){obj.tabScroll.css({left:-scrollLeft})},10))}},touchstart:function(objID,objSeq,e){this.touhEndObserver&&clearTimeout(this.touhEndObserver),this.touhMoveObserver&&clearTimeout(this.touhMoveObserver);var obj=(this.config,this.objects[objSeq]),trayWidth=obj.tabTray.outerWidth(),scrollWidth=obj.tabScroll.outerWidth();if(!(trayWidth>scrollWidth)){var touch,event=window.event;if(AXUtil.browser.mobile){if(touch=event.touches[0],!touch.pageX)return}else{var event=e;touch={pageX:e.pageX,pageY:e.pageY}}this.touchStartXY={sTime:(new Date).getTime()/1e3,sLeft:obj.tabScroll.position().left,x:touch.pageX,y:touch.pageY};var touchEnd=this.touchEnd.bind(this),touchMove=this.touchMove.bind(this);if(AXUtil.browser.mobile){var event=window.event;this.touchEndBind=function(){touchEnd(objID,objSeq)},this.touchMoveBind=function(){touchMove(objID,objSeq)},document.addEventListener&&(document.addEventListener("touchend",this.touchEndBind,!1),document.addEventListener("touchmove",this.touchMoveBind,!1))}else this.touchEndBind=function(event){touchEnd(objID,objSeq,event)},this.touchMoveBind=function(event){touchMove(objID,objSeq,event)},axdom(document.body).bind("mouseup.AXMobileTouch",this.touchEndBind),axdom(document.body).bind("mousemove.AXMobileTouch",this.touchMoveBind);var minLeft=0,maxLeft=-(this.touchStartXY.scrollWidth-this.touchStartXY.targetWidth),scrollPosition=obj.tabScroll.position();scrollPosition.left<minLeft&&scrollPosition.left>maxLeft&&obj.tabScroll.stop()}},touchMove:function(objID,objSeq,e){this.touhEndObserver&&clearTimeout(this.touhEndObserver),this.touhMoveObserver&&clearTimeout(this.touhMoveObserver);var touch,event=(this.config,this.objects[objSeq],window.event);if(AXUtil.browser.mobile){if(touch=event.touches[0],!touch.pageX)return}else{var event=e;touch={pageX:e.pageX,pageY:e.pageY}}if((this.touchStartXY.x-touch.pageX).abs()<(this.touchStartXY.y-touch.pageY).abs());else if((this.touchStartXY.x-touch.pageX).abs()>(this.touchStartXY.y-touch.pageY).abs()){if(this.moveBlock(objID,objSeq,touch.pageX-this.touchStartXY.x),!event.preventDefault)return!1;event.preventDefault()}((this.touchStartXY.x-touch.pageX).abs()-(this.touchStartXY.y-touch.pageY).abs()).abs()<5;var touchMoveAfter=this.touchMoveAfter.bind(this);this.touhMoveObserver=setTimeout(function(){touchMoveAfter(touch,objID,objSeq)},50)},touchMoveAfter:function(touch,objID,objSeq){var obj=(this.config,this.objects[objSeq]);try{this.touchStartXY.sTime=(new Date).getTime()/1e3,this.touchStartXY.sLeft=obj.tabScroll.position().left,this.touchStartXY.x=touch.pageX,this.touchStartXY.y=touch.pageY}catch(e){}},touchEnd:function(objID,objSeq,e){this.config,this.objects[objSeq],window.event||e;AXUtil.browser.mobile?document.removeEventListener&&(document.removeEventListener("touchend",this.touchEndBind,!1),document.removeEventListener("touchmove",this.touchMoveBind,!1)):(axdom(document.body).unbind("mouseup.AXMobileTouch"),axdom(document.body).unbind("mousemove.AXMobileTouch"));var moveEndBlock=this.moveEndBlock.bind(this);this.touhEndObserver=setTimeout(function(){moveEndBlock(objID,objSeq)},10)},moveBlock:function(objID,objSeq,moveX){var cfg=this.config,obj=this.objects[objSeq],newLeft=this.touchStartXY.sLeft+moveX,newLeft=this.touchStartXY.sLeft+moveX,minLeft=0,maxLeft=-(this.touchStartXY.scrollWidth-this.touchStartXY.targetWidth);cfg.bounces&&(minLeft=.4*this.touchStartXY.targetWidth,maxLeft=-(1.2*(this.touchStartXY.scrollWidth-this.touchStartXY.targetWidth))),newLeft>minLeft?newLeft=minLeft:maxLeft>newLeft&&(newLeft=maxLeft),obj.tabScroll.css({left:newLeft})},moveEndBlock:function(objID,objSeq){var cfg=this.config,obj=this.objects[objSeq];if(this.touchStartXY){var sTime=this.touchStartXY.sTime,eTime=(new Date).getTime()/1e3,dTime=eTime-sTime,eLeft=obj.tabScroll.position().left,dLeft=eLeft-this.touchStartXY.sLeft,velocity=Math.ceil(dLeft/dTime/5),endLeft=Math.ceil(eLeft+velocity);endLeft>0&&(endLeft=0);var newLeft=endLeft.abs();if(AXUtil.clientWidth()<cfg.responsiveMobile)var handleWidth=0,rightMargin=40;else var handleWidth=cfg.handleWidth,rightMargin=29+cfg.handleWidth;obj.tabTray.outerWidth()-handleWidth>obj.tabScroll.outerWidth()-newLeft&&(newLeft=obj.tabScroll.outerWidth()-obj.tabTray.outerWidth()+rightMargin),this.touchStartXY.sLeft=-newLeft,obj.tabScroll.animate({left:-newLeft},(obj.tabScroll.position().left+newLeft).abs(),"cubicOut",function(){}),this.touchStartXY=null}},cancelEvent:function(event){return event.stopPropagation(),!1},updateTabOption:function(objID,value,option){var objSeq=(this.config,null);if(axdom.each(this.objects,function(index,O){return O.id==objID?(objSeq=index,!1):void 0}),null!=objSeq){var obj=this.objects[objSeq],itemIndex=null;if(axdom.each(obj.config.options,function(oidx,O){return O.optionValue==value?(itemIndex=oidx,!1):void 0}),null!=itemIndex){var OriginalOption=obj.config.options[itemIndex];for(var idx in option)OriginalOption[idx]=option[idx];this.initTab(objID,objSeq)}}}}),AXTab=new AXTabClass;AXTab.setConfig({}),axdom.fn.unbindTab=function(config){return axdom.each(this,function(){void 0==config&&(config={}),config.id=this.id,AXTab.unbind(config)}),this},axdom.fn.bindTab=function(config){return axdom.each(this,function(){void 0==config&&(config={}),config.id=this.id,AXTab.bind(config)}),this},axdom.fn.setValueTab=function(value){return axdom.each(this,function(){AXTab.setValueTab(this.id,value)}),this},axdom.fn.addTabs=function(options){return axdom.each(this,function(){var objSeq=axdom("#"+this.id).data("objSeq");if(null!=objSeq){var obj=AXTab.objects[objSeq];obj.config.options=obj.config.options.concat(options),AXTab.addTabs(this.id,options)}}),this},axdom.fn.closeTab=function(tabValue){return axdom.each(this,function(){AXTab.closeTab(this.id,tabValue)}),this},axdom.fn.updateTabs=function(options){return axdom.each(this,function(){var objSeq=axdom("#"+this.id).data("objSeq");if(null!=objSeq){var obj=AXTab.objects[objSeq];obj.config.options=options,obj.config.value=options[0].optionValue,AXTab.initTab(this.id,objSeq)}}),this},axdom.fn.updateTabOption=function(value,option){return axdom.each(this,function(){AXTab.updateTabOption(this.id,value,option)}),this},axdom.fn.getOptions=function(){var returnValue=null;return axdom.each(this,function(){var objSeq=axdom("#"+this.id).data("objSeq");if(null!=objSeq){var obj=AXTab.objects[objSeq];returnValue=obj.config.options}}),returnValue};var AXToolBar=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.config.theme="AXToolBar",this.config.reserveKeys={subMenu:"subMenu"},this.opened=!1,this.open_midx=null},init:function(){var cfg=this.config;return Object.isUndefined(cfg.targetID)?void trace("need targetID - setConfig({targetID:''})"):(this.target=jQuery("#"+cfg.targetID),void this.setBody())},filter:function(menu){var that,cfg=this.config;return cfg.filter?(that=menu,cfg.filter.call(that,that)):!0},setBody:function(){var cfg=this.config,_this=this,po=[];po.push('<div class="',cfg.theme,'">'),$.each(cfg.menu,function(midx,M){if(M&&_this.filter(M)){var addClass=[];addClass.push(this.addClass),this[cfg.reserveKeys.subMenu]||addClass.push("noexpand"),po.push('<div class="ax-root-menu-item" data-item-idx="',midx,'">'),po.push('<a href="#axexec" class="ax-menu-item ',addClass.join(" "),'" data-item-idx="',midx,'">',this.label,"</a>"),this[cfg.reserveKeys.subMenu]&&po.push('<a href="#axexec" class="ax-menu-handel" data-item-idx="',midx,'"></a>'),po.push("</div>")}}),po.push('<div class="clear"></div>'),po.push("</div>"),this.target.html(po.join("")),this.target.find(".ax-menu-item").bind("click",function(e){var target=axf.get_event_target(e.target,{tagname:"a",clazz:"ax-menu-item"}),midx=target.getAttribute("data-item-idx");cfg.menu[midx].onclick?_this.exec(midx,cfg.menu[midx],e):_this.expand(midx,cfg.menu[midx],e)}),this.target.find(".ax-root-menu-item").bind("mouseover",function(e){var target=axf.get_event_target(e.target,{tagname:"div",clazz:"ax-root-menu-item"}),midx=target.getAttribute("data-item-idx");_this.overitem(midx,cfg.menu[midx],e)}),this.target.find(".ax-root-menu-item").bind("mouseout",function(e){_this.outitem()}),this.target.find(".ax-menu-handel").bind("click",function(e){var target=axf.get_event_target(e.target,{tagname:"a",clazz:"ax-menu-handel"}),midx=target.getAttribute("data-item-idx");_this.expand(midx,cfg.menu[midx],e)})},reset:function(){this.setBody()},exec:function(midx,menu,event){var cfg=this.config,that=menu;that.targetID=cfg.targetID,menu.onclick.call(that,menu,event)},overitem:function(midx,menu,event){var _target=(this.config,this.target.find("[data-item-idx='"+midx+"']"));this.target.find(".ax-root-menu-item").removeClass("hover"),_target.addClass("hover"),this.opened&&this.expand(midx,menu)},outitem:function(){if(!this.opened){this.config;this.target.find(".ax-root-menu-item").removeClass("hover")}},expand:function(midx,menu,event){var offset,cfg=this.config,_this=this,_target=this.target.find("[data-item-idx='"+midx+"']");return this.closing?(AXContextMenu.close({id:cfg.targetID+"_AX_expand_AX_"+this.open_midx}),void this.expand_end()):(this.open_midx!=midx&&AXContextMenu.close({id:cfg.targetID+"_AX_expand_AX_"+this.open_midx}),this.open_midx=midx,void(menu[cfg.reserveKeys.subMenu]?(menu.context_menu||("undefined"==typeof menu.width&&(menu.width=150),menu.context_menu=AXContextMenu.bind({id:cfg.targetID+"_AX_expand_AX_"+midx,theme:"AXContextMenu",width:menu.width,reserveKeys:cfg.reserveKeys,menu:menu[cfg.reserveKeys.subMenu],onclose:function(){_this.expand_end(this)}})),offset=_target.offset(),AXContextMenu.open({id:cfg.targetID+"_AX_expand_AX_"+midx,filter:menu.filter},{left:offset.left,top:offset.top+_target.outerHeight()}),this.opened=!0):this.opened=!1))},expand_end:function(){var _this=this;this.opened=!1,this.open_midx=null,this.closing=!0,this.outitem(),setTimeout(function(){_this.closing=!1},100)}}),AXTopDownMenu=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.tree=[],this.poi="",this.config.openType="over",this.config.easing={open:{duraing:200,easing:"expoOut"},close:{duration:200,easing:"expoOut"}},this.config.parentMenu={className:"parentMenu"},this.config.childMenu={className:"childMenu",arrowClassName:"varrow",align:"center",valign:"top",margin:{top:10,left:0,bottom:0},arrowMargin:{top:10,left:0,bottom:0}},this.config.childsMenu={className:"childsMenu",arrowClassName:"harrow",align:"left",valign:"top",margin:{top:10,left:0,bottom:0},arrowMargin:{top:10,left:0,bottom:0}},this.config.parentOutResetChild=!0,this.config.childOutClose=!0,this.config.childOutCloseTime=700},init:function(){var cfg=this.config;cfg.menuBoxID?(this.menuBox=axdom("#"+cfg.menuBoxID),this.menuBox.find("."+cfg.childMenu.className).hide(),this.menuBox.find("."+cfg.childsMenu.className).hide(),this.initParents(),this.initChild(),cfg.onComplete&&cfg.onComplete.call(this)):cfg.targetID,axdom(window).bind("resize",this.windowResize.bind(this))},windowResizeApply:function(){var menuBoxWidth=(this.config,0);axf.each(this.tree,function(){this.width=axdom("#"+this.id).outerWidth(),this.height=axdom("#"+this.id).outerHeight(),menuBoxWidth+=axdom("#"+this.id).parent().outerWidth().number()+2})},setTree:function(tree){var cfg=this.config;cfg.menuBoxID=cfg.targetID,_this=this,this.menuBox||(this.menuBox=axdom("#"+cfg.menuBoxID));var po=[],treeFn=function(subTree){axdom.each(subTree,function(pi,T){po.push("<li>");var addClass=T.cn&&T.cn.length>0?' class = "'+cfg.childsMenu.hasChildClassName+'"':"";cfg.onclick?po.push('<a data-href="'+(T.url||cfg.href)+'"'+addClass+' data-id="'+(T._id||"")+'" id="'+(T._id||"")+'" data-label="'+(T.label||"").dec().delHtml()+'">'+(T.label||"").dec()+"</a>"):po.push('<a href="'+(T.url||cfg.href)+'"'+addClass+' id="'+(T._id||"")+'">'+(T.label||"").dec()+"</a>"),T.cn&&T.cn.length>0&&(po.push('<div class="'+cfg.childsMenu.className+'">'),po.push("	<ul>"),po.push(treeFn(T.cn)),po.push("	</ul>"),po.push("</div>")),po.push("</li>")})};po.push("<ul>"),axdom.each(tree,function(pi,T){var addClass=[];T.addClass&&addClass.push(T.addClass),po.push("<li>"),po.push('	<div class="'+cfg.parentMenu.className+" "+addClass.join(" ")+'">');var addClass=T.cn?' class = "'+cfg.childMenu.hasChildClassName+'"':"";cfg.onclick?po.push('<a data-href="'+(T.url||cfg.href)+'"'+addClass+" data-is-top='true' data-id=\""+(T._id||"")+'" id="'+(T._id||"")+'" data-label="'+(T.label||"").dec().delHtml()+'">'+(T.label||"").dec()+"</a>"):po.push('<a href="'+(T.url||cfg.href)+'"'+addClass+' id="'+(T._id||"")+'">'+(T.label||"").dec()+"</a>"),T.cn&&T.cn.length>0&&(po.push('<div class="'+cfg.childMenu.className+'">'),po.push("	<ul>"),po.push(treeFn(T.cn)),po.push("	</ul>"),po.push("</div>")),po.push("	</div>"),po.push("</li>")}),po.push("</ul>"),po.push('<div class="clear"></div>'),this.menuBox.empty(),this.menuBox.append(po.join("")),cfg.onclick&&this.menuBox.find("[data-href]").bind("click",function(){cfg.onclick({id:this.getAttribute("data-id"),href:this.getAttribute("data-href"),label:this.getAttribute("data-label"),isTop:this.getAttribute("data-is-top")}),"#"!=this.getAttribute("data-href")&&_this.outChild()}),this.menuBox.find("."+cfg.childMenu.className).hide(),this.menuBox.find("."+cfg.childsMenu.className).hide(),setTimeout(function(){_this.initParents(),_this.initChild(),cfg.onComplete&&cfg.onComplete.call(this)},300)},initParents:function(){var cfg=this.config,parents=[],menuBoxWidth=0;if(this.menuBox.find("."+cfg.parentMenu.className).each(function(pi,EL){EL.id=cfg.menuBoxID+"_PM_"+pi;var _id="",ELA=axdom(EL).children("A");ELA.get(0).id&&(_id=axdom(EL).children("A").get(0).id),ELA.get(0).id=cfg.menuBoxID+"_PMA_"+pi,ELA.attr("data-axmenuid",_id),parents.push({_id:_id,id:EL.id,width:axdom(EL).outerWidth(),height:axdom(EL).outerHeight(),cn:[],coi:""}),menuBoxWidth+=axdom(EL).parent().outerWidth().number()+2}),this.tree=parents,"over"==cfg.openType){if(this.menuBox.find("."+cfg.parentMenu.className+">a").bind("mouseover",this.onoverParent.bind(this)),this.menuBox.find("."+cfg.parentMenu.className+">a").bind("focus",this.onoverParent.bind(this)),this.menuBox.find("."+cfg.parentMenu.className+">a").bind("click",this.onclickParent.bind(this)),cfg.childOutClose){var onoutChild=this.onoutChild.bind(this);this.menuBox.find("."+cfg.parentMenu.className+">a").bind("mouseout",onoutChild)}}else"click"==cfg.openType&&(this.menuBox.find("."+cfg.parentMenu.className+">a").bind("mouseover",this.onoverParent.bind(this)),this.menuBox.find("."+cfg.parentMenu.className+">a").bind("click",this.onclickParent.bind(this)))},onoverParent:function(event){if(!this.active&&"click"==this.config.openType)return this;this.childObserver&&clearTimeout(this.childObserver);var _this=this,cfg=this.config,target=axf.get_event_target(event.target,{tagname:"a"}),poi=target.id.split(/\_/g).last();""!=this.poi&&this.poi!=poi&&(axdom("#"+cfg.menuBoxID+"_PMA_"+this.poi).removeClass("on"),axdom("#"+cfg.menuBoxID+"_PMC_"+this.poi).hide(),cfg.parentOutResetChild&&this.closeSubMenu(this.tree[this.poi])),void 0!=this.dfPoi&&axdom("#"+cfg.menuBoxID+"_PMA_"+this.dfPoi).removeClass("on"),axdom("#"+cfg.menuBoxID+"_PMA_"+poi).addClass("on");var tgDiv=axdom("#"+cfg.menuBoxID+"_PMC_"+poi);if(this.tree[poi]&&!this.tree[poi].divDim){if(tgDiv.show(),this.tree[poi].divDim={width:tgDiv.outerWidth(),height:tgDiv.outerHeight()},null==this.tree[poi].height)for(var index=0;index<this.tree.length;index++)this.tree[index].height=axdom("#"+this.tree[index].id).outerHeight();var topDim={width:this.tree[poi].width,height:this.tree[poi].height};if("center"==cfg.childMenu.align)var posLeft=topDim.width/2-this.tree[poi].divDim.width/2+cfg.childMenu.margin.left;else if("left"==cfg.childMenu.align)var posLeft=0+cfg.childMenu.margin.left;else if("right"==cfg.childMenu.align)var posLeft=topDim.width-this.tree[poi].divDim.width+cfg.childMenu.margin.left;if("top"==cfg.childMenu.valign){var posTop=topDim.height+cfg.childMenu.margin.top;cfg.childMenu["float"]?tgDiv.css({top:posTop,left:posLeft}):tgDiv.css({top:posTop,left:posLeft,width:this.tree[poi].divDim.width})}else if("bottom"==cfg.childMenu.valign){var posTop=topDim.height+cfg.childMenu.margin.bottom;cfg.childMenu["float"]?tgDiv.css({top:posTop,left:posLeft}):tgDiv.css({top:"auto",bottom:posTop,left:posLeft,width:this.tree[poi].divDim.width})}if(cfg.childMenu.arrowClassName){var arrow=tgDiv.find("."+cfg.childMenu.arrowClassName);if("center"==cfg.childMenu.align)var aLeft=tgDiv.outerWidth()/2-arrow.outerWidth()/2+cfg.childMenu.arrowMargin.left;else if("left"==cfg.childMenu.align)var aLeft=0+cfg.childMenu.arrowMargin.left;else if("right"==cfg.childMenu.align)var aLeft=tgDiv.outerWidth()-arrow.outerWidth()+cfg.childMenu.arrowMargin.left;if("top"==cfg.childMenu.valign){var aTop=-arrow.outerHeight()+cfg.childMenu.arrowMargin.top;arrow.css({top:aTop,left:aLeft})}else if("bottom"==cfg.childMenu.valign){var aTop=-arrow.outerHeight()+cfg.childMenu.arrowMargin.bottom;arrow.css({bottom:aTop,left:aLeft})}}tgDiv.hide(),topDim=null,posTop=null,posLeft=null}_this.overParentAnimate=!0,tgDiv.show(),this.poi=poi},onclickParent:function(event){var cfg=this.config,target=axf.get_event_target(event.target,{tagname:"a"}),poi=target.id.split(/\_/g).last();if(this.active){if(poi!=this.activePoi)return this.active=!0,this.activePoi=poi,this.onoverParent(event),this;this.active=!1,axdom("#"+cfg.menuBoxID+"_PMA_"+this.poi).removeClass("on"),axdom("#"+cfg.menuBoxID+"_PMC_"+this.poi).hide()}else this.active=!0,this.activePoi=poi,this.onoverParent(event)},initChild:function(){var cfg=this.config,initChilds=this.initChilds.bind(this),tree=this.tree;this.menuBox.find("."+cfg.parentMenu.className).each(function(pi,EL){var child=axdom(EL).children("."+cfg.childMenu.className).get(0);if(child){if(child.id=cfg.menuBoxID+"_PMC_"+pi,cfg.childMenu.arrowClassName){var arrow=axdom('<div class="'+cfg.childMenu.arrowClassName+'"></div>');axdom(child).prepend(arrow)}initChilds(child.id,tree[pi])}})},initChilds:function(cid,rTree){var initChilds=this.initChilds.bind(this),cfg=this.config,tree=rTree.cn,onoverChild=this.onoverChild.bind(this),onoutChild=this.onoutChild.bind(this);axdom("#"+cid+">ul>li").each(function(pi,EL){var linkA=axdom(EL).children("A"),_id="";linkA.get(0).id&&(_id=linkA.get(0).id),linkA.get(0).id=cid.replace("PMC","PMA")+"_"+pi,linkA.attr("data-axmenuid",_id),linkA.bind("mouseover",onoverChild),cfg.childOutClose&&"over"==cfg.openType&&linkA.bind("mouseout",onoutChild);var childDiv=axdom(EL).children("."+cfg.childsMenu.className).get(0);if(childDiv){if(childDiv.id=cid+"_"+pi,cfg.childsMenu.arrowClassName){var arrow=axdom('<div class="'+cfg.childsMenu.arrowClassName+'"></div>');axdom(childDiv).prepend(arrow)}tree.push({_id:_id,id:cid+"_"+pi,cn:[],coi:""}),initChilds(cid+"_"+pi,tree[pi])}else tree.push({_id:_id,id:cid+"_"+pi,cn:[],coi:""})})},closeSubMenu:function(pitem){if(pitem&&""!=pitem.coi){var cfg=this.config;axdom("#"+pitem.coi).slideUp({duration:cfg.easing.close.duration,easing:cfg.easing.close.easing,complete:function(){}}),pitem.coi="";var closeAllSubMenu=function(stree){axdom.each(stree,function(){""!=this.coi&&axdom("#"+this.coi).hide(),closeAllSubMenu(this.cn)})};closeAllSubMenu(pitem.cn)}},onoverChild:function(event){this.childObserver&&clearTimeout(this.childObserver);for(var cfg=this.config,target=axf.get_event_target(event.target,{tagname:"a"}),eid=target.id,ids=target.id.split(/\_/g),tree=this.tree,item={},pitem={},a=2;a<ids.length;a++)a==ids.length-2&&(pitem=tree[ids[a]]),tree[ids[a]]&&tree[ids[a]].cn&&(item=tree[ids[a]],tree=tree[ids[a]].cn);if(pitem&&""!=pitem.coi&&pitem.coi!=item.id&&this.closeSubMenu(pitem),item&&item.id){var tgDiv=axdom("#"+item.id);if(!item.divDim){axdom("#"+item.id).show(),item.divDim={width:tgDiv.outerWidth(),height:tgDiv.outerHeight()};var pDim={width:axdom("#"+eid).outerWidth(),height:axdom("#"+eid).outerHeight(),pos:axdom("#"+eid).position()};if("left"==cfg.childsMenu.align)var posLeft=pDim.width+cfg.childsMenu.margin.left;else var posLeft=-item.divDim.width+cfg.childsMenu.margin.left;if("top"==cfg.childsMenu.valign){var posTop=pDim.pos.top+cfg.childsMenu.margin.top;tgDiv.css({top:posTop,left:posLeft,width:item.divDim.width})}else{var posTop=pitem.divDim.height-pDim.pos.top-pDim.height+cfg.childsMenu.margin.bottom;tgDiv.css({bottom:posTop,left:posLeft,width:item.divDim.width})}if(cfg.childsMenu.arrowClassName){var arrow=tgDiv.find("."+cfg.childsMenu.arrowClassName);if("left"==cfg.childsMenu.align)var aLeft=-arrow.outerWidth()+cfg.childsMenu.arrowMargin.left;else var aLeft=tgDiv.outerWidth()-arrow.outerWidth()+cfg.childsMenu.arrowMargin.left;if("top"==cfg.childsMenu.valign){var aTop=0+cfg.childsMenu.arrowMargin.top;arrow.css({top:aTop,left:aLeft})}else if("bottom"==cfg.childsMenu.valign){var aTop=0+cfg.childsMenu.arrowMargin.bottom;arrow.css({bottom:aTop,left:aLeft})}}tgDiv.hide(),pDim=null,posTop=null,posLeft=null}tgDiv.fadeIn({duration:cfg.easing.open.duration,easing:cfg.easing.open.easing,complete:function(){}}),pitem&&(pitem.coi=item.id.replace("PMA","PMC"))}},onoutChild:function(event){var cfg=this.config,outChild=this.outChild.bind(this);this.childObserver=setTimeout(function(){outChild()},cfg.childOutCloseTime)},outChild:function(){this.active=!1;var cfg=this.config;this.closeSubMenu(this.tree[this.poi]),axdom("#"+cfg.menuBoxID+"_PMA_"+this.poi).removeClass("on"),void 0!=this.dfPoi&&axdom("#"+cfg.menuBoxID+"_PMA_"+this.dfPoi).addClass("on"),axdom("#"+cfg.menuBoxID+"_PMC_"+this.poi).slideUp({duration:cfg.easing.close.duration,easing:cfg.easing.close.easing,complete:function(){}})},setHighLightMenu:function(poi){var cfg=this.config;if(this.menuBox.find(".parentMenu").removeClass("on"),this.menuBox.find(".parentMenu a").removeClass("on"),this.menuBox.find(".childMenu a").removeClass("on"),axdom.isArray(poi)){this.poi=this.dfPoi=poi;var tree=this.tree;axdom.each(poi,function(idx,T){tree=0==idx?tree[T.number()]:tree.cn[T.number()],tree&&(0==idx?(axdom("#"+tree.id).addClass("on"),axdom("#"+tree.id).children("A").addClass("on")):axdom("#"+tree.id.replace("_PMC_","_PMA_")).addClass("on"))})}else this.poi=this.dfPoi=poi,axdom("#"+cfg.menuBoxID+"_PMA_"+this.dfPoi).addClass("on")},setHighLightOriginID:function(_id){var findedID=(this.config,this.tree,""),treeFn=function(subTree){axdom.each(subTree,function(idx,T){return T._id==_id?(findedID=T.id,!1):void(T.cn&&treeFn(T.cn))})};if(axdom.each(this.tree,function(idx,T){return T._id==_id?(findedID=T.id,!1):void(T.cn&&treeFn(T.cn))}),findedID){this.findedID=findedID;var pos=findedID.split(/_PM[C]?_/g).last(),selectedMenus=pos.split(/_/g);return this.setHighLightMenu(selectedMenus),selectedMenus;
  }this.menuBox.find(".parentMenu").removeClass("on"),this.menuBox.find(".parentMenu a").removeClass("on"),this.menuBox.find(".childMenu a").removeClass("on")},setHighLightID:function(_id){var tree=(this.config,this.tree),findedID="",treeFn=function(subTree){axdom.each(subTree,function(idx,T){return T.id==_id?(findedID=T.id,!1):void(T.cn&&treeFn(T.cn))})};if(axdom.each(tree,function(idx,T){return T.id==_id?(findedID=T.id,!1):void(T.cn&&treeFn(T.cn))}),findedID){this.findedID=findedID;var pos=findedID.split(/_PM[C]?_/g).last(),selectedMenus=pos.split(/_/g);return this.setHighLightMenu(selectedMenus),selectedMenus}}}),AXTree=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.Observer=null,this.tree=[],this.list=[],this.pageActive=!1,this.page={},this.moveSens=0,this.config.moveSens=1,this.config.formPaddingRight="11px",this.config.sort=!0,this.config.xscroll=!0,this.config.showConnectionLine=!1,this.config.iconWidth=23,this.config.indentWidth=20,this.config.indentRatio=1,this.config.fitToWidth=AXConfig.AXTree.fitToWidth||!1,this.config.fitToWidthRightMargin=AXConfig.AXTree.fitToWidthRightMargin||10,this.config.checkboxRelationFixed=!0,this.selectedCells=[],this.selectedRow=[],this.config.hashDigit=3,this.isMobile=AXUtil.browser.mobile,this.config.persistExpanded=AXConfig.AXTree.persistExpanded||!1,this.config.persistSelected=AXConfig.AXTree.persistSelected||!1,this.config.cookiePrefix=AXConfig.AXTree.cookiePrefix||"axtree-",this.config.cookieExpiredays=AXConfig.AXTree.cookieExpiredays||7,window.AXTree_instances=window.AXTree_instances||[],window.AXTree_instances.push(this)},defineConfig:function(rewrite){var cfg=this.config;if(0==cfg.colGroup.length)return void trace("colGrpup is empty)");var colWidth=0,hasHiddenCell=!1,showColLen=0;rewrite||(this.fixedColSeq=cfg.fixedColSeq);for(var CG,bodyWidth=this.body.width(),astricCount=0,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)void 0==CG.colSeq&&(CG.colSeq=cidx),void 0==CG.display&&(CG.display=!0),CG.display?(rewrite?CG.widthAstric&&(CG.width=0,CG._owidth=CG.width,astricCount++):("*"==CG.width&&(CG.width=0,CG.widthAstric=!0,astricCount++),CG._owidth=CG.width),colWidth+=(CG._owidth||0).number(),showColLen+=1):hasHiddenCell=!0;if(cfg.fitToWidth)for(var CG,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)CG.display&&CG.widthAstric&&(CG.width=100,CG._owidth=100,colWidth+=(CG._owidth||0).number());else if(bodyWidth-cfg.fitToWidthRightMargin>colWidth+100*astricCount)for(var CG,remainsWidth=bodyWidth-cfg.fitToWidthRightMargin-colWidth,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)CG.display&&CG.widthAstric&&(CG._owidth=(remainsWidth/astricCount).ceil(),CG.width=CG._owidth,colWidth+=(CG._owidth||0).number());else for(var CG,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)CG.display&&CG.widthAstric&&(CG._owidth=100,CG.width=100,colWidth+=(CG._owidth||0).number());if(this.colWidth=colWidth,cfg.fitToWidth)if(bodyWidth>this.colWidth){var _bodyWidth=bodyWidth-cfg.fitToWidthRightMargin,zoomRatio=bodyWidth/this.colWidth;colWidth=0;for(var CG,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)CG.width=(CG._owidth*zoomRatio).ceil(),_bodyWidth>CG.width?_bodyWidth-=CG.width:CG.width=_bodyWidth,CG.display&&(colWidth+=CG.width.number());this.colWidth=colWidth}else{colWidth=0;for(var CG,cidx=0,__arr=cfg.colGroup;cidx<__arr.length&&(CG=__arr[cidx]);cidx++)void 0==CG._owidth&&(CG._owidth=(CG.width||0).number()),CG.width=CG._owidth.number(),CG.display&&(colWidth+=CG.width.number());this.colWidth=colWidth}if(this.showColLen=showColLen,cfg.colHead||(cfg.colHead={display:!1}),cfg.body||(cfg.body={}),cfg.colHead.rowsEmpty&&(cfg.colHead.rows=void 0),cfg.body.rowsEmpty&&(cfg.body.rows=void 0),cfg.colHead.rows){cfg.colHead._maps=new Array(cfg.colHead.rows.length);for(var colMaxLen=0,r=0;r<cfg.colHead.rows.length;r++){var colLen=0;axf.each(cfg.colHead.rows[r],function(CHidx,CH){void 0!=CH.rowspan&&null!=CH.rowspan||(CH.rowspan=1),void 0==CH.colspan||null==CH.colspan?(CH.colspan=1,CH._colspan=1):rewrite?CH.colspan=CH._colspan:CH._colspan=CH.colspan,void 0!=CH.valign&&null!=CH.valign||(CH.valign="bottom"),cfg.colHeadAlign&&(CH.align="center"),colLen+=CH.colspan.number()}),colLen>colMaxLen&&(colMaxLen=colLen)}for(var _m=0;_m<cfg.colHead._maps.length;_m++)cfg.colHead._maps[_m]=new Array(colMaxLen);for(var appendPosToColHeadMap=function(r,c,posR,position){for(var nC=position.c,rr=posR;posR+r>rr;rr++)for(var tC=c,isWhile=!0;isWhile;)try{0==tC?isWhile=!1:cfg.colHead._maps[rr][nC]?nC++:(cfg.colHead._maps[rr][nC]=position,tC--)}catch(e){isWhile=!1}},r=0;r<cfg.colHead.rows.length;r++)axf.each(cfg.colHead.rows[r],function(CHidx,CH){if(void 0!=CH.colSeq)var myCG=cfg.colGroup.getToSeq(CH.colSeq);else var myCG=cfg.colGroup.searchObject(function(){return this.item.key==CH.key}).first();null!=myCG?rewrite?AXUtil.overwriteObject(CH,myCG,!0):AXUtil.overwriteObject(CH,myCG,!1):AXUtil.overwriteObject(CH,{align:"left",valign:"bottom",display:!0,rowspan:1,colspan:1},!1),appendPosToColHeadMap(CH.rowspan,CH.colspan,r,{r:r,c:CHidx})});axf.each(cfg.colHead._maps.last(),function(midx,m){m&&(cfg.colHead.rows[m.r][m.c].isLastCell=!0)}),hasHiddenCell&&axf.each(cfg.colGroup,function(cidx,CG){if(!CG.display)for(var a=0;a<cfg.colHead._maps.length;a++){var rowPosition=cfg.colHead._maps[a][cidx];cfg.colHead.rows[rowPosition.r][rowPosition.c].colspan--}})}else{cfg.colHead._maps=[[]];var colHeadRows=[[]];axf.each(cfg.colGroup,function(cidx,CG){var adder={key:CG.key,colSeq:CG.colSeq,label:CG.label,align:CG.align||cfg.colHeadAlign||"left",rowspan:1,colspan:1,valign:"bottom",isLastCell:!0,display:CG.display,formatter:CG.formatter,checked:CG.checked,sort:CG.sort,tooltip:CG.tooltip};colHeadRows[0].push(adder),cfg.colHead._maps[0].push({r:0,c:cidx})}),cfg.colHead.rows=colHeadRows,cfg.colHead.rowsEmpty=!0}if(cfg.body.rows){cfg.body._maps=new Array(cfg.body.rows.length);for(var colMaxLen=0,r=0;r<cfg.body.rows.length;r++){var colLen=0;axf.each(cfg.body.rows[r],function(CHidx,CH){void 0==CH.colspan||null==CH.colspan?(CH.colspan=1,CH._colspan=1):rewrite?CH.colspan=CH._colspan:CH._colspan=CH.colspan,void 0!=CH.rowspan&&null!=CH.rowspan||(CH.rowspan=1),void 0!=CH.valign&&null!=CH.valign||(CH.valign="middle"),colLen+=CH.colspan.number()}),colLen>colMaxLen&&(colMaxLen=colLen)}for(var _m=0;_m<cfg.body._maps.length;_m++)cfg.body._maps[_m]=new Array(colMaxLen);for(var appendPosToBodyMap=function(r,c,posR,position){for(var nC=position.c,rr=posR;posR+r>rr;rr++)for(var tC=c,isWhile=!0;isWhile;)try{0==tC?isWhile=!1:cfg.body._maps[rr][nC]?nC++:(cfg.body._maps[rr][nC]=position,tC--)}catch(e){isWhile=!1}},r=0;r<cfg.body.rows.length;r++)axf.each(cfg.body.rows[r],function(CHidx,CH){if(void 0!=CH.colSeq)var myCG=cfg.colGroup.getToSeq(CH.colSeq);else var myCG=cfg.colGroup.searchObject(function(){return this.item.key==CH.key}).first();null!=myCG?rewrite?AXUtil.overwriteObject(CH,myCG,!0):AXUtil.overwriteObject(CH,myCG,!1):AXUtil.overwriteObject(CH,{align:"left",valign:"bottom",display:!0,rowspan:1,colspan:1},!1),appendPosToBodyMap(CH.rowspan,CH.colspan,r,{r:r,c:CHidx})});axf.each(cfg.body._maps.last(),function(midx,m){m&&(cfg.body.rows[m.r][m.c].isLastCell=!0)}),hasHiddenCell&&axf.each(cfg.colGroup,function(cidx,CG){if(!CG.display)for(var a=0;a<cfg.body._maps.length;a++){var rowPosition=cfg.body._maps[a][cidx];cfg.body.rows[rowPosition.r][rowPosition.c].colspan--}})}else{cfg.body._maps=[[]];var bodyRows=[[]];axf.each(cfg.colGroup,function(cidx,CG){var adder={key:CG.key,colSeq:CG.colSeq,label:CG.label,align:CG.align||"left",rowspan:1,colspan:1,valign:"middle",isLastCell:!0,display:CG.display,formatter:CG.formatter,checked:CG.checked,disabled:CG.disabled,indent:CG.indent,getIconClass:CG.getIconClass,tooltip:CG.tooltip};bodyRows[0].push(adder),cfg.body._maps[0].push({r:0,c:cidx})}),cfg.body.rows=bodyRows,cfg.body.rowsEmpty=!0}if(cfg.body.marker&&cfg.body.marker.rows){this.bodyHasMarker=!0,cfg.body.marker._maps=new Array(cfg.body.marker.rows.length),colMaxLen=0;for(var r=0;r<cfg.body.marker.rows.length;r++){var colLen=0;axf.each(cfg.body.marker.rows[r],function(CHidx,CH){void 0!=CH.rowspan&&null!=CH.rowspan||(CH.rowspan=1),void 0==CH.colspan||null==CH.colspan?(CH.colspan=1,CH._colspan=1):rewrite?CH.colspan=CH._colspan:CH._colspan=CH.colspan,void 0!=CH.valign&&null!=CH.valign||(CH.valign="bottom"),colLen+=CH.colspan.number()}),colLen>colMaxLen&&(colMaxLen=colLen)}for(var _m=0;_m<cfg.body.marker._maps.length;_m++)cfg.body.marker._maps[_m]=new Array(colMaxLen);for(var appendPosToEditorMap=function(r,c,posR,position){for(var nC=position.c,rr=posR;posR+r>rr;rr++)for(var tC=c,isWhile=!0;isWhile;)try{0==tC?isWhile=!1:cfg.body.marker._maps[rr][nC]?nC++:(cfg.body.marker._maps[rr][nC]=position,tC--)}catch(e){isWhile=!1}},r=0;r<cfg.body.marker.rows.length;r++)axf.each(cfg.body.marker.rows[r],function(CHidx,CH){if(void 0!=CH.colSeq)var myCG=cfg.colGroup.getToSeq(CH.colSeq);else var myCG=cfg.colGroup.searchObject(function(){return this.item.key==CH.key}).first();null!=myCG?AXUtil.overwriteObject(CH,myCG,!1):AXUtil.overwriteObject(CH,{align:"left",valign:"bottom",display:!0,rowspan:1,colspan:1},!1),appendPosToEditorMap(CH.rowspan,CH.colspan,r,{r:r,c:CHidx})});axf.each(cfg.body.marker._maps.last(),function(midx,m){m&&(cfg.body.marker.rows[m.r][m.c].isLastCell=!0)}),hasHiddenCell&&axf.each(cfg.colGroup,function(cidx,CG){if(!CG.display)for(var a=0;a<cfg.body.marker._maps.length;a++){var rowPosition=cfg.body.marker._maps[a][cidx];cfg.body.marker.rows[rowPosition.r][rowPosition.c].colspan--}})}if(cfg.head){cfg.head._maps=new Array(cfg.head.rows.length),colMaxLen=0;for(var r=0;r<cfg.head.rows.length;r++){var colLen=0;axf.each(cfg.head.rows[r],function(CHidx,CH){void 0!=CH.rowspan&&null!=CH.rowspan||(CH.rowspan=1),void 0==CH.colspan||null==CH.colspan?(CH.colspan=1,CH._colspan=1):rewrite?CH.colspan=CH._colspan:CH._colspan=CH.colspan,void 0!=CH.valign&&null!=CH.valign||(CH.valign="bottom"),colLen+=CH.colspan.number()}),colLen>colMaxLen&&(colMaxLen=colLen)}for(var _m=0;_m<cfg.head._maps.length;_m++)cfg.head._maps[_m]=new Array(colMaxLen);for(var appendPosToHeadMap=function(r,c,posR,position){for(var nC=position.c,rr=posR;posR+r>rr;rr++)for(var tC=c,isWhile=!0;isWhile;)try{0==tC?isWhile=!1:cfg.head._maps[rr][nC]?nC++:(cfg.head._maps[rr][nC]=position,tC--)}catch(e){isWhile=!1}},r=0;r<cfg.head.rows.length;r++)axf.each(cfg.head.rows[r],function(CHidx,CH){if(void 0!=CH.colSeq)var myCG=cfg.colGroup.getToSeq(CH.colSeq);else var myCG=cfg.colGroup.searchObject(function(){return this.item.key==CH.key}).first();null!=myCG?AXUtil.overwriteObject(CH,myCG,!1):AXUtil.overwriteObject(CH,{align:"left",valign:"bottom",display:!0,rowspan:1,colspan:1},!1),appendPosToHeadMap(CH.rowspan,CH.colspan,r,{r:r,c:CHidx})});axf.each(cfg.head._maps.last(),function(midx,m){m&&(cfg.head.rows[m.r][m.c].isLastCell=!0)}),hasHiddenCell&&axf.each(cfg.colGroup,function(cidx,CG){if(!CG.display)for(var a=0;a<cfg.head._maps.length;a++){var rowPosition=cfg.head._maps[a][cidx];cfg.head.rows[rowPosition.r][rowPosition.c].colspan--}})}if(cfg.foot){cfg.foot._maps=new Array(cfg.foot.rows.length),colMaxLen=0;for(var r=0;r<cfg.foot.rows.length;r++){var colLen=0;axf.each(cfg.foot.rows[r],function(CHidx,CH){void 0!=CH.rowspan&&null!=CH.rowspan||(CH.rowspan=1),void 0==CH.colspan||null==CH.colspan?(CH.colspan=1,CH._colspan=1):rewrite?CH.colspan=CH._colspan:CH._colspan=CH.colspan,void 0!=CH.valign&&null!=CH.valign||(CH.valign="bottom"),colLen+=CH.colspan.number()}),colLen>colMaxLen&&(colMaxLen=colLen)}for(var _m=0;_m<cfg.foot._maps.length;_m++)cfg.foot._maps[_m]=new Array(colMaxLen);for(var appendPosToFootMap=function(r,c,posR,position){for(var nC=position.c,rr=posR;posR+r>rr;rr++)for(var tC=c,isWhile=!0;isWhile;)try{0==tC?isWhile=!1:cfg.foot._maps[rr][nC]?nC++:(cfg.foot._maps[rr][nC]=position,tC--)}catch(e){isWhile=!1}},r=0;r<cfg.foot.rows.length;r++)axf.each(cfg.foot.rows[r],function(CHidx,CH){if(void 0!=CH.colSeq)var myCG=cfg.colGroup.getToSeq(CH.colSeq);else var myCG=cfg.colGroup.searchObject(function(){return this.item.key==CH.key}).first();null!=myCG?AXUtil.overwriteObject(CH,myCG,!1):AXUtil.overwriteObject(CH,{align:"left",valign:"bottom",display:!0,rowspan:1,colspan:1},!1),appendPosToFootMap(CH.rowspan,CH.colspan,r,{r:r,c:CHidx})});axf.each(cfg.foot._maps.last(),function(midx,m){m&&(cfg.foot.rows[m.r][m.c].isLastCell=!0)}),hasHiddenCell&&axf.each(cfg.colGroup,function(cidx,CG){if(!CG.display)for(var a=0;a<cfg.foot._maps.length;a++){var rowPosition=cfg.foot._maps[a][cidx];cfg.foot.rows[rowPosition.r][rowPosition.c].colspan--}})}if(cfg.editor&&cfg.editor.rows){this.hasEditor=!0,cfg.editor._maps=new Array(cfg.editor.rows.length),colMaxLen=0;for(var r=0;r<cfg.editor.rows.length;r++){var colLen=0;axf.each(cfg.editor.rows[r],function(CHidx,CH){void 0!=CH.rowspan&&null!=CH.rowspan||(CH.rowspan=1),void 0==CH.colspan||null==CH.colspan?(CH.colspan=1,CH._colspan=1):rewrite?CH.colspan=CH._colspan:CH._colspan=CH.colspan,void 0!=CH.valign&&null!=CH.valign||(CH.valign="bottom"),colLen+=CH.colspan.number()}),colLen>colMaxLen&&(colMaxLen=colLen)}for(var _m=0;_m<cfg.editor._maps.length;_m++)cfg.editor._maps[_m]=new Array(colMaxLen);for(var appendPosToEditorMap=function(r,c,posR,position){for(var nC=position.c,rr=posR;posR+r>rr;rr++)for(var tC=c,isWhile=!0;isWhile;)try{0==tC?isWhile=!1:cfg.editor._maps[rr][nC]?nC++:(cfg.editor._maps[rr][nC]=position,tC--)}catch(e){isWhile=!1}},r=0;r<cfg.editor.rows.length;r++)axf.each(cfg.editor.rows[r],function(CHidx,CH){if(void 0!=CH.colSeq)var myCG=cfg.colGroup.getToSeq(CH.colSeq);else var myCG=cfg.colGroup.searchObject(function(){return this.item.key==CH.key}).first();null!=myCG?AXUtil.overwriteObject(CH,myCG,!1):AXUtil.overwriteObject(CH,{align:"left",valign:"bottom",display:!0,rowspan:1,colspan:1},!1),appendPosToEditorMap(CH.rowspan,CH.colspan,r,{r:r,c:CHidx})});axf.each(cfg.editor._maps.last(),function(midx,m){m&&(cfg.editor.rows[m.r][m.c].isLastCell=!0)}),hasHiddenCell&&axf.each(cfg.colGroup,function(cidx,CG){if(!CG.display)for(var a=0;a<cfg.editor._maps.length;a++){var rowPosition=cfg.editor._maps[a][cidx];cfg.editor.rows[rowPosition.r][rowPosition.c].colspan--}})}if(void 0!=cfg.fixedColSeq&&null!=cfg.fixedColSeq){var fixedColSeq=this.fixedColSeq;if(axf.each(cfg.colHead._maps,function(midx,m){axf.each(m,function(cidx,c){c&&fixedColSeq+1>cidx&&(cfg.colHead.rows[c.r][c.c].isFixedCell=!0)})}),axf.each(cfg.body._maps,function(midx,m){axf.each(m,function(cidx,c){c&&(fixedColSeq==cidx&&(cfg.body.rows[c.r][c.c].isFixedEndCell=!0),fixedColSeq+1>cidx&&(cfg.body.rows[c.r][c.c].isFixedCell=!0))})}),cfg.head&&axf.each(cfg.head._maps,function(midx,m){axf.each(m,function(cidx,c){c&&(fixedColSeq==cidx&&(cfg.head.rows[c.r][c.c].isFixedEndCell=!0),fixedColSeq+1>cidx&&(cfg.head.rows[c.r][c.c].isFixedCell=!0))})}),cfg.foot&&axf.each(cfg.foot._maps,function(midx,m){axf.each(m,function(cidx,c){c&&(fixedColSeq==cidx&&(cfg.foot.rows[c.r][c.c].isFixedEndCell=!0),fixedColSeq+1>cidx&&(cfg.foot.rows[c.r][c.c].isFixedCell=!0))})}),cfg.body.marker&&cfg.body.marker.rows&&axf.each(cfg.body.marker._maps,function(midx,m){axf.each(m,function(cidx,c){c&&(fixedColSeq==cidx&&(cfg.body.marker.rows[c.r][c.c].isFixedEndCell=!0),fixedColSeq+1>cidx&&(cfg.body.marker.rows[c.r][c.c].isFixedCell=!0))})}),cfg.editor&&cfg.editor.rows&&axf.each(cfg.editor._maps,function(midx,m){axf.each(m,function(cidx,c){c&&(fixedColSeq==cidx&&(cfg.editor.rows[c.r][c.c].isFixedEndCell=!0),fixedColSeq+1>cidx&&(cfg.editor.rows[c.r][c.c].isFixedCell=!0))})}),this.hasFixed=!0,hasHiddenCell){var minusFixedCol=0,fixedColSeq=this.fixedColSeq;axf.each(cfg.colGroup,function(cidx,CG){CG.display||fixedColSeq+1>cidx&&minusFixedCol++}),cfg.fixedColSeq=this.fixedColSeq-minusFixedCol}else cfg.fixedColSeq=this.fixedColSeq;-1==cfg.fixedColSeq&&(this.hasFixed=!1);var fixedColSeq=this.fixedColSeq;fixedColWidth=0,axf.each(cfg.colGroup,function(cidx,CG){CG.display&&fixedColSeq+1>cidx&&(fixedColWidth+=CG.width.number())}),this.fixedColWidth=fixedColWidth}},init:function(){var cfg=this.config;if(Object.isUndefined(cfg.targetID))return void trace("need targetID - setConfig({targetID:''})");if(!cfg.colGroup)return void trace("need colGroup - setConfig({colGroup:[]})");cfg.emptyListMSG=cfg.emptyListMSG||AXConfig.AXTree.emptyListMSG;var reserveKeys={parentHashKey:"pHash",hashKey:"hash",openKey:"open",subTree:"subTree",displayKey:"display"},relation={parentKey:"pno",childKey:"no"};cfg.reserveKeys?AXUtil.overwriteObject(reserveKeys,cfg.reserveKeys,!0):cfg.reserveKeys=reserveKeys,cfg.relation?AXUtil.overwriteObject(relation,cfg.relation,!0):cfg.relation=relation;var targetInnerHeight=axdom("#"+cfg.targetID).innerHeight();this.theme=cfg.theme?cfg.theme:"AXTree",cfg.height=cfg.height?cfg.height:targetInnerHeight+"px",this.target=axdom("#"+cfg.targetID);var theme=this.theme,treeCss=[];cfg.width&&treeCss.push("width:"+cfg.width+";"),cfg.height&&treeCss.push("height:"+cfg.height+";");var ol=[];if(ol.push('<a id="'+cfg.targetID+'_AX_tree_focus" href="#axtree" ></a>'),ol.push('<div class="'+theme+'" id="'+cfg.targetID+'_AX_tree" style="'+treeCss.join("")+'">'),ol.push('	<div class="AXTreeScrollBody" id="'+cfg.targetID+'_AX_treeScrollBody" style="z-index:2;">'),ol.push('		<div class="AXTreeColHead AXUserSelectNone" id="'+cfg.targetID+'_AX_treeColHead" onselectstart="return false;"></div>'),ol.push('		<div class="AXTreeBody" id="'+cfg.targetID+'_AX_treeBody"></div>'),ol.push('		<div class="AXTreeEditor" id="'+cfg.targetID+'_AX_treeEditor"></div>'),ol.push("	</div>"),ol.push("</div>"),this.target.html(ol.join("")),this.gridBody=axdom("#"+cfg.targetID+"_AX_tree"),this.scrollBody=axdom("#"+cfg.targetID+"_AX_treeScrollBody"),this.colHead=axdom("#"+cfg.targetID+"_AX_treeColHead"),this.body=axdom("#"+cfg.targetID+"_AX_treeBody"),this.editor=axdom("#"+cfg.targetID+"_AX_treeEditor"),this.defineConfig(),cfg.colHead.display?this.setColHead():this.colHead.hide(),this.setBody(),this.editor.hide(),this.treeTargetSetSize(),"auto"!=cfg.height){var contentScrollTouchstart=this.contentScrollTouchstart.bind(this);this.contentScrollTouchstartBind=function(event){contentScrollTouchstart(event)};var contentScrollScrollWheel=this.contentScrollScrollWheel.bind(this);this.contentScrollScrollWheelBind=function(event){contentScrollScrollWheel(event)};var mousewheelevt=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";document.attachEvent?axf.getId(cfg.targetID+"_AX_treeBody")&&axf.getId(cfg.targetID+"_AX_treeBody").attachEvent("on"+mousewheelevt,contentScrollScrollWheel):document.addEventListener&&axf.getId(cfg.targetID+"_AX_treeBody")&&axf.getId(cfg.targetID+"_AX_treeBody").addEventListener(mousewheelevt,contentScrollScrollWheel,!1),document.addEventListener&&axf.getId(cfg.targetID+"_AX_treeBody")&&axf.getId(cfg.targetID+"_AX_treeBody").addEventListener("touchstart",contentScrollTouchstart,!1)}axdom("#"+cfg.targetID).bind("click",function(event){axdom("#"+cfg.targetID+"_AX_tree_focus").focus()}),axdom("#"+cfg.targetID+"_AX_tree_focus").bind("keyup.axtree",this.onKeydown.bind(this)),cfg.contextMenu&&(AXContextMenu.bind({id:cfg.targetID+"ContextMenu",theme:cfg.contextMenu.theme,width:cfg.contextMenu.width,menu:cfg.contextMenu.menu}),axdom("#"+cfg.targetID).bind("contextmenu",this.onContextmenu.bind(this))),axdom(window).bind("resize",this.windowResize.bind(this))},windowResize:function(){var windowResizeApply=this.windowResizeApply.bind(this);this.windowResizeObserver&&clearTimeout(this.windowResizeObserver),this.windowResizeObserver=setTimeout(function(){windowResizeApply()},100)},windowResizeApply:function(){var cfg=this.config;if(cfg.mediaQuery){var _viewMode="",clientWidth=axf.clientWidth();axf.each(cfg.mediaQuery,function(k,v){if(Object.isObject(v))if(void 0!=v.min&&void 0!=v.max){if(v.min<=clientWidth&&clientWidth<=v.max)return _viewMode="dx"==k?"grid":"mobile",!1}else if(v.min<=clientWidth)return _viewMode="dx"==k?"grid":"mobile",!1}),""!=_viewMode&&(cfg.viewMode=_viewMode)}this.redrawGrid()},treeTargetSetSize:function(react){var cfg=this.config;if("auto"==cfg.height){this.target.css({height:"auto","max-height":"auto"});var colHeadHeight=this.colHead.outerHeight(),scrollBodyHeight=axdom("#"+cfg.targetID+"_AX_scrollContent").height();this.scrollBody.css({height:scrollBodyHeight+colHeadHeight}),this.body.css({top:colHeadHeight,height:scrollBodyHeight})}else{var colHeadHeight=cfg.colHead.display?this.colHead.outerHeight():0,scrollBodyHeight=cfg.height.number();this.scrollBody.css({height:scrollBodyHeight}),this.body.css({top:colHeadHeight,height:scrollBodyHeight-colHeadHeight})}react||axdom(window).bind("resize",this.contentScrollResize.bind(this))},resetHeight:function(){var cfg=this.config,targetInnerHeight=axdom("#"+cfg.targetID).innerHeight();cfg.height=targetInnerHeight+"px",this.gridBody.css({height:targetInnerHeight-2}),this.redrawGrid("")},getColGroup:function(suffix){var cfg=this.config,fixedColSeq=this.fixedColSeq,po=[];return po.push("<colgroup>"),"FC"!=suffix&&"FB"!=suffix&&"FE"!=suffix?(axf.each(cfg.colGroup,function(cidx,CG){CG.display&&("auto"==cfg.width||"*"==cfg.width?po.push('<col style="" id="'+cfg.targetID+"_AX_col_AX_"+CG.colSeq+"_AX_"+suffix+'" />'):po.push('<col width="'+(CG.width||"")+'" style="" id="'+cfg.targetID+"_AX_col_AX_"+CG.colSeq+"_AX_"+suffix+'" />'))}),cfg.colHead.display&&po.push("<col />")):axf.each(cfg.colGroup,function(cidx,CG){CG.display&&fixedColSeq+1>cidx&&("auto"==cfg.width||"*"==cfg.width?po.push('<col style="" id="'+cfg.targetID+"_AX_col_AX_"+CG.colSeq+"_AX_"+suffix+'" />'):po.push('<col width="'+(CG.width||"")+'" style="" id="'+cfg.targetID+"_AX_col_AX_"+CG.colSeq+"_AX_"+suffix+'" />'))}),po.push("</colgroup>"),po.join("")},getColSeqToHead:function(r,c){for(var cfg=this.config,colSeq=null,a=cfg.colHead._maps[r].length-1;a>-1;a--)if(cfg.colHead._maps[r][a].r==r&&cfg.colHead._maps[r][a].c==c){colSeq=a;break}return colSeq},redrawGrid:function(){var cfg=this.config;this.defineConfig(!0),cfg.colHead.display&&this.setColHead(),this.setBody(),cfg.head&&this.printHead(),cfg.foot&&this.printFoot(),this.treeTargetSetSize(!0),this.contentScrollResize()},checkedColSeq:function(colSeq,checked,itemIndex){var cfg=this.config,gridCheckClick=this.gridCheckClick.bind(this);if("undefined"==typeof itemIndex)this.colHead.find(".treeCheckBox_colHead_colSeq"+colSeq).each(function(){this.checked=checked}),axdom("#"+cfg.targetID+"_AX_fixedColHead").find(".treeCheckBox_colHead_colSeq"+colSeq).each(function(){this.checked=checked}),this.body.find(".treeCheckBox_body_colSeq"+colSeq).each(function(){this.checked=checked});else{if("radio"===cfg.colGroup[colSeq].formatter)for(var ii=0,ll=this.list.length;ll>ii;ii++)"undefined"==typeof _this.list[ii].__checked&&(_this.list[ii].__checked=!1),_this.list[ii].__checked=!1;this.body.find(".gridBodyTr_"+itemIndex+" .treeCheckBox_body_colSeq"+colSeq).each(function(){null==checked?this.checked=!this.checked:this.checked=checked,gridCheckClick(null,this.id)})}},getCheckedList:function(colSeq){var collect=(this.config,[]),list=this.list;return this.body.find(".treeCheckBox_body_colSeq"+colSeq).each(function(){if(this.checked){var itemIndex=this.id.split(/_AX_/g).last();collect.push(list[itemIndex])}}),collect},onKeydown:function(event){if(67==event.keyCode&&event.ctrlKey,this.selectedRow.length>0){var rIndex=this.selectedRow.first().number();if(event.keyCode==axf.Event.KEY_RETURN)this.click(rIndex);else if(event.keyCode==axf.Event.KEY_UP){for(rIndex-=1;this.list[rIndex]&&this.list[rIndex].AXTreeSplit;)rIndex-=1;this.setFocus(rIndex)}else if(event.keyCode==axf.Event.KEY_DOWN){for(rIndex+=1;this.list[rIndex]&&this.list[rIndex].AXTreeSplit;)rIndex+=1;this.setFocus(rIndex)}else event.keyCode==axf.Event.KEY_LEFT?(this.expandToggleList(rIndex,this.list[rIndex]),this.setFocus(rIndex)):event.keyCode==axf.Event.KEY_RIGHT&&(this.expandToggleList(rIndex,this.list[rIndex]),this.setFocus(rIndex))}},onBodyKeydown:function(event){event.keyCode==AXUtil.Event.KEY_ESC&&this.readyMoved&&this.cancelMove()},onContextmenu:function(event){var cfg=this.config;if(this.readyMoved)return!1;if(""!=event.target.id){var eid=event.target.id.split(/_AX_/g),eventTarget=event.target;if("input"!=eventTarget.tagName.toLowerCase()){var myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,until:function(evt,evtIDs){return!!axdom(evt.parentNode).hasClass("gridBodyTr")},find:function(evt,evtIDs){return!(!axdom(evt).hasClass("bodyTd")&&!axdom(evt).hasClass("bodyNodeIndent"))}});if(myTarget){var targetID=myTarget.id,itemIndex=targetID.split(/_AX_/g).last();targetID.split(/_AX_/g);if(this.selectedCells.length>0&&(axf.each(this.selectedCells,function(){axdom("#"+this).removeClass("selected")}),this.selectedCells.clear()),this.selectedRow.length>0){var body=this.body;axf.each(this.selectedRow,function(){body.find(".gridBodyTr_"+this).removeClass("selected")})}this.selectedRow.clear(),this.body.find(".gridBodyTr_"+itemIndex).addClass("selected"),this.selectedRow.push(itemIndex);var item=this.list[itemIndex];AXContextMenu.open({id:cfg.targetID+"ContextMenu",filter:cfg.contextMenu.filter,sendObj:item},event)}return!1}}},copyData:function(){var copyOut=(this.config,[]);axf.each(this.selectedCells,function(index,n){var html=axdom("#"+n).find(".bodyNode").html();copyOut.push(html+"	")}),window.clipboardData?(window.clipboardData.setData("Text",copyOut.join("")),toast.push("데이터가 복사되었습니다. 원하시는 곳에 붙여넣기 하세요.")):dialog.push({title:"Copy Data",body:copyOut.join(""),type:"alert"})},getHeadMousePosition:function(event){var pos=this.colHead.offset(),x=event.pageX-pos.left,y=event.pageY-pos.top;return{x:x,y:y}},getColHeadTd:function(arg){var cfg=this.config,po=[];if(arg.ghost)po.push("<td"+arg.valign+arg.rowspan+arg.colspan+' class="colHeadTd'+arg.bottomClass+'">'),po.push('<div class="tdRelBlock">'),po.push('<div class="colHeadNode colHeadTdText">&nbsp;</div>'),po.push("</div>"),po.push("</td>");else{var colHeadTdText=" colHeadTdText",toolUse=!0;"html"!=arg.formatter&&"checkbox"!=arg.formatter&&"radio"!=arg.formatter||(colHeadTdText=" colHeadTdHtml",toolUse=!1,"checkbox"==arg.formatter&&(colHeadTdText=" colHeadTdCheck",arg.tdHtml='<input type="checkbox" name="checkAll" class="gridCheckBox gridCheckBox_colHead_colSeq'+arg.colSeq+'" id="'+cfg.targetID+"_AX_checkAll_AX_"+arg.r+"_AX_"+arg.CHidx+'" />'));var sortClass="";if(arg.sort&&(sortClass="desc"==arg.sort?" sortDesc":" sortAsc"),po.push("<td"+arg.valign+arg.rowspan+arg.colspan+' id="'+cfg.targetID+"_AX_colHead_AX_"+arg.r+"_AX_"+arg.CHidx+'" class="colHeadTd'+arg.bottomClass+sortClass+'">'),po.push('<div class="tdRelBlock">'),po.push('<div class="colHeadNode'+colHeadTdText+'" align="'+arg.align+'" id="'+cfg.targetID+"_AX_colHeadText_AX_"+arg.r+"_AX_"+arg.CHidx+'">'),po.push(arg.tdHtml),po.push("</div>"),toolUse&&null!=arg.colSeq&&void 0!=arg.colSeq&&po.push('<a href="#AXexec" class="colHeadTool" id="'+cfg.targetID+"_AX_colHeadTool_AX_"+arg.r+"_AX_"+arg.CHidx+'">T</a>'),po.push('<div class="colHeadResizer" id="'+cfg.targetID+"_AX_colHeadResizer_AX_"+arg.r+"_AX_"+arg.CHidx+'"></div>'),po.push("</div>"),po.push("</td>"),arg.sort){var myColHead=cfg.colHead.rows[arg.r][arg.CHidx],tdID=cfg.targetID+"_AX_colHead_AX_"+arg.r+"_AX_"+arg.CHidx;this.nowSortHeadID=tdID,this.nowSortHeadObj=myColHead}}return po.join("")},setColHead:function(){var cfg=this.config,po=[],getColHeadTd=this.getColHeadTd.bind(this);if(this.hasFixed){po.push('<table cellpadding="0" cellspacing="0" class="colHeadTable" style="width:'+this.colWidth+'px;">'),po.push(this.getColGroup("CH")),po.push("<tbody>");for(var r=0;r<cfg.colHead.rows.length;r++){cfg.colHead.rows.length-1==r;po.push("<tr>");var colCount=0;axf.each(cfg.colHead.rows[r],function(CHidx,CH){if(CH.display&&CH.colspan>0){var tdHtml=CH.label||"untitle",rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'"',bottomClass=CH.isLastCell?"":" colHeadBottomBorder";po.push(getColHeadTd({valign:valign,rowspan:rowspan,colspan:colspan,bottomClass:bottomClass,r:r,CHidx:CHidx,align:CH.align,colSeq:CH.colSeq,formatter:CH.formatter,sort:CH.sort,tdHtml:tdHtml,ghost:colCount<cfg.fixedColSeq+1})),colCount+=CH.colspan}}),po.push("</tr>")}po.push("</tbody>"),po.push("</table>");var fpo=[];fpo.push('<div class="AXGridColHead fixedColHead" id="'+cfg.targetID+'_AX_fixedColHead" style="width:'+this.fixedColWidth+'px;">'),fpo.push('<table cellpadding="0" cellspacing="0" class="colHeadTable" style="width:'+this.fixedColWidth+'px;">'),fpo.push(this.getColGroup("FC")),fpo.push("<tbody>");for(var r=0;r<cfg.colHead.rows.length;r++){cfg.colHead.rows.length-1==r;fpo.push("<tr>");var colCount=0;axf.each(cfg.colHead.rows[r],function(CHidx,CH){if(CH.display&&CH.isFixedCell&&CH.colspan>0){var tdHtml=CH.label||"untitle",rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'"',bottomClass=CH.isLastCell?"":" colHeadBottomBorder";fpo.push(getColHeadTd({valign:valign,rowspan:rowspan,colspan:colspan,bottomClass:bottomClass,r:r,CHidx:CHidx,align:CH.align,colSeq:CH.colSeq,formatter:CH.formatter,sort:CH.sort,tdHtml:tdHtml,ghost:!1}))}colCount+=CH.colspan}),fpo.push("</tr>")}fpo.push("</tbody>"),fpo.push("</table>"),fpo.push("</div>")}else{po.push('<table cellpadding="0" cellspacing="0" class="colHeadTable" style="width:'+this.colWidth+'px;">'),po.push(this.getColGroup("CH")),po.push("<tbody>");for(var r=0;r<cfg.colHead.rows.length;r++){cfg.colHead.rows.length-1==r;po.push("<tr>"),axf.each(cfg.colHead.rows[r],function(CHidx,CH){if(CH.display&&CH.colspan>0){var tdHtml=CH.label||"untitle",rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'"',bottomClass=CH.isLastCell?"":" colHeadBottomBorder";po.push(getColHeadTd({valign:valign,rowspan:rowspan,colspan:colspan,bottomClass:bottomClass,r:r,CHidx:CHidx,align:CH.align,colSeq:CH.colSeq,formatter:CH.formatter,sort:CH.sort,tdHtml:tdHtml,ghost:!1}))}}),po.push("</tr>")}po.push("</tbody>"),po.push("</table>")}this.colHead.html(po.join("")),axdom("#"+cfg.targetID+"_AX_fixedColHead").remove(),fpo&&this.colHead.after(fpo.join("")),this.colHead.find(".colHeadResizer").each(function(){var resizerID=this.id,tdID=resizerID.replace("colHeadResizer","colHead"),txtID=resizerID.replace("colHeadResizer","colHeadText"),toolID=resizerID.replace("colHeadResizer","colHeadTool"),rowspan=axdom("#"+tdID).attr("rowspan"),valign=axdom("#"+tdID).attr("valign");rowspan||(rowspan=1);var tdHeight=axdom("#"+tdID).height();if(axdom(this).css({height:tdHeight}),axdom(this).parent().css({height:tdHeight}),rowspan>1){var cellMarginTop=0;"bottom"==valign&&(cellMarginTop=tdHeight-axdom("#"+txtID).outerHeight()+5),"middle"==valign&&(cellMarginTop=(tdHeight-axdom("#"+txtID).outerHeight())/2+5),axdom("#"+txtID).css({"padding-top":cellMarginTop+"px"}),axdom("#"+toolID).css({top:cellMarginTop-5+"px"})}}),this.colHead.bind("mouseover",this.colHeadMouseOver.bind(this)),this.colHead.bind("mouseout",this.colHeadMouseOut.bind(this)),this.colHead.find(".colHeadNode").bind("click",this.colHeadNodeClick.bind(this)),this.colHead.find(".colHeadTool").bind("click",this.colHeadToolClick.bind(this)),this.colHead.find(".colHeadResizer").bind("mousedown",this.colHeadResizerMouseDown.bind(this)),this.colHead.find(".gridCheckBox").bind("click",this.colHeadCheckBoxClick.bind(this)),this.hasFixed&&(this.fixedColHead=axdom("#"+cfg.targetID+"_AX_fixedColHead"),this.fixedColHead.find(".colHeadResizer").each(function(){var resizerID=this.id,tdID=resizerID.replace("colHeadResizer","colHead"),txtID=resizerID.replace("colHeadResizer","colHeadText"),toolID=resizerID.replace("colHeadResizer","colHeadTool"),rowspan=axdom("#"+tdID).attr("rowspan"),valign=axdom("#"+tdID).attr("valign");rowspan||(rowspan=1);var tdHeight=axdom("#"+tdID).height();
  if(axdom(this).css({height:tdHeight}),axdom(this).parent().css({height:tdHeight}),rowspan>1){var cellMarginTop=0;"bottom"==valign&&(cellMarginTop=tdHeight-axdom("#"+txtID).outerHeight()+5),"middle"==valign&&(cellMarginTop=(tdHeight-axdom("#"+txtID).outerHeight())/2+5),axdom("#"+txtID).css({"padding-top":cellMarginTop+"px"}),axdom("#"+toolID).css({top:cellMarginTop-5+"px"})}}),this.fixedColHead.bind("mouseover",this.colHeadMouseOver.bind(this)),this.fixedColHead.bind("mouseout",this.colHeadMouseOut.bind(this)),this.fixedColHead.find(".colHeadNode").bind("click",this.colHeadNodeClick.bind(this)),this.fixedColHead.find(".colHeadTool").bind("click",this.colHeadToolClick.bind(this)),this.fixedColHead.find(".colHeadResizer").bind("mousedown",this.colHeadResizerMouseDown.bind(this)),this.fixedColHead.find(".gridCheckBox").bind("click",this.colHeadCheckBoxClick.bind(this)))},colHeadMouseOver:function(event){this.config;if(""!=event.target.id){var eid=event.target.id.split(/_AX_/g),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,until:function(evt,evtIDs){return!!axdom(evt.parentNode).hasClass("AXGridColHead")},find:function(evt,evtIDs){return!!axdom(evt).hasClass("colHeadTd")}});if(myTarget){var targetID=myTarget.id,toolID=targetID.replace("colHead","colHeadTool");axdom("#"+toolID).addClass("readyTool")}}},colHeadMouseOut:function(event){this.config;if(""!=event.target.id){var eid=event.target.id.split(/_AX_/g),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,until:function(evt,evtIDs){return!!axdom(evt.parentNode).hasClass("AXGridColHead")},find:function(evt,evtIDs){return!!axdom(evt).hasClass("colHeadTd")}});if(myTarget){var targetID=myTarget.id,toolID=targetID.replace("colHead","colHeadTool");axdom("#"+toolID).removeClass("readyTool")}}},colHeadResizerMouseDown:function(event){var cfg=this.config;if(""!=event.target.id){var eid=event.target.id.split(/_AX_/g),lastIdx=(event.target,eid.length-1),colHeadR=eid[lastIdx-1],colHeadC=eid[lastIdx],colSeq=this.getColSeqToHead(colHeadR,colHeadC);if(null!=colSeq){this.colResizing&&this.colHeadResizerEnd();var offset=axdom("#"+cfg.targetID+"_AX_colHead_AX_"+colHeadR+"_AX_"+colHeadC).find(".tdRelBlock").position(),relBlockWidth=axdom("#"+cfg.targetID+"_AX_colHead_AX_"+colHeadR+"_AX_"+colHeadC).find(".tdRelBlock").width(),rightPosition=offset.left.number()+relBlockWidth.number(),blockWidth=axdom("#"+cfg.targetID+"_AX_col_AX_"+colSeq+"_AX_CH").attr("width");this.colResizeTarget={colSeq:colSeq,leftPosition:rightPosition-blockWidth,blockWidth:blockWidth,newWidth:blockWidth};var colHeadResizerMouseMove=this.colHeadResizerMouseMove.bind(this);this.colHeadResizerMouseMoveBind=function(event){colHeadResizerMouseMove(event)};var colHeadResizerMouseUp=this.colHeadResizerMouseUp.bind(this);this.colHeadResizerMouseUpBind=function(event){colHeadResizerMouseUp(event)},axdom(document.body).bind("mousemove.AXTree",this.colHeadResizerMouseMoveBind),axdom(document.body).bind("mouseup.AXTree",this.colHeadResizerMouseUpBind),axdom(document.body).bind("mouseleave.AXTree",this.colHeadResizerMouseUpBind),axdom("iframe").bind("mouseover.AXTree",this.colHeadResizerMouseUpBind),axdom(document.body).attr("onselectstart","return false")}}},colHeadResizerMouseMove:function(event){event.pageX&&(this.config.moveSens>this.moveSens&&this.moveSens++,this.moveSens==this.config.moveSens&&this.colHeadResizerMove(event))},colHeadResizerMove:function(event){var cfg=this.config,mouse=this.getHeadMousePosition(event),newWidth=(this.colResizeTarget.leftPosition-mouse.x).abs();if(!(31>newWidth)){if(axdom("#"+cfg.targetID+"_AX_col_AX_"+this.colResizeTarget.colSeq+"_AX_CH").attr("width",newWidth),axdom("#"+cfg.targetID+"_AX_col_AX_"+this.colResizeTarget.colSeq+"_AX_CB").attr("width",newWidth),axdom("#"+cfg.targetID+"_AX_col_AX_"+this.colResizeTarget.colSeq+"_AX_EB").attr("width",newWidth),cfg.colGroup[this.colResizeTarget.colSeq].width=newWidth,this.hasFixed){var fixedColSeq=this.fixedColSeq;axdom("#"+cfg.targetID+"_AX_col_AX_"+this.colResizeTarget.colSeq+"_AX_FC").attr("width",newWidth),axdom("#"+cfg.targetID+"_AX_col_AX_"+this.colResizeTarget.colSeq+"_AX_FB").attr("width",newWidth),axdom("#"+cfg.targetID+"_AX_col_AX_"+this.colResizeTarget.colSeq+"_AX_FE").attr("width",newWidth);var fixedColWidth=0;axf.each(cfg.colGroup,function(cidx,CG){CG.display&&fixedColSeq+1>cidx&&(fixedColWidth+=CG.width.number())}),this.fixedColWidth=fixedColWidth,axdom("#"+cfg.targetID+"_AX_fixedColHead").css({width:fixedColWidth}),axdom("#"+cfg.targetID+"_AX_fixedColHead").find(".colHeadTable").css({width:fixedColWidth}),axdom("#"+cfg.targetID+"_AX_fixedScrollContent").css({width:fixedColWidth}),axdom("#"+cfg.targetID+"_AX_fixedScrollContent").find(".gridFixedBodyTable").css({width:fixedColWidth}),axdom("#"+cfg.targetID+"_AX_fixedEditorContent").css({width:fixedColWidth}),axdom("#"+cfg.targetID+"_AX_fixedEditorContent").find(".gridFixedBodyTable").css({width:fixedColWidth})}if(this.editorOpend)for(var colSeq=this.colResizeTarget.colSeq,_m=0;_m<cfg.editor._maps.length;_m++){var rc=cfg.editor._maps[_m][colSeq],CH=cfg.editor.rows[rc.r][rc.c],formID=CH.form.id?CH.form.id:cfg.targetID+"_AX_"+CH.key+"_AX_"+rc.r+"_AX_"+rc.c;axf.getId(formID)&&"INPUT"==axf.getId(formID).tagName&&AXInput.alignAnchor(formID)}this.colResizeTarget.newWidth=newWidth;var newColWidth=this.colWidth-(this.colResizeTarget.blockWidth-this.colResizeTarget.newWidth);this.colHead.find(".colHeadTable").css({width:newColWidth+"px"})}},colHeadResizerMouseUp:function(event){this.colResizeTarget.blockWidth!=this.colResizeTarget.newWidth&&(this.colWidth=this.colWidth-(this.colResizeTarget.blockWidth-this.colResizeTarget.newWidth)),this.colHeadResizerEnd(),this.contentScrollResize(!1)},colHeadResizerEnd:function(){this.moveSens=0,this.colResizing=!1,axdom(document.body).unbind("mousemove.AXTree"),axdom(document.body).unbind("mouseup.AXTree"),axdom(document.body).unbind("mouseleave.AXTree"),axdom("iframe").unbind("mouseover.AXTree"),axdom(document.body).removeAttr("onselectstart")},colHeadNodeClick:function(event){var cfg=this.config;if(""!=event.target.id){var eid=event.target.id.split(/_AX_/g),eventTarget=event.target;if(this.editorOpend)return void toast.push("Editor 활성화 상태에서는 기능을 사용할 수 없습니다.");if(axdom(eventTarget).hasClass("colHeadTdCheck"))return void this.colHeadCheckBoxClick(event);if(!axdom(eventTarget).hasClass("gridCheckBox")){var lastIdx=eid.length-1,colHeadR=eid[lastIdx-1],colHeadC=eid[lastIdx],myColHead=cfg.colHead.rows[colHeadR][colHeadC];cfg.targetID+"_AX_colHead_AX_"+colHeadR+"_AX_"+colHeadC;if(void 0!=myColHead.colSeq&&null!=myColHead.colSeq||trace("정렬할 수 없는 컬럼 입니다."),cfg.colHead.onclick){var sendObj={index:null,r:colHeadR,c:colHeadC,list:this.list,colHead:myColHead,page:this.page};cfg.colHead.onclick.call(sendObj)}}}},colHeadToolClick:function(event){var cfg=this.config;if(""!=event.target.id){var eid=event.target.id.split(/_AX_/g),eventTarget=event.target;if(this.editorOpend)return void toast.push("Editor 활성화 상태에서는 기능을 사용할 수 없습니다.");var lastIdx=eid.length-1,colHeadR=eid[lastIdx-1],colHeadC=eid[lastIdx];cfg.colHead.rows[colHeadR][colHeadC];axdom("#"+cfg.targetID+"_AX_colHeadMenu").remove();var po=[];po.push('<div id="'+cfg.targetID+'_AX_colHeadMenu" class="AXTreeColGroupListBox">'),axf.each(cfg.colGroup,function(cidx,CG){var addClass=CG.display?" on":"",lastClass=cidx==cfg.colGroup.length-1?" last":"";po.push('<a href="#AXexec" class="AXTreeColGroupListBoxItem'+addClass+lastClass+'" id="'+cfg.targetID+"_AX_colHeadMenu_AX_"+CG.colSeq+'">'),po.push(CG.label),po.push("</a>")}),po.push("</div>"),axdom(document.body).append(po.join(""));var offset=axdom(eventTarget).offset(),css={};css.top=offset.top-5,css.left=offset.left-20,axdom("#"+cfg.targetID+"_AX_colHeadMenu").css(css);var colGroupListClick=this.colGroupListClick.bind(this);this.colGroupListClickBind=function(event){colGroupListClick(event)},axdom(document).bind("click",this.colGroupListClickBind),axdom(document).bind("keydown",this.colGroupListClickBind)}},colGroupListClick:function(event){var cfg=this.config;if(event.keyCode==AXUtil.Event.KEY_ESC)return axdom("#"+cfg.targetID+"_AX_colHeadMenu").remove(),axdom(document).unbind("keydown",this.colGroupListClickBind),void axdom(document).unbind("click",this.colGroupListClickBind);if(""!=event.target.id){var eid=event.target.id.split(/_AX_/g),eventTarget=event.target,myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,find:function(evt,evtIDs){return!(!axdom(evt).hasClass("AXTreeColGroupListBoxItem")&&!axdom(evt).hasClass("colHeadTool"))}});if(myTarget){if(axdom(myTarget).hasClass("colHeadTool"))return;var targetID=myTarget.id,colSeq=targetID.split(/_AX_/g).last();cfg.colGroup[colSeq].display?(cfg.colGroup[colSeq].display=!1,axdom("#"+targetID).removeClass("on")):(cfg.colGroup[colSeq].display=!0,axdom("#"+targetID).addClass("on")),this.redrawGrid()}else axdom("#"+cfg.targetID+"_AX_colHeadMenu").remove(),axdom(document).unbind("keydown",this.colGroupListClickBind),axdom(document).unbind("click",this.colGroupListClickBind)}},colHeadCheckBoxClick:function(event){var cfg=this.config;if(""!=event.target.id){var eid=event.target.id.split(/_AX_/g),eventTarget=event.target;axdom(eventTarget).hasClass("colHeadTdCheck")&&(eventTarget=axdom(eventTarget).find("input").get(0),eventTarget.checked=!eventTarget.checked);var lastIdx=eid.length-1,colHeadR=eid[lastIdx-1],colHeadC=eid[lastIdx],myColHead=cfg.colHead.rows[colHeadR][colHeadC];this.checkedColSeq(myColHead.colSeq,eventTarget.checked)}},sortList:function(nsort,myColHead,list){var cfg=this.config,getValueForSort=function(item,itemIndex){if(myColHead.formatter){var result;if("money"==myColHead.formatter)result=item[myColHead.key];else if("dec"==myColHead.formatter)result=item[myColHead.key].dec();else if("html"==myColHead.formatter)result=item[myColHead.key];else if("checkbox"==myColHead.formatter)result=item[myColHead.key];else{var sendObj={index:itemIndex,list:list,item:item,page:this.page};result=myColHead.formatter.call(sendObj);var moneyCheck=result.replace(/,/g,"");axdom.isNumeric(moneyCheck)&&(result=result.number())}return result}return item[myColHead.key]};if("desc"==nsort){var listIndex=0;list=list.sort(function(prevItem,nowItem){if(prevItem[cfg.reserveKeys.hashKey].length!=nowItem[cfg.reserveKeys.hashKey].length)return 0;var v1=getValueForSort(prevItem,listIndex),v2=getValueForSort(nowItem,listIndex);return listIndex++,v2>v1?1:v1>v2?-1:v1==v2?0:void 0})}else{var listIndex=0;list=list.sort(function(prevItem,nowItem){if(prevItem[cfg.reserveKeys.hashKey].length!=nowItem[cfg.reserveKeys.hashKey].length)return 0;var v1=getValueForSort(prevItem,listIndex),v2=getValueForSort(nowItem,listIndex);return listIndex++,v2>v1?-1:v1>v2?1:v1==v2?0:void 0})}return list},setBody:function(list){var cfg=this.config;list&&(this.list=list);var po=[];po.push('<div id="'+cfg.targetID+'_AX_scrollContent" class="treeScrollContent">'),po.push('<table cellpadding="0" cellspacing="0" class="treeBodyTable" style="">'),po.push(this.getColGroup("CB")),po.push('<thead id="'+cfg.targetID+'_AX_thead"></thead>'),po.push('<tbody id="'+cfg.targetID+'_AX_tbody">'),po.push('<tr class="noListTr">'),po.push('<td colspan="'+this.showColLen+'">'),po.push('<div class="tdRelBlock">'),po.push('<div class="bodyNode bodyTdText" align="center">'),po.push(cfg.emptyListMSG),po.push("</div>"),po.push("</div>"),po.push("</td>"),po.push('<td class="bodyNullTd"><div class="tdRelBlock">&nbsp;</div></td>'),po.push("</tr>"),po.push("</tbody>"),po.push('<tfoot id="'+cfg.targetID+'_AX_tfoot"></tfoot>'),po.push("</table>"),po.push("</div>"),this.hasFixed&&(po.push('<div id="'+cfg.targetID+'_AX_fixedScrollContent" class="treeFixedScrollContent" style="width:'+this.fixedColWidth+'px;">'),po.push('<table cellpadding="0" cellspacing="0" class="treeFixedBodyTable" style="width:'+this.fixedColWidth+'px;">'),po.push(this.getColGroup("FB")),po.push('<thead id="'+cfg.targetID+'_AX_fixedThead"></thead>'),po.push('<tbody id="'+cfg.targetID+'_AX_fixedTbody">'),po.push('<tr class="noListTr">'),po.push('<td colspan="'+this.showColLen+'">'),po.push("</td>"),po.push("</tr>"),po.push("</tbody>"),po.push('<tfoot id="'+cfg.targetID+'_AX_fixedTfoot"></tfoot>'),po.push("</table>"),po.push("</div>")),po.push('<div id="'+cfg.targetID+'_AX_scrollTrackY" class="treeScrollTrackY"><div id="'+cfg.targetID+'_AX_scrollYHandle" class="treeScrollHandle"></div></div>'),po.push('<div id="'+cfg.targetID+'_AX_scrollTrackX" class="treeScrollTrackX"><div id="'+cfg.targetID+'_AX_scrollXHandle" class="treeScrollHandle"></div></div>'),po.push('<div style="display:none;">'),po.push('<div id="'+cfg.targetID+'_AX_Selector" class="AXtreeSelector"></div>'),po.push("</div>"),this.body.html(po.join("")),this.list.length>0&&this.setList(this.list,!1),axdom("#"+cfg.targetID+"_AX_scrollYHandle").bind("mousedown",this.contentScrollScrollReady.bind(this)),axdom("#"+cfg.targetID+"_AX_scrollXHandle").bind("mousedown",this.contentScrollScrollReady.bind(this))},listLoadingDisplay:function(){var cfg=this.config,po=[];po.push('<tr class="noListTr">'),po.push('<td colspan="'+this.showColLen+'">'),po.push('<div class="tdRelBlock">'),po.push('<div class="bodyNode bodyTdText" align="center">'),po.push('	<div class="AXLoading"></div>'),po.push("</div>"),po.push("</div>"),po.push("</td>"),po.push('<td class="bodyNullTd"><div class="tdRelBlock">&nbsp;</div></td>'),po.push("</tr>"),axdom("#"+cfg.targetID+"_AX_tbody").html(po.join("")),po=[],po.push('<tr class="noListTr">'),po.push('<td colspan="'+this.showColLen+'">'),po.push("</td>"),po.push("</tr>"),axdom("#"+cfg.targetID+"_AX_fixedTbody").html(po.join(""))},getAXTreeSplit:function(isFix){var po=(this.config,[]);return"n"==isFix?(po.push('<tr class="AXTreeSplit">'),po.push('<td colspan="'+this.showColLen+'">'),po.push("</td>"),po.push('<td class="bodyNullTd"><div class="tdRelBlock">&nbsp;</div></td>'),po.push("</tr>")):(po.push('<tr class="AXTreeSplit">'),po.push('<td colspan="'+this.showColLen+'">'),po.push("</td>"),po.push("</tr>")),po.join("")},setList:function(obj,positioning){var cfg=this.config;this.nowSortHeadID,this.nowSortHeadObj;if(this.listLoadingDisplay(),axdom("#"+cfg.targetID+"_AX_scrollContent").css({width:"auto"}),obj.ajaxUrl){this.ajaxInfo=obj,this.ajax_sortDisable=positioning;var sortDisable=positioning;this.pageActive=!0;var url=obj.ajaxUrl,appendPars=["pageNo="+this.page.pageNo,"pageSize="+this.page.pageSize],pars=obj.ajaxPars?obj.ajaxPars+"&"+appendPars.join("&"):appendPars.join("&"),_method="post",_contentType=AXConfig.AXReq.contentType,_headers={},_responseType=AXConfig.AXReq.responseType,_dataType=AXConfig.AXReq.dataType;obj.method&&(_method=obj.method),obj.contentType&&(_contentType=obj.contentType),obj.headers&&(_headers=obj.headers);var ajaxGetList=this.ajaxGetList.bind(this);new AXReq(url,{type:_method,contentType:_contentType,responseType:_responseType,dataType:_dataType,headers:_headers,debug:obj.debug,pars:pars,debug:!1,pars:pars,onsucc:function(res){res.result==AXConfig.AXReq.okCode?(res._sortDisable=sortDisable,obj.response?obj.response.call(res):ajaxGetList(res,positioning),obj.onLoad&&obj.onLoad.call(res)):AXUtil.alert(res)}})}else this.ajaxInfo=null,axdom.isArray(obj)&&(0==obj.length,"undefined"==typeof positioning?this.list=this.positioningHashList(obj):this.list=obj,this.printList(),this.pageActive=!1)},reloadList:function(){this.config,this.nowSortHeadID,this.nowSortHeadObj;if(this.ajaxInfo){var obj=this.ajaxInfo,sortDisable=this.ajax_sortDisable;this.pageActive=!0,this.listLoadingDisplay();var url=obj.ajaxUrl,appendPars=["pageNo="+this.page.pageNo,"pageSize="+this.page.pageSize],pars=obj.ajaxPars?obj.ajaxPars+"&"+appendPars.join("&"):appendPars.join("&"),ajaxGetList=this.ajaxGetList.bind(this);new AXReq(url,{debug:!1,pars:pars,onsucc:function(res){res.result==AXConfig.AXReq.okCode?(res._sortDisable=sortDisable,obj.response?obj.response.call(res):ajaxGetList(res)):AXUtil.alert(res)}})}},ajaxGetList:function(res,positioning){var cfg=this.config,nowSortHeadID=this.nowSortHeadID,nowSortHeadObj=this.nowSortHeadObj;res._sortDisable||!cfg.sort?this.list=res[AXConfig.AXTree.keyList]:nowSortHeadID?this.list=this.sortList(nowSortHeadObj.sort,nowSortHeadObj,res[AXConfig.AXTree.keyList]):this.list=res[AXConfig.AXTree.keyList],void 0==positioning&&(this.list=this.positioningHashList(this.list)),this.printList()},getFormatterValue:function(formatter,item,itemIndex,value,key,CH,CHidx){var result,cfg=this.config;if(!CH.editor||"checkbox"!=CH.editor.type&&"radio"!=CH.editor.type)if("money"==formatter)result=""==value||"null"==value||null==value||void 0==value?"0":(value||0).number().money();else if("dec"==formatter)result=void 0==value?"":value.toString().dec();else if("html"==formatter)result=value;else if("checkbox"==formatter||"radio"==formatter){var checkedStr="",disabled="",sendObj={index:itemIndex,list:this.list,item:item,page:this.page,key:key,value:value};this.list[itemIndex].__checked?checkedStr=' checked="checked" ':Object.isFunction(CH.checked)&&CH.checked.call(sendObj)&&(checkedStr=' checked="checked" ',this.list[itemIndex].___checked||(this.list[itemIndex].___checked={}),this.list[itemIndex].___checked[CHidx]=!0),CH.disabled&&CH.disabled.call(sendObj)&&(disabled=' disabled="disabled" ',this.list[itemIndex].___checked||(this.list[itemIndex].___disabled={}),this.list[itemIndex].___disabled[CHidx]=!0),result='<input type="'+formatter+'" name="'+CH.label+'" class="treeCheckBox_body_colSeq'+CH.colSeq+'" id="'+cfg.targetID+"_AX_checkboxItem_AX_"+CH.colSeq+"_AX_"+itemIndex+'" value="'+value+'" '+checkedStr+disabled+' onfocus="this.blur();" />'}else if(Object.isFunction(formatter)){var sendObj={index:itemIndex,list:this.list,item:item,page:this.page,key:key,value:value};result=formatter.call(sendObj,itemIndex,item)}else result="null"==String(value)?"":value;else{var checkedStr="",disabled="",that={index:itemIndex,list:this.list,item:item,page:this.page,key:key,value:value};value&&value.__checked?checkedStr=' checked="checked"':1!=value&&1!=value&&"1"!=value&&"Y"!=value||(checkedStr=' checked="checked"'),CH.editor.disabled&&CH.editor.disabled.call(that)&&(disabled=' disabled="disabled"'),result='<input type="'+CH.editor.type+'" name="'+key+'" data-editor-key="'+itemIndex+","+CHidx+'" class="inline-editor-checkbox" '+checkedStr+disabled+' onfocus="this.blur();" />'}return result},getIconClassValue:function(getIconClass,item,itemIndex,value,key,CH){var iconClass,sendObj=(this.config,{index:itemIndex,list:this.list,item:item,page:this.page});return iconClass=getIconClass.call(sendObj,itemIndex,item)},getTooltipValue:function(formatter,item,itemIndex,value,key,CH){var result,cfg=this.config;if("money"==formatter)result=""==value||"null"==value?"":value.number().money();else if("dec"==formatter)result=value.dec();else if("html"==formatter)result=value;else if("checkbox"==formatter){var checked="",disabled="",sendObj={index:itemIndex,list:this.list,item:item};if(CH.checked){var callCheckedResult=CH.checked.call(sendObj);callCheckedResult&&(checked=' checked="checked" ')}if(CH.disabled){var callDisabledResult=CH.disabled.call(sendObj);callDisabledResult&&(disabled=' disable="disable" ')}result='<input type="checkbox" name="'+CH.label+'" class="treeCheckBox_body_colSeq'+CH.colSeq+'" id="'+cfg.targetID+"_AX_checkboxItem_AX_"+itemIndex+'" value="'+value+'" '+checked+disabled+" />"}else{var sendObj={index:itemIndex,list:this.list,item:item,page:this.page};result=formatter.call(sendObj)}return result},getItem:function(itemIndex,item,isfix,hasTr){var cfg=this.config,reserveKeys=cfg.reserveKeys,tpo=[],evenClassName="line"+itemIndex%2,hashClassName="parentHash"+item[cfg.reserveKeys.parentHashKey],getFormatterValue=this.getFormatterValue.bind(this),getTooltipValue=this.getTooltipValue.bind(this),getIconClassValue=this.getIconClassValue.bind(this),hasFixed=this.hasFixed,hasTrValue=void 0==hasTr,trAddClass="";if(cfg.body.addClass)try{trAddClass=cfg.body.addClass.call({index:itemIndex,item:item,list:this.list})}catch(e){trace(e)}var trStyles=[],isDisplay=item[reserveKeys.displayKey];isDisplay||trStyles.push("display:none;");for(var _tree=this.tree,r=0;r<cfg.body.rows.length;r++){var isLastTR=cfg.body.rows.length-1==r;hasTrValue&&tpo.push('<tr class="gridBodyTr gridBodyTr_'+itemIndex+" "+evenClassName+" "+hashClassName+" "+trAddClass+'" id="'+cfg.targetID+"_AX_tr_"+r+"_AX_"+(isfix||"n")+"_AX_"+itemIndex+'" style="'+trStyles.join("")+'">');var colCount=0;axf.each(cfg.body.rows[r],function(CHidx,CH){if(CH.display&&CH.colspan>0&&("n"==isfix||void 0!=isfix&&colCount<cfg.fixedColSeq+1)){colCount+=CH.colspan;var rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'" style="vertical-align:'+CH.valign+';"',bottomClass=CH.isLastCell?"":" bodyBottomBorder",fixedClass=CH.isFixedEndCell?" fixedLine":"",bodyNodeStyles=[],indentWidth=0,iconWidth=0;if(CH.indent){var hash=item[cfg.reserveKeys.hashKey],re=new RegExp(cfg.hashSpliter,"g");indentWidth=(hash.split(re).length-1)*cfg.indentWidth+3,indentWidth>cfg.indentWidth.number()+3&&(indentWidth*=cfg.indentRatio),CH.getIconClass&&(iconWidth=cfg.iconWidth),"left"==CH.align?bodyNodeStyles.push("padding-left:"+(indentWidth+iconWidth)+"px;"):bodyNodeStyles.push("padding-right:"+(indentWidth+iconWidth)+"px;text-align:right;")}var bodyNodeClass="";"checkbox"==CH.formatter?bodyNodeClass=" bodyTdCheckBox":"html"==CH.formatter&&(bodyNodeClass=" bodyTdHtml");var expandNodeClass="";item[cfg.reserveKeys.openKey]&&(expandNodeClass=" expand");var iconClass="",tooltipValue="";if(CH.tooltip&&(tooltipValue=getTooltipValue(CH.tooltip,item,itemIndex,item[CH.key],CH.key,CH)),tpo.push("<td"+valign+rowspan+colspan+' id="'+cfg.targetID+"_AX_"+(isfix||"n")+"body_AX_"+r+"_AX_"+CHidx+"_AX_"+itemIndex+'" class="bodyTd'+bottomClass+fixedClass+'">'),tpo.push('<div class="tdRelBlock" title="'+tooltipValue+'">'),tpo.push('<div class="bodyNode bodyTdText'+bodyNodeClass+'" style="'+bodyNodeStyles.join(";")+'" align="'+CH.align+'" id="'+cfg.targetID+"_AX_bodyText_AX_"+r+"_AX_"+CHidx+"_AX_"+itemIndex+'">'),CH.indent)if(cfg.showConnectionLine){tpo.push('<span class="connectionLineContainer">');for(var hashPosition=item[cfg.reserveKeys.hashKey].split(/_/g),hp=2;hp<hashPosition.length;hp++){var hpLeft=(hp-2)*cfg.indentWidth+3,hpIndentWidth=cfg.indentWidth*cfg.indentRatio,connectionLineClass=[],subTreeStr="";if(hp<hashPosition.length-1){for(var i=1;hp+1>i;i++)subTreeStr+=1==i?"["+hashPosition[i].number()+"]":"[reserveKeys.subTree]["+hashPosition[i].number()+"]";var parentTree=null;try{eval("parentTree = _tree"+subTreeStr),parentTree.__isLastChild?connectionLineClass.push("isParentOutside"):connectionLineClass.push("isParentInside")}catch(e){trace(e)}}else item.__isLastChild&&hp==hashPosition.length-1&&connectionLineClass.push("isLastChild");tpo.push('<span class="connectionLine '+connectionLineClass.join(" ")+'" style="'+CH.align+":"+hpLeft+"px;width:"+hpIndentWidth+'px;"></span>')}tpo.push("</span>"),0==item.__subTreeLength&&(expandNodeClass+=" noChild"),tpo.push('<a class="bodyNodeIndent'+expandNodeClass+'" id="'+cfg.targetID+"_AX_bodyNodeIndent_AX_"+r+"_AX_"+CHidx+"_AX_"+itemIndex+'" style="'+CH.align+":"+(indentWidth-20)+"px;"),tpo.push('"></a>')}else tpo.push('<a class="bodyNodeIndent'+expandNodeClass+'" id="'+cfg.targetID+"_AX_bodyNodeIndent_AX_"+r+"_AX_"+CHidx+"_AX_"+itemIndex+'" style="'+CH.align+":"+(indentWidth-20)+"px;"),0==item.__subTreeLength&&tpo.push("display:none;"),tpo.push('"></a>');CH.getIconClass&&(iconClass=getIconClassValue(CH.getIconClass,item,itemIndex,item[CH.key],CH.key,CH),Object.isString(iconClass)?tpo.push('<a class="bodyNodeIcon '+iconClass+'" id="'+cfg.targetID+"_AX_bodyNodeIcon_AX_"+r+"_AX_"+CHidx+"_AX_"+itemIndex+'" style="'+CH.align+":"+indentWidth+'px;"></a>'):tpo.push('<a class="bodyNodeIcon '+iconClass.addClass+'" id="'+cfg.targetID+"_AX_bodyNodeIcon_AX_"+r+"_AX_"+CHidx+"_AX_"+itemIndex+'" style="'+CH.align+":"+indentWidth+'px;">'+iconClass.html+"</a>")),hasFixed&&!CH.isFixedCell||!hasFixed||void 0!=isfix?CH.formatter?tpo.push(getFormatterValue(CH.formatter,item,itemIndex,item[CH.key],CH.key,CH)):tpo.push(item[CH.key]):tpo.push("&nbsp;"),tpo.push("</div>"),tpo.push("</div>"),tpo.push("</td>")}}),0==r&&"n"==isfix&&cfg.colHead.display&&tpo.push('<td class="bodyNullTd" id="'+cfg.targetID+"_AX_null_AX_"+itemIndex+'" rowspan="'+cfg.body.rows.length+'"><div class="tdRelBlock" id="'+cfg.targetID+"_AX_tdRelBlock_AX_"+itemIndex+'">&nbsp;</div></td>'),hasTrValue&&tpo.push("</tr>")}return tpo.join("")},getItemMarker:function(itemIndex,item,isfix){for(var cfg=this.config,tpo=[],evenClassName="gridBodyMarker",getFormatterValue=this.getFormatterValue.bind(this),hasFixed=this.hasFixed,r=0;r<cfg.body.marker.rows.length;r++){cfg.body.marker.rows.length-1==r;tpo.push('<tr class="gridBodyTr gridBodyMarkerTr_'+itemIndex+" "+evenClassName+'" id="'+cfg.targetID+"_AX_marker_"+r+"_AX_"+(isfix||"n")+"_AX_"+itemIndex+'">');var colCount=0;axf.each(cfg.body.marker.rows[r],function(CHidx,CH){if(CH.display&&CH.colspan>0&&("n"==isfix||void 0!=isfix&&colCount<cfg.fixedColSeq+1)){colCount+=CH.colspan;var rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'" style="vertical-align:'+CH.valign+';"',bottomClass=CH.isLastCell?"":" bodyBottomBorder",fixedClass=CH.isFixedEndCell?" fixedLine":"",bodyNodeClass="";"checkbox"==CH.formatter?bodyNodeClass=" bodyTdCheckBox":"html"==CH.formatter&&(bodyNodeClass=" bodyTdHtml"),tpo.push("<td"+valign+rowspan+colspan+' id="'+cfg.targetID+"_AX_"+(isfix||"n")+"bodyMarker_AX_"+r+"_AX_"+CHidx+"_AX_"+itemIndex+'" class="bodyTd'+bottomClass+fixedClass+'">'),tpo.push('<div class="tdRelBlock">'),tpo.push('<div class="bodyNode bodyTdText'+bodyNodeClass+'" align="'+CH.align+'" id="'+cfg.targetID+"_AX_bodyMarkerText_AX_"+r+"_AX_"+CHidx+"_AX_"+itemIndex+'">'),hasFixed&&!CH.isFixedCell||!hasFixed||void 0!=isfix?CH.formatter?tpo.push(getFormatterValue(CH.formatter,item,itemIndex,item[CH.key],CH.key,CH)):tpo.push(item[CH.key]):tpo.push("&nbsp;"),tpo.push("</div>"),tpo.push("</div>"),tpo.push("</td>")}}),0==r&&"n"==isfix&&tpo.push('<td class="bodyNullTd" id="'+cfg.targetID+"_AX_nullMarker_AX_"+itemIndex+'" rowspan="'+cfg.body.rows.length+'"><div class="tdRelBlock" id="'+cfg.targetID+"_AX_tdRelBlockMarker_AX_"+itemIndex+'">&nbsp;</div></td>'),tpo.push("</tr>")}return tpo.join("")},getMarkerDisplay:function(itemIndex,item){var cfg=this.config,bodyHasMarker=this.bodyHasMarker;if(!bodyHasMarker)return!1;var sendObj={index:itemIndex,list:this.list,item:item,page:this.page},markerDisplay=cfg.body.marker.display.call(sendObj);return markerDisplay},printList:function(){var cfg=this.config,reserveKeys=cfg.reserveKeys,bodyHasMarker=this.bodyHasMarker,getItem=this.getItem.bind(this),getItemMarker=this.getItemMarker.bind(this),getMarkerDisplay=this.getMarkerDisplay.bind(this);this.gridBodyOverBind=this.gridBodyOver.bind(this),this.gridBodyOutBind=this.gridBodyOut.bind(this),this.gridBodyClickBind=this.gridBodyClick.bind(this),this.gridBodyDBLClickBind=this.gridBodyDBLClick.bind(this);var getAXTreeSplit=this.getAXTreeSplit.bind(this),po=[];axf.each(this.list,function(itemIndex,item){item.isRoot||item._isDel||(item.AXTreeSplit?po.push(getAXTreeSplit("n")):(po.push(getItem(itemIndex,item,"n")),bodyHasMarker&&getMarkerDisplay(itemIndex,item)&&po.push(getItemMarker(itemIndex,item,"n"))))}),axdom("#"+cfg.targetID+"_AX_tbody").empty(),axdom("#"+cfg.targetID+"_AX_tbody").append(po.join("")),this.hasFixed&&(po=[],axf.each(this.list,function(itemIndex,item){item.isRoot||!item[cfg.reserveKeys.displayKey]||item._isDel||(item.AXTreeSplit?po.push(getAXTreeSplit("fix")):(po.push(getItem(itemIndex,item,"fix")),bodyHasMarker&&getMarkerDisplay(itemIndex,item)&&po.push(getItemMarker(itemIndex,item,"fix"))))}),axdom("#"+cfg.targetID+"_AX_fixedTbody").empty(),axdom("#"+cfg.targetID+"_AX_fixedTbody").append(po.join(""))),this.selectedCells.clear();var _tree=this.tree,list_pointer={};axf.each(this.list,function(lidx,L){list_pointer[L[cfg.reserveKeys.hashKey]]=lidx});var _list=this.list;axf.each(this.list,function(lidx,L){if(L.__checked){var hashs=L[cfg.reserveKeys.hashKey].split(/_/g);hashs.shift();for(var l=hashs.length-1;l>-1;l--){for(var subTreeStr="",checkHash=[],i=0;l+1>i;i++)checkHash.push(hashs[i]),subTreeStr+=0==i?"["+hashs[i].number()+"]":"[reserveKeys.subTree]["+hashs[i].number()+"]";var myTree=null;try{eval("myTree = _tree"+subTreeStr)}catch(e){}if(null!=myTree){myTree.__checked=!0;var findHash="0".setDigit(cfg.hashDigit)+"_"+checkHash.join("_");void 0!=list_pointer[findHash]&&(_list[list_pointer[findHash]].__checked=!0)}}}});for(var sr=0;sr<this.selectedRow.length;sr++)this.body.find(".gridBodyTr_"+this.selectedRow[sr]).addClass("selected");if(this.body.find(".gridBodyTr").bind("mouseover",this.gridBodyOverBind),this.body.find(".gridBodyTr").bind("mouseout",this.gridBodyOutBind),this.body.find(".gridBodyTr").bind("click",this.gridBodyClickBind),"ie"==AXUtil.browser.name&&8==AXUtil.browser.version&&this.body.find(".gridBodyTr").bind("dblclick",this.gridBodyDBLClickBind),this.contentScrollResize(),this.contentScrollXAttr=null,this.contentScrollYAttr=null,cfg.persistExpanded){var expandedIndexs=axf.getCookie(cfg.cookiePrefix+cfg.targetID+"-expanded-index").split(/,/g),expand=this.click.bind(this);axf.each(expandedIndexs,function(idx,item){expand(item,"expand",!0)})}if(cfg.persistSelected){var selectedIndex=axf.getCookie(cfg.cookiePrefix+cfg.targetID+"-selected-index");void 0!==selectedIndex&&this.click(selectedIndex)}},updateList:function(itemIndex,item){var cfg=this.config,trAddClass="";if(cfg.body.addClass)try{trAddClass=cfg.body.addClass.call({index:itemIndex,item:item,list:this.list})}catch(e){trace(e)}var npo=this.getItem(itemIndex,item,"n","notr");if(this.hasFixed){this.getItem(itemIndex,item,"fix","notr")}axdom("#"+cfg.targetID+"_AX_tbody").find(".gridBodyTr_"+itemIndex).html(npo),this.hasFixed&&axdom("#"+cfg.targetID+"_AX_fixedTbody").find(".gridBodyTr_"+itemIndex).html(npo),trAddClass&&(axdom("#"+cfg.targetID+"_AX_tbody").find(".gridBodyTr_"+itemIndex).addClass(trAddClass),this.hasFixed&&axdom("#"+cfg.targetID+"_AX_fixedTbody").find(".gridBodyTr_"+itemIndex).addClass(trAddClass)),this.body.find(".gridBodyTr").unbind("mouseover",this.gridBodyOverBind),this.body.find(".gridBodyTr").unbind("mouseout",this.gridBodyOutBind),this.body.find(".gridBodyTr").unbind("click",this.gridBodyClickBind),"ie"==AXUtil.browser.name&&8==AXUtil.browser.version&&this.body.find(".gridBodyTr").unbind("dblclick",this.gridBodyDBLClickBind),this.body.find(".gridBodyTr").bind("mouseover",this.gridBodyOverBind),this.body.find(".gridBodyTr").bind("mouseout",this.gridBodyOutBind),this.body.find(".gridBodyTr").bind("click",this.gridBodyClickBind),"ie"==AXUtil.browser.name&&8==AXUtil.browser.version&&this.body.find(".gridBodyTr").bind("dblclick",this.gridBodyDBLClickBind),this.redrawDataSet()},expandToggleList:function(itemIndex,item,expandStat){var cfg=this.config;if(this.gridBodyOverBind,this.gridBodyOutBind,this.gridBodyClickBind,this.gridBodyDBLClickBind,!item[cfg.reserveKeys.openKey]||"undefined"!=typeof expandStat&&0!=expandStat){if("undefined"==typeof expandStat||1==expandStat){item[cfg.reserveKeys.openKey]=!0;for(var r=0;r<cfg.body.rows.length;r++)axdom("#"+cfg.targetID+"_AX_tr_"+r+"_AX_n_AX_"+itemIndex).find(".bodyNodeIndent").addClass("expand");var hashs=item[cfg.reserveKeys.hashKey].split(/_/g),myTree=this.tree;axf.each(hashs,function(hidx,HH){0==hidx||(myTree=1==hidx?myTree[HH.number()]:myTree[cfg.reserveKeys.subTree][HH.number()])});var addHashs=[],preFixHash=hashs.join("_"),getAddHashs=function(_tree,pfHash){addHashs.push(pfHash),axf.each(_tree,function(treeIndex,nTree){nTree[cfg.reserveKeys.subTree].length>0&&nTree[cfg.reserveKeys.openKey]&&getAddHashs(nTree[cfg.reserveKeys.subTree],pfHash+"_"+treeIndex.setDigit(cfg.hashDigit));
  })};getAddHashs(myTree[cfg.reserveKeys.subTree],preFixHash),myTree[cfg.reserveKeys.openKey]=!0;var subTree=[],_list=this.list,itemChangeDisplay=this.itemChangeDisplay.bind(this),_body=this.body;if(axf.each(addHashs,function(){_body.find(".gridBodyTr.parentHash"+this).each(function(){var trIndex=this.id.split(/_AX_/g).last();itemChangeDisplay(trIndex,!0),subTree.push(_list[trIndex])}),_body.find(".gridBodyTr.parentHash"+this).show()}),this.contentScrollResize(),this.contentScrollXAttr=null,this.contentScrollYAttr=null,cfg.persistExpanded){var persistKey=cfg.cookiePrefix+cfg.targetID+"-expanded-index",expandedIndexs=axf.getCookie(persistKey).split(/,/g);""===expandedIndexs[0]&&expandedIndexs.shift();var isInclude=!1;axf.each(expandedIndexs,function(idx,expandedIndex){return expandedIndex==item.__index?(isInclude=!0,!1):void 0}),isInclude||expandedIndexs.push(item.__index),axf.setCookie(persistKey,expandedIndexs.join(","),cfg.cookieExpiredays)}if(cfg.body.onexpand){var sendObj={index:itemIndex,list:this.list,list:this.tree,item:item,subTree:subTree,itemID:this.body.find(".gridBodyTr_"+itemIndex).attr("id")};cfg.body.onexpand.call(sendObj,itemIndex,item)}}}else{for(var pHash=item[cfg.reserveKeys.hashKey],hashs=item[cfg.reserveKeys.hashKey].split(/_/g),r=(cfg.body.rows.length-1,0);r<cfg.body.rows.length;r++)axdom("#"+cfg.targetID+"_AX_tr_"+r+"_AX_n_AX_"+itemIndex).find(".bodyNodeIndent").removeClass("expand");var removepHashs=[];axf.each(this.list,function(itemIndex,item){item.AXTreeSplit||pHash==item[cfg.reserveKeys.parentHashKey].left(pHash.length)&&(removepHashs.push(item[cfg.reserveKeys.parentHashKey]),item[cfg.reserveKeys.displayKey]=!1)});var _body=this.body;axf.each(removepHashs,function(){_body.find(".gridBodyTr.parentHash"+this).hide()}),item[cfg.reserveKeys.openKey]=!1;var myTree=this.tree;if(axf.each(hashs,function(hidx,HH){0==hidx||(myTree=1==hidx?myTree[HH.number()]:myTree[cfg.reserveKeys.subTree][HH.number()])}),myTree[cfg.reserveKeys.openKey]=!1,this.contentScrollResize(),this.contentScrollXAttr=null,this.contentScrollYAttr=null,this.clearFocus(),cfg.persistExpanded){var persistKey=cfg.cookiePrefix+cfg.targetID+"-expanded-index",expandedIndices=axf.getCookie(persistKey).split(/,/g);""===expandedIndices[0]&&expandedIndices.shift();for(var ei=expandedIndices.length-1;ei>=0;ei--){var itemHash=item[cfg.reserveKeys.hashKey],expandedIndex=expandedIndices[ei].number(),expandedHash=this.list[expandedIndex][cfg.reserveKeys.hashKey];0===expandedHash.indexOf(itemHash)&&expandedIndices.splice(ei,1)}axf.setCookie(persistKey,expandedIndices.join(","),cfg.cookieExpiredays)}if(cfg.body.oncontract){var sendObj={index:itemIndex,list:this.list,list:this.tree,item:item,subTree:subTree,itemID:this.body.find(".gridBodyTr_"+itemIndex).attr("id")};cfg.body.oncontract.call(sendObj,itemIndex,item)}}},itemChangeDisplay:function(itemIndex,status){var cfg=this.config;this.list[itemIndex][cfg.reserveKeys.displayKey]=status},gridBodyOver:function(event){this.config;this.overedItemIndex&&this.body.find(".gridBodyTr_"+this.overedItemIndex).removeClass("hover");var itemIndex=event.target.id.split(/_AX_/g).last();""!=itemIndex&&(this.body.find(".gridBodyTr_"+itemIndex).addClass("hover"),this.overedItemIndex=itemIndex)},gridBodyOut:function(event){this.config;this.overedItemIndex&&this.body.find(".gridBodyTr_"+this.overedItemIndex).removeClass("hover")},gridBodyClick:function(event){var cfg=this.config;if(cfg.body.ondblclick)if("ie"==AXUtil.browser.name&&8==AXUtil.browser.version)this.gridBodyClickAct(event);else{if(this.bodyClickObserver)return clearTimeout(this.bodyClickObserver),this.gridBodyDBLClick(event),void(this.bodyClickObserver=null);var gridBodyClickAct=this.gridBodyClickAct.bind(this);this.bodyClickObserver=setTimeout(function(){gridBodyClickAct(event)},250)}else this.gridBodyClickAct(event)},gridBodyClickAct:function(event){this.bodyClickObserver=null;var cfg=this.config,eventTarget=event.target,isoncheck=!1;if("input"==eventTarget.tagName.toLowerCase()){if(this.gridCheckClick(event),!cfg.body.oncheck)return;isoncheck=!0}if(isoncheck){var targetID=eventTarget.id,itemIndex=targetID.split(/_AX_/g).last(),ids=targetID.split(/_AX_/g),item=this.list[itemIndex],r=ids[ids.length-3],c=ids[ids.length-2],sendObj=(event.target,event.target.checked,{index:itemIndex,target:event.target,checked:event.target.checked,r:r,c:c,list:this.list,item:item,page:this.page});cfg.body.oncheck.call(sendObj,itemIndex,item)}else{var myTarget=this.getEventTarget({evt:eventTarget,evtIDs:"",until:function(evt,evtIDs){return!!axdom(evt.parentNode).hasClass("gridBodyTr")},find:function(evt,evtIDs){return!(!axdom(evt).hasClass("bodyTd")&&!axdom(evt).hasClass("bodyNodeIndent"))}});if(myTarget){var targetID=myTarget.id,itemIndex=targetID.split(/_AX_/g).last(),ids=targetID.split(/_AX_/g),clickNodeType=ids[ids.length-1-3];if("bodyNodeIndent"==clickNodeType){var item=this.list[itemIndex],r=ids[ids.length-3],c=ids[ids.length-2];this.expandToggleList(itemIndex,item)}else if(this.readyMoved)this.moveTreeExec(this.moveTarget.itemIndex,itemIndex);else if("nbody"==clickNodeType||"fbody"==clickNodeType)if(event.shiftKey);else if(event.ctrlKey){if(this.selectedRow.length>0){var body=this.body;axf.each(this.selectedRow,function(){body.find(".gridBodyTr_"+this).removeClass("selected")}),this.selectedRow.clear()}var hasID=!1,collect=[];axf.each(this.selectedCells,function(){this==targetID?hasID=!0:collect.push(this)}),hasID?(axdom("#"+targetID).removeClass("selected"),this.selectedCells=collect):(axdom("#"+targetID).addClass("selected"),this.selectedCells.push(targetID))}else{if(this.selectedCells.length>0&&(axf.each(this.selectedCells,function(){axdom("#"+this).removeClass("selected")}),this.selectedCells.clear()),this.selectedRow.length>0){var body=this.body;axf.each(this.selectedRow,function(){body.find(".gridBodyTr_"+this).removeClass("selected")})}this.selectedRow.clear(),this.body.find(".gridBodyTr_"+itemIndex).addClass("selected"),this.selectedRow.push(itemIndex);var item=this.list[itemIndex];if(cfg.persistSelected){var persistKey=cfg.cookiePrefix+cfg.targetID+"-selected-index";axf.setCookie(persistKey,item.__index,cfg.cookieExpiredays)}if(cfg.body.onclick){var r=ids[ids.length-3],c=ids[ids.length-2],hashs=item[cfg.reserveKeys.hashKey].split(/_/g),subTree=this.tree;axf.each(hashs,function(idx,arg){1==idx?subTree=subTree[this.number()]:idx>1&&(subTree=subTree[cfg.reserveKeys.subTree][this.number()])});var sendObj={index:itemIndex,r:r,c:c,list:this.list,item:item,subTree:subTree,page:this.page};cfg.body.onclick.call(sendObj,itemIndex,item)}}}}},gridBodyDBLClick:function(event){var cfg=this.config,eid=event.target.id.split(/_AX_/g),eventTarget=event.target;if("input"!=eventTarget.tagName.toLowerCase()){var myTarget=this.getEventTarget({evt:eventTarget,evtIDs:eid,until:function(evt,evtIDs){return!!axdom(evt.parentNode).hasClass("gridBodyTr")},find:function(evt,evtIDs){return!!axdom(evt).hasClass("bodyTd")}});if(myTarget){var targetID=myTarget.id,itemIndex=targetID.split(/_AX_/g).last(),ids=targetID.split(/_AX_/g);if(this.selectedRow.length>0){var body=this.body;axf.each(this.selectedRow,function(){body.find(".gridBodyTr_"+this).removeClass("selected")})}if(this.selectedRow.clear(),this.body.find(".gridBodyTr_"+itemIndex).addClass("selected"),this.selectedRow.push(itemIndex),cfg.body.ondblclick){var r=ids[ids.length-3],c=ids[ids.length-2],item=this.list[itemIndex],sendObj={index:itemIndex,r:r,c:c,list:this.list,item:item,page:this.page};cfg.body.ondblclick.call(sendObj)}}this.stopEvent(event),this.clearRange()}},gridCheckClick:function(event,tgId){var cfg=this.config,reserveKeys=cfg.reserveKeys,relation=cfg.relation,_body=this.body,checkboxRelationFixed=cfg.checkboxRelationFixed;if("undefined"!=typeof tgId)var targetID=tgId,checked=_body.find("#"+targetID).get(0).checked;else var targetID=event.target.id,checked=event.target.checked;var itemIndex=targetID.split(/_AX_/g).last(),ids=targetID.split(/_AX_/g),item=this.list[itemIndex],colSeq=ids[ids.length-2];if(checked){var phash=item[reserveKeys.hashKey],childIndex=[];axf.each(this.list,function(lidx,list){this.isRoot||this[reserveKeys.hashKey].left(phash.length)==phash&&this[reserveKeys.hashKey]!=phash&&childIndex.push(lidx)}),axf.each(childIndex,function(){_body.find("#"+cfg.targetID+"_AX_checkboxItem_AX_"+colSeq+"_AX_"+this).get(0)&&(_body.find("#"+cfg.targetID+"_AX_checkboxItem_AX_"+colSeq+"_AX_"+this).get(0).checked=checked)});var hashs=phash.split(/_/g);hashs.shift();var stree=this.tree;axf.each(hashs,function(hidx,H){stree=0==hidx?stree[this.number()]:stree[reserveKeys.subTree][this.number()]});var subTreeChecked=function(T,checked){axf.each(T[cfg.reserveKeys.subTree],function(){this.__checked=checked,this[cfg.reserveKeys.subTree]&&subTreeChecked(this,checked)})};stree.__checked=checked,subTreeChecked(stree,checked);for(var ptree=this.tree,hidx=0;hidx<hashs.length-1;hidx++)ptree=0==hidx?ptree[hashs[hidx].number()]:ptree[reserveKeys.subTree][hashs[hidx].number()];var parentIsRootTree=!1;if(this.tree==ptree&&(parentIsRootTree=!0),!parentIsRootTree){var childIsAllChecked=!0;if(childIsAllChecked){var findhash=ptree[reserveKeys.hashKey],p_tree=this.tree,checkedHashs=[];axf.each(hashs,function(hidx,H){0==hidx?p_tree=p_tree[this.number()]:(p_tree.__checked=!0,checkedHashs.push(p_tree[reserveKeys.hashKey]),p_tree=p_tree[reserveKeys.subTree][this.number()])});var _body=this.body;axf.each(this.list,function(lidx,list){axf.each(checkedHashs,function(){list[reserveKeys.hashKey]==this&&_body.find("#"+cfg.targetID+"_AX_checkboxItem_AX_"+colSeq+"_AX_"+lidx).get(0)&&(_body.find("#"+cfg.targetID+"_AX_checkboxItem_AX_"+colSeq+"_AX_"+lidx).get(0).checked=checked)})})}}this.list=this.convertHashListToTree(this.tree)}else{if(null!=checkboxRelationFixed){var phash=item[reserveKeys.hashKey],childIndex=[];axf.each(this.list,function(lidx,list){this.isRoot||this[reserveKeys.hashKey].left(phash.length)==phash&&this[reserveKeys.hashKey]!=phash&&childIndex.push(lidx)}),axf.each(childIndex,function(){_body.find("#"+cfg.targetID+"_AX_checkboxItem_AX_"+colSeq+"_AX_"+this).get(0)&&(_body.find("#"+cfg.targetID+"_AX_checkboxItem_AX_"+colSeq+"_AX_"+this).get(0).checked=checked)});var hashs=phash.split(/_/g);hashs.shift();var stree=this.tree;axf.each(hashs,function(hidx,H){stree=0==hidx?stree[this.number()]:stree[reserveKeys.subTree][this.number()]});var subTreeChecked=function(T,checked){axf.each(T[cfg.reserveKeys.subTree],function(){this.__checked=checked,this[cfg.reserveKeys.subTree]&&subTreeChecked(this,checked)})};stree.__checked=checked,subTreeChecked(stree,checked)}if(checkboxRelationFixed){for(var p_tree=this.tree,checkedHashs=[],l=hashs.length-1;l>-1;l--){for(var subTreeStr="",i=0;l+1>i;i++)subTreeStr+=0==i?"["+hashs[i].number()+"]":"[reserveKeys.subTree]["+hashs[i].number()+"]";var myTree;eval("myTree = this.tree"+subTreeStr);var childIsAllUnChecked=!0;axf.each(myTree[reserveKeys.subTree],function(){this.__checked&&(childIsAllUnChecked=!1)}),childIsAllUnChecked&&(myTree.__checked=checked,checkedHashs.push(myTree[reserveKeys.hashKey]))}var _body=this.body;axf.each(this.list,function(lidx,list){axf.each(checkedHashs,function(){list[reserveKeys.hashKey]==this&&_body.find("#"+cfg.targetID+"_AX_checkboxItem_AX_"+colSeq+"_AX_"+lidx).get(0)&&(_body.find("#"+cfg.targetID+"_AX_checkboxItem_AX_"+colSeq+"_AX_"+lidx).get(0).checked=checked)})})}this.list=this.convertHashListToTree(this.tree)}},contentScrollResize:function(resetLeft){var cfg=this.config,bodyHeight=this.body.height(),scrollHeight=axdom("#"+cfg.targetID+"_AX_scrollContent").height(),bodyWidth=this.body.width(),_colWidth=this.colWidth.number()+cfg.fitToWidthRightMargin,scrollWidth=_colWidth>bodyWidth?_colWidth:bodyWidth;if("auto"==cfg.width&&(scrollWidth=axdom("#"+cfg.targetID+"_AX_scrollContent").find("table.treeBodyTable").width().number()),axdom("#"+cfg.targetID+"_AX_scrollContent").css({width:scrollWidth}),this.colHead.css({width:scrollWidth}),this.hasEditor&&this.editor.css({width:scrollWidth}),0!=resetLeft&&(axdom("#"+cfg.targetID+"_AX_scrollContent").css({left:0}),axdom("#"+cfg.targetID+"_AX_gridColHead").css({left:0}),axdom("#"+cfg.targetID+"_AX_scrollXHandle").css({left:0}),this.hasEditor&&axdom("#"+cfg.targetID+"_AX_editorContent").css({left:0})),scrollHeight>bodyHeight&&"auto"!=cfg.height){"auto"==cfg.width&&axdom("#"+cfg.targetID+"_AX_scrollContent").css({width:scrollWidth}),axdom("#"+cfg.targetID+"_AX_scrollTrackY").show();var scrollTrackYHeight=cfg.xscroll?bodyHeight:bodyHeight;axdom("#"+cfg.targetID+"_AX_scrollTrackY").css({height:scrollTrackYHeight});var scrollYHandleHeight=bodyHeight*scrollTrackYHeight/scrollHeight;axdom("#"+cfg.targetID+"_AX_scrollYHandle").css({height:scrollYHandleHeight})}else axdom("#"+cfg.targetID+"_AX_scrollTrackY").hide(),axdom("#"+cfg.targetID+"_AX_scrollContent").css({top:0});if(scrollWidth>bodyWidth&&cfg.xscroll){this.show_scrollTrackX=!0,axdom("#"+cfg.targetID+"_AX_scrollTrackX").show();var scrollTrackXWidth=bodyWidth;axdom("#"+cfg.targetID+"_AX_scrollTrackX").css({width:scrollTrackXWidth});var scrollXHandleWidth=bodyWidth*scrollTrackXWidth/scrollWidth;if(axdom("#"+cfg.targetID+"_AX_scrollXHandle").css({width:scrollXHandleWidth}),"auto"==cfg.height){var colHeadHeight=this.colHead.outerHeight(),scrollBodyHeight=axdom("#"+cfg.targetID+"_AX_scrollContent").height(),scrollTrackXHeight=axdom("#"+cfg.targetID+"_AX_scrollTrackX").outerHeight();this.scrollBody.css({height:scrollBodyHeight+colHeadHeight+scrollTrackXHeight}),this.body.css({top:colHeadHeight,height:scrollBodyHeight+scrollTrackXHeight})}}else if(this.show_scrollTrackX=!1,axdom("#"+cfg.targetID+"_AX_scrollTrackX").hide(),"auto"==cfg.height){var colHeadHeight=this.colHead.outerHeight(),scrollBodyHeight=axdom("#"+cfg.targetID+"_AX_scrollContent").height();this.scrollBody.css({height:scrollBodyHeight+colHeadHeight}),this.body.css({top:colHeadHeight,height:scrollBodyHeight})}},contentScrollScrollSync:function(pos){var cfg=this.config;if(void 0!=pos.left){if(!this.contentScrollXAttr){var scrollWidth=this.colWidth>this.body.width()?this.colWidth:this.body.width();this.contentScrollXAttr={bodyWidth:this.body.width(),scrollWidth:scrollWidth,scrollTrackXWidth:axdom("#"+cfg.targetID+"_AX_scrollTrackX").width(),scrollXHandleWidth:axdom("#"+cfg.targetID+"_AX_scrollXHandle").outerHeight()}}var L=(this.contentScrollXAttr.scrollWidth*pos.left/this.contentScrollXAttr.scrollTrackXWidth).round(0);axdom("#"+cfg.targetID+"_AX_scrollContent").css({left:-L}),axdom("#"+cfg.targetID+"_AX_treeColHead").css({left:-L}),this.hasEditor&&axdom("#"+cfg.targetID+"_AX_editorContent").css({left:-L})}else{if("auto"==cfg.height)return;this.contentScrollYAttr||(this.contentScrollYAttr={bodyHeight:this.body.height(),scrollHeight:axdom("#"+cfg.targetID+"_AX_scrollContent").height(),scrollTrackYHeight:axdom("#"+cfg.targetID+"_AX_scrollTrackY").height(),scrollYHandleHeight:axdom("#"+cfg.targetID+"_AX_scrollYHandle").outerHeight()});var T=(this.contentScrollYAttr.scrollHeight*pos.top/this.contentScrollYAttr.scrollTrackYHeight).round(0);axdom("#"+cfg.targetID+"_AX_scrollContent").css({top:-T}),axf.getId(cfg.targetID+"_AX_fixedScrollContent")&&axdom("#"+cfg.targetID+"_AX_fixedScrollContent").css({top:-T}),this.editorOpend&&this.editor.css({top:-T+this.editorOpenTop})}},contentScrollContentSync:function(pos){var cfg=this.config;if(void 0!=pos.left);else{if("auto"==cfg.height)return;this.contentScrollYAttr||(this.contentScrollYAttr={bodyHeight:this.body.height(),scrollHeight:axdom("#"+cfg.targetID+"_AX_scrollContent").height(),scrollTrackYHeight:axdom("#"+cfg.targetID+"_AX_scrollTrackY").height(),scrollYHandleHeight:axdom("#"+cfg.targetID+"_AX_scrollYHandle").outerHeight()});var T=(this.contentScrollYAttr.scrollYHandleHeight*pos.top/this.contentScrollYAttr.bodyHeight).round(0),handleTop=-T;axdom("#"+cfg.targetID+"_AX_scrollYHandle").css({top:handleTop}),axf.getId(cfg.targetID+"_AX_fixedScrollContent")&&axdom("#"+cfg.targetID+"_AX_fixedScrollContent").css({top:pos.top}),this.editorOpend&&this.editor.css({top:pos.top+this.editorOpenTop})}},getMousePositionToContentScroll:function(event,contentScrollID){var pos=axdom("#"+contentScrollID).offset(),x=event.pageX-pos.left,y=event.pageY-pos.top;return{x:x,y:y}},getTouchPositionToContentScroll:function(event){var cfg=this.config,touch=event.touches[0],pos=this.contentScrollIDOffset;if(cfg.touchDirection)var x=touch.pageX.round(1)-pos.left,y=touch.pageY.round(1)-pos.top;else var x=-touch.pageX.round(1)-pos.left,y=-touch.pageY.round(1)-pos.top;return{x:x,y:y}},contentScrollScrollReady:function(event){var cfg=this.config,handleName=event.target.id.split(/_AX_/).last();this.contentScrollAttrs={handleName:handleName},this.contentScrollXAttr=null,this.contentScrollYAttr=null,"scrollYHandle"==handleName?this.contentScrollAttrs.scrollTrack=cfg.targetID+"_AX_scrollTrackY":this.contentScrollAttrs.scrollTrack=cfg.targetID+"_AX_scrollTrackX",axdom(event.target).addClass("hover");var pos=this.getMousePositionToContentScroll(event,this.contentScrollAttrs.scrollTrack);this.contentScrollAttrs.x=axdom(event.target).position().left-pos.x,this.contentScrollAttrs.y=axdom(event.target).position().top-pos.y,this.contentScrollAttrs.handleWidth=axdom(event.target).outerWidth(),this.contentScrollAttrs.handleHeight=axdom(event.target).outerHeight(),this.contentScrollAttrs.trackWidth=axdom("#"+this.contentScrollAttrs.scrollTrack).width(),this.contentScrollAttrs.trackHeight=axdom("#"+this.contentScrollAttrs.scrollTrack).height();var contentScrollScrollMove=this.contentScrollScrollMove.bind(this);this.contentScrollScrollMoveBind=function(event){contentScrollScrollMove(event)};var contentScrollScrollEnd=this.contentScrollScrollEnd.bind(this);this.contentScrollScrollEndBind=function(event){contentScrollScrollEnd(event)},axdom(document.body).bind("mousemove.AXTree",this.contentScrollScrollMoveBind),axdom(document.body).bind("mouseup.AXTree",this.contentScrollScrollEndBind),axdom(document.body).bind("mouseleave.AXTree",this.contentScrollScrollEndBind),axdom("iframe").bind("mouseover.AXTree",this.contentScrollScrollEndBind),axdom(document.body).attr("onselectstart","return false")},contentScrollScrollMove:function(event){var cfg=this.config;try{var pos=this.getMousePositionToContentScroll(event,this.contentScrollAttrs.scrollTrack),handleName=this.contentScrollAttrs.handleName,handleTop=0,handleLeft=0;"scrollYHandle"==handleName?(handleTop=pos.y+this.contentScrollAttrs.y,0>handleTop&&(handleTop=0),handleTop+this.contentScrollAttrs.handleHeight>this.contentScrollAttrs.trackHeight&&(handleTop=this.contentScrollAttrs.trackHeight-this.contentScrollAttrs.handleHeight),axdom("#"+cfg.targetID+"_AX_"+handleName).css({top:handleTop}),this.contentScrollScrollSync({top:handleTop})):(handleLeft=pos.x+this.contentScrollAttrs.x,0>handleLeft&&(handleLeft=0),handleLeft+this.contentScrollAttrs.handleWidth>this.contentScrollAttrs.trackWidth&&(handleLeft=this.contentScrollAttrs.trackWidth-this.contentScrollAttrs.handleWidth),axdom("#"+cfg.targetID+"_AX_"+handleName).css({left:handleLeft}),this.contentScrollScrollSync({left:handleLeft}))}catch(e){this.contentScrollScrollEnd(event)}},contentScrollScrollEnd:function(event){var cfg=this.config;axdom(document.body).unbind("mousemove.AXTree"),axdom(document.body).unbind("mouseup.AXTree"),axdom(document.body).unbind("mouseleave.AXTree"),axdom("iframe").unbind("mouseover.AXTree"),axdom(document.body).removeAttr("onselectstart"),axdom("#"+cfg.targetID+"_AX_"+this.contentScrollAttrs.handleName).removeClass("hover")},contentScrollScrollWheel:function(e){var cfg=this.config;if("auto"!=cfg.height){var cfg=this.config,event=window.event||e,delta=event.detail?-20*event.detail:event.wheelDelta/2,scrollTop=axdom("#"+cfg.targetID+"_AX_scrollContent").position().top,scrollHeight=axdom("#"+cfg.targetID+"_AX_scrollContent").height(),bodyHeight=this.body.height();axdom("#"+cfg.targetID+"_AX_scrollYHandle").outerHeight(),axdom("#"+cfg.targetID+"_AX_scrollTrackY").height();if(bodyHeight>scrollHeight)return;var eventCancle=!1;if(scrollTop+=delta,scrollTop>0?(scrollTop=0,eventCancle=!0):scrollTop.abs()+bodyHeight>scrollHeight?(scrollTop=bodyHeight-scrollHeight,eventCancle=!0):0==scrollTop&&(scrollTop=0,eventCancle=!0),axdom("#"+cfg.targetID+"_AX_scrollContent").css({top:scrollTop}),this.contentScrollContentSync({top:scrollTop}),!eventCancle)return event.preventDefault&&event.preventDefault(),event.stopPropagation&&event.stopPropagation(),event.cancelBubble=!0,!1}},contentScrollTouchstart:function(e){var cfg=this.config,event=window.event||e;this.contentScrollTouchMoved=!0,this.contentScrollIDOffset=axdom("#"+cfg.targetID+"_AX_gridBody").offset(),this.contentScrollXAttr=null,this.contentScrollYAttr=null;var pos=this.getTouchPositionToContentScroll(event),YhandleTop=axdom("#"+cfg.targetID+"_AX_scrollYHandle").position().top,YhandleHeight=axdom("#"+cfg.targetID+"_AX_scrollYHandle").outerHeight(),YtrackHeight=axdom("#"+cfg.targetID+"_AX_scrollTrackY").height();axdom("#"+cfg.targetID+"_AX_scrollYHandle").addClass("hover");var XhandleTop=axdom("#"+cfg.targetID+"_AX_scrollXHandle").position().left,XhandleHeight=axdom("#"+cfg.targetID+"_AX_scrollXHandle").outerWidth(),XtrackHeight=axdom("#"+cfg.targetID+"_AX_scrollTrackX").width();axdom("#"+cfg.targetID+"_AX_scrollXHandle").addClass("hover"),this.scrollTouchAttr={y:(YhandleTop-pos.y).number(),h:YhandleHeight.number(),th:YtrackHeight,x:(XhandleTop-pos.x).number(),w:XhandleHeight.number(),tw:XtrackHeight};var contentScrollTouchEnd=this.contentScrollTouchEnd.bind(this);this.contentScrollTouchEndBind=function(){contentScrollTouchEnd(event)};var contentScrollTouchMove=this.contentScrollTouchMove.bind(this);this.contentScrollTouchMoveBind=function(){contentScrollTouchMove(event)},document.addEventListener&&(document.addEventListener("touchend",this.contentScrollTouchEndBind,!1),document.addEventListener("touchmove",this.contentScrollTouchMoveBind,!1))},contentScrollTouchMove:function(e){var cfg=this.config,event=window.event||e;if(this.contentScrollTouchMoved){var pos=this.getTouchPositionToContentScroll(event),scrollTouchAttr=this.scrollTouchAttr,htop=axdom("#"+cfg.targetID+"_AX_scrollYHandle").position().top,handleTop=pos.y+scrollTouchAttr.y;if(0>handleTop&&(handleTop=0),handleTop+scrollTouchAttr.h>scrollTouchAttr.th&&(handleTop=scrollTouchAttr.th-scrollTouchAttr.h),(htop-handleTop).abs()>2&&(axdom("#"+cfg.targetID+"_AX_scrollYHandle").css({top:handleTop}),this.contentScrollScrollSync({top:handleTop})),this.show_scrollTrackX){var hleft=axdom("#"+cfg.targetID+"_AX_scrollXHandle").position().left,handleLeft=pos.x+this.scrollTouchAttr.x;0>handleLeft&&(handleLeft=0),handleLeft+scrollTouchAttr.w>scrollTouchAttr.tw&&(handleLeft=scrollTouchAttr.tw-scrollTouchAttr.w),(hleft-handleLeft).abs()>2&&(axdom("#"+cfg.targetID+"_AX_scrollXHandle").css({left:handleLeft}),this.contentScrollScrollSync({left:handleLeft}))}if(!event.preventDefault)return!1;event.preventDefault()}},contentScrollTouchEnd:function(e){var cfg=this.config;window.event||e;this.contentScrollTouchMoved&&(axdom("#"+cfg.targetID+"_AX_scrollXHandle").removeClass("hover"),axdom("#"+cfg.targetID+"_AX_scrollYHandle").removeClass("hover"),document.removeEventListener&&(document.removeEventListener("touchend",this.contentScrollTouchEndBind,!1),document.removeEventListener("touchmove",this.contentScrollTouchMoveBind,!1)),this.contentScrollTouchMoved=!1)},clearFocus:function(){this.config;if(this.selectedCells.length>0&&(axf.each(this.selectedCells,function(){axdom("#"+this).removeClass("selected")}),this.selectedCells.clear()),this.selectedRow.length>0){var body=this.body;axf.each(this.selectedRow,function(){body.find(".gridBodyTr_"+this).removeClass("selected")})}this.selectedRow.clear()},setFocus:function(itemIndex){var cfg=this.config;if(0>itemIndex||itemIndex>this.list.length-1)return!1;if(this.body.find(".gridBodyTr_"+itemIndex).get(0)){if(this.selectedCells.length>0&&(axf.each(this.selectedCells,function(){axdom("#"+this).removeClass("selected")}),this.selectedCells.clear()),this.selectedRow.length>0){var body=this.body;axf.each(this.selectedRow,function(){body.find(".gridBodyTr_"+this).removeClass("selected")})}if(this.selectedRow.clear(),this.body.find(".gridBodyTr_"+itemIndex).addClass("selected"),this.selectedRow.push(itemIndex),"auto"!=cfg.height){var trTop=this.body.find(".gridBodyTr_"+itemIndex).position().top,trHeight=this.body.find(".gridBodyTr_"+itemIndex).height(),bodyHeight=(axdom("#"+cfg.targetID+"_AX_scrollContent").height(),this.body.height());axdom("#"+cfg.targetID+"_AX_scrollYHandle").outerHeight(),axdom("#"+cfg.targetID+"_AX_scrollTrackY").height();if(trTop.number()+trHeight.number()>bodyHeight){var scrollTop=bodyHeight-(trTop.number()+trHeight.number());axdom("#"+cfg.targetID+"_AX_scrollContent").css({top:scrollTop}),this.contentScrollContentSync({top:scrollTop})}else if(0==trTop.number()){var scrollTop=0;axdom("#"+cfg.targetID+"_AX_scrollContent").css({top:scrollTop}),this.contentScrollContentSync({top:scrollTop})}}}},click:function(itemIndex,open,doNotCallBack){var cfg=this.config,reserveKeys=cfg.reserveKeys,item=this.list[itemIndex];if(!item)return{focusedID:void 0};var hashs=item[cfg.reserveKeys.hashKey].split(/_/g),subTree=this.tree,opendPath=[];if(axf.each(hashs,function(idx,arg){1==idx?(subTree=subTree[this.number()],opendPath.push(subTree[reserveKeys.hashKey])):idx>1&&(subTree=subTree[cfg.reserveKeys.subTree][this.number()],opendPath.push(subTree[reserveKeys.hashKey]))}),"expand"!==open&&opendPath.pop(),cfg.body.onclick&&!doNotCallBack){var sendObj={index:itemIndex,list:this.list,item:item,subTree:subTree,page:this.page};cfg.body.onclick.call(sendObj,itemIndex,item)}if("open"==open||"expand"==open){var expandList=[];axf.each(this.list,function(lidx,L){axf.each(opendPath,function(pidx,P){L[reserveKeys.hashKey]==P&&(L[reserveKeys.openKey]||expandList.push(lidx))})});for(var i=0;i<expandList.length;i++)this.expandToggleList(expandList[i],this.list[expandList[i]])}if("expand"!==open&&this.setFocus(itemIndex),cfg.persistSelected&&"expand"!==open){var persistKey=cfg.cookiePrefix+cfg.targetID+"-selected-index";axf.setCookie(persistKey,itemIndex,cfg.cookieExpiredays)}return{focusedID:this.body.find(".gridBodyTr_"+itemIndex).attr("id")}},getDataSetFormatterValue:function(formatter,dataSet,value,key,CH){var result;this.config;if("money"==formatter)result=""==value||"null"==value||void 0==value?"":value.number().money();else if("dec"==formatter)result=void 0==value?"":value.dec();else if("html"==formatter)result=value;else if("checkbox"==formatter)result=value;else{var sendObj={index:null,list:this.list,item:dataSet,dataSet:dataSet,page:this.page};result=formatter.call(sendObj)}return result},getHeadDataSet:function(dataSet,isfix){var cfg=this.config,tpo=[],getDataSetFormatterValue=this.getDataSetFormatterValue.bind(this);axf.each(cfg.colGroup,function(){void 0==dataSet[this.key]&&(dataSet[this.key]="")});for(var hasFixed=this.hasFixed,r=0;r<cfg.head.rows.length;r++){cfg.head.rows.length-1==r;tpo.push('<tr class="gridBodyTr gridBodyTr_foot" id="'+cfg.targetID+"_AX_head_"+r+"_AX_"+(isfix||"n")+'">');var colCount=0;axf.each(cfg.head.rows[r],function(CHidx,CH){if(CH.display&&CH.colspan>0&&(void 0==isfix||void 0!=isfix&&colCount<cfg.fixedColSeq+1)){colCount+=CH.colspan;var rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'" style="vertical-align:'+CH.valign+';"',bottomClass=CH.isLastCell?"":" bodyBottomBorder",fixedClass=CH.isFixedEndCell?" fixedLine":"",bodyNodeClass="";"checkbox"==CH.formatter?bodyNodeClass=" bodyTdCheckBox":"html"==CH.formatter&&(bodyNodeClass=" bodyTdHtml"),tpo.push("<td"+valign+rowspan+colspan+' id="'+cfg.targetID+"_AX_"+(isfix||"n")+"head_AX_"+r+"_AX_"+CHidx+'" class="bodyTd'+bottomClass+fixedClass+'">'),tpo.push('<div class="tdRelBlock">'),tpo.push('<div class="bodyNode bodyTdText'+bodyNodeClass+'" align="'+CH.align+'" id="'+cfg.targetID+"_AX_headText_AX_"+r+"_AX_"+CHidx+'">'),hasFixed&&!CH.isFixedCell||!hasFixed||void 0!=isfix?CH.formatter?tpo.push(getDataSetFormatterValue(CH.formatter,dataSet,dataSet[CH.key],CH.key,CH)):tpo.push(dataSet[CH.key]):tpo.push("&nbsp;"),tpo.push("</div>"),tpo.push("</div>"),tpo.push("</td>")}}),0==r&&void 0==isfix&&tpo.push('<td class="bodyNullTd" id="'+cfg.targetID+'_AX_headnull" rowspan="'+cfg.body.rows.length+'"><div class="tdRelBlock">&nbsp;</div></td>'),tpo.push("</tr>")}return tpo.join("")},getFootDataSet:function(dataSet,isfix){var cfg=this.config,tpo=[],getDataSetFormatterValue=this.getDataSetFormatterValue.bind(this);axf.each(cfg.colGroup,function(){void 0==dataSet[this.key]&&(dataSet[this.key]="")});for(var hasFixed=this.hasFixed,r=0;r<cfg.foot.rows.length;r++){cfg.foot.rows.length-1==r;tpo.push('<tr class="gridBodyTr gridBodyTr_foot" id="'+cfg.targetID+"_AX_foot_"+r+"_AX_"+(isfix||"n")+'">');var colCount=0;axf.each(cfg.foot.rows[r],function(CHidx,CH){if(CH.display&&CH.colspan>0&&(void 0==isfix||void 0!=isfix&&colCount<cfg.fixedColSeq+1)){colCount+=CH.colspan;var rowspan=CH.rowspan>1?' rowspan="'+CH.rowspan+'"':"",colspan=CH.colspan>1?' colspan="'+CH.colspan+'"':"",valign=' valign="'+CH.valign+'" style="vertical-align:'+CH.valign+';"',bottomClass=CH.isLastCell?"":" bodyBottomBorder",fixedClass=CH.isFixedEndCell?" fixedLine":"",bodyNodeClass="";"checkbox"==CH.formatter?bodyNodeClass=" bodyTdCheckBox":"html"==CH.formatter&&(bodyNodeClass=" bodyTdHtml"),tpo.push("<td"+valign+rowspan+colspan+' id="'+cfg.targetID+"_AX_"+(isfix||"n")+"foot_AX_"+r+"_AX_"+CHidx+'" class="bodyTd'+bottomClass+fixedClass+'">'),tpo.push('<div class="tdRelBlock">'),tpo.push('<div class="bodyNode bodyTdText'+bodyNodeClass+'" align="'+CH.align+'" id="'+cfg.targetID+"_AX_footText_AX_"+r+"_AX_"+CHidx+'">'),hasFixed&&!CH.isFixedCell||!hasFixed||void 0!=isfix?CH.formatter?tpo.push(getDataSetFormatterValue(CH.formatter,dataSet,dataSet[CH.key],CH.key,CH)):tpo.push(dataSet[CH.key]):tpo.push("&nbsp;"),tpo.push("</div>"),tpo.push("</div>"),tpo.push("</td>")}}),0==r&&void 0==isfix&&tpo.push('<td class="bodyNullTd" id="'+cfg.targetID+'_AX_footnull" rowspan="'+cfg.body.rows.length+'"><div class="tdRelBlock">&nbsp;</div></td>'),tpo.push("</tr>")}return tpo.join("")},setDataSet:function(obj){var cfg=this.config;obj.ajaxUrl||axdom.isPlainObject(obj)&&(this.dataSet=obj,cfg.head&&this.printHead(),cfg.foot&&this.printFoot(),this.contentScrollResize(!1))},redrawDataSet:function(){var cfg=this.config;this.dataSet&&(cfg.head&&this.printHead(),cfg.foot&&this.printFoot())},printHead:function(){var cfg=this.config,getDataSet=this.getHeadDataSet.bind(this),po=[];po.push(getDataSet(this.dataSet)),axdom("#"+cfg.targetID+"_AX_thead").html(po.join("")),this.hasFixed&&(po=[],po.push(getDataSet(this.dataSet,"fix")),axdom("#"+cfg.targetID+"_AX_fixedThead").html(po.join("")))},printFoot:function(){var cfg=this.config,getDataSet=this.getFootDataSet.bind(this),po=[];po.push(getDataSet(this.dataSet)),axdom("#"+cfg.targetID+"_AX_tfoot").html(po.join("")),this.hasFixed&&(po=[],po.push(getDataSet(this.dataSet,"fix")),axdom("#"+cfg.targetID+"_AX_fixedTfoot").html(po.join("")))},setTree:function(obj,sortDisable){this.config,this.nowSortHeadID,this.nowSortHeadObj;if(this.listLoadingDisplay(),obj.ajaxUrl){this.ajaxInfo=obj,this.ajax_sortDisable=sortDisable,this.pageActive=!0;var url=obj.ajaxUrl,pars=obj.ajaxPars?obj.ajaxPars:"",ajaxGetTree=this.ajaxGetTree.bind(this);new AXReq(url,{debug:!1,pars:pars,onsucc:function(res){res.result&&res.result==AXConfig.AXReq.okCode||void 0==res.result&&!res.error?(res._sortDisable=sortDisable,obj.response?obj.response.call(res):ajaxGetTree(res),obj.onLoad&&obj.onLoad.call(res)):AXUtil.alert(res.msg)}})}else this.ajaxInfo=null,axdom.isArray(obj)&&(this.tree=obj,this.list=this.convertHashListToTree(obj),this.setList(this.list,!1))},ajaxGetTree:function(res){var cfg=this.config,nowSortHeadID=this.nowSortHeadID,nowSortHeadObj=this.nowSortHeadObj;
  this.tree=res[AXConfig.AXTree.keyTree],this.list=this.convertHashListToTree(res[AXConfig.AXTree.keyTree]),res._sortDisable||!cfg.sort||nowSortHeadID&&(this.list=this.sortList(nowSortHeadObj.sort,nowSortHeadObj,this.list)),this.setList(this.list,!1)},setLoading:function(itemIndex,item){for(var cfg=this.config,r=0;r<cfg.body.rows.length;r++)axdom("#"+cfg.targetID+"_AX_tr_"+r+"_AX_n_AX_"+itemIndex).find(".bodyNodeIndent").addClass("loading")},endLoading:function(itemIndex,item){for(var cfg=this.config,r=0;r<cfg.body.rows.length;r++)axdom("#"+cfg.targetID+"_AX_tr_"+r+"_AX_n_AX_"+itemIndex).find(".bodyNodeIndent").removeClass("loading")},appendTree:function(itemIndex,item,subTree){var cfg=this.config,reserveKeys=cfg.reserveKeys;if(null==itemIndex||void 0==itemIndex||null==item||void 0==item){var tree=this.tree;axf.each(subTree,function(){this[cfg.reserveKeys.subTree]=[],this._CUD="C",tree.push(this)});this.appendSubTree("0".setDigit(cfg.hashDigit),!0,subTree,this.tree);this.printList()}else{axf.each(subTree,function(){this[cfg.reserveKeys.subTree]||(this[cfg.reserveKeys.subTree]=[])});var hashs=item[cfg.reserveKeys.hashKey].split(/_/g),tree=this.tree;axf.each(hashs,function(idx,T){idx>0&&(tree=1==idx?tree[T.number()]:tree[cfg.reserveKeys.subTree][T.number()])}),axf.each(subTree,function(){this._CUD="C",tree[reserveKeys.subTree].push(this)}),this.list=this.convertHashListToTree(this.tree),this.printList()}this.contentScrollXAttr=null,this.contentScrollYAttr=null},appendSubTree:function(parentHash,parentOpened,arr,parentArr){var cfg=this.config,reserveKeys=cfg.reserveKeys,appendSubTree=this.appendSubTree.bind(this),appendSubTree_pushList=this.appendSubTree_pushList.bind(this),returnList=[],appendIndex=this.list.length,parentSubTreeLength=0;return parentSubTreeLength=parentHash!="0".setDigit(cfg.hashDigit)?parentArr[reserveKeys.subTree].length:parentArr.length,axf.each(arr,function(idx,A){var pushItem={},hasOpenKey=!1,hasSubTree=!1;axf.each(A,function(k,v){k==reserveKeys.openKey?(hasOpenKey=!0,pushItem[k]=v):k==reserveKeys.subTree?v.length>0&&(hasSubTree=!0,pushItem.__subTreeLength=v.length):"__subTree"==k?(hasSubTree=v,pushItem.__subTreeLength=v?1:0):pushItem[k]=v}),pushItem[reserveKeys.parentHashKey]=parentHash,pushItem[reserveKeys.hashKey]=parentHash+cfg.hashSpliter+(idx+parentSubTreeLength-1).setDigit(cfg.hashDigit),hasOpenKey||(pushItem[reserveKeys.openKey]=!0),hasSubTree||(pushItem.__subTreeLength=0),pushItem[reserveKeys.subTree]||(pushItem[reserveKeys.subTree]=[]),pushItem[reserveKeys.displayKey]=parentOpened,pushItem[reserveKeys.openKey]&&!parentOpened&&(pushItem[reserveKeys.openKey]=!1),appendSubTree_pushList(pushItem),returnList.push({itemIndex:appendIndex,item:pushItem}),appendIndex++,A[reserveKeys.subTree]||(A[reserveKeys.subTree]=[]),hasSubTree&&A[reserveKeys.subTree].length>0&&appendSubTree(pushItem[reserveKeys.hashKey],pushItem[reserveKeys.openKey],A[reserveKeys.subTree])}),returnList},appendSubTree_pushList:function(item){this.list.push(item)},fetchTree:function(subTree,parentItem){var cfg=this.config,reserveKeys=cfg.reserveKeys,tree=this.tree;if(parentItem){var hashs=parentItem[cfg.reserveKeys.hashKey].split(/_/g);axf.each(hashs,function(idx,T){idx>0&&(tree=1==idx?tree[T.number()]:tree[cfg.reserveKeys.subTree][T.number()])}),axf.each(subTree,function(){this[cfg.reserveKeys.subTree]=[],tree[reserveKeys.subTree].push(this)}),this.list=this.convertHashListToTree(this.tree)}else{axf.each(subTree,function(){this[cfg.reserveKeys.subTree]=[],tree.push(this)});this.appendSubTree("0".setDigit(cfg.hashDigit),!0,subTree,this.tree)}this.printList()},updateTree:function(itemIndex,item,obj){var cfg=this.config,reserveKeys=cfg.reserveKeys;cfg.relation;AXUtil.overwriteObject(item,obj),"C"!=item._CUD&&(item._CUD="U"),this.list[itemIndex]=item,this.updateList(itemIndex,item);for(var idx=0;idx<this.list.length;idx++)this.list[idx][reserveKeys.parentHashKey]=void 0,this.list[idx][reserveKeys.hashKey]=void 0;this.positioningHashList(this.list)},removeTree:function(itemIndex,item){for(var cfg=this.config,_this=this,reserveKeys=cfg.reserveKeys,hashs=(cfg.relation,item[reserveKeys.hashKey].split(/_/g)),phash=item[reserveKeys.parentHashKey],tree=this.tree,ptree=this.tree,idx=1;idx<hashs.length;idx++){var H=hashs[idx];tree=1==idx?tree[H.number()]:tree[cfg.reserveKeys.subTree][H.number()],idx==hashs.length-2&&(ptree=tree)}tree._isDel=!0,"C"==tree._CUD?tree._CUD="":tree._CUD="D";var applyDel=function(subTree){for(var ti=0;ti<subTree.length;ti++)subTree[ti]._isDel=!0,"C"==subTree[ti]._CUD?subTree[ti]._CUD="":subTree[ti]._CUD="D",subTree[ti][cfg.reserveKeys.subTree]&&applyDel(subTree[ti][cfg.reserveKeys.subTree])};applyDel(tree[cfg.reserveKeys.subTree]);var __subTreeLength=0;ptree[cfg.reserveKeys.subTree]&&axf.each(ptree[cfg.reserveKeys.subTree],function(){this._isDel||__subTreeLength++});var pItem=null;if(axf.each(this.list,function(idx,L){L[reserveKeys.hashKey].left(item[reserveKeys.hashKey].length)==item[reserveKeys.hashKey]&&(L._isDel=!0,"C"==L._CUD?L._CUD="":L._CUD="D",_this.target.find(".gridBodyTr_"+idx).remove()),phash==L[reserveKeys.hashKey]&&(pItem={itemIndex:idx,item:L})}),pItem){this.list[pItem.itemIndex].__subTreeLength=__subTreeLength;var getItem=this.getItem.bind(this),npo="";cfg.body.rows.length-1;npo=getItem(pItem.itemIndex,this.list[pItem.itemIndex],"n","notr"),_this.target.find(".gridBodyTr_"+pItem.itemIndex).html(npo)}if(this.selectedRow.length>0){var body=this.body;axf.each(this.selectedRow,function(){body.find(".gridBodyTr_"+this).removeClass("selected")}),this.selectedRow.clear(),AXContextMenu.close({id:cfg.targetID+"ContextMenu"})}},moveUpTree:function(){var cfg=this.config,reserveKeys=cfg.reserveKeys,selectedObject=(cfg.relation,this.getSelectedList());if(selectedObject.error)return void toast.push(selectedObject.description);for(var nowChildIndex,changeChildIndex,item=(selectedObject.index,this.list[selectedObject.index]),hashs=item[cfg.reserveKeys.hashKey].split(/_/g),myTree=this.tree,parentHashs=[],hidx=1;hidx<hashs.length-1;hidx++)1==hidx?(myTree=myTree[hashs[hidx].number()],parentHashs.push(hashs[hidx])):(myTree=myTree[cfg.reserveKeys.subTree][hashs[hidx].number()],parentHashs.push(hashs[hidx])),nowChildIndex=hashs[hidx+1].number();var isRootControl=!1;if(myTree==this.tree&&(isRootControl=!0,nowChildIndex=hashs.last().number()),1>nowChildIndex)toast.push("순서의 처음입니다.");else{changeChildIndex=nowChildIndex-1;try{if(isRootControl){for(;myTree[changeChildIndex]._isDel&&(changeChildIndex--,0!=changeChildIndex););var newSelectedHash="0".setDigit(cfg.hashDigit)+"_"+changeChildIndex.setDigit(cfg.hashDigit),tempObj=AXUtil.copyObject(myTree[nowChildIndex]);myTree[nowChildIndex]=AXUtil.copyObject(myTree[changeChildIndex]),myTree[changeChildIndex]=tempObj,"undefined"==typeof myTree[nowChildIndex]._CUD&&(myTree[nowChildIndex]._CUD="U"),"undefined"==typeof myTree[changeChildIndex]._CUD&&(myTree[changeChildIndex]._CUD="U")}else{for(;myTree[cfg.reserveKeys.subTree][changeChildIndex]._isDel&&(changeChildIndex--,0!=changeChildIndex););var newSelectedHash="0".setDigit(cfg.hashDigit)+"_"+parentHashs.join("_")+"_"+changeChildIndex.setDigit(cfg.hashDigit),tempObj=AXUtil.copyObject(myTree[cfg.reserveKeys.subTree][nowChildIndex]);myTree[cfg.reserveKeys.subTree][nowChildIndex]=AXUtil.copyObject(myTree[cfg.reserveKeys.subTree][changeChildIndex]),myTree[cfg.reserveKeys.subTree][changeChildIndex]=tempObj,"undefined"==typeof myTree[cfg.reserveKeys.subTree][nowChildIndex]._CUD&&(myTree[cfg.reserveKeys.subTree][nowChildIndex]._CUD="U"),"undefined"==typeof myTree[cfg.reserveKeys.subTree][changeChildIndex]._CUD&&(myTree[cfg.reserveKeys.subTree][changeChildIndex]._CUD="U")}}catch(e){trace(e)}this.selectedCells.clear(),this.selectedRow.clear(),this.list=this.convertHashListToTree(this.tree),this.printList();for(var newSelecteIndex,idx=0;idx<this.list.length;idx++)if(this.list[idx][reserveKeys.hashKey]==newSelectedHash){newSelecteIndex=idx,this.body.find(".gridBodyTr_"+newSelecteIndex).addClass("selected"),this.selectedRow.push(newSelecteIndex);break}}},moveDownTree:function(){var cfg=this.config,reserveKeys=cfg.reserveKeys,selectedObject=(cfg.relation,this.getSelectedList());if(selectedObject.error)return void toast.push(selectedObject.description);for(var nowChildIndex,changeChildIndex,item=(selectedObject.index,this.list[selectedObject.index]),hashs=item[cfg.reserveKeys.hashKey].split(/_/g),myTree=this.tree,parentHashs=[],hidx=1;hidx<hashs.length-1;hidx++)1==hidx?(myTree=myTree[hashs[hidx].number()],parentHashs.push(hashs[hidx])):(myTree=myTree[cfg.reserveKeys.subTree][hashs[hidx].number()],parentHashs.push(hashs[hidx])),nowChildIndex=hashs[hidx+1].number();var subTreeLength,isRootControl=!1;if(myTree==this.tree?(isRootControl=!0,nowChildIndex=hashs.last().number(),subTreeLength=myTree.length):subTreeLength=myTree[cfg.reserveKeys.subTree].length,nowChildIndex>subTreeLength-2)toast.push("순서의 마지막입니다.");else{changeChildIndex=nowChildIndex.number()+1;try{if(isRootControl){for(;myTree[changeChildIndex]._isDel&&(changeChildIndex++,changeChildIndex!=myTree.length-1););var newSelectedHash="0".setDigit(cfg.hashDigit)+"_"+changeChildIndex.setDigit(cfg.hashDigit),tempObj=AXUtil.copyObject(myTree[nowChildIndex]);myTree[nowChildIndex]=AXUtil.copyObject(myTree[changeChildIndex]),myTree[changeChildIndex]=tempObj,"undefined"==typeof myTree[nowChildIndex]._CUD&&(myTree[nowChildIndex]._CUD="U"),"undefined"==typeof myTree[nowChildIndex+1]._CUD&&(myTree[nowChildIndex+1]._CUD="U")}else{for(;myTree[cfg.reserveKeys.subTree][changeChildIndex]._isDel&&(changeChildIndex++,changeChildIndex!=myTree[cfg.reserveKeys.subTree].length-1););var newSelectedHash="0".setDigit(cfg.hashDigit)+"_"+parentHashs.join("_")+"_"+changeChildIndex.setDigit(cfg.hashDigit),tempObj=AXUtil.copyObject(myTree[cfg.reserveKeys.subTree][nowChildIndex]);myTree[cfg.reserveKeys.subTree][nowChildIndex]=AXUtil.copyObject(myTree[cfg.reserveKeys.subTree][changeChildIndex]),myTree[cfg.reserveKeys.subTree][changeChildIndex]=tempObj,"undefined"==typeof myTree[cfg.reserveKeys.subTree][nowChildIndex]._CUD&&(myTree[cfg.reserveKeys.subTree][nowChildIndex]._CUD="U"),"undefined"==typeof myTree[cfg.reserveKeys.subTree][nowChildIndex+1]._CUD&&(myTree[cfg.reserveKeys.subTree][nowChildIndex+1]._CUD="U")}}catch(e){trace(e)}this.selectedCells.clear(),this.selectedRow.clear(),this.list=this.convertHashListToTree(this.tree),this.printList();for(var newSelecteIndex,idx=0;idx<this.list.length;idx++)if(this.list[idx][reserveKeys.hashKey]==newSelectedHash){newSelecteIndex=idx,this.body.find(".gridBodyTr_"+newSelecteIndex).addClass("selected"),this.selectedRow.push(newSelecteIndex);break}}},moveTree:function(Option){var cfg=this.config,reserveKeys=cfg.reserveKeys,moveObj=(cfg.relation,Option.moveObj),targetObj=Option.targetObj;if(moveObj&&targetObj);else{var selectedObject=this.getSelectedList();if(selectedObject.error)return void toast.push(selectedObject.description);var itemIndex=selectedObject.index,item=this.list[selectedObject.index];item[cfg.reserveKeys.hashKey].split(/_/g);this.body.find(".gridBodyTr_"+itemIndex).addClass("copied"),toast.push({type:"Warning",body:"선택하신 아이템을 이동시킬 부모 아이템을 선택하세요"}),this.readyMoved=!0,this.moveTarget={itemIndex:itemIndex},this.moveValidate=Option.validate,this.moveEndFunction=Option.endMove,Option.startMove&&Option.startMove.call(),this.addClassItem({className:"disable",addClass:function(){return item[reserveKeys.parentHashKey]==this[reserveKeys.hashKey]||item[reserveKeys.hashKey]==this[reserveKeys.hashKey].left(item[reserveKeys.hashKey].length)}});var eventForDocument=this.onBodyKeydown.bind(this);this.eventForDocument=function(event){eventForDocument(event)},axdom(document.body).bind("keydown",this.eventForDocument)}},moveTreeExec:function(moveIndex,targetIndex){function treeExtend(_treeItems){for(var ti=0;ti<_treeItems.length;ti++)"undefined"==typeof _treeItems[ti]._CUD&&(_treeItems[ti]._CUD="U"),_treeItems[ti][cfg.reserveKeys.subTree]&&treeExtend(_treeItems[ti][cfg.reserveKeys.subTree])}var cfg=this.config,reserveKeys=cfg.reserveKeys,relation=cfg.relation;if(moveIndex==targetIndex)return void alert("이동 위치와 이동대상이 같습니다. 이동 할 수 없습니다.");var moveObj=this.list[moveIndex],targetObj=this.list[targetIndex];if(moveObj[reserveKeys.parentHashKey]==targetObj[reserveKeys.hashKey])return void alert("이동 위치가 현재 위치와 다르지 않습니다. 이동 할 수 없습니다.");if(moveObj[reserveKeys.hashKey]==targetObj[reserveKeys.hashKey].left(moveObj[reserveKeys.hashKey].length))return void alert("이동 위치가 자식위치입니다. 이동 할 수 없습니다.");if(this.moveValidate){var validateResult=this.moveValidate.call({moveObj:moveObj,targetObj:targetObj},moveObj,targetObj);if(!validateResult)return}for(var move_hashs=moveObj[reserveKeys.hashKey].split(/_/g),move_Tree_parent=this.tree,hidx=1;hidx<move_hashs.length-1;hidx++)move_Tree_parent=1==hidx?move_Tree_parent[move_hashs[hidx].number()]:move_Tree_parent[cfg.reserveKeys.subTree][move_hashs[hidx].number()];var copyObject={},move_Tree_parent_subTree=[];move_Tree_parent_subTree=2==move_hashs.length?this.tree:move_Tree_parent[cfg.reserveKeys.subTree],axf.each(move_Tree_parent_subTree,function(subTreeIndex,ST){ST[relation.childKey]==moveObj[relation.childKey]&&(copyObject=AXUtil.copyObject(ST))});var target_hashs=targetObj[reserveKeys.hashKey].split(/_/g),target_Tree_parent=this.tree,newSelectedHashs=[];newSelectedHashs.push(target_hashs[0]);for(var hidx=1;hidx<target_hashs.length;hidx++)newSelectedHashs.push(target_hashs[hidx]),target_Tree_parent=1==hidx?target_Tree_parent[target_hashs[hidx].number()]:target_Tree_parent[cfg.reserveKeys.subTree][target_hashs[hidx].number()];newSelectedHashs.push(target_Tree_parent[cfg.reserveKeys.subTree].length.setDigit(cfg.hashDigit)),copyObject[relation.parentKey]=target_Tree_parent[relation.childKey];try{copyObject[relation.parentName]=target_Tree_parent[relation.childName]}catch(e){}"undefined"==typeof copyObject._CUD&&(copyObject._CUD="U"),treeExtend(copyObject[cfg.reserveKeys.subTree]),target_Tree_parent[cfg.reserveKeys.subTree].push(copyObject);var newSelectedHash=newSelectedHashs.join("_"),new_subTree=[];axf.each(move_Tree_parent_subTree,function(subTreeIndex,ST){ST[relation.childKey]==moveObj[relation.childKey]||new_subTree.push(ST)}),2==move_hashs.length?this.tree=new_subTree:move_Tree_parent[cfg.reserveKeys.subTree]=new_subTree,this.selectedCells.clear(),this.selectedRow.clear(),this.list=this.convertHashListToTree(this.tree),this.printList();for(var newSelecteIndex,idx=0;idx<this.list.length;idx++)if(this.list[idx][reserveKeys.hashKey]==newSelectedHash){newSelecteIndex=idx,this.body.find(".gridBodyTr_"+newSelecteIndex).addClass("selected"),this.selectedRow.push(newSelecteIndex);break}this.cancelMove()},cancelMove:function(){this.readyMoved=!1,this.body.find(".gridBodyTr_"+this.moveTarget.itemIndex).removeClass("copied"),this.moveEndFunction&&this.moveEndFunction.call(),this.body.find(".gridBodyTr.disable").removeClass("disable"),this.moveTarget=null,axdom(document.body).unbind("keydown",this.eventForDocument)},addClassItem:function(Option){var body=this.body;axf.each(this.list,function(listIndex,item){Option.addClass&&Option.addClass.call(item)&&body.find(".gridBodyTr_"+listIndex).addClass(Option.className)})},removeClassItem:function(Option){var body=this.body;axf.each(this.list,function(listIndex,item){Option.removeClass&&Option.removeClass.call(item)&&body.find(".gridBodyTr_"+listIndex).removeClass(Option.className)})},convertHashListToTree:function(Tree){var cfg=this.config,reserveKeys=cfg.reserveKeys,relation=cfg.relation;this.hashList=[];var pushItem={isRoot:!0};return pushItem[relation.childKey]="0",pushItem[reserveKeys.hashKey]="0".setDigit(cfg.hashDigit),pushItem[reserveKeys.parentHashKey]="",pushItem[reserveKeys.openKey]=!0,pushItem._subTreeLength=Tree.length,this.getSubTreeList(pushItem[reserveKeys.hashKey],pushItem[reserveKeys.openKey],pushItem,Tree),this.hashList},getSubTreeList:function(parentHash,parentOpened,parentItem,arr){var cfg=this.config,reserveKeys=cfg.reserveKeys,relation=cfg.relation,getSubTreeList=this.getSubTreeList.bind(this),pushHashList=this.pushHashList.bind(this);arr[reserveKeys.subTree]||(arr[reserveKeys.subTree]=[]),axf.each(arr,function(idx,A){var pushItem={},hasOpenKey=!1,hasSubTree=!1;delete A.__subTreeLength,axf.each(A,function(k,v){k==reserveKeys.openKey?(hasOpenKey=!0,pushItem[k]=v):k==reserveKeys.subTree?v.length>0&&(hasSubTree=!0,pushItem.__subTreeLength=v.length):"__subTree"==k?(hasSubTree=v,pushItem.__subTreeLength=v?1:0):pushItem[k]=v}),pushItem[reserveKeys.parentHashKey]=parentHash,pushItem[reserveKeys.hashKey]=parentHash+cfg.hashSpliter+idx.setDigit(cfg.hashDigit),A[reserveKeys.hashKey]=parentHash+cfg.hashSpliter+idx.setDigit(cfg.hashDigit),hasOpenKey||(pushItem[reserveKeys.openKey]=!1),hasSubTree||(pushItem.__subTreeLength=0),pushItem[reserveKeys.displayKey]=parentOpened,pushItem[reserveKeys.openKey]&&!parentOpened&&(pushItem[reserveKeys.openKey]=!1),void 0!=pushItem[relation.parentKey]&&pushItem[relation.parentKey]!=relation.rootID||(pushItem[relation.parentKey]=parentItem[relation.childKey]),idx==arr.length-1?(A.__isLastChild=!0,pushItem.__isLastChild=!0):(A.__isLastChild=!1,pushItem.__isLastChild=!1),pushHashList(pushItem),A[reserveKeys.subTree]||(A[reserveKeys.subTree]=[]),hasSubTree&&A[reserveKeys.subTree].length>0&&getSubTreeList(pushItem[reserveKeys.hashKey],pushItem[reserveKeys.openKey],pushItem,A[reserveKeys.subTree])})},pushHashList:function(item){this.hashList.push(item)},convertTreeToHashList:function(List){var cfg=this.config;reserveKeys=cfg.reserveKeys;for(var hashTree=[],idx=0;idx<List.length;idx++){var item=List[idx],re=new RegExp(cfg.hashSpliter,"g"),pHash=item[reserveKeys.parentHashKey],hashs=item[reserveKeys.hashKey].split(re),pushItem={};if(axf.each(item,function(k,v){var addOk=!0;axf.each(reserveKeys,function(kk,vv){return k==vv?(addOk=!1,!1):void 0}),addOk&&(pushItem[k]=v)}),pushItem[reserveKeys.hashKey]=item[reserveKeys.hashKey],pushItem[cfg.reserveKeys.subTree]=[],2==hashs.length)hashTree.push(pushItem);else if(hashs.length>2){var pItem=hashTree.has(function(){return this.item[reserveKeys.hashKey]==pHash});pItem&&pItem[cfg.reserveKeys.subTree].push(pushItem)}}},positioningHashList:function(List){var cfg=this.config;if(reserveKeys=cfg.reserveKeys,relation=cfg.relation,!relation)return void toast.push("relation 속성이 지정되지 않아 요청을 수행 할 수 없습니다. relation:{parentKey:'', childKey:''}");for(var tree=[],pointer={},seq=0,_parentCheckKey=0,idx=0;idx<List.length;idx++){var L=List[idx];0==idx&&(_parentCheckKey=L[relation.parentKey]),L.isRoot||L.AXTreeSplit||(L.__index=idx,pointer[L[relation.childKey]]=idx,void 0==L[reserveKeys.openKey]&&(L[reserveKeys.openKey]=!1),L[relation.parentKey]==_parentCheckKey?(L[reserveKeys.subTree]=[],L.__subTreeLength=0,L[reserveKeys.parentHashKey]="0".setDigit(cfg.hashDigit),L[reserveKeys.hashKey]="0".setDigit(cfg.hashDigit)+"_"+seq.setDigit(cfg.hashDigit),L[reserveKeys.displayKey]=!0,tree.push(AXUtil.copyObject(L)),seq++):(L.__subTreeLength=0,L[reserveKeys.displayKey]=!1))}for(var idx=0;idx<List.length;idx++){var L=List[idx];if(void 0==L[reserveKeys.parentHashKey]&&!L.isRoot){if(L.AXTreeSplit)continue;var pItem=List[pointer[L[relation.parentKey]]],pHash=pItem[reserveKeys.hashKey]||"",pHashs=pHash.split(/_/g),pTree=tree;axf.each(pHashs,function(idx,T){idx>0&&(pTree=pTree[T.number()][cfg.reserveKeys.subTree])}),L[reserveKeys.subTree]=[];var __subTreeLength=pItem.__subTreeLength,pOpend=pItem[reserveKeys.openKey];L[reserveKeys.parentHashKey]=pHash,L[reserveKeys.hashKey]=pHash+cfg.hashSpliter+__subTreeLength.setDigit(cfg.hashDigit),L[reserveKeys.displayKey]=pOpend,pTree.push(AXUtil.copyObject(L)),pItem.__subTreeLength++}}return List.sort(function(p,n){return p[reserveKeys.hashKey]<n[reserveKeys.hashKey]?-1:p[reserveKeys.hashKey]>n[reserveKeys.hashKey]?1:0}),cfg.showConnectionLine?(this.tree=tree,List=this.convertHashListToTree(this.tree)):this.tree=tree,List},getSelectedList:function(){return void 0!=this.selectedRow&&null!=this.selectedRow&&this.selectedRow.length>0?{index:this.selectedRow.first(),item:this.list[this.selectedRow.first()]}:{error:"noselected",description:"선택된 item이 없습니다."}},getSelectedListParent:function(){var cfg=this.config,relation=(cfg.reserveKeys,cfg.relation);if(void 0!=this.selectedRow&&null!=this.selectedRow&&this.selectedRow.length>0){var item=this.list[this.selectedRow.first()],pno=item[relation.parentKey],parentIndex=null;return"0"!=pno&&axf.each(this.list,function(findIndex,findItem){return findItem[relation.childKey]==pno?(parentIndex=findIndex,!1):void 0}),null==parentIndex?{index:null,item:null}:{index:parentIndex,item:this.list[parentIndex]}}return{index:null,item:null}},relationFixedSync:function(options){var cfg=this.config,_this=(this.body,this),returnObject=[];return axf.each(this.list,function(lidx,L){axdom("#"+cfg.targetID+"_AX_treeBody").find(".gridBodyTr_"+lidx+" .treeCheckBox_body").each(function(){L.__checked&&options&&options.expandItem&&_this.expandToggleList(lidx,L,!0),this.checked=L.__checked,returnObject.push(this)})}),returnObject},expandAll:function(depth){var cfg=this.config;this.body;return axf.each(this.list,function(itemIndex,item){if("undefined"==typeof depth||"all"==depth)item[cfg.reserveKeys.openKey]=!0;else{var hashLevel=item[cfg.reserveKeys.parentHashKey].split(/_/g).length;hashLevel<depth.number()+1?item[cfg.reserveKeys.openKey]=!0:item[cfg.reserveKeys.openKey]=!1}item[cfg.reserveKeys.displayKey]=!0,item[cfg.reserveKeys.parentHashKey]=void 0,item[cfg.reserveKeys.hashKey]=void 0}),this.list=this.positioningHashList(this.list),this.printList(),this},collapseAll:function(){var cfg=this.config;this.body;return axf.each(this.list,function(itemIndex,item){item[cfg.reserveKeys.openKey]=!1,0==item[cfg.relation.parentKey]?item[cfg.reserveKeys.displayKey]=!0:item[cfg.reserveKeys.displayKey]=!1,item[cfg.reserveKeys.parentHashKey]=void 0,item[cfg.reserveKeys.hashKey]=void 0}),this.list=this.positioningHashList(this.list),this.printList(),this},expand:function(key){var targetItem;if(Object.isObject(key))targetItem=key;else{var cfg=this.config;axf.each(this.list,function(itemIndex,item){return item[cfg.relation.childKey]==key?(targetItem=item,!1):void 0})}return targetItem?this.click(targetItem.__index,"open",!0):{focusedID:void 0}}}),SWFUpload,swfobject;!function(){void 0==SWFUpload&&(SWFUpload=function(settings){this.initSWFUpload(settings)}),SWFUpload.prototype.initSWFUpload=function(userSettings){try{this.customSettings={},this.settings={},this.eventQueue=[],this.movieName="SWFUpload_"+SWFUpload.movieCount++,this.movieElement=null,SWFUpload.instances[this.movieName]=this,this.initSettings(userSettings),this.loadSupport(),this.swfuploadPreload()&&this.loadFlash(),this.displayDebugInfo()}catch(ex){throw delete SWFUpload.instances[this.movieName],ex}},SWFUpload.instances={},SWFUpload.movieCount=0,SWFUpload.version="2.5.0 2010-01-15 Beta 2",SWFUpload.QUEUE_ERROR={QUEUE_LIMIT_EXCEEDED:-100,FILE_EXCEEDS_SIZE_LIMIT:-110,ZERO_BYTE_FILE:-120,INVALID_FILETYPE:-130},SWFUpload.UPLOAD_ERROR={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290,RESIZE:-300},SWFUpload.FILE_STATUS={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5},SWFUpload.UPLOAD_TYPE={NORMAL:-1,RESIZED:-2},SWFUpload.BUTTON_ACTION={SELECT_FILE:-100,SELECT_FILES:-110,START_UPLOAD:-120,JAVASCRIPT:-130,NONE:-130},SWFUpload.CURSOR={ARROW:-1,HAND:-2},SWFUpload.WINDOW_MODE={WINDOW:"transparent",TRANSPARENT:"transparent",OPAQUE:"opaque"},SWFUpload.RESIZE_ENCODING={JPEG:-1,PNG:-2},SWFUpload.completeURL=function(url){try{var path="",indexSlash=-1;return"string"!=typeof url||url.match(/^https?:\/\//i)||url.match(/^\//)||""===url?url:(indexSlash=window.location.pathname.lastIndexOf("/"),path=0>=indexSlash?"/":window.location.pathname.substr(0,indexSlash)+"/",path+url)}catch(ex){return url}},SWFUpload.onload=function(){},SWFUpload.prototype.initSettings=function(userSettings){this.ensureDefault=function(settingName,defaultValue){var setting=userSettings[settingName];void 0!=setting?this.settings[settingName]=setting:this.settings[settingName]=defaultValue},this.ensureDefault("upload_url",""),this.ensureDefault("preserve_relative_urls",!1),this.ensureDefault("file_post_name",userSettings.uploadFileName),this.ensureDefault("post_params",{}),this.ensureDefault("use_query_string",!1),this.ensureDefault("requeue_on_error",!1),this.ensureDefault("http_success",[]),this.ensureDefault("assume_success_timeout",0),this.ensureDefault("file_types",userSettings.file_types),this.ensureDefault("file_types_description","All Files"),this.ensureDefault("file_size_limit",0),this.ensureDefault("file_upload_limit",0),this.ensureDefault("file_queue_limit",0),this.ensureDefault("flash_url","swfupload.swf"),this.ensureDefault("flash9_url","swfupload_fp9.swf"),this.ensureDefault("prevent_swf_caching",!0),this.ensureDefault("button_image_url",""),this.ensureDefault("button_width",1),this.ensureDefault("button_height",1),this.ensureDefault("button_text",""),this.ensureDefault("button_text_style","color: #000000; font-size: 16pt;"),this.ensureDefault("button_text_top_padding",0),this.ensureDefault("button_text_left_padding",0),this.ensureDefault("button_action",SWFUpload.BUTTON_ACTION.SELECT_FILES),this.ensureDefault("button_disabled",!1),this.ensureDefault("button_placeholder_id",""),this.ensureDefault("button_placeholder",null),this.ensureDefault("button_cursor",SWFUpload.CURSOR.ARROW),this.ensureDefault("button_window_mode",SWFUpload.WINDOW_MODE.WINDOW),this.ensureDefault("debug",!1),this.settings.debug_enabled=this.settings.debug,this.ensureDefault("fileSelectAutoUpload",userSettings.fileSelectAutoUpload),this.settings.return_upload_start_handler=this.returnUploadStart,this.ensureDefault("swfupload_preload_handler",null),this.ensureDefault("swfupload_load_failed_handler",null),this.ensureDefault("swfupload_loaded_handler",null),this.ensureDefault("file_dialog_start_handler",null),this.ensureDefault("file_queued_handler",null),this.ensureDefault("file_queue_error_handler",null),this.ensureDefault("file_dialog_complete_handler",null),this.ensureDefault("upload_resize_start_handler",null),this.ensureDefault("upload_start_handler",null),this.ensureDefault("upload_progress_handler",null),this.ensureDefault("upload_error_handler",null),this.ensureDefault("upload_success_handler",null),this.ensureDefault("upload_complete_handler",null),this.ensureDefault("mouse_click_handler",null),this.ensureDefault("mouse_out_handler",null),this.ensureDefault("mouse_over_handler",null),this.ensureDefault("debug_handler",this.debugMessage),this.ensureDefault("custom_settings",{}),this.customSettings=this.settings.custom_settings,this.settings.prevent_swf_caching&&(this.settings.flash_url=this.settings.flash_url+(this.settings.flash_url.indexOf("?")<0?"?":"&")+"preventswfcaching="+(new Date).getTime(),this.settings.flash9_url=this.settings.flash9_url+(this.settings.flash9_url.indexOf("?")<0?"?":"&")+"preventswfcaching="+(new Date).getTime()),this.settings.preserve_relative_urls||(this.settings.upload_url=SWFUpload.completeURL(this.settings.upload_url),this.settings.button_image_url=SWFUpload.completeURL(this.settings.button_image_url)),delete this.ensureDefault},SWFUpload.prototype.loadSupport=function(){this.support={loading:swfobject.hasFlashPlayerVersion("9.0.28"),imageResize:swfobject.hasFlashPlayerVersion("10.0.0")}},SWFUpload.prototype.loadFlash=function(){var targetElement,tempParent,wrapperType,flashHTML,els;if(!this.support.loading)return void this.queueEvent("swfupload_load_failed_handler",["Flash Player doesn't support SWFUpload"]);if(null!==document.getElementById(this.movieName))return this.support.loading=!1,void this.queueEvent("swfupload_load_failed_handler",["Element ID already in use"]);if(targetElement=document.getElementById(this.settings.button_placeholder_id)||this.settings.button_placeholder,void 0==targetElement)return this.support.loading=!1,void this.queueEvent("swfupload_load_failed_handler",["button place holder not found"]);wrapperType="block"!==(targetElement.currentStyle&&targetElement.currentStyle.display||window.getComputedStyle&&document.defaultView.getComputedStyle(targetElement,null).getPropertyValue("display"))?"span":"div",tempParent=document.createElement(wrapperType),flashHTML=this.getFlashHTML();try{tempParent.innerHTML=flashHTML}catch(ex){return this.support.loading=!1,void this.queueEvent("swfupload_load_failed_handler",["Exception loading Flash HTML into placeholder"])}return els=tempParent.getElementsByTagName("object"),!els||els.length>1||0===els.length?(this.support.loading=!1,void this.queueEvent("swfupload_load_failed_handler",["Unable to find movie after adding to DOM"])):(1===els.length&&(this.movieElement=els[0]),targetElement.parentNode.replaceChild(tempParent.firstChild,targetElement),void(void 0==window[this.movieName]&&(window[this.movieName]=this.getMovieElement())))},SWFUpload.prototype.getFlashHTML=function(flashVersion){return['<object id="',this.movieName,'" type="application/x-shockwave-flash" data="',this.support.imageResize?this.settings.flash_url:this.settings.flash9_url,'" width="',this.settings.button_width,'" height="',this.settings.button_height,'" class="swfupload">','<param name="wmode" value="',this.settings.button_window_mode,'" />','<param name="movie" value="',this.support.imageResize?this.settings.flash_url:this.settings.flash9_url,'" />','<param name="quality" value="high" />','<param name="allowScriptAccess" value="always" />','<param name="flashvars" value="'+this.getFlashVars()+'" />',"</object>"].join("")},SWFUpload.prototype.getFlashVars=function(){var httpSuccessString,paramString;return paramString=this.buildParamString(),httpSuccessString=this.settings.http_success.join(","),["movieName=",encodeURIComponent(this.movieName),"&amp;uploadURL=",encodeURIComponent(this.settings.upload_url),"&amp;useQueryString=",encodeURIComponent(this.settings.use_query_string),"&amp;requeueOnError=",encodeURIComponent(this.settings.requeue_on_error),"&amp;httpSuccess=",encodeURIComponent(httpSuccessString),"&amp;assumeSuccessTimeout=",encodeURIComponent(this.settings.assume_success_timeout),"&amp;params=",encodeURIComponent(paramString),"&amp;filePostName=",encodeURIComponent(this.settings.file_post_name),"&amp;fileTypes=",encodeURIComponent(this.settings.file_types),"&amp;fileTypesDescription=",encodeURIComponent(this.settings.file_types_description),"&amp;fileSizeLimit=",encodeURIComponent(this.settings.file_size_limit),"&amp;fileUploadLimit=",encodeURIComponent(this.settings.file_upload_limit),"&amp;fileQueueLimit=",encodeURIComponent(this.settings.file_queue_limit),"&amp;debugEnabled=",encodeURIComponent(this.settings.debug_enabled),"&amp;buttonImageURL=",encodeURIComponent(this.settings.button_image_url),"&amp;buttonWidth=",encodeURIComponent(this.settings.button_width),"&amp;buttonHeight=",encodeURIComponent(this.settings.button_height),"&amp;buttonText=",encodeURIComponent(this.settings.button_text),"&amp;buttonTextTopPadding=",encodeURIComponent(this.settings.button_text_top_padding),"&amp;buttonTextLeftPadding=",encodeURIComponent(this.settings.button_text_left_padding),"&amp;buttonTextStyle=",encodeURIComponent(this.settings.button_text_style),"&amp;buttonAction=",encodeURIComponent(this.settings.button_action),"&amp;buttonDisabled=",encodeURIComponent(this.settings.button_disabled),"&amp;buttonCursor=",encodeURIComponent(this.settings.button_cursor)].join("")},SWFUpload.prototype.getMovieElement=function(){if(void 0==this.movieElement&&(this.movieElement=document.getElementById(this.movieName)),null===this.movieElement)throw"Could not find Flash element";return this.movieElement},SWFUpload.prototype.buildParamString=function(){var name,postParams,paramStringPairs=[];
  if(postParams=this.settings.post_params,"object"==typeof postParams)for(name in postParams)postParams.hasOwnProperty(name)&&paramStringPairs.push(encodeURIComponent(name.toString())+"="+encodeURIComponent(postParams[name].toString()));return paramStringPairs.join("&amp;")},SWFUpload.prototype.destroy=function(){var movieElement;try{if(this.cancelUpload(null,!1),movieElement=this.cleanUp())try{movieElement.parentNode.removeChild(movieElement)}catch(ex){}return window[this.movieName]=null,SWFUpload.instances[this.movieName]=null,delete SWFUpload.instances[this.movieName],this.movieElement=null,this.settings=null,this.customSettings=null,this.eventQueue=null,this.movieName=null,!0}catch(ex2){return!1}},SWFUpload.prototype.displayDebugInfo=function(){this.debug(["---SWFUpload Instance Info---\n","Version: ",SWFUpload.version,"\n","Movie Name: ",this.movieName,"\n","Settings:\n","	","upload_url:               ",this.settings.upload_url,"\n","	","flash_url:                ",this.settings.flash_url,"\n","	","flash9_url:                ",this.settings.flash9_url,"\n","	","use_query_string:         ",this.settings.use_query_string.toString(),"\n","	","requeue_on_error:         ",this.settings.requeue_on_error.toString(),"\n","	","http_success:             ",this.settings.http_success.join(", "),"\n","	","assume_success_timeout:   ",this.settings.assume_success_timeout,"\n","	","file_post_name:           ",this.settings.file_post_name,"\n","	","post_params:              ",this.settings.post_params.toString(),"\n","	","file_types:               ",this.settings.file_types,"\n","	","file_types_description:   ",this.settings.file_types_description,"\n","	","file_size_limit:          ",this.settings.file_size_limit,"\n","	","file_upload_limit:        ",this.settings.file_upload_limit,"\n","	","file_queue_limit:         ",this.settings.file_queue_limit,"\n","	","debug:                    ",this.settings.debug.toString(),"\n","	","prevent_swf_caching:      ",this.settings.prevent_swf_caching.toString(),"\n","	","button_placeholder_id:    ",this.settings.button_placeholder_id.toString(),"\n","	","button_placeholder:       ",this.settings.button_placeholder?"Set":"Not Set","\n","	","button_image_url:         ",this.settings.button_image_url.toString(),"\n","	","button_width:             ",this.settings.button_width.toString(),"\n","	","button_height:            ",this.settings.button_height.toString(),"\n","	","button_text:              ",this.settings.button_text.toString(),"\n","	","button_text_style:        ",this.settings.button_text_style.toString(),"\n","	","button_text_top_padding:  ",this.settings.button_text_top_padding.toString(),"\n","	","button_text_left_padding: ",this.settings.button_text_left_padding.toString(),"\n","	","button_action:            ",this.settings.button_action.toString(),"\n","	","button_cursor:            ",this.settings.button_cursor.toString(),"\n","	","button_disabled:          ",this.settings.button_disabled.toString(),"\n","	","custom_settings:          ",this.settings.custom_settings.toString(),"\n","Event Handlers:\n","	","swfupload_preload_handler assigned:  ",("function"==typeof this.settings.swfupload_preload_handler).toString(),"\n","	","swfupload_load_failed_handler assigned:  ",("function"==typeof this.settings.swfupload_load_failed_handler).toString(),"\n","	","swfupload_loaded_handler assigned:  ",("function"==typeof this.settings.swfupload_loaded_handler).toString(),"\n","	","mouse_click_handler assigned:       ",("function"==typeof this.settings.mouse_click_handler).toString(),"\n","	","mouse_over_handler assigned:        ",("function"==typeof this.settings.mouse_over_handler).toString(),"\n","	","mouse_out_handler assigned:         ",("function"==typeof this.settings.mouse_out_handler).toString(),"\n","	","file_dialog_start_handler assigned: ",("function"==typeof this.settings.file_dialog_start_handler).toString(),"\n","	","file_queued_handler assigned:       ",("function"==typeof this.settings.file_queued_handler).toString(),"\n","	","file_queue_error_handler assigned:  ",("function"==typeof this.settings.file_queue_error_handler).toString(),"\n","	","upload_resize_start_handler assigned:      ",("function"==typeof this.settings.upload_resize_start_handler).toString(),"\n","	","upload_start_handler assigned:      ",("function"==typeof this.settings.upload_start_handler).toString(),"\n","	","upload_progress_handler assigned:   ",("function"==typeof this.settings.upload_progress_handler).toString(),"\n","	","upload_error_handler assigned:      ",("function"==typeof this.settings.upload_error_handler).toString(),"\n","	","upload_success_handler assigned:    ",("function"==typeof this.settings.upload_success_handler).toString(),"\n","	","upload_complete_handler assigned:   ",("function"==typeof this.settings.upload_complete_handler).toString(),"\n","	","debug_handler assigned:             ",("function"==typeof this.settings.debug_handler).toString(),"\n","Support:\n","	","Load:                     ",this.support.loading?"Yes":"No","\n","	","Image Resize:             ",this.support.imageResize?"Yes":"No","\n"].join(""))},SWFUpload.prototype.addSetting=function(name,value,default_value){return void 0==value?this.settings[name]=default_value:this.settings[name]=value},SWFUpload.prototype.getSetting=function(name){return void 0!=this.settings[name]?this.settings[name]:""},SWFUpload.prototype.callFlash=function(functionName,argumentArray){var movieElement,returnValue,returnString;argumentArray=argumentArray||[],movieElement=this.getMovieElement();try{void 0!=movieElement?(returnString=movieElement.CallFunction('<invoke name="'+functionName+'" returntype="javascript">'+__flash__argumentsToXML(argumentArray,0)+"</invoke>"),returnValue=eval(returnString)):this.debug("Can't call flash because the movie wasn't found.")}catch(ex){this.debug("Exception calling flash function '"+functionName+"': "+ex.message)}return void 0!=returnValue&&"object"==typeof returnValue.post&&(returnValue=this.unescapeFilePostParams(returnValue)),returnValue},SWFUpload.prototype.selectFile=function(){this.callFlash("SelectFile")},SWFUpload.prototype.selectFiles=function(){this.callFlash("SelectFiles")},SWFUpload.prototype.startUpload=function(fileID){(this.settings.fileSelectAutoUpload||1==this.settings.allowUpload)&&this.callFlash("StartUpload",[fileID])},SWFUpload.prototype.startResizedUpload=function(fileID,width,height,encoding,quality,allowEnlarging){this.callFlash("StartUpload",[fileID,{width:width,height:height,encoding:encoding,quality:quality,allowEnlarging:allowEnlarging}])},SWFUpload.prototype.cancelUpload=function(fileID,triggerErrorEvent){triggerErrorEvent!==!1&&(triggerErrorEvent=!0),this.callFlash("CancelUpload",[fileID,triggerErrorEvent])},SWFUpload.prototype.stopUpload=function(){this.callFlash("StopUpload")},SWFUpload.prototype.requeueUpload=function(indexOrFileID){return this.callFlash("RequeueUpload",[indexOrFileID])},SWFUpload.prototype.getStats=function(){return this.callFlash("GetStats")},SWFUpload.prototype.setStats=function(statsObject){this.callFlash("SetStats",[statsObject])},SWFUpload.prototype.getFile=function(fileID){return"number"==typeof fileID?this.callFlash("GetFileByIndex",[fileID]):this.callFlash("GetFile",[fileID])},SWFUpload.prototype.getQueueFile=function(fileID){return"number"==typeof fileID?this.callFlash("GetFileByQueueIndex",[fileID]):this.callFlash("GetFile",[fileID])},SWFUpload.prototype.addFileParam=function(fileID,name,value){return this.callFlash("AddFileParam",[fileID,name,value])},SWFUpload.prototype.removeFileParam=function(fileID,name){this.callFlash("RemoveFileParam",[fileID,name])},SWFUpload.prototype.setUploadURL=function(url){this.settings.upload_url=url.toString(),this.callFlash("SetUploadURL",[url])},SWFUpload.prototype.setPostParams=function(paramsObject){this.settings.post_params=paramsObject,this.callFlash("SetPostParams",[paramsObject])},SWFUpload.prototype.addPostParam=function(name,value){this.settings.post_params[name]=value,this.callFlash("SetPostParams",[this.settings.post_params])},SWFUpload.prototype.removePostParam=function(name){delete this.settings.post_params[name],this.callFlash("SetPostParams",[this.settings.post_params])},SWFUpload.prototype.setFileTypes=function(types,description){this.settings.file_types=types,this.settings.file_types_description=description,this.callFlash("SetFileTypes",[types,description])},SWFUpload.prototype.setFileSizeLimit=function(fileSizeLimit){this.settings.file_size_limit=fileSizeLimit,this.callFlash("SetFileSizeLimit",[fileSizeLimit])},SWFUpload.prototype.setFileUploadLimit=function(fileUploadLimit){this.settings.file_upload_limit=fileUploadLimit,this.callFlash("SetFileUploadLimit",[fileUploadLimit])},SWFUpload.prototype.setFileQueueLimit=function(fileQueueLimit){this.settings.file_queue_limit=fileQueueLimit,this.callFlash("SetFileQueueLimit",[fileQueueLimit])},SWFUpload.prototype.setFilePostName=function(filePostName){this.settings.file_post_name=filePostName,this.callFlash("SetFilePostName",[filePostName])},SWFUpload.prototype.setUseQueryString=function(useQueryString){this.settings.use_query_string=useQueryString,this.callFlash("SetUseQueryString",[useQueryString])},SWFUpload.prototype.setRequeueOnError=function(requeueOnError){this.settings.requeue_on_error=requeueOnError,this.callFlash("SetRequeueOnError",[requeueOnError])},SWFUpload.prototype.setHTTPSuccess=function(http_status_codes){"string"==typeof http_status_codes&&(http_status_codes=http_status_codes.replace(" ","").split(",")),this.settings.http_success=http_status_codes,this.callFlash("SetHTTPSuccess",[http_status_codes])},SWFUpload.prototype.setAssumeSuccessTimeout=function(timeout_seconds){this.settings.assume_success_timeout=timeout_seconds,this.callFlash("SetAssumeSuccessTimeout",[timeout_seconds])},SWFUpload.prototype.setDebugEnabled=function(debugEnabled){this.settings.debug_enabled=debugEnabled,this.callFlash("SetDebugEnabled",[debugEnabled])},SWFUpload.prototype.setButtonImageURL=function(buttonImageURL){void 0==buttonImageURL&&(buttonImageURL=""),this.settings.button_image_url=buttonImageURL,this.callFlash("SetButtonImageURL",[buttonImageURL])},SWFUpload.prototype.setButtonDimensions=function(width,height){this.settings.button_width=width,this.settings.button_height=height;var movie=this.getMovieElement();void 0!=movie&&(movie.style.width=width+"px",movie.style.height=height+"px"),this.callFlash("SetButtonDimensions",[width,height])},SWFUpload.prototype.setButtonText=function(html){this.settings.button_text=html,this.callFlash("SetButtonText",[html])},SWFUpload.prototype.setButtonTextPadding=function(left,top){this.settings.button_text_top_padding=top,this.settings.button_text_left_padding=left,this.callFlash("SetButtonTextPadding",[left,top])},SWFUpload.prototype.setButtonTextStyle=function(css){this.settings.button_text_style=css,this.callFlash("SetButtonTextStyle",[css])},SWFUpload.prototype.setButtonDisabled=function(isDisabled){this.settings.button_disabled=isDisabled,this.callFlash("SetButtonDisabled",[isDisabled])},SWFUpload.prototype.setButtonAction=function(buttonAction){this.settings.button_action=buttonAction,this.callFlash("SetButtonAction",[buttonAction])},SWFUpload.prototype.setButtonCursor=function(cursor){this.settings.button_cursor=cursor,this.callFlash("SetButtonCursor",[cursor])},SWFUpload.prototype.queueEvent=function(handlerName,argumentArray){var self=this;if(void 0==argumentArray?argumentArray=[]:argumentArray instanceof Array||(argumentArray=[argumentArray]),"function"==typeof this.settings[handlerName])this.eventQueue.push(function(){this.settings[handlerName].apply(this,argumentArray)}),setTimeout(function(){self.executeNextEvent()},0);else if(null!==this.settings[handlerName])throw"Event handler "+handlerName+" is unknown or is not a function"},SWFUpload.prototype.executeNextEvent=function(){var f=this.eventQueue?this.eventQueue.shift():null;"function"==typeof f&&f.apply(this)},SWFUpload.prototype.unescapeFilePostParams=function(file){var uk,k,match,reg=/[$]([0-9a-f]{4})/i,unescapedPost={};if(void 0!=file){for(k in file.post)if(file.post.hasOwnProperty(k)){for(uk=k;null!==(match=reg.exec(uk));)uk=uk.replace(match[0],String.fromCharCode(parseInt("0x"+match[1],16)));unescapedPost[uk]=file.post[k]}file.post=unescapedPost}return file},SWFUpload.prototype.swfuploadPreload=function(){var returnValue;if("function"==typeof this.settings.swfupload_preload_handler)returnValue=this.settings.swfupload_preload_handler.call(this);else if(void 0!=this.settings.swfupload_preload_handler)throw"upload_start_handler must be a function";return void 0===returnValue&&(returnValue=!0),!!returnValue},SWFUpload.prototype.flashReady=function(){var movieElement=this.cleanUp();return movieElement?void this.queueEvent("swfupload_loaded_handler"):void this.debug("Flash called back ready but the flash movie can't be found.")},SWFUpload.prototype.cleanUp=function(){var key,movieElement=this.getMovieElement();try{if(movieElement&&"unknown"==typeof movieElement.CallFunction){this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");for(key in movieElement)try{"function"==typeof movieElement[key]&&(movieElement[key]=null)}catch(ex){}}}catch(ex1){}return window.__flash__removeCallback=function(instance,name){try{instance&&(instance[name]=null)}catch(flashEx){}},movieElement},SWFUpload.prototype.mouseClick=function(){this.queueEvent("mouse_click_handler")},SWFUpload.prototype.mouseOver=function(){this.queueEvent("mouse_over_handler")},SWFUpload.prototype.mouseOut=function(){this.queueEvent("mouse_out_handler")},SWFUpload.prototype.fileDialogStart=function(){this.queueEvent("file_dialog_start_handler")},SWFUpload.prototype.fileQueued=function(file){file=this.unescapeFilePostParams(file),this.queueEvent("file_queued_handler",file)},SWFUpload.prototype.fileQueueError=function(file,errorCode,message){file=this.unescapeFilePostParams(file),this.queueEvent("file_queue_error_handler",[file,errorCode,message])},SWFUpload.prototype.fileDialogComplete=function(numFilesSelected,numFilesQueued,numFilesInQueue){this.queueEvent("file_dialog_complete_handler",[numFilesSelected,numFilesQueued,numFilesInQueue])},SWFUpload.prototype.uploadResizeStart=function(file,resizeSettings){file=this.unescapeFilePostParams(file),this.queueEvent("upload_resize_start_handler",[file,resizeSettings.width,resizeSettings.height,resizeSettings.encoding,resizeSettings.quality])},SWFUpload.prototype.uploadStart=function(file){file=this.unescapeFilePostParams(file),this.queueEvent("return_upload_start_handler",file)},SWFUpload.prototype.returnUploadStart=function(file){var returnValue;if("function"==typeof this.settings.upload_start_handler)file=this.unescapeFilePostParams(file),returnValue=this.settings.upload_start_handler.call(this,file);else if(void 0!=this.settings.upload_start_handler)throw"upload_start_handler must be a function";void 0===returnValue&&(returnValue=!0),returnValue=!!returnValue,this.callFlash("ReturnUploadStart",[returnValue])},SWFUpload.prototype.uploadProgress=function(file,bytesComplete,bytesTotal){file=this.unescapeFilePostParams(file),this.queueEvent("upload_progress_handler",[file,bytesComplete,bytesTotal])},SWFUpload.prototype.uploadError=function(file,errorCode,message){file=this.unescapeFilePostParams(file),this.queueEvent("upload_error_handler",[file,errorCode,message])},SWFUpload.prototype.uploadSuccess=function(file,serverData,responseReceived){file=this.unescapeFilePostParams(file),this.queueEvent("upload_success_handler",[file,serverData,responseReceived])},SWFUpload.prototype.uploadComplete=function(file){file=this.unescapeFilePostParams(file),this.queueEvent("upload_complete_handler",file)},SWFUpload.prototype.debug=function(message){this.queueEvent("debug_handler",message)},SWFUpload.prototype.debugMessage=function(message){var exceptionMessage,exceptionValues,key;if(this.settings.debug)if(exceptionValues=[],"object"==typeof message&&"string"==typeof message.name&&"string"==typeof message.message){for(key in message)message.hasOwnProperty(key)&&exceptionValues.push(key+": "+message[key]);exceptionMessage=exceptionValues.join("\n")||"",exceptionValues=exceptionMessage.split("\n"),exceptionMessage="EXCEPTION: "+exceptionValues.join("\nEXCEPTION: "),SWFUpload.Console.writeLine(exceptionMessage)}else SWFUpload.Console.writeLine(message)},SWFUpload.Console={},SWFUpload.Console.writeLine=function(message){var console,documentForm;try{console=document.getElementById("SWFUpload_Console"),console||(documentForm=document.createElement("form"),document.getElementsByTagName("body")[0].appendChild(documentForm),console=document.createElement("textarea"),console.id="SWFUpload_Console",console.style.fontFamily="monospace",console.setAttribute("wrap","off"),console.wrap="off",console.style.overflow="auto",console.style.width="700px",console.style.height="350px",console.style.margin="5px",documentForm.appendChild(console)),console.value+=message+"\n",console.scrollTop=console.scrollHeight-console.clientHeight}catch(ex){alert("Exception: "+ex.name+" Message: "+ex.message)}},swfobject=function(){function f(){if(!J){try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=!0;for(var X=U.length,Y=0;X>Y;Y++)U[Y]()}}function K(X){J?X():U[U.length]=X}function s(Y){if(typeof O.addEventListener!=D)O.addEventListener("load",Y,!1);else if(typeof j.addEventListener!=D)j.addEventListener("load",Y,!1);else if(typeof O.attachEvent!=D)i(O,"onload",Y);else if("function"==typeof O.onload){var X=O.onload;O.onload=function(){X(),Y()}}else O.onload=Y}function h(){T?V():H()}function V(){var X=j.getElementsByTagName("body")[0],aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;!function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");ab&&(ab=ab.split(" ")[1].split(","),M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)])}else if(10>Y)return Y++,void setTimeout(arguments.callee,10);X.removeChild(aa),Z=null,H()}()}else H()}function H(){var ag=o.length;if(ag>0)for(var af=0;ag>af;af++){var Y=o[af].id,ab=o[af].callbackFn,aa={success:!1,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae)if(!F(o[af].swfVersion)||M.wk&&M.wk<312)if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall,ai.width=ae.getAttribute("width")||"0",ai.height=ae.getAttribute("height")||"0",ae.getAttribute("class")&&(ai.styleclass=ae.getAttribute("class")),ae.getAttribute("align")&&(ai.align=ae.getAttribute("align"));for(var ah={},X=ae.getElementsByTagName("param"),ac=X.length,ad=0;ac>ad;ad++)"movie"!=X[ad].getAttribute("name").toLowerCase()&&(ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value"));P(ai,ah,Y,ab)}else p(ae),ab&&ab(aa);else w(Y,!0),ab&&(aa.success=!0,aa.ref=z(Y),ab(aa))}else if(w(Y,!0),ab){var Z=z(Y);Z&&typeof Z.SetVariable!=D&&(aa.success=!0,aa.ref=Z),ab(aa)}}}function z(aa){var X=null,Y=c(aa);if(Y&&"OBJECT"==Y.nodeName)if(typeof Y.SetVariable!=D)X=Y;else{var Z=Y.getElementsByTagName(r)[0];Z&&(X=Z)}return X}function A(){return!a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=!0,E=Z||null,B={success:!1,id:X};var ae=c(X);if(ae){"OBJECT"==ae.nodeName?(l=g(ae),Q=null):(l=ae,Q=X),aa.id=R,(typeof aa.width==D||!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)&&(aa.width="310"),(typeof aa.height==D||!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)&&(aa.height="137"),j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D?ab.flashvars+="&"+ac:ab.flashvars=ac,M.ie&&M.win&&4!=ae.readyState){var Y=C("div");X+="SWFObjectNew",Y.setAttribute("id",X),ae.parentNode.insertBefore(Y,ae),ae.style.display="none",function(){4==ae.readyState?ae.parentNode.removeChild(ae):setTimeout(arguments.callee,10)}()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&4!=Y.readyState){var X=C("div");Y.parentNode.insertBefore(X,Y),X.parentNode.replaceChild(g(Y),X),Y.style.display="none",function(){4==Y.readyState?Y.parentNode.removeChild(Y):setTimeout(arguments.callee,10)}()}else Y.parentNode.replaceChild(g(Y),Y)}function g(ab){var aa=C("div");if(M.win&&M.ie)aa.innerHTML=ab.innerHTML;else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad)for(var X=ad.length,Z=0;X>Z;Z++)1==ad[Z].nodeType&&"PARAM"==ad[Z].nodeName||8==ad[Z].nodeType||aa.appendChild(ad[Z].cloneNode(!0))}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312)return X;if(aa)if(typeof ai.id==D&&(ai.id=Y),M.ie&&M.win){var ah="";for(var ae in ai)ai[ae]!=Object.prototype[ae]&&("data"==ae.toLowerCase()?ag.movie=ai[ae]:"styleclass"==ae.toLowerCase()?ah+=' class="'+ai[ae]+'"':"classid"!=ae.toLowerCase()&&(ah+=" "+ae+'="'+ai[ae]+'"'));var af="";for(var ad in ag)ag[ad]!=Object.prototype[ad]&&(af+='<param name="'+ad+'" value="'+ag[ad]+'" />');aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>",N[N.length]=ai.id,X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai)ai[ac]!=Object.prototype[ac]&&("styleclass"==ac.toLowerCase()?Z.setAttribute("class",ai[ac]):"classid"!=ac.toLowerCase()&&Z.setAttribute(ac,ai[ac]));for(var ab in ag)ag[ab]!=Object.prototype[ab]&&"movie"!=ab.toLowerCase()&&e(Z,ab,ag[ab]);aa.parentNode.replaceChild(Z,aa),X=Z}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X),aa.setAttribute("value",Y),Z.appendChild(aa)}function y(Y){var X=c(Y);X&&"OBJECT"==X.nodeName&&(M.ie&&M.win?(X.style.display="none",function(){4==X.readyState?b(Y):setTimeout(arguments.callee,10)}()):X.parentNode.removeChild(X))}function b(Z){var Y=c(Z);if(Y){for(var X in Y)"function"==typeof Y[X]&&(Y[X]=null);Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y),I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");return X[0]=parseInt(X[0],10),X[1]=parseInt(X[1],10)||0,X[2]=parseInt(X[2],10)||0,Y[0]>X[0]||Y[0]==X[0]&&Y[1]>X[1]||Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]}function v(ac,Y,ad,ab){if(!M.ie||!M.mac){var aa=j.getElementsByTagName("head")[0];if(aa){var X=ad&&"string"==typeof ad?ad:"screen";if(ab&&(n=null,G=null),!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css"),Z.setAttribute("media",X),n=aa.appendChild(Z),M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0&&(n=j.styleSheets[j.styleSheets.length-1]),G=X}M.ie&&M.win?n&&typeof n.addRule==r&&n.addRule(ac,Y):n&&typeof j.createTextNode!=D&&n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(m){var Y=X?"visible":"hidden";J&&c(Z)?c(Z).style.visibility=Y:v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/,X=null!=Z.exec(Y);return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var l,Q,E,B,n,G,D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=!1,U=[h],o=[],N=[],I=[],J=!1,a=!1,m=!0,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,X=!1,ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r)ab=t.plugins[S].description,!ab||typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin||(T=!0,X=!1,ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10),ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10),ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof O.ActiveXObject!=D)try{var ad=new ActiveXObject(W);ad&&(ab=ad.GetVariable("$version"),ab&&(X=!0,ab=ab.split(" ")[1].split(","),ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]))}catch(Z){}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}();(function(){M.w3&&((typeof j.readyState!=D&&"complete"==j.readyState||typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))&&f(),J||(typeof j.addEventListener!=D&&j.addEventListener("DOMContentLoaded",f,!1),M.ie&&M.win&&(j.attachEvent(x,function(){"complete"==j.readyState&&(j.detachEvent(x,arguments.callee),f())}),O==top&&!function(){if(!J){try{j.documentElement.doScroll("left")}catch(X){return void setTimeout(arguments.callee,0)}f()}}()),M.wk&&!function(){return J?void 0:/loaded|complete/.test(j.readyState)?void f():void setTimeout(arguments.callee,0)}(),s(f)))})(),function(){M.ie&&M.win&&window.attachEvent("onunload",function(){for(var ac=I.length,ab=0;ac>ab;ab++)I[ab][0].detachEvent(I[ab][1],I[ab][2]);for(var Z=N.length,aa=0;Z>aa;aa++)y(N[aa]);for(var Y in M)M[Y]=null;M=null;for(var X in swfobject)swfobject[X]=null;swfobject=null})}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab,Y.swfVersion=X,Y.expressInstall=aa,Y.callbackFn=Z,o[o.length]=Y,w(ab,!1)}else Z&&Z({success:!1,id:ab})},getObjectById:function(X){return M.w3?z(X):void 0},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:!1,id:ah};M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y?(w(ah,!1),K(function(){ae+="",ag+="";var aj={};if(af&&typeof af===r)for(var al in af)aj[al]=af[al];aj.data=ab,aj.width=ae,aj.height=ag;var am={};if(ad&&typeof ad===r)for(var ak in ad)am[ak]=ad[ak];if(Z&&typeof Z===r)for(var ai in Z)typeof am.flashvars!=D?am.flashvars+="&"+ai+"="+Z[ai]:am.flashvars=ai+"="+Z[ai];if(F(Y)){var an=u(aj,am,ah);aj.id==ah&&w(ah,!0),X.success=!0,X.ref=an}else{if(aa&&A())return aj.data=aa,void P(aj,am,ah,ac);w(ah,!0)}ac&&ac(X)})):ac&&ac(X)},switchOffAutoHideShow:function(){m=!1},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){return M.w3?u(Z,Y,X):void 0},showExpressInstall:function(Z,aa,X,Y){M.w3&&A()&&P(Z,aa,X,Y)},removeSWF:function(X){M.w3&&y(X)},createCSS:function(aa,Z,Y,X){M.w3&&v(aa,Z,Y,X)},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)&&(Z=Z.split("?")[1]),null==aa)return L(Z);for(var Y=Z.split("&"),X=0;X<Y.length;X++)if(Y[X].substring(0,Y[X].indexOf("="))==aa)return L(Y[X].substring(Y[X].indexOf("=")+1))}return""},expressInstallCallback:function(){if(a){var X=c(R);X&&l&&(X.parentNode.replaceChild(l,X),Q&&(w(Q,!0),M.ie&&M.win&&(l.style.display="block")),E&&E(B)),a=!1}}}}(),swfobject.addDomLoadEvent(function(){"function"==typeof SWFUpload.onload&&SWFUpload.onload.call(window)})}();var AXUpload5=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.uploadedList=[],this.uploadingObj=null,this.queue=[],this.queueLive=!1,this.isSingleUpload=!1,this.config.uploadFileName="fileData",this.config.file_types="*.*",this.config.fileSelectAutoUpload=!0,this.supportHtml5=!1,window.File&&window.FileReader&&window.FileList&&window.Blob&&(this.supportHtml5=!0),AXConfig.AXUpload5||(AXConfig.AXUpload5={buttonTxt:"Upload files"}),this.config.buttonTxt=AXConfig.AXUpload5.buttonTxt,this.fileKeys={_id_:"_id_",name:"name",type:"type",saveName:"saveName",fileSize:"fileSize",uploadedPath:"uploadedPath",thumbPath:"thumbPath"},this.config.flash_url="/_AXJ/lib/swfupload.swf",this.config.flash9_url="/_AXJ/lib/swfupload_fp9.swf",this.config.uploadPars={},this.config.deletePars={},this.config.queueBoxAppendType="append"},init:function(reset){var cfg=this.config;for(k in this.fileKeys)"undefined"!=typeof this.config.fileKeys&&"undefined"!=typeof this.config.fileKeys[k]||(this.config.fileKeys[k]=this.fileKeys[k]);if(void 0==reset){if(!this.supportHtml5)return cfg.onError&&cfg.onError("html5Support"),void this.swfinit(reset)}else if(!this.supportHtml5)return;var baseUrl=axdom("base").attr("href");axf.isEmpty(baseUrl)&&(baseUrl=""),"/"==cfg.uploadUrl.left(1)&&(cfg.uploadUrl=baseUrl+cfg.uploadUrl),"/"==cfg.deleteUrl.left(1)&&(cfg.deleteUrl=baseUrl+cfg.deleteUrl),cfg.dropBoxTarget&&(void 0===cfg.dropBoxTarget.id||""==cfg.dropBoxTarget.id?axdom(cfg.dropBoxTarget).attr("id",cfg.dropBoxTarget.id=cfg.dropBoxID="AXJUnique_dropBox_"+axf.getUniqueId()):axf.isEmpty(cfg.dropBoxID)&&(cfg.dropBoxID=cfg.dropBoxTarget.id)),cfg.queueBoxTarget&&(void 0===cfg.queueBoxTarget.id||""==cfg.queueBoxTarget.id?(axdom(cfg.queueBoxTarget).attr("id",cfg.queueBoxTarget.id=cfg.queueBoxID="AXJUnique_queueBox_"+axf.getUniqueId()),alert(cfg.queueBoxID)):axf.isEmpty(cfg.queueBoxID)&&(cfg.queueBoxID=cfg.queueBoxTarget.id)),this.target=axdom("#"+cfg.targetID),void 0==reset&&(this.target.empty(),this.uploadedList=[]);var inputFileMultiple='multiple="multiple"',inputFileAccept=cfg.file_types;cfg.isSingleUpload&&(inputFileMultiple=""),this.supportHtml5||(inputFileMultiple="");var po=[];po.push('<div style="position:relative;">'),po.push('   <div style="float:left;">'),po.push('	    <input type="file" id="'+cfg.targetID+'_AX_files" '+inputFileMultiple+' accept="'+inputFileAccept+'" style="position:absolute;left:0px;top:0px;margin:0px;padding:0px;-moz-opacity: 0.0;opacity:.00;filter: alpha(opacity=0);" />'),po.push('	    <button type="button" class="AXButton '+cfg.targetButtonClass+'" id="'+cfg.targetID+'_AX_selector"><span class="AXFileSelector">'+cfg.buttonTxt+"</span></button>"),po.push("   </div>"),cfg.isSingleUpload&&1!=cfg.fileDisplayHide&&(po.push('   <div style="float:left;">'),po.push('       <div class="AXFileDisplay" style="padding:3px; 5px;" id="'+cfg.targetID+'_AX_display">'+AXConfig.AXUpload5.uploadSelectTxt+"</div>"),po.push("   </div>")),po.push('   <div style="clear:both;"></div>'),po.push("</div>"),this.target.empty(),this.target.append(po.join("")),axdom("#"+cfg.targetID+"_AX_selectorTD").css({width:axdom("#"+cfg.targetID+"_AX_selector").outerWidth()+5}),axdom("#"+cfg.targetID+"_AX_files").css({width:axdom("#"+cfg.targetID+"_AX_selector").outerWidth(),height:axdom("#"+cfg.targetID+"_AX_selector").outerHeight()});var pauseQueue=this.pauseQueue.bind(this),_this=this;axdom("#"+cfg.targetID+"_AX_selector").click(function(event){return cfg.onbeforeFileSelect&&!cfg.onbeforeFileSelect.call({uploadedList:_this.uploadedList,uploadMaxFileSize:cfg.uploadMaxFileSize,uploadMaxFileCount:cfg.uploadMaxFileCount})?!1:!cfg.isSingleUpload&&0!=cfg.uploadMaxFileCount&&_this.uploadedList.length>=cfg.uploadMaxFileCount?(cfg.onError("fileCount"),!1):(pauseQueue(),void axdom("#"+cfg.targetID+"_AX_files").click())});var onFileSelect=this.onFileSelect.bind(this),fileSelector=document.getElementById(cfg.targetID+"_AX_files");if("ie"==axf.browser.name&&axf.browser.version<9||fileSelector.addEventListener("change",onFileSelect,!1),void 0==reset){if(cfg.dropBoxID&&this.supportHtml5){axdom("#"+cfg.dropBoxID).addClass("allowDrop").html('<div class="dropZoneBox" id="'+cfg.dropBoxID+'_dropZoneBox" style="border:3px dashed #d7d7d7;display:none;"></div>');var onFileDragOver=this.onFileDragOver.bind(this),onFileDrop=this.onFileDrop.bind(this),dragZone=document.getElementById(cfg.dropBoxID);dragZone.addEventListener("dragover",function(evt){onFileDragOver(evt)},!1);var dropZone=document.getElementById(cfg.dropBoxID+"_dropZoneBox");dropZone.addEventListener("drop",function(evt){return cfg.onbeforeFileSelect&&!cfg.onbeforeFileSelect.call({uploadedList:_this.uploadedList,uploadMaxFileSize:cfg.uploadMaxFileSize,uploadMaxFileCount:cfg.uploadMaxFileCount})?(evt.stopPropagation(),evt.preventDefault(),axdom("#"+cfg.dropBoxID).removeClass("onDrop"),axdom("#"+cfg.dropBoxID+"_dropZoneBox").hide(),!1):!cfg.isSingleUpload&&0!=cfg.uploadMaxFileCount&&_this.uploadedList.length>=cfg.uploadMaxFileCount?(evt.stopPropagation(),evt.preventDefault(),axdom("#"+cfg.dropBoxID).removeClass("onDrop"),axdom("#"+cfg.dropBoxID+"_dropZoneBox").hide(),cfg.onError("fileCount"),
  !1):void onFileDrop(evt)},!1)}cfg.queueBoxID&&(this.multiSelector=new AXMultiSelect,this.multiSelector.setConfig({selectStage:cfg.queueBoxID,selectClassName:"readyselect",beselectClassName:"beSelected",selectingClassName:"AX_selecting"}))}},swfinit:function(reset){var cfg=this.config;this.target=axdom("#"+cfg.targetID);var po=[];po.push('<div style="position:relative;">'),po.push('	<table style="table-layout:fixed;width:100%;"><tbody><tr><td id="'+cfg.targetID+'_AX_selectorTD">'),po.push('	<button type="button" class="AXButton '+cfg.targetButtonClass+'" id="'+cfg.targetID+'_AX_selector"><span class="AXFileSelector">'+cfg.buttonTxt+"</span></button>"),po.push('	<span id="spanButtonPlaceholder" class="AXUpload5flashUploadButton"></span>'),po.push("	</td>"),cfg.isSingleUpload&&(po.push("<td>"),po.push('<div class="AXFileDisplay" id="'+cfg.targetID+'_AX_display">'+AXConfig.AXUpload5.uploadSelectTxt+"</div>"),po.push("</td>")),po.push("	<tr></tbody></table>"),po.push("</div>"),this.target.empty(),this.target.append(po.join("")),axdom("#"+cfg.targetID+"_AX_selectorTD").css({width:axdom("#"+cfg.targetID+"_AX_selector").outerWidth()+5});var btnW=axdom("#"+cfg.targetID+"_AX_selector").outerWidth(),btnH=axdom("#"+cfg.targetID+"_AX_selector").outerHeight(),uploadSuccess=this.uploadSuccess.bind(this),onClickDeleteButton=this.onClickDeleteButton.bind(this),onClickFileTitle=this.onClickFileTitle.bind(this),file_dialog_complete_handler=function(numFilesSelected,numFilesQueued){numFilesSelected>0&&this.swfu.getStats().files_queued>0&&cfg.onStart&&cfg.onStart.call(this.queue),this.swfu.startUpload()},file_dialog_complete_handler_bind=file_dialog_complete_handler.bind(this),file_queued_handler=function(file){if(cfg.isSingleUpload){var myFile=this.uploadedList.first();if(myFile){confirm(AXConfig.AXUpload5.deleteConfirm)||this.cancelUpload();var uploadFn=function(){var itemID="AX_"+file[cfg.fileKeys._id_];this.queue.push({_id_:itemID,file:file}),axdom("#"+cfg.targetID+"_AX_display").empty(),axdom("#"+cfg.targetID+"_AX_display").append(this.getItemTag(itemID,file))};return void this.deleteFile(myFile,uploadFn.bind(this))}var itemID="AX_"+file[cfg.fileKeys._id_];this.queue.push({_id_:itemID,file:file}),axdom("#"+cfg.targetID+"_AX_display").empty(),axdom("#"+cfg.targetID+"_AX_display").append(this.getItemTag(itemID,file))}else{if(0!=cfg.uploadMaxFileCount&&this.uploadedList.length>=cfg.uploadMaxFileCount)return cfg.onError("fileCount"),void this.cancelUpload();var itemID="AX_"+file[cfg.fileKeys._id_];this.queue.push({_id_:itemID,file:file}),"prepend"==cfg.queueBoxAppendType?axdom("#"+cfg.queueBoxID).prepend(this.getItemTag(itemID,file)):axdom("#"+cfg.queueBoxID).append(this.getItemTag(itemID,file)),axdom("#"+cfg.queueBoxID).find("#"+itemID).fadeIn()}},file_queued_handler_bind=file_queued_handler.bind(this),file_queue_error_handler=function(file,errorCode,message){try{if(errorCode===SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED)return void alert("You have attempted to queue too many files.\n"+(0===message?"You have reached the upload limit.":"You may select "+(message>1?"up to "+message+" files.":"one file.")));switch(this.cancelUpload(),cfg.onComplete&&cfg.onComplete.call(this.uploadedList,this.uploadedList),errorCode){case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:this.showMSG("File is too big."),this.swfu.debug("Error Code: File too big, File name: "+file.name+", File size: "+file.size+", Message: "+message);break;case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:this.showMSG("Cannot upload Zero Byte files."),this.swfu.debug("Error Code: Zero byte file, File name: "+file.name+", File size: "+file.size+", Message: "+message);break;case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:this.showMSG("Invalid File Type."),this.swfu.debug("Error Code: Invalid File Type, File name: "+file.name+", File size: "+file.size+", Message: "+message);break;default:null!==file&&this.showMSG("Unhandled Error"),this.swfu.debug("Error Code: "+errorCode+", File name: "+file.name+", File size: "+file.size+", Message: "+message)}}catch(ex){this.debug(ex)}},file_queue_error_handler_bind=file_queue_error_handler.bind(this),upload_start_handler=function(){this.isSingleUpload||0!=cfg.uploadMaxFileCount&&cfg.uploadMaxFileCount<=this.uploadedList.length&&this.cancelUpload()},upload_start_handler_bind=upload_start_handler.bind(this),upload_progress_handler=function(file,bytesLoaded,bytesTotal){var itemID="AX_"+file[cfg.fileKeys._id_];cfg.isSingleUpload?axdom("#"+itemID).find(".AXUploadProcessBar").width((bytesLoaded/bytesTotal*100).round(2)+"%"):axdom("#"+cfg.queueBoxID).find("#"+itemID+" .AXUploadProcessBar").width((bytesLoaded/bytesTotal*100).round(2)+"%")},upload_progress_handler_bind=upload_progress_handler.bind(this),upload_error_handler=function(file,errorCode,message){cfg.onError&&(errorCode==SWFUpload.UPLOAD_ERROR.HTTP_ERROR&&413==message&&(errorCode="fileSize"),cfg.onError(errorCode,file))},upload_error_handler_bind=upload_error_handler.bind(this),upload_success_handler=function(file,res){var itemID="AX_"+file[cfg.fileKeys._id_];try{"string"==typeof res&&(res=res.object())}catch(e){trace(e)}cfg.isSingleUpload?(axdom("#"+itemID+" .AXUploadBtns").show(),axdom("#"+itemID+" .AXUploadLabel").show(),axdom("#"+itemID+" .AXUploadTit").show(),axdom("#"+itemID+" .AXUploadProcess").hide(),uploadSuccess(file,itemID,res),axdom("#"+itemID+" .AXUploadBtnsA").bind("click",function(){onClickDeleteButton(itemID)}),cfg.onClickUploadedItem&&axdom("#"+itemID+" .AXUploadDownload").bind("click",function(){onClickFileTitle(itemID)})):(axdom("#"+cfg.queueBoxID).find("#"+itemID+" .AXUploadBtns").show(),axdom("#"+cfg.queueBoxID).find("#"+itemID+" .AXUploadLabel").show(),axdom("#"+cfg.queueBoxID).find("#"+itemID+" .AXUploadProcess").hide(),res[cfg.fileKeys.thumbPath]?axdom("#"+cfg.queueBoxID).find("#"+itemID+" .AXUploadIcon").css({"background-image":"url('"+(res[cfg.fileKeys.thumbPath]||"").dec()+"')"}).addClass("AXUploadPreview").find("img.preview").remove():(axdom("#"+cfg.queueBoxID).find("#"+itemID+" .AXUploadIcon").css({"background-image":"url()"}),axdom("#"+cfg.queueBoxID).find("#"+itemID+" .AXUploadIcon").html((res[cfg.fileKeys.type]||"").dec().replace(".",""))),uploadSuccess(file,itemID,res),axdom("#"+cfg.queueBoxID).find("#"+itemID+" .AXUploadBtnsA").bind("click",function(){onClickDeleteButton(itemID)}),cfg.onClickUploadedItem&&axdom("#"+cfg.queueBoxID).find("#"+itemID+" .AXUploadDownload").bind("click",function(){onClickFileTitle(itemID)}));var updateQueue=[];axdom.each(this.queue,function(){this.id!=itemID&&updateQueue.push(this)}),this.queue=updateQueue},upload_success_handler_bind=upload_success_handler.bind(this),upload_complete_handler=function(){this.isSingleUpload?this.uploadComplete():0===this.swfu.getStats().files_queued?(this.uploadComplete(),this.swfu.settings.allowUpload=!1):this.swfu.startUpload()},upload_complete_handler_bind=upload_complete_handler.bind(this),queue_complete_handler=function(){},queue_complete_handler_bind=queue_complete_handler.bind(this),settings={flash_url:cfg.flash_url,flash9_url:cfg.flash9_url,upload_url:cfg.uploadUrl,file_post_name:cfg.uploadFileName,post_params:cfg.uploadPars,file_size_limit:cfg.uploadMaxFileSize,fileSelectAutoUpload:cfg.fileSelectAutoUpload,file_types:cfg.flash_file_types||"*.*",file_types_description:cfg.flash_file_types_description||"all",file_upload_limit:0,file_queue_limit:0,debug:!1,button_image_url:"null",button_placeholder_id:"spanButtonPlaceholder",button_width:btnW,button_height:btnH,swfupload_preload_handler:function(){},swfupload_load_failed_handler:function(){},swfupload_loaded_handler:function(){},file_queued_handler:file_queued_handler_bind,file_queue_error_handler:file_queue_error_handler_bind,file_dialog_complete_handler:file_dialog_complete_handler_bind,upload_start_handler:upload_start_handler_bind,upload_progress_handler:upload_progress_handler_bind,upload_error_handler:upload_error_handler_bind,upload_success_handler:upload_success_handler_bind,upload_complete_handler:upload_complete_handler_bind,queue_complete_handler:queue_complete_handler_bind};this.swfu=new SWFUpload(settings),cfg.queueBoxID&&(this.multiSelector=new AXMultiSelect,this.multiSelector.setConfig({selectStage:cfg.queueBoxID,selectClassName:"readyselect",beselectClassName:"beSelected"}))},getItemTag:function(itemID,f){var cfg=this.config,po=[];if(cfg.isSingleUpload)po.push('<div class="AXUploadItem '+(cfg.openMode||"")+'" id="'+itemID+'">'),po.push('	<div class="AXUploadBtns" style="display:none;">'),po.push('		<a href="#AXExecption" class="AXUploadBtnsA" id="'+itemID+'_AXUploadBtns_deleteFile">del</a>'),po.push("	</div>"),po.push('	<div class="AXUploadLabel '+(cfg.openMode||"")+'" style="display:none;">'),"view"!=cfg.openMode&&po.push('		<a href="#AXExecption" id="'+itemID+'_AXUploadLabel_download" class="AXUploadDownload">download</a>'),po.push("	</div>"),po.push('	<div class="AXUploadProcess">'),po.push('		<div class="AXUploadProcessBar"></div>'),po.push("	</div>"),po.push('	<div class="AXUploadTit" title="'+f.name.dec()+'" style="display:none;">'+f.name.dec()+"</div>"),po.push("</div>");else{if(po.push('<div class="AXUploadItem '+cfg.openMode+'" id="'+itemID+'" style="display:none;">'),po.push('	<div class="AXUploadIcon">'),po.push('		<img id="'+itemID+'_preview" class="preview" src="" />'),po.push("	</div>"),po.push('	<div class="AXUploadType"><span class="AXUploadSize">'+f.size.number()["byte"]()+"</span></div>"),"view"==cfg.openMode?(po.push('    <a href="#AXExecption" id="'+itemID+'_AXUploadLabel_download" class="AXUploadDownload">'),po.push('    <div class="AXUploadTit" title="'+f.name.dec()+'">'+f.name.dec()),po.push("    </div>"),po.push("    </a>")):po.push('	<div class="AXUploadTit" title="'+f.name.dec()+'">'+f.name.dec()+"</div>"),po.push('	<div class="AXUploadProcess">'),po.push('		<div class="AXUploadProcessBar"></div>'),po.push("	</div>"),po.push('	<div class="AXUploadBtns" style="display:none;">'),"view"!=cfg.openMode&&po.push('		<a href="#AXExecption" class="AXUploadBtnsA" id="'+itemID+'_AXUploadBtns_deleteFile">del</a>'),po.push("	</div>"),po.push('	<div class="AXUploadLabel '+cfg.openMode+'" style="display:none;">'),cfg.formatter){var uf={};uf.id=itemID,uf.name=f.name,uf.type=f.type,uf.size=f.size;var returnStr=cfg.formatter.call(uf,uf);returnStr&&po.push(returnStr)}po.push('		<a href="#AXExecption" id="'+itemID+'_AXUploadLabel_download" class="AXUploadDownload">download</a>'),po.push("	</div>")}return po.join("")},onFileSelect:function(evt){var cfg=this.config,_this=this;if(this.supportHtml5){var files=evt.target.files;if(files&&files.length>0)if(cfg.isSingleUpload){var myFile=this.uploadedList.first();if(myFile){if(this.__tempFiles=files[0],!confirm(AXConfig.AXUpload5.deleteConfirm))return;var uploadFn=function(){var itemID="AX"+AXUtil.timekey()+"_AX_0";this.queue.push({_id_:itemID,file:_this.__tempFiles}),axdom("#"+cfg.targetID+"_AX_display").empty(),axdom("#"+cfg.targetID+"_AX_display").append(_this.getItemTag(itemID,_this.__tempFiles)),_this.queueLive=!0,cfg.onStart&&cfg.onStart.call(_this.queue,_this.queue),_this.uploadQueue(),itemID=null,_this.__tempFiles=null};return void this.deleteFile(myFile,uploadFn.bind(this))}var i=0,f=files[i],itemID="AX"+AXUtil.timekey()+"_AX_"+i;this.queue.push({_id_:itemID,file:f}),axdom("#"+cfg.targetID+"_AX_display").empty(),axdom("#"+cfg.targetID+"_AX_display").append(this.getItemTag(itemID,f))}else{var sizeOverFile,hasSizeOverFile=!1;cfg.file_types||(cfg.file_types="."),"*.*"==cfg.file_types&&(cfg.file_types="*/*");for(var i=0;i<files.length;i++){var f=files[i];if(f.size>cfg.uploadMaxFileSize){hasSizeOverFile=!0,sizeOverFile=f;break}}hasSizeOverFile&&cfg.onError("fileSize",{name:sizeOverFile.name,size:sizeOverFile.size});for(var uploadedCount=this.uploadedList.length,queueCount=this.queue.length,i=0;i<files.length;i++){var f=files[i];if(f.size<=cfg.uploadMaxFileSize&&(new RegExp(cfg.file_types.replace(/\*/g,"[a-z]"),"ig").test(f.type.toString())||"*/*"==cfg.file_types&&""==f.type)){if(!(uploadedCount+queueCount<cfg.uploadMaxFileCount||0==cfg.uploadMaxFileCount)){cfg.onError("fileCount");break}var itemID="AX"+AXUtil.timekey()+"_AX_"+i;this.queue.push({_id_:itemID,file:f}),"prepend"==cfg.queueBoxAppendType?axdom("#"+cfg.queueBoxID).prepend(this.getItemTag(itemID,f)):axdom("#"+cfg.queueBoxID).append(this.getItemTag(itemID,f)),this.setLocalPreview(itemID,f),axdom("#"+cfg.queueBoxID).find("#"+itemID).fadeIn(),uploadedCount++}}}}else alert("not support HTML5");this.queueLive=!0,cfg.onStart&&cfg.onStart.call(this.queue,this.queue),this.uploadQueue()},onFileDragOver:function(evt){var cfg=this.config;axdom("#"+cfg.dropBoxID).addClass("onDrop"),axdom("#"+cfg.dropBoxID+"_dropZoneBox").show(),axdom("#"+cfg.dropBoxID+"_dropZoneBox").css({height:axdom("#"+cfg.dropBoxID).prop("scrollHeight")-6,width:axdom("#"+cfg.dropBoxID).innerWidth()-6});var dropZone=document.getElementById(cfg.dropBoxID+"_dropZoneBox");dropZone.addEventListener("dragleave",function(evt){axdom("#"+cfg.dropBoxID).removeClass("onDrop"),axdom("#"+cfg.dropBoxID+"_dropZoneBox").hide()},!1),evt.stopPropagation(),evt.preventDefault(),evt.dataTransfer.dropEffect="copy"},onFileDrop:function(evt){var cfg=this.config,quebox=axdom("#"+cfg.queueBoxID);evt.stopPropagation(),evt.preventDefault(),axdom("#"+cfg.dropBoxID).removeClass("onDrop"),axdom("#"+cfg.dropBoxID+"_dropZoneBox").hide();for(var sizeOverFile,f,files=evt.dataTransfer.files,hasSizeOverFile=!1,i=0;f=files[i];i++)if(f.size>cfg.uploadMaxFileSize){hasSizeOverFile=!0,sizeOverFile=f;break}hasSizeOverFile&&cfg.onError("fileSize",{name:sizeOverFile.name,size:sizeOverFile.size}),cfg.file_types||(cfg.file_types="."),"*.*"==cfg.file_types&&(cfg.file_types="*/*");for(var f,uploadedCount=(new RegExp(cfg.file_types.replace(/\*/g,"[a-z]"),"ig"),this.uploadedList.length),queueCount=this.queue.length,i=0;f=files[i];i++)if(f.size<=cfg.uploadMaxFileSize&&(new RegExp(cfg.file_types.replace(/\*/g,"[a-z]"),"ig").test(f.type.toString())||"*/*"==cfg.file_types&&""==f.type)){if(!(uploadedCount+queueCount<cfg.uploadMaxFileCount||0==cfg.uploadMaxFileCount)){cfg.onError("fileCount");break}uploadedCount++;var itemID="AX"+AXUtil.timekey()+"_AX_"+i;this.queue.push({_id_:itemID,file:f}),"prepend"==cfg.queueBoxAppendType?quebox.prepend(this.getItemTag(itemID,f)):quebox.append(this.getItemTag(itemID,f)),this.setLocalPreview(itemID,f),quebox.find("#"+itemID).fadeIn()}this.queueLive=!0,cfg.onStart&&cfg.onStart.call(this.queue),this.uploadQueue()},pauseQueue:function(){this.queueLive=!1},uploadQueue:function(fileUpload){var cfg=this.config;if((0!=cfg.fileSelectAutoUpload||void 0!=fileUpload)&&(0==cfg.fileSelectAutoUpload&&void 0!=fileUpload&&this.swfu&&(this.swfu.settings.allowUpload=!0,this.swfu.startUpload()),this.queueLive)){if(0==this.queue.length)return void this.uploadComplete();var uploadQueue=this.uploadQueue.bind(this),cancelUpload=this.cancelUpload.bind(this),uploadSuccess=this.uploadSuccess.bind(this),onClickDeleteButton=this.onClickDeleteButton.bind(this),onClickFileTitle=this.onClickFileTitle.bind(this),obj=this.queue.shift();this.uploadingObj=obj;var formData=new FormData;axdom.each(cfg.uploadPars,function(k,v){formData.append(k,v)}),formData.append(cfg.uploadFileName,obj.file);var itemID=obj._id_,itembox=(axdom("#"+cfg.queueBoxID),axdom("#"+itemID));this.xhr=new XMLHttpRequest,this.xhr.open("POST",cfg.uploadUrl,!0),this.xhr.onload=function(e){var res=e.target.response;try{"string"==typeof res&&(res=res.object())}catch(e){return trace(e),void cancelUpload()}if("err"==res.result||res.error)return alert("파일전송에 실패 하였습니다. 서버에서 에러가 리턴되었습니다. 콘솔창을 확인 하세요."),trace(res),axdom("#"+itemID).fadeOut("slow"),void cancelUpload();if(cfg.isSingleUpload)itembox.find(".AXUploadBtns").show(),itembox.find(".AXUploadLabel").show(),itembox.find(".AXUploadTit").show(),itembox.find(".AXUploadProcess").hide(),uploadSuccess(obj.file,itemID,res),itembox.find(".AXUploadBtnsA").bind("click",function(){onClickDeleteButton(itemID)}),cfg.onClickUploadedItem&&itembox.find(".AXUploadDownload").bind("click",function(){onClickFileTitle(itemID)});else{itembox.find(".AXUploadBtns").show(),itembox.find(".AXUploadLabel").show(),itembox.find(".AXUploadProcess").hide();var _res=Object.isArray(res)?res[0]:res;_res[cfg.fileKeys.thumbPath]?itembox.find(".AXUploadIcon").css({"background-image":"url('"+(_res[cfg.fileKeys.thumbPath]||"").dec()+"')"}).addClass("AXUploadPreview").find("img.preview").remove():(itembox.find(".AXUploadIcon").css({"background-image":"url()"}),itembox.find(".AXUploadIcon").html((_res[cfg.fileKeys.type]||"").dec().replace(".",""))),uploadSuccess(obj.file,itemID,_res),itembox.find(".AXUploadBtnsA").bind("click",function(){onClickDeleteButton(itemID)}),cfg.onClickUploadedItem&&itembox.find(".AXUploadDownload").bind("click",function(){onClickFileTitle(itemID)})}uploadQueue(fileUpload)};var setUploadingObj=function(){this.uploadingObj=null},setUploadingObjBind=setUploadingObj.bind(this);this.xhr.upload.onprogress=function(e){cfg.isSingleUpload?e.lengthComputable&&itembox.find(".AXUploadProcessBar").width((e.loaded/e.total*100).round(2)+"%"):e.lengthComputable&&itembox.find(".AXUploadProcessBar").width((e.loaded/e.total*100).round(2)+"%"),e.lengthComputable&&e.loaded>.9*e.total&&setUploadingObjBind()},this.xhr.send(formData)}},uploadSuccess:function(file,itemID,res){var cfg=this.config,uploadedItem={};uploadedItem[cfg.fileKeys._id_]=itemID;var _res=Object.isArray(res)?res[0]:res;axdom.each(_res,function(k,v){uploadedItem[k]=v}),"prepend"==cfg.queueBoxAppendType?this.uploadedList.splice(0,0,uploadedItem):this.uploadedList.push(uploadedItem),axdom("#"+itemID).addClass("readyselect"),cfg.onUpload&&cfg.onUpload.call(uploadedItem,uploadedItem)},clearQueue:function(){axdom.each(this.queue,function(){axdom("#"+this.id).hide(function(){axdom(this).remove()})}),this.queue=[]},uploadComplete:function(){var cfg=this.config;AXgetId(cfg.targetID+"_AX_files")&&(document.getElementById(cfg.targetID+"_AX_files").value=""),cfg.queueBoxID&&this.multiSelector.collect(),cfg.onComplete&&cfg.onComplete.call(this.uploadedList,this.uploadedList)},cancelUpload:function(){var cfg=this.config;if(this.swfu){this.swfu.stopUpload();for(var stats=this.swfu.getStats();stats.files_queued>0;)this.swfu.cancelUpload(),stats=this.swfu.getStats();stats=null,this.pauseQueue(),this.clearQueue()}else this.uploadingObj&&(this.xhr.abort(),axdom("#"+this.uploadingObj.id).remove(),this.uploadingObj=null),this.pauseQueue(),this.clearQueue();cfg.onComplete&&cfg.onComplete.call(this.uploadedList,this.uploadedList)},onClickDeleteButton:function(itemID){var cfg=this.config;if(cfg.isSingleUpload){var myFile;axdom.each(this.uploadedList,function(){return this[cfg.fileKeys._id_]==itemID?(myFile=this,!1):void 0}),myFile&&0!=this.deleteFile(myFile)&&this.init("reset"),myFile=null}else{var myFile;axdom.each(this.uploadedList,function(){return this[cfg.fileKeys._id_]==itemID?(myFile=this,!1):void 0}),myFile&&(this.deleteFile(myFile),cfg.queueBoxID&&this.multiSelector.clearSelects()),myFile=null}},onClickFileTitle:function(itemID){var cfg=this.config;if(cfg.onClickUploadedItem){var myFile;axdom.each(this.uploadedList,function(){return this[cfg.fileKeys._id_]==itemID?(myFile=this,!1):void 0}),cfg.onClickUploadedItem.call(myFile,myFile)}},deleteFile:function(file,onEnd,withOutServer){var cfg=this.config;if(!onEnd&&!confirm(AXConfig.AXUpload5.deleteConfirm))return!1;var removeUploadedList=this.removeUploadedList.bind(this);if(void 0!=file){if("withOutServer"==withOutServer)return cfg.isSingleUpload?axdom("#"+cfg.targetID+"_AX_display").html(AXConfig.AXUpload5.uploadSelectTxt):axdom("#"+file[cfg.fileKeys._id_]).hide(function(){axdom(this).remove()}),removeUploadedList(file[cfg.fileKeys._id_]),cfg.onDelete&&cfg.onDelete.call({file:file,response:withOutServer},file),void(onEnd&&onEnd());var pars=[],sendPars="";axdom.each(file,function(k,v){"downloadPath"!=k&&pars.push(k+"="+v)}),"object"==typeof cfg.deletePars?(axdom.each(cfg.deletePars,function(k,v){pars.push(k+"="+v)}),sendPars=pars.join("&")):sendPars=pars.join("&")+"&"+cfg.deletePars,cfg.isSingleUpload?axdom("#"+file[cfg.fileKeys._id_]+" .AXUploadBtns").hide():axdom("#"+cfg.queueBoxID).find("#"+file[cfg.fileKeys._id_]+" .AXUploadBtns").hide(),new AXReq(cfg.deleteUrl,{method:cfg.deleteMethod||"POST",debug:!1,pars:sendPars,onsucc:function(res){res.result&&res.result==AXConfig.AXReq.okCode||void 0==res.result&&!res.error?(onEnd&&setTimeout(onEnd,1),cfg.isSingleUpload?axdom("#"+cfg.targetID+"_AX_display").html(AXConfig.AXUpload5.uploadSelectTxt):axdom("#"+file[cfg.fileKeys._id_]).hide(function(){axdom(this).remove()}),cfg.onDelete&&cfg.onDelete.call({file:file,response:res},file),removeUploadedList(file[cfg.fileKeys._id_])):cfg.isSingleUpload?axdom("#"+file[cfg.fileKeys._id_]+" .AXUploadBtns").show():axdom("#"+cfg.queueBoxID).find("#"+file[cfg.fileKeys._id_]+" .AXUploadBtns").show()},onerr:function(){cfg.isSingleUpload?axdom("#"+file[cfg.fileKeys._id_]+" .AXUploadBtns").show():axdom("#"+cfg.queueBoxID).find("#"+file[cfg.fileKeys._id_]+" .AXUploadBtns").show()}})}else trace("file undefined")},deleteSelect:function(arg,withOutServer){var cfg=this.config;if("all"==arg){var deleteQueue=[];axdom.each(this.uploadedList,function(){deleteQueue.push(this[cfg.fileKeys._id_])}),this.ccDelete(deleteQueue,0,withOutServer),deleteQueue=null}else{if(!this.multiSelector)return;var selectObj=this.multiSelector.getSelects();if(selectObj.length>0){var deleteQueue=[];axdom.each(selectObj,function(){deleteQueue.push(this.id)}),this.ccDelete(deleteQueue,0,withOutServer),deleteQueue=null}else alert("삭제하실 파일을 선택해 주세요")}},ccDelete:function(deleteQueue,index,withOutServer){var cfg=this.config;if(deleteQueue.length>index){var myFile;axdom.each(this.uploadedList,function(){return this[cfg.fileKeys._id_]==deleteQueue[index]?(myFile=this,!1):void 0});var ccDelete=this.ccDelete.bind(this);this.deleteFile(myFile,function(){ccDelete(deleteQueue,index+1,withOutServer)},withOutServer)}},removeUploadedList:function(fid){var cfg=this.config,newUploadedList=[];axdom.each(this.uploadedList,function(){this[cfg.fileKeys._id_]!=fid&&newUploadedList.push(this)}),this.uploadedList=newUploadedList,newUploadedList=null,this.config.onDeleteAll&&this.uploadedList.length<1&&this.config.onDeleteAll.call(),this.multiSelector.collect()},showMSG:function(msg){dialog.push(msg)},setUploadedList:function(files){var cfg=this.config,getItemTag=this.getItemTag.bind(this),onClickDeleteButton=this.onClickDeleteButton.bind(this),onClickFileTitle=this.onClickFileTitle.bind(this);if(cfg.isSingleUpload){this.uploadedList=[];var f;if(axdom.isArray(files)?Object.isObject(files[0])&&(f=files[0]):Object.isObject(files)&&(f=files),!f)return;if(!f[cfg.fileKeys._id_]){if(!f.id)return;f[cfg.fileKeys._id_]=f.id}this.uploadedList.push(f);var itembox,itemID=f[cfg.fileKeys._id_]||f.id,uf={id:itemID,name:f[cfg.fileKeys.name],size:f[cfg.fileKeys.fileSize]};itembox=axdom("#"+cfg.targetID+"_AX_display"),"prepend"==cfg.queueBoxAppendType?itembox.empty().prepend(this.getItemTag(itemID,uf)):itembox.empty().append(this.getItemTag(itemID,uf)),itembox.find(".AXUploadBtns").show(),itembox.find(".AXUploadLabel").show(),itembox.find(".AXUploadTit").show(),itembox.find(".AXUploadProcess").hide(),itembox.find(".AXUploadBtnsA").bind("click",function(){onClickDeleteButton(itemID)}),cfg.onClickUploadedItem&&itembox.find(".AXUploadDownload").bind("click",function(){onClickFileTitle(itemID)})}else{this.uploadedList=[];var uploadedList=[];if(axf.each(files,function(){this&&uploadedList.push(this)}),this.uploadedList=uploadedList,cfg.queueBoxID){var quebox=axdom("#"+cfg.queueBoxID);quebox.find(".dropZoneBox").empty(),quebox.remove(".AXUploadItem"),axdom.each(this.uploadedList,function(fidx,f){if(void 0==f[cfg.fileKeys._id_]){if(!f.id)return trace([cfg.fileKeys._id_]+" key는 필수 항목 입니다."),!1;f[cfg.fileKeys._id_]=f.id}var itembox,itemID=f[cfg.fileKeys._id_],uf={id:itemID,name:f[cfg.fileKeys.name],size:f[cfg.fileKeys.fileSize]};"prepend"==cfg.queueBoxAppendType?quebox.prepend(getItemTag(itemID,uf)):quebox.append(getItemTag(itemID,uf)),itembox=axdom("#"+itemID),itembox.fadeIn(),itembox.find(".AXUploadBtns").show(),itembox.find(".AXUploadLabel").show(),itembox.find(".AXUploadProcess").hide(),f[cfg.fileKeys.thumbPath]?itembox.find(".AXUploadIcon").css({"background-image":"url('"+(f[cfg.fileKeys.thumbPath]||"").dec()+"')"}).addClass("AXUploadPreview").find("img.preview").remove():(itembox.find(".AXUploadIcon").css({"background-image":"none"}),itembox.find(".AXUploadIcon").html((f[cfg.fileKeys.type]||"").dec().replace(".",""))),itembox.find(".AXUploadBtnsA").bind("click",function(){onClickDeleteButton(itemID)}),cfg.onClickUploadedItem&&itembox.find(".AXUploadDownload").bind("click",function(){onClickFileTitle(itemID)}),f.mainImage&&$("#"+f.id+"_AXUploadLabel_mainImageFile").show(),itembox.addClass("readyselect")}),this.multiSelector.collect()}}},getUploadedList:function(arg){var cfg=this.config;if(cfg.uploadedListSort&&(this.uploadedList=cfg.uploadedListSort.call(this,this.uploadedList)),"param"!=arg)return this.uploadedList;try{var pars=[];return this.uploadedList&&axdom.each(this.uploadedList,function(){""!=this&&pars.push(axdom.param(this))}),pars.join("&")}catch(e){trace(e)}},getSelectUploadedList:function(arg){if(this.multiSelector){var selectObj=this.multiSelector.getSelects();if("param"==arg){var pars=[];return axdom.each(this.uploadedList,function(){for(var a=0;a<selectObj.length;a++)this.id==selectObj[a].id&&pars.push(axdom.param(this))}),pars.join("&")}var pars=[];return axdom.each(this.uploadedList,function(){for(var a=0;a<selectObj.length;a++)this.id==selectObj[a].id&&pars.push(this)}),pars}},setUploadedFile:function(file){if(file&&file[this.config.fileKeys.id]){this.uploadedList=[],this.uploadedList.push(file),fileNameMaxLen=this.settings.fileNameMaxLen;var po=[],UploadDisplay_id=(this.settings.dfileicon,this.settings.UploadDisplay_id),onClickButton=this.onClickButton.bind(this),AXfile=this.uploadedList.first(),po=[];if(po.push("<div class='AXFileTitleBlock'>"),po.push("<a href='#AXexec' class='AXFileTitle'>"+AXfile.ti.dec()+"</a>"),po.push("<a href='#AXexec' class='AXFileDelete'>X</a>"),po.push("</div>"),axdom("#"+UploadDisplay_id).html(po.join("")),axdom("#"+UploadDisplay_id).find(".AXFileDelete").bind("click",onClickButton),this.settings.onclick){var onclick=this.settings.onclick.bind(this);axdom("#"+UploadDisplay_id).find(".AXFileTitle").bind("click",function(){onclick(AXfile)})}po=null,fileNameMaxLen=null}},getUploadedFile:function(){return this.uploadedList.first()},addKeyInUploadedListItem:function(objID,obj){var uploadedList=this.uploadedList;axdom.each(uploadedList,function(idx,o){o.id==objID?axdom.each(obj,function(k,v){o[k]=v}):axdom.each(obj,function(k,v){o[k]=""})})},setLocalPreview:function(itemID,file){if(this.supportHtml5&&!this.config.isSingleUpload&&this.supportHtml5&&!this.config.isSingleUpload)try{var previewId=itemID+"_preview",preview=axf.getId(previewId),reader=new FileReader(previewId);reader.onloadend=function(){try{preview.src=reader.result}catch(ex){trace(ex)}},file&&reader.readAsDataURL(file)}catch(e){trace(e)}},nothing:function(){}}),AXUserSelect=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.config.className="",this.ds=[]},init:function(){var config=this.config;if(this.myDrag=new AXDrag,!config.containerID||!jQuery("#"+config.containerID).get(0))return void alert("컨테이너 아이디가 지정되지 않아 modsTab 초기화에 실패 하였습니다.");this.CT=jQuery("#"+config.containerID);var po=[];po.push('<div class="'+config.className+' readyDrop" id="'+config.containerID+"_AX_UserSelectBox\" style='height:100%;'>"),po.push("</div>"),this.CT.html(po.join(""));var onSort=this.onSort.bind(this),onDrop=this.onDrop.bind(this);this.myDrag.setConfig({dragStage:config.containerID+"_AX_UserSelectBox",dragBoxClassName:"modsDragBox",bedragClassName:"bedraged",bedropClassName:"bedroped",dragClassName:"readyDrag",dropClassName:"readyDrop",onDrop:onDrop,onSort:onSort,multiSelector:{selectStage:config.containerID+"_AX_UserSelectBox",selectClassName:"readyDrag",beselectClassName:"beSelected"},sort:{sorter:'<div class="modsSortGhost"></div>'}}),this.myDrag.active()},push:function(ds){var config=this.config,myds=this.ds,po=[];jQuery.each(ds,function(i,D){var addOk=1;jQuery.each(myds,function(){return this.id==D.id?(addOk=0,!1):void 0}),1==addOk&&(po.push('<div class="readyDrag" id="'+config.containerID+"userSelectItem_AX_"+this.id+'">'),po.push('	<div class="userSelectItemBody">'),po.push('	<input type="hidden" name="id" id="'+config.containerID+"userSelectItemID_AX_"+this.id+'" value="'+this.id+'" /> '),po.push('	<input type="hidden" name="nm" id="'+config.containerID+"userSelectItemNM_AX_"+this.id+'" value="'+this.nm+'" /> '),po.push('	<input type="hidden" name="desc" id="'+config.containerID+"userSelectItemDESC_AX_"+this.id+'" value="'+(this.desc||"")+'" /> '),po.push("	"+this.nm.dec()+" "),po.push("	"+(this.desc||"").dec()+" "),po.push("	</div>"),po.push("</div>"),myds.push(this))}),jQuery("#"+config.containerID+"_AX_UserSelectBox").append(po.join("")),this.dragCollect()},del:function(select){var config=this.config,myDS=[];jQuery.each(this.ds,function(){for(var delOK=0,a=0;a<select.length;a++)select[a].id.split(/_AX_/g).last()==this.id&&(delOK=1);1==delOK?jQuery("#"+config.containerID+"userSelectItem_AX_"+this.id).remove():myDS.push(this)}),this.ds=myDS,this.dragCollect()},_del:function(select){var config=this.config,myDS=[];axf.each(this.ds,function(){for(var delOK=0,a=0;a<select.length;a++)select[a]==this.id&&(delOK=1);1==delOK?axdom("#"+config.containerID+"userSelectItem_AX_"+this.id).remove():myDS.push(this)}),this.ds=myDS,this.dragCollect()},dragCollect:function(){this.myDrag.collectItem()},onSort:function(res){var that,_this=this,dragCollect=this.dragCollect.bind(this);return axdom(res.dragItem).html()!=axdom(res.sortItem).html()&&res.dragItem!=res.sortItem?(axdom(res.dragItem).fadeOut("fast",function(){axdom(res.sortItem).before(this),axdom(this).show("fast"),dragCollect(),_this.config.onchange&&(that={containerID:_this.config.containerID,list:_this.getDS()},_this.config.onchange.call(that))}),this):void 0},onDrop:function(res){var that,_this=this,dragCollect=this.dragCollect.bind(this);return axdom(res.dragItem).fadeOut("fast",function(){jQuery("#"+_this.config.containerID+"_AX_UserSelectBox").append(this),jQuery(this).show("fast"),dragCollect(),_this.config.onchange&&(that={containerID:_this.config.containerID,list:_this.getDS()},_this.config.onchange.call(that))}),this},moveup:function(){var that,_this=this,select=this.getSelect();return axf.each(select,function(){var prev=axdom(this).prev();prev.before(axdom(this))}),_this.config.onchange&&(that={containerID:_this.config.containerID,list:_this.getDS()},_this.config.onchange.call(that)),this},movedown:function(){var that,_this=this,select=this.getSelect();return axf.each(select,function(){var next=axdom(this).next();next.after(axdom(this))}),_this.config.onchange&&(that={containerID:_this.config.containerID,list:_this.getDS()},_this.config.onchange.call(that)),this},getSelect:function(){return this.myDrag.mselector.getSelects()},empty:function(){var config=this.config;jQuery("#"+config.containerID+"_AX_UserSelectBox").empty(),this.ds=[],this.dragCollect()},getDS:function(){var config=this.config,myDS=[];return jQuery("#"+config.containerID+"_AX_UserSelectBox").find(".readyDrag").each(function(){var id=this.id.split(/_AX_/g).last(),nm=jQuery("#"+config.containerID+"userSelectItemNM_AX_"+id).val(),desc=jQuery("#"+config.containerID+"userSelectItemDESC_AX_"+id).val();myDS.push({id:id,nm:nm,desc:desc})}),myDS},getSelectDS:function(){var config=this.config,myDS=[],sls=this.myDrag.mselector.getSelects();if(sls.length>0)for(var i=0;i<sls.length;i++){var id=sls[i].id.split(/_AX_/g).last(),nm=jQuery("#"+config.containerID+"userSelectItemNM_AX_"+id).val(),desc=jQuery("#"+config.containerID+"userSelectItemDESC_AX_"+id).val();
  myDS.push({id:id,nm:nm,desc:desc})}return myDS}}),AXValidator=Class.create(AXJ,{initialize:function(AXJ_super){AXJ_super(),this.Observer=null,this.form=null,this.elements=[],this.errElements=[],this.errMessagePattern="[{label}] {message}",this.config={targetID:null,clazz:"av-"},AXConfig.AXValidator&&AXConfig.AXValidator.validateErrMessage?this.config.validateErrMessage=AXConfig.AXValidator.validateErrMessage:this.config.validateErrMessage={required:"[{label}](은)는 필수입력 사항입니다.",requiredstring:"반드시 {required}(으)로 입력하셔야 하는 사항입니다.",match:"[{label}](은)는 입력된 내용이 일치하지 않습니다.",invalid:"[{label}](은)는 입력된 내용이 올바르지 않습니다.",min:"[{label}](은)는 {min} 이상의 값을 입력해주세요.",max:"[{label}](은)는 {max} 이하의 값을 입력해주세요.",minbyte:"[{label}]의 입력된 내용의 길이가 {minbyte}Byte 이상이어야 합니다.",maxbyte:"[{label}]의 입력된 내용의 길이가 {maxbyte}Byte를 초과할 수 없습니다.",minlength:"[{label}]의 입력된 내용의 length가 {minlength} 이상이어야 합니다.",maxlength:"[{label}]의 입력된 내용의 length가 {maxlength}을 초과할 수 없습니다.",number:"숫자로만 입력하셔야 합니다.",email:"이메일 형식이 올바르지 않습니다.",hangul:"한글로만 입력하셔야 합니다.",engonly:"영문으로만 입력하셔야 합니다.",residentno:"주민등록번호 형식이 올바르지 않습니다.",foreignerno:"외국인등록번호 형식이 올바르지 않습니다.",bizno:"사업자등록번호 형식이 올바르지 않습니다.",phone:"전화번호 형식이 올바르지 않습니다.",isdate:"날짜 형식이 올바르지 않습니다.",zip:"우편번호 형식이 올바르지 않습니다.",money:"화폐형식으로만 입력하셔야 합니다.",earlierThan:"[{label}] 보다 빠른 날짜를 입력해야 합니다.",laterThan:"[{label}] 보다 느린 날짜를 입력해야 합니다.",exception:"not found errmessage"}},init:function(){var cfg=this.config;return Object.isUndefined(cfg.targetFormName)?void trace("need targetID - setConfig({targetFormName:''})"):document[cfg.targetFormName]?(this.form=$(document[cfg.targetFormName]),void this.findElement()):void trace("not found form element")},findElement:function(){var cfg=this.config,allElements=this.form.serializeObject(),_elements=this.elements,checkClass=this.validateCheckClass;axdom.each(allElements,function(eidx,Elem){try{var config={},isValidate=!1;axdom.each(checkClass,function(k,v){Elem.id?axdom("#"+Elem.id).hasClass(cfg.clazz+k)&&(config[k]=v,isValidate=!0):Elem.name&&$(document[cfg.targetFormName][Elem.name]).hasClass(cfg.clazz+k)&&(config[k]=v,isValidate=!0)}),isValidate&&(delete Elem.value,Elem.config=config,_elements.push(Elem))}catch(e){}});var checkedItems={};axdom(this.form).find("input[type=checkbox], input[type=radio]").each(function(eidx,Elem){var config={},isValidate=!1,label="";axdom.each(checkClass,function(k,v){Elem.name&&$(document[cfg.targetFormName][Elem.name]).hasClass(cfg.clazz+k)&&(config[k]=v,isValidate=!0,""==label&&(label=Elem.title||Elem.placeholder||""))}),isValidate&&(checkedItems[this.name]?checkedItems[this.name].push({index:0,type:this.type,value:this.value,id:this.id,checked:this.checked,label:label}):checkedItems[this.name]=[{index:0,type:this.type,value:this.value,id:this.id,checked:this.checked,config:config,label:label}])}),axf.each(checkedItems,function(k,v){var item={id:"",name:k,type:v[0].type,label:v[0].label,multi:!0,config:v[0].config};_elements.push(item)}),cfg.checkCrlf&&axdom(this.form).find("textarea[maxlength]").each(function(index,element){var item={id:element.id,name:element.name,type:"textarea",value:"",label:element.title||element.placeholder||"",config:{maxlength:element.maxLength}};_elements.push(item)}),this.elements=_elements},add:function(addObj){var addedObject,cfg=this.config,addElement=this.addElement.bind(this),getElement=this.getElement.bind(this),isActiveFormControl=this.isActiveFormControl.bind(this),element=getElement(addObj);if(!isActiveFormControl(element))return!1;if(addObj.id){var findIndex=null;axdom.each(this.elements,function(eidx,elem){return this.id==addObj.id?(findIndex=eidx,!1):void 0}),null!=findIndex?(addElement(addObj,findIndex),addedObject=this.elements[findIndex]):(addObj.name=axdom("#"+addObj.id).attr("name"),this.elements.push(addObj),addedObject=this.elements.last())}else if(addObj.name){var findIndex=null;axdom.each(this.elements,function(eidx,elem){return this.name==addObj.name?(findIndex=eidx,!1):void 0}),null!=findIndex?(addElement(addObj,findIndex),addedObject=this.elements[findIndex]):(addObj.id=$(document[cfg.targetFormName][addObj.name]).attr("id"),this.elements.push(addObj),addedObject=this.elements.last())}var targetElem,targetElemForSelect,raiseError=this.raiseError.bind(this),validateFormatter=this.validateFormatter.bind(this);addedObject.id?(targetElem=axdom("#"+addedObject.id),targetElemForSelect=AXgetId(addedObject.id)):addedObject.name&&(targetElem=$(document[cfg.targetFormName][addedObject.name]),targetElemForSelect=document[cfg.targetFormName][addedObject.name]);var Elem=addedObject,displayFormatter=this.displayFormatter.bind(this);addedObject.realtime&&(Elem.needRealtimeCheck=!1,Elem.realtimeCheck={},axdom.each(Elem.config,function(k,v){"maxlength"!=k&&"maxbyte"!=k||(Elem.needRealtimeCheck=!0,Elem.realtimeCheck[k]=v)}),Elem.needRealtimeCheck&&(targetElem.unbind("keydown.validate"),targetElem.bind("keydown.validate",function(e){var event=window.event||e;if(event.keyCode&&9!=event.keyCode&&16!=event.keyCode){var returnObject=(this.value,null),eventBlock=!0;if(document.selection&&document.selection.createRange){var range=document.selection.createRange();""!=range.text&&(eventBlock=!1)}else window.getSelection&&("mozilla"==AXUtil.browser.name?Elem.realtimeCheck.maxlength>targetElemForSelect.selectionStart&&(eventBlock=!1):(selectedText=window.getSelection().toString(),""!=selectedText&&(eventBlock=!1)));axdom.each(Elem.realtimeCheck,function(k,v){var val=targetElem.val()+"A";return validateFormatter(Elem,val,k,v,"realtime")?void 0:(returnObject=raiseError(Elem,val,k,v),!1)});var responseResult=!0;return null==returnObject?Elem.realtime.response.call({result:!0}):(returnObject.result=!1,responseResult=Elem.realtime.response.call(returnObject)),0==responseResult&&eventBlock&&event.keyCode!=AXUtil.Event.KEY_DELETE&&event.keyCode!=AXUtil.Event.KEY_BACKSPACE&&event.keyCode!=AXUtil.Event.KEY_LEFT&&event.keyCode!=AXUtil.Event.KEY_RIGHT?(event.preventDefault&&event.preventDefault(),event.stopPropagation&&event.stopPropagation(),event.cancelBubble=!0,!1):void 0}})),targetElem.unbind("keyup.validate").bind("keyup.validate",function(e){var event=window.event||e;if(event.keyCode&&9!=event.keyCode&&16!=event.keyCode){var vKey,_val=this.value,returnObject=null;axdom.each(Elem.config,function(k,v){vKey=k;var val=targetElem.val();return validateFormatter(Elem,val,k,v,"realtime")?void 0:(returnObject=raiseError(Elem,val,k,v),!1)});var responseResult=!0;if(null==returnObject?(Elem.__prevValue=_val,Elem.realtime.response.call({result:!0})):(returnObject.result=!1,responseResult=Elem.realtime.response.call(returnObject)),0==responseResult){if(event.keyCode!=AXUtil.Event.KEY_DELETE&&event.keyCode!=AXUtil.Event.KEY_BACKSPACE&&event.keyCode!=AXUtil.Event.KEY_LEFT&&event.keyCode!=AXUtil.Event.KEY_RIGHT)return(Elem.__prevValue||"").length>_val.length?this.value="":""!=displayFormatter(Elem.__prevValue||"",vKey)&&(this.value=displayFormatter(Elem.__prevValue||"",vKey)),event.preventDefault&&event.preventDefault(),event.stopPropagation&&event.stopPropagation(),event.cancelBubble=!0,!1}else""!=displayFormatter(this.value,vKey)&&(this.value=displayFormatter(this.value,vKey))}})),addedObject.onblur&&targetElem.unbind("blur.validate").bind("blur.validate",function(e){var returnObject={result:!0};axdom.each(Elem.config,function(k,v){var val=targetElem.val();return validateFormatter(Elem,val,k,v,"")?void 0:(returnObject=raiseError(Elem,val,k,v),returnObject.config=Elem.config,returnObject.result=!1,!1)}),returnObject.result&&(returnObject.element=Elem,returnObject.value=targetElem.val(),returnObject.config=Elem.config);Elem.onblur.call(returnObject)})},del:function(delObj){var deledObject,findIndex=(this.config,null);delObj.id?$.each(this.elements,function(eidx,elem){return this.id==delObj.id?(findIndex=eidx,!1):void 0}):delObj.name&&$.each(this.elements,function(eidx,elem){return this.name==delObj.name?(findIndex=eidx,!1):void 0}),null!=findIndex&&(deledObject=this.elements[findIndex],$("#"+deledObject.id).unbind("keydown.validate"),$("#"+deledObject.id).unbind("keyup.validate"),$("#"+deledObject.id).unbind("blur.validate"),this.elements.splice(findIndex,1))},addElement:function(addObj,findIndex){AXUtil.overwriteObject(this.elements[findIndex].config,addObj.config,!0),addObj.onblur&&(this.elements[findIndex].onblur=addObj.onblur),addObj.realtime&&(this.elements[findIndex].realtime=addObj.realtime),addObj.message&&(this.elements[findIndex].message=addObj.message),addObj.label&&(this.elements[findIndex].label=addObj.label)},validate:function(filterOption){for(var Elem,cfg=this.config,raiseError=this.raiseError.bind(this),validateFormatter=this.validateFormatter.bind(this),returnObject=null,eidx=0,__arr=this.elements;eidx<__arr.length&&(Elem=__arr[eidx]);eidx++){var targetElem;Elem.id&&!Elem.multi?targetElem=axdom("#"+Elem.id):Elem.name&&(targetElem=axdom(document[cfg.targetFormName][Elem.name])),"bizno"==Elem.name;var isCheck=!0;if(filterOption)if("include"==filterOption.filterType){isCheck=!1;for(var f,fidx=0,__arr2=filterOption.list;fidx<__arr2.length&&(f=__arr2[fidx]);fidx++){if(f.id&&f.id==Elem.id){isCheck=!0;break}if(f.name&&f.name==Elem.name){isCheck=!0;break}}}else{isCheck=!0;for(var f,fidx=0,__arr2=filterOption.list;fidx<__arr2.length&&(f=__arr2[fidx]);fidx++){if(f.id&&f.id==Elem.id){isCheck=!1;break}if(f.name&&f.name==Elem.name){isCheck=!1;break}}}if(targetElem&&isCheck){var val="";"radio"==Elem.type||"checkbox"==Elem.type?targetElem.each(function(){this.checked&&(""==val?val=this.value:val+=","+this.value)}):val=targetElem.val();var _end=!1;if(axdom.each(Elem.config,function(k,v){return validateFormatter(Elem,val,k,v,"")?void 0:(returnObject=raiseError(Elem,val,k,v),_end=!0,!1)}),_end)return!1}}return null==returnObject?(this.errElements=[],!0):!1},raiseError:function(elem,elemVal,validateKey,validateVal){var messageConvert=this.messageConvert.bind(this),message=messageConvert(elem,validateKey,validateVal),returnObject={element:elem,value:elemVal,validateKey:validateKey,validateVal:validateVal,message:message};return this.errElements.push(returnObject),returnObject},messageConvert:function(elementObj,validateKey,validateVal){var validateErrMessage=this.config.validateErrMessage,vKey="exception",vVal="";void 0!=validateKey&&(vKey=validateKey),void 0!=validateVal&&(vVal=validateVal);var element=elementObj;if(!element)return null;var label;label=element.label&&element.label.length>0?element.label:element.id||element.name,"earlierThan"!=vKey&&"laterThan"!=vKey||(label=validateVal.label||label);var errMessage=validateErrMessage[vKey];if(void 0==element.message)var typeMessage=errMessage;else var typeMessage=element.message[vKey]||errMessage;if(void 0!=typeMessage){var message=typeMessage.replace(/{label}/,label);message=message.replace("{"+vKey+"}",vVal)}else message="";return message},validateCheckClass:{required:!0,number:!0,email:!0,hangul:!0,engonly:!0,residentno:!0,foreignerno:!0,bizno:!0,phone:!0,isdate:!0,zip:!0,money:!0},validateFormatter:function(Elem,ElemValue,validateKey,validateValue,realtime){function checkJumin(p_juminno){try{if(""==p_juminno||13!=p_juminno.length||"number"!=typeof Number(p_juminno))return!1;isKorean=!0,Number(p_juminno.charAt(6))>4&&Number(p_juminno.charAt(6))<9&&(isKorean=!1);for(var check=0,i=0;12>i;i++)check+=isKorean?(i%8+2)*Number(p_juminno.charAt(i)):(9-i%8)*Number(p_juminno.charAt(i));if(isKorean)check=11-check%11,check%=10;else{var remainder=check%11;check=0==remainder?1:10==remainder?0:remainder;var check2=check+2;check=check2>9?check2-10:check2}return check==Number(p_juminno.charAt(12))}catch(e){alert(e.description)}}var cfg=this.config,result=!0,lenMargin=1;"realtime"==realtime&&(lenMargin=0);try{if("required"==validateKey)result=""!=ElemValue.trim();else if(""!=ElemValue&&"min"==validateKey)result=ElemValue.number()+lenMargin>validateValue;else if(""!=ElemValue&&"max"==validateKey)result=ElemValue.number()-lenMargin<=validateValue;else if(""!=ElemValue&&"minbyte"==validateKey)result=ElemValue.getByte().number()+lenMargin>validateValue;else if(""!=ElemValue&&"maxbyte"==validateKey)result=ElemValue.getByte().number()-lenMargin<=validateValue;else if(""!=ElemValue&&"minlength"==validateKey)result=ElemValue.length.number()>=validateValue;else if(""!=ElemValue&&"maxlength"==validateKey){var crlfLength=0;if(cfg.checkCrlf){var __matchedArr=ElemValue.match(/(\r\n|\n|\r)/g);__matchedArr&&(crlfLength=1*__matchedArr.length,trace(crlfLength))}result=ElemValue.length.number()+crlfLength<=validateValue}else if(""!=ElemValue&&"number"==validateKey)result=axdom.isNumeric(ElemValue.trim());else if(""!=ElemValue&&"email"==validateKey){var pattern=/^[_a-zA-Z0-9-\.]+@[\.a-zA-Z0-9-]+\.[a-zA-Z]+$/;result=pattern.test(ElemValue)}else if(""!=ElemValue&&"hangul"==validateKey){var pattern=/^[가-힣0-9]+$/;result=pattern.test(ElemValue)}else if(""!=ElemValue&&"engonly"==validateKey){var pattern=/^[a-zA-Z0-9_]+$/;result=pattern.test(ElemValue)}else if(""!=ElemValue&&"residentno"==validateKey){var pattern=/^(?:[0-9]{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[1,2][0-9]|3[0,1]))-?[1-4][0-9]{6}$/,num=ElemValue;pattern.test(num)||(result=!1),0!=result&&(result=checkJumin(num.replace(/\D/g,"")))}else if(""!=ElemValue&&"foreignerno"==validateKey){var pattern=/^(\d{6})-?(\d{5}[7-9]\d{1})$/,num=ElemValue;if(pattern.test(num)||(result=!1),0!=result){num=RegExp.$1+RegExp.$2;for(var sum=0,last=num.charCodeAt(12)-48,bases="234567892345",i=0;12>i;i++){if(isNaN(num.substring(i,i+1)))return"foreignerno";sum+=(num.charCodeAt(i)-48)*(bases.charCodeAt(i)-48)}var mod=sum%11;result=(11-mod+2)%10==last}}else if(""!=ElemValue&&"bizno"==validateKey){var pattern=/([0-9]{3})-?([0-9]{2})-?([0-9]{5})/,num=ElemValue;if(10!=num.replace(/\D/g,"").length&&(result=!1),pattern.test(num)||(result=!1),num=RegExp.$1+RegExp.$2+RegExp.$3,0!=result){for(var vencod=num,sum=0,getlist=new Array(10),chkvalue=new Array("1","3","7","1","3","7","1","3","5"),i=0;10>i;i++)getlist[i]=vencod.substring(i,i+1);for(var i=0;9>i;i++)sum+=getlist[i]*chkvalue[i];sum+=parseInt(5*getlist[8]/10),sidliy=sum%10,sidchk=0!=sidliy?10-sidliy:0,result=sidchk==getlist[9]}}else if(""!=ElemValue&&"phone"==validateKey)if("realtime"==realtime){var pattern=/[\D]+/,num=ElemValue.replace(/\-/g,"");result=!pattern.test(num)}else{var pattern=/^(0[2-8][0-5]?|01[01346-9])-?([1-9]{1}[0-9]{2,3})-?([0-9]{4})$/,pattern15xx=/^(1544|1566|1577|1588|1644|1688)-?([0-9]{4})$/,patternHand=/^(01[01346-9])-?([1-9]{1}[0-9]{2,3})-?([0-9]{4})$/,num=ElemValue;result=!!(pattern.test(num)||pattern15xx.test(num)||patternHand.test(num))}else{if(""!=ElemValue&&"isdate"==validateKey){result=!0;var iDate=ElemValue.replace(/-/g,"");if(8!=iDate.length)return result=!1;var oDate=new Date(parseInt(iDate.substr(0,4),10),parseInt(iDate.substr(4,2),10)-1,parseInt(iDate.substr(6,2),10));return result=oDate.getFullYear()==parseInt(iDate.substr(0,4),10)&&oDate.getMonth()==parseInt(iDate.substr(4,2),10)-1&&oDate.getDate()==parseInt(iDate.substr(6,2),10)}if(""!=ElemValue&&"zip"==validateKey){var pattern=/^[0-9]{3}\-[0-9]{3}$/;result=pattern.test(ElemValue)}else if(""!=ElemValue&&"money"==validateKey){var pattern=(ElemValue.replace(",").replace("."),/^\$?[0-9]+(,[0-9]{3})*(\.[0-9]*)?$/);result=pattern.test(ElemValue)}else if("earlierThan"==validateKey)if(""==ElemValue)result=!0;else{var st_date=ElemValue,ed_date=axdom("#"+validateValue.id).val().trim();result=""!=ed_date?!(st_date.date().diff(ed_date)<0):!1}else if("laterThan"==validateKey)if(""==ElemValue)result=!0;else{var ed_date=ElemValue,st_date=axdom("#"+validateValue.id).val().trim();result=""!=st_date?!(st_date.date().diff(ed_date)<0):!1}else axdom.isFunction(validateValue)&&(result=validateValue.call({Elem:Elem,ElemValue:ElemValue,validateKey:validateKey}))}}catch(e){trace("validateFormatter-catch:662",e),result=!1}return result},getErrorMessage:function(errorMessagePattern){if(!this.errElements)return null;if(0==this.errElements.length)return"Err 메세지가 없습니다.";var errObj=this.errElements.last(),errElement=errObj.element,messageConvert=this.messageConvert.bind(this),message=messageConvert(errElement,errObj.validateKey,errObj.validateVal);return message},getErrorElement:function(){var cfg=this.config;if(!this.errElements)return null;if(0==this.errElements.length)return null;var errObj=this.errElements.last(),errElement=errObj.element;return axdom(axdom("#"+errElement.id).length>0?"#"+errElement.id:document[cfg.targetFormName][errElement.name])},getElement:function(elementObj){var element,cfg=this.config;try{element=elementObj.id?AXgetId(elementObj.id):document[cfg.targetFormName][elementObj.name]}catch(e){return!1}return null==element?(AXUtil.alert((elementObj.id||elementObj.name)+" not found"),null):element},isActiveFormControl:function(element){return element?(__rinput.test(element.type)||__rselectTextarea.test(element.type))&&!element.disabled:!1},displayFormatter:function(elemValue,validateKey){if(""==elemValue||null==elemValue)return"";var value=elemValue,dataFormat="";if(""!=value)if("phone"==validateKey){var pattern=/[^0-9]/g,parintPattern="";if(value=value.replace(pattern,""),value.length<4)return value;value.length>3&&value.length<7?(dataFormat="$1-$2",parintPattern=/([0-9]{3})([0-9]+)/):7==value.length?(dataFormat="$1-$2",parintPattern=/([0-9]{3})([0-9]{4})/):9==value.length?(dataFormat="$1-$2-$3",parintPattern=/([0-9]{2})([0-9]{3})([0-9]+)/):10==value.length?"02"==value.substring(0,2)?(dataFormat="$1-$2-$3",parintPattern=/([0-9]{2})([0-9]{4})([0-9]+)/):(dataFormat="$1-$2-$3",parintPattern=/([0-9]{3})([0-9]{3})([0-9]+)/):value.length>10&&(dataFormat="$1-$2-$3",parintPattern=/([0-9]{3})([0-9]{4})([0-9]+)/),value=value.replace(parintPattern,dataFormat)}else{if("isdate"!=validateKey)return"";var pattern=/[^0-9]/g,parintPattern="";if(value=value.replace(pattern,""),value.length<4)return value;value.length>4&&value.length<7?(dataFormat="$1-$2",parintPattern=/([0-9]{4})([0-9]+)/):value.length<10&&(dataFormat="$1-$2-$3",parintPattern=/([0-9]{4})([0-9]{2})([0-9]+)/),value=value.replace(parintPattern,dataFormat)}return value}}),AXWaterfall=Class.create(AXJ,{version:"AXWaterfall v1.1",author:"tom@axisj.com",logs:["2012-10-11 오후 1:40:26","2013-11-07 오전 9:58:41 - tom : 최소사이즈 버그 픽스"],initialize:function(AXJ_super){AXJ_super(),this.CT_className="AXWaterfall",this.I_className="WaterBox",this.I_classNameMobile="WaterBoxMobile",this.config.boxWidth=224,this.config.boxMargin=10,this.config.pageSize=5,this.config.mobileSize=300,this.config.autoResize=!0,this.Observer=null,this.player=null,this.played=!1,this.targetWidth=null},init:function(){var config=this.config;if(Object.isUndefined(config.targetID))return void trace("need targetID - setConfig({targetID:''})");axdom("#"+config.targetID).addClass(this.CT_className),axdom("#"+config.targetID).find("."+config.fallClassName).addClass(this.I_className);var bodyWidth="Q"==AXUtil.docTD?document.body.clientWidth:document.documentElement.clientWidth;this.targetWidth=bodyWidth,axdom("#"+config.targetID).css({width:"auto",minWidth:"auto",maxWidth:"auto"}),axdom("#"+config.targetID).find("."+config.fallClassName).hide(),this.waterFall(),this.bindEvent()},onresize:function(){var config=this.config,bodyWidth="Q"==AXUtil.docTD?document.body.clientWidth:document.documentElement.clientWidth;if(this.targetWidth!=bodyWidth){this.targetWidth=bodyWidth,axdom("#"+config.targetID).css({width:"auto",minWidth:"auto",maxWidth:"auto"}),this.Observer&&clearTimeout(this.Observer);var waterFall=this.waterFall.bind(this);this.Observer=setTimeout(function(){axdom("#"+config.targetID).find("."+config.fallClassName).hide(),waterFall()},100)}},waterFall:function(){var config=this.config,CTw=axdom("#"+config.targetID).innerWidth()-config.boxMargin,CW=config.boxWidth+config.boxMargin+2;this.Clen=parseInt(CTw.div(CW));var targetWidth=CW*this.Clen;CW>targetWidth?axdom("#"+config.targetID).css({width:"auto"}):axdom("#"+config.targetID).css({width:targetWidth+"px"}),1==this.Clen?axdom("#"+config.targetID).find("."+config.fallClassName).addClass(this.I_classNameMobile):axdom("#"+config.targetID).find("."+config.fallClassName).removeClass(this.I_classNameMobile),this.grid=[],this.colsGrid=[];for(var a=0;a<this.Clen;a++)this.colsGrid.push(0);this.itemLen=axdom("#"+config.targetID).find("."+config.fallClassName).length,axdom("#"+config.targetID).find("."+config.fallClassName).each(function(index,O){var boxID=config.targetID+"_AX_"+index;axdom(O).attr("id",boxID)}),this.player&&clearTimeout(this.player),this.playWaterFall(0)},playWaterFall:function(pageNo){for(var config=this.config,stIndex=pageNo*config.pageSize,edIndex=(pageNo+1)*config.pageSize,l=0,t=0,et=0,c=0,a=stIndex;edIndex>a;a++){var boxID=config.targetID+"_AX_"+a;if(a<this.Clen)t=0,l=a*config.boxWidth+config.boxMargin*a,c=a;else{var minH=null,minC=null;axdom.each(this.colsGrid,function(index,O){(null==minH||minH>O)&&(minH=O,minC=index,c=index,l=index*config.boxWidth+config.boxMargin*index)}),t=minH+config.boxMargin}if(!AXgetId(boxID))break;var myBox=axdom("#"+boxID);myBox.css({left:l,top:t}),myBox.show();var et=t+myBox.outerHeight();this.grid.push({id:boxID,left:l,top:t,et:et,col:c}),this.colsGrid[c]=et}if(pageNo+1>this.itemLen/config.pageSize){var maxH=null;axdom.each(this.colsGrid,function(index,O){(null==maxH||O>maxH)&&(maxH=O)});var itemWidth=this.Clen*(config.boxWidth+config.boxMargin)-config.boxMargin;(axdom("#"+config.targetID).innerWidth()-itemWidth)/2;axdom("#"+config.targetID).css({height:maxH+config.boxMargin}),this.played=!1}else{var playWaterFall=this.playWaterFall.bind(this);this.player=setTimeout(function(){playWaterFall(pageNo+1)},10)}},bindEvent:function(){this.config;this.config.autoResize&&axdom(window).resize(this.onresize.bind(this))}});