OSDN Git Service

Ver8.5.2.0
[opengion/opengionV8.git] / uap / webapps / gf / src / META-INF / resources / jsp / common / eventScript.js
1 (function(){null==jQuery||jQuery._data||(jQuery._data=jQuery.data)})();var orgFldCls=null;$(function(){USE_FOCUS_HILIGHT&&(setEvent('textarea,select,input[type="text"]',"focusin",function(){doFocus2(this)}),setEvent('textarea,select,input[type="text"]',"focusout",function(){doBlur2(this)}))});
2 function doFocus2(b){null!=b&&(null==b.className||0>b.className.indexOf("must"))&&("SELECT"==b.tagName?(b.orgBgColor=b.style.backgroundColor,b.style.backgroundColor="#ffcccc"):(orgFldCls=b.className,b.className="focusField "+orgFldCls))}function doBlur2(b){null!=b&&(null==b.className||0>b.className.indexOf("must"))&&("SELECT"==b.tagName?b.style.backgroundColor=b.orgBgColor:b.className=null!=orgFldCls?orgFldCls:"notFocusField")}oldDoFocusFlag=!0;
3 function doFocus(b){oldDoFocusFlag&&(oldDoFocusFlag=!1,setTimeout(alert("Old Script Error!!\ncustom/query_info.jsp,custom/result_info.jsp Please delete the following part.\n<script>Tag(Header fix and Focus) , BODY onLoad and oncontextmenu Attribute"),100))}function doBlur(b){}$(function(){setEvent('textarea,select,input[type="text"]',"focusout",function(){convert(this,!0)})});function isNumeric(b){return!isNaN(parseFloat(b))&&isFinite(b)}
4 function convert(b,d){let a=b.className,c=b.value;null!=a&&null!=c&&(a.match(/XL/)?(c=zen2han(c),a.match(/XLU/)?b.value=c.replace(/\s+$/,"").toUpperCase():b.value=c.replace(/\s+$/,"").toLowerCase()):a.match(/XU/)?(c=zen2han(c),b.value=c.replace(/\s+$/,"").toUpperCase()):a.match(/S9/)||a.match(/R/)&&!a.match(/CRYPT/)?(c=zen2han(c),a.match(/R/)&&(c=c.replace(/\.0+$/,"")),b.value=c.replace(/,/g,"")):!a.match(/X/)||a.match(/XK/)||a.match(/KX/)||a.match(/XH/)||(b.value=zen2han(c)));return d&&(a.match(/S9/)||
5 a.match(/X9/)||a.match(/R/)&&!a.match(/CRYPT/))&&!isNumeric(b.value)?!1:!0}var zen2han=function(b){return b=b.replace(/[\uff21-\uff3a\uff41-\uff5a\uff10-\uff19\uff0e\u2010\uff0d]/g,function(d){return String.fromCharCode(d.charCodeAt(0)-65248)})},colMap,notFireCols,jH_evElm;
6 $(function(){"undefined"!=typeof EC_NAME&&(jH_evElm=$(".h_evElm"),makeColMapping(),setEvent('textarea,select,input[type="text"]',"change",function(){makeColumn(this)},".h_evCol",!0,addEvColCls),setEvent("input[type=checkbox],input[type=radio]","click",function(){makeColumn(this)},".h_evCol",!0))});
7 function makeColMapping(){var b,d,a;if(!colMap)for(colMap={},b=0;b<EC_EVCOL.length;b++){var c=EC_EVCOL[b].split(",");for(d=0;d<c.length;d++){var e=c[d];"_"==e.charAt(0)&&(e=e.substring(1),null==notFireCols&&(notFireCols=","),notFireCols+=e,notFireCols+=",");(a=colMap[e])||(a=[]);a[a.length]=EC_NAME[b];colMap[e]=a}}}function addEvColCls(){for(var b in colMap)$("#"+b+",[id^="+b+"__]").addClass("h_evCol")}
8 function makeColumn(b){var d;jH_evElm&&isEndInitEvent()&&(jH_evElm=null);var a=$(b);var c=a.attr("id");var e=c.split("__")[0];if((d=colMap[e])&&!(!isEndInitEvent()&&notFireCols&&0<=notFireCols.indexOf(","+e+","))&&convert(b,!0))for(b=0;b<d.length;b++){var g=c==e?"":"__"+c.split("__")[1];var k=d[b]+g;var u=k.split("__")[0];var l=isEndInitEvent()?$(".h_evElm[h_evCid="+k+"]"):jH_evElm.filter("[h_evCid="+k+"]");var y=l.attr("h_evWrtbl");eventColumn(a,l,k,u,g,y)}}
9 function eventColumn(b,d,a,c,e,g){var k,u,l={};if(d&&0!=d.length){if(!isEndInitEvent()){var y=b.get(0).value;if(!y||null==y||""==y)return}try{var n=eval("EC_"+c+"_URL")}catch(p){alert("[SYSTEM_ERROR] : URL that processes the event is not specified. (variable undefinition). ["+c+"]");return}if(n&&""!=n){y="";try{y=g?eval("EC_"+c+"_EDITPARAM"):eval("EC_"+c+"_RENDPARAM")}catch(p){}try{var v=g?eval("EC_"+c+"_EDITPARAMKEYS"):eval("EC_"+c+"_RENDPARAMKEYS")}catch(p){}if("true"===eval("EC_"+c+"_FLGENCRYPT")){if(v){var m=
10 v.split(",");for(k=0;k<m.length;k++){var w=m[k];v=""==e?$("#"+w).get(0).value:$("#"+w+e).get(0).value;l[w]=v}}}else if(null!=y&&""!=y)for(n+="?",k=v=0;-1!=(v=y.indexOf("{@",k));)k=y.indexOf("}",v),m=y.substring(v+2,k),0>m.indexOf(".")&&(k="{@"+m+"}",w=function(p){console.log("noDifined:");console.log(p);return null},w=""==e?$("#"+m)[0]?$("#"+m).get(0).value:w(m):$("#"+m+e)[0]?$("#"+m+e).get(0).value:w(m+e),w=null==w?"":w,y=y.replace(k,w),n+=m+"="+encodeURIComponent(w)+"&"),k=v+1;valsql="";try{valsql=
11 eval("EC_"+c+"_VALSQL")}catch(p){}if(null!=valsql&&""!=valsql)for(k=v=0;-1!=(v=valsql.indexOf("{@",k));)k=valsql.indexOf("}",v),m=valsql.substring(v+2,k),0>m.indexOf(".")&&(k="{@"+m+"}",w=""==e?$("#"+m).get(0).value:$("#"+m+e).get(0).value,w=null==w?"":w,valsql=valsql.replace(k,w)),k=v+1;m=function(){_firstOption=t.children("option").get(0);return null==_firstOption||""!=_firstOption.value?!1:!0};var K=function(){t.attr("isfocus","true")};var t=null!=a&&""!=a?d.find("#"+a):[];if(0<t.length&&isEndInitEvent())t.on("focus",
12 K);v="";0<t.length&&(v=isEndInitEvent()?null==t.val()?"":t.val():null==d.attr("h_evVal")?"":d.attr("h_evVal"));w="";try{w=eval("EC_"+c+"_RENDERER")}catch(p){}var M="";try{M=eval("EC_"+c+"_EDITOR")}catch(p){}var O="title style tabindex readonly disabled onClick onChange onBlur onFocus ondblClick onMouseDown onMouseUp onMouseMove onMouseOut onMouseOver onSelect onKeydown onKeypress onKeyup eventCallBack multiple".split(" ");var z="";if(0<t.length)for(k=0;k<O.length;k++){var F=t.attr(O[k]);if(null!=
13 F){var h=typeof F;var N=!1;"function"==h?(F=F.toString(),N=0<F.length?!0:!1,F="("+F+")()"):N="boolean"==h?F:0<F.length?!0:!1;N&&(z+=O[k]+"='"+F+"' ")}}l.EC_CID=null==a?"":a;l.EC_CNAME=null==c?"":c;l.EC_RENDERER=w;l.EC_EDITOR=M;l.EC_PARAM=y;l.EC_SQL=y;l.EC_VALSQL=valsql;l.EC_WRITABLE=null==g?"":g;l.EC_CVALUE=v;l.EC_NOVALUE=0==t.length?"":m();l.EC_CLASS=0==t.length?"":t.attr("class");l.EC_SIZE=0==t.length?"":t.attr("size");l.EC_MAXLENGTH=0==t.length?"":t.attr("maxlength");l.EC_OPTATTRS=z;l.EC_PNAME=
14 null==b.attr("id")?"":b.attr("id").split("__")[0];l.EC_PVALUE=null==b.get(0).value?"":b.get(0).value;l.EC_USESLBL=null==e||""==e?"false":"true";$.ajax({url:n,data:l,type:"POST",dataType:"html",async:isEndInitEvent(),error:function(p,G,L){0>n.indexOf(".htm")&&alert("EventColumnError:"+p+":"+G+":"+L+":"+c)},success:function(p,G){p=$(p);0<t.length&&(isEndInitEvent()&&t.off("focus",K),bindOldEvents(p.get(0),jQuery._data(t.clone(!0).get(0)).events));null!=a&&""!=a&&"YMD2"===M?$("#"+a).attr("type","text").val(p.val()):
15 d.empty().append(p);0<t.length&&(d.find("input,select,textarea").attr("name",a).attr("id",a),isEndInitEvent()&&t.attr("isfocus")&&p.get(0).focus(),isEndInitEvent()||p.trigger("change"),t.attr("eventCallback")&&(u=function(){eval(t.attr("eventCallback")+"(arguments);")},u(a,p.val(),t.get(0).value)));null!=e&&""!=e&&isEndInitEvent()&&$("table#viewTable").resizeView()}})}else alert("[SYSTEM_ERROR] : URL that processes the event is not specified. ["+c+"]")}else alert("[SYSTEM_ERROR] : jTag is null. The element of the replacement object doesn't exist. ["+
16 c+"]")}function bindOldEvents(b,d){var a,c;for(a in d)for(c in d[a])0!==d[a][c]&&jQuery.event.add(b,a,d[a][c],d[a][c].data)}var isShowTip=!1;
17 $(function(){USE_REAL_TIME_CHECK&&(setEvent('textarea:not([realTimeChk="false"]),select:not([realTimeChk="false"]),input[type="text"]:not([realTimeChk="false"])',"focusout",function(){location.pathname.match(RegExp(/jsp/));check(this,RegExp.leftContext+"jsp/common/realtimecheck.jsp")}),$("table#viewTable").parent().parent().on("scroll",function(){isShowTip&&(isShowTip=!1,$(".tipErr").remove())}),$("table#viewTable").parent().parent().trigger("click"))});
18 function check(b,d){var a,c;var e=b.name;if("undefined"!=typeof jQuery&&0!=e.indexOf("h_")){var g=b.value;"null"!=b.rtOption&&"undefined"!=b.rtOption&&(c=b.getAttribute("rtOption"));var k=e.split("__");var u=2==k.length;e="command=RENEW&checkType="+(u?"ENTRY":"NEW")+(u?"&h_rowSel="+k[1]:"")+"&column="+k[0]+"&"+e+"="+encodeURIComponent(g)+(c?"&"+c:"");d={dataType:"html",type:"POST",url:d,data:e,error:function(){},success:function(l){a=$(b).data("tipId");$("#"+a).remove();0<=l.indexOf("row_error")&&
19 (showCheckTip(b,l),isShowTip=!0)}};$.ajax(d)}return!0}
20 function showCheckTip(b,d){var a=$(b).offset();if(30<=a.top){d=$("<div class='tipErr'><div id='tipArrowBottom'></div><div>"+d+"</div></div>").appendTo(document.body);var c=a.left;a=a.top+(-11-d[0].offsetHeight)}else d=$("<div class='tipErr'><div id='tipArrowTop'></div><div>"+d+"</div></div>").appendTo(document.body),c=a.left,a=a.top+11+d[0].offsetHeight;var e=(new Date).getTime();$(b).data("tipId",e);d.css({left:c+"px",top:a+"px"}).attr("id",e).on("click",function(){$(this).remove()}).show()}$(function(){bindEvents()});
21 $.fn.simpleColorPickerOg=function(b){var d={colorsPerLine:8,colors:"#000000 #444444 #666666 #999999 #cccccc #eeeeee #f3f3f3 #ffffff #ff0000 #ff9900 #ffff00 #00ff00 #00ffff #0000ff #9900ff #ff00ff #f4cccc #fce5cd #fff2cc #d9ead3 #d0e0e3 #cfe2f3 #d9d2e9 #ead1dc #ea9999 #f9cb9c #ffe599 #b6d7a8 #a2c4c9 #9fc5e8 #b4a7d6 #d5a6bd #e06666 #f6b26b #ffd966 #93c47d #76a5af #6fa8dc #8e7cc3 #c27ba0 #cc0000 #e69138 #f1c232 #6aa84f #45818e #3d85c6 #674ea7 #a64d79 #990000 #b45f06 #bf9000 #38761d #134f5c #0b5394 #351c75 #741b47 #660000 #783f04 #7f6000 #274e13 #0c343d #073763 #20124d #4C1130".split(" "),
22 showEffect:"",hideEffect:"",onChangeColor:!1},a=$.extend(d,b);return this.each(function(){function c(m){"fade"==a.hideEffect?m.fadeOut():"slide"==a.hideEffect?m.slideUp():m.hide()}for(var e=$(this),g="",k=e.attr("id").replace(/-/g,"")+"_",u=0;u<a.colors.length;u++){var l=a.colors[u],y="";0==u%a.colorsPerLine&&(y="clear: both; ");g+='<li id="'+k+"color-"+u+'" class="color-box" style="'+y+"background-color: "+l+'" title="'+l+'"></li>'}var n=$('<div id="'+k+'color-picker" class="color-picker" style="position: absolute; left: 0px; top: 0px;"><ul>'+
23 (g+('<li id="'+k+'color-default" class="color-box" style="width:80px; text-align:center; clear: both; background-color:white;" title="clear">clear</li></ul><div style="clear: both;"></div></div>')));$("body").append(n);n.hide();n.find("li.color-box").on("click",function(){var m=isNaN(this.id.substr(this.id.indexOf("-")+1))?"":a.colors[this.id.substr(this.id.indexOf("-")+1)];e.is("input")||(e.val(m),e.blur());"function"===typeof d.onChangeColor&&d.onChangeColor.call(e,m);c(n)});$("body").on("click",
24 function(){c(n)});n.on("click",function(m){m.stopPropagation()});var v=function(m){var w=e.offset(),K=w.left+e.outerWidth()-m.outerWidth();K<w.left&&(K=w.left);m.css({left:K,top:w.top+e.outerHeight()});"fade"==a.showEffect?m.fadeIn():"slide"==a.showEffect?m.slideDown():m.show()};e.on("click",function(m){e=$(this);m.stopPropagation();e.is("input")||v(n)});e.on("focus",function(){v(n)});e.on("change",function(m){e.val()!=e.css("background-color")&&e.css("background-color",e.val()).css("color",e.val())})})};
25 $(function(){$.fn.simpleColorPickerOg&&$("input.colorPicker").simpleColorPickerOg({onChangeColor:function(b){$(this).val(b).css("background-color",b).css("color",b).trigger("change")}})});
26 jQuery.fn.ogClockpicker=function(b,d){function a(g){if(g.starthour>=g.endhour)return alert("Error - start hour must be less than end hour."),!1;if(0!=60%g.minutedivisions)return alert("Error - param minutedivisions must divide evenly into 60."),!1}var c={starthour:6,endhour:20,showminutes:"true",minutedivisions:4,military:!0,event:"click",layout:"vertical",valuefield:null,useBgiframe:!1,hoursopacity:1,minutesopacity:1,second:""};b&&jQuery.extend(c,b);d=d||function(){};var e="vertical"==c.layout;a(c);
27 jQuery(this).on(c.event,function(g){function k(f){return h.military?"":12<=f?" PM":" AM"}function u(f){var q=document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight,r=parseInt(f[0].style.top),C=parseInt(f[0].style.left),B=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;r<=B&&!f.is("#CP_minutecont")?f.css("top",B+10+"px"):r+f.height()-B>q&&f.css("top",B+q-f.height()-10+"px");0>=C&&f.css("left","10px")}function l(f){"function"==
28 typeof jQuery.fn.bgIframe?f.bgIframe():alert("bgIframe plugin not loaded.")}function y(f){if("CP_hourcont"==f.attr("id"))f.on("mouseout",function(q){try{jQuery(q.toElement?q.toElement:q.relatedTarget).is("div[class^=CP], iframe")||t()}catch(r){t()}});else if("CP_minutecont"==f.attr("id"))f.on("mouseout",function(q){try{jQuery(q.toElement?q.toElement:q.relatedTarget).is("div[class^=CP], iframe")||t()}catch(r){t()}});else"CP_hour"==f.attr("class")?(f.on("mouseover",function(q){n(f,q)}),f.on("mouseout",
29 function(){v(f)}),f.on("click",function(){var q=f.attr("id").split("_")[1];k(q);q=f.attr("value");q=-1!=q.indexOf(" ")?q.substring(0,q.indexOf(" ")):q;f.text(q+"00"+h.second);K(f);t()})):"CP_minute"==f.attr("class")&&(f.on("mouseover",function(){m(f)}),f.on("mouseout",function(){w(f)}),f.on("click",function(){f.text(f.attr("value")+h.second);K(f);t()}))}function n(f,q){var r=f.attr("id").split("_")[1],C=f.attr("id").split("_")[2];f.addClass("CP_over");var B=Math.ceil((Math.floor(r/12)-Math.floor(h.starthour/
30 12))/2);if("true"==h.showminutes){E.hide();var H=!h.military&&12<r?r-12:r,x=r;if(h.military||0!=r)h.military||12!=r||(H="0");h.military&&10>r&&(H="0"+H);10>r&&(x="0"+x);E.empty();for(var J=60/h.minutedivisions,P=k(r),A=1,I=0;60>I;I+=J)$md=jQuery("<div class='CP_minute' id='"+r+"_"+I+"' value='"+x+(10>I?"0":"")+I+"'>"+H+":"+(10>I?"0":"")+I+P+"</div>"),e||($md.css("float","left"),6<h.minutedivisions&&A==h.minutedivisions/2+1&&E.append("<div style='clear:left' />")),E.append($md),y($md),A++;e?(q="mouseover"==
31 q.type?q.pageY-15:p.offset().top+2+f.height()*C,f=p.offset().left+2*G[0].width()*B+E.width()*(B-1)+4*B-2):(f="mouseover"==q.type?q.pageX-10:p.offset().left+(f.width()-5)*C,q=p.offset().top+(p.height()-(E.height()+2)*(Math.ceil(G.length/2)-1))/G.length*2*B+E.height()*(B-1)+2*B-1);E.css("left",f+"px").css("top",q+"px");u(E);E.show();h.useBgiframe&&l(E)}return!1}function v(f){f.removeClass("CP_over");return!1}function m(f){f.addClass("CP_over");return!1}function w(f){f.removeClass("CP_over");return!1}
32 function K(f){h.valuefield?jQuery("input[name="+h.valuefield+"]").val(f.text()).trigger("change"):O.value=f.text();d.apply(z,[f.text()]);z.off("keydown",M)}function t(){"true"==h.showminutes&&E.hide();p.slideUp("fast");z.off("keydown",M)}function M(f){function q(D){if(D.prev().length)eval(J+"div_out($obj)"),eval(J+"div_over($obj.prev(), e)");else return!1}function r(D){if(D.next().length)eval(J+"div_out($obj)"),eval(J+"div_over($obj.next(), e)");else return!1}function C(D){$newobj=jQuery(".CP_hour[id$=_"+
33 P+"]","#hourcol"+(0==(Math.floor(A/12)-Math.floor(h.starthour/12))%2?String(Math.floor(A/12)-Math.floor(h.starthour/12)+1):String(Math.floor(A/12)-Math.floor(h.starthour/12)-1)));if($newobj.length)v(D),n($newobj,f);else return!1}function B(D){v(D);m($(".CP_minute:first"))}function H(D,Q){w(D);0>Q?0==(Math.floor(A/12)-Math.floor(h.starthour/12))%2?(D=String(Math.floor(A/12)-Math.floor(h.starthour/12)+Q),A=String(Number(A)-12)):D=String(Math.floor(A/12)-Math.floor(h.starthour/12)):0==(Math.floor(A/
34 12)-Math.floor(h.starthour/12))%2?D=String(Math.floor(A/12)-Math.floor(h.starthour/12)):(D=String(Math.floor(A/12)-Math.floor(h.starthour/12)+Q),A=String(Number(A)+12));D="#hourcol"+D;jQuery(".CP_hour[id^=hr_"+A+"]",D);D=jQuery(".CP_hour[id^=hr_"+A+"]",D);n(D,f)}var x=$("div.CP_over").length?$("div.CP_over"):$("div.CP_hour:first"),J=x.is(".CP_hour")?"hour":"minute",P="hour"==J?x[0].id.split("_")[2]:0,A="minute"==J?x[0].id.split("_")[0]:x[0].id.split("_")[1],I="minute"==J?0==Math.floor(A/12)-Math.floor(h.starthour/
35 12)?"m1":0==Math.floor(A/12)-Math.floor(h.endhour/12)&&0!=(Math.floor(A/12)-Math.floor(h.starthour/12))%2?"m2":"m3":0==(Math.floor(A/12)-Math.floor(h.starthour/12))%2?"h1":"h2";switch(f.keyCode){case 37:if(e)switch(I){case "m1":return!1;case "m2":H(x,-1);break;case "m3":H(x,-1);break;case "h1":B(x);break;case "h2":C(x)}else q(x);break;case 38:if(e)q(x);else switch(I){case "m1":return!1;case "m2":H(x,-1);break;case "m3":H(x,-1);break;case "h1":B(x);break;case "h2":C(x)}break;case 39:if(e)switch(I){case "m1":H(x,
36 1);break;case "m2":return!1;case "m3":H(x,1);break;case "h1":C(x);break;case "h2":B(x)}else r(x);break;case 40:if(e)r(x);else switch(I){case "m1":H(x,1);break;case "m2":return!1;case "m3":H(x,1);break;case "h1":C(x);break;case "h2":B(x)}break;case 13:eval(J+"div_click($obj)");break;default:return!0}return!1}var O=this,z=jQuery(this),F=jQuery("body"),h=jQuery.extend(!0,{},c);z.attr("valuefield")&&(h.valuefield=z.attr("valuefield"));z.attr("starthour")&&(h.starthour=parseInt(z.attr("starthour")));z.attr("endhour")&&
37 (h.endhour=parseInt(z.attr("endhour")));z.attr("minutedivisions")&&(h.minutedivisions=parseInt(z.attr("minutedivisions")));z.attr("military")&&(h.military=z.attr("military"));z.attr("showminutes")&&(h.showminutes=z.attr("showminutes"));"true"==z.attr("usesecond")&&(h.second="00");z.attr("layout")&&(h.layout=z.attr("layout"),c.layout=h.layout,e="vertical"==h.layout);a(h);if(h.valuefield){var N=jQuery("[name="+h.valuefield+"]");N.off("keydown").on("keydown",M)[0].focus();N.on("click",function(){N.off("keydown")})}else z.off("keydown").on("keydown",
38 M);jQuery("#CP_hourcont,#CP_minutecont").remove();var p=jQuery("<div id='CP_hourcont' class='CP' />").appendTo(F);h.useBgiframe||p.css("opacity",h.hoursopacity);y(p);for(var G=[],L=0;L<Math.floor(h.endhour/12)-Math.floor(h.starthour/12)+1;L++)G.push(jQuery("<div class='CP_hourcol' id='hourcol"+L+"' />").appendTo(F));if("true"==h.showminutes){var E=jQuery("<div id='CP_minutecont' class='CP' />").appendTo(F);h.useBgiframe||E.css("opacity",h.minutesopacity);y(E)}if(e)for(L=0;L<G.length;L++)G[L].addClass("floatleft");
39 else p.css("width","auto"),"true"==h.showminutes&&E.css("width","auto");(function(){for(var f=1,q=0,r=h.starthour;r<=h.endhour;r++){0==r%12&&(f=1);var C=!h.military&&12<r?r-12:r,B=r;if(h.military||0!=r)h.military||12!=r||(C="0");h.military&&10>r&&(C="0"+C);10>r&&(B="0"+B);C=jQuery("<div class='CP_hour' id='hr_"+r+"_"+f+"' value='"+B+"' >"+C+k(r)+"</div>");h.military&&C.width(20);y(C);e||C.css("float","left");G[q].append(C);0==(r+1)%12&&q++;f++}for(f=0;f<G.length;f++)e?0!=f&&0==f%2&&G[f].css("margin-left",
40 E.width()+4+"px"):(p.append("<div style='clear:left' />"),0!=f&&0==f%2&&G[f].css("margin-top","19px")),p.append(G[f])})();"focus"!=g.type?(p[0].style.left=g.pageX-5+"px",p[0].style.top=g.pageY-Math.floor(p.height()/2)+"px",u(p)):z.after(p);p.slideDown("fast");h.useBgiframe&&l(p);return!1});return this};$(function(){$.fn.ogClockpicker&&$(document).ready(function(){$(".clockpick").ogClockpicker()})});
41 function likeComp(b){var d=b.substring(6);b=$("#"+b).attr("aimaiType");var a=$("#"+d).val();if(null!=a&&""!=a){a=a.replace(/^%+|%+$/g,"");var c=$("#"+d).attr("maxlength");if(null==c||a.length<parseInt(c,10))switch(b){case "1":a+="%";break;case "2":a="%"+a;break;case "3":a="%"+a+"%"}$("#"+d).val(a)}}$(function(){$("form").on("submit",function(){$("[id^='AIMAI_']").each(function(){likeComp(this.id)})})});
42 $.fn.aimaiPickerOg=function(b){var d=$.extend({iconDir:ICON_ADRS,icons:["aimai0.png","aimai1.png","aimai2.png","aimai3.png"],titls:["\u5b8c\u5168\u4e00\u81f4","\u524d\u65b9\u4e00\u81f4","\u5f8c\u65b9\u4e00\u81f4","\u524d\u5f8c\u66d6\u6627"]},b);return this.each(function(){function a(n){"fade"==d.hideEffect?n.fadeOut():"slide"==d.hideEffect?n.slideUp():n.hide()}for(var c=$(this),e="PIC_"+c.attr("id").replace(/-/g,"")+"_",g="",k=0;k<d.icons.length;k++){var u=d.titls[k];g+='<span id="'+e+"text-"+k+'" class="text-box"" title="'+
43 u+'"> '+('<img src="'+d.iconDir+d.icons[k]+'" alt="'+u+'"> </span>')}var l=$('<div id="'+e+'aimai-picker" class="aimai-picker" style="position: absolute; left: 0px; top: 0px;">'+g+'<div style="clear: both;"></div></div>');$("body").append(l);l.hide();l.find("span.text-box").on("click",function(){var n=this.id.substr(this.id.indexOf("-")+1);c.attr("aimaiType",n);c.attr("title",d.titls[n]);c.children("img").attr("src",d.iconDir+d.icons[n]);c.blur();a(l)});$("body").on("click",function(){a(l)});l.on("click",
44 function(n){n.stopPropagation()});var y=function(n){var v=c.offset(),m=v.left+c.outerWidth()-n.outerWidth();m<v.left&&(m=v.left);n.css({left:m,top:v.top+c.outerHeight()});"fade"==d.showEffect?n.fadeIn():"slide"==d.showEffect?n.slideDown():n.show()};c.on("click",function(n){n.stopPropagation();c.is("input")||y(l)});c.on("focus",function(){y(l)})})};$(function(){$.fn.aimaiPickerOg&&$(".aimaiClm").aimaiPickerOg()});
45 function selectScroll(b){var d=4;b.getAttribute("size")&&(d=b.getAttribute("size"));for(var a=b.options,c=0;c<a.length;c++)if(a[c].selected){"OPTGROUP"==a[c].parentNode.tagName.toUpperCase()&&(c+=$(a[c].parentNode).prev().length);var e=c*($(b).height()/d);break}$(b).scrollTop(e)}$(function(){$("select[multiple]").each(function(){selectScroll(this)})});
46 function dateFeedRtn(b,d,a,c,e){var g=parseInt(c.match(/[+-]?\d+/g));if(isNumeric(g))if(0==g)var k=a?a:_getSysDate(b);else(a=$("#"+d).val().replace(/\//g,""))&&("Y"==b&&4==a.length||"YM"==b&&6==a.length||"YMD"==b&&8==a.length)&&_isDate(b,a)&&(k=_addDate(b,a,c,g));else k=_getSysDate(b);k&&($("#"+d).val(k).trigger("change"),"true"==e&&$("#queryButtonSubmit").trigger("click"))}
47 var _addDate=function(b,d,a,c){var e;switch(b){case "Y":var g=d;break;case "YM":g=d.replace(/(\d{4})(\d{2})/,"$1/$2")+"/01";break;default:g=d.replace(/(\d{4})(\d{2})(\d{2})/,"$1/$2/$3")}g=new Date(g);var k=g.getFullYear(),u=g.getMonth(),l=g.getDate();if(a.indexOf("SY"))if(a.indexOf("SD"))if(a.indexOf("SW"))if(a.indexOf("EY"))if(a.indexOf("ED"))if(a.indexOf("EW"))if(a.indexOf("Y"))if(a.indexOf("M"))a.indexOf("D")||g.setDate(l+c);else for(a=0<c?1:-1,e=0;e<Math.abs(c);e++)0<e&&(k=g.getFullYear(),u=g.getMonth(),
48 l=g.getDate()),_mNew=0<c?u+2:u,_dNew=(new Date(k,_mNew,0)).getDate(),l>_dNew?g=new Date(k,_mNew,0):g.setMonth(u+a);else g.setFullYear(k+c);else a=_reorgCnt(a,g,c,0),g.setDate(l-g.getDay()+7*a);else e=new Date(k,u+1,0),g=new Date(k,u,1),a=_reorgCnt(a,g,c,e.getDate()-l),g.setMonth(u+a),g=new Date(g.getFullYear(),g.getMonth()+1,0);else a=_reorgCnt(a,g,c,0),g.setFullYear(k+a),g=new Date(g.getFullYear(),12,0);else a=_reorgCnt(a,g,c,1),g.setDate(l-g.getDay()+(0==g.getDay()?-6:1)+7*a);else a=_reorgCnt(a,
49 g,c,l-1),g.setMonth(u+a),g=new Date(g.getFullYear(),g.getMonth(),1);else a=_reorgCnt(a,g,c,u),g.setFullYear(k+a),g=new Date(g.getFullYear(),0,1);return _fmtDate(b,g,d)},_getSysDate=function(b){return _fmtDate(b,new Date,null)},_fmtDate=function(b,d,a){var c=d.getFullYear();var e=("00"+(d.getMonth()+1)).slice(-2);d=("00"+d.getDate()).slice(-2);switch(b){case "Y":break;case "YM":c+=e;break;default:c=c+e+d}return _isDate(b,c)?c:a},_isDate=function(b,d){switch(b){case "Y":b=d+"/01/01";break;case "YM":b=
50 d.replace(/(\d{4})(\d{2})/,"$1/$2")+"/01";break;default:b=d.replace(/(\d{4})(\d{2})(\d{2})/,"$1/$2/$3")}d=new Date(b);return d.getFullYear()!=parseInt(b.split("/")[0])||d.getMonth()!=parseInt(b.split("/")[1])-1||d.getDate()!=parseInt(b.split("/")[2])?!1:!0},_reorgCnt=function(b,d,a,c){var e;~b.indexOf("W")?d.getDay()!=c&&1==Math.abs(a)&&(e=0<a?a:a+1):b.indexOf("S")?1==Math.abs(a)&&(e=0<a?0==c?a:0:-1):1==Math.abs(a)&&(e=0<a?a:0==c?-1:0);return null==e?a:e};