(function($){$.COM=(function(){var events_map={};var props="altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),props_key="char charCode key keyCode".split(" "),props_mouse="button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|contextmenu)|click/;function key_filter(event,e){if(event.which==null){event.which=e.charCode!=null?e.charCode:e.keyCode}}function mouse_filter(event,e){var eventDoc,doc,body,button=e.button,fromElement=e.fromElement;if(event.pageX==null&&e.clientX!=null){eventDoc=event.target.ownerDocument||document;doc=eventDoc.documentElement;body=eventDoc.body;event.pageX=e.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc&&doc.clientLeft||body&&body.clientLeft||0);event.pageY=e.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0)}if(!event.relatedTarget&&fromElement){event.relatedTarget=fromElement===event.target?e.toElement:fromElement}if(!event.which&&button!==undefined){event.which=(button&1?1:(button&2?3:(button&4?2:0)))}}function Event(e){if(!(this instanceof $.COM.Event)){return new Event(e)}e=e||window.event;this.original=e;this.type=e.type;var isKey=false,isMouse=false,maps=null,filter=null;if(rkeyEvent.test(e.type)){maps=props.concat(props_key);filter=key_filter}if(rmouseEvent.test(e.type)){maps=props.concat(props_mouse);filter=mouse_filter}var i=maps.length,prop;while(i--){prop=maps[i];this[prop]=e[prop]}if(!this.target){this.target=e.srcElement||document}if(this.target.nodeType===3){this.target=this.target.parentNode}this.metaKey=!!this.metaKey;if(filter){filter(this,e)}}Event.prototype.stopPropagation=function(){cancel_bubble(this.original)};Event.prototype.preventDefault=function(){prevent_default(this.original)};function extend(a){if(arguments.length<2){return null}var arg=null;for(var i=1;i0){off_one(ele,ev,maps.pop(),cap)}events_map[id][ev]=null;return}else{var _index=-1;for(var i=0;i';document.body.appendChild(uploader);var frm=document.getElementById(ID+"_form");frm.appendChild(file);if(options.fields){for(var name in options.fields){if(!options.fields.hasOwnProperty(name)){continue}var input=document.createElement("input");input.type="hidden";input.name=name;input.value=options.fields[name];frm.appendChild(input)}}var ifm=document.getElementById(ID),onload=function(){complete.call(options.context||file);var ifrm=document.getElementById(ID);var body=(ifrm.contentWindow?ifrm.contentWindow:ifrm.contentDocument).document.body;var json=(body.innerText)?body.innerText:((body.textContent)?body.textContent:null);document.body.removeChild(document.getElementById(ID+"_container"));try{success.call(options.context||file,(typeof JSON.parse!=="undefined")?JSON.parse(json):eval("("+json+")"))}catch(ex){error.call(options.context||file,ex.message)}return false};if(ifm.attachEvent){ifm.attachEvent("onload",onload)}else{ifm.onload=onload}beforupload.call(options.context||file,file,options);frm.submit();return new_file}var locat=window.location,protocol=locat.protocol,port=locat.port||(protocol.indexOf("https")>=0?"443":"80"),host=locat.host,origin=locat.origin||parse_url(window.location.href).origin;function parse_url(url){var rmatch=/^((?:.+?)\:)\/\/([\s\S]+?)(?:\:(\d+))?(\/(?:[\s\S]*?))?(\?(?:[\s\S]*?))?(\#(?:[\s\S]*?))?$/.exec(url);if(rmatch){return{hash:rmatch[6],host:rmatch[2],hostname:rmatch[2],href:rmatch[0],origin:rmatch[1]+"//"+rmatch[2]+(rmatch[3]?":"+rmatch[3]:""),pathname:rmatch[4]||"/",port:rmatch[3]||(rmatch[1].indexOf("https")>=0?"443":"80"),protocol:rmatch[1],search:rmatch[5]}}rmatch=/^([\s\S]+?)(\?(?:[\s\S]*?))?(\#(?:[\s\S]*?))?$/.exec(url);if(rmatch){var pathname=rmatch[1];if(!pathname){pathname=locat.pathname}else{if(pathname.substr(0,1)!="/"){var lpath=locat.pathname,rreg=/\/([^\/]+?)\/\.\./;lpath=lpath.substr(0,lpath.lastIndexOf("/")+1);pathname=lpath+pathname;while(rreg.test(pathname)){pathname=pathname.replace(rreg,"")}pathname=pathname.replace(/\.\.\//g,"");pathname=pathname.replace(/\.\//g,"")}}return{hash:rmatch[3],host:host,hostname:host,href:protocol+"//"+host+((port!="80"&&port!="443")?":"+port:"")+pathname+rmatch[2]+rmatch[3],origin:protocol+"//"+host+((port!="80"&&port!="443")?":"+port:""),pathname:pathname,port:port,protocol:protocol,search:rmatch[2]}}return null}function load_script(url,callback,charset){var script=document.createElement("script"),head=document.head||document.getElementsByTagName("head")[0]||document.documentElement;function dispose(){script.onload=script.onreadystatechange=null;if(script.parentNode){script.parentNode.removeChild(script)}script=null}script.async=true;if(charset){script.charset=charset}script.src=url;script.onload=script.onreadystatechange=function(){if(!script.readyState||/loaded|complete/.test(script.readyState)){dispose();if(callback){callback(200)}}};head.insertBefore(script,head.firstChild)}function _right2(src){return("0"+src).slice(-2)}function FormatDate(dt,fs){if(typeof dt=="number"){dt=new Date(dt)}else{if(typeof dt=="string"&&/^\/Date\((\d+)\)\/$/.test(dt)){dt=new Date(parseInt(dt.replace(/^\/Date\((\d+)\)\/$/,"$1")))}else{dt=dt||(new Date())}}fs=fs.replace(/(yyyy|mmmm|mmm|mm|dd|hh|ss|tttt|m|d|h|s)/ig,function(diff){switch(diff){case"yyyy":return dt.getFullYear();case"M":return dt.getMonth()+1;case"MM":return _right2(dt.getMonth()+1);case"d":return dt.getDate();case"dd":return _right2(dt.getDate());case"H":return dt.getHours()%12;case"HH":return _right2(dt.getHours());case"h":return dt.getHours();case"hh":return _right2(dt.getHours()%12);case"m":return dt.getMinutes();case"mm":return _right2(dt.getMinutes());case"s":return dt.getSeconds();case"ss":return _right2(dt.getSeconds());case"tttt":return dt.getMilliseconds();default:return diff}});return fs}return{extend:extend,fix_event:fix_event,on:on,off:off,add_class:add_class,remove_class:remove_class,has_class:has_class,toggle_class:toggle_class,is_function:is_function,encode:encode,decode:decode,location:_location,bind:bind,get_center:get_center,show:show,hide:hide,visiable:visiable,next:next,prev:prev,find_height:find_height,find_top:find_top,cancel_bubble:cancel_bubble,child_of:child_of,format:format,first:first,last:last,Event:Event,childs:childs,upload:UploadFile,parse_url:parse_url,load_script:load_script,format_date:FormatDate,offset:_offset}}())}(window));; (function(a){var c={},d={buttons:null,title:null,titleAlign:"center",buttonAlign:"center",bodyAlign:"center",buttonNoBorder:true,buttonBorderRadius:true,autoClose:0,onOpen:null,onClose:null,replaceAlert:false,bgWhite:false},b=0;a.MWIN=(function(){var m={};function n(K,M){if(arguments.length<2){return null}var L=null;for(var O=1;O0){A(M,N,R.pop(),L)}m[Q][N]=null;return}else{var K=-1;for(var P=0;P

';f(Q,"blocker"+(U.bgWhite===true?" white":""));K=q(Q);V=q(K);N=y(V);O=x(K);N.innerHTML=J((U.icon?'':"")+(P||U.content||""));K.style.alpha="0";K.style.opacity="0";K.style.filter="alpha(opacity=0)";Q.style.display="block";var L=new l(T,Q,V,N,O,U);L.args=arguments;c[T]=L;r(O,L);if(U.title===null){V.style.display="none";f(N,"dlg-body-notitle")}else{V.style.display="block";V.innerHTML=J(U.title)}if(U.width){if(typeof U.width=="number"){U.width=U.width+"px"}K.style.width=U.width}if(U.height){if(typeof U.height=="number"){U.height=(U.height-V.offsetHeight-O.offsetHeight)+"px"}N.style.height=U.height}if(U.autoClose&&typeof U.autoClose=="number"){window.setTimeout(function(){h(T,null)},U.autoClose)}F(V,U.titleAlign);F(N,U.bodyAlign);F(O,U.buttonAlign);if(w(U.onOpen)){U.onOpen.call(L)}if(typeof U.autoFix=="number"){L.fix(U.autoFix)}K.style.alpha="100%";K.style.opacity="1";K.style.filter="alpha(opacity=100%)";return L}function J(K){return'
'+K+"
"}function F(L,K){E(L,"align-left align-center align-right");f(L,"align-"+K)}function h(M,O){var N=o(M);if(!N){return}var K=c[M];if(K){if(O){if(w(O.callback)){if(O.callback.call(M,O.data)===false){return}}}if(w(K.options.onClose)){if(K.options.onClose.call(K,O)===false){return}}var L=K.buttonset;if(L){z(L,"click")}}N.parentNode.removeChild(N);c[M]=null}function s(L,K,M){B(document,L,function(O){O=O||event;if(!O){return}var Q=O.keyCode||O.witch;if(!Q){return}if(Q!=K){return}var R=x(document.body);if(!u(R,"blocker")){return}var N=c[R.id];if(!N){return}var S=N.callbacks;if(!S){return}for(var P=0;P0&&M.substr(U-1,1)!="\\"){P=M.substr(U+1);M=M.substr(0,U)}M=M.replace(/\\\./g,".");V.push({title:M,callback:typeof R=="string"?null:R,className:P,data:null,isDefault:false,isCancel:false,index:V.length})}}if(V.length==0){N.style.display="none"}else{N.style.display="block";var S="",M,Q=-1,O=[];for(var T=0;T'+M.title+""}N.innerHTML=J(S);if(Q>=0){N.getElementsByTagName("button")[Q].focus()}B(N,"click",function(X){var Y=p(X,W);if(!Y){return}h(W,Y)});L.callbacks=V}}}}function p(K,M){K=t(K||event);if(K&&K.nodeName&&K.nodeName.toLowerCase()!="button"){return null}var N=K.getAttribute("data-value");if(N===undefined){return null}var L;if(!c[M]||!(L=c[M]["callbacks"])){return null}N=parseInt(N);if(!L[N]){return null}return L[N]}function o(K){var L=document.getElementById(K);if(!L){if(c[K]){c[K]=null}return null}return L}function G(){var Q=null,M="",O=arguments.length,K,P={},L=0;if(O==0){return}for(var N=0;N',n(P,{title:Q||P.title,buttons:[{title:P.buttonText||"确定",callback:function(){if(w(M)){return M.call(this,document.getElementById(K).value)}}},{isCancel:true,title:P.buttonTextCancel||"取消",callback:P.onCancel,className:"btn-grey"}]}))}D.title=function(K){H("prompt",K)};function v(L,M){var K=c[L];if(!K){return}K.body.innerHTML=J(M)}function H(L,M){var K=c[L];if(!K){return}K.title.innerHTML=J(M)}s("keydown",13,"isDefault");s("keyup",27,"isCancel");return{any:k,open:k,close:h,tips:G,alert:g,confirm:i,html:v,prompt:D,title:H,options:function(K,L){if(L===undefined){return d[K]}d[K]=L;if(K=="replaceAlert"){if(L===true){window.alert=g}else{window.alert=e}}return this}}}());if(typeof jQuery!="undefined"){jQuery.dialog=a.MWIN}if(typeof Ajax!="undefined"){Ajax.postJson=function(h,f,e,g){g=g||{};if(g.tips){MWIN.tips(g.tips)}Ajax({url:h,data:f,method:"POST",dataType:"json",opts:g,complete:g.complete||function(){if(g.tips){MWIN.close("tips")}},error:g.error||function(){if(this.opts.errorAutoClose){MWIN.tips(this.opts.errorMessage||"请求失败,系统异常。",this.opts.errorAutoClose)}else{MWIN.alert(this.opts.errorMessage||"请求失败,系统异常。")}},succeed:function(i){if(!i.error){if(typeof e=="function"){e(i.data)}}else{if(this.opts.errorAutoClose){MWIN.tips(i.message,this.opts.errorAutoClose)}else{MWIN.alert(i.message)}}}})}}}(window));; (function(a){var e=[];e[65]=0;e[66]=1;e[67]=2;e[68]=3;e[69]=4;e[70]=5;e[71]=6;e[72]=7;e[73]=8;e[74]=9;e[75]=10;e[76]=11;e[77]=12;e[78]=13;e[79]=14;e[80]=15;e[81]=16;e[82]=17;e[83]=18;e[84]=19;e[85]=20;e[86]=21;e[87]=22;e[88]=23;e[89]=24;e[90]=25;e[97]=26;e[98]=27;e[99]=28;e[100]=29;e[101]=30;e[102]=31;e[103]=32;e[104]=33;e[105]=34;e[106]=35;e[107]=36;e[108]=37;e[109]=38;e[110]=39;e[111]=40;e[112]=41;e[113]=42;e[114]=43;e[115]=44;e[116]=45;e[117]=46;e[118]=47;e[119]=48;e[120]=49;e[121]=50;e[122]=51;e[48]=52;e[49]=53;e[50]=54;e[51]=55;e[52]=56;e[53]=57;e[54]=58;e[55]=59;e[56]=60;e[57]=61;e[43]=62;e[47]=63;e[61]=64;var f=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/","="];var d=function(t){var s="";var g,h,j="";var k,m,n,o="";var p=0,q=t.length,r=q-q%3;while(p>2;m=((g&3)<<4)|(h>>4);n=((h&15)<<2)|(j>>6);o=j&63;s+=f[k]+f[m]+f[n]+f[o]}if(q-r==2){g=t[p++];h=t[p++];s+=f[g>>2]+f[((g&3)<<4)|(h>>4)]+f[((h&15)<<2)]+"="}else{if(q-r==1){g=t[p++];s+=f[g>>2]+f[((g&3)<<4)]+"=="}}return s};var c=function(t){t=t.replace(/\s/g,"");if(t==""){return[]}var s=[];var g,h,j="";var k,m,n,o="";var p=0,q=t.length,r=q;if(t.slice(-1)=="="){r=q-4}while(p>4);h=((m&15)<<4)|(n>>2);j=((n&3)<<6)|o;s.push(g,h,j)}if(q!=r){k=e[t.charCodeAt(p++)];m=e[t.charCodeAt(p++)];if(t.slice(-2)=="=="){s.push((k<<2)|(m>>4))}else{if(t.slice(-1)=="="){n=e[t.charCodeAt(p++)];s.push((k<<2)|(m>>4),((m&15)<<4)|(n>>2))}}}return s};var b=a.Base64={};b.e=d;b.d=c;b.encode=function(g){if(typeof g=="string"){g=a.Utf8.getByteArray(g)}return d(g)};b.decode=function(g){return a.Utf8.getString(c(g))}})(window);;