var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(p,w,y){p instanceof String&&(p=String(p));for(var z=p.length,x=0;x<z;x++){var O=p[x];if(w.call(y,O,x,p))return{i:x,v:O}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(p,w,y){if(p==Array.prototype||p==Object.prototype)return p;p[w]=y.value;return p};$jscomp.getGlobal=function(p){p=["object"==typeof globalThis&&globalThis,p,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var w=0;w<p.length;++w){var y=p[w];if(y&&y.Math==Math)return y}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(p,w){var y=$jscomp.propertyToPolyfillSymbol[w];if(null==y)return p[w];y=p[y];return void 0!==y?y:p[w]};
$jscomp.polyfill=function(p,w,y,z){w&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(p,w,y,z):$jscomp.polyfillUnisolated(p,w,y,z))};$jscomp.polyfillUnisolated=function(p,w,y,z){y=$jscomp.global;p=p.split(".");for(z=0;z<p.length-1;z++){var x=p[z];if(!(x in y))return;y=y[x]}p=p[p.length-1];z=y[p];w=w(z);w!=z&&null!=w&&$jscomp.defineProperty(y,p,{configurable:!0,writable:!0,value:w})};
$jscomp.polyfillIsolated=function(p,w,y,z){var x=p.split(".");p=1===x.length;z=x[0];z=!p&&z in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var O=0;O<x.length-1;O++){var J=x[O];if(!(J in z))return;z=z[J]}x=x[x.length-1];y=$jscomp.IS_SYMBOL_NATIVE&&"es6"===y?z[x]:null;w=w(y);null!=w&&(p?$jscomp.defineProperty($jscomp.polyfills,x,{configurable:!0,writable:!0,value:w}):w!==y&&(void 0===$jscomp.propertyToPolyfillSymbol[x]&&(y=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[x]=$jscomp.IS_SYMBOL_NATIVE?
$jscomp.global.Symbol(x):$jscomp.POLYFILL_PREFIX+y+"$"+x),$jscomp.defineProperty(z,$jscomp.propertyToPolyfillSymbol[x],{configurable:!0,writable:!0,value:w})))};$jscomp.polyfill("Array.prototype.find",function(p){return p?p:function(w,y){return $jscomp.findInternal(this,w,y).v}},"es6","es3");
var adjustGanttTable=function(){function p(){this.current=this.end=this.head=null;this.size=0}function w(b,a,c){return b.split(a).join(c)}function y(b){var a=1;b!=Math.abs(b)&&(a=-1);return a}function z(b,a){if(null==b||null==a||8!=b.length||8!=a.length)return 0;var c=b.substring(0,4),f=b.substring(4,6);b=b.substring(6,8);var g=a.substring(0,4),q=a.substring(4,6);a=a.substring(6,8);return(new Date(c,f-1,b)-new Date(g,q-1,a))/864E5}function x(b){var a=b.substring(0,2);b=b.substring(2,4);a=parseInt(a,
10)+parseInt(b,10)/60;return Math.round(100*a)/100}function O(b,a,c){var f=b.substring(0,4),g=b.substring(4,6);b.substring(6);b=1;0==c&&(b=0);var q=Math.floor((Number(g)+Number(a)-Number(b))/12);g=(Number(g)+Number(a)-Number(b))%12;f=Number(f)+Number(q);a=new Date(f,g,c);return a.getFullYear()+("00"+(a.getMonth()+1)).slice(-2)+("00"+a.getDate()).slice(-2)}function J(b,a,c){var f=b.substring(0,4),g=b.substring(4,6),q=b.substring(6,8);f=new Date(f,g-1,q);g=f.getTime();b=b.substring(0,8);var d=z(b,K);
q=b=0;if("1"!=c||"true"!=W||13>=parseInt(l,10)||40<=parseInt(l,10)&&49>=parseInt(l,10)||isNaN(l))q=a;else if(0<a){for(c=d;b<=a;c++)null!=L[c]&&"0"!=L[c]||b++,q++;q--}else if(0>a){for(c=d;b>=a;c--)null!=L[c]&&"0"!=L[c]||b--,q--;q++}f.setTime(g+864E5*q);return f.getFullYear()+("00"+(f.getMonth()+1)).slice(-2)+("00"+f.getDate()).slice(-2)}function ca(b,a){var c=b.substring(0,8);(b=b.substring(8,12))||(b=B);b>E?b=E:b<B&&(b=B);b=x(b)+a;b>=x(E)?(a=Math.floor((b-x(E))/P)+1,b=(b-x(E))%P+x(B)):b<x(B)?(a=Math.floor((b-
x(B))/P),b=0==(b-x(B))%P?x(B):x(E)+(b-x(B))%P):a=0;c=J(c,a,"1");a=("00"+Math.floor(b).toString()).slice(-2);b=("00"+Math.floor(60*(b-Math.floor(b))).toString()).slice(-2);return c+(a+b)}function da(b){if(null==b)return 0;b=z(b,K);return 13>=parseInt(l,10)||40<=parseInt(l,10)&&49>=parseInt(l,10)||isNaN(l)?Math.floor(b/T[l]):b}function Ia(b){b=da(b);return"1"==L[b]?"true":"false"}function X(b,a,c){U=document.getElementById(h.getAttribute("startDateInput"));switch(h.getAttribute("type")){case "0":U.value=
J(h.getAttribute("startDT"),a,c);break;case "1":switch(Y=document.getElementById(h.getAttribute("endDateInput")),b){case 1:U.value=J(h.getAttribute("startDT"),a,c);break;case 3:Y.value=J(h.getAttribute("endDT"),a,c);break;case 2:U.value=J(h.getAttribute("startDT"),a,c),Y.value=J(h.getAttribute("endDT"),a,c)}}}function za(b){b.preventDefault();ja=!0;h=b.srcElement;if(null!=h){var a=h.offsetWidth;qa=Math.min(Math.max(a/3,2),20);switch(h.getAttribute("type")){case "0":N=2;h.style.cursor="move";break;
case "1":b.offsetX<=qa?(N=1,h.style.cursor="E-resize"):b.offsetX>a-qa?(N=3,h.style.cursor="E-resize"):(N=2,h.style.cursor="move")}h.setCapture&&h.setCapture();Aa=b.screenX;ka=h.parentNode.offsetLeft;ra=h.width;sa=h.parentNode.style.pixelLeft}}function Ba(b){if(ja&&(ja=!1,null!=h)){h.style.cursor="auto";h.releaseCapture&&h.releaseCapture();b=h.getAttribute("refid");var a=null;b&&(a=document.getElementById(b));U&&(h.setAttribute("startDT",U.value),a&&a.setAttribute("start",U.value));Y&&(h.setAttribute("endDT",
Y.value),a&&a.setAttribute("end",Y.value));Q&&(h.setAttribute("startDT",h.startDT.substring(0,8)+Q.value),a&&a.setAttribute("start",h.startDT.substring(0,8)+Q.value));Z&&(h.setAttribute("endDT",h.endDT.substring(0,8)+Z.value),a&&a.setAttribute("end",h.endDT.substring(0,8)+Z.value));N=0;if(h.getAttribute("chboxid")&&""!=h.getAttribute("chboxid")&&(b=h.getAttribute("chboxid"),a=document.getElementsByName(b),null!=a))for(b=0;b<a.length;b++){var c=a[b];"INPUT"!=c.tagName||"checkbox"!=c.type&&"radio"!=
c.type||(c.checked=!0)}}}function Ca(b){if(ja){b.preventDefault();var a=b.screenX-Aa;(1==N||2==N)&&0>sa+a&&(a=-sa);if((1==window.event.buttons||1==b.buttons||1==b.button)&&null!=h){if(13>=parseInt(l,10)||40<=parseInt(l,10)&&49>=parseInt(l,10)||isNaN(l))a=y(a)*Math.ceil(Math.abs(a)/h.getAttribute("pixelPreSpan"))*h.getAttribute("pixelPreSpan");if(20<=parseInt(l,10)&&31>=parseInt(l,10))switch(h.getAttribute("moveStep")){case "1":a=y(a)*Math.ceil(Math.abs(a)/(h.getAttribute("pixelPreSpan")*P))*h.getAttribute("pixelPreSpan")*
P;break;case "2":a=y(a)*Math.ceil(Math.abs(a)/h.getAttribute("pixelPreSpan"))*h.getAttribute("pixelPreSpan")}switch(h.getAttribute("type")){case "0":switch(N){case 2:h.parentNode.style.left=parseInt(ka,10)+a+"px"}break;case "1":switch(N){case 1:h.parentNode.style.left=parseInt(ka,10)+a+"px";h.style.width=ra-a+"px";break;case 3:h.style.width=ra+a+"px";break;case 2:h.parentNode.style.left=parseInt(ka,10)+a+"px"}}try{if(13>=parseInt(l,10)||40<=parseInt(l,10)&&49>=parseInt(l,10)||isNaN(l))X(N,a/h.getAttribute("pixelPreSpan"),
"1");else if(null!=h.getAttribute("startTimeInput")&&12!=h.getAttribute("startDT").length)alert("Please set time by the format of the YYYYMMDDHH24MM. ("+h.getAttribute("startDT")+")");else{var c=a/h.getAttribute("pixelPreSpan");Q=document.getElementById(h.getAttribute("startTimeInput"));switch(h.type){case "0":var f=ca(h.getAttribute("startDT"),c),g=f.substring(0,8),q=f.substring(8,12),d=z(g,h.getAttribute("startDT").substring(0,8));X(1,d,"0");Q&&(Q.value=q);break;case "1":switch(Z=document.getElementById(h.getAttribute("endTimeInput")),
N){case 1:f=ca(h.getAttribute("startDT"),c);g=f.substring(0,8);q=f.substring(8,12);d=z(g,h.getAttribute("startDT").substring(0,8));X(1,d,"0");Q.value=q;break;case 3:f=ca(h.getAttribute("endDT"),c);g=f.substring(0,8);q=f.substring(8,12);d=z(g,h.getAttribute("endDT").substring(0,8));X(3,d,"0");Z.value=q;break;case 2:f=ca(h.getAttribute("startDT"),c),g=f.substring(0,8),q=f.substring(8,12),d=z(g,h.getAttribute("startDT").substring(0,8)),X(1,d,"0"),Q.value=q,f=ca(h.getAttribute("endDT"),c),g=f.substring(0,
8),q=f.substring(8,12),d=z(g,h.getAttribute("endDT").substring(0,8)),X(3,d,"0"),Z.value=q}}}}catch(n){}}}}function Ja(b,a,c,f,g){if(null!=document.getElementById("stack_"+b)&&null!=a&&null!=c&&null!=f&&null!=g){var q=da(c),d=da(f),n,e=0,r=z(f,c);if(0==r)return!1;if("false"==ea){var t=da(c),u=da(J(f,-1,0)),C=0;for(i=t;i<=u;i++)"1"==L[i]&&C++;r-=C}for(i=q;i<=d;i++)try{if("false"!=ea||"1"!=L[i])if(n=document.getElementById("stack_"+b+"_"+i))if(stackStart=n.startdate,stackEnd=n.enddate,!(f<stackStart||
stackEnd<c)){if(null==n.getAttribute("costList"))var v=Array(100);else if(v=n.getAttribute("costList"),!document.all){if(null==v)continue;v=v.split(",")}e=g*z(f<stackEnd?f:stackEnd,c>stackStart?c:stackStart)/r;v[a]=null!=v[a]?Number(v[a])+Number(e):Number(e);n.setAttribute("costList",v)}}catch(k){}}}function Da(b,a,c){if(null==b)return!1;iDiv=document.createElement("div");b.appendChild(iDiv);iDiv.style.position="relative";iDiv.style.height=c-2+"px";iDiv.style.width="100%";iDiv.style.fontSize="0";
for(i=0;i<a.length;i++){var f=document.createElement("div");f.className="stackDiv";f.style.position="absolute";f.style.width=R[l]+"px";f.style.height=c+"px";f.defHeight=c;f.style.left=i*R[l]+"px";f.style.top="0px";f.id="stack_"+b.getAttribute("stackrow")+"_"+i;"MONTH"!=l&&"42"!=l?(f.startdate=J(K,T[l]*i),f.enddate=J(K,T[l]*(i+1))):(f.startdate=O(K,i,1),f.enddate=O(K,i+1,1));iDiv.appendChild(f)}}function Ea(b,a,c){if(null==b||null==a)return!1;var f=R[l]/T[l];iDiv=document.createElement("div");b.appendChild(iDiv);
iDiv.style.position="relative";iDiv.style.height=c-2+"px";iDiv.style.width="100%";iDiv.style.left="-1px";iDiv.style.fontSize="0";for(var g=10,q=(c-10)/2-10;a.hasnext();){var d=a.next(),n=document.createElement("div");n.style.position="absolute";n.style.top=q+"px";n.setAttribute("stackrow",b.getAttribute("stackrow"));n.setAttribute("ganttrow",d.getAttribute("ganttrow"));var e=null!=d.getAttribute("start")&&0<d.getAttribute("start").length?w(w(w(d.getAttribute("start"),"/","")," ",""),":","").substring(0,
12):"0",r=null!=d.getAttribute("end")&&0<d.getAttribute("end").length?w(w(w(d.getAttribute("end"),"/","")," ",""),":","").substring(0,12):"0",t=e.substring(0,8),u=e.substring(8,12),C=r.substring(0,8),v=r.substring(8,12);if(null==u||0==u.length)u="0000";if(null==v||0==v.length)v="2400";"0"==e&&(t=C,u=v);d.getAttribute("end")||d.setAttribute("end",O(t,0,0)+""+u);if("2400"<E){var k=parseInt(E,10)-2400,A=parseInt(u,10),F=parseInt(v,10);A<k&&(u=A+2400+"",t=J(t,-1));F<k&&(v=F+2400+"",C=J(C,-1))}try{switch(k=
null,d.getAttribute("type")){case "0":if(8==t.length)if(t>=S)t=S;else if(t<K)t=K,u=B;else{u<B&&(u=B);u>E&&(u=E);var I=z(t,K);if(13>=parseInt(l,10)||40<=parseInt(l,10)&&49>=parseInt(l,10)||isNaN(l)){var D=I*f;"0"==e&&(D+=f)}else{var H=0;if("true"==W){for(var G=H=0;G<I;G++)0<L[G]&&H++;I-=H}D=I*Math.ceil(la/T[l])*R[l]+(parseInt(u.substring(0,2),10)-parseInt(B.substring(0,2),10)+(parseInt(u.substring(2),10)-parseInt(B.substring(2),10))/60)*f*("true"==W&&"true"==Ia(t)?0:1)}n.style.left=D+"px";k=document.createElement("img");
k.src=d.getAttribute("src");13>=parseInt(l,10)||40<=parseInt(l,10)&&49>=parseInt(l,10)||isNaN(l)?k.title=k.alt=t.substring(0,4)+"/"+t.substring(4,6)+"/"+t.substring(6,8):k.title=k.alt=t.substring(0,4)+"/"+t.substring(4,6)+"/"+t.substring(6,8)+" "+u.substring(0,2)+":"+u.substring(2,4);if(document.getElementById(d.getAttribute("startDateInput"))&&null!=d.getAttribute("startDateInput")||document.getElementById(d.getAttribute("startTimeInput"))&&null!=d.getAttribute("startTimeInput"))k.setAttribute("type",
d.getAttribute("type")),k.setAttribute("startDT",e),document.getElementById(d.getAttribute("startDateInput"))&&k.setAttribute("startDateInput",d.getAttribute("startDateInput")),document.getElementById(d.getAttribute("startTimeInput"))&&k.setAttribute("startTimeInput",d.getAttribute("startTimeInput")),k.setAttribute("pixelPreSpan",f),k.setAttribute("chboxid ",d.getAttribute("chboxid")),k.setAttribute("refid",d.getAttribute("id")),$(k).mousedown(function(M){za(M)}),$(k.ownerDocument).mousemove(function(M){Ca(M)}),
$(k.ownerDocument).mouseup(function(M){Ba(M)});n.appendChild(k);n.style.top=1*q+3+"px"}break;case "1":if(g="true"==ma?-5==g?5:-5:0,q=(c-10)/4+g,n.style.top=q+"px",A=C,!(t>C||t>S||C<K)){C=J(C,1);t<K&&(t=K,u=B);C>S&&(C=13>=parseInt(l,10)||40<=parseInt(l,10)&&49>=parseInt(l,10)||isNaN(l)?J(S,1,null):S,v=E);u<B&&(u=B);u>E&&(u=E);v>E&&(v=E);v<B&&(v=B);I=z(t,K);var fa=z(C,K);if(13>=parseInt(l,10)||40<=parseInt(l,10)&&49>=parseInt(l,10)||isNaN(l)){D=I*f;var ta=fa*f}else{H=0;if("true"==W){for(G=H=0;G<I;G++)0<
L[G]&&H++;I-=H;for(G=H=0;G<fa;G++)0<L[G]&&H++;fa-=H}D=I*Math.ceil(la/T[l])*R[l]+(parseInt(u.substring(0,2),10)-parseInt(B.substring(0,2),10)+(parseInt(u.substring(2),10)-parseInt(B.substring(2),10))/60)*f;ta=(fa-1)*Math.ceil(la/T[l])*R[l]+(parseInt(v.substring(0,2),10)-parseInt(B.substring(0,2),10)+(parseInt(v.substring(2),10)-parseInt(B.substring(2),10))/60)*f}if(!(D>ta)&&(n.style.left=D+"px","true"==ha)){k=document.createElement("img");var na=d.getAttribute("color");if(na)0==na.indexOf("src:")?
k.src=na.substring(4)+".png":k.src="../image/W_"+na.toLowerCase()+".png";else{var ia=d.getAttribute("colorNo");if(ia){var oa=ua[ia];oa||(ia=parseInt(ia,10)%ua.length,oa=ua[ia]);k.src=oa?"../image/W_"+oa+".png":"../image/W_blue.png"}else k.src="../image/empty.png"}F=ta-D;0<aa&&aa<F&&(k.style.paddingLeft=aa+"px",F-=aa);0<ba&&ba<F&&(k.style.paddingRigth=ba+"px",F-=ba);k.style.width=F+"px";k.style.height="10px";13>=parseInt(l,10)||40<=parseInt(l,10)&&49>=parseInt(l,10)||isNaN(l)?k.title=k.alt=t.substring(0,
4)+"/"+t.substring(4,6)+"/"+t.substring(6,8)+"-"+A.substring(0,4)+"/"+A.substring(4,6)+"/"+A.substring(6,8):k.title=k.alt=t.substring(0,4)+"/"+t.substring(4,6)+"/"+t.substring(6,8)+" "+u.substring(0,2)+":"+u.substring(2,4)+"-"+A.substring(0,4)+"/"+A.substring(4,6)+"/"+A.substring(6,8)+" "+v.substring(0,2)+":"+v.substring(2,4);n.appendChild(k);if(document.getElementById(d.getAttribute("startDateInput"))&&null!=d.getAttribute("startDateInput")&&document.getElementById(d.getAttribute("endDateInput"))&&
null!=d.getAttribute("endDateInput")||document.getElementById(d.getAttribute("startTimeInput"))&&null!=d.getAttribute("startTimeInput")&&document.getElementById(d.getAttribute("endTimeInput"))&&null!=d.getAttribute("endTimeInput"))k.setAttribute("type",d.getAttribute("type")),k.setAttribute("startDT",e),k.setAttribute("endDT",r),document.getElementById(d.getAttribute("startDateInput"))&&k.setAttribute("startDateInput",d.getAttribute("startDateInput")),document.getElementById(d.getAttribute("startTimeInput"))&&
k.setAttribute("startTimeInput",d.getAttribute("startTimeInput")),document.getElementById(d.getAttribute("endDateInput"))&&k.setAttribute("endDateInput",d.getAttribute("endDateInput")),document.getElementById(d.getAttribute("endTimeInput"))&&k.setAttribute("endTimeInput",d.getAttribute("endTimeInput")),k.setAttribute("moveStep",d.getAttribute("moveStep")),k.setAttribute("pixelPreSpan",f),k.setAttribute("chboxid",d.getAttribute("chboxid")),k.setAttribute("refid",d.getAttribute("id")),$(k).mousedown(function(M){za(M)}),
$(k.ownerDocument).mousemove(function(M){Ca(M)}),$(k.ownerDocument).mouseup(function(M){Ba(M)});var Ka=document.createElement("br");n.appendChild(Ka)}}}}catch(M){}n.style.fontSize="12px";k&&(d.getAttribute("href")?d.getAttribute("barLink")?(n.appendChild(document.createTextNode(d.getAttribute("text"))),_target=d.getAttribute("target")?d.getAttribute("target"):"CONTENTS",$(n).html('<a href="'+d.getAttribute("href")+'" target="'+_target+'">'+$(n).html()+"</a>")):(e=document.createElement("a"),e.href=
d.getAttribute("href"),e.target=d.getAttribute("target")?d.getAttribute("target"):"CONTENTS",r=document.createTextNode(d.getAttribute("text")),e.appendChild(r),n.appendChild(e)):$(n).append(d.getAttribute("text")));iDiv.appendChild(n);"1"==d.getAttribute("type")&&d.getAttribute("cost")&&Ja(n.getAttribute("stackrow"),n.getAttribute("ganttrow"),t,C,d.getAttribute("cost"))}}function La(){var b=document.getElementById("viewTable");if(null==b)return!1;var a=document.getElementById("ganttHeaderData");if(null==
a)return!1;var c=document.getElementsByTagName("iGantt");if(null==c||0==c.length)return!1;$(".breaktime").hide();var f=a.getAttribute("calDB");if(null==f||0==f.length)return!1;l=a.getAttribute("zoom");K=a.getAttribute("startDate");S=a.getAttribute("endDate");pa=a.getAttribute("daySpan");W=a.getAttribute("skipHoliday");ha=c[0].getAttribute("viewGantt")?c[0].getAttribute("viewGantt"):ha;va=c[0].getAttribute("viewMode")?c[0].getAttribute("viewMode"):va;ea=c[0].getAttribute("stackHoliday")?c[0].getAttribute("stackHoliday"):
ea;Fa=c[0].getAttribute("margeRows");ma=null!=c[0].getAttribute("verticalShift")?c[0].getAttribute("verticalShift"):ma;aa=null!=c[0].getAttribute("paddingLeft")?c[0].getAttribute("paddingLeft"):aa;ba=null!=c[0].getAttribute("paddingRigth")?c[0].getAttribute("paddingRigth"):ba;V=c[0].getAttribute("fixedCols");wa=null!=c[0].getAttribute("useBgColor")?c[0].getAttribute("useBgColor"):wa;viewNumberType=c[0].getAttribute("viewNumberType");if(null==l||null==K||null==S||null==pa||!"0 1 2 3 4 5 6 7 8 9 10 13 20 21 22 23 24 25 26 27 28 29 30 31 DAY WEEK MONTH 40 41 42".split(" ").contains(l))return!1;
B=pa.split("-")[0];E=pa.split("-")[1];P=x(E)-x(B);la=E>B?parseInt(E.substring(0,2),10)-parseInt(B.substring(0,2),10)+(parseInt(E.substring(2),10)-parseInt(B.substring(2),10))/60:24+parseInt(B.substring(0,2),10)-parseInt(E.substring(0,2),10)+(parseInt(B.substring(2),10)-parseInt(E.substring(2),10))/60;if("true"==W||"false"==ea)for(xa=f.length,L=Array(xa),a=0;a<xa;a++)L[a]=f.substr(a,1);var g=$(b).find("THEAD");$(g[0]).find("TR");var q=0;c=b.all?b.all.tags("TBODY"):$(b).find("TBODY");var d=c.length;
$(c[0]).find("TR");var n=$(c[0]).find("TD").length,e=c[0].offsetHeight;"true"==ma?40>e&&(e=40):30>e&&(e=30);var r=new p,t=Array(n),u=Array(n),C=null;for(a=0;a<d;a++){var v=new p;var k=$(c[a]).find("TD");for(var A=null,F=c[a].getAttribute("stackline"),I=c[a].getAttribute("stackrow"),D=0;D<n;D++)if(3>D&&"delete"!=viewNumberType)u[D]="";else if(k[D].firstChild&&"IGANTTBAR"==k[D].firstChild.tagName){A=k[D].childNodes;for(var H=0;H<A.length;H++)A[H].setAttribute("ganttrow",a),v.add(A[H]),A[H].getAttribute("capacity")&&
0<parseFloat(A[H].getAttribute("capacity"))&&document.getElementById("stack_"+c[a].getAttribute("stackrow")).setAttribute("capacity",A[H].getAttribute("capacity"));u[D]="";A=k[D];A.setAttribute("stackrow",I)}else u[D]=k[D].innerHTML;if(0==a)if(t=u.clone(),"true"==F)Da(A,f,e),r.head=null,r.size=0;else for(C=A;v.hasnext();)r.add(v.next());else{if("true"==Fa)for(D=k=0;D<n;D++){if(t[D]!=u[D]){t=u.clone();k=1;break}}else k=1;if(1==k)if(q+=e+2,"true"==F)Da(A,f,e),r.head=null,r.size=0;else for(Ea(C,r,e),
r.head=null,r.size=0,C=A;v.hasnext();)r.add(v.next());else{for(;v.hasnext();)r.add(v.next());c[a].parentNode.removeChild(c[a]);"function"==typeof c.splice&&c.splice(a,1);c.length<d&&(a--,d--)}}}d=c.length;if("true"==wa)for(a=0;a<d;a++)c[a].className="row_"+a%2;if("delete"!=viewNumberType)for(a=0;a<d;a++)$($(c[a]).find("TD")[2]).text(a+1);q+=e+2;Ea(C,r,e);"false"==ha?$("tbody[stackline=false]").hide():"expand"==ha&&$("tbody[stackline=false]").hide();r.head=null;r.size=0;d=$(g[0]).find("SPAN");for(a=
c=0;a<d.length;a++)"breaktime"==d[a].className&&c++;d=$(b).find("SPAN");f=0;if(null!=d)for(a=0;a<d.length;a++)"breaktime"==d[a].className&&(f++,d[a].style.height=f<=c?q+"px":"0px");c=$(b).find("TBODY");d=c.length;for(a=0;a<d;a++)if("true"==c[a].getAttribute("stackline")){f=c[a];b=$(f).find(".stackDiv");q=b[0].defHeight;f=f.getAttribute("capacity")?f.getAttribute("capacity"):1;g=Array(b.length);for(i=n=0;i<b.length;i++){g[i]=0;e=b[i].getAttribute("costList");if(!document.all){if(null==e)continue;e=
e.split(",")}for(j in e)null!=e[j]&&isFinite(e[j])&&(g[i]+=Number(e[j]));g[i]>n&&(n=Number(g[i]))}for(i=0;i<b.length;i++)try{e=1.5*f;r=0;0<n&&(r="1"==va?Math.round(g[i]/n*q):Math.round(g[i]/f*q*2/3));r>q&&(r=q);b[i].style.height=r+"px";b[i].style.top=q-r+"px";var G=$(b[i]);G.removeClass("stdcost");G.removeClass("uppercost");G.removeClass("lowercost");g[i]>e?G.addClass("errorcost"):g[i]<=f?G.addClass("stdcost"):G.addClass("warncost");0!=g[i]&&G.html('<span style="width;'+G.css("width")+'; text-align: center; bottom:0px; font-size: x-small; position: absolute;">'+
g[i].toFixed(2)+"</span>")}catch(fa){}}0<V&&ya("viewTable",V);$(".breaktime").show();$("#viewTable").css("visibility","visible")}function Ga(b,a){"undefined"!=typeof b.checked?a.checked=b.checked:"undefined"!=typeof b.selected?a.selected=b.selected:"textarea"==b.type&&(a.value=b.value);try{for(var c=0;c<b.childNodes.length;c++){var f=b.childNodes.item(c);var g=a.childNodes.item(c);Ga(f,g)}}catch(q){}}function Ha(b,a){this.row=b;this.col=a}function ya(b,a){a=parseInt(a||"0",10);colWidths=[];ourterDiv=
document.createElement("DIV");fixedHeaderDiv=ourterDiv.cloneNode(!1);scrollHeaderBaseDiv=ourterDiv.cloneNode(!1);scrollHeaderDiv=ourterDiv.cloneNode(!1);fixBodyBaseDiv=ourterDiv.cloneNode(!1);fixBodyDiv=ourterDiv.cloneNode(!1);scrollBodyDiv=ourterDiv.cloneNode(!1);scrollBodyTable=document.getElementById(b);if(null==scrollBodyTable)return!1;var c=scrollBodyTable.offsetWidth,f=scrollBodyTable.offsetHeight,g=scrollBodyTable.tHead;b=g?g.offsetHeight:scrollBodyTable.tBody[0].offsetHeight;if(null==scrollBodyTable||
0>=a)return!0;ourterDiv.id="ourterDiv";fixedHeaderDiv.id="fixedHeaderDiv";scrollHeaderBaseDiv.id="scrollHeaderBaseDiv";scrollHeaderDiv.id="scrollHeaderDiv";fixBodyBaseDiv.id="fixBodyBaseDiv";fixBodyDiv.id="fixBodyDiv";scrollBodyDiv.id="scrollBodyDiv";colGroupStyle=document.createElement("COLGROUP");var q=getClientWidth(),d=scrollBodyTable.offsetTop,n=getClientHeight();for(e=scrollBodyTable.getElementsByTagName("COLGROUP").length-1;0<=e;e--)scrollBodyTable.removeChild(scrollBodyTable.getElementsByTagName("COLGROUP")[e]);
sParent=scrollBodyTable.parentNode;sParentHeight=sParent.offsetHeight;sParentWidth=sParent.offsetWidth;var e,r;scrollHeaderTable=scrollBodyTable.cloneNode(!1);scrollHeaderTable.id="scrollHeaderTable";g?scrollHeaderTable.appendChild(g.cloneNode(!0)):(e=scrollBodyTable.tBodies[0],scrollHeaderTable.appendChild(e.cloneNode(!0)));scrollHeaderDiv.appendChild(scrollHeaderTable);fixedHeaderTable=scrollHeaderTable.cloneNode(!0);fixedHeaderTable.id="fixedHeaderTable";fixedHeaderDiv.appendChild(fixedHeaderTable);
fixedBodyTable=scrollBodyTable.cloneNode(!0);Ga(scrollBodyTable,fixedBodyTable);fixedBodyTable.id="fixedBodyTable";fixBodyDiv.appendChild(fixedBodyTable);var t=scrollBodyTable.tBodies[0].rows,u=t.length,C=0,v=0,k=0,A=t[0].cells.length;for(e=0;e<A;e++)k+=t[0].cells[e].colSpan;var F=Array(u),I=Array(u);for(rowId=0;rowId<u+1;rowId++)F[rowId]=Array(k),I[rowId]=0;for(rowId=0;rowId<u;rowId++)for(A=t[rowId].cells.length,colId=0;colId<A;colId++)for(v=t[rowId].cells[colId].rowSpan,C=t[rowId].cells[colId].colSpan,
r=0;r<C;r++){for(e=0;e<v;e++){for(m=0;m<k;m++)null!=F[rowId+e]&&null!=F[rowId+e][I[rowId]]&&I[rowId]++;F[rowId+e][I[rowId]]=new Ha(rowId,colId)}I[rowId]++}v=[];for(r=A=0;r<k;r++)for(e=0;e<u;e++)if(C=t[F[e][r].row].cells[F[e][r].col].colSpan,1==C){v[A]=new Ha(F[e][r].row,F[e][r].col);A++;break}for(e=0;e<k;e++)colWidths[e]=t[v[e].row].cells[v[e].col].offsetWidth;for(e=A=u=r=0;e<k;e++)0<colWidths[e]?colWidths[e]-=0:(e<a&&(r+=0),u+=0),e+=g.rows[0].cells[A++].colSpan-1;a=t[v[a].row].cells[v[a].col].offsetLeft+
r;e=0;for(r=colWidths.length;e<r;e++)colGroupStyle.appendChild(document.createElement("COL")),colGroupStyle.lastChild.setAttribute("width",colWidths[e]+"px"),$(colGroupStyle.lastChild).css("width",colWidths[e]);scrollBodyTable.insertBefore(colGroupStyle.cloneNode(!0),scrollBodyTable.firstChild);$(scrollBodyTable).css("width",c+"px");scrollHeaderTable.insertBefore(colGroupStyle.cloneNode(!0),scrollHeaderTable.firstChild);$(scrollHeaderTable).css("width",c+"px");fixedBodyTable.insertBefore(colGroupStyle.cloneNode(!0),
fixedBodyTable.firstChild);$(fixedBodyTable).css("width",c+"px");fixedHeaderTable.insertBefore(colGroupStyle.cloneNode(!0),fixedHeaderTable.firstChild);$(fixedHeaderTable).css("width",c+"px");sParent.insertBefore(ourterDiv,scrollBodyTable);ourterDiv.appendChild(fixedHeaderDiv);scrollHeaderBaseDiv.appendChild(scrollHeaderDiv);ourterDiv.appendChild(scrollHeaderBaseDiv);ourterDiv.appendChild(fixBodyBaseDiv);fixBodyBaseDiv.appendChild(fixBodyDiv);ourterDiv.appendChild(scrollBodyDiv);scrollBodyDiv.appendChild(scrollBodyTable);
e=scrollBodyTable.getElementsByTagName("input");for(g=e.length;0<=--g;)e[g].setAttribute("disabled","true"),e[g].setAttribute("name",""),e[g].setAttribute("id","");e=scrollBodyTable.getElementsByTagName("select");for(g=e.length;0<=--g;)e[g].setAttribute("disabled","true");fixedHeaderDiv.style.width=a+"px";c+=u;c=c+16>q?q:c+16;d=f+20>n-d?n-d:f+20;ourterDiv.style.width=c+"px";ourterDiv.style.height=d+"px";f="margin-top: "+-1*b+"px;margin-left: "+(-1*a+"px;table-layout: fixed;");f+="visibility:visible;";
b="margin-top: "+b+"px;height: "+(d-b+"px;margin-left: ")+(a+"px;width: ")+(c-a+"px;");scrollBodyDiv.style.cssText=b;scrollBodyTable.style.cssText=f;scrollBodyDiv.onscroll=function(){scrollHeaderDiv.style.right=scrollBodyDiv.scrollLeft+"px";fixBodyDiv.style.top=-1*scrollBodyDiv.scrollTop+"px"};return!0}function Ma(){var b=document.getElementsByTagName("iTask");if(null==b||0==b.length)return!1;var a=document.getElementById("viewTable");if(null==a)return!1;var c=document.getElementById("ganttHeaderData");
if(null==c)return!1;l=c.getAttribute("zoom");a=$(a).find("TBODY")[0].offsetHeight;30>a&&(a=30);c=$(".stackDivParent");var f=c.size();for(i=0;i<f;i++){var g=c[i].childNodes,q=c[i].parentNode,d=parseFloat(c[i].getAttribute("capacity"));q.style.cssText="text-align:left;background-image: url('../image/stackBG"+l+".gif')";c[i].style.height=a+"px";c[i].style.overflow="hidden";c[i].style.top="0px";q=g.length;for(j=0;j<q;j++)if("stackDiv"==g[j].className){g[j].style.left=j*R[l]-1+"px";g[j].style.width=R[l]+
"px";var n=parseFloat(g[j].getAttribute("stackedCost")),e=0;n<=d?($(g[j]).addClass("stdcost"),e=n*a/d*1.5):n<=1.5*d?($(g[j]).addClass("warncost"),e=n*a/d*1.5):n>1.5*d&&($(g[j]).addClass("errorcost"),e=a);g[j].style.height=e+"px";g[j].style.top=a-e+"px";0<n&&$(g[j]).html('<span style="text-align: center; bottom:0px; font-size: x-small; position: absolute;">'+n.toFixed(2)+"</span>")}}V=parseInt(b[0].getAttribute("fixedCols")||"0",10);ya("viewTable",V)}var l,K,S,pa,W,L,ma="true",aa=0,ba=0,Fa="false",
V=0,wa="true",ha="true",va="1",ea="true",la,B,E,P,h=null,Aa,ka,ra,sa,U=null,Y=null,Q=null,Z=null,xa=0,qa=2,N,ja=!1,R={0:48,1:24,2:12,3:56,4:56,5:90,6:60,7:90,8:90,9:60,10:24,13:16,20:48,21:24,22:48,23:24,24:48,25:24,26:48,27:24,28:48,29:24,30:48,31:24,DAY:48,WEEK:48,MONTH:90,40:48,41:48,42:90},T={0:1,1:1,2:1,3:7,4:14,5:30,6:30,7:90,8:180,9:180,10:7,13:1,20:1,21:1,22:2,23:2,24:4,25:4,26:6,27:6,28:8,29:8,30:12,31:12,DAY:1,WEEK:7,MONTH:30,40:1,41:7,42:30},ua={0:"blue",1:"black",2:"brown",3:"green",4:"lightblue",
5:"lightgreen",6:"orange",7:"pink",8:"purple",9:"red",10:"yellow",11:"navy",12:"teal",13:"gray",14:"indigo",15:"slategray",16:"chocolate",17:"darkgreen",18:"violet",19:"darkslategray",20:"lime",21:"aqua",22:"maroon",23:"olive",24:"silver",25:"fuchsia",BK:"black2",WT:"white2",BL:"blue2",RD:"red2",YL:"yellow2",length:26};p.prototype.add=function(b){b={obj:b,next:null};this.head?this.end=this.end.next=b:this.current=this.end=this.head=b;this.size++};p.prototype.next=function(){var b=null;this.current&&
(b=this.current.obj,this.current=this.current.next);return b};p.prototype.hasnext=function(){return null!=this.current?!0:!1};Array.prototype.clone=function(){return Array.apply(null,this)};Array.prototype.contains=function(b){for(var a=0;a<this.length;a++)if(this[a]===b)return!0;return!1};return function(b){addBrowserClass();"adjustTable"==b?(b=document.getElementsByTagName("iTable"),null!=b&&0!=b.length&&(V=parseInt(b[0].getAttribute("fixedCols")||"0",10),ya("viewTable",V))):"adjustGantt"==b?La():
"adjustTask"==b&&Ma()}}();function adjustTable(){0==$("body").width()||100==$("body").width()?setTimeout(function(){adjustTable()},1):adjustGanttTable("adjustTable")}function adjustGantt(){0==$("body").width()||100==$("body").width()?setTimeout(function(){adjustGantt()},1):adjustGanttTable("adjustGantt")}function adjustTask(){0==$("body").width()||100==$("body").width()?setTimeout(function(){adjustTask()},1):adjustGanttTable("adjustTask")};
