• R/O
  • SSH
  • HTTPS

opengion: Commit


Commit MetaInfo

Révision1533 (tree)
l'heure2018-01-15 17:24:59
Auteurtakahashi_m

Message de Log

(empty log message)

Change Summary

Modification

--- trunk/opengionV5/uap/webapps/ge/jsp/common/eventScript.js (revision 1532)
+++ trunk/opengionV5/uap/webapps/ge/jsp/common/eventScript.js (revision 1533)
@@ -1 +1 @@
1-var orgFldCls=null;$(function(){if(USE_FOCUS_HILIGHT){setEvent('textarea,select,input[type="text"]',"focusin",function(){doFocus2(this)});setEvent('textarea,select,input[type="text"]',"focusout",function(){doBlur2(this)})}});function doFocus2(a){if(a!=null){if(a.className==null||a.className.indexOf("must")<0){if(a.tagName=="SELECT"){a.orgBgColor=a.style.backgroundColor;a.style.backgroundColor="#ffcccc"}else{orgFldCls=a.className;a.className="focusField "+orgFldCls}}}}function doBlur2(a){if(a!=null){if(a.className==null||a.className.indexOf("must")<0){if(a.tagName=="SELECT"){a.style.backgroundColor=a.orgBgColor}else{if(orgFldCls!=null){a.className=orgFldCls}else{a.className="notFocusField"}}}}}oldDoFocusFlag=true;function doFocus(a){if(oldDoFocusFlag){oldDoFocusFlag=false;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(a){}$(function(){setEvent('textarea,select,input[type="text"]',"focusout",function(){convert(this)})});function convert(b){var c,a;c=b.value;a=b.className;if(c!=null&&a!=null){if(a.match(/XL/)&&!(a.match(/XLU/))){b.value=c.toLowerCase()}else{if((a.match(/XU/)&&!(a.match(/XUL/)))||a.match(/PN2/)){b.value=c.toUpperCase()}}}return true}var colMap;var notFireCols;var jH_evElm;$(function(){if(!(typeof(EC_NAME)=="undefined")){jH_evElm=$(".h_evElm");makeColMapping();setEvent('textarea,select,input[type="text"]',"change",function(){makeColumn(this)},".h_evCol",true,addEvColCls);setEvent("input[type=checkbox],input[type=radio]","click",function(){makeColumn(this)},".h_evCol",true)}});function makeColMapping(){var b,a,e,d,c;if(colMap){return}colMap=new Object();for(b=0;b<EC_EVCOL.length;b++){e=EC_EVCOL[b].split(",");for(a=0;a<e.length;a++){d=e[a];if(d.charAt(0)=="_"){d=d.substring(1);if(notFireCols){notFireCols+=","}notFireCols+=d}c=colMap[d];if(!c){c=new Array()}c[c.length]=EC_NAME[b];colMap[d]=c}}}function addEvColCls(){for(var a in colMap){$("#"+a+",[id^="+a+"__]").addClass("h_evCol")}}function makeColumn(e){var k,l,g,j,b,h,d,c,a,f;if(jH_evElm&&isEndInitEvent()){jH_evElm=null}k=$(e);l=k.attr("id");g=l.split("__")[0];j=colMap[g];if(!j){return}if(!isEndInitEvent()&&notFireCols&&notFireCols.indexOf(g)>=0){return}for(b=0;b<j.length;b++){h=(l==g?"":"__"+l.split("__")[1]);d=j[b]+h;c=d.split("__")[0];a=isEndInitEvent()?$(".h_evElm[h_evCid="+d+"]"):jH_evElm.filter("[h_evCid="+d+"]");f=a.attr("h_evWrtbl");eventColumn(k,a,d,c,h,f)}}function eventColumn(jEvCol,jTag,cid,cname,suffix,writable){var evVal,url,param,_pos1,_pos2,_repClm,_rep,_clm,noVal,columnFocus,jCol,val,renderer,editor,ATTRS,optAttrs,i,optAtt,vtype,isAdd;var callback;if(!jTag||jTag.length==0){alert("[SYSTEM_ERROR] : jTag is null. The element of the replacement object doesn't exist. ["+cname+"]");return}if(!isEndInitEvent()){evVal=jEvCol.get(0).value;if(!evVal||evVal==null||evVal==""){return}}try{url=eval("EC_"+cname+"_URL")}catch(e){alert("[SYSTEM_ERROR] : URL that processes the event is not specified. (variable undefinition). ["+cname+"]");return}if(!url||url==""){alert("[SYSTEM_ERROR] : URL that processes the event is not specified. ["+cname+"]");return}param="";try{param=(writable?eval("EC_"+cname+"_EDITPARAM"):eval("EC_"+cname+"_RENDPARAM"))}catch(e){}if(param!=null&&param!=""){url+="?";_pos1=0;_pos2=0;while((_pos1=param.indexOf("{@",_pos2))!=-1){_pos2=param.indexOf("}",_pos1);_clm=param.substring(_pos1+2,_pos2);if(_clm.indexOf(".")<0){_repClm="{@"+_clm+"}";_rep=suffix==""?$("#"+_clm).get(0).value:$("#"+_clm+suffix).get(0).value;_rep=(_rep==null?"":_rep);param=param.replace(_repClm,_rep);url+=_clm+"="+encodeURIComponent(_rep)+"&"}_pos2=_pos1+1}}noVal=function(){_firstOption=jCol.children("option").get(0);if(_firstOption==null||_firstOption.value!=""){return false}return true};columnFocus=function(){jCol.attr("isfocus","true")};if(cid!=null&&cid!=""){jCol=jTag.find("#"+cid)}else{jCol=new Array(0)}if(jCol.length>0&&isEndInitEvent()){jCol.bind("focus",columnFocus)}val="";if(jCol.length>0){if(isEndInitEvent()){val=(jCol.val()==null?"":jCol.val())}else{val=(jTag.attr("h_evVal")==null?"":jTag.attr("h_evVal"))}}renderer="";try{renderer=eval("EC_"+cname+"_RENDERER")}catch(e){}editor="";try{editor=eval("EC_"+cname+"_EDITOR")}catch(e){}ATTRS=["title","style","tabindex","readonly","disabled","onClick","onChange","onBlur","onFocus","ondblClick","onMouseDown","onMouseUp","onMouseMove","onMouseOut","onMouseOver","onSelect","onKeydown","onKeypress","onKeyup","eventCallBack","multiple"];optAttrs="";if(jCol.length>0){for(i=0;i<ATTRS.length;i++){optAtt=jCol.attr(ATTRS[i]);if(optAtt!=null){vtype=typeof(optAtt);isAdd=false;if(vtype=="function"){optAtt=optAtt.toString();isAdd=optAtt.length>0?true:false;optAtt="("+optAtt+")()"}else{if(vtype=="boolean"){isAdd=optAtt}else{isAdd=optAtt.length>0?true:false}}if(isAdd){optAttrs+=ATTRS[i]+"='"+optAtt+"' "}}}}$.ajax({url:url,data:{EC_CID:(cid==null?"":cid),EC_CNAME:(cname==null?"":cname),EC_RENDERER:renderer,EC_EDITOR:editor,EC_PARAM:param,EC_SQL:param,EC_WRITABLE:(writable==null?"":writable),EC_CVALUE:val,EC_NOVALUE:(jCol.length==0?"":noVal()),EC_CLASS:(jCol.length==0?"":jCol.attr("class")),EC_SIZE:(jCol.length==0?"":jCol.attr("size")),EC_MAXLENGTH:(jCol.length==0?"":jCol.attr("maxlength")),EC_OPTATTRS:optAttrs,EC_PNAME:jEvCol.attr("id")==null?"":jEvCol.attr("id").split("__")[0],EC_PVALUE:jEvCol.get(0).value==null?"":jEvCol.get(0).value,EC_USESLBL:(suffix==null||suffix=="")?"false":"true"},type:"POST",dataType:"html",async:isEndInitEvent(),error:function(r,s,e){if(url.indexOf(".htm")<0){alert("EventColumnError:"+r+":"+s+":"+e+":"+cname)}},success:function(data,status){var jNewCol=$(data);if(jCol.length>0){if(isEndInitEvent()){jCol.unbind("focus",columnFocus)}bindOldEvents(jNewCol.get(0),jQuery.data(jCol.clone(true).get(0),"events"))}jTag.empty().append(jNewCol);if(jCol.length>0){jTag.find("input,select,textarea").attr("name",cid).attr("id",cid);if(isEndInitEvent()){if(jCol.attr("isfocus")){jNewCol.get(0).focus();if($.browser.msie){jNewCol.get(0).focus()}}}if(!isEndInitEvent()){jNewCol.change()}if(jCol.attr("eventCallback")){callback=function(){eval(jCol.attr("eventCallback")+"(arguments);")};callback(cid,jNewCol.val(),jCol.get(0).value)}}if(suffix!=null&&suffix!=""){if(isEndInitEvent()){$("table#viewTable").resizeView()}}}})}function bindOldEvents(d,a){var c,b;for(c in a){for(b in a[c]){jQuery.event.add(d,c,a[c][b],a[c][b].data)}}}var isShowTip=false;$(function(){if(USE_REAL_TIME_CHECK){setEvent('textarea,select,input[type="text"]',"focusout",function(){var b=RegExp(/jsp/);var a=location.pathname.match(b);check(this,RegExp.leftContext+"jsp/common/realtimecheck.jsp")});$("table#viewTable").parent().parent().scroll(function(){if(isShowTip){isShowTip=false;$(".tipErr").remove()}})}});function check(f,b){var c,d,h,g,e,j,a,i;c=f.name;if(typeof jQuery!="undefined"&&c.indexOf("h_")!=0){d=f.value;if(f.rtOption!="null"&&f.rtOption!="undefined"){i=f.getAttribute("rtOption")}h=c.split("__");g=(2==h.length);e="command=RENEW&checkType="+(g?"ENTRY":"NEW")+(g?"&h_rowSel="+h[1]:"")+"&column="+h[0]+"&"+c+"="+encodeURIComponent(d)+(i?"&"+i:"");j={dataType:"html",type:"POST",url:b,data:e};j.error=function(){};j.success=function(k){a=$(f).data("tipId");$("#"+a).remove();if($.trim(k).indexOf("row_error")>=0){showCheckTip(f,k);isShowTip=true}};$.ajax(j)}return true}function showCheckTip(a,c){var j,i,k,g,e,h,f,d,b;j=$(a);i=j.offset();if(i.top>=30){e="<div class='tipErr'><div id='tipArrowBottom'></div><div>"+c+"</div></div>";h=$(e).appendTo(document.body);f=i.left;d=i.top+(-11-h[0].offsetHeight)}else{e="<div class='tipErr'><div id='tipArrowTop'></div><div>"+c+"</div></div>";h=$(e).appendTo(document.body);f=i.left;d=i.top+11+h[0].offsetHeight}b=(new Date()).getTime();$(a).data("tipId",b);h.css({left:f+"px",top:d+"px"}).attr("id",b).click(function(){$(this).remove()}).show()}$(function(){bindEvents()});$.fn.simpleColorPickerOg=function(a){var c={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"],showEffect:"",hideEffect:"",onChangeColor:false};var b=$.extend(c,a);return this.each(function(){var g=$(this);var l="";var j=g.attr("id").replace(/-/g,"")+"_";for(var f=0;f<b.colors.length;f++){var m=b.colors[f];var k="";if(f%b.colorsPerLine==0){k="clear: both; "}if(f>0&&k&&$.browser&&$.browser.msie&&$.browser.version<=7){k="";l+='<li style="float: none; clear: both; overflow: hidden; background-color: #fff; display: block; height: 1px; line-height: 1px; font-size: 1px; margin-bottom: -2px;"></li>'}l+='<li id="'+j+"color-"+f+'" class="color-box" style="'+k+"background-color: "+m+'" title="'+m+'"></li>'}k="clear: both; ";l+='<li id="'+j+'color-default" class="color-box" style="width:80px; text-align:center; '+k+'background-color:white;" title="clear">clear</li>';var h=$('<div id="'+j+'color-picker" class="color-picker" style="position: absolute; left: 0px; top: 0px;"><ul>'+l+'</ul><div style="clear: both;"></div></div>');$("body").append(h);h.hide();h.find("li.color-box").click(function(){var i=isNaN(this.id.substr(this.id.indexOf("-")+1))?"":b.colors[this.id.substr(this.id.indexOf("-")+1)];if(!g.is("input")){g.val(i);g.blur()}if($.isFunction(c.onChangeColor)){c.onChangeColor.call(g,i)}d(h)});$("body").live("click",function(){d(h)});h.click(function(i){i.stopPropagation()});var e=function(i){var p=g.offset();var o=p.left+g.outerWidth()-i.outerWidth();if(o<p.left){o=p.left}i.css({left:o,top:(p.top+g.outerHeight())});n(i)};g.click(function(i){g=$(this);i.stopPropagation();if(!g.is("input")){e(h)}});g.change(function(i){if(g.val()!=g.css("background-color")){g.css("background-color",g.val()).css("color",g.val())}});g.focus(function(){e(h)});function d(i){if(b.hideEffect=="fade"){i.fadeOut()}else{if(b.hideEffect=="slide"){i.slideUp()}else{i.hide()}}}function n(i){if(b.showEffect=="fade"){i.fadeIn()}else{if(b.showEffect=="slide"){i.slideDown()}else{i.show()}}}})};$(function(){if($.fn.simpleColorPickerOg){$("input.colorPicker").simpleColorPickerOg({onChangeColor:function(a){$(this).val(a).css("background-color",a).css("color",a).change()}})}});jQuery.fn.ogClockpicker=function(options,callback){var org_settings={starthour:6,endhour:20,showminutes:"true",minutedivisions:4,military:true,event:"click",layout:"vertical",valuefield:null,useBgiframe:false,hoursopacity:1,minutesopacity:1,second:""};if(options){jQuery.extend(org_settings,options)}var callback=callback||function(){},v=(org_settings.layout=="vertical");errorcheck(org_settings);jQuery(this)[org_settings.event](function(e){var self=this,$self=jQuery(this),$body=jQuery("body");var settings=jQuery.extend(true,{},org_settings);if($self.attr("valuefield")){settings.valuefield=$self.attr("valuefield")}if($self.attr("starthour")){settings.starthour=parseInt($self.attr("starthour"))}if($self.attr("endhour")){settings.endhour=parseInt($self.attr("endhour"))}if($self.attr("minutedivisions")){settings.minutedivisions=parseInt($self.attr("minutedivisions"))}if($self.attr("military")){settings.military=$self.attr("military")}if($self.attr("showminutes")){settings.showminutes=$self.attr("showminutes")}if($self.attr("usesecond")=="true"){settings.second="00"}if($self.attr("layout")){settings.layout=$self.attr("layout");org_settings.layout=settings.layout;v=(settings.layout=="vertical")}errorcheck(settings);if(!settings.valuefield){$self.unbind("keydown").bind("keydown",keyhandler)}else{var inputfield=jQuery("[name="+settings.valuefield+"]");inputfield.unbind("keydown").bind("keydown",keyhandler)[0].focus();inputfield.bind("click",function(){inputfield.unbind("keydown")})}jQuery("#CP_hourcont,#CP_minutecont").remove();var $hourcont=jQuery("<div id='CP_hourcont' class='CP' />").appendTo($body);!settings.useBgiframe?$hourcont.css("opacity",settings.hoursopacity):null;binder($hourcont);var $hourcol=[];for(var i=0;i<Math.floor(settings.endhour/12)-Math.floor(settings.starthour/12)+1;i++){$hourcol.push(jQuery("<div class='CP_hourcol' id='hourcol"+i+"' />").appendTo($body))}if(settings.showminutes=="true"){var $mc=jQuery("<div id='CP_minutecont' class='CP' />").appendTo($body);!settings.useBgiframe?$mc.css("opacity",settings.minutesopacity):null;binder($mc)}if(!v){$hourcont.css("width","auto");if(settings.showminutes=="true"){$mc.css("width","auto")}}else{for(i=0;i<$hourcol.length;i++){$hourcol[i].addClass("floatleft")}}renderhours();putcontainer();function renderhours(){var c=1;var numberC=0;for(var h=settings.starthour;h<=settings.endhour;h++){if(h%12==0){c=1}var displayhours=((!settings.military&&h>12)?h-12:h);var valuehouers=h;if(!settings.military&&h==0){}else{if(!settings.military&&h==12){displayhours="0"}}if(settings.military&&h<10){displayhours="0"+displayhours}if(h<10){valuehouers="0"+valuehouers}var $hd=jQuery("<div class='CP_hour' id='hr_"+h+"_"+c+"' value='"+valuehouers+"' >"+displayhours+set_tt(h)+"</div>");if(settings.military){$hd.width(20)}binder($hd);if(!v){$hd.css("float","left")}$hourcol[numberC].append($hd);if((h+1)%12==0){numberC++}c++}for(var j=0;j<$hourcol.length;j++){if(v){if(j!=0&&j%2==0){$hourcol[j].css("margin-left",$mc.width()+4+"px")}}else{$hourcont.append("<div style='clear:left' />");if(j!=0&&j%2==0){$hourcol[j].css("margin-top","19px")}}$hourcont.append($hourcol[j])}}function renderminutes(h){var realhours=h;var displayhours=(!settings.military&&h>12)?h-12:h;var valuehouers=h;if(!settings.military&&h==0){}else{if(!settings.military&&h==12){displayhours="0"}}if(settings.military&&h<10){displayhours="0"+displayhours}if(h<10){valuehouers="0"+valuehouers}$mc.empty();var n=60/settings.minutedivisions,tt=set_tt(realhours),counter=1;for(var m=0;m<60;m=m+n){$md=jQuery("<div class='CP_minute' id='"+realhours+"_"+m+"' value='"+valuehouers+((m<10)?"0":"")+m+"'>"+displayhours+":"+((m<10)?"0":"")+m+tt+"</div>");if(!v){$md.css("float","left");if(settings.minutedivisions>6&&counter==settings.minutedivisions/2+1){$mc.append("<div style='clear:left' />")}}$mc.append($md);binder($md);counter++}}function set_tt(realhours){if(!settings.military){return(realhours>=12)?" PM":" AM"}else{return""}}function putcontainer(){if(e.type!="focus"){$hourcont[0].style.left=e.pageX-5+"px";$hourcont[0].style.top=e.pageY-(Math.floor($hourcont.height()/2))+"px";rectify($hourcont)}else{$self.after($hourcont)}$hourcont.slideDown("fast");if(settings.useBgiframe){bgi($hourcont)}}function rectify($obj){var ph=document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight;var pw=document.documentElement.clientWidth?document.documentElement.clientWidth:document.body.clientWidth;var t=parseInt($obj[0].style.top);var l=parseInt($obj[0].style.left);var st=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;if(t<=st&&!$obj.is("#CP_minutecont")){$obj.css("top",st+10+"px")}else{if(t+$obj.height()-st>ph){$obj.css("top",st+ph-$obj.height()-10+"px")}}if(l<=0){$obj.css("left","10px")}}function bgi(ob){if(typeof jQuery.fn.bgIframe=="function"){ob.bgIframe()}else{alert("bgIframe plugin not loaded.")}}function binder($obj){if($obj.attr("id")=="CP_hourcont"){$obj.mouseout(function(e){hourcont_out(e)})}else{if($obj.attr("id")=="CP_minutecont"){$obj.mouseout(function(e){minutecont_out(e)})}else{if($obj.attr("class")=="CP_hour"){$obj.mouseover(function(e){hourdiv_over($obj,e)});$obj.mouseout(function(){hourdiv_out($obj)});$obj.click(function(){hourdiv_click($obj)})}else{if($obj.attr("class")=="CP_minute"){$obj.mouseover(function(){minutediv_over($obj)});$obj.mouseout(function(){minutediv_out($obj)});$obj.click(function(){minutediv_click($obj)})}}}}}function hourcont_out(e){try{var t=(e.toElement)?e.toElement:e.relatedTarget;if(!(jQuery(t).is("div[class^=CP], iframe"))){cleardivs()}}catch(e){cleardivs()}}function minutecont_out(e){try{var t=(e.toElement)?e.toElement:e.relatedTarget;if(!(jQuery(t).is("div[class^=CP], iframe"))){cleardivs()}}catch(e){cleardivs()}}function hourdiv_over($obj,e){var h=$obj.attr("id").split("_")[1],i=$obj.attr("id").split("_")[2],l,t,nn;$obj.addClass("CP_over");nn=Math.ceil((Math.floor(h/12)-Math.floor(settings.starthour/12))/2);if(settings.showminutes=="true"){$mc.hide();renderminutes(h);if(v){t=e.type=="mouseover"?e.pageY-15:$hourcont.offset().top+2+($obj.height()*i);l=$hourcont.offset().left+$hourcol[0].width()*2*nn+$mc.width()*(nn-1)+4*nn-2}else{l=(e.type=="mouseover")?e.pageX-10:$hourcont.offset().left+($obj.width()-5)*i;t=$hourcont.offset().top+($hourcont.height()-($mc.height()+2)*(Math.ceil($hourcol.length/2)-1))/$hourcol.length*2*nn+$mc.height()*(nn-1)+2*nn-1}$mc.css("left",l+"px").css("top",t+"px");rectify($mc);$mc.show();if(settings.useBgiframe){bgi($mc)}}return false}function hourdiv_out($obj){$obj.removeClass("CP_over");return false}function hourdiv_click($obj){var h=$obj.attr("id").split("_")[1],tt=set_tt(h),str=$obj.attr("value");if(str.indexOf(" ")!=-1){var cleanstr=str.substring(0,str.indexOf(" "))}else{var cleanstr=str}$obj.text(cleanstr+"00"+settings.second);setval($obj);cleardivs()}function minutediv_over($obj){$obj.addClass("CP_over");return false}function minutediv_out($obj){$obj.removeClass("CP_over");return false}function minutediv_click($obj){$obj.text($obj.attr("value")+settings.second);setval($obj);cleardivs()}function setval($obj){if(!settings.valuefield){self.value=$obj.text()}else{jQuery("input[name="+settings.valuefield+"]").val($obj.text()).change()}callback.apply($self,[$obj.text()]);$self.unbind("keydown",keyhandler)}function cleardivs(){if(settings.showminutes=="true"){$mc.hide()}$hourcont.slideUp("fast");$self.unbind("keydown",keyhandler)}function keyhandler(e){var $obj=$("div.CP_over").size()?$("div.CP_over"):$("div.CP_hour:first"),divtype=$obj.is(".CP_hour")?"hour":"minute",hi=(divtype=="hour")?$obj[0].id.split("_")[2]:0,h=(divtype=="minute")?$obj[0].id.split("_")[0]:$obj[0].id.split("_")[1];if(divtype=="minute"){if((Math.floor(h/12)-Math.floor(settings.starthour/12))==0){var curloc="m1"}else{if((Math.floor(h/12)-Math.floor(settings.endhour/12))==0&&(Math.floor(h/12)-Math.floor(settings.starthour/12))%2!=0){var curloc="m2"}else{var curloc="m3"}}}else{if((Math.floor(h/12)-Math.floor(settings.starthour/12))%2==0){var curloc="h1"}else{var curloc="h2"}}function divprev($obj){if($obj.prev().size()){eval(divtype+"div_out($obj)");eval(divtype+"div_over($obj.prev(), e)")}else{return false}}function divnext($obj){if($obj.next().size()){eval(divtype+"div_out($obj)");eval(divtype+"div_over($obj.next(), e)")}else{return false}}function hourtohour($obj){if((Math.floor(h/12)-Math.floor(settings.starthour/12))%2==0){var next=String((Math.floor(h/12)-Math.floor(settings.starthour/12))+1)}else{var next=String((Math.floor(h/12)-Math.floor(settings.starthour/12))-1)}var ctx="#hourcol"+next;$newobj=jQuery(".CP_hour[id$=_"+hi+"]",ctx);if($newobj.size()){hourdiv_out($obj);hourdiv_over($newobj,e)}else{return false}}function hourtominute($obj){hourdiv_out($obj);minutediv_over($(".CP_minute:first"))}function minutetohour($obj,where){minutediv_out($obj);if(where<0){if((Math.floor(h/12)-Math.floor(settings.starthour/12))%2==0){var next=String((Math.floor(h/12)-Math.floor(settings.starthour/12))+where);h=String(Number(h)-12)}else{var next=String((Math.floor(h/12)-Math.floor(settings.starthour/12)))}}else{if((Math.floor(h/12)-Math.floor(settings.starthour/12))%2==0){var next=String((Math.floor(h/12)-Math.floor(settings.starthour/12)))}else{var next=String((Math.floor(h/12)-Math.floor(settings.starthour/12))+where);h=String(Number(h)+12)}}var ctx="#hourcol"+next;var $newobj=jQuery(".CP_hour[id^=hr_"+h+"]",ctx);hourdiv_over($newobj,e)}switch(e.keyCode){case 37:if(v){switch(curloc){case"m1":return false;break;case"m2":minutetohour($obj,-1);break;case"m3":minutetohour($obj,-1);break;case"h1":hourtominute($obj);break;case"h2":hourtohour($obj);break}}else{divprev($obj)}break;case 38:if(v){divprev($obj)}else{switch(curloc){case"m1":return false;break;case"m2":minutetohour($obj,-1);break;case"m3":minutetohour($obj,-1);break;case"h1":hourtominute($obj);break;case"h2":hourtohour($obj);break}}break;case 39:if(v){switch(curloc){case"m1":minutetohour($obj,1);break;case"m2":return false;break;case"m3":minutetohour($obj,1);break;case"h1":hourtohour($obj);break;case"h2":hourtominute($obj);break}}else{divnext($obj)}break;case 40:if(v){divnext($obj)}else{switch(curloc){case"m1":minutetohour($obj,1);break;case"m2":return false;break;case"m3":minutetohour($obj,1);break;case"h1":hourtohour($obj);break;case"h2":hourtominute($obj);break}}break;case 13:eval(divtype+"div_click($obj)");break;default:return true}return false}return false});function errorcheck(settings){if(settings.starthour>=settings.endhour){alert("Error - start hour must be less than end hour.");return false}else{if(60%settings.minutedivisions!=0){alert("Error - param minutedivisions must divide evenly into 60.");return false}}}return this};$(function(){if($.fn.ogClockpicker){$(document).ready(function(){$(".clockpick").ogClockpicker()})}});function likeComp(c){var b=c.substring(6);var d=$("#"+c).attr("aimaiType");var a=$("#"+b).val();a=a.replace(/^%+|%+$/g,"");if(a!=""){switch(d){case"1":a=a+"%";break;case"2":a="%"+a;break;case"3":a="%"+a+"%";break}}$("#"+b).val(a)}$(function(){$("form").submit(function(){$("[id^='AIMAI_']").each(function(){likeComp(this.id)})})});$.fn.aimaiPickerOg=function(a){var c={texts:[" V "," V*","*V ","*V*"],titls:["完全一致","前方一致","後方一致","前後曖昧"]};var b=$.extend(c,a);return this.each(function(){var g=$(this);var j="PIC_"+g.attr("id").replace(/-/g,"")+"_";var l="";for(var f=0;f<b.texts.length;f++){var m=b.texts[f];var k=b.titls[f];l+='<span id="'+j+"text-"+f+'" class="text-box"" title="'+k+'">('+m+") </span>"}var h=$('<div id="'+j+'aimai-picker" class="aimai-picker" style="position: absolute; left: 0px; top: 0px;">'+l+'<div style="clear: both;"></div></div>');$("body").append(h);h.hide();h.find("span.text-box").click(function(){var i=this.id.substr(this.id.indexOf("-")+1);g.attr("aimaiType",i);g.attr("title",b.titls[i]);g.text(b.texts[i]);g.blur();d(h)});$("body").live("click",function(){d(h)});h.click(function(i){i.stopPropagation()});var e=function(i){var p=g.offset();var o=p.left+g.outerWidth()-i.outerWidth();if(o<p.left){o=p.left}i.css({left:o,top:(p.top+g.outerHeight())});n(i)};g.click(function(i){i.stopPropagation();if(!g.is("input")){e(h)}});g.focus(function(){e(h)});function d(i){if(b.hideEffect=="fade"){i.fadeOut()}else{if(b.hideEffect=="slide"){i.slideUp()}else{i.hide()}}}function n(i){if(b.showEffect=="fade"){i.fadeIn()}else{if(b.showEffect=="slide"){i.slideDown()}else{i.show()}}}})};$(function(){if($.fn.aimaiPickerOg){$(".aimaiClm").aimaiPickerOg()}});(function(){$.fn.glDatePicker=function(options){var pluginName="glDatePicker";var instance=this.data(pluginName);if(!instance){return this.each(function(){return $(this).data(pluginName,new glDatePicker(this,options))})}return(options===true)?instance:this};$.fn.glDatePicker.defaults={cssName:"default",zIndex:1000,borderSize:1,calendarOffset:{x:0,y:1},showAlways:false,hideOnClick:true,allowMonthSelect:true,allowYearSelect:true,todayDate:new Date(),selectedDate:null,prevArrow:"\u25c4",nextArrow:"\u25ba",selectableDates:null,selectableDateRange:null,specialDates:null,selectableMonths:null,selectableYears:null,selectableDOW:null,monthNames:null,dowNames:null,dowOffset:(HYBS_CAL_START_MON==true?1:0),onClick:(function(el,cell,date,data){var tgt=el;if(el[0].tagName.toUpperCase()!="INPUT"){var _targetId=el.attr("targetId");if(_targetId!=null){tgt=$("#"+_targetId)}}var year=date.getFullYear();var month=date.getMonth()+1;var day=date.getDate();if(month<10){month="0"+month}if(day<10){day="0"+day}var oldval=tgt.val();var str=year+""+month+""+day;tgt.val(str);if(oldval!=str){tgt.change()}}),onHover:function(el,cell,date,data){},onShow:function(calendar){calendar.show()},onHide:function(calendar){calendar.hide()},firstDate:null};var glDatePicker=(function(){function glDatePicker(element,userOptions){var self=this;self.el=$(element);var el=self.el;self.options=$.extend(true,{},$.fn.glDatePicker.defaults,userOptions);var options=self.options;var _tgt=el;if(el[0].tagName.toUpperCase()!="INPUT"){if(el.attr("targetId")){_tgt=$("#"+el.attr("targetId"))}}var _inputDate=_tgt.val();if(_inputDate!=null&&_inputDate.length>=8){_inputDate=_inputDate.replace(/\u002f/g,"");try{_inputDate=_inputDate.substr(0,4)+"/"+_inputDate.substr(4,2)+"/"+_inputDate.substr(6,2)}catch(e){_inputDate=null}}else{_inputDate=null}self.calendar=$($.find("[gldp-el="+el.attr("gldp-id")+" ]"));options.selectedDate=(options.selectedDate||new Date(_inputDate||options.todayDate))||options.todayDate;options.firstDate=(new Date((options.firstDate||options.selectedDate)))._first();if(!(el.attr("gldp-id")||"").length){el.attr("gldp-id","gldp-"+Math.round(Math.random()*10000000000))}el.addClass("gldp-el").bind("click",function(e){self.show(e)});if(self.calendar.length&&!options.showAlways){self.calendar.hide()}$(document).bind("mouseup",function(e){var target=e.target;var calendar=self.calendar;if(!el.is(target)&&!calendar.is(target)&&calendar.has(target).length===0&&calendar.is(":visible")){self.hide()}})}glDatePicker.prototype={show:function(){this.render();$.each($(".gldp-el").not(this.el),function(i,o){if(o.length){o.options.onHide(o.calendar)}});this.options.onShow(this.calendar)},hide:function(){if(this.options&&!this.options.showAlways){this.options.onHide(this.calendar)}},render:function(renderCalback){var self=this;var el=self.el;var options=self.options;var calendar=self.calendar;var coreClass=" core border ";var cssName="gldp-"+options.cssName;var todayVal=options.todayDate._val();var todayTime=todayVal.time;var maxRow=6;var maxCol=7;var borderSize=options.borderSize+"px";var getSelectableList=function(min,max,userList){var resultList=[];for(var i=min;i<=max;i++){resultList.push(i)}if(userList){var newList=[];$.each(userList,function(i,v){if(v>=min&&v<=max&&newList._indexOf(v)<0){newList.push(v)}});resultList=newList.length?newList:resultList}resultList.sort();return resultList};var selectableMonths=getSelectableList(0,11,options.selectableMonths);var selectableYears=getSelectableList(todayVal.year-5,todayVal.year+5,options.selectableYears);var selectableDOW=getSelectableList(0,6,options.selectableDOW);var dowNames=options.dowNames||["日","月","火","水","木","金","土"];var monthNames=options.monthNames||["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"];var containerSize=window.innerHeight?window.innerHeight:180;if(containerSize<180){containerSize=(containerSize>135?containerSize:135)}else{containerSize=180}var containerWidth=options.conainerWidth||containerSize;var containerHeight=containerWidth;var getCellSize=function(_size,_count){return(_size/_count)+((options.borderSize/_count)*(_count-1))-1};var cellWidth=getCellSize(containerWidth,maxCol);var cellHeight=getCellSize(containerHeight,maxRow+2);if(!calendar.length){self.calendar=calendar=$("<div/>").attr("gldp-el",el.attr("gldp-id")).data("is",true).css({display:(options.showAlways?undefined:"none"),zIndex:options.zIndex,width:((cellWidth+1)*maxCol)+"px"});$("body").append(calendar)}else{if(!eval(calendar.data("is"))){containerWidth=calendar.outerWidth();containerHeight=calendar.outerHeight();cellWidth=getCellSize(containerWidth,maxCol);cellHeight=getCellSize(containerHeight,maxRow+2)}self.calendar.css({width:((cellWidth+1)*maxCol)+"px"})}if(!el.is(":visible")){calendar.hide()}calendar.removeClass().addClass(cssName).children().remove();var onResize=function(){var elPos=el.offset();calPosTop=(elPos.top+el.outerHeight()+options.calendarOffset.y)-20;calPosLeft=(elPos.left+options.calendarOffset.x);if(calPosTop>$(window).height()-150){calPosTop-=130}if(calPosLeft>$(window).width()-150){calPosLeft-=150}if(calPosTop<0){calPosTop=0}if(calPosLeft<0){calPosLeft=0}calendar.css({top:calPosTop+"px",left:calPosLeft+"px"})};$(window).resize(onResize);onResize();var cellCSS={width:cellWidth+"px",height:cellHeight+"px",lineHeight:cellHeight+"px"};var setFirstDate=function(_date){if(_date){options.firstDate=_date;self.render()}};var getFirstDate=function(_offset){var _date=new Date(options.firstDate);_offset=_offset||0;while(true){_date.setMonth(_date.getMonth()+_offset);_date.setDate(Math.min(1,_date._max()));if(_offset==0){break}var dateVal=_date._val();var dateMonth=dateVal.month;var dateYear=dateVal.year;if(selectableMonths._indexOf(dateMonth)!=-1){if(selectableYears._indexOf(dateYear)!=-1){break}else{if(dateYear<selectableYears[0]||dateYear>selectableYears[selectableYears.length-1]){return null}}}}return _date};var prevFirstDate=getFirstDate(-1);var nextFirstDate=getFirstDate(1);var firstDate=(options.firstDate=getFirstDate());var firstDateVal=firstDate._val();var firstDateMonth=firstDateVal.month;var firstDateYear=firstDateVal.year;var startDate=new Date(firstDate);var dowOffset=Math.abs(Math.min(6,Math.max(0,options.dowOffset)));var startOffset=startDate.getDay()-dowOffset;startOffset=startOffset<1?-7-startOffset:-startOffset;dowNames=(dowNames.concat(dowNames)).slice(dowOffset,dowOffset+7);startDate._add(startOffset);var showPrev=(prevFirstDate);var showNext=(nextFirstDate);var monyearClass=coreClass+"monyear ";var prevCell=$("<div/>").addClass(monyearClass).css($.extend({},cellCSS,{borderWidth:borderSize+" 0 0 "+borderSize})).append($("<a/>").addClass("prev-arrow"+(showPrev?"":"-off")).html(options.prevArrow)).mousedown(function(){return false}).click(function(e){if(options.prevArrow!=""&&showPrev){e.stopPropagation();setFirstDate(prevFirstDate)}});var titleCellCount=maxCol-2;var titleWidth=(cellWidth*titleCellCount)-(titleCellCount*options.borderSize)+(options.borderSize);var titleCell=$("<div/>").addClass(monyearClass+"title").css($.extend({},cellCSS,{width:titleWidth+"px",borderTopWidth:borderSize,marginLeft:"-"+(borderSize)}));var nextCell=$("<div/>").addClass(monyearClass).css($.extend({},cellCSS,{marginLeft:"-"+(borderSize),borderWidth:borderSize+" "+borderSize+" 0 0"})).append($("<a/>").addClass("next-arrow"+(showNext?"":"-off")).html(options.nextArrow)).mousedown(function(){return false}).click(function(e){if(options.nextArrow!=""&&showNext){e.stopPropagation();setFirstDate(nextFirstDate)}});calendar.append(prevCell).append(titleCell).append(nextCell);for(var row=0,cellIndex=0;row<maxRow+1;row++){for(var col=0;col<maxCol;col++,cellIndex++){var cellDate=new Date(startDate);var cellClass="day";var cellZIndex=options.zIndex+(cellIndex);var cell=$("<div/>");if(!row){cellClass="dow";cell.html(dowNames[col]);cellDate=null}else{cellDate._add(col+((row-1)*maxCol));var cellDateVal=cellDate._val();var cellDateTime=cellDateVal.time;var specialData=null;var isSelectable=true;var getRepeatDate=function(v,date){if(v.repeatYear===true){date.setYear(cellDateVal.year)}if(v.repeatMonth===true){date.setMonth(cellDateVal.month)}return date._val()};cell.html(cellDateVal.date);if(options.selectableDateRange){isSelectable=false;$.each(options.selectableDateRange,function(i,v){var dateFrom=v.from;var dateTo=(v.to||null);dateTo=dateTo||new Date(v.from.getFullYear(),v.from.getMonth(),v.from._max());dateFrom=getRepeatDate(v,dateFrom);dateTo=getRepeatDate(v,dateTo);if(cellDateTime>=dateFrom.time&&cellDateTime<=dateTo.time){isSelectable=true;return true}})}if(options.selectableDates){if((options.selectableDateRange&&!isSelectable)||(isSelectable&&!options.selectableDateRange)){isSelectable=false}$.each(options.selectableDates,function(i,v){var vDate=getRepeatDate(v,v.date);if(vDate.time==cellDateTime){return(isSelectable=true)}})}if(!isSelectable||selectableYears._indexOf(cellDateVal.year)<0||selectableMonths._indexOf(cellDateVal.month)<0||selectableDOW._indexOf(cellDateVal.day)<0){cellClass="noday"}else{cellClass=(["sun","mon","tue","wed","thu","fri","sat"])[cellDateVal.day];if(firstDateMonth!=cellDateVal.month){cellClass+=" outday"}if(todayTime==cellDateTime){cellClass="today";cellZIndex+=50}if(options.selectedDate._time()==cellDateTime){cellClass="selected";cellZIndex+=51}if(options.specialDates){$.each(options.specialDates,function(i,v){var vDate=getRepeatDate(v,v.date);if(vDate.time==cellDateTime){cellClass=(v.cssClass||"special");cellZIndex+=52;specialData=v.data}})}cell.mousedown(function(){return false}).hover(function(e){e.stopPropagation();var hoverData=$(this).data("data");options.onHover(el,cell,hoverData.date,hoverData.data)}).click(function(e){e.stopPropagation();var clickedData=$(this).data("data");options.selectedDate=options.firstDate=clickedData.date;self.render(function(){if(!options.showAlways&&options.hideOnClick){self.hide()}});options.onClick(el,$(this),clickedData.date,clickedData.data)})}}$.extend(cellCSS,{borderTopWidth:borderSize,borderBottomWidth:borderSize,borderLeftWidth:(row>0||(!row&&!col))?borderSize:0,borderRightWidth:(row>0||(!row&&col==6))?borderSize:0,marginLeft:(col>0)?"-"+(borderSize):0,marginTop:(row>0)?"-"+(borderSize):0,zIndex:cellZIndex});cell.data("data",{date:cellDate,data:specialData}).addClass(coreClass+cellClass).css(cellCSS);calendar.append(cell)}}var toggleYearMonthSelect=function(showYear){var show="inline-block";var hide="none";if(options.allowMonthSelect){monthText.css({display:!showYear?hide:show});monthSelect.css({display:!showYear?show:hide})}if(options.allowYearSelect){yearText.css({display:showYear?hide:show});yearSelect.css({display:showYear?show:hide})}};var onYearMonthSelect=function(){options.firstDate=new Date(yearSelect.val(),monthSelect.val(),1);self.render()};var monthSelect=$("<select/>").hide().change(onYearMonthSelect);var yearSelect=$("<select/>").hide().change(onYearMonthSelect);var monthText=$("<span/>").html(monthNames[firstDateMonth]).mousedown(function(){return false}).click(function(e){e.stopPropagation();toggleYearMonthSelect(false)});var yearText=$("<span/>").html(firstDateYear).mousedown(function(){return false}).click(function(e){e.stopPropagation();toggleYearMonthSelect(true)});$.each(monthNames,function(i,v){if(options.allowMonthSelect&&selectableMonths._indexOf(i)!=-1){var o=$("<option/>").html(v).attr("value",i);if(i==firstDateMonth){o.attr("selected","selected")}monthSelect.append(o)}});$.each(selectableYears,function(i,v){if(options.allowYearSelect){var o=$("<option/>").html(v).attr("value",v);if(v==firstDateYear){o.attr("selected","selected")}yearSelect.append(o)}});var titleYearMonth=$("<div/>").append(monthText).append(monthSelect).append(yearText).append(yearSelect);titleCell.children().remove();titleCell.append(titleYearMonth);renderCalback=renderCalback||(function(){});renderCalback();var mousewheelevent="onwheel" in document?"wheel":"onmousewheel" in document?"mousewheel":"DOMMouseScroll";calendar.bind(mousewheelevent,function(e){e.preventDefault();var delta=e.originalEvent.deltaY?-(e.originalEvent.deltaY):e.originalEvent.wheelDelta?e.originalEvent.wheelDelta:-(e.originalEvent.detail);if(delta<0){nextCell.click()}else{prevCell.click()}})}};return glDatePicker})();(function(){Date.prototype._clear=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};Date.prototype._time=function(){return this._clear().getTime()};Date.prototype._max=function(){var isLeapYear=(new Date(this.getYear(),1,29).getMonth()==1)?1:0;var days=[31,28+isLeapYear,31,30,31,30,31,31,30,31,30,31];return days[this.getMonth()]};Date.prototype._add=function(days){this.setDate(this.getDate()+days)};Date.prototype._first=function(){var date=new Date(this);date.setDate(1);return date};Date.prototype._val=function(){this._clear();return{year:this.getFullYear(),month:this.getMonth(),date:this.getDate(),time:this.getTime(),day:this.getDay()}};Array.prototype._indexOf=function(value){return $.inArray(value,this)}})()})();$(function(){if($.fn.glDatePicker){$(".calPic").glDatePicker()}});function selectScroll(a){var d=4;if(a.getAttribute("size")){d=a.getAttribute("size")}var e=a.options;for(var c=0;c<e.length;c++){if(e[c].selected){if(e[c].parentNode.tagName.toUpperCase()=="OPTGROUP"){c+=$(e[c].parentNode).prev().length}var b=c*($(a).height()/d);break}}$(a).scrollTop(b)}$(function(){$("select[multiple]").each(function(){selectScroll(this)})});
\ No newline at end of file
1+var orgFldCls=null;$(function(){if(USE_FOCUS_HILIGHT){setEvent('textarea,select,input[type="text"]',"focusin",function(){doFocus2(this)});setEvent('textarea,select,input[type="text"]',"focusout",function(){doBlur2(this)})}});function doFocus2(a){if(a!=null){if(a.className==null||a.className.indexOf("must")<0){if(a.tagName=="SELECT"){a.orgBgColor=a.style.backgroundColor;a.style.backgroundColor="#ffcccc"}else{orgFldCls=a.className;a.className="focusField "+orgFldCls}}}}function doBlur2(a){if(a!=null){if(a.className==null||a.className.indexOf("must")<0){if(a.tagName=="SELECT"){a.style.backgroundColor=a.orgBgColor}else{if(orgFldCls!=null){a.className=orgFldCls}else{a.className="notFocusField"}}}}}oldDoFocusFlag=true;function doFocus(a){if(oldDoFocusFlag){oldDoFocusFlag=false;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(a){}$(function(){setEvent('textarea,select,input[type="text"]',"focusout",function(){convert(this)})});function convert(b){var c,a;c=b.value;a=b.className;if(c!=null&&a!=null){if(a.match(/XL/)&&!(a.match(/XLU/))){b.value=c.toLowerCase()}else{if((a.match(/XU/)&&!(a.match(/XUL/)))||a.match(/PN2/)){b.value=c.toUpperCase()}}}return true}var colMap;var notFireCols;var jH_evElm;$(function(){if(!(typeof(EC_NAME)=="undefined")){jH_evElm=$(".h_evElm");makeColMapping();setEvent('textarea,select,input[type="text"]',"change",function(){makeColumn(this)},".h_evCol",true,addEvColCls);setEvent("input[type=checkbox],input[type=radio]","click",function(){makeColumn(this)},".h_evCol",true)}});function makeColMapping(){var b,a,e,d,c;if(colMap){return}colMap=new Object();for(b=0;b<EC_EVCOL.length;b++){e=EC_EVCOL[b].split(",");for(a=0;a<e.length;a++){d=e[a];if(d.charAt(0)=="_"){d=d.substring(1);if(notFireCols){notFireCols+=","}notFireCols+=d}c=colMap[d];if(!c){c=new Array()}c[c.length]=EC_NAME[b];colMap[d]=c}}}function addEvColCls(){for(var a in colMap){$("#"+a+",[id^="+a+"__]").addClass("h_evCol")}}function makeColumn(e){var k,l,g,j,b,h,d,c,a,f;if(jH_evElm&&isEndInitEvent()){jH_evElm=null}k=$(e);l=k.attr("id");g=l.split("__")[0];j=colMap[g];if(!j){return}if(!isEndInitEvent()&&notFireCols&&notFireCols.indexOf(g)>=0){return}for(b=0;b<j.length;b++){h=(l==g?"":"__"+l.split("__")[1]);d=j[b]+h;c=d.split("__")[0];a=isEndInitEvent()?$(".h_evElm[h_evCid="+d+"]"):jH_evElm.filter("[h_evCid="+d+"]");f=a.attr("h_evWrtbl");eventColumn(k,a,d,c,h,f)}}function eventColumn(jEvCol,jTag,cid,cname,suffix,writable){var evVal,url,param,_pos1,_pos2,_repClm,_rep,_clm,noVal,columnFocus,jCol,val,renderer,editor,ATTRS,optAttrs,i,optAtt,vtype,isAdd;var callback;if(!jTag||jTag.length==0){alert("[SYSTEM_ERROR] : jTag is null. The element of the replacement object doesn't exist. ["+cname+"]");return}if(!isEndInitEvent()){evVal=jEvCol.get(0).value;if(!evVal||evVal==null||evVal==""){return}}try{url=eval("EC_"+cname+"_URL")}catch(e){alert("[SYSTEM_ERROR] : URL that processes the event is not specified. (variable undefinition). ["+cname+"]");return}if(!url||url==""){alert("[SYSTEM_ERROR] : URL that processes the event is not specified. ["+cname+"]");return}param="";try{param=(writable?eval("EC_"+cname+"_EDITPARAM"):eval("EC_"+cname+"_RENDPARAM"))}catch(e){}if(param!=null&&param!=""){url+="?";_pos1=0;_pos2=0;while((_pos1=param.indexOf("{@",_pos2))!=-1){_pos2=param.indexOf("}",_pos1);_clm=param.substring(_pos1+2,_pos2);if(_clm.indexOf(".")<0){_repClm="{@"+_clm+"}";var rtnNull=function(){console.log("noDifined:");console.log(arguments[0]);return null};_rep=suffix==""?$("#"+_clm)[0]?$("#"+_clm).get(0).value:rtnNull(_clm):$("#"+_clm+suffix)[0]?$("#"+_clm+suffix).get(0).value:rtnNull(_clm+suffix);_rep=(_rep==null?"":_rep);param=param.replace(_repClm,_rep);url+=_clm+"="+encodeURIComponent(_rep)+"&"}_pos2=_pos1+1}}noVal=function(){_firstOption=jCol.children("option").get(0);if(_firstOption==null||_firstOption.value!=""){return false}return true};columnFocus=function(){jCol.attr("isfocus","true")};if(cid!=null&&cid!=""){jCol=jTag.find("#"+cid)}else{jCol=new Array(0)}if(jCol.length>0&&isEndInitEvent()){jCol.bind("focus",columnFocus)}val="";if(jCol.length>0){if(isEndInitEvent()){val=(jCol.val()==null?"":jCol.val())}else{val=(jTag.attr("h_evVal")==null?"":jTag.attr("h_evVal"))}}renderer="";try{renderer=eval("EC_"+cname+"_RENDERER")}catch(e){}editor="";try{editor=eval("EC_"+cname+"_EDITOR")}catch(e){}ATTRS=["title","style","tabindex","readonly","disabled","onClick","onChange","onBlur","onFocus","ondblClick","onMouseDown","onMouseUp","onMouseMove","onMouseOut","onMouseOver","onSelect","onKeydown","onKeypress","onKeyup","eventCallBack","multiple"];optAttrs="";if(jCol.length>0){for(i=0;i<ATTRS.length;i++){optAtt=jCol.attr(ATTRS[i]);if(optAtt!=null){vtype=typeof(optAtt);isAdd=false;if(vtype=="function"){optAtt=optAtt.toString();isAdd=optAtt.length>0?true:false;optAtt="("+optAtt+")()"}else{if(vtype=="boolean"){isAdd=optAtt}else{isAdd=optAtt.length>0?true:false}}if(isAdd){optAttrs+=ATTRS[i]+"='"+optAtt+"' "}}}}$.ajax({url:url,data:{EC_CID:(cid==null?"":cid),EC_CNAME:(cname==null?"":cname),EC_RENDERER:renderer,EC_EDITOR:editor,EC_PARAM:param,EC_SQL:param,EC_WRITABLE:(writable==null?"":writable),EC_CVALUE:val,EC_NOVALUE:(jCol.length==0?"":noVal()),EC_CLASS:(jCol.length==0?"":jCol.attr("class")),EC_SIZE:(jCol.length==0?"":jCol.attr("size")),EC_MAXLENGTH:(jCol.length==0?"":jCol.attr("maxlength")),EC_OPTATTRS:optAttrs,EC_PNAME:jEvCol.attr("id")==null?"":jEvCol.attr("id").split("__")[0],EC_PVALUE:jEvCol.get(0).value==null?"":jEvCol.get(0).value,EC_USESLBL:(suffix==null||suffix=="")?"false":"true"},type:"POST",dataType:"html",async:isEndInitEvent(),error:function(r,s,e){if(url.indexOf(".htm")<0){alert("EventColumnError:"+r+":"+s+":"+e+":"+cname)}},success:function(data,status){var jNewCol=$(data);if(jCol.length>0){if(isEndInitEvent()){jCol.unbind("focus",columnFocus)}bindOldEvents(jNewCol.get(0),jQuery.data(jCol.clone(true).get(0),"events"))}jTag.empty().append(jNewCol);if(jCol.length>0){jTag.find("input,select,textarea").attr("name",cid).attr("id",cid);if(isEndInitEvent()){if(jCol.attr("isfocus")){jNewCol.get(0).focus();if($.browser.msie){jNewCol.get(0).focus()}}}if(!isEndInitEvent()){jNewCol.change()}if(jCol.attr("eventCallback")){callback=function(){eval(jCol.attr("eventCallback")+"(arguments);")};callback(cid,jNewCol.val(),jCol.get(0).value)}}if(suffix!=null&&suffix!=""){if(isEndInitEvent()){$("table#viewTable").resizeView()}}}})}function bindOldEvents(d,a){var c,b;for(c in a){for(b in a[c]){jQuery.event.add(d,c,a[c][b],a[c][b].data)}}}var isShowTip=false;$(function(){if(USE_REAL_TIME_CHECK){setEvent('textarea,select,input[type="text"]',"focusout",function(){var b=RegExp(/jsp/);var a=location.pathname.match(b);check(this,RegExp.leftContext+"jsp/common/realtimecheck.jsp")});$("table#viewTable").parent().parent().scroll(function(){if(isShowTip){isShowTip=false;$(".tipErr").remove()}})}});function check(f,b){var c,d,h,g,e,j,a,i;c=f.name;if(typeof jQuery!="undefined"&&c.indexOf("h_")!=0){d=f.value;if(f.rtOption!="null"&&f.rtOption!="undefined"){i=f.getAttribute("rtOption")}h=c.split("__");g=(2==h.length);e="command=RENEW&checkType="+(g?"ENTRY":"NEW")+(g?"&h_rowSel="+h[1]:"")+"&column="+h[0]+"&"+c+"="+encodeURIComponent(d)+(i?"&"+i:"");j={dataType:"html",type:"POST",url:b,data:e};j.error=function(){};j.success=function(k){a=$(f).data("tipId");$("#"+a).remove();if($.trim(k).indexOf("row_error")>=0){showCheckTip(f,k);isShowTip=true}};$.ajax(j)}return true}function showCheckTip(a,c){var j,i,k,g,e,h,f,d,b;j=$(a);i=j.offset();if(i.top>=30){e="<div class='tipErr'><div id='tipArrowBottom'></div><div>"+c+"</div></div>";h=$(e).appendTo(document.body);f=i.left;d=i.top+(-11-h[0].offsetHeight)}else{e="<div class='tipErr'><div id='tipArrowTop'></div><div>"+c+"</div></div>";h=$(e).appendTo(document.body);f=i.left;d=i.top+11+h[0].offsetHeight}b=(new Date()).getTime();$(a).data("tipId",b);h.css({left:f+"px",top:d+"px"}).attr("id",b).click(function(){$(this).remove()}).show()}$(function(){bindEvents()});$.fn.simpleColorPickerOg=function(a){var c={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"],showEffect:"",hideEffect:"",onChangeColor:false};var b=$.extend(c,a);return this.each(function(){var g=$(this);var l="";var j=g.attr("id").replace(/-/g,"")+"_";for(var f=0;f<b.colors.length;f++){var m=b.colors[f];var k="";if(f%b.colorsPerLine==0){k="clear: both; "}if(f>0&&k&&$.browser&&$.browser.msie&&$.browser.version<=7){k="";l+='<li style="float: none; clear: both; overflow: hidden; background-color: #fff; display: block; height: 1px; line-height: 1px; font-size: 1px; margin-bottom: -2px;"></li>'}l+='<li id="'+j+"color-"+f+'" class="color-box" style="'+k+"background-color: "+m+'" title="'+m+'"></li>'}k="clear: both; ";l+='<li id="'+j+'color-default" class="color-box" style="width:80px; text-align:center; '+k+'background-color:white;" title="clear">clear</li>';var h=$('<div id="'+j+'color-picker" class="color-picker" style="position: absolute; left: 0px; top: 0px;"><ul>'+l+'</ul><div style="clear: both;"></div></div>');$("body").append(h);h.hide();h.find("li.color-box").click(function(){var i=isNaN(this.id.substr(this.id.indexOf("-")+1))?"":b.colors[this.id.substr(this.id.indexOf("-")+1)];if(!g.is("input")){g.val(i);g.blur()}if($.isFunction(c.onChangeColor)){c.onChangeColor.call(g,i)}d(h)});$("body").live("click",function(){d(h)});h.click(function(i){i.stopPropagation()});var e=function(i){var p=g.offset();var o=p.left+g.outerWidth()-i.outerWidth();if(o<p.left){o=p.left}i.css({left:o,top:(p.top+g.outerHeight())});n(i)};g.click(function(i){g=$(this);i.stopPropagation();if(!g.is("input")){e(h)}});g.change(function(i){if(g.val()!=g.css("background-color")){g.css("background-color",g.val()).css("color",g.val())}});g.focus(function(){e(h)});function d(i){if(b.hideEffect=="fade"){i.fadeOut()}else{if(b.hideEffect=="slide"){i.slideUp()}else{i.hide()}}}function n(i){if(b.showEffect=="fade"){i.fadeIn()}else{if(b.showEffect=="slide"){i.slideDown()}else{i.show()}}}})};$(function(){if($.fn.simpleColorPickerOg){$("input.colorPicker").simpleColorPickerOg({onChangeColor:function(a){$(this).val(a).css("background-color",a).css("color",a).change()}})}});jQuery.fn.ogClockpicker=function(options,callback){var org_settings={starthour:6,endhour:20,showminutes:"true",minutedivisions:4,military:true,event:"click",layout:"vertical",valuefield:null,useBgiframe:false,hoursopacity:1,minutesopacity:1,second:""};if(options){jQuery.extend(org_settings,options)}var callback=callback||function(){},v=(org_settings.layout=="vertical");errorcheck(org_settings);jQuery(this)[org_settings.event](function(e){var self=this,$self=jQuery(this),$body=jQuery("body");var settings=jQuery.extend(true,{},org_settings);if($self.attr("valuefield")){settings.valuefield=$self.attr("valuefield")}if($self.attr("starthour")){settings.starthour=parseInt($self.attr("starthour"))}if($self.attr("endhour")){settings.endhour=parseInt($self.attr("endhour"))}if($self.attr("minutedivisions")){settings.minutedivisions=parseInt($self.attr("minutedivisions"))}if($self.attr("military")){settings.military=$self.attr("military")}if($self.attr("showminutes")){settings.showminutes=$self.attr("showminutes")}if($self.attr("usesecond")=="true"){settings.second="00"}if($self.attr("layout")){settings.layout=$self.attr("layout");org_settings.layout=settings.layout;v=(settings.layout=="vertical")}errorcheck(settings);if(!settings.valuefield){$self.unbind("keydown").bind("keydown",keyhandler)}else{var inputfield=jQuery("[name="+settings.valuefield+"]");inputfield.unbind("keydown").bind("keydown",keyhandler)[0].focus();inputfield.bind("click",function(){inputfield.unbind("keydown")})}jQuery("#CP_hourcont,#CP_minutecont").remove();var $hourcont=jQuery("<div id='CP_hourcont' class='CP' />").appendTo($body);!settings.useBgiframe?$hourcont.css("opacity",settings.hoursopacity):null;binder($hourcont);var $hourcol=[];for(var i=0;i<Math.floor(settings.endhour/12)-Math.floor(settings.starthour/12)+1;i++){$hourcol.push(jQuery("<div class='CP_hourcol' id='hourcol"+i+"' />").appendTo($body))}if(settings.showminutes=="true"){var $mc=jQuery("<div id='CP_minutecont' class='CP' />").appendTo($body);!settings.useBgiframe?$mc.css("opacity",settings.minutesopacity):null;binder($mc)}if(!v){$hourcont.css("width","auto");if(settings.showminutes=="true"){$mc.css("width","auto")}}else{for(i=0;i<$hourcol.length;i++){$hourcol[i].addClass("floatleft")}}renderhours();putcontainer();function renderhours(){var c=1;var numberC=0;for(var h=settings.starthour;h<=settings.endhour;h++){if(h%12==0){c=1}var displayhours=((!settings.military&&h>12)?h-12:h);var valuehouers=h;if(!settings.military&&h==0){}else{if(!settings.military&&h==12){displayhours="0"}}if(settings.military&&h<10){displayhours="0"+displayhours}if(h<10){valuehouers="0"+valuehouers}var $hd=jQuery("<div class='CP_hour' id='hr_"+h+"_"+c+"' value='"+valuehouers+"' >"+displayhours+set_tt(h)+"</div>");if(settings.military){$hd.width(20)}binder($hd);if(!v){$hd.css("float","left")}$hourcol[numberC].append($hd);if((h+1)%12==0){numberC++}c++}for(var j=0;j<$hourcol.length;j++){if(v){if(j!=0&&j%2==0){$hourcol[j].css("margin-left",$mc.width()+4+"px")}}else{$hourcont.append("<div style='clear:left' />");if(j!=0&&j%2==0){$hourcol[j].css("margin-top","19px")}}$hourcont.append($hourcol[j])}}function renderminutes(h){var realhours=h;var displayhours=(!settings.military&&h>12)?h-12:h;var valuehouers=h;if(!settings.military&&h==0){}else{if(!settings.military&&h==12){displayhours="0"}}if(settings.military&&h<10){displayhours="0"+displayhours}if(h<10){valuehouers="0"+valuehouers}$mc.empty();var n=60/settings.minutedivisions,tt=set_tt(realhours),counter=1;for(var m=0;m<60;m=m+n){$md=jQuery("<div class='CP_minute' id='"+realhours+"_"+m+"' value='"+valuehouers+((m<10)?"0":"")+m+"'>"+displayhours+":"+((m<10)?"0":"")+m+tt+"</div>");if(!v){$md.css("float","left");if(settings.minutedivisions>6&&counter==settings.minutedivisions/2+1){$mc.append("<div style='clear:left' />")}}$mc.append($md);binder($md);counter++}}function set_tt(realhours){if(!settings.military){return(realhours>=12)?" PM":" AM"}else{return""}}function putcontainer(){if(e.type!="focus"){$hourcont[0].style.left=e.pageX-5+"px";$hourcont[0].style.top=e.pageY-(Math.floor($hourcont.height()/2))+"px";rectify($hourcont)}else{$self.after($hourcont)}$hourcont.slideDown("fast");if(settings.useBgiframe){bgi($hourcont)}}function rectify($obj){var ph=document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight;var pw=document.documentElement.clientWidth?document.documentElement.clientWidth:document.body.clientWidth;var t=parseInt($obj[0].style.top);var l=parseInt($obj[0].style.left);var st=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;if(t<=st&&!$obj.is("#CP_minutecont")){$obj.css("top",st+10+"px")}else{if(t+$obj.height()-st>ph){$obj.css("top",st+ph-$obj.height()-10+"px")}}if(l<=0){$obj.css("left","10px")}}function bgi(ob){if(typeof jQuery.fn.bgIframe=="function"){ob.bgIframe()}else{alert("bgIframe plugin not loaded.")}}function binder($obj){if($obj.attr("id")=="CP_hourcont"){$obj.mouseout(function(e){hourcont_out(e)})}else{if($obj.attr("id")=="CP_minutecont"){$obj.mouseout(function(e){minutecont_out(e)})}else{if($obj.attr("class")=="CP_hour"){$obj.mouseover(function(e){hourdiv_over($obj,e)});$obj.mouseout(function(){hourdiv_out($obj)});$obj.click(function(){hourdiv_click($obj)})}else{if($obj.attr("class")=="CP_minute"){$obj.mouseover(function(){minutediv_over($obj)});$obj.mouseout(function(){minutediv_out($obj)});$obj.click(function(){minutediv_click($obj)})}}}}}function hourcont_out(e){try{var t=(e.toElement)?e.toElement:e.relatedTarget;if(!(jQuery(t).is("div[class^=CP], iframe"))){cleardivs()}}catch(e){cleardivs()}}function minutecont_out(e){try{var t=(e.toElement)?e.toElement:e.relatedTarget;if(!(jQuery(t).is("div[class^=CP], iframe"))){cleardivs()}}catch(e){cleardivs()}}function hourdiv_over($obj,e){var h=$obj.attr("id").split("_")[1],i=$obj.attr("id").split("_")[2],l,t,nn;$obj.addClass("CP_over");nn=Math.ceil((Math.floor(h/12)-Math.floor(settings.starthour/12))/2);if(settings.showminutes=="true"){$mc.hide();renderminutes(h);if(v){t=e.type=="mouseover"?e.pageY-15:$hourcont.offset().top+2+($obj.height()*i);l=$hourcont.offset().left+$hourcol[0].width()*2*nn+$mc.width()*(nn-1)+4*nn-2}else{l=(e.type=="mouseover")?e.pageX-10:$hourcont.offset().left+($obj.width()-5)*i;t=$hourcont.offset().top+($hourcont.height()-($mc.height()+2)*(Math.ceil($hourcol.length/2)-1))/$hourcol.length*2*nn+$mc.height()*(nn-1)+2*nn-1}$mc.css("left",l+"px").css("top",t+"px");rectify($mc);$mc.show();if(settings.useBgiframe){bgi($mc)}}return false}function hourdiv_out($obj){$obj.removeClass("CP_over");return false}function hourdiv_click($obj){var h=$obj.attr("id").split("_")[1],tt=set_tt(h),str=$obj.attr("value");if(str.indexOf(" ")!=-1){var cleanstr=str.substring(0,str.indexOf(" "))}else{var cleanstr=str}$obj.text(cleanstr+"00"+settings.second);setval($obj);cleardivs()}function minutediv_over($obj){$obj.addClass("CP_over");return false}function minutediv_out($obj){$obj.removeClass("CP_over");return false}function minutediv_click($obj){$obj.text($obj.attr("value")+settings.second);setval($obj);cleardivs()}function setval($obj){if(!settings.valuefield){self.value=$obj.text()}else{jQuery("input[name="+settings.valuefield+"]").val($obj.text()).change()}callback.apply($self,[$obj.text()]);$self.unbind("keydown",keyhandler)}function cleardivs(){if(settings.showminutes=="true"){$mc.hide()}$hourcont.slideUp("fast");$self.unbind("keydown",keyhandler)}function keyhandler(e){var $obj=$("div.CP_over").size()?$("div.CP_over"):$("div.CP_hour:first"),divtype=$obj.is(".CP_hour")?"hour":"minute",hi=(divtype=="hour")?$obj[0].id.split("_")[2]:0,h=(divtype=="minute")?$obj[0].id.split("_")[0]:$obj[0].id.split("_")[1];if(divtype=="minute"){if((Math.floor(h/12)-Math.floor(settings.starthour/12))==0){var curloc="m1"}else{if((Math.floor(h/12)-Math.floor(settings.endhour/12))==0&&(Math.floor(h/12)-Math.floor(settings.starthour/12))%2!=0){var curloc="m2"}else{var curloc="m3"}}}else{if((Math.floor(h/12)-Math.floor(settings.starthour/12))%2==0){var curloc="h1"}else{var curloc="h2"}}function divprev($obj){if($obj.prev().size()){eval(divtype+"div_out($obj)");eval(divtype+"div_over($obj.prev(), e)")}else{return false}}function divnext($obj){if($obj.next().size()){eval(divtype+"div_out($obj)");eval(divtype+"div_over($obj.next(), e)")}else{return false}}function hourtohour($obj){if((Math.floor(h/12)-Math.floor(settings.starthour/12))%2==0){var next=String((Math.floor(h/12)-Math.floor(settings.starthour/12))+1)}else{var next=String((Math.floor(h/12)-Math.floor(settings.starthour/12))-1)}var ctx="#hourcol"+next;$newobj=jQuery(".CP_hour[id$=_"+hi+"]",ctx);if($newobj.size()){hourdiv_out($obj);hourdiv_over($newobj,e)}else{return false}}function hourtominute($obj){hourdiv_out($obj);minutediv_over($(".CP_minute:first"))}function minutetohour($obj,where){minutediv_out($obj);if(where<0){if((Math.floor(h/12)-Math.floor(settings.starthour/12))%2==0){var next=String((Math.floor(h/12)-Math.floor(settings.starthour/12))+where);h=String(Number(h)-12)}else{var next=String((Math.floor(h/12)-Math.floor(settings.starthour/12)))}}else{if((Math.floor(h/12)-Math.floor(settings.starthour/12))%2==0){var next=String((Math.floor(h/12)-Math.floor(settings.starthour/12)))}else{var next=String((Math.floor(h/12)-Math.floor(settings.starthour/12))+where);h=String(Number(h)+12)}}var ctx="#hourcol"+next;var $newobj=jQuery(".CP_hour[id^=hr_"+h+"]",ctx);hourdiv_over($newobj,e)}switch(e.keyCode){case 37:if(v){switch(curloc){case"m1":return false;break;case"m2":minutetohour($obj,-1);break;case"m3":minutetohour($obj,-1);break;case"h1":hourtominute($obj);break;case"h2":hourtohour($obj);break}}else{divprev($obj)}break;case 38:if(v){divprev($obj)}else{switch(curloc){case"m1":return false;break;case"m2":minutetohour($obj,-1);break;case"m3":minutetohour($obj,-1);break;case"h1":hourtominute($obj);break;case"h2":hourtohour($obj);break}}break;case 39:if(v){switch(curloc){case"m1":minutetohour($obj,1);break;case"m2":return false;break;case"m3":minutetohour($obj,1);break;case"h1":hourtohour($obj);break;case"h2":hourtominute($obj);break}}else{divnext($obj)}break;case 40:if(v){divnext($obj)}else{switch(curloc){case"m1":minutetohour($obj,1);break;case"m2":return false;break;case"m3":minutetohour($obj,1);break;case"h1":hourtohour($obj);break;case"h2":hourtominute($obj);break}}break;case 13:eval(divtype+"div_click($obj)");break;default:return true}return false}return false});function errorcheck(settings){if(settings.starthour>=settings.endhour){alert("Error - start hour must be less than end hour.");return false}else{if(60%settings.minutedivisions!=0){alert("Error - param minutedivisions must divide evenly into 60.");return false}}}return this};$(function(){if($.fn.ogClockpicker){$(document).ready(function(){$(".clockpick").ogClockpicker()})}});function likeComp(c){var b=c.substring(6);var d=$("#"+c).attr("aimaiType");var a=$("#"+b).val();a=a.replace(/^%+|%+$/g,"");if(a!=""){switch(d){case"1":a=a+"%";break;case"2":a="%"+a;break;case"3":a="%"+a+"%";break}}$("#"+b).val(a)}$(function(){$("form").submit(function(){$("[id^='AIMAI_']").each(function(){likeComp(this.id)})})});$.fn.aimaiPickerOg=function(a){var c={texts:[" V "," V*","*V ","*V*"],titls:["完全一致","前方一致","後方一致","前後曖昧"]};var b=$.extend(c,a);return this.each(function(){var g=$(this);var j="PIC_"+g.attr("id").replace(/-/g,"")+"_";var l="";for(var f=0;f<b.texts.length;f++){var m=b.texts[f];var k=b.titls[f];l+='<span id="'+j+"text-"+f+'" class="text-box"" title="'+k+'">('+m+") </span>"}var h=$('<div id="'+j+'aimai-picker" class="aimai-picker" style="position: absolute; left: 0px; top: 0px;">'+l+'<div style="clear: both;"></div></div>');$("body").append(h);h.hide();h.find("span.text-box").click(function(){var i=this.id.substr(this.id.indexOf("-")+1);g.attr("aimaiType",i);g.attr("title",b.titls[i]);g.text(b.texts[i]);g.blur();d(h)});$("body").live("click",function(){d(h)});h.click(function(i){i.stopPropagation()});var e=function(i){var p=g.offset();var o=p.left+g.outerWidth()-i.outerWidth();if(o<p.left){o=p.left}i.css({left:o,top:(p.top+g.outerHeight())});n(i)};g.click(function(i){i.stopPropagation();if(!g.is("input")){e(h)}});g.focus(function(){e(h)});function d(i){if(b.hideEffect=="fade"){i.fadeOut()}else{if(b.hideEffect=="slide"){i.slideUp()}else{i.hide()}}}function n(i){if(b.showEffect=="fade"){i.fadeIn()}else{if(b.showEffect=="slide"){i.slideDown()}else{i.show()}}}})};$(function(){if($.fn.aimaiPickerOg){$(".aimaiClm").aimaiPickerOg()}});(function(){$.fn.glDatePicker=function(options){var pluginName="glDatePicker";var instance=this.data(pluginName);if(!instance){return this.each(function(){return $(this).data(pluginName,new glDatePicker(this,options))})}return(options===true)?instance:this};$.fn.glDatePicker.defaults={cssName:"default",zIndex:1000,borderSize:1,calendarOffset:{x:0,y:1},showAlways:false,hideOnClick:true,allowMonthSelect:true,allowYearSelect:true,todayDate:new Date(),selectedDate:null,prevArrow:"\u25c4",nextArrow:"\u25ba",selectableDates:null,selectableDateRange:null,specialDates:null,selectableMonths:null,selectableYears:null,selectableDOW:null,monthNames:null,dowNames:null,dowOffset:(HYBS_CAL_START_MON==true?1:0),onClick:(function(el,cell,date,data){var tgt=el;if(el[0].tagName.toUpperCase()!="INPUT"){var _targetId=el.attr("targetId");if(_targetId!=null){tgt=$("#"+_targetId)}}var year=date.getFullYear();var month=date.getMonth()+1;var day=date.getDate();if(month<10){month="0"+month}if(day<10){day="0"+day}var oldval=tgt.val();var str=year+""+month+""+day;tgt.val(str);if(oldval!=str){tgt.change()}}),onHover:function(el,cell,date,data){},onShow:function(calendar){calendar.show()},onHide:function(calendar){calendar.hide()},firstDate:null};var glDatePicker=(function(){function glDatePicker(element,userOptions){var self=this;self.el=$(element);var el=self.el;self.options=$.extend(true,{},$.fn.glDatePicker.defaults,userOptions);var options=self.options;var _tgt=el;if(el[0].tagName.toUpperCase()!="INPUT"){if(el.attr("targetId")){_tgt=$("#"+el.attr("targetId"))}}var _inputDate=_tgt.val();if(_inputDate!=null&&_inputDate.length>=8){_inputDate=_inputDate.replace(/\u002f/g,"");try{_inputDate=_inputDate.substr(0,4)+"/"+_inputDate.substr(4,2)+"/"+_inputDate.substr(6,2)}catch(e){_inputDate=null}}else{_inputDate=null}self.calendar=$($.find("[gldp-el="+el.attr("gldp-id")+" ]"));options.selectedDate=(options.selectedDate||new Date(_inputDate||options.todayDate))||options.todayDate;options.firstDate=(new Date((options.firstDate||options.selectedDate)))._first();if(!(el.attr("gldp-id")||"").length){el.attr("gldp-id","gldp-"+Math.round(Math.random()*10000000000))}el.addClass("gldp-el").bind("click",function(e){self.show(e)});if(self.calendar.length&&!options.showAlways){self.calendar.hide()}$(document).bind("mouseup",function(e){var target=e.target;var calendar=self.calendar;if(!el.is(target)&&!calendar.is(target)&&calendar.has(target).length===0&&calendar.is(":visible")){self.hide()}})}glDatePicker.prototype={show:function(){this.render();$.each($(".gldp-el").not(this.el),function(i,o){if(o.length){o.options.onHide(o.calendar)}});this.options.onShow(this.calendar)},hide:function(){if(this.options&&!this.options.showAlways){this.options.onHide(this.calendar)}},render:function(renderCalback){var self=this;var el=self.el;var options=self.options;var calendar=self.calendar;var coreClass=" core border ";var cssName="gldp-"+options.cssName;var todayVal=options.todayDate._val();var todayTime=todayVal.time;var maxRow=6;var maxCol=7;var borderSize=options.borderSize+"px";var getSelectableList=function(min,max,userList){var resultList=[];for(var i=min;i<=max;i++){resultList.push(i)}if(userList){var newList=[];$.each(userList,function(i,v){if(v>=min&&v<=max&&newList._indexOf(v)<0){newList.push(v)}});resultList=newList.length?newList:resultList}resultList.sort();return resultList};var selectableMonths=getSelectableList(0,11,options.selectableMonths);var selectableYears=getSelectableList(todayVal.year-5,todayVal.year+5,options.selectableYears);var selectableDOW=getSelectableList(0,6,options.selectableDOW);var dowNames=options.dowNames||["日","月","火","水","木","金","土"];var monthNames=options.monthNames||["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"];var containerSize=window.innerHeight?window.innerHeight:180;if(containerSize<180){containerSize=(containerSize>135?containerSize:135)}else{containerSize=180}var containerWidth=options.conainerWidth||containerSize;var containerHeight=containerWidth;var getCellSize=function(_size,_count){return(_size/_count)+((options.borderSize/_count)*(_count-1))-1};var cellWidth=getCellSize(containerWidth,maxCol);var cellHeight=getCellSize(containerHeight,maxRow+2);if(!calendar.length){self.calendar=calendar=$("<div/>").attr("gldp-el",el.attr("gldp-id")).data("is",true).css({display:(options.showAlways?undefined:"none"),zIndex:options.zIndex,width:((cellWidth+1)*maxCol)+"px"});$("body").append(calendar)}else{if(!eval(calendar.data("is"))){containerWidth=calendar.outerWidth();containerHeight=calendar.outerHeight();cellWidth=getCellSize(containerWidth,maxCol);cellHeight=getCellSize(containerHeight,maxRow+2)}self.calendar.css({width:((cellWidth+1)*maxCol)+"px"})}if(!el.is(":visible")){calendar.hide()}calendar.removeClass().addClass(cssName).children().remove();var onResize=function(){var elPos=el.offset();calPosTop=(elPos.top+el.outerHeight()+options.calendarOffset.y)-20;calPosLeft=(elPos.left+options.calendarOffset.x);if(calPosTop>$(window).height()-150){calPosTop-=130}if(calPosLeft>$(window).width()-150){calPosLeft-=150}if(calPosTop<0){calPosTop=0}if(calPosLeft<0){calPosLeft=0}calendar.css({top:calPosTop+"px",left:calPosLeft+"px"})};$(window).resize(onResize);onResize();var cellCSS={width:cellWidth+"px",height:cellHeight+"px",lineHeight:cellHeight+"px"};var setFirstDate=function(_date){if(_date){options.firstDate=_date;self.render()}};var getFirstDate=function(_offset){var _date=new Date(options.firstDate);_offset=_offset||0;while(true){_date.setMonth(_date.getMonth()+_offset);_date.setDate(Math.min(1,_date._max()));if(_offset==0){break}var dateVal=_date._val();var dateMonth=dateVal.month;var dateYear=dateVal.year;if(selectableMonths._indexOf(dateMonth)!=-1){if(selectableYears._indexOf(dateYear)!=-1){break}else{if(dateYear<selectableYears[0]||dateYear>selectableYears[selectableYears.length-1]){return null}}}}return _date};var prevFirstDate=getFirstDate(-1);var nextFirstDate=getFirstDate(1);var firstDate=(options.firstDate=getFirstDate());var firstDateVal=firstDate._val();var firstDateMonth=firstDateVal.month;var firstDateYear=firstDateVal.year;var startDate=new Date(firstDate);var dowOffset=Math.abs(Math.min(6,Math.max(0,options.dowOffset)));var startOffset=startDate.getDay()-dowOffset;startOffset=startOffset<1?-7-startOffset:-startOffset;dowNames=(dowNames.concat(dowNames)).slice(dowOffset,dowOffset+7);startDate._add(startOffset);var showPrev=(prevFirstDate);var showNext=(nextFirstDate);var monyearClass=coreClass+"monyear ";var prevCell=$("<div/>").addClass(monyearClass).css($.extend({},cellCSS,{borderWidth:borderSize+" 0 0 "+borderSize})).append($("<a/>").addClass("prev-arrow"+(showPrev?"":"-off")).html(options.prevArrow)).mousedown(function(){return false}).click(function(e){if(options.prevArrow!=""&&showPrev){e.stopPropagation();setFirstDate(prevFirstDate)}});var titleCellCount=maxCol-2;var titleWidth=(cellWidth*titleCellCount)-(titleCellCount*options.borderSize)+(options.borderSize);var titleCell=$("<div/>").addClass(monyearClass+"title").css($.extend({},cellCSS,{width:titleWidth+"px",borderTopWidth:borderSize,marginLeft:"-"+(borderSize)}));var nextCell=$("<div/>").addClass(monyearClass).css($.extend({},cellCSS,{marginLeft:"-"+(borderSize),borderWidth:borderSize+" "+borderSize+" 0 0"})).append($("<a/>").addClass("next-arrow"+(showNext?"":"-off")).html(options.nextArrow)).mousedown(function(){return false}).click(function(e){if(options.nextArrow!=""&&showNext){e.stopPropagation();setFirstDate(nextFirstDate)}});calendar.append(prevCell).append(titleCell).append(nextCell);for(var row=0,cellIndex=0;row<maxRow+1;row++){for(var col=0;col<maxCol;col++,cellIndex++){var cellDate=new Date(startDate);var cellClass="day";var cellZIndex=options.zIndex+(cellIndex);var cell=$("<div/>");if(!row){cellClass="dow";cell.html(dowNames[col]);cellDate=null}else{cellDate._add(col+((row-1)*maxCol));var cellDateVal=cellDate._val();var cellDateTime=cellDateVal.time;var specialData=null;var isSelectable=true;var getRepeatDate=function(v,date){if(v.repeatYear===true){date.setYear(cellDateVal.year)}if(v.repeatMonth===true){date.setMonth(cellDateVal.month)}return date._val()};cell.html(cellDateVal.date);if(options.selectableDateRange){isSelectable=false;$.each(options.selectableDateRange,function(i,v){var dateFrom=v.from;var dateTo=(v.to||null);dateTo=dateTo||new Date(v.from.getFullYear(),v.from.getMonth(),v.from._max());dateFrom=getRepeatDate(v,dateFrom);dateTo=getRepeatDate(v,dateTo);if(cellDateTime>=dateFrom.time&&cellDateTime<=dateTo.time){isSelectable=true;return true}})}if(options.selectableDates){if((options.selectableDateRange&&!isSelectable)||(isSelectable&&!options.selectableDateRange)){isSelectable=false}$.each(options.selectableDates,function(i,v){var vDate=getRepeatDate(v,v.date);if(vDate.time==cellDateTime){return(isSelectable=true)}})}if(!isSelectable||selectableYears._indexOf(cellDateVal.year)<0||selectableMonths._indexOf(cellDateVal.month)<0||selectableDOW._indexOf(cellDateVal.day)<0){cellClass="noday"}else{cellClass=(["sun","mon","tue","wed","thu","fri","sat"])[cellDateVal.day];if(firstDateMonth!=cellDateVal.month){cellClass+=" outday"}if(todayTime==cellDateTime){cellClass="today";cellZIndex+=50}if(options.selectedDate._time()==cellDateTime){cellClass="selected";cellZIndex+=51}if(options.specialDates){$.each(options.specialDates,function(i,v){var vDate=getRepeatDate(v,v.date);if(vDate.time==cellDateTime){cellClass=(v.cssClass||"special");cellZIndex+=52;specialData=v.data}})}cell.mousedown(function(){return false}).hover(function(e){e.stopPropagation();var hoverData=$(this).data("data");options.onHover(el,cell,hoverData.date,hoverData.data)}).click(function(e){e.stopPropagation();var clickedData=$(this).data("data");options.selectedDate=options.firstDate=clickedData.date;self.render(function(){if(!options.showAlways&&options.hideOnClick){self.hide()}});options.onClick(el,$(this),clickedData.date,clickedData.data)})}}$.extend(cellCSS,{borderTopWidth:borderSize,borderBottomWidth:borderSize,borderLeftWidth:(row>0||(!row&&!col))?borderSize:0,borderRightWidth:(row>0||(!row&&col==6))?borderSize:0,marginLeft:(col>0)?"-"+(borderSize):0,marginTop:(row>0)?"-"+(borderSize):0,zIndex:cellZIndex});cell.data("data",{date:cellDate,data:specialData}).addClass(coreClass+cellClass).css(cellCSS);calendar.append(cell)}}var toggleYearMonthSelect=function(showYear){var show="inline-block";var hide="none";if(options.allowMonthSelect){monthText.css({display:!showYear?hide:show});monthSelect.css({display:!showYear?show:hide})}if(options.allowYearSelect){yearText.css({display:showYear?hide:show});yearSelect.css({display:showYear?show:hide})}};var onYearMonthSelect=function(){options.firstDate=new Date(yearSelect.val(),monthSelect.val(),1);self.render()};var monthSelect=$("<select/>").hide().change(onYearMonthSelect);var yearSelect=$("<select/>").hide().change(onYearMonthSelect);var monthText=$("<span/>").html(monthNames[firstDateMonth]).mousedown(function(){return false}).click(function(e){e.stopPropagation();toggleYearMonthSelect(false)});var yearText=$("<span/>").html(firstDateYear).mousedown(function(){return false}).click(function(e){e.stopPropagation();toggleYearMonthSelect(true)});$.each(monthNames,function(i,v){if(options.allowMonthSelect&&selectableMonths._indexOf(i)!=-1){var o=$("<option/>").html(v).attr("value",i);if(i==firstDateMonth){o.attr("selected","selected")}monthSelect.append(o)}});$.each(selectableYears,function(i,v){if(options.allowYearSelect){var o=$("<option/>").html(v).attr("value",v);if(v==firstDateYear){o.attr("selected","selected")}yearSelect.append(o)}});var titleYearMonth=$("<div/>").append(monthText).append(monthSelect).append(yearText).append(yearSelect);titleCell.children().remove();titleCell.append(titleYearMonth);renderCalback=renderCalback||(function(){});renderCalback();var mousewheelevent="onwheel" in document?"wheel":"onmousewheel" in document?"mousewheel":"DOMMouseScroll";calendar.bind(mousewheelevent,function(e){e.preventDefault();var delta=e.originalEvent.deltaY?-(e.originalEvent.deltaY):e.originalEvent.wheelDelta?e.originalEvent.wheelDelta:-(e.originalEvent.detail);if(delta<0){nextCell.click()}else{prevCell.click()}})}};return glDatePicker})();(function(){Date.prototype._clear=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};Date.prototype._time=function(){return this._clear().getTime()};Date.prototype._max=function(){var isLeapYear=(new Date(this.getYear(),1,29).getMonth()==1)?1:0;var days=[31,28+isLeapYear,31,30,31,30,31,31,30,31,30,31];return days[this.getMonth()]};Date.prototype._add=function(days){this.setDate(this.getDate()+days)};Date.prototype._first=function(){var date=new Date(this);date.setDate(1);return date};Date.prototype._val=function(){this._clear();return{year:this.getFullYear(),month:this.getMonth(),date:this.getDate(),time:this.getTime(),day:this.getDay()}};Array.prototype._indexOf=function(value){return $.inArray(value,this)}})()})();$(function(){if($.fn.glDatePicker){$(".calPic").glDatePicker()}});function selectScroll(a){var d=4;if(a.getAttribute("size")){d=a.getAttribute("size")}var e=a.options;for(var c=0;c<e.length;c++){if(e[c].selected){if(e[c].parentNode.tagName.toUpperCase()=="OPTGROUP"){c+=$(e[c].parentNode).prev().length}var b=c*($(a).height()/d);break}}$(a).scrollTop(b)}$(function(){$("select[multiple]").each(function(){selectScroll(this)})});
\ No newline at end of file
--- trunk/opengionV5/uap/webapps/gf/doc/RELEASE-NOTES.txt (revision 1532)
+++ trunk/opengionV5/uap/webapps/gf/doc/RELEASE-NOTES.txt (revision 1533)
@@ -1,4 +1,11 @@
1-5.9.28.0 (2018/01/05)
1+5.9.28.1 (2018/01/19)
2+ [eventColumn機能]
3+ eventColumn実行時にデータを取得する対象オブジェクトが存在しない場合、今まではエラーで停止していた。
4+ 存在しない場合はコンソールログに出力し、そのまま処理を続行させるようにする。
5+ jsp/common/eventScript.js#eventColumn( jEvCol, jTag, cid, cname, suffix, writable )
6+
7+
8+5.9.28.0 (2018/01/05)
29 [HTML5ポップアップ修正]
310 ・IE11でのキャレット位置取得がエラーとなっていたため、対応を行います。
411 ・画面にスクロールがある場合の表示を修正するためCSSのpositionを一部fixedに変更します。
--- trunk/opengionV5/uap/webapps/gf/src/script/common/eventScript.js (revision 1532)
+++ trunk/opengionV5/uap/webapps/gf/src/script/common/eventScript.js (revision 1533)
@@ -218,6 +218,7 @@
218218 * @og.rev 5.6.2.0 (2013/03/01) jQueryのval()がリセット後のプルダウンから取得できないのでvlaueで取る
219219 * @og.rev 5.6.4.2 (2013/05/17) エラー表示の alertメッセージに、発生元が分かるように、 cname を追加します。
220220 * @og.rev 5.9.4.6 (2016/01/29) multiple対応
221+ * @og.rev 5.9.28.1 (2018/01/19) {@xxx}が存在しない場合でも処理が流れるように対応
221222 *
222223 * @param jEvCol イベントが発生した親カラムのjQueryオブジェクト
223224 * @param jTag 置き換え要素をラップしたspanタグのjQueryオブジェクト
@@ -262,8 +263,9 @@
262263 }
263264
264265 // SQL文をパースして{@xxx}をxxxのvalue値に変更する。一覧での利用では同一行のカラムになる。
265- //(リクエスト変数はテキストボックスで一度受ける必要がある)
266+ //(リクエスト変数はテキストボックスやhiddenで一度受ける必要がある)
266267 // 又、パースして得られたvalue値をJSPのリクエスト変数としてURLの後ろに付ける
268+ // 5.9.28.1 なお、存在しない場合はnullで返すようにする。
267269 param = "";
268270 try { param = ( writable ? eval( "EC_" + cname + "_EDITPARAM" ) : eval( "EC_" + cname + "_RENDPARAM" ) ); } catch( e ) {}
269271 if( param != null && param != "" ) {
@@ -276,7 +278,10 @@
276278 if( _clm.indexOf(".") < 0 ) {
277279 _repClm = "{@"+_clm+"}";
278280 // _rep = suffix == "" ? $('#'+_clm).val() : $('#'+_clm+suffix).val();
279- _rep = suffix == "" ? $('#'+_clm).get(0).value : $('#'+_clm+suffix).get(0).value; // 2013/03/01
281+// _rep = suffix == "" ? $('#'+_clm).get(0).value : $('#'+_clm+suffix).get(0).value; // 2013/03/01
282+ var rtnNull = function(){ console.log("noDifined:"); console.log(arguments[0]); return null; };
283+ _rep = suffix == "" ? $('#'+_clm)[0] ? $('#'+_clm).get(0).value : rtnNull(_clm)
284+ : $('#'+_clm+suffix)[0] ? $('#'+_clm+suffix).get(0).value : rtnNull(_clm+suffix); // 5.9.28.1 (2018/01/19)
280285 _rep = ( _rep == null ? "" : _rep );
281286 param = param.replace(_repClm,_rep);
282287 url += _clm + "=" + encodeURIComponent(_rep) +"&";
--- trunk/opengionV5/uap/webapps/gf/jsp/common/eventScript.js (revision 1532)
+++ trunk/opengionV5/uap/webapps/gf/jsp/common/eventScript.js (revision 1533)
@@ -1 +1 @@
1-var orgFldCls=null;$(function(){if(USE_FOCUS_HILIGHT){setEvent('textarea,select,input[type="text"]',"focusin",function(){doFocus2(this)});setEvent('textarea,select,input[type="text"]',"focusout",function(){doBlur2(this)})}});function doFocus2(a){if(a!=null){if(a.className==null||a.className.indexOf("must")<0){if(a.tagName=="SELECT"){a.orgBgColor=a.style.backgroundColor;a.style.backgroundColor="#ffcccc"}else{orgFldCls=a.className;a.className="focusField "+orgFldCls}}}}function doBlur2(a){if(a!=null){if(a.className==null||a.className.indexOf("must")<0){if(a.tagName=="SELECT"){a.style.backgroundColor=a.orgBgColor}else{if(orgFldCls!=null){a.className=orgFldCls}else{a.className="notFocusField"}}}}}oldDoFocusFlag=true;function doFocus(a){if(oldDoFocusFlag){oldDoFocusFlag=false;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(a){}$(function(){setEvent('textarea,select,input[type="text"]',"focusout",function(){convert(this)})});function convert(b){var c,a;c=b.value;a=b.className;if(c!=null&&a!=null){if(a.match(/XL/)&&!(a.match(/XLU/))){b.value=c.toLowerCase()}else{if((a.match(/XU/)&&!(a.match(/XUL/)))||a.match(/PN2/)){b.value=c.toUpperCase()}}}return true}var colMap;var notFireCols;var jH_evElm;$(function(){if(!(typeof(EC_NAME)=="undefined")){jH_evElm=$(".h_evElm");makeColMapping();setEvent('textarea,select,input[type="text"]',"change",function(){makeColumn(this)},".h_evCol",true,addEvColCls);setEvent("input[type=checkbox],input[type=radio]","click",function(){makeColumn(this)},".h_evCol",true)}});function makeColMapping(){var b,a,e,d,c;if(colMap){return}colMap=new Object();for(b=0;b<EC_EVCOL.length;b++){e=EC_EVCOL[b].split(",");for(a=0;a<e.length;a++){d=e[a];if(d.charAt(0)=="_"){d=d.substring(1);if(notFireCols){notFireCols+=","}notFireCols+=d}c=colMap[d];if(!c){c=new Array()}c[c.length]=EC_NAME[b];colMap[d]=c}}}function addEvColCls(){for(var a in colMap){$("#"+a+",[id^="+a+"__]").addClass("h_evCol")}}function makeColumn(e){var k,l,g,j,b,h,d,c,a,f;if(jH_evElm&&isEndInitEvent()){jH_evElm=null}k=$(e);l=k.attr("id");g=l.split("__")[0];j=colMap[g];if(!j){return}if(!isEndInitEvent()&&notFireCols&&notFireCols.indexOf(g)>=0){return}for(b=0;b<j.length;b++){h=(l==g?"":"__"+l.split("__")[1]);d=j[b]+h;c=d.split("__")[0];a=isEndInitEvent()?$(".h_evElm[h_evCid="+d+"]"):jH_evElm.filter("[h_evCid="+d+"]");f=a.attr("h_evWrtbl");eventColumn(k,a,d,c,h,f)}}function eventColumn(jEvCol,jTag,cid,cname,suffix,writable){var evVal,url,param,_pos1,_pos2,_repClm,_rep,_clm,noVal,columnFocus,jCol,val,renderer,editor,ATTRS,optAttrs,i,optAtt,vtype,isAdd;var callback;if(!jTag||jTag.length==0){alert("[SYSTEM_ERROR] : jTag is null. The element of the replacement object doesn't exist. ["+cname+"]");return}if(!isEndInitEvent()){evVal=jEvCol.get(0).value;if(!evVal||evVal==null||evVal==""){return}}try{url=eval("EC_"+cname+"_URL")}catch(e){alert("[SYSTEM_ERROR] : URL that processes the event is not specified. (variable undefinition). ["+cname+"]");return}if(!url||url==""){alert("[SYSTEM_ERROR] : URL that processes the event is not specified. ["+cname+"]");return}param="";try{param=(writable?eval("EC_"+cname+"_EDITPARAM"):eval("EC_"+cname+"_RENDPARAM"))}catch(e){}if(param!=null&&param!=""){url+="?";_pos1=0;_pos2=0;while((_pos1=param.indexOf("{@",_pos2))!=-1){_pos2=param.indexOf("}",_pos1);_clm=param.substring(_pos1+2,_pos2);if(_clm.indexOf(".")<0){_repClm="{@"+_clm+"}";_rep=suffix==""?$("#"+_clm).get(0).value:$("#"+_clm+suffix).get(0).value;_rep=(_rep==null?"":_rep);param=param.replace(_repClm,_rep);url+=_clm+"="+encodeURIComponent(_rep)+"&"}_pos2=_pos1+1}}noVal=function(){_firstOption=jCol.children("option").get(0);if(_firstOption==null||_firstOption.value!=""){return false}return true};columnFocus=function(){jCol.attr("isfocus","true")};if(cid!=null&&cid!=""){jCol=jTag.find("#"+cid)}else{jCol=new Array(0)}if(jCol.length>0&&isEndInitEvent()){jCol.bind("focus",columnFocus)}val="";if(jCol.length>0){if(isEndInitEvent()){val=(jCol.val()==null?"":jCol.val())}else{val=(jTag.attr("h_evVal")==null?"":jTag.attr("h_evVal"))}}renderer="";try{renderer=eval("EC_"+cname+"_RENDERER")}catch(e){}editor="";try{editor=eval("EC_"+cname+"_EDITOR")}catch(e){}ATTRS=["title","style","tabindex","readonly","disabled","onClick","onChange","onBlur","onFocus","ondblClick","onMouseDown","onMouseUp","onMouseMove","onMouseOut","onMouseOver","onSelect","onKeydown","onKeypress","onKeyup","eventCallBack","multiple"];optAttrs="";if(jCol.length>0){for(i=0;i<ATTRS.length;i++){optAtt=jCol.attr(ATTRS[i]);if(optAtt!=null){vtype=typeof(optAtt);isAdd=false;if(vtype=="function"){optAtt=optAtt.toString();isAdd=optAtt.length>0?true:false;optAtt="("+optAtt+")()"}else{if(vtype=="boolean"){isAdd=optAtt}else{isAdd=optAtt.length>0?true:false}}if(isAdd){optAttrs+=ATTRS[i]+"='"+optAtt+"' "}}}}$.ajax({url:url,data:{EC_CID:(cid==null?"":cid),EC_CNAME:(cname==null?"":cname),EC_RENDERER:renderer,EC_EDITOR:editor,EC_PARAM:param,EC_SQL:param,EC_WRITABLE:(writable==null?"":writable),EC_CVALUE:val,EC_NOVALUE:(jCol.length==0?"":noVal()),EC_CLASS:(jCol.length==0?"":jCol.attr("class")),EC_SIZE:(jCol.length==0?"":jCol.attr("size")),EC_MAXLENGTH:(jCol.length==0?"":jCol.attr("maxlength")),EC_OPTATTRS:optAttrs,EC_PNAME:jEvCol.attr("id")==null?"":jEvCol.attr("id").split("__")[0],EC_PVALUE:jEvCol.get(0).value==null?"":jEvCol.get(0).value,EC_USESLBL:(suffix==null||suffix=="")?"false":"true"},type:"POST",dataType:"html",async:isEndInitEvent(),error:function(r,s,e){if(url.indexOf(".htm")<0){alert("EventColumnError:"+r+":"+s+":"+e+":"+cname)}},success:function(data,status){var jNewCol=$(data);if(jCol.length>0){if(isEndInitEvent()){jCol.unbind("focus",columnFocus)}bindOldEvents(jNewCol.get(0),jQuery.data(jCol.clone(true).get(0),"events"))}jTag.empty().append(jNewCol);if(jCol.length>0){jTag.find("input,select,textarea").attr("name",cid).attr("id",cid);if(isEndInitEvent()){if(jCol.attr("isfocus")){jNewCol.get(0).focus();if($.browser.msie){jNewCol.get(0).focus()}}}if(!isEndInitEvent()){jNewCol.change()}if(jCol.attr("eventCallback")){callback=function(){eval(jCol.attr("eventCallback")+"(arguments);")};callback(cid,jNewCol.val(),jCol.get(0).value)}}if(suffix!=null&&suffix!=""){if(isEndInitEvent()){$("table#viewTable").resizeView()}}}})}function bindOldEvents(d,a){var c,b;for(c in a){for(b in a[c]){jQuery.event.add(d,c,a[c][b],a[c][b].data)}}}var isShowTip=false;$(function(){if(USE_REAL_TIME_CHECK){setEvent('textarea,select,input[type="text"]',"focusout",function(){var b=RegExp(/jsp/);var a=location.pathname.match(b);check(this,RegExp.leftContext+"jsp/common/realtimecheck.jsp")});$("table#viewTable").parent().parent().scroll(function(){if(isShowTip){isShowTip=false;$(".tipErr").remove()}})}});function check(f,b){var c,d,h,g,e,j,a,i;c=f.name;if(typeof jQuery!="undefined"&&c.indexOf("h_")!=0){d=f.value;if(f.rtOption!="null"&&f.rtOption!="undefined"){i=f.getAttribute("rtOption")}h=c.split("__");g=(2==h.length);e="command=RENEW&checkType="+(g?"ENTRY":"NEW")+(g?"&h_rowSel="+h[1]:"")+"&column="+h[0]+"&"+c+"="+encodeURIComponent(d)+(i?"&"+i:"");j={dataType:"html",type:"POST",url:b,data:e};j.error=function(){};j.success=function(k){a=$(f).data("tipId");$("#"+a).remove();if($.trim(k).indexOf("row_error")>=0){showCheckTip(f,k);isShowTip=true}};$.ajax(j)}return true}function showCheckTip(a,c){var j,i,k,g,e,h,f,d,b;j=$(a);i=j.offset();if(i.top>=30){e="<div class='tipErr'><div id='tipArrowBottom'></div><div>"+c+"</div></div>";h=$(e).appendTo(document.body);f=i.left;d=i.top+(-11-h[0].offsetHeight)}else{e="<div class='tipErr'><div id='tipArrowTop'></div><div>"+c+"</div></div>";h=$(e).appendTo(document.body);f=i.left;d=i.top+11+h[0].offsetHeight}b=(new Date()).getTime();$(a).data("tipId",b);h.css({left:f+"px",top:d+"px"}).attr("id",b).click(function(){$(this).remove()}).show()}$(function(){bindEvents()});$.fn.simpleColorPickerOg=function(a){var c={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"],showEffect:"",hideEffect:"",onChangeColor:false};var b=$.extend(c,a);return this.each(function(){var g=$(this);var l="";var j=g.attr("id").replace(/-/g,"")+"_";for(var f=0;f<b.colors.length;f++){var m=b.colors[f];var k="";if(f%b.colorsPerLine==0){k="clear: both; "}if(f>0&&k&&$.browser&&$.browser.msie&&$.browser.version<=7){k="";l+='<li style="float: none; clear: both; overflow: hidden; background-color: #fff; display: block; height: 1px; line-height: 1px; font-size: 1px; margin-bottom: -2px;"></li>'}l+='<li id="'+j+"color-"+f+'" class="color-box" style="'+k+"background-color: "+m+'" title="'+m+'"></li>'}k="clear: both; ";l+='<li id="'+j+'color-default" class="color-box" style="width:80px; text-align:center; '+k+'background-color:white;" title="clear">clear</li>';var h=$('<div id="'+j+'color-picker" class="color-picker" style="position: absolute; left: 0px; top: 0px;"><ul>'+l+'</ul><div style="clear: both;"></div></div>');$("body").append(h);h.hide();h.find("li.color-box").click(function(){var i=isNaN(this.id.substr(this.id.indexOf("-")+1))?"":b.colors[this.id.substr(this.id.indexOf("-")+1)];if(!g.is("input")){g.val(i);g.blur()}if($.isFunction(c.onChangeColor)){c.onChangeColor.call(g,i)}d(h)});$("body").live("click",function(){d(h)});h.click(function(i){i.stopPropagation()});var e=function(i){var p=g.offset();var o=p.left+g.outerWidth()-i.outerWidth();if(o<p.left){o=p.left}i.css({left:o,top:(p.top+g.outerHeight())});n(i)};g.click(function(i){g=$(this);i.stopPropagation();if(!g.is("input")){e(h)}});g.change(function(i){if(g.val()!=g.css("background-color")){g.css("background-color",g.val()).css("color",g.val())}});g.focus(function(){e(h)});function d(i){if(b.hideEffect=="fade"){i.fadeOut()}else{if(b.hideEffect=="slide"){i.slideUp()}else{i.hide()}}}function n(i){if(b.showEffect=="fade"){i.fadeIn()}else{if(b.showEffect=="slide"){i.slideDown()}else{i.show()}}}})};$(function(){if($.fn.simpleColorPickerOg){$("input.colorPicker").simpleColorPickerOg({onChangeColor:function(a){$(this).val(a).css("background-color",a).css("color",a).change()}})}});jQuery.fn.ogClockpicker=function(options,callback){var org_settings={starthour:6,endhour:20,showminutes:"true",minutedivisions:4,military:true,event:"click",layout:"vertical",valuefield:null,useBgiframe:false,hoursopacity:1,minutesopacity:1,second:""};if(options){jQuery.extend(org_settings,options)}var callback=callback||function(){},v=(org_settings.layout=="vertical");errorcheck(org_settings);jQuery(this)[org_settings.event](function(e){var self=this,$self=jQuery(this),$body=jQuery("body");var settings=jQuery.extend(true,{},org_settings);if($self.attr("valuefield")){settings.valuefield=$self.attr("valuefield")}if($self.attr("starthour")){settings.starthour=parseInt($self.attr("starthour"))}if($self.attr("endhour")){settings.endhour=parseInt($self.attr("endhour"))}if($self.attr("minutedivisions")){settings.minutedivisions=parseInt($self.attr("minutedivisions"))}if($self.attr("military")){settings.military=$self.attr("military")}if($self.attr("showminutes")){settings.showminutes=$self.attr("showminutes")}if($self.attr("usesecond")=="true"){settings.second="00"}if($self.attr("layout")){settings.layout=$self.attr("layout");org_settings.layout=settings.layout;v=(settings.layout=="vertical")}errorcheck(settings);if(!settings.valuefield){$self.unbind("keydown").bind("keydown",keyhandler)}else{var inputfield=jQuery("[name="+settings.valuefield+"]");inputfield.unbind("keydown").bind("keydown",keyhandler)[0].focus();inputfield.bind("click",function(){inputfield.unbind("keydown")})}jQuery("#CP_hourcont,#CP_minutecont").remove();var $hourcont=jQuery("<div id='CP_hourcont' class='CP' />").appendTo($body);!settings.useBgiframe?$hourcont.css("opacity",settings.hoursopacity):null;binder($hourcont);var $hourcol=[];for(var i=0;i<Math.floor(settings.endhour/12)-Math.floor(settings.starthour/12)+1;i++){$hourcol.push(jQuery("<div class='CP_hourcol' id='hourcol"+i+"' />").appendTo($body))}if(settings.showminutes=="true"){var $mc=jQuery("<div id='CP_minutecont' class='CP' />").appendTo($body);!settings.useBgiframe?$mc.css("opacity",settings.minutesopacity):null;binder($mc)}if(!v){$hourcont.css("width","auto");if(settings.showminutes=="true"){$mc.css("width","auto")}}else{for(i=0;i<$hourcol.length;i++){$hourcol[i].addClass("floatleft")}}renderhours();putcontainer();function renderhours(){var c=1;var numberC=0;for(var h=settings.starthour;h<=settings.endhour;h++){if(h%12==0){c=1}var displayhours=((!settings.military&&h>12)?h-12:h);var valuehouers=h;if(!settings.military&&h==0){}else{if(!settings.military&&h==12){displayhours="0"}}if(settings.military&&h<10){displayhours="0"+displayhours}if(h<10){valuehouers="0"+valuehouers}var $hd=jQuery("<div class='CP_hour' id='hr_"+h+"_"+c+"' value='"+valuehouers+"' >"+displayhours+set_tt(h)+"</div>");if(settings.military){$hd.width(20)}binder($hd);if(!v){$hd.css("float","left")}$hourcol[numberC].append($hd);if((h+1)%12==0){numberC++}c++}for(var j=0;j<$hourcol.length;j++){if(v){if(j!=0&&j%2==0){$hourcol[j].css("margin-left",$mc.width()+4+"px")}}else{$hourcont.append("<div style='clear:left' />");if(j!=0&&j%2==0){$hourcol[j].css("margin-top","19px")}}$hourcont.append($hourcol[j])}}function renderminutes(h){var realhours=h;var displayhours=(!settings.military&&h>12)?h-12:h;var valuehouers=h;if(!settings.military&&h==0){}else{if(!settings.military&&h==12){displayhours="0"}}if(settings.military&&h<10){displayhours="0"+displayhours}if(h<10){valuehouers="0"+valuehouers}$mc.empty();var n=60/settings.minutedivisions,tt=set_tt(realhours),counter=1;for(var m=0;m<60;m=m+n){$md=jQuery("<div class='CP_minute' id='"+realhours+"_"+m+"' value='"+valuehouers+((m<10)?"0":"")+m+"'>"+displayhours+":"+((m<10)?"0":"")+m+tt+"</div>");if(!v){$md.css("float","left");if(settings.minutedivisions>6&&counter==settings.minutedivisions/2+1){$mc.append("<div style='clear:left' />")}}$mc.append($md);binder($md);counter++}}function set_tt(realhours){if(!settings.military){return(realhours>=12)?" PM":" AM"}else{return""}}function putcontainer(){if(e.type!="focus"){$hourcont[0].style.left=e.pageX-5+"px";$hourcont[0].style.top=e.pageY-(Math.floor($hourcont.height()/2))+"px";rectify($hourcont)}else{$self.after($hourcont)}$hourcont.slideDown("fast");if(settings.useBgiframe){bgi($hourcont)}}function rectify($obj){var ph=document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight;var pw=document.documentElement.clientWidth?document.documentElement.clientWidth:document.body.clientWidth;var t=parseInt($obj[0].style.top);var l=parseInt($obj[0].style.left);var st=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;if(t<=st&&!$obj.is("#CP_minutecont")){$obj.css("top",st+10+"px")}else{if(t+$obj.height()-st>ph){$obj.css("top",st+ph-$obj.height()-10+"px")}}if(l<=0){$obj.css("left","10px")}}function bgi(ob){if(typeof jQuery.fn.bgIframe=="function"){ob.bgIframe()}else{alert("bgIframe plugin not loaded.")}}function binder($obj){if($obj.attr("id")=="CP_hourcont"){$obj.mouseout(function(e){hourcont_out(e)})}else{if($obj.attr("id")=="CP_minutecont"){$obj.mouseout(function(e){minutecont_out(e)})}else{if($obj.attr("class")=="CP_hour"){$obj.mouseover(function(e){hourdiv_over($obj,e)});$obj.mouseout(function(){hourdiv_out($obj)});$obj.click(function(){hourdiv_click($obj)})}else{if($obj.attr("class")=="CP_minute"){$obj.mouseover(function(){minutediv_over($obj)});$obj.mouseout(function(){minutediv_out($obj)});$obj.click(function(){minutediv_click($obj)})}}}}}function hourcont_out(e){try{var t=(e.toElement)?e.toElement:e.relatedTarget;if(!(jQuery(t).is("div[class^=CP], iframe"))){cleardivs()}}catch(e){cleardivs()}}function minutecont_out(e){try{var t=(e.toElement)?e.toElement:e.relatedTarget;if(!(jQuery(t).is("div[class^=CP], iframe"))){cleardivs()}}catch(e){cleardivs()}}function hourdiv_over($obj,e){var h=$obj.attr("id").split("_")[1],i=$obj.attr("id").split("_")[2],l,t,nn;$obj.addClass("CP_over");nn=Math.ceil((Math.floor(h/12)-Math.floor(settings.starthour/12))/2);if(settings.showminutes=="true"){$mc.hide();renderminutes(h);if(v){t=e.type=="mouseover"?e.pageY-15:$hourcont.offset().top+2+($obj.height()*i);l=$hourcont.offset().left+$hourcol[0].width()*2*nn+$mc.width()*(nn-1)+4*nn-2}else{l=(e.type=="mouseover")?e.pageX-10:$hourcont.offset().left+($obj.width()-5)*i;t=$hourcont.offset().top+($hourcont.height()-($mc.height()+2)*(Math.ceil($hourcol.length/2)-1))/$hourcol.length*2*nn+$mc.height()*(nn-1)+2*nn-1}$mc.css("left",l+"px").css("top",t+"px");rectify($mc);$mc.show();if(settings.useBgiframe){bgi($mc)}}return false}function hourdiv_out($obj){$obj.removeClass("CP_over");return false}function hourdiv_click($obj){var h=$obj.attr("id").split("_")[1],tt=set_tt(h),str=$obj.attr("value");if(str.indexOf(" ")!=-1){var cleanstr=str.substring(0,str.indexOf(" "))}else{var cleanstr=str}$obj.text(cleanstr+"00"+settings.second);setval($obj);cleardivs()}function minutediv_over($obj){$obj.addClass("CP_over");return false}function minutediv_out($obj){$obj.removeClass("CP_over");return false}function minutediv_click($obj){$obj.text($obj.attr("value")+settings.second);setval($obj);cleardivs()}function setval($obj){if(!settings.valuefield){self.value=$obj.text()}else{jQuery("input[name="+settings.valuefield+"]").val($obj.text()).change()}callback.apply($self,[$obj.text()]);$self.unbind("keydown",keyhandler)}function cleardivs(){if(settings.showminutes=="true"){$mc.hide()}$hourcont.slideUp("fast");$self.unbind("keydown",keyhandler)}function keyhandler(e){var $obj=$("div.CP_over").size()?$("div.CP_over"):$("div.CP_hour:first"),divtype=$obj.is(".CP_hour")?"hour":"minute",hi=(divtype=="hour")?$obj[0].id.split("_")[2]:0,h=(divtype=="minute")?$obj[0].id.split("_")[0]:$obj[0].id.split("_")[1];if(divtype=="minute"){if((Math.floor(h/12)-Math.floor(settings.starthour/12))==0){var curloc="m1"}else{if((Math.floor(h/12)-Math.floor(settings.endhour/12))==0&&(Math.floor(h/12)-Math.floor(settings.starthour/12))%2!=0){var curloc="m2"}else{var curloc="m3"}}}else{if((Math.floor(h/12)-Math.floor(settings.starthour/12))%2==0){var curloc="h1"}else{var curloc="h2"}}function divprev($obj){if($obj.prev().size()){eval(divtype+"div_out($obj)");eval(divtype+"div_over($obj.prev(), e)")}else{return false}}function divnext($obj){if($obj.next().size()){eval(divtype+"div_out($obj)");eval(divtype+"div_over($obj.next(), e)")}else{return false}}function hourtohour($obj){if((Math.floor(h/12)-Math.floor(settings.starthour/12))%2==0){var next=String((Math.floor(h/12)-Math.floor(settings.starthour/12))+1)}else{var next=String((Math.floor(h/12)-Math.floor(settings.starthour/12))-1)}var ctx="#hourcol"+next;$newobj=jQuery(".CP_hour[id$=_"+hi+"]",ctx);if($newobj.size()){hourdiv_out($obj);hourdiv_over($newobj,e)}else{return false}}function hourtominute($obj){hourdiv_out($obj);minutediv_over($(".CP_minute:first"))}function minutetohour($obj,where){minutediv_out($obj);if(where<0){if((Math.floor(h/12)-Math.floor(settings.starthour/12))%2==0){var next=String((Math.floor(h/12)-Math.floor(settings.starthour/12))+where);h=String(Number(h)-12)}else{var next=String((Math.floor(h/12)-Math.floor(settings.starthour/12)))}}else{if((Math.floor(h/12)-Math.floor(settings.starthour/12))%2==0){var next=String((Math.floor(h/12)-Math.floor(settings.starthour/12)))}else{var next=String((Math.floor(h/12)-Math.floor(settings.starthour/12))+where);h=String(Number(h)+12)}}var ctx="#hourcol"+next;var $newobj=jQuery(".CP_hour[id^=hr_"+h+"]",ctx);hourdiv_over($newobj,e)}switch(e.keyCode){case 37:if(v){switch(curloc){case"m1":return false;break;case"m2":minutetohour($obj,-1);break;case"m3":minutetohour($obj,-1);break;case"h1":hourtominute($obj);break;case"h2":hourtohour($obj);break}}else{divprev($obj)}break;case 38:if(v){divprev($obj)}else{switch(curloc){case"m1":return false;break;case"m2":minutetohour($obj,-1);break;case"m3":minutetohour($obj,-1);break;case"h1":hourtominute($obj);break;case"h2":hourtohour($obj);break}}break;case 39:if(v){switch(curloc){case"m1":minutetohour($obj,1);break;case"m2":return false;break;case"m3":minutetohour($obj,1);break;case"h1":hourtohour($obj);break;case"h2":hourtominute($obj);break}}else{divnext($obj)}break;case 40:if(v){divnext($obj)}else{switch(curloc){case"m1":minutetohour($obj,1);break;case"m2":return false;break;case"m3":minutetohour($obj,1);break;case"h1":hourtohour($obj);break;case"h2":hourtominute($obj);break}}break;case 13:eval(divtype+"div_click($obj)");break;default:return true}return false}return false});function errorcheck(settings){if(settings.starthour>=settings.endhour){alert("Error - start hour must be less than end hour.");return false}else{if(60%settings.minutedivisions!=0){alert("Error - param minutedivisions must divide evenly into 60.");return false}}}return this};$(function(){if($.fn.ogClockpicker){$(document).ready(function(){$(".clockpick").ogClockpicker()})}});function likeComp(c){var b=c.substring(6);var d=$("#"+c).attr("aimaiType");var a=$("#"+b).val();a=a.replace(/^%+|%+$/g,"");if(a!=""){switch(d){case"1":a=a+"%";break;case"2":a="%"+a;break;case"3":a="%"+a+"%";break}}$("#"+b).val(a)}$(function(){$("form").submit(function(){$("[id^='AIMAI_']").each(function(){likeComp(this.id)})})});$.fn.aimaiPickerOg=function(a){var c={texts:[" V "," V*","*V ","*V*"],titls:["完全一致","前方一致","後方一致","前後曖昧"]};var b=$.extend(c,a);return this.each(function(){var g=$(this);var j="PIC_"+g.attr("id").replace(/-/g,"")+"_";var l="";for(var f=0;f<b.texts.length;f++){var m=b.texts[f];var k=b.titls[f];l+='<span id="'+j+"text-"+f+'" class="text-box"" title="'+k+'">('+m+") </span>"}var h=$('<div id="'+j+'aimai-picker" class="aimai-picker" style="position: absolute; left: 0px; top: 0px;">'+l+'<div style="clear: both;"></div></div>');$("body").append(h);h.hide();h.find("span.text-box").click(function(){var i=this.id.substr(this.id.indexOf("-")+1);g.attr("aimaiType",i);g.attr("title",b.titls[i]);g.text(b.texts[i]);g.blur();d(h)});$("body").live("click",function(){d(h)});h.click(function(i){i.stopPropagation()});var e=function(i){var p=g.offset();var o=p.left+g.outerWidth()-i.outerWidth();if(o<p.left){o=p.left}i.css({left:o,top:(p.top+g.outerHeight())});n(i)};g.click(function(i){i.stopPropagation();if(!g.is("input")){e(h)}});g.focus(function(){e(h)});function d(i){if(b.hideEffect=="fade"){i.fadeOut()}else{if(b.hideEffect=="slide"){i.slideUp()}else{i.hide()}}}function n(i){if(b.showEffect=="fade"){i.fadeIn()}else{if(b.showEffect=="slide"){i.slideDown()}else{i.show()}}}})};$(function(){if($.fn.aimaiPickerOg){$(".aimaiClm").aimaiPickerOg()}});(function(){$.fn.glDatePicker=function(options){var pluginName="glDatePicker";var instance=this.data(pluginName);if(!instance){return this.each(function(){return $(this).data(pluginName,new glDatePicker(this,options))})}return(options===true)?instance:this};$.fn.glDatePicker.defaults={cssName:"default",zIndex:1000,borderSize:1,calendarOffset:{x:0,y:1},showAlways:false,hideOnClick:true,allowMonthSelect:true,allowYearSelect:true,todayDate:new Date(),selectedDate:null,prevArrow:"\u25c4",nextArrow:"\u25ba",selectableDates:null,selectableDateRange:null,specialDates:null,selectableMonths:null,selectableYears:null,selectableDOW:null,monthNames:null,dowNames:null,dowOffset:(HYBS_CAL_START_MON==true?1:0),onClick:(function(el,cell,date,data){var tgt=el;if(el[0].tagName.toUpperCase()!="INPUT"){var _targetId=el.attr("targetId");if(_targetId!=null){tgt=$("#"+_targetId)}}var year=date.getFullYear();var month=date.getMonth()+1;var day=date.getDate();if(month<10){month="0"+month}if(day<10){day="0"+day}var oldval=tgt.val();var str=year+""+month+""+day;tgt.val(str);if(oldval!=str){tgt.change()}}),onHover:function(el,cell,date,data){},onShow:function(calendar){calendar.show()},onHide:function(calendar){calendar.hide()},firstDate:null};var glDatePicker=(function(){function glDatePicker(element,userOptions){var self=this;self.el=$(element);var el=self.el;self.options=$.extend(true,{},$.fn.glDatePicker.defaults,userOptions);var options=self.options;var _tgt=el;if(el[0].tagName.toUpperCase()!="INPUT"){if(el.attr("targetId")){_tgt=$("#"+el.attr("targetId"))}}var _inputDate=_tgt.val();if(_inputDate!=null&&_inputDate.length>=8){_inputDate=_inputDate.replace(/\u002f/g,"");try{_inputDate=_inputDate.substr(0,4)+"/"+_inputDate.substr(4,2)+"/"+_inputDate.substr(6,2)}catch(e){_inputDate=null}}else{_inputDate=null}self.calendar=$($.find("[gldp-el="+el.attr("gldp-id")+" ]"));options.selectedDate=(options.selectedDate||new Date(_inputDate||options.todayDate))||options.todayDate;options.firstDate=(new Date((options.firstDate||options.selectedDate)))._first();if(!(el.attr("gldp-id")||"").length){el.attr("gldp-id","gldp-"+Math.round(Math.random()*10000000000))}el.addClass("gldp-el").bind("click",function(e){self.show(e)});if(self.calendar.length&&!options.showAlways){self.calendar.hide()}$(document).bind("mouseup",function(e){var target=e.target;var calendar=self.calendar;if(!el.is(target)&&!calendar.is(target)&&calendar.has(target).length===0&&calendar.is(":visible")){self.hide()}})}glDatePicker.prototype={show:function(){this.render();$.each($(".gldp-el").not(this.el),function(i,o){if(o.length){o.options.onHide(o.calendar)}});this.options.onShow(this.calendar)},hide:function(){if(this.options&&!this.options.showAlways){this.options.onHide(this.calendar)}},render:function(renderCalback){var self=this;var el=self.el;var options=self.options;var calendar=self.calendar;var coreClass=" core border ";var cssName="gldp-"+options.cssName;var todayVal=options.todayDate._val();var todayTime=todayVal.time;var maxRow=6;var maxCol=7;var borderSize=options.borderSize+"px";var getSelectableList=function(min,max,userList){var resultList=[];for(var i=min;i<=max;i++){resultList.push(i)}if(userList){var newList=[];$.each(userList,function(i,v){if(v>=min&&v<=max&&newList._indexOf(v)<0){newList.push(v)}});resultList=newList.length?newList:resultList}resultList.sort();return resultList};var selectableMonths=getSelectableList(0,11,options.selectableMonths);var selectableYears=getSelectableList(todayVal.year-5,todayVal.year+5,options.selectableYears);var selectableDOW=getSelectableList(0,6,options.selectableDOW);var dowNames=options.dowNames||["日","月","火","水","木","金","土"];var monthNames=options.monthNames||["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"];var containerSize=window.innerHeight?window.innerHeight:180;if(containerSize<180){containerSize=(containerSize>135?containerSize:135)}else{containerSize=180}var containerWidth=options.conainerWidth||containerSize;var containerHeight=containerWidth;var getCellSize=function(_size,_count){return(_size/_count)+((options.borderSize/_count)*(_count-1))-1};var cellWidth=getCellSize(containerWidth,maxCol);var cellHeight=getCellSize(containerHeight,maxRow+2);if(!calendar.length){self.calendar=calendar=$("<div/>").attr("gldp-el",el.attr("gldp-id")).data("is",true).css({display:(options.showAlways?undefined:"none"),zIndex:options.zIndex,width:((cellWidth+1)*maxCol)+"px"});$("body").append(calendar)}else{if(!eval(calendar.data("is"))){containerWidth=calendar.outerWidth();containerHeight=calendar.outerHeight();cellWidth=getCellSize(containerWidth,maxCol);cellHeight=getCellSize(containerHeight,maxRow+2)}self.calendar.css({width:((cellWidth+1)*maxCol)+"px"})}if(!el.is(":visible")){calendar.hide()}calendar.removeClass().addClass(cssName).children().remove();var onResize=function(){var elPos=el.offset();calPosTop=(elPos.top+el.outerHeight()+options.calendarOffset.y)-20;calPosLeft=(elPos.left+options.calendarOffset.x);if(calPosTop>$(window).height()-150){calPosTop-=130}if(calPosLeft>$(window).width()-150){calPosLeft-=150}if(calPosTop<0){calPosTop=0}if(calPosLeft<0){calPosLeft=0}calendar.css({top:calPosTop+"px",left:calPosLeft+"px"})};$(window).resize(onResize);onResize();var cellCSS={width:cellWidth+"px",height:cellHeight+"px",lineHeight:cellHeight+"px"};var setFirstDate=function(_date){if(_date){options.firstDate=_date;self.render()}};var getFirstDate=function(_offset){var _date=new Date(options.firstDate);_offset=_offset||0;while(true){_date.setMonth(_date.getMonth()+_offset);_date.setDate(Math.min(1,_date._max()));if(_offset==0){break}var dateVal=_date._val();var dateMonth=dateVal.month;var dateYear=dateVal.year;if(selectableMonths._indexOf(dateMonth)!=-1){if(selectableYears._indexOf(dateYear)!=-1){break}else{if(dateYear<selectableYears[0]||dateYear>selectableYears[selectableYears.length-1]){return null}}}}return _date};var prevFirstDate=getFirstDate(-1);var nextFirstDate=getFirstDate(1);var firstDate=(options.firstDate=getFirstDate());var firstDateVal=firstDate._val();var firstDateMonth=firstDateVal.month;var firstDateYear=firstDateVal.year;var startDate=new Date(firstDate);var dowOffset=Math.abs(Math.min(6,Math.max(0,options.dowOffset)));var startOffset=startDate.getDay()-dowOffset;startOffset=startOffset<1?-7-startOffset:-startOffset;dowNames=(dowNames.concat(dowNames)).slice(dowOffset,dowOffset+7);startDate._add(startOffset);var showPrev=(prevFirstDate);var showNext=(nextFirstDate);var monyearClass=coreClass+"monyear ";var prevCell=$("<div/>").addClass(monyearClass).css($.extend({},cellCSS,{borderWidth:borderSize+" 0 0 "+borderSize})).append($("<a/>").addClass("prev-arrow"+(showPrev?"":"-off")).html(options.prevArrow)).mousedown(function(){return false}).click(function(e){if(options.prevArrow!=""&&showPrev){e.stopPropagation();setFirstDate(prevFirstDate)}});var titleCellCount=maxCol-2;var titleWidth=(cellWidth*titleCellCount)-(titleCellCount*options.borderSize)+(options.borderSize);var titleCell=$("<div/>").addClass(monyearClass+"title").css($.extend({},cellCSS,{width:titleWidth+"px",borderTopWidth:borderSize,marginLeft:"-"+(borderSize)}));var nextCell=$("<div/>").addClass(monyearClass).css($.extend({},cellCSS,{marginLeft:"-"+(borderSize),borderWidth:borderSize+" "+borderSize+" 0 0"})).append($("<a/>").addClass("next-arrow"+(showNext?"":"-off")).html(options.nextArrow)).mousedown(function(){return false}).click(function(e){if(options.nextArrow!=""&&showNext){e.stopPropagation();setFirstDate(nextFirstDate)}});calendar.append(prevCell).append(titleCell).append(nextCell);for(var row=0,cellIndex=0;row<maxRow+1;row++){for(var col=0;col<maxCol;col++,cellIndex++){var cellDate=new Date(startDate);var cellClass="day";var cellZIndex=options.zIndex+(cellIndex);var cell=$("<div/>");if(!row){cellClass="dow";cell.html(dowNames[col]);cellDate=null}else{cellDate._add(col+((row-1)*maxCol));var cellDateVal=cellDate._val();var cellDateTime=cellDateVal.time;var specialData=null;var isSelectable=true;var getRepeatDate=function(v,date){if(v.repeatYear===true){date.setYear(cellDateVal.year)}if(v.repeatMonth===true){date.setMonth(cellDateVal.month)}return date._val()};cell.html(cellDateVal.date);if(options.selectableDateRange){isSelectable=false;$.each(options.selectableDateRange,function(i,v){var dateFrom=v.from;var dateTo=(v.to||null);dateTo=dateTo||new Date(v.from.getFullYear(),v.from.getMonth(),v.from._max());dateFrom=getRepeatDate(v,dateFrom);dateTo=getRepeatDate(v,dateTo);if(cellDateTime>=dateFrom.time&&cellDateTime<=dateTo.time){isSelectable=true;return true}})}if(options.selectableDates){if((options.selectableDateRange&&!isSelectable)||(isSelectable&&!options.selectableDateRange)){isSelectable=false}$.each(options.selectableDates,function(i,v){var vDate=getRepeatDate(v,v.date);if(vDate.time==cellDateTime){return(isSelectable=true)}})}if(!isSelectable||selectableYears._indexOf(cellDateVal.year)<0||selectableMonths._indexOf(cellDateVal.month)<0||selectableDOW._indexOf(cellDateVal.day)<0){cellClass="noday"}else{cellClass=(["sun","mon","tue","wed","thu","fri","sat"])[cellDateVal.day];if(firstDateMonth!=cellDateVal.month){cellClass+=" outday"}if(todayTime==cellDateTime){cellClass="today";cellZIndex+=50}if(options.selectedDate._time()==cellDateTime){cellClass="selected";cellZIndex+=51}if(options.specialDates){$.each(options.specialDates,function(i,v){var vDate=getRepeatDate(v,v.date);if(vDate.time==cellDateTime){cellClass=(v.cssClass||"special");cellZIndex+=52;specialData=v.data}})}cell.mousedown(function(){return false}).hover(function(e){e.stopPropagation();var hoverData=$(this).data("data");options.onHover(el,cell,hoverData.date,hoverData.data)}).click(function(e){e.stopPropagation();var clickedData=$(this).data("data");options.selectedDate=options.firstDate=clickedData.date;self.render(function(){if(!options.showAlways&&options.hideOnClick){self.hide()}});options.onClick(el,$(this),clickedData.date,clickedData.data)})}}$.extend(cellCSS,{borderTopWidth:borderSize,borderBottomWidth:borderSize,borderLeftWidth:(row>0||(!row&&!col))?borderSize:0,borderRightWidth:(row>0||(!row&&col==6))?borderSize:0,marginLeft:(col>0)?"-"+(borderSize):0,marginTop:(row>0)?"-"+(borderSize):0,zIndex:cellZIndex});cell.data("data",{date:cellDate,data:specialData}).addClass(coreClass+cellClass).css(cellCSS);calendar.append(cell)}}var toggleYearMonthSelect=function(showYear){var show="inline-block";var hide="none";if(options.allowMonthSelect){monthText.css({display:!showYear?hide:show});monthSelect.css({display:!showYear?show:hide})}if(options.allowYearSelect){yearText.css({display:showYear?hide:show});yearSelect.css({display:showYear?show:hide})}};var onYearMonthSelect=function(){options.firstDate=new Date(yearSelect.val(),monthSelect.val(),1);self.render()};var monthSelect=$("<select/>").hide().change(onYearMonthSelect);var yearSelect=$("<select/>").hide().change(onYearMonthSelect);var monthText=$("<span/>").html(monthNames[firstDateMonth]).mousedown(function(){return false}).click(function(e){e.stopPropagation();toggleYearMonthSelect(false)});var yearText=$("<span/>").html(firstDateYear).mousedown(function(){return false}).click(function(e){e.stopPropagation();toggleYearMonthSelect(true)});$.each(monthNames,function(i,v){if(options.allowMonthSelect&&selectableMonths._indexOf(i)!=-1){var o=$("<option/>").html(v).attr("value",i);if(i==firstDateMonth){o.attr("selected","selected")}monthSelect.append(o)}});$.each(selectableYears,function(i,v){if(options.allowYearSelect){var o=$("<option/>").html(v).attr("value",v);if(v==firstDateYear){o.attr("selected","selected")}yearSelect.append(o)}});var titleYearMonth=$("<div/>").append(monthText).append(monthSelect).append(yearText).append(yearSelect);titleCell.children().remove();titleCell.append(titleYearMonth);renderCalback=renderCalback||(function(){});renderCalback();var mousewheelevent="onwheel" in document?"wheel":"onmousewheel" in document?"mousewheel":"DOMMouseScroll";calendar.bind(mousewheelevent,function(e){e.preventDefault();var delta=e.originalEvent.deltaY?-(e.originalEvent.deltaY):e.originalEvent.wheelDelta?e.originalEvent.wheelDelta:-(e.originalEvent.detail);if(delta<0){nextCell.click()}else{prevCell.click()}})}};return glDatePicker})();(function(){Date.prototype._clear=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};Date.prototype._time=function(){return this._clear().getTime()};Date.prototype._max=function(){var isLeapYear=(new Date(this.getYear(),1,29).getMonth()==1)?1:0;var days=[31,28+isLeapYear,31,30,31,30,31,31,30,31,30,31];return days[this.getMonth()]};Date.prototype._add=function(days){this.setDate(this.getDate()+days)};Date.prototype._first=function(){var date=new Date(this);date.setDate(1);return date};Date.prototype._val=function(){this._clear();return{year:this.getFullYear(),month:this.getMonth(),date:this.getDate(),time:this.getTime(),day:this.getDay()}};Array.prototype._indexOf=function(value){return $.inArray(value,this)}})()})();$(function(){if($.fn.glDatePicker){$(".calPic").glDatePicker()}});function selectScroll(a){var d=4;if(a.getAttribute("size")){d=a.getAttribute("size")}var e=a.options;for(var c=0;c<e.length;c++){if(e[c].selected){if(e[c].parentNode.tagName.toUpperCase()=="OPTGROUP"){c+=$(e[c].parentNode).prev().length}var b=c*($(a).height()/d);break}}$(a).scrollTop(b)}$(function(){$("select[multiple]").each(function(){selectScroll(this)})});
\ No newline at end of file
1+var orgFldCls=null;$(function(){if(USE_FOCUS_HILIGHT){setEvent('textarea,select,input[type="text"]',"focusin",function(){doFocus2(this)});setEvent('textarea,select,input[type="text"]',"focusout",function(){doBlur2(this)})}});function doFocus2(a){if(a!=null){if(a.className==null||a.className.indexOf("must")<0){if(a.tagName=="SELECT"){a.orgBgColor=a.style.backgroundColor;a.style.backgroundColor="#ffcccc"}else{orgFldCls=a.className;a.className="focusField "+orgFldCls}}}}function doBlur2(a){if(a!=null){if(a.className==null||a.className.indexOf("must")<0){if(a.tagName=="SELECT"){a.style.backgroundColor=a.orgBgColor}else{if(orgFldCls!=null){a.className=orgFldCls}else{a.className="notFocusField"}}}}}oldDoFocusFlag=true;function doFocus(a){if(oldDoFocusFlag){oldDoFocusFlag=false;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(a){}$(function(){setEvent('textarea,select,input[type="text"]',"focusout",function(){convert(this)})});function convert(b){var c,a;c=b.value;a=b.className;if(c!=null&&a!=null){if(a.match(/XL/)&&!(a.match(/XLU/))){b.value=c.toLowerCase()}else{if((a.match(/XU/)&&!(a.match(/XUL/)))||a.match(/PN2/)){b.value=c.toUpperCase()}}}return true}var colMap;var notFireCols;var jH_evElm;$(function(){if(!(typeof(EC_NAME)=="undefined")){jH_evElm=$(".h_evElm");makeColMapping();setEvent('textarea,select,input[type="text"]',"change",function(){makeColumn(this)},".h_evCol",true,addEvColCls);setEvent("input[type=checkbox],input[type=radio]","click",function(){makeColumn(this)},".h_evCol",true)}});function makeColMapping(){var b,a,e,d,c;if(colMap){return}colMap=new Object();for(b=0;b<EC_EVCOL.length;b++){e=EC_EVCOL[b].split(",");for(a=0;a<e.length;a++){d=e[a];if(d.charAt(0)=="_"){d=d.substring(1);if(notFireCols){notFireCols+=","}notFireCols+=d}c=colMap[d];if(!c){c=new Array()}c[c.length]=EC_NAME[b];colMap[d]=c}}}function addEvColCls(){for(var a in colMap){$("#"+a+",[id^="+a+"__]").addClass("h_evCol")}}function makeColumn(e){var k,l,g,j,b,h,d,c,a,f;if(jH_evElm&&isEndInitEvent()){jH_evElm=null}k=$(e);l=k.attr("id");g=l.split("__")[0];j=colMap[g];if(!j){return}if(!isEndInitEvent()&&notFireCols&&notFireCols.indexOf(g)>=0){return}for(b=0;b<j.length;b++){h=(l==g?"":"__"+l.split("__")[1]);d=j[b]+h;c=d.split("__")[0];a=isEndInitEvent()?$(".h_evElm[h_evCid="+d+"]"):jH_evElm.filter("[h_evCid="+d+"]");f=a.attr("h_evWrtbl");eventColumn(k,a,d,c,h,f)}}function eventColumn(jEvCol,jTag,cid,cname,suffix,writable){var evVal,url,param,_pos1,_pos2,_repClm,_rep,_clm,noVal,columnFocus,jCol,val,renderer,editor,ATTRS,optAttrs,i,optAtt,vtype,isAdd;var callback;if(!jTag||jTag.length==0){alert("[SYSTEM_ERROR] : jTag is null. The element of the replacement object doesn't exist. ["+cname+"]");return}if(!isEndInitEvent()){evVal=jEvCol.get(0).value;if(!evVal||evVal==null||evVal==""){return}}try{url=eval("EC_"+cname+"_URL")}catch(e){alert("[SYSTEM_ERROR] : URL that processes the event is not specified. (variable undefinition). ["+cname+"]");return}if(!url||url==""){alert("[SYSTEM_ERROR] : URL that processes the event is not specified. ["+cname+"]");return}param="";try{param=(writable?eval("EC_"+cname+"_EDITPARAM"):eval("EC_"+cname+"_RENDPARAM"))}catch(e){}if(param!=null&&param!=""){url+="?";_pos1=0;_pos2=0;while((_pos1=param.indexOf("{@",_pos2))!=-1){_pos2=param.indexOf("}",_pos1);_clm=param.substring(_pos1+2,_pos2);if(_clm.indexOf(".")<0){_repClm="{@"+_clm+"}";var rtnNull=function(){console.log("noDifined:");console.log(arguments[0]);return null};_rep=suffix==""?$("#"+_clm)[0]?$("#"+_clm).get(0).value:rtnNull(_clm):$("#"+_clm+suffix)[0]?$("#"+_clm+suffix).get(0).value:rtnNull(_clm+suffix);_rep=(_rep==null?"":_rep);param=param.replace(_repClm,_rep);url+=_clm+"="+encodeURIComponent(_rep)+"&"}_pos2=_pos1+1}}noVal=function(){_firstOption=jCol.children("option").get(0);if(_firstOption==null||_firstOption.value!=""){return false}return true};columnFocus=function(){jCol.attr("isfocus","true")};if(cid!=null&&cid!=""){jCol=jTag.find("#"+cid)}else{jCol=new Array(0)}if(jCol.length>0&&isEndInitEvent()){jCol.bind("focus",columnFocus)}val="";if(jCol.length>0){if(isEndInitEvent()){val=(jCol.val()==null?"":jCol.val())}else{val=(jTag.attr("h_evVal")==null?"":jTag.attr("h_evVal"))}}renderer="";try{renderer=eval("EC_"+cname+"_RENDERER")}catch(e){}editor="";try{editor=eval("EC_"+cname+"_EDITOR")}catch(e){}ATTRS=["title","style","tabindex","readonly","disabled","onClick","onChange","onBlur","onFocus","ondblClick","onMouseDown","onMouseUp","onMouseMove","onMouseOut","onMouseOver","onSelect","onKeydown","onKeypress","onKeyup","eventCallBack","multiple"];optAttrs="";if(jCol.length>0){for(i=0;i<ATTRS.length;i++){optAtt=jCol.attr(ATTRS[i]);if(optAtt!=null){vtype=typeof(optAtt);isAdd=false;if(vtype=="function"){optAtt=optAtt.toString();isAdd=optAtt.length>0?true:false;optAtt="("+optAtt+")()"}else{if(vtype=="boolean"){isAdd=optAtt}else{isAdd=optAtt.length>0?true:false}}if(isAdd){optAttrs+=ATTRS[i]+"='"+optAtt+"' "}}}}$.ajax({url:url,data:{EC_CID:(cid==null?"":cid),EC_CNAME:(cname==null?"":cname),EC_RENDERER:renderer,EC_EDITOR:editor,EC_PARAM:param,EC_SQL:param,EC_WRITABLE:(writable==null?"":writable),EC_CVALUE:val,EC_NOVALUE:(jCol.length==0?"":noVal()),EC_CLASS:(jCol.length==0?"":jCol.attr("class")),EC_SIZE:(jCol.length==0?"":jCol.attr("size")),EC_MAXLENGTH:(jCol.length==0?"":jCol.attr("maxlength")),EC_OPTATTRS:optAttrs,EC_PNAME:jEvCol.attr("id")==null?"":jEvCol.attr("id").split("__")[0],EC_PVALUE:jEvCol.get(0).value==null?"":jEvCol.get(0).value,EC_USESLBL:(suffix==null||suffix=="")?"false":"true"},type:"POST",dataType:"html",async:isEndInitEvent(),error:function(r,s,e){if(url.indexOf(".htm")<0){alert("EventColumnError:"+r+":"+s+":"+e+":"+cname)}},success:function(data,status){var jNewCol=$(data);if(jCol.length>0){if(isEndInitEvent()){jCol.unbind("focus",columnFocus)}bindOldEvents(jNewCol.get(0),jQuery.data(jCol.clone(true).get(0),"events"))}jTag.empty().append(jNewCol);if(jCol.length>0){jTag.find("input,select,textarea").attr("name",cid).attr("id",cid);if(isEndInitEvent()){if(jCol.attr("isfocus")){jNewCol.get(0).focus();if($.browser.msie){jNewCol.get(0).focus()}}}if(!isEndInitEvent()){jNewCol.change()}if(jCol.attr("eventCallback")){callback=function(){eval(jCol.attr("eventCallback")+"(arguments);")};callback(cid,jNewCol.val(),jCol.get(0).value)}}if(suffix!=null&&suffix!=""){if(isEndInitEvent()){$("table#viewTable").resizeView()}}}})}function bindOldEvents(d,a){var c,b;for(c in a){for(b in a[c]){jQuery.event.add(d,c,a[c][b],a[c][b].data)}}}var isShowTip=false;$(function(){if(USE_REAL_TIME_CHECK){setEvent('textarea,select,input[type="text"]',"focusout",function(){var b=RegExp(/jsp/);var a=location.pathname.match(b);check(this,RegExp.leftContext+"jsp/common/realtimecheck.jsp")});$("table#viewTable").parent().parent().scroll(function(){if(isShowTip){isShowTip=false;$(".tipErr").remove()}})}});function check(f,b){var c,d,h,g,e,j,a,i;c=f.name;if(typeof jQuery!="undefined"&&c.indexOf("h_")!=0){d=f.value;if(f.rtOption!="null"&&f.rtOption!="undefined"){i=f.getAttribute("rtOption")}h=c.split("__");g=(2==h.length);e="command=RENEW&checkType="+(g?"ENTRY":"NEW")+(g?"&h_rowSel="+h[1]:"")+"&column="+h[0]+"&"+c+"="+encodeURIComponent(d)+(i?"&"+i:"");j={dataType:"html",type:"POST",url:b,data:e};j.error=function(){};j.success=function(k){a=$(f).data("tipId");$("#"+a).remove();if($.trim(k).indexOf("row_error")>=0){showCheckTip(f,k);isShowTip=true}};$.ajax(j)}return true}function showCheckTip(a,c){var j,i,k,g,e,h,f,d,b;j=$(a);i=j.offset();if(i.top>=30){e="<div class='tipErr'><div id='tipArrowBottom'></div><div>"+c+"</div></div>";h=$(e).appendTo(document.body);f=i.left;d=i.top+(-11-h[0].offsetHeight)}else{e="<div class='tipErr'><div id='tipArrowTop'></div><div>"+c+"</div></div>";h=$(e).appendTo(document.body);f=i.left;d=i.top+11+h[0].offsetHeight}b=(new Date()).getTime();$(a).data("tipId",b);h.css({left:f+"px",top:d+"px"}).attr("id",b).click(function(){$(this).remove()}).show()}$(function(){bindEvents()});$.fn.simpleColorPickerOg=function(a){var c={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"],showEffect:"",hideEffect:"",onChangeColor:false};var b=$.extend(c,a);return this.each(function(){var g=$(this);var l="";var j=g.attr("id").replace(/-/g,"")+"_";for(var f=0;f<b.colors.length;f++){var m=b.colors[f];var k="";if(f%b.colorsPerLine==0){k="clear: both; "}if(f>0&&k&&$.browser&&$.browser.msie&&$.browser.version<=7){k="";l+='<li style="float: none; clear: both; overflow: hidden; background-color: #fff; display: block; height: 1px; line-height: 1px; font-size: 1px; margin-bottom: -2px;"></li>'}l+='<li id="'+j+"color-"+f+'" class="color-box" style="'+k+"background-color: "+m+'" title="'+m+'"></li>'}k="clear: both; ";l+='<li id="'+j+'color-default" class="color-box" style="width:80px; text-align:center; '+k+'background-color:white;" title="clear">clear</li>';var h=$('<div id="'+j+'color-picker" class="color-picker" style="position: absolute; left: 0px; top: 0px;"><ul>'+l+'</ul><div style="clear: both;"></div></div>');$("body").append(h);h.hide();h.find("li.color-box").click(function(){var i=isNaN(this.id.substr(this.id.indexOf("-")+1))?"":b.colors[this.id.substr(this.id.indexOf("-")+1)];if(!g.is("input")){g.val(i);g.blur()}if($.isFunction(c.onChangeColor)){c.onChangeColor.call(g,i)}d(h)});$("body").live("click",function(){d(h)});h.click(function(i){i.stopPropagation()});var e=function(i){var p=g.offset();var o=p.left+g.outerWidth()-i.outerWidth();if(o<p.left){o=p.left}i.css({left:o,top:(p.top+g.outerHeight())});n(i)};g.click(function(i){g=$(this);i.stopPropagation();if(!g.is("input")){e(h)}});g.change(function(i){if(g.val()!=g.css("background-color")){g.css("background-color",g.val()).css("color",g.val())}});g.focus(function(){e(h)});function d(i){if(b.hideEffect=="fade"){i.fadeOut()}else{if(b.hideEffect=="slide"){i.slideUp()}else{i.hide()}}}function n(i){if(b.showEffect=="fade"){i.fadeIn()}else{if(b.showEffect=="slide"){i.slideDown()}else{i.show()}}}})};$(function(){if($.fn.simpleColorPickerOg){$("input.colorPicker").simpleColorPickerOg({onChangeColor:function(a){$(this).val(a).css("background-color",a).css("color",a).change()}})}});jQuery.fn.ogClockpicker=function(options,callback){var org_settings={starthour:6,endhour:20,showminutes:"true",minutedivisions:4,military:true,event:"click",layout:"vertical",valuefield:null,useBgiframe:false,hoursopacity:1,minutesopacity:1,second:""};if(options){jQuery.extend(org_settings,options)}var callback=callback||function(){},v=(org_settings.layout=="vertical");errorcheck(org_settings);jQuery(this)[org_settings.event](function(e){var self=this,$self=jQuery(this),$body=jQuery("body");var settings=jQuery.extend(true,{},org_settings);if($self.attr("valuefield")){settings.valuefield=$self.attr("valuefield")}if($self.attr("starthour")){settings.starthour=parseInt($self.attr("starthour"))}if($self.attr("endhour")){settings.endhour=parseInt($self.attr("endhour"))}if($self.attr("minutedivisions")){settings.minutedivisions=parseInt($self.attr("minutedivisions"))}if($self.attr("military")){settings.military=$self.attr("military")}if($self.attr("showminutes")){settings.showminutes=$self.attr("showminutes")}if($self.attr("usesecond")=="true"){settings.second="00"}if($self.attr("layout")){settings.layout=$self.attr("layout");org_settings.layout=settings.layout;v=(settings.layout=="vertical")}errorcheck(settings);if(!settings.valuefield){$self.unbind("keydown").bind("keydown",keyhandler)}else{var inputfield=jQuery("[name="+settings.valuefield+"]");inputfield.unbind("keydown").bind("keydown",keyhandler)[0].focus();inputfield.bind("click",function(){inputfield.unbind("keydown")})}jQuery("#CP_hourcont,#CP_minutecont").remove();var $hourcont=jQuery("<div id='CP_hourcont' class='CP' />").appendTo($body);!settings.useBgiframe?$hourcont.css("opacity",settings.hoursopacity):null;binder($hourcont);var $hourcol=[];for(var i=0;i<Math.floor(settings.endhour/12)-Math.floor(settings.starthour/12)+1;i++){$hourcol.push(jQuery("<div class='CP_hourcol' id='hourcol"+i+"' />").appendTo($body))}if(settings.showminutes=="true"){var $mc=jQuery("<div id='CP_minutecont' class='CP' />").appendTo($body);!settings.useBgiframe?$mc.css("opacity",settings.minutesopacity):null;binder($mc)}if(!v){$hourcont.css("width","auto");if(settings.showminutes=="true"){$mc.css("width","auto")}}else{for(i=0;i<$hourcol.length;i++){$hourcol[i].addClass("floatleft")}}renderhours();putcontainer();function renderhours(){var c=1;var numberC=0;for(var h=settings.starthour;h<=settings.endhour;h++){if(h%12==0){c=1}var displayhours=((!settings.military&&h>12)?h-12:h);var valuehouers=h;if(!settings.military&&h==0){}else{if(!settings.military&&h==12){displayhours="0"}}if(settings.military&&h<10){displayhours="0"+displayhours}if(h<10){valuehouers="0"+valuehouers}var $hd=jQuery("<div class='CP_hour' id='hr_"+h+"_"+c+"' value='"+valuehouers+"' >"+displayhours+set_tt(h)+"</div>");if(settings.military){$hd.width(20)}binder($hd);if(!v){$hd.css("float","left")}$hourcol[numberC].append($hd);if((h+1)%12==0){numberC++}c++}for(var j=0;j<$hourcol.length;j++){if(v){if(j!=0&&j%2==0){$hourcol[j].css("margin-left",$mc.width()+4+"px")}}else{$hourcont.append("<div style='clear:left' />");if(j!=0&&j%2==0){$hourcol[j].css("margin-top","19px")}}$hourcont.append($hourcol[j])}}function renderminutes(h){var realhours=h;var displayhours=(!settings.military&&h>12)?h-12:h;var valuehouers=h;if(!settings.military&&h==0){}else{if(!settings.military&&h==12){displayhours="0"}}if(settings.military&&h<10){displayhours="0"+displayhours}if(h<10){valuehouers="0"+valuehouers}$mc.empty();var n=60/settings.minutedivisions,tt=set_tt(realhours),counter=1;for(var m=0;m<60;m=m+n){$md=jQuery("<div class='CP_minute' id='"+realhours+"_"+m+"' value='"+valuehouers+((m<10)?"0":"")+m+"'>"+displayhours+":"+((m<10)?"0":"")+m+tt+"</div>");if(!v){$md.css("float","left");if(settings.minutedivisions>6&&counter==settings.minutedivisions/2+1){$mc.append("<div style='clear:left' />")}}$mc.append($md);binder($md);counter++}}function set_tt(realhours){if(!settings.military){return(realhours>=12)?" PM":" AM"}else{return""}}function putcontainer(){if(e.type!="focus"){$hourcont[0].style.left=e.pageX-5+"px";$hourcont[0].style.top=e.pageY-(Math.floor($hourcont.height()/2))+"px";rectify($hourcont)}else{$self.after($hourcont)}$hourcont.slideDown("fast");if(settings.useBgiframe){bgi($hourcont)}}function rectify($obj){var ph=document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight;var pw=document.documentElement.clientWidth?document.documentElement.clientWidth:document.body.clientWidth;var t=parseInt($obj[0].style.top);var l=parseInt($obj[0].style.left);var st=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;if(t<=st&&!$obj.is("#CP_minutecont")){$obj.css("top",st+10+"px")}else{if(t+$obj.height()-st>ph){$obj.css("top",st+ph-$obj.height()-10+"px")}}if(l<=0){$obj.css("left","10px")}}function bgi(ob){if(typeof jQuery.fn.bgIframe=="function"){ob.bgIframe()}else{alert("bgIframe plugin not loaded.")}}function binder($obj){if($obj.attr("id")=="CP_hourcont"){$obj.mouseout(function(e){hourcont_out(e)})}else{if($obj.attr("id")=="CP_minutecont"){$obj.mouseout(function(e){minutecont_out(e)})}else{if($obj.attr("class")=="CP_hour"){$obj.mouseover(function(e){hourdiv_over($obj,e)});$obj.mouseout(function(){hourdiv_out($obj)});$obj.click(function(){hourdiv_click($obj)})}else{if($obj.attr("class")=="CP_minute"){$obj.mouseover(function(){minutediv_over($obj)});$obj.mouseout(function(){minutediv_out($obj)});$obj.click(function(){minutediv_click($obj)})}}}}}function hourcont_out(e){try{var t=(e.toElement)?e.toElement:e.relatedTarget;if(!(jQuery(t).is("div[class^=CP], iframe"))){cleardivs()}}catch(e){cleardivs()}}function minutecont_out(e){try{var t=(e.toElement)?e.toElement:e.relatedTarget;if(!(jQuery(t).is("div[class^=CP], iframe"))){cleardivs()}}catch(e){cleardivs()}}function hourdiv_over($obj,e){var h=$obj.attr("id").split("_")[1],i=$obj.attr("id").split("_")[2],l,t,nn;$obj.addClass("CP_over");nn=Math.ceil((Math.floor(h/12)-Math.floor(settings.starthour/12))/2);if(settings.showminutes=="true"){$mc.hide();renderminutes(h);if(v){t=e.type=="mouseover"?e.pageY-15:$hourcont.offset().top+2+($obj.height()*i);l=$hourcont.offset().left+$hourcol[0].width()*2*nn+$mc.width()*(nn-1)+4*nn-2}else{l=(e.type=="mouseover")?e.pageX-10:$hourcont.offset().left+($obj.width()-5)*i;t=$hourcont.offset().top+($hourcont.height()-($mc.height()+2)*(Math.ceil($hourcol.length/2)-1))/$hourcol.length*2*nn+$mc.height()*(nn-1)+2*nn-1}$mc.css("left",l+"px").css("top",t+"px");rectify($mc);$mc.show();if(settings.useBgiframe){bgi($mc)}}return false}function hourdiv_out($obj){$obj.removeClass("CP_over");return false}function hourdiv_click($obj){var h=$obj.attr("id").split("_")[1],tt=set_tt(h),str=$obj.attr("value");if(str.indexOf(" ")!=-1){var cleanstr=str.substring(0,str.indexOf(" "))}else{var cleanstr=str}$obj.text(cleanstr+"00"+settings.second);setval($obj);cleardivs()}function minutediv_over($obj){$obj.addClass("CP_over");return false}function minutediv_out($obj){$obj.removeClass("CP_over");return false}function minutediv_click($obj){$obj.text($obj.attr("value")+settings.second);setval($obj);cleardivs()}function setval($obj){if(!settings.valuefield){self.value=$obj.text()}else{jQuery("input[name="+settings.valuefield+"]").val($obj.text()).change()}callback.apply($self,[$obj.text()]);$self.unbind("keydown",keyhandler)}function cleardivs(){if(settings.showminutes=="true"){$mc.hide()}$hourcont.slideUp("fast");$self.unbind("keydown",keyhandler)}function keyhandler(e){var $obj=$("div.CP_over").size()?$("div.CP_over"):$("div.CP_hour:first"),divtype=$obj.is(".CP_hour")?"hour":"minute",hi=(divtype=="hour")?$obj[0].id.split("_")[2]:0,h=(divtype=="minute")?$obj[0].id.split("_")[0]:$obj[0].id.split("_")[1];if(divtype=="minute"){if((Math.floor(h/12)-Math.floor(settings.starthour/12))==0){var curloc="m1"}else{if((Math.floor(h/12)-Math.floor(settings.endhour/12))==0&&(Math.floor(h/12)-Math.floor(settings.starthour/12))%2!=0){var curloc="m2"}else{var curloc="m3"}}}else{if((Math.floor(h/12)-Math.floor(settings.starthour/12))%2==0){var curloc="h1"}else{var curloc="h2"}}function divprev($obj){if($obj.prev().size()){eval(divtype+"div_out($obj)");eval(divtype+"div_over($obj.prev(), e)")}else{return false}}function divnext($obj){if($obj.next().size()){eval(divtype+"div_out($obj)");eval(divtype+"div_over($obj.next(), e)")}else{return false}}function hourtohour($obj){if((Math.floor(h/12)-Math.floor(settings.starthour/12))%2==0){var next=String((Math.floor(h/12)-Math.floor(settings.starthour/12))+1)}else{var next=String((Math.floor(h/12)-Math.floor(settings.starthour/12))-1)}var ctx="#hourcol"+next;$newobj=jQuery(".CP_hour[id$=_"+hi+"]",ctx);if($newobj.size()){hourdiv_out($obj);hourdiv_over($newobj,e)}else{return false}}function hourtominute($obj){hourdiv_out($obj);minutediv_over($(".CP_minute:first"))}function minutetohour($obj,where){minutediv_out($obj);if(where<0){if((Math.floor(h/12)-Math.floor(settings.starthour/12))%2==0){var next=String((Math.floor(h/12)-Math.floor(settings.starthour/12))+where);h=String(Number(h)-12)}else{var next=String((Math.floor(h/12)-Math.floor(settings.starthour/12)))}}else{if((Math.floor(h/12)-Math.floor(settings.starthour/12))%2==0){var next=String((Math.floor(h/12)-Math.floor(settings.starthour/12)))}else{var next=String((Math.floor(h/12)-Math.floor(settings.starthour/12))+where);h=String(Number(h)+12)}}var ctx="#hourcol"+next;var $newobj=jQuery(".CP_hour[id^=hr_"+h+"]",ctx);hourdiv_over($newobj,e)}switch(e.keyCode){case 37:if(v){switch(curloc){case"m1":return false;break;case"m2":minutetohour($obj,-1);break;case"m3":minutetohour($obj,-1);break;case"h1":hourtominute($obj);break;case"h2":hourtohour($obj);break}}else{divprev($obj)}break;case 38:if(v){divprev($obj)}else{switch(curloc){case"m1":return false;break;case"m2":minutetohour($obj,-1);break;case"m3":minutetohour($obj,-1);break;case"h1":hourtominute($obj);break;case"h2":hourtohour($obj);break}}break;case 39:if(v){switch(curloc){case"m1":minutetohour($obj,1);break;case"m2":return false;break;case"m3":minutetohour($obj,1);break;case"h1":hourtohour($obj);break;case"h2":hourtominute($obj);break}}else{divnext($obj)}break;case 40:if(v){divnext($obj)}else{switch(curloc){case"m1":minutetohour($obj,1);break;case"m2":return false;break;case"m3":minutetohour($obj,1);break;case"h1":hourtohour($obj);break;case"h2":hourtominute($obj);break}}break;case 13:eval(divtype+"div_click($obj)");break;default:return true}return false}return false});function errorcheck(settings){if(settings.starthour>=settings.endhour){alert("Error - start hour must be less than end hour.");return false}else{if(60%settings.minutedivisions!=0){alert("Error - param minutedivisions must divide evenly into 60.");return false}}}return this};$(function(){if($.fn.ogClockpicker){$(document).ready(function(){$(".clockpick").ogClockpicker()})}});function likeComp(c){var b=c.substring(6);var d=$("#"+c).attr("aimaiType");var a=$("#"+b).val();a=a.replace(/^%+|%+$/g,"");if(a!=""){switch(d){case"1":a=a+"%";break;case"2":a="%"+a;break;case"3":a="%"+a+"%";break}}$("#"+b).val(a)}$(function(){$("form").submit(function(){$("[id^='AIMAI_']").each(function(){likeComp(this.id)})})});$.fn.aimaiPickerOg=function(a){var c={texts:[" V "," V*","*V ","*V*"],titls:["完全一致","前方一致","後方一致","前後曖昧"]};var b=$.extend(c,a);return this.each(function(){var g=$(this);var j="PIC_"+g.attr("id").replace(/-/g,"")+"_";var l="";for(var f=0;f<b.texts.length;f++){var m=b.texts[f];var k=b.titls[f];l+='<span id="'+j+"text-"+f+'" class="text-box"" title="'+k+'">('+m+") </span>"}var h=$('<div id="'+j+'aimai-picker" class="aimai-picker" style="position: absolute; left: 0px; top: 0px;">'+l+'<div style="clear: both;"></div></div>');$("body").append(h);h.hide();h.find("span.text-box").click(function(){var i=this.id.substr(this.id.indexOf("-")+1);g.attr("aimaiType",i);g.attr("title",b.titls[i]);g.text(b.texts[i]);g.blur();d(h)});$("body").live("click",function(){d(h)});h.click(function(i){i.stopPropagation()});var e=function(i){var p=g.offset();var o=p.left+g.outerWidth()-i.outerWidth();if(o<p.left){o=p.left}i.css({left:o,top:(p.top+g.outerHeight())});n(i)};g.click(function(i){i.stopPropagation();if(!g.is("input")){e(h)}});g.focus(function(){e(h)});function d(i){if(b.hideEffect=="fade"){i.fadeOut()}else{if(b.hideEffect=="slide"){i.slideUp()}else{i.hide()}}}function n(i){if(b.showEffect=="fade"){i.fadeIn()}else{if(b.showEffect=="slide"){i.slideDown()}else{i.show()}}}})};$(function(){if($.fn.aimaiPickerOg){$(".aimaiClm").aimaiPickerOg()}});(function(){$.fn.glDatePicker=function(options){var pluginName="glDatePicker";var instance=this.data(pluginName);if(!instance){return this.each(function(){return $(this).data(pluginName,new glDatePicker(this,options))})}return(options===true)?instance:this};$.fn.glDatePicker.defaults={cssName:"default",zIndex:1000,borderSize:1,calendarOffset:{x:0,y:1},showAlways:false,hideOnClick:true,allowMonthSelect:true,allowYearSelect:true,todayDate:new Date(),selectedDate:null,prevArrow:"\u25c4",nextArrow:"\u25ba",selectableDates:null,selectableDateRange:null,specialDates:null,selectableMonths:null,selectableYears:null,selectableDOW:null,monthNames:null,dowNames:null,dowOffset:(HYBS_CAL_START_MON==true?1:0),onClick:(function(el,cell,date,data){var tgt=el;if(el[0].tagName.toUpperCase()!="INPUT"){var _targetId=el.attr("targetId");if(_targetId!=null){tgt=$("#"+_targetId)}}var year=date.getFullYear();var month=date.getMonth()+1;var day=date.getDate();if(month<10){month="0"+month}if(day<10){day="0"+day}var oldval=tgt.val();var str=year+""+month+""+day;tgt.val(str);if(oldval!=str){tgt.change()}}),onHover:function(el,cell,date,data){},onShow:function(calendar){calendar.show()},onHide:function(calendar){calendar.hide()},firstDate:null};var glDatePicker=(function(){function glDatePicker(element,userOptions){var self=this;self.el=$(element);var el=self.el;self.options=$.extend(true,{},$.fn.glDatePicker.defaults,userOptions);var options=self.options;var _tgt=el;if(el[0].tagName.toUpperCase()!="INPUT"){if(el.attr("targetId")){_tgt=$("#"+el.attr("targetId"))}}var _inputDate=_tgt.val();if(_inputDate!=null&&_inputDate.length>=8){_inputDate=_inputDate.replace(/\u002f/g,"");try{_inputDate=_inputDate.substr(0,4)+"/"+_inputDate.substr(4,2)+"/"+_inputDate.substr(6,2)}catch(e){_inputDate=null}}else{_inputDate=null}self.calendar=$($.find("[gldp-el="+el.attr("gldp-id")+" ]"));options.selectedDate=(options.selectedDate||new Date(_inputDate||options.todayDate))||options.todayDate;options.firstDate=(new Date((options.firstDate||options.selectedDate)))._first();if(!(el.attr("gldp-id")||"").length){el.attr("gldp-id","gldp-"+Math.round(Math.random()*10000000000))}el.addClass("gldp-el").bind("click",function(e){self.show(e)});if(self.calendar.length&&!options.showAlways){self.calendar.hide()}$(document).bind("mouseup",function(e){var target=e.target;var calendar=self.calendar;if(!el.is(target)&&!calendar.is(target)&&calendar.has(target).length===0&&calendar.is(":visible")){self.hide()}})}glDatePicker.prototype={show:function(){this.render();$.each($(".gldp-el").not(this.el),function(i,o){if(o.length){o.options.onHide(o.calendar)}});this.options.onShow(this.calendar)},hide:function(){if(this.options&&!this.options.showAlways){this.options.onHide(this.calendar)}},render:function(renderCalback){var self=this;var el=self.el;var options=self.options;var calendar=self.calendar;var coreClass=" core border ";var cssName="gldp-"+options.cssName;var todayVal=options.todayDate._val();var todayTime=todayVal.time;var maxRow=6;var maxCol=7;var borderSize=options.borderSize+"px";var getSelectableList=function(min,max,userList){var resultList=[];for(var i=min;i<=max;i++){resultList.push(i)}if(userList){var newList=[];$.each(userList,function(i,v){if(v>=min&&v<=max&&newList._indexOf(v)<0){newList.push(v)}});resultList=newList.length?newList:resultList}resultList.sort();return resultList};var selectableMonths=getSelectableList(0,11,options.selectableMonths);var selectableYears=getSelectableList(todayVal.year-5,todayVal.year+5,options.selectableYears);var selectableDOW=getSelectableList(0,6,options.selectableDOW);var dowNames=options.dowNames||["日","月","火","水","木","金","土"];var monthNames=options.monthNames||["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"];var containerSize=window.innerHeight?window.innerHeight:180;if(containerSize<180){containerSize=(containerSize>135?containerSize:135)}else{containerSize=180}var containerWidth=options.conainerWidth||containerSize;var containerHeight=containerWidth;var getCellSize=function(_size,_count){return(_size/_count)+((options.borderSize/_count)*(_count-1))-1};var cellWidth=getCellSize(containerWidth,maxCol);var cellHeight=getCellSize(containerHeight,maxRow+2);if(!calendar.length){self.calendar=calendar=$("<div/>").attr("gldp-el",el.attr("gldp-id")).data("is",true).css({display:(options.showAlways?undefined:"none"),zIndex:options.zIndex,width:((cellWidth+1)*maxCol)+"px"});$("body").append(calendar)}else{if(!eval(calendar.data("is"))){containerWidth=calendar.outerWidth();containerHeight=calendar.outerHeight();cellWidth=getCellSize(containerWidth,maxCol);cellHeight=getCellSize(containerHeight,maxRow+2)}self.calendar.css({width:((cellWidth+1)*maxCol)+"px"})}if(!el.is(":visible")){calendar.hide()}calendar.removeClass().addClass(cssName).children().remove();var onResize=function(){var elPos=el.offset();calPosTop=(elPos.top+el.outerHeight()+options.calendarOffset.y)-20;calPosLeft=(elPos.left+options.calendarOffset.x);if(calPosTop>$(window).height()-150){calPosTop-=130}if(calPosLeft>$(window).width()-150){calPosLeft-=150}if(calPosTop<0){calPosTop=0}if(calPosLeft<0){calPosLeft=0}calendar.css({top:calPosTop+"px",left:calPosLeft+"px"})};$(window).resize(onResize);onResize();var cellCSS={width:cellWidth+"px",height:cellHeight+"px",lineHeight:cellHeight+"px"};var setFirstDate=function(_date){if(_date){options.firstDate=_date;self.render()}};var getFirstDate=function(_offset){var _date=new Date(options.firstDate);_offset=_offset||0;while(true){_date.setMonth(_date.getMonth()+_offset);_date.setDate(Math.min(1,_date._max()));if(_offset==0){break}var dateVal=_date._val();var dateMonth=dateVal.month;var dateYear=dateVal.year;if(selectableMonths._indexOf(dateMonth)!=-1){if(selectableYears._indexOf(dateYear)!=-1){break}else{if(dateYear<selectableYears[0]||dateYear>selectableYears[selectableYears.length-1]){return null}}}}return _date};var prevFirstDate=getFirstDate(-1);var nextFirstDate=getFirstDate(1);var firstDate=(options.firstDate=getFirstDate());var firstDateVal=firstDate._val();var firstDateMonth=firstDateVal.month;var firstDateYear=firstDateVal.year;var startDate=new Date(firstDate);var dowOffset=Math.abs(Math.min(6,Math.max(0,options.dowOffset)));var startOffset=startDate.getDay()-dowOffset;startOffset=startOffset<1?-7-startOffset:-startOffset;dowNames=(dowNames.concat(dowNames)).slice(dowOffset,dowOffset+7);startDate._add(startOffset);var showPrev=(prevFirstDate);var showNext=(nextFirstDate);var monyearClass=coreClass+"monyear ";var prevCell=$("<div/>").addClass(monyearClass).css($.extend({},cellCSS,{borderWidth:borderSize+" 0 0 "+borderSize})).append($("<a/>").addClass("prev-arrow"+(showPrev?"":"-off")).html(options.prevArrow)).mousedown(function(){return false}).click(function(e){if(options.prevArrow!=""&&showPrev){e.stopPropagation();setFirstDate(prevFirstDate)}});var titleCellCount=maxCol-2;var titleWidth=(cellWidth*titleCellCount)-(titleCellCount*options.borderSize)+(options.borderSize);var titleCell=$("<div/>").addClass(monyearClass+"title").css($.extend({},cellCSS,{width:titleWidth+"px",borderTopWidth:borderSize,marginLeft:"-"+(borderSize)}));var nextCell=$("<div/>").addClass(monyearClass).css($.extend({},cellCSS,{marginLeft:"-"+(borderSize),borderWidth:borderSize+" "+borderSize+" 0 0"})).append($("<a/>").addClass("next-arrow"+(showNext?"":"-off")).html(options.nextArrow)).mousedown(function(){return false}).click(function(e){if(options.nextArrow!=""&&showNext){e.stopPropagation();setFirstDate(nextFirstDate)}});calendar.append(prevCell).append(titleCell).append(nextCell);for(var row=0,cellIndex=0;row<maxRow+1;row++){for(var col=0;col<maxCol;col++,cellIndex++){var cellDate=new Date(startDate);var cellClass="day";var cellZIndex=options.zIndex+(cellIndex);var cell=$("<div/>");if(!row){cellClass="dow";cell.html(dowNames[col]);cellDate=null}else{cellDate._add(col+((row-1)*maxCol));var cellDateVal=cellDate._val();var cellDateTime=cellDateVal.time;var specialData=null;var isSelectable=true;var getRepeatDate=function(v,date){if(v.repeatYear===true){date.setYear(cellDateVal.year)}if(v.repeatMonth===true){date.setMonth(cellDateVal.month)}return date._val()};cell.html(cellDateVal.date);if(options.selectableDateRange){isSelectable=false;$.each(options.selectableDateRange,function(i,v){var dateFrom=v.from;var dateTo=(v.to||null);dateTo=dateTo||new Date(v.from.getFullYear(),v.from.getMonth(),v.from._max());dateFrom=getRepeatDate(v,dateFrom);dateTo=getRepeatDate(v,dateTo);if(cellDateTime>=dateFrom.time&&cellDateTime<=dateTo.time){isSelectable=true;return true}})}if(options.selectableDates){if((options.selectableDateRange&&!isSelectable)||(isSelectable&&!options.selectableDateRange)){isSelectable=false}$.each(options.selectableDates,function(i,v){var vDate=getRepeatDate(v,v.date);if(vDate.time==cellDateTime){return(isSelectable=true)}})}if(!isSelectable||selectableYears._indexOf(cellDateVal.year)<0||selectableMonths._indexOf(cellDateVal.month)<0||selectableDOW._indexOf(cellDateVal.day)<0){cellClass="noday"}else{cellClass=(["sun","mon","tue","wed","thu","fri","sat"])[cellDateVal.day];if(firstDateMonth!=cellDateVal.month){cellClass+=" outday"}if(todayTime==cellDateTime){cellClass="today";cellZIndex+=50}if(options.selectedDate._time()==cellDateTime){cellClass="selected";cellZIndex+=51}if(options.specialDates){$.each(options.specialDates,function(i,v){var vDate=getRepeatDate(v,v.date);if(vDate.time==cellDateTime){cellClass=(v.cssClass||"special");cellZIndex+=52;specialData=v.data}})}cell.mousedown(function(){return false}).hover(function(e){e.stopPropagation();var hoverData=$(this).data("data");options.onHover(el,cell,hoverData.date,hoverData.data)}).click(function(e){e.stopPropagation();var clickedData=$(this).data("data");options.selectedDate=options.firstDate=clickedData.date;self.render(function(){if(!options.showAlways&&options.hideOnClick){self.hide()}});options.onClick(el,$(this),clickedData.date,clickedData.data)})}}$.extend(cellCSS,{borderTopWidth:borderSize,borderBottomWidth:borderSize,borderLeftWidth:(row>0||(!row&&!col))?borderSize:0,borderRightWidth:(row>0||(!row&&col==6))?borderSize:0,marginLeft:(col>0)?"-"+(borderSize):0,marginTop:(row>0)?"-"+(borderSize):0,zIndex:cellZIndex});cell.data("data",{date:cellDate,data:specialData}).addClass(coreClass+cellClass).css(cellCSS);calendar.append(cell)}}var toggleYearMonthSelect=function(showYear){var show="inline-block";var hide="none";if(options.allowMonthSelect){monthText.css({display:!showYear?hide:show});monthSelect.css({display:!showYear?show:hide})}if(options.allowYearSelect){yearText.css({display:showYear?hide:show});yearSelect.css({display:showYear?show:hide})}};var onYearMonthSelect=function(){options.firstDate=new Date(yearSelect.val(),monthSelect.val(),1);self.render()};var monthSelect=$("<select/>").hide().change(onYearMonthSelect);var yearSelect=$("<select/>").hide().change(onYearMonthSelect);var monthText=$("<span/>").html(monthNames[firstDateMonth]).mousedown(function(){return false}).click(function(e){e.stopPropagation();toggleYearMonthSelect(false)});var yearText=$("<span/>").html(firstDateYear).mousedown(function(){return false}).click(function(e){e.stopPropagation();toggleYearMonthSelect(true)});$.each(monthNames,function(i,v){if(options.allowMonthSelect&&selectableMonths._indexOf(i)!=-1){var o=$("<option/>").html(v).attr("value",i);if(i==firstDateMonth){o.attr("selected","selected")}monthSelect.append(o)}});$.each(selectableYears,function(i,v){if(options.allowYearSelect){var o=$("<option/>").html(v).attr("value",v);if(v==firstDateYear){o.attr("selected","selected")}yearSelect.append(o)}});var titleYearMonth=$("<div/>").append(monthText).append(monthSelect).append(yearText).append(yearSelect);titleCell.children().remove();titleCell.append(titleYearMonth);renderCalback=renderCalback||(function(){});renderCalback();var mousewheelevent="onwheel" in document?"wheel":"onmousewheel" in document?"mousewheel":"DOMMouseScroll";calendar.bind(mousewheelevent,function(e){e.preventDefault();var delta=e.originalEvent.deltaY?-(e.originalEvent.deltaY):e.originalEvent.wheelDelta?e.originalEvent.wheelDelta:-(e.originalEvent.detail);if(delta<0){nextCell.click()}else{prevCell.click()}})}};return glDatePicker})();(function(){Date.prototype._clear=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};Date.prototype._time=function(){return this._clear().getTime()};Date.prototype._max=function(){var isLeapYear=(new Date(this.getYear(),1,29).getMonth()==1)?1:0;var days=[31,28+isLeapYear,31,30,31,30,31,31,30,31,30,31];return days[this.getMonth()]};Date.prototype._add=function(days){this.setDate(this.getDate()+days)};Date.prototype._first=function(){var date=new Date(this);date.setDate(1);return date};Date.prototype._val=function(){this._clear();return{year:this.getFullYear(),month:this.getMonth(),date:this.getDate(),time:this.getTime(),day:this.getDay()}};Array.prototype._indexOf=function(value){return $.inArray(value,this)}})()})();$(function(){if($.fn.glDatePicker){$(".calPic").glDatePicker()}});function selectScroll(a){var d=4;if(a.getAttribute("size")){d=a.getAttribute("size")}var e=a.options;for(var c=0;c<e.length;c++){if(e[c].selected){if(e[c].parentNode.tagName.toUpperCase()=="OPTGROUP"){c+=$(e[c].parentNode).prev().length}var b=c*($(a).height()/d);break}}$(a).scrollTop(b)}$(function(){$("select[multiple]").each(function(){selectScroll(this)})});
\ No newline at end of file
Afficher sur ancien navigateur de dépôt.