// Copyright (C) 2008 Cognos ULC, an IBM Company. All Rights Reserved.
// Cognos and the Cognos logo are trademarks of Cognos ULC (formerly Cognos Incorporated) in the United States and/or other countries. IBM and the IBM logo are trademarks of International Business Machines Corporation in the United States, or other countries, or both. Other company, product, or service names may be trademarks or service marks of others.
var Debug=new Object();Debug._sj=false;Debug.SetDebugEnabled=function(_Ub){Debug._sj=_Ub;};Debug.IsEnabled=function(){return Debug._sj;};Debug.ShowConsole=function(){/*@if(@bering_debug)@*/if(this._sj){try{if((!this.m_win||this.m_win.closed)&&!this.m_win_loading){this.m_win_loading=true;var _are="edge:sunken; dialogWidth:700px; dialogHeight:250px; resizable:yes; status:no; dialogTop:"+String(window.screen.availHeight-250)+"; dialogLeft:"+String(window.screen.availWidth-700);this.m_win=window.showModelessDialog("localhost",document,_are);this.m_win.document.open();this.m_win.document.write('
');this.m_win.document.close();this.m_win_loading=false;this.m_win_body=this.m_win.document.getElementById("ConsoleBody");}}catch(e){}}/*@end@*/};Debug.Print=function(s,_SY){/*@if(@bering_debug)@*/if(this._sj){try{_SY=_SY||new Date();if(this.m_win_loading){_OM=Utilities.GenerateCallback(Debug.Print,[s,_SY]);setTimeout(_OM,5);}else{Debug.ShowConsole();if(this.m_win&&!this.m_win.closed){s=String(s);s=s.replace(/&/g,"&");s=s.replace(//g,">");s=s.replace(/\n/g,"
");s=s.replace(/\t/g," ");var _82=this.m_win.document.createElement("div");_82.innerHTML=""+_SY.toLocaleTimeString()+": "+s+"";var _0A=this.m_win_body.firstChild;if(_0A){this.m_win_body.insertBefore(_82,_0A);}else{this.m_win_body.appendChild(_82);}}}}catch(e){alert("Debug.Print EXCEPTION");}}/*@end@*/};Debug.Alert=function(s){/*@if(@bering_debug)@*/try{if(Debug._sj){window.alert(s);}}catch(e){}/*@end@*/};Debug.Popup=function(_Ku){/*@if(@bering_debug)@*/if(this._sj){if(!this.m_divPopup){var _2W=document.createElement("DIV");_2W.style.fontFamily="Arial";_2W.style.fontWeight="bold";_2W.style.fontSize="65%";_2W.style.padding="5px";_2W.style.backgroundColor="red";_2W.style.color="white";_2W.style.border="solid black 1px";_2W.style.position="absolute";_2W.style.top=(document.body.offsetHeight/3)+'px';_2W.style.left=(document.body.offsetWidth/3)+'px';_2W.style.width=((document.body.offsetWidth/2)-20)+'px';_2W.style.height=((document.body.offsetHeight/2)-20)+'px';_2W.style.overflow='auto';_2W.ondblclick=function(){_2W.style.display='none';};document.body.appendChild(_2W);this.m_divPopup=_2W;Dom.EnableTextSelection(this.m_divPopup);}this.m_divPopup.style.display='block';this.m_divPopup.innerText=_Ku;}/*@end@*/};Debug.Assert=function(_MQ,_Th){/*@if(@bering_debug)@*/if(this._sj){if(this.m_win&&!this.m_win.closed){if(!(_MQ)){if(this.m_win.confirm("Debug assertion failed!\r\n\r\nView function source?")){this.m_win.alert(Debug.Assert.caller);}}}else if(!(_MQ)){var _TL="Assert Failure";if(Debug.Assert.caller){_TL="Assert Failure occured in \r\n"+Debug.Assert.caller;}Utilities.DisplaySimpleWindow(_TL,'Debug Assertion: '+_Th);throw new COTException("Assert Failed");}}/*@end@*/};Debug.Call=function(_Pr,_GB,_UA){/*@if(!@bering_debug)@*/if(Debug.IsEnabled()&&window[_Pr]){Utilities.GenerateCallback(window[_Pr][_GB],_UA)();}/*@end@*/};Debug.kUnitHooks="ieUnitHooks";Debug.kUnitHelper="ieUnitHelper";Debug.kStartTimer="startTimer";Debug.kStopTimer="stopTimer";Debug.kAddTimingInfo="addTimingInfo";Debug.kStartRequest="startRequest";Debug.kStopRequest="stopRequest";Debug.kStartBufferedTimer="startBufferedTimer";Debug.kStopBufferedTimer="stopBufferedTimer";Debug.RowCount="RowCount";Debug.RowDepth="RowDepth";Debug.ColCount="ColCount";Debug.ColDepth="ColDepth";Debug.CellCount="CellCount";Debug.VisibleCells="VisibleCells";Debug.VisibleRows="VisibleRows";Debug.VisibleCols="VisibleCols";function CookieJar(){};CookieJar.SetCookie=function(_Vj,_FT,_L9,_Az,_AD,_MH){var _33=_Vj+"="+escape(_FT);if(_L9){_33+="; expires="+_L9.toUTCString();}if(_Az){_33+="; path="+_Az;}if(_AD){_33+="; domain="+_AD;}if(_MH){_33+="; secure";}document.cookie=_33;};CookieJar.DeleteCookie=function(_Vj,_Az,_AD){var _33=_Vj+"=";if(_Az){_33+="; path="+_Az;}if(_AD){_33+="; domain="+_AD;}_33+="; expires=Thu, 1 Jan 1970 00:00:01 UTC";document.cookie=_33;};CookieJar.GetCookie=function(_Vj){var _BA=document;var _aGX=_Vj+"=";for(var i=0;i<_BA.cookie.length;i++){var j=i+_aGX.length;if(_BA.cookie.substring(i,j)==_aGX){return CookieJar.getCookieVal(j);}i=_BA.cookie.indexOf(" ",i);if(i<=0){break;}}return null;};CookieJar.getCookieVal=function(_J1){var _Yx=document.cookie.indexOf(";",_J1);if(_Yx==-1){_Yx=document.cookie.length;}return decodeURIComponent(document.cookie.substring(_J1,_Yx));return null;};String.prototype.IsCharAtUpperCase=function(_Re){if(this.charCodeAt(_Re)>=65&&this.charCodeAt(_Re)<=96){return true;}};function Utilities(){};Utilities._eC=new Object();Utilities.bAutoAnalysisDrillEnabled=false;Utilities.bSingleMemExpandEnabled=false;Utilities.bShowRepeatBlkSelector=true;Utilities.bShowBlkSelectorOnce=false;Utilities.bShowVBlkSelector=true;Utilities.bCalcSlicerEnabled=false;Utilities.bCalcCentroidEnabled=false;Utilities.bCharBasedTruncation=false;Utilities.bUnlimitedCalcEnabled=true;Utilities.bMultiParentCalcEnabled=true;Utilities.bBlackSeaRemainderPrototype=false;Utilities.bEnableInnerHTMLRendering=false;Utilities.bDiffMiningEnabled=false;Utilities.bScatterPlotGraphsEnabled=false;Utilities.Id=1;Utilities.IMG_PATH="../explore/images/";Utilities.BRANDING_IMG_PATH="../skins/corporate/branding/";Utilities.CSS_PATH="../skins/";Utilities.SCHEMAS_PATH="../schemas/";Utilities.CSS_SKIN_PATH="../skins/corporate/ans/";Utilities.JS_PATH="../explore/";Utilities.iServerResponseTimeout=5000;Utilities.iIncrement=500;Utilities.iIncrementCount=0;Utilities.eStateContinue=1;Utilities.eStateHold=2;Utilities._i7=new Array();Utilities._aHoldingProcedureParam=new Array();Utilities.iDoubleClickTime=250;Utilities.iDoubleClickDelay=100;Utilities.SetProcedureToHold=function(_Nn,_Ro){Utilities._i7.push(_Nn);Utilities._aHoldingProcedureParam.push(_Ro);};Utilities.SafeDoRemoveHoldingProcedure=function(){Utilities.DeleteAllFromArray(Utilities._i7);Utilities.DeleteAllFromArray(Utilities._aHoldingProcedureParam);};Utilities.ExecuteHoldingProcedure=function(){for(var i=0;i=2)?decodeURIComponent(_aD5[1]):"";Utilities._eC[_aD5[0]]=_FT;}}}};Utilities.GetCRNValue=function(_Vj){return Utilities._eC[_Vj];};Utilities.kDBCSWidthScaleFactor=1.4;Utilities.GetCharWidthScaleFactor=function(_Wj){var _4a=_Wj.indexOf('th')>-1;var _aC5=_Wj.indexOf('zh')>-1;var _aF5=_Wj.indexOf('ko')>-1;var _awp=_Wj.indexOf('ja')>-1;if(_4a||_aC5||_aF5||_awp){return Utilities.kDBCSWidthScaleFactor;}return 1;};Utilities.GenerateId=function(){var _abn="_i"+Utilities.Id;Utilities.Id=Utilities.Id+1;return _abn;};Utilities.GetServerResponseTimeout=function(){return Utilities.iServerResponseTimeout;};Utilities.SetServerResponseTimeout=function(_PC){Utilities.iServerResponseTimeout=_PC;};Utilities.IncrementServerTimeout=function(){Utilities.iIncrementCount++;Utilities.iServerResponseTimeout+=Utilities.iIncrementCount*Utilities.iIncrement;};Utilities.StringToBool=function(_Np){if(_Np=="false"){return false;}else if(_Np=="true"){return true;}Debug.Assert("Unexpected boolean string value");return null;};Utilities.GetShallowClone=function(obj){var _aFe=new Object();for(var i in obj){_aFe[i]=obj[i];}return _aFe;};Utilities.GetTooltipLineLength=function(){return 60;};Utilities.Descheme=function(_C7){var _aCr=_C7;var _abE=_C7.substr(0,ExpAPIXml.kMUN.length);if(_abE==ExpAPIXml.kMUN){_aCr=_C7.substr(_abE.length,(_C7.length-_abE.length));}return _aCr;};Utilities.GetTruncatedString=function(_OZ,_Ne,_CU,_SI){var _ad3=_OZ;if(_SI==null){var _SI=true;}if(_OZ==null){return "";}if(_SI){if(_ad3.length>_Ne){_ad3=_OZ.substr(0,_Ne);_ad3=_CU.ReplaceParam('IDS_TRUNCATED_STRING',1,_ad3);}}else{_ad3=_OZ.substr(0,_Ne);}return _ad3;};Utilities.DoNothing=function(){};Utilities.RemoveSplash=function(){var _Eq=document.getElementById("splash");if(_Eq){Dom.RemoveObject(_Eq);}};Utilities.DisplaySimpleWindow=function(_Th,_KP,_Vp,_TV){if(window[Debug.kUnitHelper]&&ieUnitHelper.bHooked){ieUnitHooks.testError(_Th);}else{var _azp=Utilities.GenerateId();if(_TV){_Th=Utilities.HtmlEncode(_Th);}if(!_Vp||(_Vp=="")){_Vp="directories=no,location=no,status=no,toolbar=no,resizable=yes,scrollbars=yes,top=100,left=100,height=480,width=640";}var _ag3=window.open("",_azp,_Vp);var _BA=_ag3.document;_BA.open();_BA.write('');_BA.write(Utilities.EncodeString(_Th));_BA.write('
');_BA.close();_BA.title=_KP;_ag3.focus();return _ag3;}};Utilities.GetReplaceToken=function(_Np){return new RegExp("\\"+_Np,"g");};Utilities.HtmlEncode=function(_Np){var _aJR='';if(_Np&&(_Np!='')){var _axW=Utilities.GetReplaceToken('&');_aJR=_Np.replace(_axW,"&");_axW=Utilities.GetReplaceToken("#");_aJR=_aJR.replace(_axW,"#");_axW=Utilities.GetReplaceToken('<');_aJR=_aJR.replace(_axW,"<");_axW=Utilities.GetReplaceToken('>');_aJR=_aJR.replace(_axW,">");_axW=Utilities.GetReplaceToken('"');_aJR=_aJR.replace(_axW,""");_axW=Utilities.GetReplaceToken("'");_aJR=_aJR.replace(_axW,"'");_axW=Utilities.GetReplaceToken("(");_aJR=_aJR.replace(_axW,"(");_axW=Utilities.GetReplaceToken(")");_aJR=_aJR.replace(_axW,")");_axW=Utilities.GetReplaceToken("$");_aJR=_aJR.replace(_axW,"$");}return _aJR;};Utilities.xPathStringHelper=function(_Ee){if(_Ee===null){return null;}else if(_Ee===''){return '';}else if(_o.is_ie5_5up){return _Ee;}var _4q="";var _5U=_Ee.match(/\[[0-9]+\]/g);if(_5U&&_5U.length>0){var _anB=_Ee.split(/\[[0-9]+\]/g);for(var i=0;i<_5U.length;i++){var _asT=_5U[i].replace('[','').replace(']','');_asT=parseInt(_asT)+1;_5U[i]='['+_asT+']';}for(var i=0;i<_anB.length;i++){_4q+=_anB[i];if(_5U[i]){_4q+=_5U[i];}}}else{_4q=_Ee;}return _4q;};function EncodeXPathStr(_Gv){var _axW=Utilities.GetReplaceToken("'");var _ao6=_Gv.replace(_axW,"\\\'");_ao6="'"+_ao6+"'";return _ao6;};Utilities.F_ToXPathString=function(_EX,_RU){var _ak9=_EX;if(_ak9.indexOf("'")==-1){return("'"+_ak9+"'");}if(_ak9.indexOf('"')==-1){return('"'+_ak9+'"');}if(_RU)return EncodeXPathStr(_ak9);var a=new Array();a.push("concat(");var _abS=_ak9.split("'");for(var i=0;i<_abS.length;i++){if(a.length>1){a.push(',');}if(i>0){a.push('"\'"');}var _aga=_abS[i];if(_aga){if(_ak9.indexOf('"')==-1){if(a.length>1){a.push(',');}a.push('"'+_aga+'"');}else{var _ari=_aga.split("'");for(var j=0;j<_ari.length;j++){if(a.length>1){a.push(',');}if(_ari[j]){a.push("'"+_ari[j]+"'");}}}}}a.push(")");_ak9=a.join("");return _ak9;};Utilities.EncodeString=function(_Np){var _aJR='';if(_Np&&(_Np!='')){_aJR=_Np;var _axW=Utilities.GetReplaceToken("\\");_aJR=_aJR.replace(_axW,"\\\\");_axW=Utilities.GetReplaceToken("\r");_aJR=_aJR.replace(_axW,"\\\r");_axW=Utilities.GetReplaceToken("\b");_aJR=_aJR.replace(_axW,"\\\b");_axW=Utilities.GetReplaceToken("\t");_aJR=_aJR.replace(_axW,"\\\t");_axW=Utilities.GetReplaceToken("\n");_aJR=_aJR.replace(_axW,"\\\n");_axW=Utilities.GetReplaceToken("\v");_aJR=_aJR.replace(_axW,"\\\v");_axW=Utilities.GetReplaceToken("\f");_aJR=_aJR.replace(_axW,"\\\f");_axW=Utilities.GetReplaceToken("'");_aJR=_aJR.replace(_axW,"\\\'");_axW=Utilities.GetReplaceToken('"');_aJR=_aJR.replace(_axW,'\\\"');_axW=Utilities.GetReplaceToken("<");_aJR=_aJR.replace(_axW,"\\\<");_axW=Utilities.GetReplaceToken(">");_aJR=_aJR.replace(_axW,"\\\>");}return _aJR;};Utilities.MethodInObject=function(obj,_SZ){if(obj[_SZ]&&typeof obj[_SZ]=="function"){return true;}return false;};Utilities.RemoveAllChildObjects=function(obj){for(var i in obj){if(obj[i]&&!(obj[i]instanceof Function)){obj[i]=null;}}};Utilities.RemoveControlChars=function(_Np){var _ape=new String(_Np);var _9a=new RegExp("[\n\r\t]",'g');_ape=_ape.replace(_9a,"");return _ape;};Utilities.RemoveMUNPrefix=function(_Np){var _ape=new String(_Np);_ape=_ape.replace(ExpAPIXml.kMUN,'');return _ape;};Utilities.DeleteFromArray=function(_GT,obj){var length=_GT.length;var _adb=false;for(var i=0;i=length||n<0){return;}_GT.splice(n,1);};Utilities.DeleteAllFromArray=function(_GT){if(_GT){_GT.length=0;}};Utilities.InsertToNthInArray=function(_GT,_Tr,n){var length=_GT.length;_GT.splice(n,0,_Tr);};Utilities.IsInArray=function(_GT,obj){for(var i=0;i<_GT.length;i++){if(_GT[i]==obj){return true;}}return false;};Utilities.GetObjIndex=function(_GT,obj){for(var i=0;i<_GT.length;i++){if(_GT[i]==obj){return i;}}return-1;};Utilities.GetObjIndices=function(_GT,obj){var _abC=new Array();for(var i=0;i<_GT.length;i++){if(_GT[i]==obj){_abC.push(i);}}return _abC;};Utilities.CopyArray=function(_GT){if(!_GT){return null;}var _aJb=new Array();return _aJb.concat(_GT);};Utilities.ReverseSortCompare=function(a,b){if(a>b){return-1;}if(ai;j--){_aF3=s.charCodeAt(j-1);if(32!=_aF3&&12288!=_aF3){break;}}}return s.substring(i,j);};Utilities.NotImplement=function(){if(Debug&&Debug._sj){alert('Sorry, this feature has not yet been implemented');}};Utilities.GenerateCallback=function(_OM,_AG,_Eo){if(_OM){_AG=(_AG instanceof Array)?_AG:new Array();return(function(){/*@if(!@bering_debug)@*/try{/*@end@*/var _aks=_Eo||this;return _OM.apply(_aks,_AG);/*@if(!@bering_debug)@*/}catch(excep){_f.HandleException(excep);}/*@end@*/});}else{return Utilities.DoNothing;}};Utilities.EventCallback=function(_OM,_AG,_Eo,_PR,_AU){if(_OM){_AG=(_AG instanceof Array)?_AG:new Array();return(function(e){/*@if(!@bering_debug)@*/try{/*@end@*/var _aks=_Eo||this;var _agw=_PR?[]:[e||window.event];var _09=_AU?[]:[this];var _av9=_agw.concat(_09);var a=_av9.concat(_AG);return _OM.apply(_aks,a);/*@if(!@bering_debug)@*/}catch(excep){_f.HandleException(excep);}/*@end@*/});}else{return Utilities.DoNothing;}};Utilities.GenerateCallbackUnion=function(_SQ){return(function(){for(var i=0;i<_SQ.length;i++){_SQ[i]();}});};Utilities.ObjToString=function(_Lo){var _Pr="Object: "+(_Lo||"unknown")+"\n";for(var i in this){if(i!="toString"){_Pr+=i+": "+this[i]+"\n";}}return _Pr;};Utilities.HadDoubleClick=function(_KT){var _abX=new Date().getTime();if((_abX-_KT)1){this.q=q.substring(1,q.length);}else{this.q=null;}this.keyValuePairs=new Array();if(q){for(var i=0;i=0){_ape=_ape.substr(0,_aik);}return _ape;};Decimal.GetExpressionNum=function(_IT){var _ape=new String(_IT);var _9a=new RegExp("[\\"+Decimal.displayThousand+"\\"+" "+"]",'g');_ape=_ape.replace(_9a,"");var _anD=new RegExp("\\"+Decimal.displayDecimal,'g');_ape=_ape.replace(_anD,Decimal.expressionDecimal);return _ape;};Decimal.GetDisplayNum=function(_Cp){var _ape=new String(_Cp);var _anD=new RegExp("\\"+Decimal.expressionDecimal,'g');_ape=_ape.replace(_anD,Decimal.displayDecimal);return _ape;};Decimal.GetNumericDecimal=function(_Pp){_ape=Decimal.validateDecimal(_Pp);var _9a=new RegExp("[\\"+Decimal.displayThousand+"\\"+" "+"]",'g');_ape=_ape.replace(_9a,"");var _anD=new RegExp("\\"+Decimal.displayDecimal,'g');_ape=_ape.replace(_anD,'.');return parseFloat(_ape);};function HashTableArray(){this.keys=new Array();this.values=new Array();};HashTableArray.prototype.Remove=function(_Ui){if(this.values[_Ui]){delete this.values[_Ui];}Utilities.DeleteFromArray(this.keys,_Ui);};HashTableArray.prototype.Get=function(_Ui){return this.values[_Ui];};HashTableArray.prototype.GetAtIndex=function(_PQ){var _Ui=this.keys[_PQ];if(_Ui){return this.values[_Ui];}return null;};HashTableArray.prototype.Put=function(_Ui,_UN){this.Remove(_Ui);this.keys.push(_Ui);this.values[_Ui]=_UN;};HashTableArray.prototype.Length=function(){return this.keys.length;};HashTableArray.prototype.Clear=function(){var _ayj=this.Length();var _Ui;for(var i=0;i<_ayj;i++){_Ui=this.keys[i];if(this.values[_Ui]){delete this.values[_Ui];}Utilities.DeleteNthFromArray(this.keys,i);}};var _m=new Object();var _o=null;var gResource=null;var ws=null;var PSParameters=null;var _e=null;function FindApp(_zs){Debug.Assert(_m[_zs]);return _m[_zs];};function CMainApplication(_PJ){var _zs=_PJ["appname"];if(_zs==undefined){return;}if(!_zs.match(/\w+/)){_zs=null;}if(_zs==null)_zs="main";_m[_zs]=this;this.isRunning=false;this.appname=_zs;this.commManager=null;this.dataManager=null;this.uiManager=null;this.oResources=null;this.bNotForResale=false;this._ot=null;this._ea=null;this._xt=null;this._gk=null;this._dp=null;this._x0=null;this._kY=null;this._bn=null;this._hy=null;this._ac=null;this._vu=null;this._iH='';this._pT='';this._vv='';this._sE="0";this._ft="0";this._jB="0";this._al="0";this._eH='';this.globalAppVars=new Object();this._xY=new Object();this._X=0;this._bf=new CopyPasteHLS();this._wJ=new PlaybackRegressionTestResponses();this.initProductAndContentLocales();this.initParameters(_PJ);window.bLoaded=true;this._q7=false;};CMainApplication.prototype.addRequestTracking=function(_Ej){this._xY[this._X]=_Ej;this._X++;};CMainApplication.prototype.getRequestTracking=function(){var _C2="";if(this._X>0){this._X--;_C2=this._xY[this._X];this._xY[this._X]=null;}return _C2;};CMainApplication.prototype.clearRequestTracking=function(_Ej){Utilities.ClearObjectArray(this._xY);this._X=0;};CMainApplication.prototype.getAboutboxURL=function(){var _Mn="../explore/images/ansAboutBox_";_Mn+=this._aB;_Mn+=".jpg";return _Mn;};CMainApplication.prototype.getResourceURL=function(){var _Mn="../explore/res/ansmsgs_";_Mn+=this._aB;_Mn+=".xml";return _Mn;};CMainApplication.prototype.getStatsURL=function(){var _Mn="../explore/res/cognos_stats.xml";return _Mn;};CMainApplication.prototype.getHotsiteResourceURL=function(){var _Mn="../explore/res/ansmsgs_not_localized.xml";return _Mn;};CMainApplication.prototype.initProductAndContentLocales=function(){this._aB=Utilities.GetCRNValue("productLocale");this._gG=Utilities.GetCRNValue("contentLocale");var _2M=window.navigator.userLanguage?window.navigator.userLanguage:window.navigator.language;if(!this._aB){this._aB=_2M.substr(0,2);}if(!this._gG){this._gG=_2M;}};CMainApplication.prototype.initParameters=function(_PJ){this.SetGateway(g_PSParameters["ui.gateway"]);var _amv=g_PSParameters["ui.action"];if(_amv=="new"){if(!g_PSParameters["isOpenModel"]&&!g_PSParameters["lastDefaultAnalysis"]){this._yh=true;}this.SetPackage(g_PSParameters["ui.object"]);}else if(_amv=="edit"){this.SetQuery(g_PSParameters["ui.object"]);}else if(_amv=="pasteHLS"){this._iH=g_PSParameters["ui.object"];}else if(_amv=="loadFromFile"){this._pT=g_PSParameters["ui.object"];this.SetPackage(g_PSParameters["model"]);}else if(_amv=="renderRespXml"){this.SetPackage(g_PSParameters["ui.object"]);this._vv=g_PSParameters["ui.respXml"];}else if(_amv=="createAnalysis"){this._eH=g_PSParameters["ui.selection"];this.SetPackage(g_PSParameters["ui.object"]);}this.SetCAFContextID(g_PSParameters["ui.cafcontextid"]);this.SetCacheContext(g_PSParameters["ui.cacheContext"]);this.SetHideXLS(g_PSParameters["ui.hideXLS"]);this.SetDefaultAnalysis(g_PSParameters["ui.defaultAnalysis"]);this.SetDrillTargetParms(g_PSParameters["ui.drillThroughTargetParameterValues"]);this.SetRoutingServerGroup(g_PSParameters["ui.routingServerGroup"]);this.SetDefaultBlockSize(g_PSParameters["ui.crosstabItemDisplayCountDefault"]);this.SetMaximumBlockSize(g_PSParameters["ui.crosstabItemDisplayCountLimit"]);this.SetDefaultExpand(g_PSParameters["ui.memberDisplayCountDefault"]);this.SetMaximumExpand(g_PSParameters["ui.memberDisplayCountLimit"]);var _C2=g_PSParameters["as.tracking"];if(_C2!=null){this.addRequestTracking(_C2);g_PSParameters["as.tracking"]=null;}};CMainApplication.prototype.OnLoad=function(){try{var _al9=Dom.IsOKToUse();Debug.Assert(_al9);}catch(e){var _6z=Utilities.GenerateCallback(this.OnLoad,[],this);setTimeout(_6z,100);return;}gResource=new COTResource();this.oResources=gResource;_f.SetResource(this.oResources);_c.SetResource(this.oResources);_o=new CBrowserInfo();this.browserInfo=_o;this.commManager=new CCMCommManager(this,this._ot);this.dataManager=new CDLDataManager(this,this.commManager,this._ea,this._xt);this.uiManager=new CUIManager(this,this.dataManager);this.uiManager.oDialogMgr.Init();document.title=ExpMiscStr.kProductName;if(!this.browserInfo.is_supported){throw new COTUnsuportedBrowserException();}if(this._gk!=ExpMiscStr.kVersion){throw new COTUnsupportedServerVersion("The client version ("+this._gk+") and the server version ("+ExpMiscStr.kVersion+") aren't equal");}this.LoadFiles();};CMainApplication.CreateAnalyzer=function(_Ke,_yS){var _Mg=FindApp(_Ke);var _Li=_Mg.dataManager.GetCurrentDataMatrix();var _AE=new Array();for(var _TE=0;_TE<_Li.GetAxisCount();_TE++){var _akZ=_yS[_TE];for(var i=0;i<_akZ.length;i++){if(i==(_akZ.length-1)){var _Lv=new CUIDragDropMember(_akZ[i]);_Lv.kPopulation=ExpAPIXml.kChildrenPopulation;_Lv.kAction=ExpAPIXml.kActionReplace;var _Jj=_Li.GetAxis(i).DoReplace(_Lv.sId,_Lv.kPopulation,null,_Lv.sLevId,true);_AE.push(_Jj);}else{var _4H=_Mg.dataManager.GetCurrentWSFilterSet();var _aED=_4H.InsertDimFilter(new Array(_akZ[i]),null,true);if(_aED.length){for(var x=0;x<_aED.length;x++){_AE.push(_aED[x]);}}else{_AE.push(_aED);}}}}_Li.SendDMActionArray(_AE);};CMainApplication.prototype.loadInitial=function(){this.uiManager.CreateStartupView();if(this._iH!=''){var _AE=new Array();var _Jj=new CDLAction();_Jj.type="getResponseForHLS";_Jj._eW("hls",this._iH);_AE.push(_Jj);var _aBj=this.dataManager.commManager.CreateExploreRequest(_AE);if(window.bAnalyzer){var _5Y=new Array(this.appname,window.aSelAnalysisItem);Utilities.SetProcedureToHold('CMainApplication.CreateAnalyzer',_5Y);var _ajP=Utilities.ExecuteHoldingProcedure;_aBj.SetDeferredCallBackFunction(_ajP);}_aBj.Send();window.bAnalyzer=null;window.aSelAnalysisItem=null;}else if(this._vv!=''||this._pT!=''){this._wJ._mE=true;var _Zj=null;if(this._pT!=''){_Zj=_c.LoadDocument(this._pT,false,true,false);}else{_Zj=_c.LoadString(this._vv,true,false);}var _ai0=Dom.GetElementsByTagName(_Zj,"ansresponse");for(var i=0;i<_ai0.length;i++){this._wJ.AddResponse(_ai0[i]);}_c.CreateHTTPObject=_c.CreateFakeHTTPObject;if(!this._yh){this.dataManager.IssueInitialRequest();}else{this.SelectDefaultAnalysis();}CBIBus.biBus._wr.sRequestId="request_i1";CBIBus.m_oRequests[CBIBus.m_iRequestID-1].m_oXMLHTTP.responseXML=this._wJ.GetCurrentResp();CBIBus.m_oRequests[CBIBus.m_iRequestID-1].m_oXMLHTTP.readyState=4;CBIBus.OnReadyStateChange(CBIBus.m_iRequestID-1);this._wJ._g9++;return;}else{if(!this._yh){this.dataManager.IssueInitialRequest();}else{this.SelectDefaultAnalysis();}}};CMainApplication.prototype.RenderNextRegressionTestResponse=function(){var _AE=new Array();var _Jj=new CDLAction();_Jj.type="fakeaction";_AE.push(_Jj);Debug.Call(Debug.kUnitHooks,Debug.kStartRequest);Debug.Call(Debug.kUnitHooks,Debug.kStartTimer,["CMainApplication::RenderNextRegressionTestResponse"]);var _aBj=this.dataManager.commManager.CreateExploreRequest(_AE);_aBj.Send();_aBj.sRequestId="request_i1";var _aIg=this._wJ.GetCurrentResp();CBIBus.m_oRequests[CBIBus.m_iRequestID-1].m_oXMLHTTP.responseXML=_aIg;var _1L=Dom.GetElementsByTagName(_aIg,ExpAPIXml.kEleServerState);this.dataManager.commManager._tO=_1L[0];CBIBus.m_oRequests[CBIBus.m_iRequestID-1].m_oXMLHTTP.readyState=4;CBIBus.OnReadyStateChange(CBIBus.m_iRequestID-1);Debug.Call(Debug.kUnitHooks,Debug.kStopTimer,["CMainApplication::RenderNextRegressionTestResponse"]);Debug.Call(Debug.kUnitHooks,Debug.kStopRequest);};CMainApplication.prototype.setRunning=function(){this.isRunning=true;Utilities.RemoveSplash();};CMainApplication.prototype.LaunchPortalWelcomeTool=function(){var _X7=document.createElement('form');_X7.setAttribute("action","../bi/v1/disp");_X7.setAttribute("method","post");_X7.setAttribute("name","newLaunch");_X7.setAttribute("target",_X7.name);_X7.appendChild(createHiddenFormField("b_action","xts.run"));_X7.appendChild(createHiddenFormField("m","portal/launch.xts"));_X7.appendChild(createHiddenFormField("ui.tool","AnalysisStudio"));_X7.appendChild(createHiddenFormField("ui.gateway","../bi/v1/disp"));_X7.appendChild(createHiddenFormField("ui.action","new"));_X7.appendChild(createHiddenFormField("ui.backURL","javascript:close()"));_X7.style.display="none";document.body.appendChild(_X7);var _akX=window.open("",_X7.name,"directories=no,location=no,status=no,toolbar=no,resizable=yes,scrollbars=yes,top=0,left=0,height=480,width=650");_akX.focus();_X7.submit();window.close();};CMainApplication.prototype.SafeOnLoad=function(){if(!window.bLoaded){this.LaunchPortalWelcomeTool();return;}/*@if(!@bering_debug)@*/try{/*@end@*/this.OnLoad();/*@if(!@bering_debug)@*/}catch(e){_f.HandleException(e);}/*@end@*/};CMainApplication.prototype.SetDefaultBlockSize=function(_KU){if(_KU!=null)this._sE=_KU;};CMainApplication.prototype.SetMaximumBlockSize=function(_KU){if(_KU!=null)this._ft=_KU;};CMainApplication.prototype.SetDefaultExpand=function(_GU){if(_GU!=null)this._jB=_GU;};CMainApplication.prototype.SetMaximumExpand=function(_GU){if(_GU!=null)this._al=_GU;};CMainApplication.prototype.SetGateway=function(_RA){this._ot=_RA;};CMainApplication.prototype.GetGatewayURL=function(){return this._ot;};CMainApplication.prototype.SetPackage=function(_Un){this._ea=_Un;};CMainApplication.prototype.SetQuery=function(_LP){this._xt=_LP;};CMainApplication.prototype.GetCAFContextID=function(){return this._x0;};CMainApplication.prototype.SetCAFContextID=function(_Dh){this._x0=_Dh;};CMainApplication.prototype.GetCacheContext=function(){return this._kY;};CMainApplication.prototype.SetCacheContext=function(_yy){this._kY=_yy;};CMainApplication.prototype.GetHideXLS=function(){return this._bn;};CMainApplication.prototype.SetHideXLS=function(_Nq){this._bn=_Nq;};CMainApplication.prototype.GetRoutingServerGroup=function(){return this._vu;};CMainApplication.prototype.SetRoutingServerGroup=function(_I6){this._vu=_I6;};CMainApplication.prototype.GetDefaultAnalysis=function(){if(this._hy==null)return 'false';return this._hy;};CMainApplication.prototype.HasDefaultAnalysis=function(){if((!this._hy)||(this._hy==DefaultAnalysis.kBlank)){return false;}else{return true;}};CMainApplication.prototype.SetDefaultAnalysis=function(_yX){if(g_PSParameters["lastDefaultAnalysis"]){this._hy=g_PSParameters["lastDefaultAnalysis"];return;}if(_yX!=null&&_yX!=""){this._hy=_yX;}else{this._hy=DefaultAnalysis.kServerDefault;}};CMainApplication.prototype.UpdateDefaultAnalysis=function(_yX,_LT,_HE){if(_yX==DefaultAnalysis.kServerDefault){this._hy=g_PSParameters["ui.defaultAnalysis"];if(this._hy==null||this._hy==DefaultAnalysis.kBlank){this._hy=_yX;}}else if(_yX==DefaultAnalysis.kBlank){this._hy=_yX;}g_PSParameters["lastDefaultAnalysis"]=this._hy;if(_LT){var _aoo=new Date();_aoo.setTime(_aoo.getTime()+315360000000);var _aux=(_HE?ExpAPIXml.kTrue:ExpAPIXml.kFalse)+CookieConstants.kValueSplitter+_yX;CookieJar.SetCookie(CookieConstants.kShowWelcomeDlg,_aux,_aoo);}};CMainApplication.prototype.GetDynamicContext=function(){if(this._eH==null)return 'false';return this._eH;};CMainApplication.prototype.GetDrillTargetParms=function(){return this._ac;};CMainApplication.prototype.SetDrillTargetParms=function(_zW){if(_zW&&_zW!="false"){var _aFm=_zW;var _auE='- ');_azT.write(this.oResources.GetString('IDS_RUN_REPORT_WINDOW_TITLE'));_azT.write('
');_azT.write(this.oResources.GetString('IDS_REPORT_SUBMITTED'));_azT.write('