text: /**
   * DWZ.min.js
   */
  /* dwz.core */
  function Map(){this.elements=new Array,this.size=function(){return this.elements.length},this.isEmpty=function(){return this.elements.length<1},this.clear=function(){this.elements=new Array},this.put=function(a,b){this.remove(a),this.elements.push({key:a,value:b})},this.remove=function(a){try{for(i=0;i<this.elements.length;i++)if(this.elements[i].key==a)return this.elements.splice(i,1),!0}catch(b){return!1}return!1},this.get=function(a){try{for(i=0;i<this.elements.length;i++)if(this.elements[i].key==a)return this.elements[i].value}catch(b){return null}},this.element=function(a){return 0>a||a>=this.elements.length?null:this.elements[a]},this.containsKey=function(a){try{for(i=0;i<this.elements.length;i++)if(this.elements[i].key==a)return!0}catch(b){return!1}return!1},this.values=function(){var a=new Array;for(i=0;i<this.elements.length;i++)a.push(this.elements[i].value);return a},this.keys=function(){var a=new Array;for(i=0;i<this.elements.length;i++)a.push(this.elements[i].key);return a}}function str2Func(a){var b,c,d;if(!a||0==a.length)return void 0;if($.isFunction(a))return a;for(b=a.split("."),c=this,d=0;d<b.length;d++)c=c[b[d]];return"function"==typeof c?c:void 0}var DWZ={regPlugins:[],keyCode:{ENTER:13,ESC:27,END:35,HOME:36,SHIFT:16,TAB:9,LEFT:37,RIGHT:39,UP:38,DOWN:40,DELETE:46,BACKSPACE:8},eventType:{pageClear:"pageClear",resizeGrid:"resizeGrid",destorySelectzTree:"destory.selectzTree.b-jui"},isOverAxis:function(a,b,c){return a>b&&b+c>a},isOver:function(a,b,c,d,e,f){return this.isOverAxis(a,c,e)&&this.isOverAxis(b,d,f)},pageInfo:{pageNum:"pageNum",numPerPage:"numPerPage",orderField:"orderField",orderDirection:"orderDirection"},statusCode:{ok:200,error:300,timeout:301},keys:{statusCode:"statusCode",message:"message"},ui:{sbar:!0,hideMode:"display"},frag:{},_msg:{},_set:{loginUrl:"",loginTitle:"",debug:!1},msg:function(a,b){var c=function(a,b){var c,d;for(b=b||[],c=a||"",d=0;d<b.length;d++)c=c.replace(new RegExp("\\{"+d+"\\}","g"),b[d]);return c};return c(this._msg[a],b)},debug:function(a){this._set.debug&&("undefined"!=typeof console?console.log(a):alert(a))},loadLogin:function(){$.pdialog&&DWZ._set.loginTitle?$.pdialog.open(DWZ._set.loginUrl,"login",DWZ._set.loginTitle,{mask:!0,width:420,height:260}):window.location=DWZ._set.loginUrl},obj2str:function(a){var c,b=[];if("string"==typeof a)return'"'+a.replace(/([\'\"\\])/g,"\\$1").replace(/(\n)/g,"\\n").replace(/(\r)/g,"\\r").replace(/(\t)/g,"\\t")+'"';if("object"==typeof a){if(a.sort){for(c=0;c<a.length;c++)b.push(DWZ.obj2str(a[c]));b="["+b.join()+"]"}else{for(c in a)b.push(c+":"+DWZ.obj2str(a[c]));document.all&&!/^\n?function\s*toString\(\)\s*\{\n?\s*\[native code\]\n?\s*\}\n?\s*$/.test(a.toString)&&b.push("toString:"+a.toString.toString()),b="{"+b.join()+"}"}return b}return a.toString()},jsonEval:function(data){try{return"string"==$.type(data)?eval("("+data+")"):data}catch(e){return{}}},ajaxError:function(a,b,c){alertMsg?alertMsg.error("<div>Http status: "+a.status+" "+a.statusText+"</div>"+"<div>ajaxOptions: "+b+"</div>"+"<div>thrownError: "+c+"</div>"+"<div>"+a.responseText+"</div>"):alert("Http status: "+a.status+" "+a.statusText+"\najaxOptions: "+b+"\nthrownError:"+c+"\n"+a.responseText)},ajaxDone:function(a){a[DWZ.keys.statusCode]==DWZ.statusCode.error?a[DWZ.keys.message]&&alertMsg&&alertMsg.error(a[DWZ.keys.message]):a[DWZ.keys.statusCode]==DWZ.statusCode.timeout?alertMsg?alertMsg.error(a[DWZ.keys.message]||DWZ.msg("sessionTimout"),{okCall:DWZ.loadLogin}):DWZ.loadLogin():a[DWZ.keys.message]&&alertMsg&&alertMsg.correct(a[DWZ.keys.message])},init:function(a,b){var d,c=$.extend({loginUrl:"login.html",loginTitle:null,callback:null,debug:!1,statusCode:{}},b);this._set.loginUrl=c.loginUrl,this._set.loginTitle=c.loginTitle,this._set.debug=c.debug,$.extend(DWZ.statusCode,c.statusCode),$.extend(DWZ.pageInfo,c.pageInfo),jQuery.ajax({type:"GET",url:a,dataType:"xml",timeout:3e4,cache:!1,error:function(b){alert("Error loading XML document: "+a+"\nHttp status: "+b.status+" "+b.statusText)},success:function(a){$(a).find("_PAGE_").each(function(){var a=$(this).attr("id");a&&(DWZ.frag[a]=$(this).text())}),$(a).find("_MSG_").each(function(){var a=$(this).attr("id");a&&(DWZ._msg[a]=$(this).text())}),jQuery.isFunction(c.callback)&&c.callback()}}),d=$(document),d.isBind(DWZ.eventType.pageClear)||d.bind(DWZ.eventType.pageClear,function(a){var c,b=$(a.target);$.fn.xheditor&&$("textarea.editor",b).xheditor(!1),b.find("select.selectpicker").selectpicker("destroyMenu"),c=$.Event(DWZ.eventType.destorySelectzTree),c&&c.type&&b.find(".j-selectzTree").trigger(DWZ.eventType.destorySelectzTree)})}};!function(a){a.setRegional=function(b,c){a.regional||(a.regional={}),a.regional[b]=c},a.fn.extend({ajaxUrl:function(b){var c=a(this);c.trigger(DWZ.eventType.pageClear),a.ajax({type:b.type||"GET",url:b.url,data:b.data,cache:!1,success:function(d){var e=DWZ.jsonEval(d);e[DWZ.keys.statusCode]==DWZ.statusCode.error?e[DWZ.keys.message]&&alertMsg.error(e[DWZ.keys.message]):(c.html(d).initUI(),a.isFunction(b.callback)&&b.callback(d)),e[DWZ.keys.statusCode]==DWZ.statusCode.timeout&&(a.pdialog&&a.pdialog.checkTimeout(),navTab&&navTab.checkTimeout(),alertMsg.error(e[DWZ.keys.message]||DWZ.msg("sessionTimout"),{okCall:function(){DWZ.loadLogin()}}))},error:DWZ.ajaxError,statusCode:{503:function(a,b,c){alert(DWZ.msg("statusCode_503")||c)}}})},loadUrl:function(b,c,d){a(this).ajaxUrl({url:b,data:c,callback:d})},initUI:function(){return this.each(function(){a.isFunction(initUI)&&initUI(this)})},layoutH:function(b){return this.each(function(){var d,e,f,c=a(this);b||(b=c.parents("div.layoutBox:first")),d=b.height(),e=parseInt(c.attr("layoutH")),f=d-e>50?d-e:50,c.isTag("table")?c.removeAttr("layoutH").wrap('<div layoutH="'+e+'" style="overflow:auto;height:'+f+'px"></div>'):c.height(f).css("overflow","auto")})},isTag:function(b){return b?a(this)[0].tagName.toLowerCase()==b?!0:!1:!1},isBind:function(b){var c=a(this).data("events");return c&&b&&c[b]},log:function(a){return this.each(function(){console&&console.log("%s: %o",a,this)})}}),a.extend(String.prototype,{isPositiveInteger:function(){return new RegExp(/^[1-9]\d*$/).test(this)},isInteger:function(){return new RegExp(/^\d+$/).test(this)},isNumber:function(){return new RegExp(/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/).test(this)},trim:function(){return this.replace(/(^\s*)|(\s*$)|\r|\n/g,"")},startsWith:function(a){return 0===this.indexOf(a)},endsWith:function(a){var b=this.length-a.length;return b>=0&&this.lastIndexOf(a)===b},replaceSuffix:function(a){return this.replace(/\[[0-9]+\]/,"["+a+"]").replace("#index#",a)},replaceSuffix2:function(a){return this.replace(/\-(i)([0-9]+)$/,"-i"+a).replace("#index#",a)},trans:function(){return this.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"')},encodeTXT:function(){return this.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll(" ","&nbsp;")},replaceAll:function(a,b){return this.replace(new RegExp(a,"gm"),b)},replaceTm:function(a){return a?this.replace(RegExp("({[A-Za-z_]+[A-Za-z0-9_]*})","g"),function(b){return a[b.replace(/[{}]+/g,"")]}):this},replaceTmById:function(b){var c=b||a(document);return this.replace(RegExp("({[A-Za-z_]+[A-Za-z0-9_]*})","g"),function(a){var b=c.find("#"+a.replace(/[{}]+/g,""));return b.val()?b.val():a})},isFinishedTm:function(){return!new RegExp("{[A-Za-z_]+[A-Za-z0-9_]*}").test(this)},skipChar:function(a){return this&&0!==this.length?this.charAt(0)===a?this.substring(1).skipChar(a):this:""},isValidPwd:function(){return new RegExp(/^([_]|[a-zA-Z0-9]){6,32}$/).test(this)},isValidMail:function(){return new RegExp(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/).test(this.trim())},isSpaces:function(){var a,b;for(a=0;a<this.length;a+=1)if(b=this.charAt(a)," "!=b&&"\n"!=b&&" "!=b&&"\r"!=b)return!1;return!0},isPhone:function(){return new RegExp(/(^([0-9]{3,4}[-])?\d{3,8}(-\d{1,6})?$)|(^\([0-9]{3,4}\)\d{3,8}(\(\d{1,6}\))?$)|(^\d{3,8}$)/).test(this)},isUrl:function(){return new RegExp(/^[a-zA-z]+:\/\/([a-zA-Z0-9\-\.]+)([-\w .\/?%&=:]*)$/).test(this)},isExternalUrl:function(){return this.isUrl()&&-1==this.indexOf("://"+document.domain)},toBool:function(){return"true"===this.toLowerCase()?!0:!1}})}(jQuery),function(a){a.fn.serializeJson=function(){var b={},c=this.serializeArray();return a(c).each(function(){b[this.name]?a.isArray(b[this.name])?b[this.name].push(this.value):b[this.name]=[b[this.name],this.value]:b[this.name]=this.value}),b}}(jQuery);
  /* dwz.util.date @author ZhangHuihua@msn.com */
  !function(){function LZ(a){return(0>a||a>9?"":"0")+a}function formatDate(a,b){var c,d,e,f,g,h,i,j,k,l,m,C;for(b+="",c="",d=0,e="",f="",g=a.getYear()+"",h=a.getMonth()+1,i=a.getDate(),j=a.getDay(),k=a.getHours(),l=a.getMinutes(),m=a.getSeconds(),C={},g.length<4&&(g=""+(g-0+1900)),C.y=""+g,C.yyyy=g,C.yy=g.substring(2,4),C.M=h,C.MM=LZ(h),C.MMM=MONTH_NAMES[h-1],C.NNN=MONTH_NAMES[h+11],C.d=i,C.dd=LZ(i),C.E=DAY_NAMES[j+7],C.EE=DAY_NAMES[j],C.H=k,C.HH=LZ(k),C.h=0==k?12:k>12?k-12:k,C.hh=LZ(C.h),C.K=k>11?k-12:k,C.k=k+1,C.KK=LZ(C.K),C.kk=LZ(C.k),C.a=k>11?"PM":"AM",C.m=l,C.mm=LZ(l),C.s=m,C.ss=LZ(m);d<b.length;){for(e=b.charAt(d),f="";b.charAt(d)==e&&d<b.length;)f+=b.charAt(d++);c+=null!=C[f]?C[f]:f}return c}function _isInteger(a){return new RegExp(/^\d+$/).test(a)}function _getInt(a,b,c,d){var e,f;for(e=d;e>=c;e--){if(f=a.substring(b,b+e),f.length<c)return null;if(_isInteger(f))return f}return null}function parseDate(a,b){var c,d,e,f,h,i,j,k,l,m,n,o,p,q,r,s,t;for(a+="",b+="",c=0,d=0,e="",f="",j=new Date(1900,0,1),k=j.getYear(),l=j.getMonth()+1,m=1,n=j.getHours(),o=j.getMinutes(),p=j.getSeconds(),q="";d<b.length;){for(e=b.charAt(d),f="";b.charAt(d)==e&&d<b.length;)f+=b.charAt(d++);if("yyyy"==f||"yy"==f||"y"==f){if("yyyy"==f&&(h=4,i=4),"yy"==f&&(h=2,i=2),"y"==f&&(h=2,i=4),k=_getInt(a,c,h,i),null==k)return 0;c+=k.length,2==k.length&&(k=k>70?1900+(k-0):2e3+(k-0))}else if("MMM"==f||"NNN"==f){for(l=0,r=0;r<MONTH_NAMES.length;r++)if(s=MONTH_NAMES[r],a.substring(c,c+s.length).toLowerCase()==s.toLowerCase()&&("MMM"==f||"NNN"==f&&r>11)){l=r+1,l>12&&(l-=12),c+=s.length;break}if(1>l||l>12)return 0}else if("EE"==f||"E"==f){for(r=0;r<DAY_NAMES.length;r++)if(t=DAY_NAMES[r],a.substring(c,c+t.length).toLowerCase()==t.toLowerCase()){c+=t.length;break}}else if("MM"==f||"M"==f){if(l=_getInt(a,c,f.length,2),null==l||1>l||l>12)return 0;c+=l.length}else if("dd"==f||"d"==f){if(m=_getInt(a,c,f.length,2),null==m||1>m||m>31)return 0;c+=m.length}else if("hh"==f||"h"==f){if(n=_getInt(a,c,f.length,2),null==n||1>n||n>12)return 0;c+=n.length}else if("HH"==f||"H"==f){if(n=_getInt(a,c,f.length,2),null==n||0>n||n>23)return 0;c+=n.length}else if("KK"==f||"K"==f){if(n=_getInt(a,c,f.length,2),null==n||0>n||n>11)return 0;c+=n.length}else if("kk"==f||"k"==f){if(n=_getInt(a,c,f.length,2),null==n||1>n||n>24)return 0;c+=n.length,n--}else if("mm"==f||"m"==f){if(o=_getInt(a,c,f.length,2),null==o||0>o||o>59)return 0;c+=o.length}else if("ss"==f||"s"==f){if(p=_getInt(a,c,f.length,2),null==p||0>p||p>59)return 0;c+=p.length}else if("a"==f){if("am"==a.substring(c,c+2).toLowerCase())q="AM";else{if("pm"!=a.substring(c,c+2).toLowerCase())return 0;q="PM"}c+=2}else{if(a.substring(c,c+f.length)!=f)return 0;c+=f.length}}if(c!=a.length)return 0;if(2==l)if(0==k%4&&0!=k%100||0==k%400){if(m>29)return 0}else if(m>28)return 0;return(4==l||6==l||9==l||11==l)&&m>30?0:(12>n&&"PM"==q?n=n-0+12:n>11&&"AM"==q&&(n-=12),new Date(k,l-1,m,n,o,p))}function replaceTmEval(data){return data.replace(RegExp("({[A-Za-z0-9_+-]*})","g"),function($1){return eval("("+$1.replace(/[{}]+/g,"")+")")})}var MONTH_NAMES=new Array("January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"),DAY_NAMES=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tue","Wed","Thu","Fri","Sat");Date.prototype.formatDate=function(a){return formatDate(this,a)},String.prototype.parseDate=function(a){return this.length<a.length&&(a=a.slice(0,this.length)),parseDate(this,a)},Date.prototype.formatDateTm=function(a){var f,g,h,i,b=this.getFullYear(),c=this.getMonth()+1,d=this.getDate(),e=a.replaceAll("%y",b).replaceAll("%M",c).replaceAll("%d",d);return e=replaceTmEval(e),f=1900,g=0,h=1,i=e.split("-"),i.length>0&&(f=i[0]),i.length>1&&(g=i[1]-1),i.length>2&&(h=i[2]),new Date(f,g,h).formatDate("yyyy-MM-dd")}}();
  /* dwz.drag @author Roger Wu */
  !function(a){a.fn.jDrag=function(b){return"string"==typeof b&&"destroy"==b?this.each(function(){a(this).unbind("mousedown",a.rwdrag.start),a.data(this,"pp-rwdrag",null)}):this.each(function(){var d,c=a(this);a.data(a.rwdrag,"pp-rwdrag",{options:a.extend({el:c,obj:c},b)}),b.event?a.rwdrag.start(b.event):(d=b.selector,a(d,obj).bind("mousedown",a.rwdrag.start))})},a.rwdrag={start:function(b){var c,d;document.onselectstart=function(){return!1},c=a.data(this,"pp-rwdrag"),d=c.options.el[0],a.data(d,"pp-rwdrag",{options:c.options}),a.rwdrag.current||(a.rwdrag.current={el:d,oleft:parseInt(d.style.left)||0,otop:parseInt(d.style.top)||0,ox:b.pageX||b.screenX,oy:b.pageY||b.screenY},a(document).bind("mouseup",a.rwdrag.stop).bind("mousemove",a.rwdrag.drag))},drag:function(b){var c,d,e,f,g;return b||(b=window.event),c=a.rwdrag.current,d=a.data(c.el,"pp-rwdrag"),e=c.oleft+(b.pageX||b.clientX)-c.ox,f=c.otop+(b.pageY||b.clientY)-c.oy,1>f&&(f=0),"horizontal"==d.options.move?d.options.minW&&e>=a(d.options.obj).cssv("left")+d.options.minW&&d.options.maxW&&e<=a(d.options.obj).cssv("left")+d.options.maxW?c.el.style.left=e+"px":d.options.scop&&(d.options.relObj?e-parseInt(d.options.relObj.style.left)>d.options.cellMinW&&(c.el.style.left=e+"px"):c.el.style.left=e+"px"):"vertical"==d.options.move?c.el.style.top=f+"px":(g=d.options.selector?a(d.options.selector,d.options.obj):a(d.options.obj),e>=2*-g.outerWidth()/3&&f>=0&&e+g.outerWidth()/3<a(window).width()&&f+g.outerHeight()<a(window).height()&&(c.el.style.left=e+"px",c.el.style.top=f+"px")),d.options.drag&&d.options.drag.apply(c.el,[c.el,b]),a.rwdrag.preventEvent(b)},stop:function(b){var c=a.rwdrag.current,d=a.data(c.el,"pp-rwdrag");return a(document).unbind("mousemove",a.rwdrag.drag).unbind("mouseup",a.rwdrag.stop),d.options.stop&&d.options.stop.apply(c.el,[c.el,b]),a.rwdrag.current=null,document.onselectstart=function(){return!0},a.rwdrag.preventEvent(b)},preventEvent:function(a){return a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),!1}}}(jQuery);
  /* dwz.barDrag @author Roger Wu */
  !function(a){a.fn.cssv=function(b){var c=a(this).css(b);return 1*c.substring(0,c.indexOf("px"))},a.fn.jBar=function(b){var c=a.extend({container:"#container",collapse:".collapse",toggleBut:".toggleCollapse div",sideBar:"#sidebar",sideBar2:"#sidebar_s",splitBar:"#splitBar",splitBar2:"#splitBarProxy"},b);return this.each(function(){var d=this,e=a(c.sideBar2,d),f=a(c.sideBar,d);a(c.toggleBut,f).click(function(){var b,d,g,h;return DWZ.ui.sbar=!1,a(c.splitBar).hide(),b=e.cssv("left")+e.outerWidth(),d=b-f.outerWidth(),g=a(c.container).cssv("left")-(f.outerWidth()-e.outerWidth()),h=f.outerWidth()-e.outerWidth()+a(c.container).outerWidth(),a(c.container).animate({left:g,width:h},50,function(){f.animate({left:d},500,function(){f.hide(),e.show().css("left",-50).animate({left:5},200),a(window).trigger(DWZ.eventType.resizeGrid)})}),a(c.collapse,e).click(function(){function g(){a(c.container).unbind("click",g),DWZ.ui.sbar||f.animate({left:d},500,function(){f.hide()})}var b=e.cssv("left")+e.outerWidth();return f.is(":hidden")?(a(c.toggleBut,f).hide(),f.show().animate({left:b},500),a(c.container).click(g)):f.animate({left:d},500,function(){f.hide()}),!1}),!1}),a(c.toggleBut,e).click(function(){return DWZ.ui.sbar=!0,e.animate({left:-25},200,function(){f.show()}),f.animate({left:5},800,function(){var b,d;a(c.splitBar).show(),a(c.toggleBut,f).show(),b=5+f.outerWidth()+a(c.splitBar).outerWidth(),d=a(c.container).outerWidth()-(b-a(c.container).cssv("left")),a(c.container).css({left:b,width:d}),a(c.collapse,e).unbind("click"),a(window).trigger(DWZ.eventType.resizeGrid)}),!1}),a(c.splitBar).mousedown(function(d){a(c.splitBar2).each(function(){var e=a(this);return setTimeout(function(){e.show()},100),e.css({visibility:"visible",left:a(c.splitBar).css("left")}),e.jDrag(a.extend(b,{obj:a("#sidebar"),move:"horizontal",event:d,stop:function(){var b,d,e,g;a(this).css("visibility","hidden"),b=a(this).cssv("left")-a(c.splitBar).cssv("left"),d=f.outerWidth()+b,e=a(c.container).cssv("left")+b,g=a(c.container).outerWidth()-b,f.css("width",d),a(c.splitBar).css("left",a(this).css("left")),a(c.container).css({left:e,width:g})}})),!1})})})}}(jQuery);
  /* dwz.ui @author ZhangHuihua@msn.com */
  function initEnv(){var b,c;if($("body").append(DWZ.frag.dwzFrag),$.browser.msie&&/6.0/.test(navigator.userAgent))try{document.execCommand("BackgroundImageCache",!1,!0)}catch(a){}$.browser.msie&&window.setInterval("CollectGarbage();",1e4),$(window).resize(function(){initLayout(),$(this).trigger(DWZ.eventType.resizeGrid)}),b=$("#background, #progressBar"),c=$("#background, #progressBar_custom"),b.hide(),c.hide(),$(document).ajaxStart(function(){b.show()}).ajaxStop(function(){b.hide()}),$("#leftside").jBar({minW:150,maxW:700}),$.taskBar&&$.taskBar.init(),navTab.init(),$.fn.switchEnv&&$("#switchEnvBox").switchEnv(),$.fn.navMenu&&$("#navMenu").navMenu(),setTimeout(function(){initLayout(),initUI()},10),$.setRegional("datepicker",{dayNames:["日","一","二","三","四","五","六"],monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]})}function initLayout(){var a=$(window).width()-(DWZ.ui.sbar?$("#sidebar").width()+10:31)-5,b=$(window).height()-$("#header").height()-31;$("#container").width(a),$("#container .tabsPageContent").height(b-31).find("[layoutH]").layoutH(),$("#sidebar, #sidebar_s .collapse, #splitBar, #splitBarProxy").height(b-5),$("#taskbar").css({top:b+$("#header").height()+5,width:$(window).width()})}function initUI(_box){function _datePicker(a){var b=a,c={};b.attr("dateFmt")&&(c.pattern=b.attr("dateFmt")),b.attr("minDate")&&(c.minDate=b.attr("minDate")),b.attr("maxDate")&&(c.maxDate=b.attr("maxDate")),b.attr("mmStep")&&(c.mmStep=b.attr("mmStep")),b.attr("ssStep")&&(c.ssStep=b.attr("ssStep")),b.datepicker(c)}var $p=$(_box||document);$("table.j-table",$p).jTable(),$("div.tabs",$p).each(function(){var a=$(this),b={};b.currentIndex=a.attr("currentIndex")||0,b.eventType=a.attr("eventType")||"click",a.tabs(b)}),$.fn.uploadify&&$.fn.Huploadify&&$(":file[uploaderOption]",$p).each(function(){var d,a=$(this),b={swf:"DWZ/plugins/uploadify/scripts/uploadify.swf",fileObjName:a.attr("name")||"file",auto:!0,multi:!1,height:26,onUploadError:uploadifyError,breakPoints:!1,saveInfoLocal:!0,previewImg:!0,previewLoadimg:"DWZ/plugins/Huploadify/images/loading.gif",dragDrop:!0,showUploadedSize:!0,removeTimeout:1e3},c=DWZ.jsonEval(a.attr("uploaderOption"));$.extend(b,c),window.FileReader?(d=$('<div id="'+a.attr("id")+'"></div>'),d.insertBefore(a).Huploadify(b),a.remove()):a.uploadify(b)}),$.fn.datepicker&&$("input.date",$p).each(function(){_datePicker($(this))}),$("a[target=navTab]",$p).each(function(){$(this).click(function(event){var title,tabid,fresh,external,url,reloadtips,$this=$(this);return $this.parent().addClass("active").siblings().removeClass("active"),title=$this.attr("title")||$this.text(),tabid=$this.attr("rel")||"_blank",fresh=eval($this.attr("fresh")||"true"),external=eval($this.attr("external")||"false"),url=unescape($this.attr("href")).replaceTmById($(event.target).parents(".unitBox:first")),reloadtips=$this.attr("reloadtips"),DWZ.debug(url),url.isFinishedTm()?(navTab.openTab(tabid,url,{title:title,fresh:fresh,external:external,reloadtips:reloadtips}),event.preventDefault(),void 0):(alertMsg.error($this.attr("warn")||DWZ.msg("alertSelectMsg")),!1)})}),$("a[target=dialog]",$p).each(function(){$(this).click(function(event){var url,$this=$(this),title=$this.attr("title")||$this.text(),rel=$this.attr("rel")||"_blank",options={},w=$this.attr("width"),h=$this.attr("height");return w&&(options.width=w),h&&(options.height=h),options.max=eval($this.attr("max")||"false"),options.mask=eval($this.attr("mask")||"false"),options.maxable=eval($this.attr("maxable")||"true"),options.minable=eval($this.attr("minable")||"true"),options.fresh=eval($this.attr("fresh")||"true"),options.resizable=eval($this.attr("resizable")||"true"),options.drawable=eval($this.attr("drawable")||"true"),options.close=eval($this.attr("close")||""),options.param=$this.attr("param")||"",url=unescape($this.attr("href")).replaceTmById($(event.target).parents(".unitBox:first")),DWZ.debug(url),url.isFinishedTm()?($.pdialog.open(url,rel,title,options),!1):(alertMsg.error($this.attr("warn")||DWZ.msg("alertSelectMsg")),!1)})}),$("a[target=ajax]",$p).each(function(){$(this).click(function(a){var d,b=$(this),c=b.attr("rel");c&&(d=$("#"+c),d.loadUrl(b.attr("href"),{},function(){d.find("[layoutH]").layoutH()})),a.preventDefault()})}),$("div.pagination-box",$p).each(function(){var a=$(this);a.pagination({targetType:a.attr("targetType"),rel:a.attr("rel"),totalCount:a.attr("totalCount"),numPerPage:a.attr("numPerPage"),pageNumShown:a.attr("pageNumShown"),currentPage:a.attr("currentPage")})}),$.fn.ajaxTodo&&$("a[target=ajaxTodo]",$p).ajaxTodo(),$.fn.dwzExport&&$("a[target=dwzExport]",$p).dwzExport(),$.fn.checkedExport&&$("a[target=checkedExport]",$p).checkedExport(),$.fn.checkedAjaxTodo&&$("a[target=checkedAjaxTodo]",$p).checkedAjaxTodo(),$.fn.lookup&&$("a[lookupGroup]",$p).lookup(),$.fn.multLookup&&$("[multLookup]:button",$p).multLookup(),$.fn.suggest&&$("input[suggestFields]",$p).suggest(),$.fn.itemDetail&&$("table.itemDetail",$p).itemDetail(),$.fn.selectedTodo&&$("a[target=selectedTodo]",$p).selectedTodo(),$.fn.pagerForm&&$("form[rel=pagerForm]",$p).pagerForm({parentBox:$p}),$.each(DWZ.regPlugins,function(a,b){b($p)}),$(".j-accordion",$p).each(function(){var a=$(this),b=function(b,c){var e,f,d=a.data("offsety")||0;c=c||$(b).height()-1*d,e=a.find(".panel-heading"),f=e.outerHeight(),a.css("height",c),c=c-f*e.length-5*e.length,a.find(".panel-collapse").find(".panel-body").css("height",c)},c=a.data("heightbox"),d=a.data("height");(c||d)&&(b(c,d),$(window).resize(function(){b(c,d)})),a.on("shown.bs.collapse",function(){var b=a.find("[data-toggle=collapse]");b.find("i").removeClass("fa-caret-square-o-down").addClass("fa-caret-square-o-right"),b.removeClass("active").not(".collapsed").addClass("active").find("i").removeClass("fa-caret-square-o-right").addClass("fa-caret-square-o-down")})}),$(".j-showMoreSearch",$p).each(function(){var c,a=$(this),b=a.attr("rel");b||(b=(new Date).getTime()),b="moreSearch_"+b,c=$p.find(".moreSearch"),a.click(function(){0!=c.length&&(c.is(":visible")?(a.html('<i class="fa fa-angle-double-down"></i>'),$("body").data(b,!1)):(a.html('<i class="fa fa-angle-double-up"></i>'),$("body").data(b,!0)),c.fadeToggle("slow","linear"))}),$("body").data(b)&&(c.fadeIn(),a.html('<i class="fa fa-angle-double-up"></i>'))}),$(".j-icheck").iCheck({checkboxClass:"icheckbox_minimal-purple",radioClass:"iradio_minimal-purple",increaseArea:"20%"}),$(":checkbox.checkboxCtrl",$p).on("ifChanged",function(a){var b=1==a.target.checked?"check":"uncheck",c=$(this).attr("group");$(":checkbox[name='"+c+"']",$p).iCheck(b)}),$("textarea.autosize",$p).autosize(),$(":text, :password, textarea",$p).each(function(){var c,d,a=$(this),b=a.closest("table.itemDetail");if(!b.length){if(c=a.attr("size")||a.attr("cols"),!c)return;d=10*c,d&&a.css("width",d)}}),$("form.form-validate",$p).each(function(){var a=$(this),b=a.attr("overflowDIV")||".pageFormContent",c=a.attr("callback")||DWZ.ajaxDone;c&&(c=str2Func(c)),a.validationEngine({isOverflown:!0,overflowDIV:b,promptPosition:"bottomRight",onValidationComplete:function(a,b){return b?validateCallback(a,c):!1}})}),$("form[noEnter]",$p).each(function(){$(":text",$(this)).keypress(function(a){var b=a.which;return 13==b?!1:void 0})}),$("table.itemDetail tbody",$p).each(function(){function b(a,b){a.attr("isreadonly","").find(".form-control").each(function(){var a=$(this);a.removeClass("readonly").prop("readonly",!1),a.hasClass("date")&&_datePicker&&_datePicker(a)}),a.find(".j-lookup, .uploadify",a).show(),a.find("button.selectpicker").prop("disabled",!1),b&&b.text("完成")}function c(a,b){a.attr("isreadonly",!0).find(".form-control").addClass("readonly").prop("readonly",!0).css("cursor","text"),a.find(".j-lookup, .uploadify").hide(),a.find("button.selectpicker").prop("disabled",!0),a.find("input.date").off("click"),b&&b.text("编辑")}var a=$(this);a.find("tr.readonly").each(function(){c($(this))}),a.find(".j-edit").click(function(){var a=$(this),d=a.closest("tr");d.attr("isreadonly")?b(d,a):c(d,a)}),a.on("dblclick","tr.readonly",function(){var a=$(this),d=a.find(".j-edit");a.attr("isreadonly")?b(a,d):c(a,d)})}),$.fn.colorpicker&&($(".j-colorpicker",$p).each(function(){var a=$(this),b=a.attr("isbgcolor");a.colorpicker(),b&&a.on("changeColor",function(b){a.css("background",b.color.toHex())})}),$(".j-clearcolor",$p).each(function(){var a=$(this),b=a.attr("element");b&&a.click(function(){$(b).val("").css("background","")})})),$("textarea.j-content",$p).each(function(){var b,a=$(this);pasteType=a.attr("pasteType"),uploadJson=a.attr("uploadJson"),fileManagerJson=a.attr("fileManagerJson"),items=a.attr("items"),minHeight=a.attr("minHeight")||260,autoHeight=a.attr("autoHeight"),afterUpload=a.attr("afterUpload")||null,afterSelectFile=a.attr("afterSelectFile")||null,X_afterSelect=a.attr("X_afterSelect")||null,items=items?items.split(","):KindEditor.options.items,afterUpload&&(afterUpload=str2Func(afterUpload)),afterSelectFile&&(afterSelectFile=str2Func(afterSelectFile)),X_afterSelect&&(X_afterSelect=str2Func(X_afterSelect)),autoHeight&&"true"!=autoHeight&&(autoHeight=!1),b={font:[],span:[".color",".background-color",".font-size",".font-family"],div:[".margin",".padding",".text-align"],table:["align","width"],"td,th":["align","valign","width","height","colspan","rowspan"],a:["href","target","name"],embed:["src","width","height","type","loop","autostart","quality",".width",".height","align","allowscriptaccess"],img:["src","width","height","border","alt","title","align",".width",".height",".border"],"p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6":["class","align",".text-align",".color",".font-weight",".font-style",".text-decoration",".vertical-align",".text-indent",".margin-left"],pre:["class"],hr:["class",".page-break-after"],"br,tbody,tr,strong,b,sub,sup,em,i,u,strike,s,del":[]},KindEditor.create(a,{pasteType:pasteType,minHeight:minHeight,autoHeightMode:autoHeight,items:items,uploadJson:uploadJson,fileManagerJson:fileManagerJson,allowFileManager:!0,fillDescAfterUploadImage:!0,afterUpload:afterUpload,afterSelectFile:afterSelectFile,X_afterSelect:X_afterSelect,htmlTags:b,cssPath:"DWZ/editor-content.css",afterBlur:function(){this.sync()}})}),$.fn.zTree&&$(".ztree",$p).each(function(){function A(a,b){var c=b.level,d=$("#"+b.tId+y),e=$("#diyBtn_add_"+b.id),f=$("#diyBtn_del_"+b.id);e.length||g>c&&($edit=$('<a href="javascript:;" class="tree_add" id="diyBtn_add_'+b.id+'" title="添加"></a>'),$edit.appendTo(d),$edit.on("click",function(){z.addNodes(b,{name:"新增Item"})})),f.length||(f=$('<a href="javascript:;" class="tree_del" id="diyBtn_del_'+b.id+'" title="删除"></a>'),f.appendTo(d),f.on("click",function(c){var e,f,d=function(){alertMsg.confirm("确认要删除 "+b.name+" 吗？",{okCall:function(){if(z.removeNode(b),t){var d=str2Func(t);d&&d.call(d,c,a,b)}},cancelCall:function(){}})};r?(e=str2Func(r),e&&(f=e.call(e,a,b),f&&1==f&&d())):d()}))}function B(a,b){var c=$("#diyBtn_add_"+b.id),d=$("#diyBtn_del_"+b.id);c&&c.length&&c.off("click").remove(),d&&d.length&&d.off("click").remove()}function C(a,b){for(var c=0,d=b.length;d>c;c++)if(b[c].drag===!1)return!1;return!0}function D(a,b,c){return c?c.drop!==!1:!0}var 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=$(this),b=jQuery.parseJSON(a.attr("attrs"));b&&(c=b.expandAll||!1,d=b.simpleData||!0,e=b.addHoverDom||null,f=b.removeHoverDom||null,g=b.maxAddLevel||2,h=b.addDiyDom||null,i=b.editEnable||!1,j=b.showRemoveBtn||!1,k=b.showRenameBtn||!1,l=b.checkEnable||!1,m=b.chkStyle||"checkbox",n=b.radioType||null,o=b.onClick||null,p=b.beforeDrag||null,q=b.beforeDrop||null,r=b.beforeRemove||null,s=b.onDrop||null,t=b.onRemove||null,u=b.onCheck||null,v=a.attr("nodes"),v&&(v=v.replace(/&apos;/g,"'"),w=jQuery.parseJSON(v),e&&(e="edit"==e?A:str2Func(e)),f&&(f="edit"==f?B:str2Func(f)),x={view:{addHoverDom:e||null,removeHoverDom:f||null,addDiyDom:null!=h?str2Func(h):null},edit:{enable:i,showRemoveBtn:j,showRenameBtn:k},check:{enable:l,chkStyle:m,radioType:n},callback:{onClick:null!=o?str2Func(o):null,beforeDrag:null!=p?str2Func(p):C,beforeDrop:null!=q?str2Func(q):D,onDrop:null!=s?str2Func(s):null,onCheck:null!=u?str2Func(u):null,beforeRemove:null!=r?str2Func(r):null,onRemove:null!=t?str2Func(t):null},data:{simpleData:{enable:d}}},$.fn.zTree.init(a,x,w),y="_a",z=$.fn.zTree.getZTreeObj(a.attr("id")),c&&z.expandAll(!0)))}),$(".j-selectzTree",$p).each(function(){var g,h,i,j,a=$(this),b=$(a.data("tree")),c=a.data("width")||a.outerWidth(),d=a.data("height")||"auto",f=(parseFloat(a.css("width")),a.outerHeight());b&&b.length&&(g=b.attr("id"),h=$("#"+g+"_select_box"),i=function(c){var j,k,e=a.offset().top,g=a.offset().left,h=b.clone().appendTo($("body")),i=h.outerHeight();h.remove(),j=$(window).height()-i-e-f,k=$(window).height()-e-f,"auto"==d&&0>j&&(k+=j),c.css({top:e+f,left:g,"max-height":k})},a.click(function(){var e,f;return h&&h.length?(i(h),h.show(),void 0):(e=2,f=$.pdialog.getCurrent(),f&&f.length&&(e=f.css("zIndex")+1),h=$('<div id="'+g+'_select_box" class="tree-box"></div>').css({position:"absolute",zIndex:e,"min-width":c,height:d,overflow:"auto",background:"#FAFAFA",border:"1px #EEE solid"}).hide().appendTo($("body")),b.appendTo(h).css("width","100%").data("fromObj",a).removeClass("hide").show(),i(h),h.show(),void 0)}),$("body").on("mousedown",function(b){var c=$(b.target);a[0]==b.target||h&&h.length>0&&c.closest(".tree-box").length>0||h.hide()}),j=a.closest("[layoutH]"),j&&j.length&&j.scroll(function(){h&&h.length&&i(h)}),a.on("destory.selectzTree.b-jui",function(){h.remove()}))}),$("select.selectpicker",$p).selectpicker(),$("select.selectpicker",$p).change(function(){var a=$(this),b=$(a.data("nextselect")),c=a.data("refurl"),d=function(a){var c,b=$(a.data("nextselect"));b&&b.length&&(c=b.data("emptytxt")||"&nbsp;",b.html("<option>"+c+"</option>").selectpicker("refresh"),d(b))};b&&b.length&&c&&$.ajax({type:"POST",dataType:"json",url:c.replace("{value}",encodeURIComponent(a.val())),cache:!1,data:{},success:function(a){if(a){var c="";$.each(a,function(b){a[b]&&a[b].length>1&&(c+='<option value="'+a[b][0]+'">'+a[b][1]+"</option>")}),c||(c=b.data("emptytxt")||"&nbsp;",c="<option>"+c+"</option>"),b.html(c).selectpicker("refresh"),d(b)}},error:DWZ.ajaxError})}),$.fn.tags&&$(".tags-control",$p).each(function(){var a=$(this),b=a.data("url"),c=a.data("type")||"GET",d=a.data("parametername")||"tagName",e=a.data("max")||0,f=a.data("clearnotfound")||!1;a.tags({url:b,type:c,parameterName:d,max:e,clearNotFound:f})}),$(".j-tooltip",$p).each(function(){var a=$(this),b=a.data("html")||!1,c=a.data("placement")||"auto",d=a.data("content")||$(a.data("el-content")).html()||a.attr("title")||!1;a.tooltip({html:b,placement:c,title:d,container:"body"})}),$(".j-popover",$p).each(function(){var a=$(this),b=a.data("html")||!1,c=a.data("content")||$(a.data("el-content")).html()||!1,d=a.data("placement")||"auto",e=a.data("trigger")||"click";a.popover({html:b,placement:d,content:c,trigger:e})}),$.fn.dragsort&&$(".j-dragsort",$p).each(function(){var i,a=$(this),b=a.data("selector")||"div",c=a.data("exclude")||"input, textarea",d=a.data("dragend"),e=a.data("between")||!1,f=a.data("placeholder"),g=a.data("scrollcontainer")||window,h=a.data("otherbox")||null;f=f?$(f).html():'<li class="placeHolder"><div></div></li>',d=d?str2Func(d)||function(){}:function(){},g&&g!=window&&(g=a.closest(g),g.length||(g=window)),i=a,h&&$(h).length&&(i=a.add(h)),i.dragsort({dragSelector:b,dragSelectorExclude:c,dragEnd:d,dragBetween:e,placeHolderTemplate:f,scrollContainer:g})})}
  /* dwz.theme @author ZhangHuihua@msn.com */
  !function(a){a.fn.extend({theme:function(b){var c=a.extend({themeBase:"themes"},b),d=c.themeBase+"/#theme#/core.css";return this.each(function(){var e,b=a(this).find("li[theme]"),c=function(c){a("head").find("link[href$='core.css']").attr("href",d.replace("#theme#",c)),b.find("i").removeClass("fa-check-circle").addClass("fa-circle"),b.filter("[theme="+c+"]").find("i").removeClass("fa-circle").addClass("fa-check-circle"),a.isFunction(a.cookie)&&a.cookie("dwz_theme",c,{path:"/",expires:30})};b.each(function(){var d=a(this),e=d.attr("theme");d.click(function(){c(e)})}),a.isFunction(a.cookie)&&(e=a.cookie("dwz_theme"),e?c(e):c("purple"))})}})}(jQuery);
  /* dwz.alertMsg @author ZhangHuihua@msn.com */
  $.setRegional("alertMsg",{title:{error:"错误",info:"信息",warn:"警告",correct:"成功",confirm:"确认"},butMsg:{ok:"确定",yes:"是",no:"否",cancel:"取消"}});var alertMsg={_boxId:"#alertMsgBox",_bgId:"#alertBackground",_closeTimer:null,_types:{error:"error",info:"info",warn:"warn",correct:"correct",confirm:"confirm"},_fas:{error:"fa-times-circle",info:"fa-info-circle",warn:"fa-exclamation-circle",correct:"fa-check-circle",confirm:"fa-question-circle"},_getTitle:function(a){return $.regional.alertMsg.title[a]},_keydownOk:function(a){return a.keyCode==DWZ.keyCode.ENTER&&a.data.target.trigger("click"),!1},_keydownEsc:function(a){a.keyCode==DWZ.keyCode.ESC&&a.data.target.trigger("click")},_open:function(a,b,c){var d,e,f,g,h,i,j;if($(this._boxId).remove(),d="",c)for(e=0;e<c.length;e++)f=c[e].call?"callback":"",d+=DWZ.frag.alertButFrag.replace("#butMsg#",c[e].name).replace("#callback#",f);for(g=DWZ.frag.alertBoxFrag.replace("#type#",a).replace("#fa#",this._fas[a]).replace("#title#",this._getTitle(a)).replace("#message#",b).replace("#butFragment#",d),$(g).appendTo("body").css({top:-$(this._boxId).height()+"px"}).animate({top:"0px"},500),this._closeTimer&&(clearTimeout(this._closeTimer),this._closeTimer=null),this._types.info==a||this._types.correct==a?this._closeTimer=setTimeout(function(){alertMsg.close()},3500):$(this._bgId).show(),h=$(this._boxId).find(".btn"),i=h.filter("[rel=callback]"),j=$(document),e=0;e<c.length;e++)c[e].call&&i.eq(e).click(c[e].call),c[e].keyCode==DWZ.keyCode.ENTER&&j.bind("keydown",{target:h.eq(e)},this._keydownOk),c[e].keyCode==DWZ.keyCode.ESC&&j.bind("keydown",{target:h.eq(e)},this._keydownEsc)},close:function(){$(document).unbind("keydown",this._keydownOk).unbind("keydown",this._keydownEsc),$(this._boxId).animate({top:-$(this._boxId).height()},500,function(){$(this).remove()}),$(this._bgId).hide()},error:function(a,b){this._alert(this._types.error,a,b)},info:function(a,b){this._alert(this._types.info,a,b)},warn:function(a,b){this._alert(this._types.warn,a,b)},correct:function(a,b){this._alert(this._types.correct,a,b)},_alert:function(a,b,c){var e,d={okName:$.regional.alertMsg.butMsg.ok,okCall:null};$.extend(d,c),e=[{name:d.okName,call:d.okCall,keyCode:DWZ.keyCode.ENTER}],this._open(a,b,e)},confirm:function(a,b){var d,c={okName:$.regional.alertMsg.butMsg.ok,okCall:null,cancelName:$.regional.alertMsg.butMsg.cancel,cancelCall:null};$.extend(c,b),d=[{name:c.okName,call:c.okCall,keyCode:DWZ.keyCode.ENTER},{name:c.cancelName,call:c.cancelCall,keyCode:DWZ.keyCode.ESC}],this._open(this._types.confirm,a,d)}};
  /* dwz.contextmenu @author ZhangHuihua@msn.com */
  !function(a){function e(e,g,h){var l,m,j=d[e],k=a(DWZ.frag[j.id]);b.html(k),a.each(j.bindings,function(c,d){a("[rel='"+c+"']",b).bind("click",function(){f(),d(a(g),a("#"+j.id))})}),l=h.pageX,m=h.pageY,a(window).width()<l+b.width()&&(l-=b.width()),a(window).height()<m+b.height()&&(m-=b.height()),b.css({left:l,top:m}).show(),j.shadow&&c.css({width:b.width(),height:b.height(),left:l+3,top:m+3}).show(),a(document).one("click",f),a.isFunction(j.ctrSub)&&j.ctrSub(a(g),a("#"+j.id))}function f(){b.hide(),c.hide()}var b,c,d;a.fn.extend({contextMenu:function(f,g){var i,h=a.extend({shadow:!0,bindings:{},ctrSub:null},g);return b||(b=a('<div id="contextmenu"></div>').appendTo("body").hide()),c||(c=a('<div id="contextmenuShadow"></div>').appendTo("body").hide()),d=d||[],d.push({id:f,shadow:h.shadow,bindings:h.bindings||{},ctrSub:h.ctrSub}),i=d.length-1,a(this).bind("contextmenu",function(a){return e(i,this,a,h),!1}),this}})}(jQuery);
  /* dwz.navTab @author ZhangHuihua@msn.com */
  var navTab={componentBox:null,_tabBox:null,_prevBut:null,_nextBut:null,_panelBox:null,_moreBut:null,_moreBox:null,_currentIndex:0,_op:{id:"navTab",stTabBox:".navTab-tab",stPanelBox:".navTab-panel",mainTabId:"main",close$:"span.close",prevClass:"tabsLeft",nextClass:"tabsRight",stMore:".tabsMore",stMoreLi:"ul.tabsMoreList"},init:function(a){$.History&&$.History.init("#container");var b=this;$.extend(this._op,a),this.componentBox=$("#"+this._op.id),this._tabBox=this.componentBox.find(this._op.stTabBox),this._panelBox=this.componentBox.find(this._op.stPanelBox),this._prevBut=this.componentBox.find("."+this._op.prevClass),this._nextBut=this.componentBox.find("."+this._op.nextClass),this._moreBut=this.componentBox.find(this._op.stMore),this._moreBox=this.componentBox.find(this._op.stMoreLi),this._prevBut.click(function(){b._scrollPrev()}),this._nextBut.click(function(){b._scrollNext()}),this._moreBut.click(function(){return b._moreBox.show(),!1}),$(document).click(function(){b._moreBox.hide()}),this._contextmenu(this._tabBox),this._contextmenu(this._getTabs()),this._init(),this._ctrlScrollBut()},_init:function(){var a=this;this._getTabs().each(function(b){$(this).unbind("click").click(function(){a._switchTab(b)}),$(this).find(navTab._op.close$).unbind("click").click(function(){a._closeTab(b)})}),this._getMoreLi().each(function(b){$(this).find(">a").unbind("click").click(function(){a._switchTab(b)})}),this._switchTab(this._currentIndex)},_contextmenu:function(a){var b=this;a.contextMenu("navTabCM",{bindings:{reload:function(a){b._reload(a,!0)},closeCurrent:function(a){var d=a.attr("tabid");d?b.closeTab(d):b.closeCurrentTab()},closeOther:function(a){var d=b._indexTabId(a.attr("tabid"));b._closeOtherTab(d>0?d:b._currentIndex)},closeAll:function(){b.closeAllTab()}},ctrSub:function(a,c){var d=c.find("[rel='reload']"),e=c.find("[rel='closeCurrent']"),f=c.find("[rel='closeOther']"),g=c.find("[rel='closeAll']"),h=b._getTabs();h.size()<2&&(e.addClass("disabled"),f.addClass("disabled"),g.addClass("disabled")),0==b._currentIndex||a.attr("tabid")==b._op.mainTabId?(e.addClass("disabled"),d.addClass("disabled")):2==h.size()&&f.addClass("disabled")}})},_getTabs:function(){return this._tabBox.find("> li")},_getPanels:function(){return this._panelBox.find("> div")},_getMoreLi:function(){return this._moreBox.find("> li")},_getTab:function(a){var b=this._indexTabId(a);return b>=0?this._getTabs().eq(b):void 0},getPanel:function(a){var b=this._indexTabId(a);return b>=0?this._getPanels().eq(b):void 0},_getTabsW:function(a,b){return this._tabsW(this._getTabs().slice(a,b))},_tabsW:function(a){var b=0;return a.each(function(){b+=$(this).outerWidth(!0)}),b},_indexTabId:function(a){if(!a)return-1;var b=-1;return this._getTabs().each(function(c){return $(this).attr("tabid")==a?(b=c,void 0):void 0}),b},_getLeft:function(){return this._tabBox.position().left},_getScrollBarW:function(){return this.componentBox.width()-55},_visibleStart:function(){var d,a=this._getLeft(),b=0,c=this._getTabs();for(d=0;d<c.size();d++){if(b+a>=0)return d;b+=c.eq(d).outerWidth(!0)}return 0},_visibleEnd:function(){var d,a=this._getLeft(),b=0,c=this._getTabs();for(d=0;d<c.size();d++)if(b+=c.eq(d).outerWidth(!0),b+a>this._getScrollBarW())return d;return c.size()},_scrollPrev:function(){var a=this._visibleStart();a>0&&this._scrollTab(-this._getTabsW(0,a-1))},_scrollNext:function(){var a=this._visibleEnd();a<this._getTabs().size()&&this._scrollTab(-this._getTabsW(0,a+1)+this._getScrollBarW())},_scrollTab:function(a){var c=this;this._tabBox.animate({left:a+"px"},200,function(){c._ctrlScrollBut()})},_scrollCurrent:function(){var a=this._tabsW(this._getTabs());a<=this._getScrollBarW()?this._scrollTab(0):this._getLeft()<this._getScrollBarW()-a?this._scrollTab(this._getScrollBarW()-a):this._currentIndex<this._visibleStart()?this._scrollTab(-this._getTabsW(0,this._currentIndex)):this._currentIndex>=this._visibleEnd()&&this._scrollTab(this._getScrollBarW()-this._getTabs().eq(this._currentIndex).outerWidth(!0)-this._getTabsW(0,this._currentIndex))},_ctrlScrollBut:function(){var a=this._tabsW(this._getTabs());this._getScrollBarW()>a?(this._prevBut.hide(),this._nextBut.hide(),this._tabBox.parent().removeClass("tabsPageHeaderMargin")):(this._prevBut.show().removeClass("tabsLeftDisabled"),this._nextBut.show().removeClass("tabsRightDisabled"),this._tabBox.parent().addClass("tabsPageHeaderMargin"),this._getLeft()>=0?this._prevBut.addClass("tabsLeftDisabled"):this._getLeft()<=this._getScrollBarW()-a&&this._nextBut.addClass("tabsRightDisabled"))},_switchTab:function(a){var b=this._getTabs().removeClass("active").eq(a).addClass("active");"offsets"==DWZ.ui.hideMode?this._getPanels().css({position:"absolute",top:"-100000px",left:"-100000px"}).eq(a).css({position:"",top:"",left:""}):this._getPanels().hide().eq(a).show(),this._getMoreLi().removeClass("active").eq(a).addClass("active"),this._currentIndex=a,this._scrollCurrent(),this._reload(b)},_closeTab:function(a,b){if(this._getTabs().eq(a).remove(),this._getPanels().eq(a).trigger(DWZ.eventType.pageClear).remove(),this._getMoreLi().eq(a).remove(),this._currentIndex>=a&&this._currentIndex--,b){var c=this._indexTabId(b);c>0&&(this._currentIndex=c)}this._init(),this._scrollCurrent(),this._reload(this._getTabs().eq(this._currentIndex))},closeTab:function(a){var b=this._indexTabId(a);b>0&&this._closeTab(b)},closeCurrentTab:function(a){this._currentIndex>0&&this._closeTab(this._currentIndex,a)},closeAllTab:function(){this._getTabs().filter(":gt(0)").remove(),this._getPanels().filter(":gt(0)").trigger(DWZ.eventType.pageClear).remove(),this._getMoreLi().filter(":gt(0)").remove(),this._currentIndex=0,this._init(),this._scrollCurrent()},_closeOtherTab:function(a){if(a=a||this._currentIndex,a>0){var b=":eq("+a+")";this._getTabs().not(b).filter(":gt(0)").remove(),this._getPanels().not(b).filter(":gt(0)").trigger(DWZ.eventType.pageClear).remove(),this._getMoreLi().not(b).filter(":gt(0)").remove(),this._currentIndex=1,this._init(),this._scrollCurrent()}else this.closeAllTab()},_loadUrlCallback:function(a){a.find("[layoutH]").layoutH(),a.find(":button.btn-close").click(function(){navTab.closeCurrentTab()})},_reload:function(a,b,c){var d,e,f,g;b=b||a.data("reloadFlag"),d=a.attr("url"),b&&d&&(a.data("reloadFlag",null),e=this.getPanel(a.attr("tabid")),a.hasClass("external")?navTab.openExternal(d,e):(f=$("#pagerForm",e),g=f.size()>0?f.serializeArray():{},navTab._reloadTab(e,{type:c||f.attr("method")||"GET",url:d,data:g})))},_reloadTab:function(a,b){a.ajaxUrl({type:b.type||"GET",url:b.url,data:b.data,callback:function(){navTab._loadUrlCallback(a)}})},reloadFlag:function(a){var b=this._getTab(a);b&&(this._indexTabId(a)==this._currentIndex?this._reload(b,!0):b.data("reloadFlag",1))},reload:function(a,b){var f,g,c=$.extend({type:"GET",data:{},navTabId:"",callback:null},b),d=c.navTabId?this._getTab(c.navTabId):this._getTabs().eq(this._currentIndex),e=c.navTabId?this.getPanel(c.navTabId):this._getPanels().eq(this._currentIndex);e&&(a||(a=d.attr("url")),a&&(d.hasClass("external")?navTab.openExternal(a,e):($.isEmptyObject(c.data)&&(f=$("#pagerForm",e),c.data=f.size()>0?f.serializeJson():{},c.clearQuery&&(g={pageNum:1,numPerPage:30,orderField:"orderField",orderDirection:"orderDirection"},$.each(g,function(a){for(a in c.data)g[a]&&(g[a]=c.data[a])}),c.data=g)),navTab._reloadTab(e,{type:c.type,url:a,data:c.data}))))},getCurrentPanel:function(){return this._getPanels().eq(this._currentIndex)},checkTimeout:function(){var a=DWZ.jsonEval(this.getCurrentPanel().html());a&&a[DWZ.keys.statusCode]==DWZ.statusCode.timeout&&this.closeCurrentTab()},openExternal:function(a,b){var c=navTab._panelBox.height();b.html(DWZ.frag.externalFrag.replaceAll("{url}",a).replaceAll("{height}",c+"px"))},openTab:function(a,b,c){var f,g,h,i,j,k,l,m,d=$.extend({title:"New Tab",type:"GET",data:{},fresh:!0,external:!1},c),e=this._indexTabId(a);e>=0?(f=this._getTabs().eq(e),g=f.attr("tabid")==this._op.mainTabId?"> span > span":"> span",h=this._getPanels().eq(e),(d.fresh||f.attr("url")!=b)&&(f.attr("url",b),i=$("#pagerForm",h),j=c.type||i.attr("method")||d.type,k=function(){f.find(">a").attr("title",d.title).find(g).html(d.title),navTab._reload(f,!0,j)},d.reloadtips?alertMsg.confirm(d.reloadtips,{okCall:function(){k()}}):k()),this._currentIndex=e):(l='<li tabid="#tabid#"><a href="javascript:" title="#title#"><span>#title#</span></a><span class="close">&times;</span></li>',this._tabBox.append(l.replaceAll("#tabid#",a).replaceAll("#title#",d.title)),this._panelBox.append('<div class="page unitBox"></div>'),this._moreBox.append('<li><a href="javascript:" title="#title#">#title#</a></li>'.replaceAll("#title#",d.title)),m=this._getTabs(),f=m.filter(":last"),h=this._getPanels().filter(":last"),d.external||b.isExternalUrl()?(f.addClass("external"),navTab.openExternal(b,h)):(f.removeClass("external"),navTab._reloadTab(h,{url:b,data:d.data})),$.History&&setTimeout(function(){$.History.addHistory(a,function(a){var b=navTab._indexTabId(a);b>=0&&navTab._switchTab(b)},a)},10),this._currentIndex=m.size()-1,this._contextmenu(m.filter(":last"))),this._init(),this._scrollCurrent(),this._getTabs().eq(this._currentIndex).attr("url",b)}};
  /* dwz.tab @author ZhangHuihua@msn.com */
  !function(a){a.fn.extend({tabs:function(b){function d(b){var f=b.add(a("> *",b)),g=a(c.stTabHeader,f),h=a(c.stTab+" li",g),i=a(c.stTabPanel+" > *",f);h.unbind().find("a").unbind(),g.find("."+c.prevClass).unbind(),g.find("."+c.nextClass).unbind(),h.each(function(f){c.currentIndex==f?a(this).addClass("selected"):a(this).removeClass("selected"),"hover"==c.eventType?a(this).hover(function(){e(b,f)}):a(this).click(function(){e(b,f)}),a("a",this).each(function(){a(this).hasClass(c.ajaxClass)?a(this).click(function(a){var b=i.eq(f);this.href&&!b.attr("loaded")&&b.loadUrl(this.href,{},function(){b.find("[layoutH]").layoutH(),b.attr("loaded",!0)}),a.preventDefault()}):a(this).hasClass(c.closeClass)&&a(this).click(function(){return h.eq(f).remove(),i.eq(f).remove(),f==c.currentIndex?c.currentIndex=f+1<h.size()?f:f-1:f<c.currentIndex&&(c.currentIndex=f),d(b),!1})})}),e(b,c.currentIndex)}function e(b,d){var e=b.add(a("> *",b)),f=a(c.stTabHeader,e),g=a(c.stTab+" li",f),h=a(c.stTabPanel+" > *",e),i=g.eq(d),j=h.eq(d);c.reverse&&i.hasClass("selected")?(g.removeClass("selected"),h.hide()):(c.currentIndex=d,g.removeClass("selected"),i.addClass("selected"),h.hide().eq(c.currentIndex).show()),j.attr("inited")||j.attr("inited",1e3).find("input[type=text]").filter("[alt]")}var c=a.extend({reverse:!1,eventType:"click",currentIndex:0,stTabHeader:"> .tabsHeader",stTab:">.tabsHeaderContent>ul",stTabPanel:"> .tabsContent",ajaxClass:"j-ajax",closeClass:"close",prevClass:"tabsLeft",nextClass:"tabsRight"},b);return this.each(function(){d(a(this))})}})}(jQuery);
  /* dwz.resize @author Roger Wu */
  !function(a){a.fn.extend({jresize:function(b){return"string"==typeof b&&"destroy"==b?this.each(function(){var b=this;a("div[class^='resizable']",b).each(function(){a(this).hide()})}):this.each(function(){var b=a(this),c=a(".resizable");a("div[class^='resizable']",b).each(function(){var d=this;a(d).mousedown(function(e){return a.pdialog.switchDialog(b),a.resizeTool.start(c,b,e,a(d).attr("tar")),!1}).show()})})}}),a.resizeTool={start:function(b,c,d,e){a.pdialog.initResize(b,c,e),a.data(b[0],"layer-drag",{options:a.extend(a.pdialog._op,{target:e,dialog:c,stop:a.resizeTool.stop})}),a.layerdrag.start(b[0],d,a.pdialog._op)},stop:function(){var b=a.data(arguments[0],"layer-drag");a.pdialog.resizeDialog(arguments[0],b.options.dialog,b.options.target),a("body").css("cursor",""),a(arguments[0]).hide()}},a.layerdrag={start:function(b,c){return a.layerdrag.current||(a.layerdrag.current={el:b,oleft:parseInt(b.style.left)||0,owidth:parseInt(b.style.width)||0,otop:parseInt(b.style.top)||0,oheight:parseInt(b.style.height)||0,ox:c.pageX||c.screenX,oy:c.pageY||c.clientY},a(document).bind("mouseup",a.layerdrag.stop),a(document).bind("mousemove",a.layerdrag.drag)),a.layerdrag.preventEvent(c)},drag:function(b){var c,d,e,f,g,h,i;return b||(b=window.event),c=a.layerdrag.current,d=a.data(c.el,"layer-drag"),e=(b.pageX||b.screenX)-c.ox,f=(b.pageY||b.clientY)-c.oy,(b.pageY||b.clientY)<=0||(b.pageY||b.clientY)>=a(window).height()-a(".dialogHeader",a(d.options.dialog)).outerHeight()?!1:(g=d.options.target,h=c.owidth,i=c.oheight,"n"!=g&&"s"!=g&&(h+=g.indexOf("w")>=0?-e:e),h>=a.pdialog._op.minW&&(g.indexOf("w")>=0&&(c.el.style.left=c.oleft+e+"px"),"n"!=g&&"s"!=g&&(c.el.style.width=h+"px")),"w"!=g&&"e"!=g&&(i+=g.indexOf("n")>=0?-f:f),i>=a.pdialog._op.minH&&(g.indexOf("n")>=0&&(c.el.style.top=c.otop+f+"px"),"w"!=g&&"e"!=g&&(c.el.style.height=i+"px")),a.layerdrag.preventEvent(b))},stop:function(b){var c=a.layerdrag.current,d=a.data(c.el,"layer-drag");return a(document).unbind("mousemove",a.layerdrag.drag),a(document).unbind("mouseup",a.layerdrag.stop),d.options.stop&&d.options.stop.apply(c.el,[c.el]),a.layerdrag.current=null,a.layerdrag.preventEvent(b)},preventEvent:function(a){return a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),!1}}}(jQuery);
  /* dwz.dialog @author Roger Wu */
  !function(a){a.pdialog={_op:{height:300,width:580,minH:40,minW:50,total:20,max:!1,mask:!1,resizable:!0,drawable:!0,maxable:!0,minable:!0,fresh:!0},_current:null,_zIndex:42,getCurrent:function(){return this._current},refresh:function(b){if(b){var c=op.dialogId&&a("body").data(op.dialogId)||this._current;c&&this._reload(c,{data:{}})}else this._reload(this._current,{data:{}})},reload:function(b,c){var d=a.extend({data:{},dialogId:"",callback:null},c),e=d.dialogId&&a("body").data(d.dialogId)||this._current;e&&(e.data("url",b),this._reload(e,d))},_reload:function(b,c){var d=b.data("url"),e=b.find(".dialogContent");e.ajaxUrl({type:c.type||"GET",url:d,data:c.data,callback:function(d){e.find("[layoutH]").layoutH(e),a(".pageContent",b).width(b.width()-14),a(":button.btn-close",b).click(function(){return a.pdialog.close(b),!1}),c.callback&&a.isFunction(c.callback)&&c.callback(d)}})},open:function(b,c,d,e){var i,j,f=a.extend({},a.pdialog._op,e),g=a("body").data(c);g?(g.is(":hidden")&&g.show(),(f.fresh||b!=g.data("url"))&&(g.data("url",b),g.find(".dialogHeader").find("h1").html('<i class="fa fa-caret-square-o-down"></i> '+d),this.switchDialog(g),this._reload(g,e))):(a("body").append(DWZ.frag.dialogFrag),g=a(">.dialog-box:last-child","body"),g.attr("data-id",c),g.data("id",c),g.data("url",b),e.close&&g.data("close",e.close),e.param&&g.data("param",e.param),g.find(".dialogHeader").find("h1").html('<i class="fa fa-caret-square-o-down"></i> '+d),g.css("zIndex",a.pdialog._zIndex+=2),a.pdialog._init(g,e),g.click(function(){a.pdialog.switchDialog(g)}),f.resizable&&g.jresize(),f.drawable&&g.dialogDrag(),a("a.close",g).click(function(){return a.pdialog.close(g),!1}),f.maxable?a("a.maximize",g).show().click(function(){return a.pdialog.switchDialog(g),a.pdialog.maxsize(g),g.jresize("destroy").dialogDrag("destroy"),!1}):a("a.maximize",g).hide(),a("a.restore",g).click(function(){return a.pdialog.restore(g),g.jresize().dialogDrag(),!1}),f.minable?a("a.minimize",g).show().click(function(){return a.pdialog.minimize(g),!1}):a("a.minimize",g).hide(),a("div.dialogHeader a",g).mousedown(function(){return!1}),a("div.dialogHeader",g).dblclick(function(){a("a.restore",g).is(":hidden")?a("a.maximize",g).trigger("click"):a("a.restore",g).trigger("click")}),f.max&&(a.pdialog.maxsize(g),g.jresize("destroy").dialogDrag("destroy")),a("body").data(c,g),a.pdialog._current=g,a.pdialog.attachShadow(g),i=a(".dialogContent",g),i.loadUrl(b,{},function(){i.find("[layoutH]").layoutH(i),a(".pageContent",g).width(g.width()-10),a("button.btn-close",g).click(function(){return a.pdialog.close(g),!1})})),f.mask?(a("body").append(DWZ.frag.dwzDialogMask),j=a(">.dialogBackground:last-child","body"),j.css("zIndex",a.pdialog._zIndex-1).attr("id","mask-"+c),a("a.minimize",g).hide(),g.data("mask",!0),j.show()):f.minable&&a.taskBar.addDialog(c,d)},switchDialog:function(b){var d,c=a(b).css("zIndex");a.pdialog.attachShadow(b),a.pdialog._current&&(d=a(a.pdialog._current).css("zIndex"),a(a.pdialog._current).css("zIndex",c),a(b).css("zIndex",d),a.pdialog._current=b),a.taskBar.switchTask(b.data("id"))},attachShadow:function(){},_init:function(b,c){var g,d=a.extend({},this._op,c),e=d.height>d.minH?d.height:d.minH,f=d.width>d.minW?d.width:d.minW;(isNaN(b.height())||b.height()<e)&&(a(b).height(e+"px"),a(".dialogContent",b).height(e-a(".dialogHeader",b).outerHeight()-a(".dialogFooter",b).outerHeight()-6)),(isNaN(b.css("width"))||b.width()<f)&&a(b).width(f+"px"),g=(a(window).height()-b.height())/2,b.css({left:(a(window).width()-b.width())/2,top:g>0?g:0})},initResize:function(b,c,d){a("body").css("cursor",d+"-resize"),b.css({top:a(c).css("top"),left:a(c).css("left"),height:a(c).css("height"),width:a(c).css("width")}),b.show()},repaint:function(){},resizeTool:function(b,c,d){a('div[class^="resizable"]',d).filter(function(){return"w"==a(this).attr("tar")||"e"==a(this).attr("tar")}).each(function(){a(this).css("height",a(this).outerHeight()+c)})},resizeDialog:function(b,c,d){var i,e=parseInt(b.style.left),f=parseInt(b.style.top),g=parseInt(b.style.height),h=parseInt(b.style.width);tmove="n"==d||"nw"==d?parseInt(a(c).css("top"))-f:g-parseInt(a(c).css("height")),a(c).css({left:e,width:h,top:f,height:g}),a(".dialogContent",c).css("width",h-0+"px"),a(".pageContent",c).css("width",h-12+"px"),"w"!=d&&"e"!=d&&(i=a(".dialogContent",c),i.css({height:g-a(".dialogHeader",c).outerHeight()-a(".dialogFooter",c).outerHeight()-6}),i.find("[layoutH]").layoutH(i),a.pdialog.resizeTool(d,tmove,c)),a.pdialog.repaint(d,{oleft:e,otop:f,tmove:tmove,owidth:h}),a(window).trigger(DWZ.eventType.resizeGrid)},close:function(b){var c,d,e;"string"==typeof b&&(b=a("body").data(b)),c=b.data("close"),d=!0,c&&a.isFunction(c)&&(e=b.data("param"),e&&""!=e?(e=DWZ.jsonEval(e),d=c(e)):d=c(),!d)||(a(b).hide(),a(b).data("mask")?a("#mask-"+a(b).data("id")).remove():a(b).data("id")&&a.taskBar.closeDialog(a(b).data("id")),a("body").removeData(a(b).data("id")),a(b).trigger(DWZ.eventType.pageClear).remove(),0==a(".dialogContent","body").length&&(a.pdialog._zIndex=42))},closeCurrent:function(){this.close(a.pdialog._current)},checkTimeout:function(){var b=a(".dialogContent",a.pdialog._current),c=DWZ.jsonEval(b.html());c&&c[DWZ.keys.statusCode]==DWZ.statusCode.timeout&&this.closeCurrent()},maxsize:function(b){var c,d;a(b).data("original",{top:a(b).css("top"),left:a(b).css("left"),width:a(b).css("width"),height:a(b).css("height")}),a("a.maximize",b).hide(),a("a.restore",b).show(),c=a(window).width(),d=a(window).height()-34,a(b).css({top:"0px",left:"0px",width:c+"px",height:d+"px"}),a.pdialog._resizeContent(b,c,d)},restore:function(b){var c=a(b).data("original"),d=parseInt(c.width),e=parseInt(c.height);a(b).css({top:c.top,left:c.left,width:d,height:e}),a.pdialog._resizeContent(b,d,e),a("a.maximize",b).show(),a("a.restore",b).hide(),a.pdialog.attachShadow(b)},minimize:function(b){a(b).hide();var c=a.taskBar.getTask(a(b).data("id"));a(".resizable").css({top:a(b).css("top"),left:a(b).css("left"),height:a(b).css("height"),width:a(b).css("width")}).show().animate({top:a(window).height()-60,left:c.position().left,width:c.outerWidth(),height:c.outerHeight()},250,function(){a(this).hide(),a.taskBar.inactive(a(b).data("id"))})},_resizeContent:function(b,c,d){var e=a(".dialogContent",b);e.css({width:c-0+"px",height:d-a(".dialogHeader",b).outerHeight()-a(".dialogFooter",b).outerHeight()-6}),e.find("[layoutH]").layoutH(e),a(".pageContent",b).css("width",c-12+"px"),a(window).trigger(DWZ.eventType.resizeGrid)}}}(jQuery);
  /* dwz.dialogDrag @author Roger Wu */
  !function(a){a.fn.dialogDrag=function(b){return"string"==typeof b&&"destroy"==b?this.each(function(){var b=this;a("div.dialogHeader",b).unbind("mousedown")}):this.each(function(){var b=a(this);a("div.dialogHeader",b).mousedown(function(c){return a.pdialog.switchDialog(b),b.data("task",!0),setTimeout(function(){b.data("task")&&a.dialogDrag.start(b,c)},100),!1}).mouseup(function(){return b.data("task",!1),!1})})},a.dialogDrag={currId:null,_init:function(b){this.currId=(new Date).getTime();var c=a("#dialogProxy");c.size()||(c=a(DWZ.frag.dialogProxy),a("body").append(c)),a("h1",c).html(a(".dialogHeader h1",b).html())},start:function(b,c){this._init(b);var d=a("#dialogProxy");return d.css({left:b.css("left"),top:b.css("top"),height:b.css("height"),width:b.css("width"),zIndex:parseInt(b.css("zIndex"))+1}).show(),a("div.dialogContent",d).css("height",a("div.dialogContent",b).css("height")),d.data("dialog",b),b.css({left:"-10000px",top:"-10000px"}),a(".shadow").hide(),a(d).jDrag({selector:".dialogHeader",stop:this.stop,event:c}),!1},stop:function(){var b=a(arguments[0]),c=b.data("dialog");a(c).css({left:a(b).css("left"),top:a(b).css("top")}),a.pdialog.attachShadow(c),a(b).hide()}}}(jQuery);
  /* dwz.stable @author Roger Wu、 ZhangHuihua@msn.com */
  !function(a){a.fn.jTable=function(b){return this.each(function(){function y(){a("div.j-resizeGrid").each(function(){var b=a(this).innerWidth();b&&(a("div.gridScroller",this).width(b+"px"),a(".table",this).width(b-20+"px"))})}var k,l,m,n,o,p,q,r,s,t,u,v,x,c=a(this),d=c.width(),e=[],f=c.parent().addClass("j-resizeGrid"),g=a(this).attr("layoutH"),h=a(this).attr("g-style")||"",i=a(this).attr("g-id")||"",j=c.find("thead > tr:last-child").find("th");for(k=0,l=j.size();l>k;k++)m=a(j[k]),n=[],o=m.innerWidth()-100*m.innerWidth()/d-2,n[0]=parseInt(o),n[1]=m.attr("align"),n[2]=m.attr("class"),e[e.length]=n;a(this).wrap('<div class="grid"></div>'),p=c.parent().html(c.html()),q=p.find("thead"),q.wrap('<div class="gridHeader"><div class="gridThead"><table class="table table-bordered" style="width:'+(d-20)+'px;"></table></div></div>'),r=a(">tr:last-child",q),s=a(">th",r),s.each(function(b){var g,d=a(this),f=e[b];d.attr("align")&&d.addClass(d.attr("align")),d.addClass(f[1]).removeAttr("align").removeAttr("width").width(f[0]).html('<div class="gridCol">'+d.html()+"</div>"),d.attr("orderField")&&(d.addClass("orderby").addClass(e[2]),g=a('<a href="javascript:;" class="order"><span class="up" title="升序"><i class="fa fa-angle-up"></i></span><span class="down" title="降序"><i class="fa fa-angle-down"></i></span></a>'),g.attr("orderField",d.attr("orderField")).appendTo(d.find(".gridCol")).click(function(){var b=a(this);d.hasClass("asc")?b.addClass("desc"):d.hasClass("desc")&&b.addClass("asc")}).hover(function(){a(this),d.hasClass("asc")?d.removeClass("asc").addClass("desc"):d.hasClass("desc")&&d.removeClass("desc").addClass("asc")}).orderBy({targetType:c.attr("targetType"),rel:c.attr("rel"),asc:c.attr("asc")||"asc",desc:c.attr("desc")||"desc"}))}),t=p.find(">tbody"),u=g?' layoutH="'+g+'"':"",t.wrap('<div class="gridScroller"'+u+' style="width:'+f.width()+'px;"><div class="gridTbody"><table class="table table-striped table-hover table-bordered" style="width:'+(d-20)+"px; "+h+'" id="'+i+'"></table></div></div>'),v=a(">tr:first-child",t),t.find(">tr"),a(">td",v).each(function(b){b<e.length&&a(this).width(e[b][0])}),p.append('<div class="resizeMarker" style="display:none; height:300px; left:57px;"></div><div class="resizeProxy" style="left:377px; display:none; height:300px;"></div>'),x=a(".gridScroller",p),x.scroll(function(){var d,c=a(".gridThead",p);return x.scrollLeft()>0&&(c.css("position","relative"),d=x.scrollLeft(),c.css("left",x.cssv("left")-d)),0==x.scrollLeft()&&(c.css("position","relative"),c.css("left","0px")),!1}),a(">tr",q).each(function(){a(">th",this).each(function(){var d=this,e=a(this);e.mouseover(function(c){var f=a.jTableTool.getOffset(d,c).offsetX;return e.outerWidth()-f<5?e.css("cursor","col-resize").mousedown(function(c){a(".resizeProxy",p).show().css({left:a.jTableTool.getRight(d)-a(".gridScroller",p).scrollLeft(),top:a.jTableTool.getTop(d),height:a.jTableTool.getHeight(d,p),cursor:"col-resize"}),a(".resizeMarker",p).show().css({left:a.jTableTool.getLeft(d)+1-a(".gridScroller",p).scrollLeft(),top:a.jTableTool.getTop(d),height:a.jTableTool.getHeight(d,p)}),a(".resizeProxy",p).jDrag(a.extend(b,{scop:!0,cellMinW:20,relObj:a(".resizeMarker",p)[0],move:"horizontal",event:c,stop:function(){var g,i,j,b=a(".resizeProxy",p).position().left,c=a(".resizeMarker",p).position().left,d=b-c-e.outerWidth()-9;a.jTableTool.getColspan(e),g=a.jTableTool.getCellNum(e),e.width(),i=e.width()+d,j=a(">td",v).eq(g-1),e.width(i+"px"),j.width(i+"px"),a(".resizeMarker,.resizeProxy",p).hide()}}))}):e.unbind("mousedown"),!1})})}),a(window).unbind(DWZ.eventType.resizeGrid).bind("resizeGrid",y)})},a.jTableTool={getLeft:function(b){var c=0;return a(b).prevAll().each(function(){c+=a(this).outerWidth()}),c-1},getRight:function(b){var c=0;return a(b).prevAll().andSelf().each(function(){c+=a(this).outerWidth()}),c-1},getTop:function(b){var c=0;return a(b).parent().prevAll().each(function(){c+=a(this).outerHeight()}),c},getHeight:function(b,c){var d=0,e=a(b).parent();return e.nextAll().andSelf().each(function(){d+=a(this).outerHeight()}),a(".gridTbody",c).children().each(function(){d+=a(this).outerHeight()}),d},getCellNum:function(b){return a(b).prevAll().andSelf().size()},getColspan:function(b){return a(b).attr("colspan")||1},getStart:function(b){var c=1;return a(b).prevAll().each(function(){c+=parseInt(a(this).attr("colspan")||1)}),c},getPageCoord:function(a){for(var b={x:0,y:0};a;)b.x+=a.offsetLeft,b.y+=a.offsetTop,a=a.offsetParent;return b},getOffset:function(b,c){var d,e,f,g,h,i;return a.browser.msie?(d=a(b).offset(),e={offsetX:c.pageX||c.screenX,offsetY:c.pageY||c.screenY},f={offsetX:e.offsetX-d.left,offsetY:e.offsetY-d.top}):(g=c.target,void 0==g.offsetLeft&&(g=g.parentNode),h=a.jTableTool.getPageCoord(g),i={x:window.pageXOffset+c.clientX,y:window.pageYOffset+c.clientY},f={offsetX:i.x-h.x,offsetY:i.y-h.y})}}}(jQuery);
  /* dwz.taskBar @author Roger Wu */
  !function(a){a.fn.extend({jTask:function(){return this.each(function(){var b=a(this),c=b.attr("id");b.click(function(){var e=a("body").data(c);return b.hasClass("selected")?a("a.minimize",e).trigger("click"):e.is(":hidden")?a.taskBar.restoreDialog(e):a(e).trigger("click"),a.taskBar.scrollCurrent(a(this)),!1}),a("div.close",b).click(function(){return a.pdialog.close(c),!1})})}}),a.taskBar={_taskBar:null,_taskBox:null,_prevBut:null,_nextBut:null,_op:{id:"taskbar",taskBox:"div.taskbarContent",prevBut:".taskbarLeft",prevDis:"taskbarLeftDisabled",nextBut:".taskbarRight",nextDis:"taskbarRightDisabled",selected:"selected",boxMargin:"taskbarMargin"},init:function(b){var c=this;a.extend(this._op,b),this._taskBar=a("#"+this._op.id),0==this._taskBar.size()&&(this._taskBar=a(DWZ.frag.taskbar).appendTo(a("#layout"))),this._taskBox=this._taskBar.find(this._op.taskBox),this._taskList=this._taskBox.find(">ul"),this._prevBut=this._taskBar.find(this._op.prevBut),this._nextBut=this._taskBar.find(this._op.nextBut),this._prevBut.click(function(){c.scrollLeft()}),this._nextBut.click(function(){c.scrollRight()}),this._contextmenu(this._taskBox)},_contextmenu:function(b){a(b).contextMenu("dialogCM",{bindings:{closeCurrent:function(b){var d=b.isTag("li")?b:a.taskBar._getCurrent();a("div.close",d).trigger("click")},closeOther:function(b){var d=b.isTag("li")?"#"+b.attr("id"):".selected",e=a.taskBar._taskList.find(">li:not(:"+d+")");e.each(function(b){a("div.close",e[b]).trigger("click")})},closeAll:function(){var d=a.taskBar._getTasks();d.each(function(b){a("div.close",d[b]).trigger("click")})}},ctrSub:function(b,c){var d=c.find("[rel='closeCurrent']"),e=c.find("[rel='closeOther']");a.taskBar._getCurrent()[0]?1==a.taskBar._getTasks().size()&&e.addClass("disabled"):(d.addClass("disabled"),e.addClass("disabled"))}})},_scrollCurrent:function(){var c,d,e,b=this._tasksW(this._getTasks());b>this._getTaskBarW()?(c=this,d=a(">li:last-child",this._taskList),e=this._getTaskBarW()-d.position().left-d.outerWidth(!0),this._taskList.animate({left:e+"px"},200,function(){c._ctrlScrollBut()})):this._ctrlScrollBut()},_getTaskBarW:function(){return this._taskBox.width()-(this._prevBut.is(":hidden")?this._prevBut.width()+2:0)-(this._nextBut.is(":hidden")?this._nextBut.width()+2:0)},_scrollTask:function(a){var c,b=this;a.position().left+this._getLeft()+a.outerWidth()>this._getBarWidth()?(c=this._getTaskBarW()-a.position().left-a.outerWidth(!0)-2,this._taskList.animate({left:c+"px"},200,function(){b._ctrlScrollBut()})):a.position().left+this._getLeft()<0&&(c=this._getLeft()-(a.position().left+this._getLeft()),this._taskList.animate({left:c+"px"},200,function(){b._ctrlScrollBut()}))},_ctrlScrollBut:function(){var a=this._tasksW(this._getTasks());this._getTaskBarW()>a?(this._taskBox.removeClass(this._op.boxMargin),this._nextBut.hide(),this._prevBut.hide(),this._getTasks().eq(0)[0]&&this._scrollTask(this._getTasks().eq(0))):(this._taskBox.addClass(this._op.boxMargin),this._nextBut.show().removeClass(this._op.nextDis),this._prevBut.show().removeClass(this._op.prevDis),this._getLeft()>=0&&this._prevBut.addClass(this._op.prevDis),this._getLeft()<=this._getTaskBarW()-a&&this._nextBut.addClass(this._op.nextDis))},_getLeft:function(){return this._taskList.position().left},_visibleStart:function(){var c,a=this._getLeft(),b=this._getTasks();for(c=0;c<b.size();c++)if(b.eq(c).position().left+b.eq(c).outerWidth(!0)+a>=0)return b.eq(c);return b.eq(0)},_visibleEnd:function(){var c,a=this._getLeft(),b=this._getTasks();for(c=0;c<b.size();c++)if(b.eq(c).position().left+b.eq(c).outerWidth(!0)+a>this._getBarWidth())return b.eq(c);return b.eq(b.size()-1)},_getTasks:function(){return this._taskList.find(">li")},_tasksW:function(b){var c=0;return b.each(function(){c+=a(this).outerWidth(!0)}),c},_getBarWidth:function(){return this._taskBar.innerWidth()},addDialog:function(b,c){var d,e;this.show(),d=a("#"+b,this._taskList),d[0]?a(">div>span",d).text(c):(e='<li id="#taskid#"><div class="taskbutton"><span><i class="fa fa-caret-square-o-down"></i> #title#</span></div><div class="close"><i class="fa fa-times-circle"></i></div></li>',this._taskList.append(e.replace("#taskid#",b).replace("#title#",c)),d=a("#"+b,this._taskList),d.jTask()),this._contextmenu(d),this.switchTask(b),this._scrollTask(d)},closeDialog:function(b){var c="string"==typeof b?a("#"+b,this._taskList):b;c.remove(),0==this._getTasks().size()&&this.hide(),this._scrollCurrent()},restoreDialog:function(b){var c="string"==typeof b?a("body").data(b):b,d="string"==typeof b?b:c.data("id"),e=a.taskBar.getTask(d);a(".resizable").css({top:a(window).height()-60,left:a(e).position().left,height:a(e).outerHeight(),width:a(e).outerWidth()}).show().animate({top:a(c).css("top"),left:a(c).css("left"),width:a(c).css("width"),height:a(c).css("height")},250,function(){a(this).hide(),a(c).show(),a.pdialog.attachShadow(c)}),a.taskBar.switchTask(d)},inactive:function(b){a("#"+b,this._taskList).removeClass("selected")},scrollLeft:function(){var a=this._visibleStart();this._scrollTask(a)},scrollRight:function(){var a=this._visibleEnd();this._scrollTask(a)},scrollCurrent:function(a){this._scrollTask(a)},switchTask:function(a){this._getCurrent().removeClass("selected"),this.getTask(a).addClass("selected")},_getCurrent:function(){return this._taskList.find(">.selected")},getTask:function(b){return a("#"+b,this._taskList)},show:function(){this._taskBar.is(":hidden")&&(this._taskBar.css("top",a(window).height()-34+this._taskBar.outerHeight()).show(),this._taskBar.animate({top:a(window).height()-this._taskBar.outerHeight()},500))},hide:function(){this._taskBar.animate({top:a(window).height()-29+this._taskBar.outerHeight(!0)},500,function(){a.taskBar._taskBar.hide()})}}}(jQuery);
  /* dwz.ajax @author ZhangHuihua@msn.com */
  function validateCallback(a,b,c){var d=$(a),e=function(){$.ajax({type:a.method||"POST",url:d.attr("action"),data:d.serializeArray(),dataType:"json",cache:!1,success:b||DWZ.ajaxDone,error:DWZ.ajaxError})};return c?alertMsg.confirm(c,{okCall:e}):e(),!1}function iframeCallback(a,b){var c=$(a),d=$("#callbackframe");return c.valid()?(0==d.size()&&(d=$("<iframe id='callbackframe' name='callbackframe' src='about:blank' style='display:none'></iframe>").appendTo("body")),a.ajax||c.append('<input type="hidden" name="ajax" value="1" />'),a.target="callbackframe",_iframeResponse(d[0],b||DWZ.ajaxDone),void 0):!1}function _iframeResponse(a,b){var c=$(a),d=$(document);d.trigger("ajaxStart"),c.bind("load",function(){var f,g;if(c.unbind("load"),d.trigger("ajaxStop"),"javascript:'%3Chtml%3E%3C/html%3E';"!=a.src&&"javascript:'<html></html>';"!=a.src&&(f=a.contentDocument||a.document,!(f.readyState&&"complete"!=f.readyState||f.body&&"false"==f.body.innerHTML))){if(f.XMLDocument)g=f.XMLDocument;else if(f.body)try{g=c.contents().find("body").text(),g=jQuery.parseJSON(g)}catch(h){g=f.body.innerHTML}else g=f;b(g)}})}function navTabAjaxDone(a){var b,c;DWZ.ajaxDone(a),a[DWZ.keys.statusCode]==DWZ.statusCode.ok&&(a.navTabId?navTab.reloadFlag(a.navTabId):(b=$("#pagerForm",navTab.getCurrentPanel()),c=b.size()>0?b.serializeArray():{},navTabPageBreak(c,a.rel)),"closeCurrent"==a.callbackType?setTimeout(function(){navTab.closeCurrentTab(a.navTabId)},100):"forward"==a.callbackType?navTab.reload(a.forwardUrl):"forwardConfirm"==a.callbackType?alertMsg.confirm(a.confirmMsg||DWZ.msg("forwardConfirmMsg"),{okCall:function(){navTab.reload(a.forwardUrl)},cancelCall:function(){navTab.closeCurrentTab(a.navTabId)}}):navTab.getCurrentPanel().find(":input[initValue]").each(function(){var a=$(this).attr("initValue");$(this).val(a)}))}function dialogAjaxDone(a){var b,c;DWZ.ajaxDone(a),a[DWZ.keys.statusCode]==DWZ.statusCode.ok&&(a.navTabId?navTab.reload(a.forwardUrl,{navTabId:a.navTabId}):(b=$("#pagerForm",navTab.getCurrentPanel()),c=b.size()>0?b.serializeArray():{},navTabPageBreak(c,a.rel)),"closeCurrent"==a.callbackType&&$.pdialog.closeCurrent())}function navTabSearch(a,b){var c=$(a);return a[DWZ.pageInfo.pageNum]&&(a[DWZ.pageInfo.pageNum].value=1),navTab.reload(c.attr("action"),{type:"POST",data:c.serializeArray(),navTabId:b}),!1}function dialogSearch(a){var b=$(a);return a[DWZ.pageInfo.pageNum]&&(a[DWZ.pageInfo.pageNum].value=1),$.pdialog.reload(b.attr("action"),{type:"POST",data:b.serializeArray()}),!1}function dwzSearch(a,b){return"dialog"==b?dialogSearch(a):navTabSearch(a),!1}function divSearch(a,b){var d,c=$(a);return a[DWZ.pageInfo.pageNum]&&(a[DWZ.pageInfo.pageNum].value=1),b&&(d=$("#"+b),d.ajaxUrl({type:"POST",url:c.attr("action"),data:c.serializeArray(),callback:function(){d.find("[layoutH]").layoutH()}})),!1}function _getPagerForm(a,b){var c=$("#pagerForm",a).get(0);return c&&(b.pageNum&&(c[DWZ.pageInfo.pageNum].value=b.pageNum),b.numPerPage&&(c[DWZ.pageInfo.numPerPage].value=b.numPerPage),b.orderField&&(c[DWZ.pageInfo.orderField].value=b.orderField),b.orderDirection&&c[DWZ.pageInfo.orderDirection]&&(c[DWZ.pageInfo.orderDirection].value=b.orderDirection)),c}function dwzPageBreak(a){var d,e,f,b=$.extend({targetType:"navTab",rel:"",data:{pageNum:"",numPerPage:"",orderField:"",orderDirection:""},callback:null},a),c="dialog"==b.targetType?$.pdialog.getCurrent():navTab.getCurrentPanel();b.rel?(d=c.find("#"+b.rel),e=_getPagerForm(d,b.data),e&&d.ajaxUrl({type:"POST",url:$(e).attr("action"),data:$(e).serializeArray(),callback:function(){d.find("[layoutH]").layoutH()}})):(e=_getPagerForm(c,b.data),f=$(e).serializeArray(),"dialog"==b.targetType?e&&$.pdialog.reload($(e).attr("action"),{data:f,callback:b.callback}):e&&navTab.reload($(e).attr("action"),{data:f,callback:b.callback}))}function navTabPageBreak(a,b){dwzPageBreak({targetType:"navTab",rel:b,data:a})}function dialogPageBreak(a,b){dwzPageBreak({targetType:"dialog",rel:b,data:a})}function ajaxTodo(url,callback){var $callback=callback||navTabAjaxDone;$.isFunction($callback)||($callback=eval("("+callback+")")),$.ajax({type:"POST",url:url,dataType:"json",cache:!1,success:$callback,error:DWZ.ajaxError})}function ajaxPost(url,data,callback){var $callback=callback||navTabAjaxDone;$.isFunction($callback)||($callback=eval("("+callback+")")),$.ajax({type:"POST",url:url,data:data,dataType:"json",cache:!1,success:$callback,error:DWZ.ajaxError})}function ajaxPostNoWait(url,data,callback){var $callback=callback||navTabAjaxDone;$.isFunction($callback)||($callback=eval("("+callback+")")),$.ajax({type:"POST",url:url,global:!1,data:data,dataType:"json",cache:!1,success:$callback,error:DWZ.ajaxError})}function uploadifyQueueComplete(a){var b="The total number of files uploaded: "+a.uploadsSuccessful+"<br/>"+"The total number of errors while uploading: "+a.uploadsErrored+"<br/>"+"The total number of bytes uploaded: "+a.queueBytesUploaded+"<br/>"+"The average speed of all uploaded files: "+a.averageSpeed;a.uploadsErrored?alertMsg.error(b):alertMsg.correct(b)}function uploadifySuccess(a,b){alert(b)}function uploadifyError(a,b,c){alertMsg.error(b+": "+c)}function uploadifyError(a,b,c,d){alert("event:"+a+"\nqueueId:"+b+"\nfileObj.name:"+c.name+"\nerrorObj.type:"+d.type+"\nerrorObj.info:"+d.info)}$.fn.extend({ajaxTodo:function(){return this.each(function(){var a=$(this);a.click(function(b){var d,c=unescape(a.attr("href")).replaceTmById($(b.target).parents(".unitBox:first"));return DWZ.debug(c),c.isFinishedTm()?(d=a.attr("title"),d?alertMsg.confirm(d,{okCall:function(){ajaxTodo(c,a.attr("callback"))}}):ajaxTodo(c,a.attr("callback")),b.preventDefault(),void 0):(alertMsg.error(a.attr("warn")||DWZ.msg("alertSelectMsg")),!1)})})},dwzExport:function(){function a(a){var b="dialog"==a.attr("targetType")?$.pdialog.getCurrent():navTab.getCurrentPanel(),c=$("#pagerForm",b),d=a.attr("href");window.location=d+(-1==d.indexOf("?")?"?":"&")+c.serialize()}return this.each(function(){var b=$(this);b.click(function(c){var d=b.attr("title");d?alertMsg.confirm(d,{okCall:function(){a(b)}}):a(b),c.preventDefault()})})},checkedExport:function(){function a(a){var e,f,b="dialog"==a.attr("targetType")?$.pdialog.getCurrent():navTab.getCurrentPanel(),c=a.attr("href"),d=a.attr("idname");return d?(e=[],f=$(":checkbox[name="+d+"]:checked",b),0==f.length?(alertMsg.error("未选中任何一项！"),void 0):(e=[],f.each(function(){e.push($(this).val())}),window.location=c+(-1==c.indexOf("?")?"?":"&")+"ids="+e.join(","),void 0)):(alertMsg.error("未定义选中项的id名称[复选框的name]！"),void 0)}return this.each(function(){var b=$(this);b.click(function(c){var d=b.attr("title");d?alertMsg.confirm(d,{okCall:function(){a(b)}}):a(b),c.preventDefault()})})},checkedAjaxTodo:function(){return this.each(function(){var a=$(this),b="dialog"==a.attr("targetType")?$.pdialog.getCurrent():navTab.getCurrentPanel();a.click(function(c){var f,g,h,d=a.attr("href"),e=a.attr("idname");return e?(f=[],g=$(":checkbox[name="+e+"]:checked",b),0==g.length?(alertMsg.error("未选中任何一项！"),!1):(f=[],g.each(function(){f.push($(this).val())}),d=d+(-1==d.indexOf("?")?"?":"&")+"ids="+f.join(","),h=a.attr("title"),h?alertMsg.confirm(h,{okCall:function(){ajaxTodo(d,a.attr("callback"))}}):ajaxTodo(d,a.attr("callback")),c.preventDefault(),void 0)):(alertMsg.error("未定义选中项的id名称[复选框的name]！"),!1)})})}});
  /* dwz.pagination @author ZhangHuihua@msn.com */
  !function(a){a.fn.extend({pagination:function(c){function e(a,b,c,d){a.bind("click",{pageNum:b},function(a){dwzPageBreak({targetType:c,rel:d,data:{pageNum:a.data.pageNum}}),a.preventDefault()})}var d={first$:"li.j-first",prev$:"li.j-prev",next$:"li.j-next",last$:"li.j-last",nums$:"li.j-num>a",jumpto$:"li.jumpto",pageNumFrag:'<li class="#liClass#"><a href="javascript:;">#pageNum#</a></li>'};return this.each(function(){var j,k,l,m,n,f=a(this),g=new b(c),h=g.getInterval(),i="";for(j=h.start;j<h.end;j++)i+=d.pageNumFrag.replaceAll("#pageNum#",j).replaceAll("#liClass#",j==g.getCurrentPage()?"selected j-num":"j-num");f.html(DWZ.frag.pagination.replaceAll("#pageNumFrag#",i).replaceAll("#currentPage#",g.getCurrentPage())),k=f.find(d.first$),l=f.find(d.prev$),m=f.find(d.next$),n=f.find(d.last$),g.hasPrev()?(k.add(l).find(">span").hide(),e(l,g.getCurrentPage()-1,g.targetType(),g.rel()),e(k,1,g.targetType(),g.rel())):k.add(l).addClass("disabled").find(">a").hide(),g.hasNext()?(m.add(n).find(">span").hide(),e(m,g.getCurrentPage()+1,g.targetType(),g.rel()),e(n,g.numPages(),g.targetType(),g.rel())):m.add(n).addClass("disabled").find(">a").hide(),f.find(d.nums$).each(function(b){e(a(this),b+h.start,g.targetType(),g.rel())}),f.find(d.jumpto$).each(function(){var b=a(this),c=b.find(":text"),d=b.find(".goto");d.click(function(){var b=c.val();b&&b.isPositiveInteger()&&dwzPageBreak({targetType:g.targetType(),rel:g.rel(),data:{pageNum:b}})}),c.keyup(function(a){a.keyCode==DWZ.keyCode.ENTER&&d.click()})})})},orderBy:function(b){var c=a.extend({targetType:"navTab",rel:"",asc:"asc",desc:"desc"},b);return this.each(function(){var b=a(this).css({cursor:"pointer"}).click(function(){var a=b.attr("orderField"),d=b.hasClass(c.asc)?c.desc:c.asc;dwzPageBreak({targetType:c.targetType,rel:c.rel,data:{orderField:a,orderDirection:d}})})})},pagerForm:function(b){var c=a.extend({pagerForm$:"#pagerForm",parentBox:document},b),d='<input type="hidden" name="#name#" value="#value#" />';return this.each(function(){var b=a(this),e=a(c.pagerForm$,c.parentBox),f=e.attr("action").replaceAll("#rel#",b.attr("action"));e.attr("action",f),b.find(":input").each(function(){var f,b=a(this),c=b.attr("name");!c||b.is(":checkbox,:radio")&&!b.is(":checked")||0==e.find(":input[name='"+c+"']").length&&(f=d.replaceAll("#name#",c).replaceAll("#value#",b.val()),e.append(f))})})}});var b=function(b){this.opts=a.extend({targetType:"navTab",rel:"",totalCount:0,numPerPage:10,pageNumShown:10,currentPage:1,callback:function(){return!1}},b)};a.extend(b.prototype,{targetType:function(){return this.opts.targetType},rel:function(){return this.opts.rel},numPages:function(){return Math.ceil(this.opts.totalCount/this.opts.numPerPage)},getInterval:function(){var a=Math.ceil(this.opts.pageNumShown/2),b=this.numPages(),c=b-this.opts.pageNumShown,d=this.getCurrentPage()>a?Math.max(Math.min(this.getCurrentPage()-a,c),0):0,e=this.getCurrentPage()>a?Math.min(this.getCurrentPage()+a,b):Math.min(this.opts.pageNumShown,b);return{start:d+1,end:e+1}},getCurrentPage:function(){var a=parseInt(this.opts.currentPage);return isNaN(a)?1:a},hasPrev:function(){return this.getCurrentPage()>1},hasNext:function(){return this.getCurrentPage()<this.numPages()}})}(jQuery);
  /* dwz.database @author ZhangHuihua@msn.com */
  !function($){var _lookup={currentGroup:"",suffix:"",$target:null,pk:"id"},_util={_lookupPrefix:function(a){var b=_lookup.currentGroup?".":"";return _lookup.currentGroup+b+a+_lookup.suffix},lookupPk:function(a){return this._lookupPrefix(a)},lookupField:function(a){return this.lookupPk(a)}};$.extend({bringBackSuggest:function(a){var b=_lookup.$target.parents(".unitBox:first");b.find(":input").each(function(){var d,e,b=$(this),c=b.attr("name");for(d in a)if(e=_lookup.pk==d?_util.lookupPk(d):_util.lookupField(d),e==c){b.val(a[d]);break}})},bringBack:function(a){$.bringBackSuggest(a),$.pdialog.closeCurrent()}}),$.fn.extend({lookup:function(){return this.each(function(){var $this=$(this),options={mask:!0,width:$this.attr("width")||820,height:$this.attr("height")||400,maxable:eval($this.attr("maxable")||"true"),resizable:eval($this.attr("resizable")||"true")};$this.click(function(a){_lookup=$.extend(_lookup,{currentGroup:$this.attr("lookupGroup")||"",suffix:$this.attr("suffix")||"",$target:$this,pk:$this.attr("lookupPk")||"id"});var b=unescape($this.attr("href")).replaceTmById($(a.target).parents(".unitBox:first"));return b.isFinishedTm()?($.pdialog.open(b,"_blank",$this.attr("title")||$this.text(),options),!1):(alertMsg.error($this.attr("warn")||DWZ.msg("alertSelectMsg")),!1)})})},multLookup:function(){return this.each(function(){var a=$(this),b={};a.click(function(){var d=a.parents(".unitBox:first");return d.find("[name='"+a.attr("multLookup")+"']").filter(":checked").each(function(){var c,d,a=DWZ.jsonEval($(this).val());for(c in a)d=b[c]?b[c]+",":"",b[c]=d+a[c]}),$.isEmptyObject(b)?(alertMsg.error(a.attr("warn")||DWZ.msg("alertSelectMsg")),!1):($.bringBack(b),void 0)})})},suggest:function(){var a={suggest$:"#suggest",suggestShadow$:"#suggestShadow"},b=-1;return this.each(function(){function e(b){var j,k,e=c.offset(),h=e.top+this.offsetHeight,i=$(a.suggest$);return 0==i.size()&&(i=$('<div id="suggest"></div>').appendTo($("body"))),i.css({left:e.left+"px",top:h+"px"}).show(),_lookup=$.extend(_lookup,{currentGroup:c.attr("lookupGroup")||"",suffix:c.attr("suffix")||"",$target:c,pk:c.attr("lookupPk")||"id"}),j=unescape(c.attr("suggestUrl")).replaceTmById($(b.target).parents(".unitBox:first")),j.isFinishedTm()?(k={},k[c.attr("postField")||"inputValue"]=c.val(),$.ajax({global:!1,type:"POST",dataType:"json",url:j,cache:!1,data:k,success:function(a){var c,e,g,h;if(a)if(c="",$.each(a,function(a){var f,g,b="",e="";for(a=0;a<d.length;a++)f=this[d[a]],f&&(e&&(e+="-"),e+=f);for(g in this)b&&(b+=","),b+=g+":'"+this[g]+"'";c+='<li lookupAttrs="'+b+'">'+e+"</li>"}),e=i.html("<ul>"+c+"</ul>").find("li"),e.click(function(){f($(this))}),1==e.size()&&b.keyCode!=DWZ.keyCode.BACKSPACE)f(e.eq(0));else if(0==e.size()){for(g="",h=0;h<d.length&&_util.lookupField(d[h])!=b.target.name;h++)g&&(g+=","),g+=d[h]+":''";g="{"+_lookup.pk+":'',"+g+"}",$.bringBackSuggest(DWZ.jsonEval(g))}},error:function(){i.html("")}}),$(document).bind("click",g),!1):(alertMsg.error(c.attr("warn")||DWZ.msg("alertSelectMsg")),!1)}function f(a){var b="{"+a.attr("lookupAttrs")+"}";$.bringBackSuggest(DWZ.jsonEval(b))}function g(){$(a.suggest$).html("").hide(),b=-1,$(document).unbind("click",g)}var c=$(this).attr("autocomplete","off").keydown(function(b){return b.keyCode==DWZ.keyCode.ENTER&&$(a.suggest$).is(":visible")?!1:void 0}),d=c.attr("suggestFields").split(",");c.focus(e).click(!1).keyup(function(c){var h,d=$(a.suggest$).find("li");switch(c.keyCode){case DWZ.keyCode.ESC:case DWZ.keyCode.TAB:case DWZ.keyCode.SHIFT:case DWZ.keyCode.HOME:case DWZ.keyCode.END:case DWZ.keyCode.LEFT:case DWZ.keyCode.RIGHT:break;case DWZ.keyCode.ENTER:g();break;case DWZ.keyCode.DOWN:b>=d.size()-1?b=-1:b++;break;case DWZ.keyCode.UP:0>b?b=d.size()-1:b--;break;default:e(c)}d.removeClass("selected"),b>=0&&(h=d.eq(b).addClass("selected"),f(h))})})},itemDetail:function(){function a(a){var b=a.find("tr").find(".form-control");b.each(function(a){$(this).bind("keydown",function(c){var e,d=c.which;13==d&&(c.preventDefault(),e=a+1,b.eq(e)&&b.eq(e).focus())})})}function b(a){a.find(">tr").each(function(a){var b=$(this),c=b.attr("data-tt-id");c&&(b.attr("data-tt-id",c.replaceSuffix(a+1)),b.addClass("leaf expanded"),0==b.find("td:eq(0)").find(".indenter").length&&b.find("td:eq(0)").prepend('<span class="indenter" style="padding-left: 0px;"></span>'),b.find("td:eq(0)").find(".indenter").length>0&&b.find("td:eq(0)").find(".indenter").not(":first").remove()),$(":input, :file, div, a, label",this).each(function(){var h,i,b=$(this),c=b.attr("name"),d=b.val(),e=b.attr("for"),f=b.attr("id"),g=b.attr("href");c&&b.attr("name",c.replaceSuffix(a)),e&&b.attr("for",e.replaceSuffix(a)),f&&b.attr("id",f.replaceSuffix(a).replaceSuffix2(a)),g&&b.attr("href",g.replaceSuffix(a)),h=b.attr("lookupGroup"),h&&b.attr("lookupGroup",h.replaceSuffix(a)),i=b.attr("suffix"),i&&b.attr("suffix",i.replaceSuffix(a)),d&&d.indexOf("#index#")>=0&&b.val(d.replace("#index#",a+1)),b.hasClass("no")&&(b.val(a+1),b.attr("prefix")&&b.val(b.attr("prefix")+b.val()))})})}function c(a){var d,e,f,g,h,i,j,k,b="",c="";if(a.name.endsWith("[#index#]")?c="[#index#]":a.name.endsWith("[]")&&(c="[]"),d=c?' suffix="'+c+'" ':"",e="",f={},a.fieldAttrs){f=DWZ.jsonEval(a.fieldAttrs);for(g in f)e+=g+'="'+f[g]+'"'}switch(a.type){case"del":h=f.value||"删除",b='<a href="javascript:void(0)" class="btn btn-red btn-sm j-del'+a.fieldClass+'" '+e+">"+h+"</a>";break;case"lookup":i="",a.suggestFields&&(i='autocomplete="off" lookupGroup="'+a.lookupGroup+'"'+d+' suggestUrl="'+a.suggestUrl+'" suggestFields="'+a.suggestFields+'"'+' postField="'+a.postField+'"'),b='<div class="lookup-box"><input type="hidden" name="'+a.lookupGroup+"."+a.lookupPk+c+'"/>'+'<input type="text" name="'+a.name+'"'+i+' lookupPk="'+a.lookupPk+'" size="'+a.size+'" class="form-control '+a.fieldClass+'"/>'+'<a class="j-lookup" href="'+a.lookupUrl+'" lookupGroup="'+a.lookupGroup+'" '+i+' lookupPk="'+a.lookupPk+'" title="选择"><i class="fa fa-search"></i></a></div>';break;case"attach":b='<input type="hidden" name="'+a.lookupGroup+"."+a.lookupPk+c+'"/>'+'<input type="text" name="'+a.name+'" size="'+a.size+'" readonly="readonly" size="'+a.size+'" class="'+a.fieldClass+'"/>'+'&nbsp;<a class="j-lookup" href="'+a.lookupUrl+'" lookupGroup="'+a.lookupGroup+'" '+d+' lookupPk="'+a.lookupPk+'" width="560" height="300" title="选择">选择</a>';break;case"date":j=a.defaultVal,"now"==j&&(j=(new Date).formatDate(a.patternDate)),b='<input type="text" name="'+a.name+'" value="'+j+'" size="'+a.size+'" class="form-control date '+a.fieldClass+'" dateFmt="'+a.patternDate+'" size="'+a.size+'" '+e+" />";break;case"textarea":b='<textarea name="'+a.name+'" rows="1" clos="1" class="form-control '+a.fieldClass+'">'+a.defaultVal+"</textarea>";break;case"html":k="",a.html&&(k=a.html),k=k.replace(/&amp;/g,"'"),b=k;break;default:b='<input type="text" name="'+a.name+'" value="'+a.defaultVal+'" size="'+a.size+'" class="form-control '+a.fieldClass+'" '+e+"/>"}return"<td>"+b+"</td>"}function d(a,b){var d="";return $(a).each(function(){d+=c(this)}),d=b?'<tr data-tt-id="#index#">'+d+"</tr>":"<tr>"+d+"</tr>"}return this.each(function(){var i,j,k,l,c=$(this).css("clear","both"),e=c.find("tbody"),f=c.attr("initNum")||0,g=c.hasClass("j-treetable")?!0:!1,h=[];c.find("tr:first th[type]").each(function(){var b=$(this),c={type:b.attr("type")||"text",patternDate:b.attr("dateFmt")||"yyyy-MM-dd",name:b.attr("name")||"",defaultVal:b.attr("defaultVal")||"",size:b.attr("size")||"12",enumUrl:b.attr("enumUrl")||"",lookupGroup:b.attr("lookupGroup")||"",lookupUrl:b.attr("lookupUrl")||"",lookupPk:b.attr("lookupPk")||"id",suggestUrl:b.attr("suggestUrl"),suggestFields:b.attr("suggestFields"),postField:b.attr("postField")||"",fieldClass:b.attr("fieldClass")||"",fieldAttrs:b.attr("fieldAttrs")||"",html:b.attr("html")||""};h.push(c)}),e.on("click","a.j-del",function(){function d(){if(a.is("[href^=javascript:]")){if(a.parents("tr:first").remove(),b(e),c){var d=str2Func(c);d&&d()}return!1}$.ajax({type:"POST",dataType:"json",url:a.attr("href"),cache:!1,success:function(d){if(DWZ.ajaxDone(d),d[DWZ.keys.statusCode]==DWZ.statusCode.ok&&(a.parents("tr:first").remove(),b(e),c)){var f=str2Func(c);f&&f()}},error:DWZ.ajaxError})}var a=$(this),c=a.attr("callfun");return a.attr("title")?alertMsg.confirm(a.attr("title"),{okCall:d}):d(),!1}),i="",j=c.find("tr:first").find("input.num-add"),k=c.find("tr:first").find("a.j-add"),j.bind("keydown",function(a){13==a.which&&(a.preventDefault(),k.click())}),k.click(function(){var f,j,k,l,c=1;for(isNaN($(this).prev().val())||(c=parseInt($(this).prev().val())),i||(i=d(h,g)),j=0;c>j;j++)k=$(i),0==j&&(f=k),k.hide().appendTo(e),b(e),a(e),k.initUI().show().css("display","");f&&f.length&&(l=f.find(".form-control"),l.each(function(){var a=$(this);return a.prop("readonly")?void 0:(a.focus(),!1)}))}),1*f>0&&(l=k.prev(),l.val(f),k.click(),l.val(1)),a(e)})},selectedTodo:function(){function _getIds(a,b){var c="",d="dialog"==b?$.pdialog.getCurrent():navTab.getCurrentPanel();return d.find("input:checked").filter("[name='"+a+"']").each(function(a){var b=$(this).val();c+=0==a?b:","+b}),c}return this.each(function(){var $this=$(this),selectedIds=$this.attr("rel")||"ids",postType=$this.attr("postType")||"map";$this.click(function(){function _doPost(){$.ajax({type:"POST",url:$this.attr("href"),dataType:"json",cache:!1,data:function(){if("map"==postType)return $.map(ids.split(","),function(a){return{name:selectedIds,value:a}});var a={};return a[selectedIds]=ids,a}(),success:_callback,error:DWZ.ajaxError})}var _callback,title,targetType=$this.attr("targetType"),ids=_getIds(selectedIds,targetType);return ids?(_callback=$this.attr("callback")||("dialog"==targetType?dialogAjaxDone:navTabAjaxDone),$.isFunction(_callback)||(_callback=eval("("+_callback+")")),title=$this.attr("title"),title?alertMsg.confirm(title,{okCall:_doPost}):_doPost(),!1):(alertMsg.error($this.attr("warn")||DWZ.msg("alertSelectMsg")),!1)})})}})}(jQuery);
  /* dwz.datapicker @author ZhangHuihua@msn.com */
  !function(a){a.setRegional("datepicker",{dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),a.fn.datepicker=function(c){function e(b){var c=a(d.tmBox$);c.removeClass("hh").removeClass("mm").removeClass("ss"),b&&(c.addClass(b),a(d.tmInputs$).removeClass("slt").filter("."+b).addClass("slt"))}function f(b,c){a(d.tmBox$).find("."+c+" li").each(function(){var c=a(this);c.click(function(){b.val(c.text())})})}function g(a){return a.keyCode>=48&&a.keyCode<=57||a.keyCode==DWZ.keyCode.DELETE||a.keyCode==DWZ.keyCode.BACKSPACE?void 0:!1}function h(a,b){var c=parseInt(a.val()),d=parseInt(a.attr("start"))||0,e=parseInt(a.attr("end")),f=parseInt(a.attr("step")||1);1==b?e-f>=c&&a.val(c+f):-1==b?c>=d+f&&a.val(c-f):c>e?a.val(e):d>c&&a.val(d)}var d={box$:"#calendar",year$:"#calendar [name=year]",month$:"#calendar [name=month]",tmInputs$:"#calendar .time :text",hour$:"#calendar .time .hh",minute$:"#calendar .time .mm",second$:"#calendar .time .ss",tmBox$:"#calendar .tm",tmUp$:"#calendar .time .up",tmDown$:"#calendar .time .down",close$:"#calendar .close",calIcon$:"a.inputDateButton",main$:"#calendar .main",days$:"#calendar .days",dayNames$:"#calendar .dayNames",clearBut$:"#calendar .clearBut",okBut$:"#calendar .okBut"};return this.each(function(){function l(b){var q,r,s,t,u,v,w,x,y,z,c=b.getDateWrap(),k=b.getMinDate(),l=b.getMaxDate(),n=new Date(c.year,c.month-1,1),o=n.getDay(),p="";if(o>0)for(n.setMonth(n.getMonth()-1),q=b.getDateWrap(n),r=q.days-o+1;r<=q.days;r++)s=new Date(c.year,c.month-2,r),t=s>=k&&l>=s?"":"disabled",p+='<dd class="other '+t+'" chMonth="-1" day="'+r+'">'+r+"</dd>";for(r=1;r<=c.days;r++)s=new Date(c.year,c.month-1,r),t=s>=k&&l>=s?"":"disabled",p+=r==c.day?'<dd class="slt '+t+'" day="'+r+'">'+r+"</dd>":'<dd class="'+t+'" day="'+r+'">'+r+"</dd>";for(r=1;r<=42-o-c.days;r++)s=new Date(c.year,c.month,r),t=s>=k&&l>=s?"":"disabled",p+='<dd class="other '+t+'" chMonth="1" day="'+r+'">'+r+"</dd>";u=a(d.days$).html(p).find("dd"),u.not(".disabled").click(function(){var d,e,c=a(this);b.hasTime()?(u.removeClass("slt"),c.addClass("slt")):(d=b.formatDate(b.changeDay(c.attr("day"),c.attr("chMonth"))),m(),i.val(d).focus(),j&&(e=str2Func(j),e&&e.call(e,i,d)))}),b.hasDate()||a(d.main$).addClass("nodate"),b.hasTime()&&(a("#calendar .time").show(),v=a(d.hour$).val(c.hour).focus(function(){e("hh")}),w=parseInt(c.minute/b.opts.mmStep)*b.opts.mmStep,x=a(d.minute$).val(w).attr("step",b.opts.mmStep).focus(function(){e("mm")}),y=a(d.second$).val(b.hasSecond()?c.second:0).attr("step",b.opts.ssStep).focus(function(){e("ss")}),v.add(x).add(y).click(function(){return!1}),f(v,"hh"),f(x,"mm"),f(y,"ss"),a(d.box$).click(function(){e()}),z=a(d.tmInputs$),z.keydown(g).each(function(){var b=a(this);b.keyup(function(){h(b,0)})}),a(d.tmUp$).click(function(){z.filter(".slt").each(function(){h(a(this),1)})}),a(d.tmDown$).click(function(){z.filter(".slt").each(function(){h(a(this),-1)})}),b.hasHour()||v.attr("disabled",!0),b.hasMinute()||x.attr("disabled",!0),b.hasSecond()||y.attr("disabled",!0))}function m(){a(d.box$).remove(),a(document).unbind("click",m)}var i=a(this),j=a(this).attr("callfun");new b(i.val(),c),i.on("click",function(){var f,g,h,k,n,o,p,q,r,s;for(m(),f=new b(i.val(),c),g=i.offset(),h=g.top+this.offsetHeight,a(DWZ.frag.calendarFrag).appendTo("body").css({left:g.left+"px",top:h+"px"}).show().click(function(a){a.stopPropagation()}),k="",a.each(a.regional.datepicker.dayNames,function(a,b){k+="<dt>"+b+"</dt>"}),a(d.dayNames$).html(k),n=f.getDateWrap(),o=a(d.year$),p=f.getMinDate().getFullYear(),q=f.getMaxDate().getFullYear(),y=p;q>=y;y++)o.append('<option value="'+y+'"'+(n.year==y?'selected="selected"':"")+">"+y+"</option>");return r=a(d.month$),a.each(a.regional.datepicker.monthNames,function(a,b){var c=a+1;r.append('<option value="'+c+'"'+(n.month==c?'selected="selected"':"")+">"+b+"</option>")}),l(f),o.add(r).change(function(){if(f.hasTime()){var b=a(d.days$).find(".slt");f.changeDateTime(o.val(),r.val(),b.attr("day"),n.hour,n.minute,n.second),l(f)}else f.changeDate(o.val(),r.val()),l(f)}),s=a(d.box$).outerHeight(!0),h>s&&h>a(window).height()-s&&a(d.box$).css("top",g.top-s),a(d.close$).click(function(){m()}),a(d.clearBut$).click(function(){i.val(""),m()}),a(d.okBut$).click(function(){var c,e,b=a(d.days$).find("dd.slt");return b.hasClass("disabled")?!1:(c=f.changeDay(b.attr("day"),b.attr("chMonth")),f.hasTime()&&(c.setHours(parseInt(a(d.hour$).val())),c.setMinutes(parseInt(a(d.minute$).val())),c.setSeconds(parseInt(a(d.second$).val()))),m(),i.val(f.formatDate(c)).focus(),j&&(e=str2Func(j),e&&e.call(e,i,f.formatDate(c))),void 0)}),a(document).bind("click",m),!1}),i.parent().find(d.calIcon$).click(function(){return i.trigger("click"),!1})})};var b=function(b,c){this.opts=a.extend({pattern:"yyyy-MM-dd",minDate:"1900-01-01",maxDate:"2099-12-31",mmStep:1,ssStep:1},c);var d=new Date;this.opts.minDate=d.formatDateTm(this.opts.minDate),this.opts.maxDate=d.formatDateTm(this.opts.maxDate),this.sDate=b.trim()};a.extend(b.prototype,{get:function(a){return this.opts[a]},_getDays:function(a,b){return 2==b?a%4||!(a%100)&&a%400?28:29:/4|6|9|11/.test(b)?30:31},_minMaxDate:function(a){var b=a.split("-").length-1,c="y-M-d";return 1==b?c="y-M":0==b&&(c="y"),a.parseDate(c)},getMinDate:function(){return this._minMaxDate(this.opts.minDate)},getMaxDate:function(){var d,a=this.opts.maxDate,b=a.split("-").length-1,c=this._minMaxDate(a);return 2>b&&(d=this._getDays(c.getFullYear(),c.getMonth()+1),c.setDate(d),0==b&&c.setMonth(11)),c},getDateWrap:function(a){var b,c,d;return a||(a=this.parseDate(this.sDate)||new Date),b=a.getFullYear(),c=a.getMonth()+1,d=this._getDays(b,c),{year:b,month:c,day:a.getDate(),hour:a.getHours(),minute:a.getMinutes(),second:a.getSeconds(),days:d,date:a}},changeDate:function(a,b,c){var d=new Date(a,b-1,c||1);return this.sDate=this.formatDate(d),d},changeDateTime:function(a,b,c,d,e,f){var g=new Date(a,b-1,c,d,e,f);return this.sDate=this.formatDate(g),g},changeDay:function(a,b){b||(b=0);var c=this.getDateWrap();return this.changeDate(c.year,c.month+parseInt(b),a)},parseDate:function(a){return a?a.parseDate(this.opts.pattern):null},formatDate:function(a){return a.formatDate(this.opts.pattern)},hasHour:function(){return-1!=this.opts.pattern.indexOf("H")},hasMinute:function(){return-1!=this.opts.pattern.indexOf("m")},hasSecond:function(){return-1!=this.opts.pattern.indexOf("s")},hasTime:function(){return this.hasHour()||this.hasMinute()||this.hasSecond()},hasDate:function(){var b,a=["y","M","d","E"];for(b=0;b<a.length;b++)if(-1!=this.opts.pattern.indexOf(a[b]))return!0;return!1}})}(jQuery);
  /* dwz.effects @author Roger Wu */
  !function(a){a.extend(a.fn,{jBlindUp:function(b){var c=a.extend({duration:500,easing:"swing",call:function(){}},b);return this.each(function(){var b=a(this);a(this).animate({height:0},{step:function(){},duration:c.duration,easing:c.easing,complete:function(){b.css({display:"none"}),c.call()}})})},jBlindDown:function(b){var c=a.extend({to:0,duration:500,easing:"swing",call:function(){}},b);return this.each(function(){var b=a(this),d=c.to>0?c.to:a.effect.getDimensions(b[0]).height;b.animate({height:d},{step:function(){},duration:c.duration,easing:c.easing,complete:function(){b.css({display:""}),c.call()}})})},jSlideUp:function(b){var c=a.extend({to:0,duration:500,easing:"swing",call:function(){}},b);return this.each(function(){var d,b=a(this);b.wrapInner("<div></div>"),d=c.to>0?c.to:a.effect.getDimensions(a(">div",b)[0]).height,b.css({overflow:"visible",position:"relative"}),a(">div",b).css({position:"relative"}).animate({top:-d},{easing:c.easing,duration:c.duration,complete:function(){b.html(a(this).html())}})})},jSlideDown:function(b){var c=a.extend({to:0,duration:500,easing:"swing",call:function(){}},b);return this.each(function(){var b=a(this),d=c.to>0?c.to:a.effect.getDimensions(b[0]).height;b.wrapInner('<div style="top:-'+d+'px;"></div>'),b.css({overflow:"visible",position:"relative",height:"0px"}).animate({height:d},{duration:c.duration,easing:c.easing,complete:function(){b.css({display:"",overflow:""}),c.call()}}),a(">div",b).css({position:"relative"}).animate({top:0},{easing:c.easing,duration:c.duration,complete:function(){b.html(a(this).html())}})})}}),a.effect={getDimensions:function(b){var d=new a.effect.Rectangle,e=a(b).css("display"),f=a(b).css("visibility"),g=0==a(b).height()?!0:!1;return a(b).is(":hidden")&&(a(b).css({visibility:"hidden",display:"block"}),g&&a(b).css("height",""),a.browser.opera&&refElement.focus()),d.height=a(b).outerHeight(),d.width=a(b).outerWidth(),"none"==e&&(a(b).css({visibility:f,display:"none"}),g&&g&&a(b).css("height","0px")),d}},a.effect.Rectangle=function(){this.width=0,this.height=0,this.unit="px"}}(jQuery);
  /* dwz.history @author ZhangHuihua@msn.com */
  !function(a){a.extend({History:{_hash:new Array,_cont:void 0,_currentHash:"",_callback:void 0,init:function(b,c){var d,e,f;a.History._cont=b,a.History._callback=c,d=location.hash.replace(/\?.*$/,""),a.History._currentHash=d,a.browser.msie&&(""==a.History._currentHash&&(a.History._currentHash="#"),a("body").append('<iframe id="jQuery_history" style="display: none;" src="about:blank"></iframe>'),e=a("#jQuery_history")[0],f=e.contentDocument||e.contentWindow.document,f.open(),f.close(),f.location.hash=d),a.isFunction(this._callback)&&a.History._callback(d.skipChar("#")),setInterval(a.History._historyCheck,100)},_historyCheck:function(){var c,d,b="";a.browser.msie?(c=a("#jQuery_history")[0],d=c.contentWindow,b=d.location.hash.skipChar("#").replace(/\?.*$/,"")):b=location.hash.skipChar("#").replace(/\?.*$/,""),b!=a.History._currentHash&&(a.History._currentHash=b,a.History.loadHistory(b))},addHistory:function(b,c,d){var e,f,g;a.History._currentHash=b,e=[b,c,d],a.History._hash.push(e),a.browser.msie?(f=a("#jQuery_history")[0],g=f.contentDocument||f.contentWindow.document,g.open(),g.close(),g.location.hash=b.replace(/\?.*$/,""),location.hash=b.replace(/\?.*$/,"")):location.hash=b.replace(/\?.*$/,"")},loadHistory:function(b){a.browser.msie&&(location.hash=b);for(var c=0;c<a.History._hash.length;c+=1)if(a.History._hash[c][0]==b)return a.History._hash[c][1](a.History._hash[c][2]),void 0}}})}(jQuery);