diff --git a/public/.htaccess b/public/.htaccess
new file mode 100644
index 0000000..b75525b
--- /dev/null
+++ b/public/.htaccess
@@ -0,0 +1,21 @@
+
+
+ Options -MultiViews -Indexes
+
+
+ RewriteEngine On
+
+ # Handle Authorization Header
+ RewriteCond %{HTTP:Authorization} .
+ RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
+
+ # Redirect Trailing Slashes If Not A Folder...
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteCond %{REQUEST_URI} (.+)/$
+ RewriteRule ^ %1 [L,R=301]
+
+ # Handle Front Controller...
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteRule ^ index.php [L]
+
diff --git a/public/MP_verify_5MCgYCV9efH212gE.txt b/public/MP_verify_5MCgYCV9efH212gE.txt
new file mode 100644
index 0000000..5cdbacc
--- /dev/null
+++ b/public/MP_verify_5MCgYCV9efH212gE.txt
@@ -0,0 +1 @@
+5MCgYCV9efH212gE
\ No newline at end of file
diff --git a/public/assets/dwzui/dwz.frag.xml b/public/assets/dwzui/dwz.frag.xml
new file mode 100644
index 0000000..8c65485
--- /dev/null
+++ b/public/assets/dwzui/dwz.frag.xml
@@ -0,0 +1,244 @@
+
+<_AJAX_>
+
+
+<_PAGE_ id="dialogFrag">
+
+ 数据加载中,请稍等...
+]]>
+
+
+<_PAGE_ id="pagination">
+
+
+
+
+
+]]>
+
+<_PAGE_ id="navTabCM">
+
刷新标签页
+
关闭标签页
+
关闭其它标签页
+
关闭全部标签页
+
+]]>
+<_PAGE_ id="dialogCM">
+
关闭弹出窗口
+
关闭其它弹出窗口
+
关闭全部弹出窗口
+
+]]>
+<_PAGE_ id="externalFrag">
+]]>
+<_MSG_ id="statusCode_503">
+<_MSG_ id="validateFormError">
+<_MSG_ id="sessionTimout">
+<_MSG_ id="alertSelectMsg">
+<_MSG_ id="forwardConfirmMsg">
+
+<_MSG_ id="dwzTitle">
+<_MSG_ id="mainTabTitle">
+
\ No newline at end of file
diff --git a/public/assets/dwzui/dwz.min.js b/public/assets/dwzui/dwz.min.js
new file mode 100644
index 0000000..ae4446a
--- /dev/null
+++ b/public/assets/dwzui/dwz.min.js
@@ -0,0 +1 @@
+var DWZ={version:"1.6.0",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",initEnvAfter:"initEnvAfter"},isOverAxis:function(x,reference,size){return(x>reference)&&(x<(reference+size))},isOver:function(y,x,top,left,height,width){return this.isOverAxis(y,top,height)&&this.isOverAxis(x,left,width)},pageInfo:{pageNum:"pageNum",numPerPage:"numPerPage",orderField:"orderField",orderDirection:"orderDirection"},statusCode:{ok:200,error:300,timeout:301},keys:{statusCode:"statusCode",message:"message"},ui:{sbar:true,hideMode:"display"},frag:{},_msg:{},_set:{loginUrl:"",loginTitle:"",debug:false},msg:function(key,args){var _format=function(str,args){args=args||[];var result=str||"";for(var i=0;i
]*>([\s\S]*)<\/body>/.exec(content);if(result&&result.length===2){return result[1]}return content},ajaxError:function(xhr,ajaxOptions,thrownError){if(alertMsg){alertMsg.error("Http status: "+xhr.status+" "+xhr.statusText+"
"+"ajaxOptions: "+ajaxOptions+"
"+"thrownError: "+thrownError+"
"+""+DWZ.getHtmlBody(xhr.responseText)+"
")}else{alert("Http status: "+xhr.status+" "+xhr.statusText+"\najaxOptions: "+ajaxOptions+"\nthrownError:"+thrownError+"\n"+xhr.responseText)}},ajaxDone:function(json){if(json[DWZ.keys.statusCode]==DWZ.statusCode.error){if(json[DWZ.keys.message]&&alertMsg){alertMsg.error(json[DWZ.keys.message])}}else{if(json[DWZ.keys.statusCode]==DWZ.statusCode.timeout){if(alertMsg){alertMsg.error(json[DWZ.keys.message]||DWZ.msg("sessionTimout"),{okCall:DWZ.loadLogin})}else{DWZ.loadLogin()}}else{if(json[DWZ.keys.statusCode]==DWZ.statusCode.ok){if(json[DWZ.keys.message]&&alertMsg){alertMsg.correct(json[DWZ.keys.message])}}}}},init:function(pageFrag,options){var op=$.extend({loginUrl:"login.html",loginTitle:null,callback:null,debug:false,statusCode:{},keys:{}},options);this._set.loginUrl=op.loginUrl;this._set.loginTitle=op.loginTitle;this._set.debug=op.debug;$.extend(DWZ.statusCode,op.statusCode);$.extend(DWZ.keys,op.keys);$.extend(DWZ.pageInfo,op.pageInfo);$.extend(DWZ.ui,op.ui);jQuery.ajax({type:"GET",url:pageFrag,dataType:"xml",timeout:50000,cache:false,error:function(xhr){alert("Error loading XML document: "+pageFrag+"\nHttp status: "+xhr.status+" "+xhr.statusText)},success:function(xml){$(xml).find("_PAGE_").each(function(){var pageId=$(this).attr("id");if(pageId){DWZ.frag[pageId]=$(this).text()}});$(xml).find("_MSG_").each(function(){var id=$(this).attr("id");if(id){DWZ._msg[id]=$(this).text()}});if(jQuery.isFunction(op.callback)){op.callback()}}});var _doc=$(document);if(!_doc.isBind(DWZ.eventType.pageClear)){_doc.bind(DWZ.eventType.pageClear,function(event){var box=event.target;if($.fn.xheditor){$("textarea.editor",box).xheditor(false)}if(window.UE&&UE.getEditor){$("div.edui-editor",box).each(function(){var editorId=$(this).parent().attr("id");UE.getEditor(editorId).destroy()})}})}}};(function($){$.setRegional=function(key,value){if(!$.regional){$.regional={}}$.regional[key]=value};$.fn.extend({ajaxUrl:function(op){var $this=$(this);$this.trigger(DWZ.eventType.pageClear);$.ajax({type:op.type||"GET",url:op.url,data:op.data,cache:false,success:function(response){var json=DWZ.jsonEval(response);if(json[DWZ.keys.statusCode]==DWZ.statusCode.error){if($.pdialog){$.pdialog.checkCloseCurrent(json)}if(navTab){navTab.checkCloseCurrent(json)}if(json[DWZ.keys.message]){alertMsg.error(json[DWZ.keys.message])}}else{$this.html(response).initUI();if($.isFunction(op.callback)){op.callback(response)}}if(json[DWZ.keys.statusCode]==DWZ.statusCode.timeout){if($.pdialog){$.pdialog.checkCloseCurrent(json)}if(navTab){navTab.checkCloseCurrent(json)}alertMsg.error(json[DWZ.keys.message]||DWZ.msg("sessionTimout"),{okCall:function(){DWZ.loadLogin()}})}},error:DWZ.ajaxError,statusCode:{503:function(xhr,ajaxOptions,thrownError){alert(DWZ.msg("statusCode_503")||thrownError)}}})},loadUrl:function(url,data,callback){$(this).ajaxUrl({url:url,data:data,callback:callback})},initUI:function(){return this.each(function(){var $this=$(this);$.each(DWZ.regPlugins,function(index,fn){fn($this)})})},layoutH:function($refBox){return this.each(function(){var $this=$(this);if(!$refBox){$refBox=$this.getLayoutBox()}var iRefH=$refBox.height();var iLayoutH=parseInt($this.attr("layoutH"));var iH=iRefH-iLayoutH>50?iRefH-iLayoutH:50;if($this.isTag("table")){$this.removeAttr("layoutH").wrap('')}else{$this.height(iH).css("overflow","auto")}})},getLayoutBox:function(){return $(this).parents("div.layoutBox:first")},hoverClass:function(className,speed){var _className=className||"hover";return this.each(function(){var $this=$(this),mouseOutTimer;$this.hover(function(){if(mouseOutTimer){clearTimeout(mouseOutTimer)}$this.addClass(_className)},function(){mouseOutTimer=setTimeout(function(){$this.removeClass(_className)},speed||10)})})},focusClass:function(className){var _className=className||"textInputFocus";return this.each(function(){$(this).focus(function(){$(this).addClass(_className)}).blur(function(){$(this).removeClass(_className)})})},inputAlert:function(){return this.each(function(){var $this=$(this);function getAltBox(){return $this.parent().find("label.alt")}function altBoxCss(opacity){var position=$this.position();return{width:$this.width(),top:position.top+"px",left:position.left+"px",opacity:opacity||1}}if(getAltBox().size()<1){if(!$this.attr("id")){$this.attr("id",$this.attr("name")+"_"+Math.round(Math.random()*10000))}var $label=$('").appendTo($this.parent());$label.css(altBoxCss(1));if($this.val()){$label.hide()}}$this.focus(function(){getAltBox().css(altBoxCss(0.3))}).blur(function(){if(!$(this).val()){getAltBox().show().css("opacity",1)}}).keydown(function(){getAltBox().hide()})})},isTag:function(tn){if(!tn){return false}return $(this)[0].tagName.toLowerCase()==tn?true:false},isBind:function(type){var _events=$(this).data("events");return _events&&type&&_events[type]},log:function(msg){return this.each(function(){if(console){console.log("%s: %o",msg,this)}})}});$.extend(String.prototype,{isPositiveInteger:function(){return(new RegExp(/^[1-9]\d*$/).test(this))},isInteger:function(){return(new RegExp(/^\d+$/).test(this))},isNumber:function(value,element){return(new RegExp(/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/).test(this))},trim:function(){return this.replace(/(^\s*)|(\s*$)|\r|\n/g,"")},startsWith:function(pattern){return this.indexOf(pattern)===0},endsWith:function(pattern){var d=this.length-pattern.length;return d>=0&&this.lastIndexOf(pattern)===d},replaceSuffix:function(index){return this.replace(/\[[0-9]+\]/,"["+index+"]").replace("#index#",index)},trans:function(){return this.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')},encodeTXT:function(){return(this).replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll(" "," ")},replaceAll:function(os,ns){return this.replace(new RegExp(os,"gm"),ns)},replaceTm:function(data){if(!data){return this}return this.replace(RegExp("({[A-Za-z_]+[A-Za-z0-9_]*})","g"),function($1){return data[$1.replace(/[{}]+/g,"")]})},replaceTmById:function(_box){var $parent=_box||$(document);return this.replace(RegExp("({[A-Za-z_]+[A-Za-z0-9_]*})","g"),function($1){var $input=$parent.find("#"+$1.replace(/[{}]+/g,""));return $input.val()?$input.val():$1})},isFinishedTm:function(){return !(new RegExp("{[A-Za-z_]+[A-Za-z0-9_]*}").test(this))},skipChar:function(ch){if(!this||this.length===0){return""}if(this.charAt(0)===ch){return this.substring(1).skipChar(ch)}return 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(){for(var i=0;i=this.elements.length){return null}return this.elements[_index]};this.containsKey=function(_key){try{for(i=0;i9?"":"0")+x}function formatDate(date,format){format=format+"";var result="";var i_format=0;var c="";var token="";var y=date.getYear()+"";var M=date.getMonth()+1;var d=date.getDate();var E=date.getDay();var H=date.getHours();var m=date.getMinutes();var s=date.getSeconds();var yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k;var value={};if(y.length<4){y=""+(y-0+1900)}value["y"]=""+y;value["yyyy"]=y;value["yy"]=y.substring(2,4);value["M"]=M;value["MM"]=LZ(M);value["MMM"]=MONTH_NAMES[M-1];value["NNN"]=MONTH_NAMES[M+11];value["d"]=d;value["dd"]=LZ(d);value["E"]=DAY_NAMES[E+7];value["EE"]=DAY_NAMES[E];value["H"]=H;value["HH"]=LZ(H);if(H==0){value["h"]=12}else{if(H>12){value["h"]=H-12}else{value["h"]=H}}value["hh"]=LZ(value["h"]);if(H>11){value["K"]=H-12}else{value["K"]=H}value["k"]=H+1;value["KK"]=LZ(value["K"]);value["kk"]=LZ(value["k"]);if(H>11){value["a"]="PM"}else{value["a"]="AM"}value["m"]=m;value["mm"]=LZ(m);value["s"]=s;value["ss"]=LZ(s);while(i_format=minlength;x--){var token=str.substring(i,i+x);if(token.length70){year=1900+(year-0)}else{year=2000+(year-0)}}}else{if(token=="MMM"||token=="NNN"){month=0;for(var i=0;i11)){month=i+1;if(month>12){month-=12}i_val+=month_name.length;break}}}if((month<1)||(month>12)){return 0}}else{if(token=="EE"||token=="E"){for(var i=0;i12)){return 0}i_val+=month.length}else{if(token=="dd"||token=="d"){date=_getInt(val,i_val,token.length,2);if(date==null||(date<1)||(date>31)){return 0}i_val+=date.length}else{if(token=="hh"||token=="h"){hh=_getInt(val,i_val,token.length,2);if(hh==null||(hh<1)||(hh>12)){return 0}i_val+=hh.length}else{if(token=="HH"||token=="H"){hh=_getInt(val,i_val,token.length,2);if(hh==null||(hh<0)||(hh>23)){return 0}i_val+=hh.length}else{if(token=="KK"||token=="K"){hh=_getInt(val,i_val,token.length,2);if(hh==null||(hh<0)||(hh>11)){return 0}i_val+=hh.length}else{if(token=="kk"||token=="k"){hh=_getInt(val,i_val,token.length,2);if(hh==null||(hh<1)||(hh>24)){return 0}i_val+=hh.length;hh--}else{if(token=="mm"||token=="m"){mm=_getInt(val,i_val,token.length,2);if(mm==null||(mm<0)||(mm>59)){return 0}i_val+=mm.length}else{if(token=="ss"||token=="s"){ss=_getInt(val,i_val,token.length,2);if(ss==null||(ss<0)||(ss>59)){return 0}i_val+=ss.length}else{if(token=="a"){if(val.substring(i_val,i_val+2).toLowerCase()=="am"){ampm="AM"}else{if(val.substring(i_val,i_val+2).toLowerCase()=="pm"){ampm="PM"}else{return 0}}i_val+=2}else{if(val.substring(i_val,i_val+token.length)!=token){return 0}else{i_val+=token.length}}}}}}}}}}}}}}if(i_val!=val.length){return 0}if(month==2){if(((year%4==0)&&(year%100!=0))||(year%400==0)){if(date>29){return 0}}else{if(date>28){return 0}}}if((month==4)||(month==6)||(month==9)||(month==11)){if(date>30){return 0}}if(hh<12&&m=="PM"){hh=hh-0+12}else{if(hh>11&&m=="AM"){hh-=12}}return new Date(year,month-1,date,hh,mm,ss)}Date.prototype.formatDate=function(dateFmt){return formatDate(this,dateFmt)};String.prototype.parseDate=function(dateFmt){if(this.length0){_y=aDate[0]}if(aDate.length>1){_m=aDate[1]-1}if(aDate.length>2){_d=aDate[2]}return new Date(_y,_m,_d).formatDate("yyyy-MM-dd")}})();(function($){$.extend($.fn,{validate:function(options){if(!this.length){if(options&&options.debug&&window.console){console.warn("Nothing selected, can't validate, returning nothing.")}return}var validator=$.data(this[0],"validator");if(validator){return validator}this.attr("novalidate","novalidate");validator=new $.validator(options,this[0]);$.data(this[0],"validator",validator);if(validator.settings.onsubmit){this.validateDelegate(":submit","click",function(event){if(validator.settings.submitHandler){validator.submitButton=event.target}if($(event.target).hasClass("cancel")){validator.cancelSubmit=true}if($(event.target).attr("formnovalidate")!==undefined){validator.cancelSubmit=true}});this.submit(function(event){if(validator.settings.debug){event.preventDefault()}function handle(){var hidden;if(validator.settings.submitHandler){if(validator.submitButton){hidden=$("").attr("name",validator.submitButton.name).val($(validator.submitButton).val()).appendTo(validator.currentForm)}validator.settings.submitHandler.call(validator,validator.currentForm,event);if(validator.submitButton){hidden.remove()}return false}return true}if(validator.cancelSubmit){validator.cancelSubmit=false;return handle()}if(validator.form()){if(validator.pendingRequest){validator.formSubmitted=true;return false}return handle()}else{validator.focusInvalid();return false}})}return validator},valid:function(){if($(this[0]).is("form")){return this.validate().form()}else{var valid=true;var validator=$(this[0].form).validate();this.each(function(){valid=valid&&validator.element(this)});return valid}},removeAttrs:function(attributes){var result={},$element=this;$.each(attributes.split(/\s/),function(index,value){result[value]=$element.attr(value);$element.removeAttr(value)});return result},rules:function(command,argument){var element=this[0];if(command){var settings=$.data(element.form,"validator").settings;var staticRules=settings.rules;var existingRules=$.validator.staticRules(element);switch(command){case"add":$.extend(existingRules,$.validator.normalizeRule(argument));delete existingRules.messages;staticRules[element.name]=existingRules;if(argument.messages){settings.messages[element.name]=$.extend(settings.messages[element.name],argument.messages)}break;case"remove":if(!argument){delete staticRules[element.name];return existingRules}var filtered={};$.each(argument.split(/\s/),function(index,method){filtered[method]=existingRules[method];delete existingRules[method]});return filtered}}var data=$.validator.normalizeRules($.extend({},$.validator.classRules(element),$.validator.attributeRules(element),$.validator.dataRules(element),$.validator.staticRules(element)),element);if(data.required){var param=data.required;delete data.required;data=$.extend({required:param},data)}return data}});$.extend($.expr[":"],{blank:function(a){return !$.trim(""+$(a).val())},filled:function(a){return !!$.trim(""+$(a).val())},unchecked:function(a){return !$(a).prop("checked")}});$.validator=function(options,form){this.settings=$.extend(true,{},$.validator.defaults,options);this.currentForm=form;this.init()};$.validator.format=function(source,params){if(arguments.length===1){return function(){var args=$.makeArray(arguments);args.unshift(source);return $.validator.format.apply(this,args)}}if(arguments.length>2&¶ms.constructor!==Array){params=$.makeArray(arguments).slice(1)}if(params.constructor!==Array){params=[params]}$.each(params,function(i,n){source=source.replace(new RegExp("\\{"+i+"\\}","g"),function(){return n})});return source};$.extend($.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:$([]),errorLabelContainer:$([]),onsubmit:true,ignore:":hidden",ignoreTitle:false,onfocusin:function(element,event){this.lastActive=element;if(this.settings.focusCleanup&&!this.blockFocusCleanup){if(this.settings.unhighlight){this.settings.unhighlight.call(this,element,this.settings.errorClass,this.settings.validClass)}this.addWrapper(this.errorsFor(element)).hide()}},onfocusout:function(element,event){if(!this.checkable(element)&&(element.name in this.submitted||!this.optional(element))){this.element(element)}},onkeyup:function(element,event){if(event.which===9&&this.elementValue(element)===""){return}else{if(element.name in this.submitted||element===this.lastElement){this.element(element)}}},onclick:function(element,event){if(element.name in this.submitted){this.element(element)}else{if(element.parentNode.name in this.submitted){this.element(element.parentNode)}}},highlight:function(element,errorClass,validClass){if(element.type==="radio"){this.findByName(element.name).addClass(errorClass).removeClass(validClass)}else{$(element).addClass(errorClass).removeClass(validClass)}},unhighlight:function(element,errorClass,validClass){if(element.type==="radio"){this.findByName(element.name).removeClass(errorClass).addClass(validClass)}else{$(element).removeClass(errorClass).addClass(validClass)}}},setDefaults:function(settings){$.extend($.validator.defaults,settings)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:$.validator.format("Please enter no more than {0} characters."),minlength:$.validator.format("Please enter at least {0} characters."),rangelength:$.validator.format("Please enter a value between {0} and {1} characters long."),range:$.validator.format("Please enter a value between {0} and {1}."),max:$.validator.format("Please enter a value less than or equal to {0}."),min:$.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=$(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||$(this.currentForm);this.containers=$(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var groups=(this.groups={});$.each(this.settings.groups,function(key,value){if(typeof value==="string"){value=value.split(/\s/)}$.each(value,function(index,name){groups[name]=key})});var rules=this.settings.rules;$.each(rules,function(key,value){rules[key]=$.validator.normalizeRule(value)});function delegate(event){var validator=$.data(this[0].form,"validator"),eventType="on"+event.type.replace(/^validate/,"");if(validator.settings[eventType]){validator.settings[eventType].call(validator,this[0],event)}}$(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, "+"[type='number'], [type='search'] ,[type='tel'], [type='url'], "+"[type='email'], [type='datetime'], [type='date'], [type='month'], "+"[type='week'], [type='time'], [type='datetime-local'], "+"[type='range'], [type='color'] ","focusin focusout keyup",delegate).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",delegate);if(this.settings.invalidHandler){$(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)}},form:function(){this.checkForm();$.extend(this.submitted,this.errorMap);this.invalid=$.extend({},this.errorMap);if(!this.valid()){$(this.currentForm).triggerHandler("invalid-form",[this])}this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var i=0,elements=(this.currentElements=this.elements());elements[i];i++){this.check(elements[i])}return this.valid()},element:function(element){element=this.validationTargetFor(this.clean(element));this.lastElement=element;this.prepareElement(element);this.currentElements=$(element);var result=this.check(element)!==false;if(result){delete this.invalid[element.name]}else{this.invalid[element.name]=true}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers)}this.showErrors();return result},showErrors:function(errors){if(errors){$.extend(this.errorMap,errors);this.errorList=[];for(var name in errors){this.errorList.push({message:errors[name],element:this.findByName(name)[0]})}this.successList=$.grep(this.successList,function(element){return !(element.name in errors)})}if(this.settings.showErrors){this.settings.showErrors.call(this,this.errorMap,this.errorList)}else{this.defaultShowErrors()}},resetForm:function(){if($.fn.resetForm){$(this.currentForm).resetForm()}this.submitted={};this.lastElement=null;this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(obj){var count=0;for(var i in obj){count++}return count},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()===0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid){try{$(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(e){}}},findLastActive:function(){var lastActive=this.lastActive;return lastActive&&$.grep(this.errorList,function(n){return n.element.name===lastActive.name}).length===1&&lastActive},elements:function(){var validator=this,rulesCache={};return $(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){if(!this.name&&validator.settings.debug&&window.console){console.error("%o has no name assigned",this)}if(this.name in rulesCache||!validator.objectLength($(this).rules())){return false}rulesCache[this.name]=true;return true})},clean:function(selector){return $(selector)[0]},errors:function(){var errorClass=this.settings.errorClass.replace(" ",".");return $(this.settings.errorElement+"."+errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=$([]);this.toHide=$([]);this.currentElements=$([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(element){this.reset();this.toHide=this.errorsFor(element)},elementValue:function(element){var type=$(element).attr("type"),val=$(element).val();if(type==="radio"||type==="checkbox"){return $("input[name='"+$(element).attr("name")+"']:checked").val()}if(typeof val==="string"){return val.replace(/\r/g,"")}return val},check:function(element){element=this.validationTargetFor(this.clean(element));var rules=$(element).rules();var dependencyMismatch=false;var val=this.elementValue(element);var result;for(var method in rules){var rule={method:method,parameters:rules[method]};try{result=$.validator.methods[method].call(this,val,element,rule.parameters);if(result==="dependency-mismatch"){dependencyMismatch=true;continue}dependencyMismatch=false;if(result==="pending"){this.toHide=this.toHide.not(this.errorsFor(element));return}if(!result){this.formatAndAdd(element,rule);return false}}catch(e){if(this.settings.debug&&window.console){console.log("Exception occurred when checking element "+element.id+", check the '"+rule.method+"' method.",e)}throw e}}if(dependencyMismatch){return}if(this.objectLength(rules)){this.successList.push(element)}return true},customDataMessage:function(element,method){return $(element).data("msg-"+method.toLowerCase())||(element.attributes&&$(element).attr("data-msg-"+method.toLowerCase()))},customMessage:function(name,method){var m=this.settings.messages[name];return m&&(m.constructor===String?m:m[method])},findDefined:function(){for(var i=0;iWarning: No message defined for "+element.name+"")},formatAndAdd:function(element,rule){var message=this.defaultMessage(element,rule.method),theregex=/\$?\{(\d+)\}/g;if(typeof message==="function"){message=message.call(this,rule.parameters,element)}else{if(theregex.test(message)){message=$.validator.format(message.replace(theregex,"{$1}"),rule.parameters)}}this.errorList.push({message:message,element:element});this.errorMap[element.name]=message;this.submitted[element.name]=message},addWrapper:function(toToggle){if(this.settings.wrapper){toToggle=toToggle.add(toToggle.parent(this.settings.wrapper))}return toToggle},defaultShowErrors:function(){var i,elements;for(i=0;this.errorList[i];i++){var error=this.errorList[i];if(this.settings.highlight){this.settings.highlight.call(this,error.element,this.settings.errorClass,this.settings.validClass)}this.showLabel(error.element,error.message)}if(this.errorList.length){this.toShow=this.toShow.add(this.containers)}if(this.settings.success){for(i=0;this.successList[i];i++){this.showLabel(this.successList[i])}}if(this.settings.unhighlight){for(i=0,elements=this.validElements();elements[i];i++){this.settings.unhighlight.call(this,elements[i],this.settings.errorClass,this.settings.validClass)}}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return $(this.errorList).map(function(){return this.element})},showLabel:function(element,message){var label=this.errorsFor(element);if(label.length){label.removeClass(this.settings.validClass).addClass(this.settings.errorClass);label.html(message)}else{label=$("<"+this.settings.errorElement+">").attr("for",this.idOrName(element)).addClass(this.settings.errorClass).html(message||"");if(this.settings.wrapper){label=label.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()}if(!this.labelContainer.append(label).length){if(this.settings.errorPlacement){this.settings.errorPlacement(label,$(element))}else{label.insertAfter(element)}}}if(!message&&this.settings.success){label.text("");if(typeof this.settings.success==="string"){label.addClass(this.settings.success)}else{this.settings.success(label,element)}}this.toShow=this.toShow.add(label)},errorsFor:function(element){var name=this.idOrName(element);return this.errors().filter(function(){return $(this).attr("for")===name})},idOrName:function(element){return this.groups[element.name]||(this.checkable(element)?element.name:element.id||element.name)},validationTargetFor:function(element){if(this.checkable(element)){element=this.findByName(element.name).not(this.settings.ignore)[0]}return element},checkable:function(element){return(/radio|checkbox/i).test(element.type)},findByName:function(name){return $(this.currentForm).find("[name='"+name+"']")},getLength:function(value,element){switch(element.nodeName.toLowerCase()){case"select":return $("option:selected",element).length;case"input":if(this.checkable(element)){return this.findByName(element.name).filter(":checked").length}}return value.length},depend:function(param,element){return this.dependTypes[typeof param]?this.dependTypes[typeof param](param,element):true},dependTypes:{"boolean":function(param,element){return param},"string":function(param,element){return !!$(param,element.form).length},"function":function(param,element){return param(element)}},optional:function(element){var val=this.elementValue(element);return !$.validator.methods.required.call(this,val,element)&&"dependency-mismatch"},startRequest:function(element){if(!this.pending[element.name]){this.pendingRequest++;this.pending[element.name]=true}},stopRequest:function(element,valid){this.pendingRequest--;if(this.pendingRequest<0){this.pendingRequest=0}delete this.pending[element.name];if(valid&&this.pendingRequest===0&&this.formSubmitted&&this.form()){$(this.currentForm).submit();this.formSubmitted=false}else{if(!valid&&this.pendingRequest===0&&this.formSubmitted){$(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false}}},previousValue:function(element){return $.data(element,"previousValue")||$.data(element,"previousValue",{old:null,valid:true,message:this.defaultMessage(element,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},number:{number:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(className,rules){if(className.constructor===String){this.classRuleSettings[className]=rules}else{$.extend(this.classRuleSettings,className)}},classRules:function(element){var rules={};var classes=$(element).attr("class");if(classes){$.each(classes.split(" "),function(){if(this in $.validator.classRuleSettings){$.extend(rules,$.validator.classRuleSettings[this])}})}return rules},attributeRules:function(element){var rules={};var $element=$(element);var type=$element[0].getAttribute("type");for(var method in $.validator.methods){var value;if(method==="required"){value=$element.get(0).getAttribute(method);if(value===""){value=true}value=!!value}else{value=$element.attr(method)}if(/min|max/.test(method)&&(type===null||/number|range|text/.test(type))){value=Number(value)}if(value){rules[method]=value}else{if(type===method&&type!=="range"){rules[method]=true}}}if(rules.maxlength&&/-1|2147483647|524288/.test(rules.maxlength)){delete rules.maxlength}return rules},dataRules:function(element){var method,value,rules={},$element=$(element);for(method in $.validator.methods){value=$element.data("rule-"+method.toLowerCase());if(value!==undefined){rules[method]=value}}return rules},staticRules:function(element){var rules={};var validator=$.data(element.form,"validator");if(validator.settings.rules){rules=$.validator.normalizeRule(validator.settings.rules[element.name])||{}}return rules},normalizeRules:function(rules,element){$.each(rules,function(prop,val){if(val===false){delete rules[prop];return}if(val.param||val.depends){var keepRule=true;switch(typeof val.depends){case"string":keepRule=!!$(val.depends,element.form).length;break;case"function":keepRule=val.depends.call(element,element);break}if(keepRule){rules[prop]=val.param!==undefined?val.param:true}else{delete rules[prop]}}});$.each(rules,function(rule,parameter){rules[rule]=$.isFunction(parameter)?parameter(element):parameter});$.each(["minlength","maxlength"],function(){if(rules[this]){rules[this]=Number(rules[this])}});$.each(["rangelength","range"],function(){var parts;if(rules[this]){if($.isArray(rules[this])){rules[this]=[Number(rules[this][0]),Number(rules[this][1])]}else{if(typeof rules[this]==="string"){parts=rules[this].split(/[\s,]+/);rules[this]=[Number(parts[0]),Number(parts[1])]}}}});if($.validator.autoCreateRanges){if(rules.min&&rules.max){rules.range=[rules.min,rules.max];delete rules.min;delete rules.max}if(rules.minlength&&rules.maxlength){rules.rangelength=[rules.minlength,rules.maxlength];delete rules.minlength;delete rules.maxlength}}return rules},normalizeRule:function(data){if(typeof data==="string"){var transformed={};$.each(data.split(/\s/),function(){transformed[this]=true});data=transformed}return data},addMethod:function(name,method,message){$.validator.methods[name]=method;$.validator.messages[name]=message!==undefined?message:$.validator.messages[name];if(method.length<3){$.validator.addClassRules(name,$.validator.normalizeRule(name))}},methods:{required:function(value,element,param){if(!this.depend(param,element)){return"dependency-mismatch"}if(element.nodeName.toLowerCase()==="select"){var val=$(element).val();return val&&val.length>0}if(this.checkable(element)){return this.getLength(value,element)>0}return $.trim(value).length>0},email:function(value,element){return this.optional(element)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(value)},url:function(value,element){return this.optional(element)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value)},date:function(value,element){return this.optional(element)||!/Invalid|NaN/.test(new Date(value).toString())},dateISO:function(value,element){return this.optional(element)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(value)},number:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value)},digits:function(value,element){return this.optional(element)||/^\d+$/.test(value)},creditcard:function(value,element){if(this.optional(element)){return"dependency-mismatch"}if(/[^0-9 \-]+/.test(value)){return false}var nCheck=0,nDigit=0,bEven=false;value=value.replace(/\D/g,"");for(var n=value.length-1;n>=0;n--){var cDigit=value.charAt(n);nDigit=parseInt(cDigit,10);if(bEven){if((nDigit*=2)>9){nDigit-=9}}nCheck+=nDigit;bEven=!bEven}return(nCheck%10)===0},minlength:function(value,element,param){var length=$.isArray(value)?value.length:this.getLength($.trim(value),element);return this.optional(element)||length>=param},maxlength:function(value,element,param){var length=$.isArray(value)?value.length:this.getLength($.trim(value),element);return this.optional(element)||length<=param},rangelength:function(value,element,param){var length=$.isArray(value)?value.length:this.getLength($.trim(value),element);return this.optional(element)||(length>=param[0]&&length<=param[1])},min:function(value,element,param){return this.optional(element)||value>=param},max:function(value,element,param){return this.optional(element)||value<=param},range:function(value,element,param){return this.optional(element)||(value>=param[0]&&value<=param[1])},equalTo:function(value,element,param){var target=$(param);if(this.settings.onfocusout){target.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){$(element).valid()})}return value===target.val()},remote:function(value,element,param){if(this.optional(element)){return"dependency-mismatch"}var previous=this.previousValue(element);if(!this.settings.messages[element.name]){this.settings.messages[element.name]={}}previous.originalMessage=this.settings.messages[element.name].remote;this.settings.messages[element.name].remote=previous.message;param=typeof param==="string"&&{url:param}||param;if(previous.old===value){return previous.valid}previous.old=value;var validator=this;this.startRequest(element);var data={};data[element.name]=value;$.ajax($.extend(true,{url:param,mode:"abort",port:"validate"+element.name,dataType:"json",data:data,success:function(response){validator.settings.messages[element.name].remote=previous.originalMessage;var valid=response===true||response==="true";if(valid){var submitted=validator.formSubmitted;validator.prepareElement(element);validator.formSubmitted=submitted;validator.successList.push(element);delete validator.invalid[element.name];validator.showErrors()}else{var errors={};var message=response||validator.defaultMessage(element,"remote");errors[element.name]=previous.message=$.isFunction(message)?message(value):message;validator.invalid[element.name]=true;validator.showErrors(errors)}previous.valid=valid;validator.stopRequest(element,valid)}},param));return"pending"}}});$.format=$.validator.format}(jQuery));(function($){var pendingRequests={};if($.ajaxPrefilter){$.ajaxPrefilter(function(settings,_,xhr){var port=settings.port;if(settings.mode==="abort"){if(pendingRequests[port]){pendingRequests[port].abort()}pendingRequests[port]=xhr}})}else{var ajax=$.ajax;$.ajax=function(settings){var mode=("mode" in settings?settings:$.ajaxSettings).mode,port=("port" in settings?settings:$.ajaxSettings).port;if(mode==="abort"){if(pendingRequests[port]){pendingRequests[port].abort()}pendingRequests[port]=ajax.apply(this,arguments);return pendingRequests[port]}return ajax.apply(this,arguments)}}}(jQuery));(function($){$.extend($.fn,{validateDelegate:function(delegate,type,handler){return this.bind(type,function(event){var target=$(event.target);if(target.is(delegate)){return handler.apply(target,arguments)}})}})}(jQuery));(function($){if($.validator){$.validator.addMethod("alphanumeric",function(value,element){return this.optional(element)||/^\w+$/i.test(value)},"Letters, numbers or underscores only please");$.validator.addMethod("lettersonly",function(value,element){return this.optional(element)||/^[a-z]+$/i.test(value)},"Letters only please");$.validator.addMethod("phone",function(value,element){return this.optional(element)||/^[0-9 \(\)]{7,30}$/.test(value)},"Please specify a valid phone number");$.validator.addMethod("postcode",function(value,element){return this.optional(element)||/^[0-9 A-Za-z]{5,20}$/.test(value)},"Please specify a valid postcode");$.validator.addMethod("date",function(value,element){value=value.replace(/\s+/g,"");if(String.prototype.parseDate){var $input=$(element);var pattern=$input.attr("dateFmt")||"yyyy-MM-dd";return !$input.val()||$input.val().parseDate(pattern)}else{return this.optional(element)||value.match(/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/)}},"Please enter a valid date.");$.validator.addMethod("customvalid",function(value,element,params){try{return eval("("+params+")")}catch(e){return false}},"Please fix this field.");$.validator.addClassRules({date:{date:true},alphanumeric:{alphanumeric:true},lettersonly:{lettersonly:true},phone:{phone:true},postcode:{postcode:true}});$.validator.setDefaults({errorElement:"span"});$.validator.autoCreateRanges=true}})(jQuery);(function($){$.fn.cssv=function(pre){var cssPre=$(this).css(pre);return cssPre.substring(0,cssPre.indexOf("px"))*1};$.fn.jBar=function(options){var op=$.extend({container:"#container",collapse:".collapse",toggleBut:".toggleCollapse div",sideBar:"#sidebar",sideBar2:"#sidebar_s",splitBar:"#splitBar",splitBar2:"#splitBarProxy"},options);return this.each(function(){var jbar=this;var sbar=$(op.sideBar2,jbar);var bar=$(op.sideBar,jbar);$(op.toggleBut,bar).click(function(){DWZ.ui.sbar=false;$(op.splitBar).hide();var sbarwidth=sbar.cssv("left")+sbar.outerWidth();var barleft=sbarwidth-bar.outerWidth();var cleft=$(op.container).cssv("left")-(bar.outerWidth()-sbar.outerWidth());var cwidth=bar.outerWidth()-sbar.outerWidth()+$(op.container).outerWidth();$(op.container).animate({left:cleft,width:cwidth},50,function(){bar.animate({left:barleft},500,function(){bar.hide();sbar.show().css("left",-50).animate({left:5},200);$(window).trigger(DWZ.eventType.resizeGrid)})});$(op.collapse,sbar).click(function(){var sbarwidth=sbar.cssv("left")+sbar.outerWidth();if(bar.is(":hidden")){$(op.toggleBut,bar).hide();bar.show().animate({left:sbarwidth},500);$(op.container).click(_hideBar)}else{bar.animate({left:barleft},500,function(){bar.hide()})}function _hideBar(){$(op.container).unbind("click",_hideBar);if(!DWZ.ui.sbar){bar.animate({left:barleft},500,function(){bar.hide()})}}return false});return false});$(op.toggleBut,sbar).click(function(){DWZ.ui.sbar=true;sbar.animate({left:-25},200,function(){bar.show()});bar.animate({left:5},800,function(){$(op.splitBar).show();$(op.toggleBut,bar).show();var cleft=5+bar.outerWidth()+$(op.splitBar).outerWidth();var cwidth=$(op.container).outerWidth()-(cleft-$(op.container).cssv("left"));$(op.container).css({left:cleft,width:cwidth});$(op.collapse,sbar).unbind("click");$(window).trigger(DWZ.eventType.resizeGrid)});return false});$(op.splitBar).mousedown(function(event){$(op.splitBar2).each(function(){var spbar2=$(this);setTimeout(function(){spbar2.show()},100);spbar2.css({visibility:"visible",left:$(op.splitBar).css("left")});spbar2.jDrag($.extend(options,{obj:$("#sidebar"),move:"horizontal",event:event,stop:function(){$(this).css("visibility","hidden");var move=$(this).cssv("left")-$(op.splitBar).cssv("left");var sbarwidth=bar.outerWidth()+move;var cleft=$(op.container).cssv("left")+move;var cwidth=$(op.container).outerWidth()-move;bar.css("width",sbarwidth);$(op.splitBar).css("left",$(this).css("left"));$(op.container).css({left:cleft,width:cwidth})}}));return false})})})}})(jQuery);(function($){$.scrollPosParents=function(el){var $el=$(el);var scrollPos={top:0,left:0};$el.parents().each(function(){var $p=$(this);scrollPos.top+=$p.scrollTop();scrollPos.left+=$p.scrollLeft()});return scrollPos};$.fn.jDrag=function(options){if(typeof options=="string"){if(options=="destroy"){return this.each(function(){$(this).unbind("mousedown",$.rwdrag.start);$.data(this,"pp-rwdrag",null)})}}return this.each(function(){var el=$(this);$.data($.rwdrag,"pp-rwdrag",{options:$.extend({el:el,obj:el},options)});if(options.event){$.rwdrag.start(options.event)}else{var select=options.selector;$(select,obj).bind("mousedown",$.rwdrag.start)}})};$.rwdrag={start:function(e){document.onselectstart=function(e){return false};var data=$.data(this,"pp-rwdrag");var el=data.options.el[0];$.data(el,"pp-rwdrag",{options:data.options});if(!$.rwdrag.current){$.rwdrag.current={el:el,oleft:parseInt(el.style.left)||0,otop:parseInt(el.style.top)||0,ox:e.pageX||e.screenX,oy:e.pageY||e.screenY};$(document).bind("mouseup",$.rwdrag.stop).bind("mousemove",$.rwdrag.drag)}},drag:function(e){if(!e){var e=window.event}var current=$.rwdrag.current;var data=$.data(current.el,"pp-rwdrag");var left=(current.oleft+(e.pageX||e.clientX)-current.ox);var top=(current.otop+(e.pageY||e.clientY)-current.oy);if(top<1){top=0}if(data.options.move=="horizontal"){if((data.options.minW&&left>=$(data.options.obj).cssv("left")+data.options.minW)&&(data.options.maxW&&left<=$(data.options.obj).cssv("left")+data.options.maxW)){current.el.style.left=left+"px"}else{if(data.options.scop){if(data.options.relObj){if((left-parseInt(data.options.relObj.style.left))>data.options.cellMinW){current.el.style.left=left+"px"}}else{current.el.style.left=left+"px"}}}}else{if(data.options.move=="vertical"){current.el.style.top=top+"px"}else{var selector=data.options.selector?$(data.options.selector,data.options.obj):$(data.options.obj);current.el.style.left=left+"px";current.el.style.top=top+"px"}}if(data.options.drag){data.options.drag.apply(current.el,[current.el,e])}return $.rwdrag.preventEvent(e)},stop:function(e){var current=$.rwdrag.current;var data=$.data(current.el,"pp-rwdrag");$(document).unbind("mousemove",$.rwdrag.drag).unbind("mouseup",$.rwdrag.stop);if(data.options.stop){data.options.stop.apply(current.el,[current.el,e])}$.rwdrag.current=null;document.onselectstart=function(e){return true};return $.rwdrag.preventEvent(e)},preventEvent:function(e){if(e.stopPropagation){e.stopPropagation()}if(e.preventDefault){e.preventDefault()}return false}}})(jQuery);(function($){$.extend($.fn,{jTree:function(options){var op=$.extend({checkFn:null,selected:"selected",exp:"expandable",coll:"collapsable",firstExp:"first_expandable",firstColl:"first_collapsable",lastExp:"last_expandable",lastColl:"last_collapsable",folderExp:"folder_expandable",folderColl:"folder_collapsable",endExp:"end_expandable",endColl:"end_collapsable",file:"file",ck:"checked",unck:"unchecked"},options);return this.each(function(){var $this=$(this);var cnum=$this.children().length;$(">li",$this).each(function(){var $li=$(this);var first=$li.prev()[0]?false:true;var last=$li.next()[0]?false:true;$li.genTree({icon:$this.hasClass("treeFolder"),ckbox:$this.hasClass("treeCheck"),options:op,level:0,exp:(cnum>1?(first?op.firstExp:(last?op.lastExp:op.exp)):op.endExp),coll:(cnum>1?(first?op.firstColl:(last?op.lastColl:op.coll)):op.endColl),showSub:(!$this.hasClass("collapse")&&($this.hasClass("expand")||(cnum>1?(first?true:false):true))),isLast:(cnum>1?(last?true:false):true)})});setTimeout(function(){if($this.hasClass("treeCheck")){var checkFn=eval($this.attr("oncheck"));if(checkFn&&$.isFunction(checkFn)){$("div.ckbox",$this).each(function(){var ckbox=$(this);ckbox.click(function(){var checked=$(ckbox).hasClass("checked");var tnode=ckbox.parent().parent();var boxes=$("input",tnode);var items=[];if(boxes.size()>1){$(boxes).each(function(){items[items.length]={name:$(this).attr("name"),value:$(this).val(),text:$(this).attr("text")}})}else{items={name:boxes.attr("name"),value:boxes.val(),text:boxes.attr("text")}}var parents=[];tnode.parents("li").each(function(){var $pNode=$(this),$pCkbox=$pNode.find(">div>div.ckbox");$pCkbox.find("input").each(function(){var pValue={name:$(this).attr("name"),value:$(this).val(),text:$(this).attr("text"),checked:$pCkbox.hasClass("checked"),indeterminate:$pCkbox.hasClass("indeterminate")};parents.push(pValue)})});checkFn({checked:checked,items:items,parents:parents})})})}}$("a",$this).click(function(event){$("div."+op.selected,$this).removeClass(op.selected);var parent=$(this).parent().addClass(op.selected);var $li=$(this).parents("li:first"),sTarget=$li.attr("target");if(sTarget){if($("#"+sTarget,$this).size()==0){$this.prepend('')}$("#"+sTarget,$this).val($li.attr("rel"))}$(".ckbox",parent).trigger("click");event.stopPropagation();$(document).trigger("click");if(!$(this).attr("target")){return false}})},1)})},subTree:function(op,level){return this.each(function(){$(">li",this).each(function(){var $this=$(this);var isLast=($this.next()[0]?false:true);$this.genTree({icon:op.icon,ckbox:op.ckbox,exp:isLast?op.options.lastExp:op.options.exp,coll:isLast?op.options.lastColl:op.options.coll,options:op.options,level:level,space:isLast?null:op.space,showSub:op.showSub,isLast:isLast})})})},genTree:function(options){var op=$.extend({icon:options.icon,ckbox:options.ckbox,exp:"",coll:"",showSub:false,level:0,options:null,isLast:false},options);return this.each(function(){var node=$(this);var tree=$(">ul",node);var parent=node.parent().prev();var checked="unchecked";if(op.ckbox){if($(">.checked",parent).size()>0){checked="checked"}}if(tree.size()>0){node.children(":first").wrap("");$(">div",node).prepend(""+(op.ckbox?"":"")+(op.icon?"":""));op.showSub?tree.show():tree.hide();$(">div>div:first,>div>a",node).click(function(){var $fnode=$(">li:first",tree);if($fnode.children(":first").isTag("a")){tree.subTree(op,op.level+1)}var $this=$(this);var isA=$this.isTag("a");var $this=isA?$(">div>div",node).eq(op.level):$this;if(!isA||tree.is(":hidden")){$this.toggleClass(op.exp).toggleClass(op.coll);if(op.icon){$(">div>div:last",node).toggleClass(op.options.folderExp).toggleClass(op.options.folderColl)}}(tree.is(":hidden"))?tree.slideDown("fast"):(isA?"":tree.slideUp("fast"));return false});addSpace(op.level,node);if(op.showSub){tree.subTree(op,op.level+1)}}else{node.children().wrap("");$(">div",node).prepend(''+(op.ckbox?'':"")+(op.icon?'':""));addSpace(op.level,node);if(op.isLast){$(node).addClass("last")}}if(op.ckbox){node._check(op)}$(">div",node).mouseover(function(){$(this).addClass("hover")}).mouseout(function(){$(this).removeClass("hover")});if(/msie/.test(navigator.userAgent.toLowerCase())){$(">div",node).click(function(){$("a",this).trigger("click");return false})}});function addSpace(level,node){if(level>0){var parent=node.parent().parent();var space=!parent.next()[0]?"indent":"line";var plist="";if(level>1){var next=$(">div>div",parent).filter(":first");var prev="";while(level>1){prev=prev+"";next=next.next();level--}plist=prev+plist}$(">div",node).prepend(plist)}}},_check:function(op){var node=$(this);var ckbox=$(">div>.ckbox",node);var $input=node.find("a");var tname=$input.attr("tname"),tvalue=$input.attr("tvalue");var attrs="text='"+$input.text()+"' ";if(tname){attrs+="name='"+tname+"' "}if(tvalue){attrs+="value='"+tvalue+"' "}ckbox.append("").click(function(){var cked=ckbox.hasClass("checked");var aClass=cked?"unchecked":"checked";var rClass=cked?"checked":"unchecked";ckbox.removeClass(rClass).removeClass(!cked?"indeterminate":"").addClass(aClass);$("input",ckbox).attr("checked",!cked);$(">ul",node).find("li").each(function(){var box=$("div.ckbox",this);box.removeClass(rClass).removeClass(!cked?"indeterminate":"").addClass(aClass).find("input").attr("checked",!cked)});$(node)._checkParent();return false});var cAttr=$input.attr("checked")||false;if(cAttr){ckbox.find("input").attr("checked",true);ckbox.removeClass("unchecked").addClass("checked");$(node)._checkParent()}},_checkParent:function(){if($(this).parent().hasClass("tree")){return}var parent=$(this).parent().parent();var stree=$(">ul",parent);var ckbox=stree.find(">li>a").size()+stree.find("div.ckbox").size();var ckboxed=stree.find("div.checked").size();var aClass=(ckboxed==ckbox?"checked":(ckboxed!=0?"indeterminate":"unchecked"));var rClass=(ckboxed==ckbox?"indeterminate":(ckboxed!=0?"checked":"indeterminate"));$(">div>.ckbox",parent).removeClass("unchecked").removeClass("checked").removeClass(rClass).addClass(aClass);var $checkbox=$(":checkbox",parent);if(aClass=="checked"){$checkbox.attr("checked","checked")}else{if(aClass=="unchecked"){$checkbox.removeAttr("checked")}else{if(aClass=="indeterminate"){$($checkbox[0]).attr("checked","checked")}}}parent._checkParent()}})})(jQuery);(function($){var jmenus=new Map();$.dwz=$.dwz||{};$(window).resize(function(){setTimeout(function(){for(var i=0;ioptions.headers.index(clicked[0]);options.active=clickedActive?$([]):clicked;toggle.call(this,toShow,toHide,data,clickedActive,down);return false}function findActive(headers,selector){return selector!=undefined?typeof selector=="number"?headers.filter(":eq("+selector+")"):headers.not(headers.not(selector)):selector===false?$([]):headers.filter(":eq(0)")}$.extend($.dwz.accordion,{defaults:{selectedClass:"collapsable",alwaysOpen:true,animated:"slide",event:"click",header:".accordionHeader",autoheight:true,running:0,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(options,additions){options=$.extend({easing:"swing",duration:300},options,additions);if(!options.toHide.size()){options.toShow.animate({height:"show"},options);return}var hideHeight=options.toHide.height(),showHeight=options.toShow.height(),difference=showHeight/hideHeight;options.toShow.css({height:0}).show();options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate({height:"hide"},{step:function(now){var current=(hideHeight-now)*difference;if(/msie|opera/.test(navigator.userAgent.toLowerCase())){current=Math.ceil(current)}options.toShow.height(current)},duration:options.duration,easing:options.easing,complete:function(){if(!options.autoheight){options.toShow.css({height:"auto"})}options.toShow.css({overflow:"auto"});options.complete()}})},bounceslide:function(options){this.slide(options,{easing:options.down?"bounceout":"swing",duration:options.down?1000:200})},easeslide:function(options){this.slide(options,{easing:"easeinout",duration:700})}}})})(jQuery);function initEnv(){$("body").append(DWZ.frag["dwzFrag"]);$(window).resize(function(){initLayout();$(this).trigger(DWZ.eventType.resizeGrid)});var ajaxbg=$("#background,#progressBar");ajaxbg.hide();$(document).ajaxStart(function(){ajaxbg.show()}).ajaxStop(function(){ajaxbg.hide()});if($.fn.jBar){$("#leftside").jBar({minW:150,maxW:700})}if($.taskBar){$.taskBar.init()}if($.fn.switchEnv){$("#switchEnvBox").switchEnv()}if($.fn.navMenu){$("#navMenu").navMenu()}setTimeout(function(){initLayout();if(window.navTab){navTab.init()}DWZ.regPlugins.push(initUI);$(document).initUI();var jTabsPH=$("div.tabsPageHeader");jTabsPH.find(".tabsLeft").hoverClass("tabsLeftHover");jTabsPH.find(".tabsRight").hoverClass("tabsRightHover");jTabsPH.find(".tabsMore").hoverClass("tabsMoreHover");$(document).trigger(DWZ.eventType.initEnvAfter)},10)}function initLayout(){var iContentW=$(window).width()-(DWZ.ui.sbar?$("#sidebar").width()+10:34)-5;var iContentH=$(window).height()-$("#header").height()-34;$("#container").width(iContentW);$("#container .tabsPageContent").height(iContentH-34).find("[layoutH]").layoutH();$("#sidebar, #sidebar_s .collapse, #splitBar, #splitBarProxy").height(iContentH-5);$("#taskbar").css({top:iContentH+$("#header").height()+5,width:$(window).width()})}function initUI($p){if($.fn.jTable){$("table.table",$p).jTable()}if($.fn.cssTable){$("table.list",$p).not(".nowrap").cssTable()}if($.fn.jPanel){$("div.panel",$p).jPanel()}$("div.tabs",$p).each(function(){var $this=$(this);var options={};options.currentIndex=$this.attr("currentIndex")||0;options.eventType=$this.attr("eventType")||"click";$this.tabs(options)});if($.fn.jTree){$("ul.tree",$p).jTree()}if($.fn.jTree){$("div.accordion",$p).each(function(){var $this=$(this);$this.accordion({fillSpace:$this.attr("fillSpace"),alwaysOpen:true,active:0})})}if($.fn.checkboxCtrl){$(":button.checkboxCtrl, :checkbox.checkboxCtrl",$p).checkboxCtrl($p)}if($.fn.combox){$("select.combox",$p).combox()}if($.fn.xheditor){$("textarea.editor",$p).each(function(){var $this=$(this);var op={html5Upload:false,skin:"nostyle",tools:$this.attr("tools")||"full"};var upAttrs=[["upLinkUrl","upLinkExt","zip,rar,txt"],["upImgUrl","upImgExt","jpg,jpeg,gif,png"],["upFlashUrl","upFlashExt","swf"],["upMediaUrl","upMediaExt","avi"]];$(upAttrs).each(function(i){var urlAttr=upAttrs[i][0];var extAttr=upAttrs[i][1];if($this.attr(urlAttr)){op[urlAttr]=$this.attr(urlAttr);op[extAttr]=$this.attr(extAttr)||upAttrs[i][2]}});$this.xheditor(op)})}if($.fn.uploadify){$(":file[uploaderOption]",$p).each(function(){var $this=$(this);var options={fileObjName:$this.attr("name")||"file",auto:true,multi:true,onUploadError:uploadifyError};var uploaderOption=DWZ.jsonEval($this.attr("uploaderOption"));$.extend(options,uploaderOption);DWZ.debug("uploaderOption: "+DWZ.obj2str(uploaderOption));$this.uploadify(options)})}$("input[type=text], input[type=password], textarea",$p).addClass("textInput").focusClass("focus");$("input[readonly], textarea[readonly]",$p).addClass("readonly");$("input[disabled=true], textarea[disabled=true]",$p).addClass("disabled");$("input[type=text]",$p).not("div.tabs input[type=text]",$p).filter("[alt]").inputAlert();$("div.panelBar li, div.panelBar",$p).hoverClass("hover");$("div.button",$p).hoverClass("buttonHover");$("div.buttonActive",$p).hoverClass("buttonActiveHover");$("div.tabsHeader li, div.tabsPageHeader li, div.accordionHeader, div.accordion",$p).hoverClass("hover");if($.fn.validate){$("form.required-validate",$p).each(function(){var $form=$(this);$form.validate({onsubmit:false,focusInvalid:false,focusCleanup:true,errorElement:"span",ignore:".ignore",invalidHandler:function(form,validator){var errors=validator.numberOfInvalids();if(errors){var message=DWZ.msg("validateFormError",[errors]);alertMsg.error(message)}}});$form.find("input[customvalid]").each(function(){var $input=$(this);$input.rules("add",{customvalid:$input.attr("customvalid")})})})}if($.fn.datepicker){$("input.date",$p).each(function(){var $this=$(this);var opts={};if($this.attr("dateFmt")){opts.pattern=$this.attr("dateFmt")}if($this.attr("minDate")){opts.minDate=$this.attr("minDate")}if($this.attr("maxDate")){opts.maxDate=$this.attr("maxDate")}if($this.attr("mmStep")){opts.mmStep=$this.attr("mmStep")}if($this.attr("ssStep")){opts.ssStep=$this.attr("ssStep")}if($this.attr("defaultTime")){opts.defaultTime=$this.attr("defaultTime")}$this.datepicker(opts)})}$("a[target=navTab]",$p).each(function(){$(this).click(function(event){var $this=$(this);if($this.hasClass("disabled")||$this.hasClass("buttonDisabled")){return false}var title=$this.attr("title")||$this.text();var tabid=$this.attr("rel")||"_blank";var fresh=eval($this.attr("fresh")||"true");var external=eval($this.attr("external")||"false");var url=unescape($this.attr("href")).replaceTmById($(event.target).parents(".unitBox:first"));DWZ.debug(url);if(!url.isFinishedTm()){alertMsg.error($this.attr("warn")||DWZ.msg("alertSelectMsg"));return false}navTab.openTab(tabid,url,{title:title,fresh:fresh,external:external});event.preventDefault()})});$("a[target=dialog]",$p).each(function(){$(this).click(function(event){var $this=$(this);if($this.hasClass("disabled")||$this.hasClass("buttonDisabled")){return false}var title=$this.attr("title")||$this.text();var rel=$this.attr("rel")||"_blank";var options={};var w=$this.attr("width");var h=$this.attr("height");if(w){options.width=w}if(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.resizable=eval($this.attr("resizable")||"true");options.drawable=eval($this.attr("drawable")||"true");options.close=eval($this.attr("close")||"");options.param=$this.attr("param")||"";var url=unescape($this.attr("href")).replaceTmById($(event.target).parents(".unitBox:first"));DWZ.debug(url);if(!url.isFinishedTm()){alertMsg.error($this.attr("warn")||DWZ.msg("alertSelectMsg"));return false}$.pdialog.open(url,rel,title,options);return false})});$("a[target=ajax], tr[target=ajax]",$p).each(function(){$(this).click(function(event){var $this=$(this);if($this.hasClass("disabled")||$this.hasClass("buttonDisabled")){return false}var rel=$this.attr("rel");if(rel){var $rel=$("#"+rel);var url=unescape($this.attr("href")).replaceTmById($(event.target).parents(".unitBox:first"));DWZ.debug(url);if(!url.isFinishedTm()){alertMsg.error($this.attr("warn")||DWZ.msg("alertSelectMsg"));return false}$rel.loadUrl(url,{},function(){$rel.find("[layoutH]").layoutH()})}event.preventDefault()})});$("div.pagination",$p).each(function(){var $this=$(this);$this.pagination({targetType:$this.attr("targetType"),rel:$this.attr("rel"),totalCount:$this.attr("totalCount"),numPerPage:$this.attr("numPerPage"),pageNumShown:$this.attr("pageNumShown")||10,currentPage:$this.attr("currentPage")})});if($.fn.sortDrag){$("div.sortDrag",$p).sortDrag()}if($.fn.ajaxTodo){$("a[target=ajaxTodo]",$p).ajaxTodo()}if($.fn.ajaxDelete){$("a[target=ajaxDelete]",$p).ajaxDelete()}if($.fn.dwzExport){$("a[target=dwzExport]",$p).dwzExport()}if($.fn.lookup){$("a[lookupGroup]",$p).lookup()}if($.fn.multLookup){$("[multLookup]:button",$p).multLookup()}if($.fn.suggest){$("input[suggestFields]",$p).suggest()}if($.fn.itemDetail){$("table.itemDetail",$p).itemDetail()}if($.fn.selectedTodo){$("a[target=selectedTodo]",$p).selectedTodo()}if($.fn.selectedBlank){$("a[target=selectedBlank]",$p).selectedBlank()}if($.fn.pagerForm){$("form[rel=pagerForm]",$p).pagerForm({parentBox:$p})}if($.fn.selectedDelete){$("a[target=selectedDelete]",$p).selectedDelete()}}(function($){$.fn.extend({theme:function(options){var op=$.extend({themeBase:"themes"},options);var _themeHref=op.themeBase+"/#theme#/style.css";return this.each(function(){var jThemeLi=$(this).find(">li[theme]");var setTheme=function(themeName){$("head").find("link[href$='style.css']").attr("href",_themeHref.replace("#theme#",themeName));jThemeLi.find(">div").removeClass("selected");jThemeLi.filter("[theme="+themeName+"]").find(">div").addClass("selected");if($.isFunction($.cookie)){$.cookie("dwz_theme",themeName)}};jThemeLi.each(function(index){var $this=$(this);var themeName=$this.attr("theme");$this.addClass(themeName).click(function(){setTheme(themeName)})});if($.isFunction($.cookie)){var themeName=$.cookie("dwz_theme");if(themeName){setTheme(themeName)}}})}})})(jQuery);(function($){$.fn.navMenu=function(){return this.each(function(){var $box=$(this);$box.find("li>a").click(function(){var $a=$(this);$.post($a.attr("href"),{},function(html){$("#sidebar").find(".accordion").remove().end().append(html).initUI();$box.find("li").removeClass("selected");$a.parent().addClass("selected");navTab.closeAllTab()});return false})})};$.fn.switchEnv=function(){var op={cities$:">ul>li",boxTitle$:">a>span"};return this.each(function(){var $this=$(this);$this.click(function(){if($this.hasClass("selected")){_hide($this)}else{_show($this)}return false});$this.find(op.cities$).click(function(){var $li=$(this);$.post($li.find(">a").attr("href"),{},function(html){_hide($this);$this.find(op.boxTitle$).html($li.find(">a").html());navTab.closeAllTab();$("#sidebar").find(".accordion").remove().end().append(html).initUI()});return false})})};function _show($box){$box.addClass("selected");$(document).bind("click",{box:$box},_handler)}function _hide($box){$box.removeClass("selected");$(document).unbind("click",_handler)}function _handler(event){_hide(event.data.box)}})(jQuery);$.setRegional("alertMsg",{title:{error:"Error",info:"Information",warn:"Warning",correct:"Successful",confirm:"Confirmation"},butMsg:{ok:"OK",yes:"Yes",no:"No",cancel:"Cancel"}});var alertMsg={_boxId:"#alertMsgBox",_bgId:"#alertBackground",_closeTimer:null,types:{error:"error",info:"info",warn:"warn",correct:"correct",confirm:"confirm"},_getTitle:function(key){return $.regional.alertMsg.title[key]},_keydownOk:function(event){if(event.keyCode==DWZ.keyCode.ENTER){event.data.target.trigger("click")}return false},_keydownEsc:function(event){if(event.keyCode==DWZ.keyCode.ESC){event.data.target.trigger("click")}},open:function(type,msg,buttons){$(this._boxId).remove();var butsHtml="";if(buttons){for(var i=0;i ').appendTo("body").hide()}if(!shadow){shadow=$('