var A_S=AdfRichUIPeer.createPeerClass(AdfDhtmlBaseGanttPeer,"AdfDhtmlGanttPeer");A_h("AdfDhtmlGanttPeer",A_S);
A_S.InitSubclass=function(){AdfRichUIPeer.addComponentEventHandlers(this,AdfUIInputEvent.MOUSE_IN_EVENT_TYPE);AdfRichUIPeer.addComponentEventHandlers(this,AdfUIInputEvent.MOUSE_OUT_EVENT_TYPE);AdfRichUIPeer.addComponentEventHandlers(this,AdfUIInputEvent.MOUSE_DOWN_EVENT_TYPE);AdfRichUIPeer.addComponentEventHandlers(this,AdfUIInputEvent.KEY_DOWN_EVENT_TYPE);AdfRichUIPeer.addComponentEventHandlers(this,AdfUIInputEvent.KEY_UP_EVENT_TYPE);AdfRichUIPeer.addComponentEventHandlers(this,AdfComponentEvent.FOCUS_EVENT_TYPE);
this.xD="p";this.yD="s"};A_g=A_S.prototype;A_g.ResizeNotify=function(a,b,c,d){A_S.superclass.ResizeNotify.call(this,a,b,c,d);a=this.getDomElement();AdfAgent.AGENT.getPlatform()!=AdfAgent.IE_PLATFORM&&a.addEventListener("DOMMouseScroll",hmw,A_b);a=this.getComponent().getClientId()+AdfDhtmlBaseGanttPeer.u+AdfDhtmlBaseGanttPeer.la;a=AdfPage.PAGE.findComponent(a).getPeer();this.FM=a.HandleDomKeyDown;a.HandleDomKeyDown=A_S.prototype.HandleDomKeyDown;a.constructor._domEventHandlers.keydown=A_S.prototype.HandleDomKeyDown};
function hmw(a,b){a.ctrlKey==A_b&&(a.cancelBubble=A_b,b==A_&&(b=a.currentTarget.id),AdfPage.PAGE.findComponent(b).getPeer().mw(a),AdfAgent.AGENT.eatEvent(a))}A_g.Uh=function(a){return AdfAgent.AGENT.getMousePosition(a)};function A_Jc(a){var b=0;if(a!=A_&&a.offsetParent)for(b+=a.offsetWidth;a.offsetParent;)b+=a.offsetLeft,a=a.offsetParent;return a.offsetWidth-b}function A_jd(a,b){var c=A_Jc(b),d=A_M(a);return c+d.scrollLeft}
A_g.t=function(a){if(AdfPage.PAGE.getLocaleContext().isRightToLeft()){a=AdfAgent.AGENT.getMousePosition(a);var b=this.getDomElement(),c;c=b;if(c!=A_&&c.offsetParent)for(;c.offsetParent;)c=c.offsetParent;c=c.offsetWidth;var d=AdfAgent.AGENT.getElementLeft(this.getDomElement());return Math.max(0,c-a.x-(c-(d+b.offsetWidth)))}a=AdfAgent.AGENT.getMousePosition(a);this.getDomElement();b=AdfAgent.AGENT.getElementLeft(this.getDomElement());return Math.max(0,a.x-b)};
A_g.ha=function(a){a=AdfAgent.AGENT.getMousePosition(a);var b=AdfAgent.AGENT.getElementTop(this.getDomElement());return Math.max(0,a.y-b)};A_g.md=function(){return A_M(this)};
A_g.bb=function(a){var b=a.getNativeEventTarget();A_Jd(this);if(b!=A_&&"IMG"==b.nodeName){var c=b.parentNode;c!=A_&&c.getAttribute("dpType")&&A_Nc(this,a.getNativeEvent(),c)}"bg"==b.getAttribute("part")&&(b=b.parentNode);if(b!=A_&&b.parentNode!=A_)if(c=a.getNativeEvent(),b=A_P(this,b.parentNode,"down"),b!=A_&&b.getAttribute("down")!=A_)"sd"==b.getAttribute("down")&&this.startDrag(c);else{var d=this.getComponent().getClientId()+AdfDhtmlBaseGanttPeer.u+AdfDhtmlBaseGanttPeer.la,e=a.getSource().getClientId(),
b=a.getNativeEventTarget();"bg"==b.getAttribute("part")&&(b=b.parentNode);a=b.getAttribute("id");b=b.getAttribute(AdfDhtmlBaseGanttPeer.j);e!=A_&&(-1!=e.indexOf(d)&&b==A_&&a!=A_&&-1==a.indexOf("scroller"))&&this.Ss(c)}};A_h("AdfDhtmlGanttPeer.prototype.HandleComponentMouseDown",A_S.prototype.bb);
A_S.prototype.HandleComponentMouseOver=function(a){var b=a.getNativeEventTarget(),b=A_P(this,b,"over");b!=A_&&b.getAttribute("over")!=A_&&(a=a.getNativeEvent(),b=b.getAttribute("over"),"src"==b?this.Nn(a):"sst"==b?this.Qs(a):"smc"==b?this.Mn(a):"smec"==b?this.Ns(a):"sdt"==b&&this.kz(a))};A_h("AdfDhtmlGanttPeer.prototype.HandleComponentMouseOver",A_S.prototype.HandleComponentMouseOver);
A_S.prototype.Ab=function(a){var b=a.getNativeEvent();this.qk&&(a.getClientX()>=AdfAgent.AGENT.getElementPageBounds(this.getDomElement()).right||A_Kd(b))&&this.Hr(b);var c=a.getNativeEventTarget(),c=A_P(this,c,"out");c!=A_&&c.getAttribute("out")!=A_&&(b=a.getNativeEvent(),a=c.getAttribute("out"),"rc"==a?this.Pk(b):"hst"==a?this.Jy():"rec"==a?this.Es(b):"hdt"==a&&this.Iy(b))};A_h("AdfDhtmlGanttPeer.prototype.HandleComponentMouseOut",A_S.prototype.Ab);
A_S.prototype.Sc=function(a){var b=a.getNativeEvent().keyCode,c=this.getComponent().getClientId()+AdfDhtmlBaseGanttPeer.u+AdfDhtmlBaseGanttPeer.la;switch(b){case AdfKeyStroke.TAB_KEY:if(a=AdfFocusUtils.tT(a.getNativeEventTarget()),a!=A_&&c==a.id)a:{this.getComponent().getClientId();c=AdfPage.PAGE.findComponent(A_L(this));if(!this.ci()){c=c.getSelectedRowKeys();a=A_;for(var d in c){a=d;break}if(a&&(d=A_Qc(this,a),d.Ia)){this.C=A_Pc(this,d.Ia);break a}}if(this.C==A_){if(d=A_Sc(this),d!=A_&&d.Ia!=A_){c=
A_Pc(this,d.Ia);if(c==A_)break a;this.ci()?(this.kf(c,"focus"),this.C=c,this.rb=d.P):(this.C=c,d=d.P,c=this.getComponent().getClientId(),a=AdfPage.PAGE.findComponent(c+AdfDhtmlBaseGanttPeer.u+AdfDhtmlBaseGanttPeer.Zb),b={},AdfCollections.copyInto(b,a.getSelectedRowKeys()),b[d]=A_b,a.setSelectedRowKeys(b),AdfPage.PAGE.findComponent(c+AdfDhtmlBaseGanttPeer.u+AdfDhtmlBaseGanttPeer.la).setProperty("selectedRowKeys",b,A_c,AdfUIComponent.PROPAGATE_NEVER))}}else this.ci()&&this.kf(this.C,"focus");this.C!=
A_&&A_Oc(this,this.C)}}};A_h("AdfDhtmlGanttPeer.prototype.HandleComponentKeyDown",A_S.prototype.Sc);A_S.prototype.HandleComponentKeyUp=function(a){17==a.getNativeEvent().keyCode&&this.bl&&(this.Sn!=A_&&clearTimeout(this.Sn),this.bl=A_c,A_4c(this).style.display="none",this.zoom(a))};A_h("AdfDhtmlGanttPeer.prototype.HandleComponentKeyUp",A_S.prototype.HandleComponentKeyUp);
A_S.prototype.HandleDomKeyDown=function(a,b){var c=this.getComponent().getClientId(),d=AdfPage.PAGE.findComponent(c.substring(0,c.length-4));d!=A_&&(d=d.getPeer(),c!=A_L(d)?c==A_Dc(d)&&this.HandleDomKeyDown(a,b):d.De(a,b))};A_h("AdfDhtmlGanttPeer.prototype.HandleDomKeyDown",A_S.prototype.HandleDomKeyDown);
A_S.prototype.Kd=function(a,b){var c=b.keyCode;(c==AdfKeyStroke.ARROWUP_KEY||c==AdfKeyStroke.ARROWDOWN_KEY||c==AdfKeyStroke.ARROWLEFT_KEY)&&this.Va!=A_&&this.Va.removeAttribute("tabIndex");this.FM.call(a.getPeer(),a,b)};
A_S.prototype.De=function(a,b){var c=A_c;switch(b.keyCode){case 77:if(b.ctrlKey&&b.altKey){var c=this.getComponent().getClientId(),d=A_L(this),d=AdfPage.PAGE.findComponent(d);if(!this.ci()){var d=d.getSelectedRowKeys(),e;for(e in d){selectedRowKey=e;break}if(selectedRowKey)var f=A_Qc(this,selectedRowKey);e=A_Pc(this,f.Ia);e!=this.C&&(this.C=e)}this.C!=A_&&(f=parseInt(AdfAgent.AGENT.getElementLeft(this.C))+5,d=parseInt(AdfAgent.AGENT.getElementTop(this.C))+5,e={},e[A_k.TYPE]=A_k.Ot,e[A_k.gl]=A_k.at,
e[A_k.ul]={x:f,y:d},e[A_k.kB]=A_b,c=c+AdfDhtmlBaseGanttPeer.u+A_Mc(this),AdfPage.PAGE.findComponent(c).show(e));A_Jd(this);c=A_b}}c?AdfAgent.AGENT.eatEvent(b):this.Kd(a,b)};function A_Jd(a){a.nh&&a.nh!=A_&&(a.nh.firstChild.src=a.nh.firstChild.getAttribute("src_ena"),a.nh.setAttribute("dep_selected",A_c),a.nh=A_)}
function A_Ld(a){if(a.C!=A_){a.rb=A_N(a,a.C);for(var b=a.rb,c=AdfAgent.AGENT,d=A_Ec(a).childNodes,e={},f=d.length-1;0<=f&&!e.P;--f)for(var g=d[f],h=d[f].rows,l=h.length-1;0<=l;--l){var m=h[l],n=c.getAttribute(m,AdfDhtmlBaseGanttPeer.W);if(b==A_){e.P=n;e.Ia=m;break}else if(n==b){e.vL=n;0<=l-1?(m=h[l-1],n=c.getAttribute(m,AdfDhtmlBaseGanttPeer.W),e.P=n,e.Ia=m):0<=f-1?(h=d[f-1].rows,0<h.length&&(m=h[h.length-1],n=c.getAttribute(m,AdfDhtmlBaseGanttPeer.W),e.P=n,e.Ia=m)):0==c.getIntAttribute(g,"_startRow",
-1)&&(e.RT=A_b);break}}e!=A_&&e.Ia!=A_&&(a.rb=e.P,a.Kh(a.C,"up"),a.C=A_Pc(a,e.Ia),a.kf(a.C,"up"),a.Ob(a.C),A_Oc(a,a.C));a.Fn=A_b}}function A_Md(a){if(a.C!=A_){a.rb=A_N(a,a.C);var b=A_ld(a,a.rb);b!=A_&&b.Ia!=A_&&(a.rb=b.P,a.Kh(a.C,"down"),a.C=A_Pc(a,b.Ia),a.kf(a.C,"down"),a.Ob(a.C),A_Oc(a,a.C));a.Fn=A_b}}
function A_Nd(a){if(a.C!=A_){var b;for(b=a.C.previousSibling;b!=A_&&b.getAttribute(AdfDhtmlBaseGanttPeer.p)==A_;)b=b.previousSibling;b==A_||b.getAttribute(AdfDhtmlBaseGanttPeer.p)==A_?(a.rb=A_N(a,a.C),a.Kh(a.C,"left")):(a.Kh(a.C,"left"),b!=A_&&(a.kf(b,"left"),a.Ob(b),a.C=b),A_Oc(a,a.C))}}
function A_Od(a){if(a.C!=A_){var b;for(b=a.C.nextSibling;b!=A_&&b.getAttribute(AdfDhtmlBaseGanttPeer.p)==A_;)b=b.nextSibling;if(b==A_||b.getAttribute(AdfDhtmlBaseGanttPeer.p)==A_){a.rb=A_N(a,a.C);var c=A_ld(a,a.rb);c!=A_&&c.Ia!=A_?(b=A_Pc(a,c.Ia),a.rb=c.P):b=a.C}a.Kh(a.C,"right");b!=A_&&(a.kf(b,"right"),a.Ob(b),a.C=b);A_Oc(a,a.C)}}
A_S.prototype.Jh=function(a,b,c){if(this.dragger!=A_){if(this.$&&this.getComponent().getDragSource()!=A_){if(this.Ms(a)){this.vs=A_b;this.pg(a);AdfPage.PAGE.$k();return}this.vs=A_c}A_Pd(this,a)||A_Kd(a)?this.kc?this.Ih(a):this.pg(a):A_S.superclass.Jh.call(this,a,b,c)}};A_h("AdfDhtmlGanttPeer.prototype.contDrag",A_S.prototype.Jh);
A_S.prototype.ve=function(a,b,c){this.$&&this.getComponent().getDragSource()!=A_&&(this.Gn=A_,this.Wy=A_b);this.ca&&(A_Pd(this,a)||A_Kd(a))?this.kc?this.Ih(a):this.pg(a):A_S.superclass.ve.call(this,a,b,c)};A_h("AdfDhtmlGanttPeer.prototype.endDrag",A_S.prototype.ve);
function A_Pd(a,b){var c=A_L(a),c=AdfPage.PAGE.findComponent(c).getPeer().getDomElement(),d=AdfAgent.AGENT;return d.getPlatform()==AdfAgent.IE_PLATFORM?!d.pointInElementBounds(c,b.clientX+c.scrollLeft,b.clientY+c.scrollTop):!d.pointInElementBounds(c,b.clientX,b.clientY)}
function A_Kd(a){var b=document.documentElement;0==b.offsetHeight&&(b=document.body);var c=AdfAgent.AGENT;return c.getPlatform()==AdfAgent.IE_PLATFORM?!c.pointInElementBounds(b,a.clientX+b.scrollLeft,a.clientY+b.scrollTop):!c.pointInElementBounds(b,a.clientX,a.clientY)}function A_Qd(a,b){var c=A_L(a);return b!=A_&&b.length>c.length&&b.substr(0,c.length)==c&&0<b.lastIndexOf(":")}
function A_Rd(a,b){var c=a.xk(b);c!=A_&&(a.fs(c),c=AdfDhtmlBaseGanttPeer.createSubId(a.getComponent().getClientId(),A_,"ni"),AdfAgent.AGENT.getElementById(c).textContent=A_Q(a,"nav_instr_to_data"))}
A_S.prototype.pf=function(a){a=a.getNativeEventTarget();var b;if(b=this.dx!=A_){b=this.dx.id;var c=A_Dc(this);b=b!=A_&&b.length>c.length&&b.substr(0,c.length)==c&&0<b.lastIndexOf(":")}b?A_Qd(this,a.id)?A_Rd(this,a):"TD"==a.nodeName&&a.nextSibling==A_&&(b=AdfDhtmlBaseGanttPeer.createSubId(this.getComponent().getClientId(),A_,"ni"),AdfAgent.AGENT.getElementById(b).textContent=A_Q(this,"nav_instr_to_chart")):"TD"==a.nodeName&&(a.id!=A_&&5<a.id.length&&":tsbc"==a.id.substr(a.id.length-5))&&(A_Qd(this,
a.id)&&this.Fn)&&(this.Fn=A_c,this.C!=A_?this.C.focus():A_Rd(this,a));this.dx=a};A_h("AdfDhtmlGanttPeer.prototype.HandleComponentFocus",A_S.prototype.pf);A_S.prototype.fs=function(a){this.Ob(a)};