(function($){$(window).load(function(event){var jForm=$("form#ajaxSubmit");((0<jForm.size())?jForm:$("form:first")).formMan2()});$.fn.sort=function(){return this.pushStack($.makeArray([].sort.apply(this,arguments)))};$.fn.formMan2=function(opts){var settings={sFMsgCls:"errmsg",sMsgSaved:"\u767b\u9332\u3057\u307e\u3057\u305f\u3002",sKeepCls:"unreplaceable",onRowPlace:null};$.extend(settings,$.hybs.defaults,opts||{});return this.each(function(){var oForm,mParams,formOpts;oForm=this;mParams={};mParams[settings.sAjxSbmtKey]="true";formOpts={};formOpts.data=mParams;formOpts.beforeSubmit=function(formData,jqForm,options){return(settings.beforeSubmit)?settings.beforeSubmit(formData,jqForm,options):true};formOpts.success=function(data,status,$form){var sHybsCmd,match,sUrl,sFrame,oFrame;sHybsCmd=$form.data($.hybs.defaults.sHybsCmd).cmd;if(data.indexOf("row_error")>=0){isClicked=false;match=/(?:<\/table>)*[\S\s]*(\[\d+ - \d+\]\/\[\d+\])[\S\s]*(<table[^>]*?>[\S\s]+?row_error[\S\s]*<\/table>)/m.exec(data);$.hybs.ogAlert(match?(match[1]+match[2]):data)}else{if($.inArray(sHybsCmd,[settings.sCmdInsert,settings.sCmdCopy,settings.sCmdModify,settings.sCmdDelete,settings.sCmdEntry,settings.sCmdUndo])>=0){if(sHybsCmd==settings.sCmdEntry){match=/<div id="?noTransitionUrl"?>(.*)<\/div>[\s\S]*<div id="?noTransitionTarget"?>(.*)<\/div>/mi.exec(data);if(match){sUrl=match[1].replace(/&amp;/g,"&");sFrame=match[2];oFrame=(sFrame!="null")?eval("top."+sFrame):window;oFrame.location.href=sUrl}}}}};formOpts.error=function(xhr,status,e){$.hybs.ogLog(status+"\n"+xhr.responseText);$.hybs.ogAlert(status+"<br/>"+xhr.responseText)};formOpts.complete=function(xhr,status){$(oForm).removeData($.hybs.defaults.sHybsCmd)};formOpts.cmds=formOpts.cmds||[settings.sCmdEntry];$(oForm).ajaxHybsForm(formOpts)})}})(jQuery);