function scrollBar2(a){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. scrollBar2(...)")}function SetScrollHeader(a){}
(function(a){a.hgrid=a.hgrid||{};a.hgrid.defaults={sGantBody:"GantBody",sViewTable:"viewTable",sGridList:"GridList",sInAdjusting:"__bInAdjusting"};a.hgrid.load=function(h){var e=a("div > div > div > div > table.viewTable");if(0==a("body").width()||100==a("body").width())setTimeout(function(){a.hgrid.load(h)},1);else{var b=a("#"+a.hgrid.defaults.sGantBody+":first");a(window).data("gantBody",b);0<b.length&&2==e.length&&b.heightReset();e.each(function(c){z(a(this))});e.hybsGrid().adjustSB();focus2&&
focus2()}};a.hgrid.resize=function(h){a(this).data(a.hgrid.defaults.sInAdjusting)||(a(this).data(a.hgrid.defaults.sInAdjusting,!0),setTimeout(function(){var e=a.hgrid.defaults.sGridList;(e=a(window).data(e))&&a.each(e,function(){a(this.oTab).adjustSB()});a(window).data(a.hgrid.defaults.sInAdjusting,!1)},100))};a.hgrid.unload=function(h){h=a.hgrid.defaults.sGridList;var e=a(this).data(h);e&&(a.each(e,function(){this.oTab.grid=this.oTab.p=null}),e.length=0);a(this).removeData(h);a.hgrid=null};a(window).off("load.hgrid").on("load.hgrid",
a.hgrid.load).off("resize.hgrid").on("resize.hgrid",a.hgrid.resize).off("unload.hgrid").on("unload.hgrid",a.hgrid.unload);var A=function(){var h;return function(){var e;if(!(e=h)){e=a('<div style="width:50px;height:50px;overflow:hidden;position:absolute;top:-200px;left:-200px;"><div style="height:100px;"></div>');a("body").append(e);var b=a("div",e).innerWidth();e.css("overflow-y","scroll");var c=a("div",e).innerWidth();0==b-c&&(c=b-17);a(e).remove();e=h=b-c}return e}}(),z=function(h){if(!h.data("cache")){h.parent().attr("id",
"divHide2").css({width:"10000em"});var e=[],b=a("thead:first",h),c=a("tr th",b);h.data("thead",b);h.data("trTh",c);c.each(function(m){e[m]=a(this).width()});h.data("thw",e);b=a.hybs.getHybsTr(h.find("tbody tr:first"));h.data("firstTr",b);c=b.height();h.data("trh",c);var d=[],g=[];b=a("td",b);h.data("firstTrTd",b);b.each(function(m){0<a(this).find(".h_evElm").length&&("true"==a(this).attr("wa")&&a(this).css("width","auto"),"true"==a(this).attr("ha")&&a(this).css("height","auto"),"auto"==a(this).css("width")&&
a(this).attr("wa","true"),"auto"==a(this).css("height")&&a(this).attr("ha","true"));d[m]=a(this).width();g[m]=a(this).height()});h.data("tdw",d);h.data("tdh",g);h.data("cache",!0)}};a.fn.heightReset=function(h){p=a.extend(!0,{},a.hgrid.defaults,h||{});return this.each(function(){var e=a("table."+p.sViewTable,this),b=e.get(0);e=e.get(1);var c=b.rows,d=e.rows,g=b.rows.length,m=b.tHead.rows.length;for(f=0;f<m;f++){var l=Math.max(b.rows[f].offsetHeight,e.rows[f].offsetHeight);c[f].style.height=d[f].style.height=
l+"px"}l=0;var f;for(f=m;f<g&&f<m+5;f++)l=Math.max(l,Math.max(c[f].offsetHeight,d[f].offsetHeight));for(f=m;f<g;f++)c[f].style.height=d[f].style.height=l+"px"})};a.fn.hybsGrid=function(h){h=a.extend(!0,{selrow:null,multiselect:!1,multikey:!1,nHoriExtra:16,nVertExtra:10,nMinLimit:50,nWidthScroll:A(),bX1VScroll:!1,bX2VScroll:!0},a.hgrid.defaults,h||{});var e={scrollGrid:function(){var b=this.bDiv.scrollTop;this.hDiv.scrollLeft=this.bDiv.scrollLeft;if(this.oPrev){var c=this.oPrev.grid.bDiv;b!=c.scrollTop&&
(c.scrollTop=b)}this.oNext&&(c=this.oNext.grid.bDiv,b!=c.scrollTop&&(c.scrollTop=b))}};a.fn.adjustSB=function(b){return this.each(function(){if(this.grid){"boolean"!=typeof b&&(b=!0);var c=a(this);var d=this.grid.hTable.parentNode;d.style.width&&(d.style.width=this.grid.hTable.offsetWidth+"px");d=this.grid.bHide;var g=a("thead:first",this);g=g.outerHeight()+2*g[0].offsetTop;d.style.width=c.outerWidth()+"px";d.style.height=c.outerHeight()-g+"px";d.scrollTop=g;for(var m=0,l=0;;){g=a(window).width();
var f=a(window).height();c=a(this.grid.bDiv);var r=c.offset();var n=this.grid.oNext;var q=this.grid.oPrev;g=Math.max(g-Math.ceil(r.left)-this.p.nHoriExtra,this.p.nMinLimit);f=Math.max(f-Math.ceil(r.top)-this.p.nVertExtra,this.p.nMinLimit);g=this.p.width?0>this.p.width.indexOf("%")?parseInt(this.p.width,10):g*(parseInt(this.p.width,10)/100):g;f=this.p.height?0>this.p.height.indexOf("%")?parseInt(this.p.height,10):f*(parseInt(this.p.height,10)/100):f;if(g<=m&&f<=l)break;var u=this.offsetWidth,w=d.offsetHeight;
m=g;l=f;var k=m-u;var t=l-w;var v=0>k;r=0>t;var x;var y=x=!1;!v&&this.p.nWidthScroll>k&&(y=r||this.p.nWidthScroll>t);!r&&this.p.nWidthScroll>t&&(x=v||this.p.nWidthScroll>k);q&&q.grid.bHoriScroll&&(y=!1);y&&(v=!0);x&&(r=!0);n&&!this.p.bX1VScroll&&(r=!1);n=v?"scroll":"hidden";k=r?"scroll":"hidden";m=Math.min(m,u+(r?this.p.nWidthScroll:0));l=Math.min(l,w+(v?this.p.nWidthScroll:0));this.grid.bHoriScroll=v;this.grid.bVertScroll=r;this.grid.width=m;this.grid.height=l;q&&(v=l-(v?this.p.nWidthScroll:0)+(q.grid.bHoriScroll?
this.p.nWidthScroll:0),v!=q.grid.height&&(q.grid.height=v,u=q.grid.hDiv.offsetHeight,a(q.grid.bDiv).css("height",v+"px").parent().css({height:v+u+"px"})));a(this.grid.hDiv).width(m-(r?this.p.nWidthScroll:0));this.grid.firstRowHeight&&(q=this.grid.firstRowHeight,this.grid.firstRowHeight=null,a(this.grid.hDiv).height(this.grid.hDiv.offsetHeight-q));q=this.grid.hDiv.offsetHeight;c.css({width:m+"px",height:l+"px","overflow-x":n,"overflow-y":k}).parent().css({height:l+q+"px",width:m+"px"});m=g;l=f}this.grid.scrollGrid()}})};
return this.each(function(b){if("divHide"==this.parentNode.id||"divHide2"==this.parentNode.id){var c=this,d=a(c);b=a.extend(!0,{},e);var g=a.extend(!0,{},h),m=g.colModel=[];z(d);d.data("trTh").each(function(k){var t=a(this);t=t.attr("field")||t.text();m[k]={name:t,index:t,width:d.data("thw")[k]}});var l=!1,f=d.data("firstTr"),r=a(window).data("gantBody");0<r.length&&(l=!0);d.addClass("scroll");var n=c.parentNode;b.bHide=c.parentNode;b.bDiv=b.bHide.parentNode;(n=d.parents("#divPos")[0])&&a.each(["width",
"height"],function(){c.p&&c.p[this]?g[this]=c.p[this]:n.style[this]&&(g[this]=n.style[this],n.style[this]="auto")});a.each(g.colModel,function(k){"undefined"==typeof this.width&&(this.width=150)});var q=d.data("thead").get(0);d.data("trTh").each(function(k){"true"==a(this).attr("plusone")?a(this).css("width",g.colModel[k].width+"px"):(a(this).css("width",g.colModel[k].width+1+"px"),a(this).attr("plusone","true"))});b.hTable=document.createElement("table");var u=a(b.hTable);u.addClass(d.attr("class")).css({margin:"0px"});
a.each("cellspacing cellpadding border bordercolor frame rules".split(" "),function(k,t){d.attr(t)&&u.attr(t,d.attr(t))});u.attr("id","headerTable");d.data("trTh").find("a,input,select,textarea,span,button,img").each(function(){a(this).attr("tabindex","").removeClass("visihidden")});n=q;q=a("#header",d);var w=[];for(a("input,select,textarea",q).each(function(k){"checkbox"==a(this).attr("type")?a(this).prop("checked")?w[k]="1":w[k]="0":w[k]=a(this).val()});n;)u.prepend(a(n).clone(!0)),n=n.previousSibling;
q=a(u).find("#header");a("input,select,textarea",q).each(function(k){"checkbox"==a(this).attr("type")?"1"==w[k]&&a(this).prop("checked",!0):a(this).val(w[k])});l&&f&&f[0]&&(b.firstRowHeight=d.data("trh")+1,a("td",f).each(function(k){a(this).css("width",d.data("tdw")[k]+"px").css("height",d.data("tdh")[k]+"px")}),jTrCl=f.clone(),a("td",jTrCl).each(function(k){a(this).html(""==a(this).text()?"":" ").css("backgroundColor","transparent")}),jAddTo=jTrCl.is("tr")?a(document.createElement("tbody")).appendTo(u):
u,jAddTo.append(jTrCl));b.hDiv=document.createElement("div");a(b.hDiv).attr("class","hGrid-header").append(a('<div style="width:10000em;" />').append(b.hTable));d.data("trTh").find("a,input,select,textarea,span,button,img").each(function(){a(this).attr("tabindex","999").addClass("visihidden")});"hGrid-header"==a(b.bDiv).prev().attr("class")&&a(b.bDiv).prev().remove();a(b.bDiv).before(b.hDiv);a(b.bDiv).on("scroll",function(k){(k=a("table:first",k.target)[0])&&k.grid&&k.grid.scrollGrid()});n=a(window).data(g.sGridList);
0<r.length&&n&&(l=n[n.length-1],l.oWrap===r[0]&&(l.oTab.grid.oNext=c,b.oPrev=l.oTab));n||=[];n.push({oTab:c,oWrap:r[0]});a(window).data(g.sGridList,n);d.data("cache",!1);c.grid=b;c.p=g;c=d=n=r=b=g=null}})}})(jQuery);
