var A_N=AdfRichUIPeer.createPeerClass(AdfDhtmlBaseGanttPeer,"AdfDhtmlGanttPeer");A_a("AdfDhtmlGanttPeer",A_N);
A_N.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.rE="p";this.sE="s"};A_=A_N.prototype;A_.ResizeNotify=function(a,b,c,d){A_N.superclass.ResizeNotify.call(this,a,b,c,d);a=this.getDomElement();AdfAgent.AGENT.getPlatform()!=AdfAgent.IE_PLATFORM&&a.addEventListener("DOMMouseScroll",hmw,!0);a=this.getComponent().getClientId()+AdfDhtmlBaseGanttPeer.D+AdfDhtmlBaseGanttPeer.sa;a=AdfPage.PAGE.findComponent(a).getPeer();this.zN=a.HandleDomKeyDown;a.HandleDomKeyDown=A_N.prototype.HandleDomKeyDown;a.constructor._domEventHandlers.keydown=A_N.prototype.HandleDomKeyDown};
function hmw(a,b){1==a.ctrlKey&&(a.cancelBubble=!0,null==b&&(b=a.currentTarget.id),AdfPage.PAGE.findComponent(b).getPeer().ax(a),AdfAgent.AGENT.eatEvent(a))}A_.li=function(a){return AdfAgent.AGENT.getMousePosition(a)};function A_Gc(a){var b=0;if(null!=a&&a.offsetParent)for(b+=a.offsetWidth;a.offsetParent;)b+=a.offsetLeft,a=a.offsetParent;return a.offsetWidth-b}function A_fd(a,b){var c=A_Gc(b),d=A_G(a);return c+d.scrollLeft}
A_.C=function(a){if(AdfPage.PAGE.getLocaleContext().isRightToLeft()){a=AdfAgent.AGENT.getMousePosition(a);var b=this.getDomElement(),c;c=b;if(null!=c&&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_.pa=function(a){a=AdfAgent.AGENT.getMousePosition(a);var b=AdfAgent.AGENT.getElementTop(this.getDomElement());return Math.max(0,a.y-b)};A_.td=function(){return A_G(this)};
A_.kb=function(a){var b=a.getNativeEventTarget();A_Ed(this);if(null!=b&&"IMG"==b.nodeName){var c=b.parentNode;null!=c&&c.getAttribute("dpType")&&A_Kc(this,a.getNativeEvent(),c)}"bg"==b.getAttribute("part")&&(b=b.parentNode);if(null!=b&&null!=b.parentNode)if(c=a.getNativeEvent(),b=A_J(this,b.parentNode,"down"),null!=b&&null!=b.getAttribute("down"))"sd"==b.getAttribute("down")&&this.startDrag(c);else{var d=this.getComponent().getClientId()+AdfDhtmlBaseGanttPeer.D+AdfDhtmlBaseGanttPeer.sa,e=a.getSource().getClientId(),
b=a.getNativeEventTarget();"bg"==b.getAttribute("part")&&(b=b.parentNode);a=b.getAttribute("id");b=b.getAttribute(AdfDhtmlBaseGanttPeer.l);null!=e&&-1!=e.indexOf(d)&&null==b&&null!=a&&-1==a.indexOf("scroller")&&this.Et(c)}};A_a("AdfDhtmlGanttPeer.prototype.HandleComponentMouseDown",A_N.prototype.kb);
A_N.prototype.HandleComponentMouseOver=function(a){var b=a.getNativeEventTarget(),b=A_J(this,b,"over");null!=b&&null!=b.getAttribute("over")&&(a=a.getNativeEvent(),b=b.getAttribute("over"),"src"==b?this.wo(a):"sst"==b?this.Ct(a):"smc"==b?this.vo(a):"smec"==b?this.zt(a):"sdt"==b&&this.Yz(a))};A_a("AdfDhtmlGanttPeer.prototype.HandleComponentMouseOver",A_N.prototype.HandleComponentMouseOver);
A_N.prototype.Ib=function(a){var b=a.getNativeEvent();this.Pk&&(a.getClientX()>=AdfAgent.AGENT.getElementPageBounds(this.getDomElement()).right||A_Fd(b))&&this.ts(b);var c=a.getNativeEventTarget(),c=A_J(this,c,"out");null!=c&&null!=c.getAttribute("out")&&(b=a.getNativeEvent(),a=c.getAttribute("out"),"rc"==a?this.ql(b):"hst"==a?this.wz():"rec"==a?this.pt(b):"hdt"==a&&this.vz(b))};A_a("AdfDhtmlGanttPeer.prototype.HandleComponentMouseOut",A_N.prototype.Ib);
A_N.prototype.$c=function(a){var b=a.getNativeEvent().keyCode,c=this.getComponent().getClientId()+AdfDhtmlBaseGanttPeer.D+AdfDhtmlBaseGanttPeer.sa;switch(b){case AdfKeyStroke.TAB_KEY:if(a=AdfFocusUtils.FT(a.getNativeEventTarget()),null!=a&&c==a.id)a:{this.getComponent().getClientId();c=AdfPage.PAGE.findComponent(A_E(this));if(!this.ui()){c=c.getSelectedRowKeys();a=null;for(var d in c){a=d;break}if(a&&(d=A_Nc(this,a),d.Ra)){this.N=A_Mc(this,d.Ra);break a}}if(null==this.N){if(d=A_Pc(this),null!=d&&
null!=d.Ra){c=A_Mc(this,d.Ra);if(null==c)break a;this.ui()?(this.yf(c,"focus"),this.N=c,this.Ab=d.Y):(this.N=c,d=d.Y,c=this.getComponent().getClientId(),a=AdfPage.PAGE.findComponent(c+AdfDhtmlBaseGanttPeer.D+AdfDhtmlBaseGanttPeer.Pb),b={},AdfCollections.copyInto(b,a.getSelectedRowKeys()),b[d]=!0,a.setSelectedRowKeys(b),AdfPage.PAGE.findComponent(c+AdfDhtmlBaseGanttPeer.D+AdfDhtmlBaseGanttPeer.sa).setProperty("selectedRowKeys",b,!1,AdfUIComponent.PROPAGATE_NEVER))}}else this.ui()&&this.yf(this.N,"focus");
null!=this.N&&A_Lc(this,this.N)}}};A_a("AdfDhtmlGanttPeer.prototype.HandleComponentKeyDown",A_N.prototype.$c);A_N.prototype.HandleComponentKeyUp=function(a){17==a.getNativeEvent().keyCode&&this.Dl&&(null!=this.Bo&&clearTimeout(this.Bo),this.Dl=!1,A_0c(this).style.display="none",this.zoom(a))};A_a("AdfDhtmlGanttPeer.prototype.HandleComponentKeyUp",A_N.prototype.HandleComponentKeyUp);
A_N.prototype.HandleDomKeyDown=function(a,b){var c=this.getComponent().getClientId(),d=AdfPage.PAGE.findComponent(c.substring(0,c.length-4));null!=d&&(d=d.getPeer(),c!=A_E(d)?c==A_Bc(d)&&this.HandleDomKeyDown(a,b):d.Qe(a,b))};A_a("AdfDhtmlGanttPeer.prototype.HandleDomKeyDown",A_N.prototype.HandleDomKeyDown);
A_N.prototype.Td=function(a,b){var c=b.keyCode;c!=AdfKeyStroke.ARROWUP_KEY&&c!=AdfKeyStroke.ARROWDOWN_KEY&&c!=AdfKeyStroke.ARROWLEFT_KEY||null==this.cb||this.cb.removeAttribute("tabIndex");this.zN.call(a.getPeer(),a,b)};
A_N.prototype.Qe=function(a,b){var c=!1;switch(b.keyCode){case 77:if(b.ctrlKey&&b.altKey){var c=this.getComponent().getClientId(),d=A_E(this),d=AdfPage.PAGE.findComponent(d);if(!this.ui()){var d=d.getSelectedRowKeys(),e;for(e in d){selectedRowKey=e;break}if(selectedRowKey)var f=A_Nc(this,selectedRowKey);e=A_Mc(this,f.Ra);e!=this.N&&(this.N=e)}null!=this.N&&(f=parseInt(AdfAgent.AGENT.getElementLeft(this.N))+5,d=parseInt(AdfAgent.AGENT.getElementTop(this.N))+5,e={},e[A_d.TYPE]=A_d.Bu,e[A_d.Hl]=A_d.Ot,
e[A_d.Xi]={x:f,y:d},e[A_d.aC]=!0,c=c+AdfDhtmlBaseGanttPeer.D+A_Jc(this),AdfPage.PAGE.findComponent(c).show(e));A_Ed(this);c=!0}}c?AdfAgent.AGENT.eatEvent(b):this.Td(a,b)};function A_Ed(a){a.Dh&&null!=a.Dh&&(a.Dh.firstChild.src=a.Dh.firstChild.getAttribute("src_ena"),a.Dh.setAttribute("dep_selected",!1),a.Dh=null)}
function A_Gd(a){if(null!=a.N){a.Ab=A_H(a,a.N);for(var b=a.Ab,c=AdfAgent.AGENT,d=A_F(a).childNodes,e={},f=d.length-1;0<=f&&!e.Y;--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.ca);if(null==b){e.Y=n;e.Ra=m;break}else if(n==b){e.lM=n;0<=l-1?(m=h[l-1],n=c.getAttribute(m,AdfDhtmlBaseGanttPeer.ca),e.Y=n,e.Ra=m):0<=f-1?(h=d[f-1].rows,0<h.length&&(m=h[h.length-1],n=c.getAttribute(m,AdfDhtmlBaseGanttPeer.ca),e.Y=n,e.Ra=m)):0==c.getIntAttribute(g,"_startRow",
-1)&&(e.dU=!0);break}}null!=e&&null!=e.Ra&&(a.Ab=e.Y,a.bi(a.N,"up"),a.N=A_Mc(a,e.Ra),a.yf(a.N,"up"),a.Xb(a.N),A_Lc(a,a.N));a.no=!0}}function A_Hd(a){if(null!=a.N){a.Ab=A_H(a,a.N);var b=A_hd(a,a.Ab);null!=b&&null!=b.Ra&&(a.Ab=b.Y,a.bi(a.N,"down"),a.N=A_Mc(a,b.Ra),a.yf(a.N,"down"),a.Xb(a.N),A_Lc(a,a.N));a.no=!0}}
function A_Id(a){if(null!=a.N){var b;b=a.N;if(AdfPage.PAGE.isScreenReaderMode())b=b.parentNode.previousSibling,b=null==b?null:b.firstChild;else for(b=b.previousSibling;null!=b&&null==b.getAttribute(AdfDhtmlBaseGanttPeer.v);)b=b.previousSibling;null==b||null==b.getAttribute(AdfDhtmlBaseGanttPeer.v)?(a.Ab=A_H(a,a.N),a.bi(a.N,"left")):(a.bi(a.N,"left"),null!=b&&(a.yf(b,"left"),a.Xb(b),a.N=b),A_Lc(a,a.N))}}
function A_Jd(a){if(null!=a.N){var b;b=a.N;if(AdfPage.PAGE.isScreenReaderMode())b=b.parentNode.nextSibling,b=null==b?null:b.firstChild;else for(b=b.nextSibling;null!=b&&null==b.getAttribute(AdfDhtmlBaseGanttPeer.v);)b=b.nextSibling;if(null==b||null==b.getAttribute(AdfDhtmlBaseGanttPeer.v)){a.Ab=A_H(a,a.N);var c=A_hd(a,a.Ab);null!=c&&null!=c.Ra?(b=A_Mc(a,c.Ra),a.Ab=c.Y):b=a.N}a.bi(a.N,"right");null!=b&&(a.yf(b,"right"),a.Xb(b),a.N=b);A_Lc(a,a.N)}}
A_N.prototype.ai=function(a,b,c){if(null!=this.dragger){if(this.ga&&null!=this.getComponent().getDragSource()){if(this.yt(a)){this.ht=!0;this.Eg(a);AdfPage.PAGE.Bl();return}this.ht=!1}A_Kd(this,a)||A_Fd(a)?this.sc?this.$h(a):this.Eg(a):A_N.superclass.ai.call(this,a,b,c)}};A_N.prototype.contDrag=A_N.prototype.ai;
A_N.prototype.Ie=function(a,b,c){this.ga&&null!=this.getComponent().getDragSource()&&(this.ll=null,this.Jz=!0);this.ja&&(A_Kd(this,a)||A_Fd(a))?this.sc?this.$h(a):this.Eg(a):A_N.superclass.Ie.call(this,a,b,c)};A_N.prototype.endDrag=A_N.prototype.Ie;
function A_Kd(a,b){var c=A_E(a),c=AdfPage.PAGE.findComponent(c).getPeer().getDomElement(),d=AdfAgent.AGENT;return d.getPlatform()==AdfAgent.IE_PLATFORM&&8>=d.getVersion()?!d.pointInElementBounds(c,b.clientX+c.scrollLeft,b.clientY+c.scrollTop):!d.pointInElementBounds(c,b.pageX,b.pageY)}
function A_Fd(a){var b=document.documentElement;0==b.offsetHeight&&(b=document.body);var c=AdfAgent.AGENT;return c.getPlatform()==AdfAgent.IE_PLATFORM&&8>=c.getVersion()?!c.pointInElementBounds(b,a.clientX+b.scrollLeft,a.clientY+b.scrollTop):!c.pointInElementBounds(b,a.clientX,a.clientY)}function A_Ld(a,b){var c=A_E(a);return null!=b&&b.length>c.length&&b.substr(0,c.length)==c&&0<b.lastIndexOf(":")}
function A_Md(a,b){var c=a.Wk(b);null!=c&&(a.Ss(c),c=AdfDhtmlBaseGanttPeer.createSubId(a.getComponent().getClientId(),null,"ni"),AdfAgent.AGENT.getElementById(c).textContent=A_K(a,"nav_instr_to_data"))}
A_N.prototype.Df=function(a){a=a.getNativeEventTarget();var b;if(b=null!=this.Tx){b=this.Tx.id;var c=A_Bc(this);b=null!=b&&b.length>c.length&&b.substr(0,c.length)==c&&0<b.lastIndexOf(":")}b?A_Ld(this,a.id)?A_Md(this,a):"TD"==a.nodeName&&null==a.nextSibling&&(b=AdfDhtmlBaseGanttPeer.createSubId(this.getComponent().getClientId(),null,"ni"),AdfAgent.AGENT.getElementById(b).textContent=A_K(this,"nav_instr_to_chart")):"TD"==a.nodeName&&null!=a.id&&5<a.id.length&&":tsbc"==a.id.substr(a.id.length-5)&&A_Ld(this,
a.id)&&this.no&&(this.no=!1,null!=this.N?this.N.focus():A_Md(this,a));this.Tx=a};A_a("AdfDhtmlGanttPeer.prototype.HandleComponentFocus",A_N.prototype.Df);A_N.prototype.Ss=function(a){this.Xb(a)};