// Licensed Materials - Property of IBM // IBM Cognos Products: rs // (C) Copyright IBM Corp. 2003, 2022. // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. var _4de=new _lcm("_4de", "dlgV2TrendLines");_4de._jgn=function(_8rm){this._0jm=_8rm;this._wdd=_dth._ug8(_8rm).cloneNode(true);this._vxe=_dth._l7b(this._wdd, _8rm);this._4le();};_4de._o46=function(){this._fdm();};_4de._fdm=function(){if(this._kgd){this._kgd._fdm();delete this._kgd;}if(this._ad3){this._ad3._fdm();delete this._ad3;}if(this._xp6){this._xp6._fdm();delete this._xp6;}if(this._e3i){delete this._e3i;}if(this._s2n){this._s2n._fdm();delete this._s2n;}delete this._vxe;delete this._wdd;};_4de._5z2=function(){this._79d=[];this._kgd=new _pgk(this._2oh("divTrendLinesList"), _frh._53g("EmptyList"), this);this._xp6=new _0jl(this._2oh("divTrendLinesToolbar"), this._53g("TrendLinesToolbar"), this);var _ozj=this._53g("TrendLinesList");this._s2n=new _lfn(this._2oh("deckMain"));this._xjj=new _pgk(this._2oh("divSeriesOptions"), this._53g("trendLinesSeries"), this);this._d0n._jw8=[];this._d0n._n3f=new _npc( this._2oh( 'tblTxtPolyOrder' ), this._53g( 'Order' ), this, null );this._d0n._jw8.push( {'control':this._d0n._n3f,'enabled':true, 'valid':true} );this._d0n._n3f._mc7(_frh._c6j('IDS_INVALID_PROMPT_RANGE', 2, 6));this._d0n._ylj=new _npc( this._2oh( 'tblTxtMovAvg' ), this._53g( 'Periods' ), this, null );this._d0n._jw8.push( {'control':this._d0n._ylj,'enabled':true, 'valid':true} );this._2oh("divComboChoice").style.display = "none";this._0m6=false;if(this._vxe.nodeName=="v2_combinationChart"&&!_fnl._r76(this._vxe)){this._0m6=true;this._ad3=new _jgk( this._2oh("cboBarLineArea"), _frh._53g("EmptyComboWithSmallIcon"), null, this );}var _enf=this._vxe.selectNodes(".//v2_trendLine");var _mzj=null;for(var i=0; i<_enf.length; i++){var _uqi=_enf.item(i);var _pen=_uqi.selectSingleNode("v2_trendLineType/*").nodeName;_mzj=this._kgd._767();_mzj.setAttribute("iid", _uqi.getAttribute("iid"));_mzj.setAttribute("smallIcon", this._2j7(_uqi));_mzj.setAttribute("label", this._4r8(_pen, _mzj));}this._kgd._wfn();var _pen="";if(_mzj){this._e3i=this._3o2(_mzj);this._kgd._uab(_mzj);_pen=this._e3i.selectSingleNode("v2_trendLineType/*").nodeName;}this._ynk(_pen);};_4de._io9=function(_e5m){if(_e5m._b2g()=="_bd8"){var _mzj=this._kgd._885();var _uqi=this._3o2(_mzj);_mzj.setAttribute("smallIcon", this._2j7(_uqi));this._kgd._wfn();}};_4de._5k8=function(){var _mzj=this._kgd._885();var _uqi=this._3o2(_mzj);var _xni=_uqi.selectSingleNode("v2_trendLineType/v2_movingAverage");_8qn._qie(_xni, "periods", this._d0n._ylj._l3g());};_4de._t96=function(){var _mzj=this._kgd._885();var _uqi=this._3o2(_mzj);var _w9n=_uqi.selectSingleNode("v2_trendLineType/v2_polynomialRegression");var _aqm=parseInt(this._d0n._n3f._l3g(), 10);_8qn._qie(_w9n, "polynomialOrder", _aqm);};_4de._g67=function(_35k,_mzj){if(_35k==this._ad3){var _coi=this._vxe.selectSingleNode(".//*[@iid=" + _cgm._zxc( _mzj.getAttribute("value") ) + "]");var _uqi=this._e3i.parentNode.removeChild(this._e3i);var _2bc=_erh._h56(_coi, "v2_trendLines");_2bc.appendChild(_uqi);_8qn._k5g(this._vxe, ".//v2_trendLines[not(*)]");}};_4de._bgn=function(){_erh._ybb();if(this._0jm.nodeName=="v2_scatterChart"||_fnl._r76(this._0jm)){var _q58=this._0jm;if(_fnl._r76(this._0jm)){_q58=_fnl._xc4(this._0jm);}_8qn._cqh(_q58, "v2_trendLines");var _2bc=this._vxe.selectSingleNode(".//v2_trendLines");if(_2bc){_q58.appendChild(_2bc);}}else{_8qn._k5g(this._0jm, ".//v2_trendLines");var _0va=this._vxe.selectNodes(".//v2_trendLines");for(var i=0;i<_0va.length;i++){var _u94=_8qn._tik(this._vxe, _0va.item(i).parentNode);var _q58=this._0jm.selectSingleNode(_u94);_q58.appendChild(_0va.item(i));}}_erh._iee(true);if(this._e3i){_8l8._axc([this._e3i.getAttribute("iid")], false);}this._3le();};_4de._ovc=function(){var _y1k=this._kgd._885();if(_y1k){if(_y1k.nextSibling){_y1k.nextSibling.setAttribute("selected","true");}else if(_y1k.previousSibling){_y1k.previousSibling.setAttribute("selected","true");}var _uqi=this._3o2(_y1k);_uqi.parentNode.removeChild(_uqi);_8qn._cqh(this._vxe, ".//v2_trendLines[not(*)]");_y1k.parentNode.removeChild(_y1k);var _mzj=this._kgd._885();if(_mzj){this._kgd._uab(_mzj);this._e3i=this._3o2(_mzj);}else{this._e3i=null;}var _rxi=this._e3i?this._e3i.selectSingleNode("v2_trendLineType/*").nodeName:"";this._ynk(_rxi);}};_4de._d7j=function(){if(this._8sb){this._3xh();}var _y1k=this._kgd._885();var _72m=_y1k.previousSibling;_y1k.parentNode.insertBefore(_y1k.parentNode.removeChild(_y1k), _72m);this._u7d();this._kgd._6sc(_y1k);this._kgd._wfn();};_4de._q4g=function(){if(this._8sb){this._3xh();}var _y1k=this._kgd._885();var _72m=_y1k.nextSibling;_y1k.parentNode.insertBefore(_y1k.parentNode.removeChild(_y1k), _72m.nextSibling);this._u7d();this._kgd._6sc(_y1k);this._kgd._wfn();};_4de._1qh=function(_rxi){var _awd=this._td6(_rxi);var _eon=_awd.getAttribute("iid");this._e3i=_awd;this._jh1(_rxi, _awd, _eon);this._ynk(_rxi);};_4de._td6=function(_rxi){var _33m=this._vxe;if(this._vxe.nodeName=="v2_combinationChart"){_33m=_fnl._xc4(this._vxe);}var _a8h=_erh._h56(_33m, "v2_trendLines");var _uqi=_erh._z5b("v2_trendLine/v2_trendLineType/"+_rxi);var _xrm=_erh._z5b("v2_trendLineLabel/v2_chartTextContents/v2_automaticText");_xrm.setAttribute("refQuery", this._vxe.getAttribute("refQuery"));_uqi.appendChild(_xrm);_a8h.appendChild(_uqi);return _uqi;};_4de._jh1=function(_rxi,_awd,_eon){var _mzj=this._kgd._767();_mzj.setAttribute("iid", _eon);var _y1k=this._kgd._885();if(_y1k){_y1k.setAttribute("selected","false");_mzj.parentNode.removeChild(_mzj);_y1k.parentNode.insertBefore(_mzj, _y1k.nextSibling);}_mzj.setAttribute("smallIcon", this._2j7(this._e3i));_mzj.setAttribute("label", this._4r8(_rxi, _mzj));_mzj.setAttribute("selected", "true");};_4de._ynk=function(_rxi){this._kgd._wfn();this._xth(_rxi);this._u7d();this._2oh("divCommonTrendlineOptions").style.visibility = this._e3i?"":"hidden";if(this._e3i){var _mjh=this._e3i.getAttribute("regressionLineType");this._xjj._hwc(_mjh);var _q1b=this._e3i.selectSingleNode("v2_trendLineType/*").nodeName;if(_q1b=="v2_movingAverage"){this._2oh("divEquationOptions").style.display = "none";}else{this._2oh("divEquationOptions").style.display = "block";var _ayj=this._e3i.selectSingleNode(".//v2_equationNote");if(_ayj){if(_ayj.getAttribute("showEquation")=="both"||_ayj.getAttribute("showEquation")=="equation"){this._2oh("chkShowEquation").checked=true;}if(_ayj.getAttribute("showEquation")=="both"||_ayj.getAttribute("showEquation")=="rSquared"){this._2oh("chkShowRSquared").checked=true;}this._8q3("radio_v2_showInLegend", true);this._8q3("radio_v2_showInChart", true);var _3dk=_ayj.selectSingleNode("v2_equationNotePosition/*").nodeName;if(_3dk=="v2_showInLegend"){this._2oh("radio_v2_showInLegend").checked=true;this._2oh("radio_v2_showInChart").checked=false;this._pj8("btnPosition", false);}else{this._2oh("radio_v2_showInLegend").checked=false;this._2oh("radio_v2_showInChart").checked=true;this._pj8("btnPosition", true);}}else{this._8q3("radio_v2_showInLegend", false);this._8q3("radio_v2_showInChart", false);this._pj8("btnPosition", false);this._2oh("chkShowEquation").checked=false;this._2oh("chkShowRSquared").checked=false;}}this._2oh("divComboChoice").style.display = "none";if(this._0m6){this._2oh("divComboChoice").style.display = "";var _db8=this._e3i.parentNode.parentNode.getAttribute("iid");var _a6k=this._ad3._o2g();_fnl._wx(this._vxe, _a6k);this._ad3._hwc(_db8);}}else{this._2oh("divEquationOptions").style.display = "none";this._2oh("divComboChoice").style.display = "none";}};_4de._xth=function(_ncn){switch(_ncn){case "v2_polynomialRegression":this._s2n._ujk(1);this._d0n._n3f._3kk(this._e3i.selectSingleNode(".//v2_polynomialRegression").getAttribute("polynomialOrder"));break;case "v2_movingAverage":this._s2n._ujk(2);this._d0n._ylj._3kk(this._e3i.selectSingleNode(".//v2_movingAverage").getAttribute("periods"));break;default:if(_ncn==""){this._s2n._ujk(0);}else{this._s2n._ujk(3);}break;}};_4de._u7d=function(){var _y1k=this._kgd._885();this._pj8("btnDelete", _y1k);this._pj8("btnUp", _y1k&&_y1k.previousSibling);this._pj8("btnDown", _y1k&&_y1k.nextSibling);};_4de._a7j=function(e){if(e.keyCode==_4qn._qrh){this._ovc();}this._1f7(e);};_4de._2l8=function(_men,_rxi){var _uxm=_n0n._o61(_men, _rxi);if(_uxm===null){return false;}return true;};_4de._pe4=function(_a6k,_mzj,_zdf){if(_a6k._ezm()==this._qf8("divTrendLinesList")){this._e3i=this._3o2(_mzj);var _ycc=this._e3i.selectSingleNode("v2_trendLineType/*");var _pen=_ycc.nodeName;var _uxm=null;this._ynk(_pen);if(_zpn._qsh["hal"]["enableAccessibility"]){_a6k._y86( "label", _mzj.getAttribute( "label" ) );}}else if(_a6k._ezm()==this._qf8("divSeriesOptions")){this._e3i.setAttribute("regressionLineType", _mzj.getAttribute("value"));}};_4de._3o2=function(_mzj){var _eon=_mzj.getAttribute("iid");return this._vxe.selectSingleNode(".//v2_trendLine[@iid='" + _eon + "']");};_4de._4r8=function(_rxi,_mzj){var _mb8=this._3o2(_mzj).selectSingleNode("v2_trendLineLabel/v2_chartTextContents/v2_chartTextItems/v2_chartTextItem/v2_dataSource/staticValue/text()");if(_mb8!=null){return _mb8;}else{return _frh._c6j("IDS_TRENDLINE_"+_rxi);}};_4de._2j7=function(_uqi){return "chart/linestyle_" + _uqi.getAttribute("lineStyle") + ".gif";};_4de._5wh=function(){var _mzj=this._kgd._885();var _uqi=this._3o2(_mzj);var _26n=false;_8fm._jgn( "_bd8", this._xp9(), this, _uqi, "lineStyles", _26n );};_4de._r95=function(){if(this._e3i){var _ban=this._e3i.selectSingleNode("v2_trendLineType/*");if(this._2oh("chkShowEquation").checked==true){var _ayj=_erh._h56(_ban, "v2_equationNote");if(!_ayj.selectSingleNode("*")){_erh._987(_ayj, "v2_equationNotePosition/v2_showInLegend");}var _q9e=_ayj.getAttribute("showEquation");if(_q9e=="rSquared"){_8qn._qie( _ayj, "showEquation", "both" );}}else{var _kud=_ban.selectSingleNode("v2_equationNote[@showEquation='both']");if(_kud){_8qn._qie( _kud, "showEquation", "rSquared" );}else{_8qn._cqh(_ban, "v2_equationNote");}}this._ynk(_ban.nodeName);}};_4de._686=function(){var _o38=this._e3i.selectSingleNode(".//v2_equationNote/*");_8qn._cqh(_o38, "v2_showInLegend");var _xkf=_erh._u0g(_o38, "v2_showInChart");var _xpa=_n0n._ee();_xkf.appendChild(_xpa);var _ban=this._e3i.selectSingleNode("v2_trendLineType/*");this._ynk(_ban.nodeName);};_4de._s95=function(){var _o38=this._e3i.selectSingleNode(".//v2_equationNote/*");_8qn._cqh(_o38, "v2_showInChart");var _xkf=_erh._u0g(_o38, "v2_showInLegend");var _ban=this._e3i.selectSingleNode("v2_trendLineType/*");this._ynk(_ban.nodeName);};_4de._t95=function(){if(this._e3i){var _ban=this._e3i.selectSingleNode("v2_trendLineType/*");if(this._2oh("chkShowRSquared").checked==true){var _ayj=_ban.selectSingleNode("v2_equationNote[@showEquation='equation']");if(_ayj){_8qn._qie( _ayj, "showEquation", "both" );}else{var _cmi=_erh._h56(_ban, "v2_equationNote");_8qn._qie( _cmi, "showEquation", "rSquared" );if(!_cmi.selectSingleNode("*")){_erh._987(_cmi, "v2_equationNotePosition/v2_showInLegend");}}}else{var _kud=_ban.selectSingleNode("v2_equationNote[@showEquation='both']");if(_kud){_8qn._qie( _kud, "showEquation", "equation" );}else{_8qn._cqh(_ban, "v2_equationNote");}}this._ynk(_ban.nodeName);}};_4de._op8=function(){_8fm._jgn( "_uk3", this._xp9(), this._e3i.selectSingleNode(".//v2_showInChart"), this._wdd, this );};_4de._9bj=function(){var _hxi;var _3yf;var _8cn=_38g._g0n;if(_8cn instanceof _2ce){var _33m=_8cn._l87(_ath._rh2(this._vxe));if(_33m){_hxi=_4qn._sp9(_33m).direction;_3yf=_4qn._sp9(_33m).unicodeBidi;}}var _qjc=_frh._c6j("IDS_DLG_V2TRENDLINELABEL");_8fm._jgn("_im9", this._xp9(), this, _qjc, this._e3i, _hxi, _3yf, false);};_4de._i7=function(_rgc){for(var i=0;i