function upRootWindow(){this.upType="upRootWindow";this.aInfoPipe={};this.oRegistry=new upRegistry();this.closeAll=false;this.oFormatInfo=new upFormatInfo();this.oUserInfo=new upUserInfo();this.loggedoutUrl=""}upRootWindow.prototype=new upWindow();upRootWindow.prototype.createPopUp=RootCreatePopUp;upRootWindow.prototype.closePopUp=RootClosePopUp;upRootWindow.prototype.closeAllPopUp=RootCloseAllPopUp;upRootWindow.prototype.cleanUp=RootCleanUp;upRootWindow.prototype.registerFup=RootRegisterFup;upRootWindow.prototype.unregisterFup=RootUnregisterFup;upRootWindow.prototype.getFup=RootGetFup;upRootWindow.prototype.unregisterPopup=RootUnregisterPopup;upRootWindow.prototype.rebuildPopUpReg=RootRebuildPopUpReg;upRootWindow.prototype.registerPopup=RootRegisterPopup;upRootWindow.prototype.registerToolTipPopup=RootRegisterToolTipPopup;upRootWindow.prototype.getToolTipPopup=RootGetToolTipPopup;upRootWindow.prototype.unregisterToolTipPopup=RootUnregisterToolTipPopup;upRootWindow.prototype.rebuildToolTipPopupReg=RootRebuildToolTipPopupReg;upRootWindow.prototype.timeOutSession=RootTimeOutSession;upRootWindow.prototype.timeOutSessionWarn=RootTimeOutSessionWarn;upRootWindow.prototype.resetTimeOut=RootResetTimeOut;upRootWindow.prototype.adviceShow=RootAdviceShow;upRootWindow.prototype.adviceClose=RootAdviceClose;function RootAdviceShow(p_strHead,p_strBody,p_strNotifyId,p_oAdviceSettings,p_oWindow){if(arguments.length<5||p_oWindow==null||typeof(p_oWindow)!="object"){var oWndAppmain=ContainerAgent.getAppMainFrame();var oWndStage=ContainerAgent.getStageFrame();if(oWndStage){p_oWindow=oWndStage}else{if(oWndAppmain){p_oWindow=oWndAppmain}else{p_oWindow=self}}}p_oWindow.Notifier.status.error(p_strBody,p_strHead,p_strNotifyId)}function RootAdviceClose(p_strNotifyId,p_oWindow){if(arguments.length<5||p_oWindow==null||typeof(p_oWindow)!="object"){var oWndAppmain=ContainerAgent.getAppMainFrame();var oWndStage=ContainerAgent.getStageFrame();if(oWndStage){p_oWindow=oWndStage}else{if(oWndAppmain){p_oWindow=oWndAppmain}else{p_oWindow=self}}}p_oWindow.Notifier.status.close(p_strNotifyId)}function RootTimeOutSession(p_strUrl){self.oUp.strReloginUrl=p_strUrl;var sid="";if(Helper.getQsValueByParam("rq_SId")){sid=Helper.getQsValueByParam("rq_SId")}else{if(Helper.getCookieValueByParam("co_SId")){sid=Helper.getCookieValueByParam("co_SId")}}var oXmlHttp=new upXmlHttp();oXmlHttp.strUrl=self.oHtmlRoot.oUp.connector+"?qs_service=services/sessioninfo/&qs_operation=getSessionInfo&qs_sessionId="+sid;oXmlHttp.bAsync=true;oXmlHttp.iPriority=25;oXmlHttp.bResetTimeOut=false;oXmlHttp.strMethod="GET";oXmlHttp.bProcessResponse=true;oXmlHttp.processResponse=processResponseTimeoutSession;oXmlHttp.send()}function processResponseTimeoutSession(){if(oRequest.readyState==State.done){if(oRequest.status==Status.ok){var l_iTimeToLive=-1;if(ErrorHandler.Ajax.checkXMLResponse("processResponseTimeoutSession",oRequest)){var l_oSessionInfoResponse=oRequest.responseXML.documentElement;if(l_oSessionInfoResponse.getElementsByTagName("noSession").length>0){}else{if(l_oSessionInfoResponse.getElementsByTagName("timeToLive").length>0){l_iTimeToLive=l_oSessionInfoResponse.getElementsByTagName("timeToLive")[0].firstChild.data}}}if(l_iTimeToLive>10000){setTimeOut(self.oUp.strReloginUrl,false,l_iTimeToLive)}else{var l_strUrl;if(this.loggedoutUrl&&this.loggedoutUrl!=""){l_strUrl="loggedout.html?url="+Helper.hexEncodeString(this.loggedoutUrl)}else{l_strUrl=Helper.hexDecodeString(self.oUp.strReloginUrl);l_strUrl=Helper.deleteParamFromUrl("rq_SId",l_strUrl);l_strUrl=Helper.deleteParamFromUrl("rq_xhr",l_strUrl);l_strUrl=Helper.deleteParamFromUrl("rq_MenuGuid",l_strUrl);l_strUrl=Helper.deleteParamFromUrl("rq_Template",l_strUrl);l_strUrl=Helper.deleteParamFromUrl("rq_TemplateKey",l_strUrl);l_strUrl="loggedout.html?url="+Helper.hexEncodeString(l_strUrl)}Helper.deleteCookie("co_SId");if(self.oUp&&self.oUp.oFormatInfo){l_strUrl=Helper.setQsValueByParam("rq_Lang",self.oUp.oFormatInfo.lang,l_strUrl);l_strUrl=Helper.setQsValueByParam("rq_Layout",self.oUp.oFormatInfo.layoutDir,l_strUrl);l_strUrl=Helper.setQsValueByParam("rq_Portal",self.oUp.portalName,l_strUrl)}document.location.href=l_strUrl}}}}function RootTimeOutSessionWarn(){var aContent=[];aContent.push('<div style="text-align:center;">');aContent.push('<img src="images/assets/common/logoutwarn.gif" border="0" align="left" vspace="2" hspace="10" style="float:left;">');aContent.push('<h1 class="Text_H1" style="white-space:nowrap;">'+self.oUp.oMessage.LOGIN_WARN_HEADLINE+"</h1>");aContent.push('<div class="Text_Standard" style="margin: 20px; text-align:center;">'+self.oUp.oMessage.LOGIN_WARN_TEXT+"</div>");aContent.push('<input type="button" id="ID_buttonReset" name="buttonReset" onclick="if(oHtmlRoot && oHtmlRoot.oUp){oHtmlRoot.oUp.resetTimeOut(true); Notifier.status.close(\'LOGOUT_WARNING\');}" class="Button_Standard" value="&nbsp;&nbsp; '+self.oUp.oMessage.LOGIN_WARN_ACTION+' &nbsp;&nbsp;" style="font-weight:700; margin-top:10px; margin-bottom:10px;">');aContent.push("</div>");self.strKeyTimeoutWarn=Notifier.status.warn(aContent.join(""),null,"LOGOUT_WARNING",{iAutoCloseInterval:15000})}function RootResetTimeOut(p_bServerReset){if(oHtmlRoot&&oHtmlRoot.oUp&&!isNaN(oHtmlRoot.oUp.l_lTimeOut)){setTimeOut(null,false,oHtmlRoot.oUp.iSessionTimeOut);if(arguments.length==1&&p_bServerReset){var oAction=new upActionControl();oAction.oHtml=new Object();oAction.oTarget=new upTarget();oAction.oTarget.rq_Template="internal/system/vm/html/login/getRefreshServerTimeout.vm";oAction.requestType=2;oAction.oXmlHttp.bResetTimeOut=false;oAction.oXmlHttp.bAsync=true;oAction.oXmlHttp.bProcessResponse=true;oAction.oXmlHttp.processResponse=processRefreshServerTimeout;oAction.processRequest()}}}function processRefreshServerTimeout(){if(oRequest.readyState==State.done){if(oRequest.status==Status.ok){l_response=oRequest.responseXML.documentElement;if(l_response.getElementsByTagName("status")[0].firstChild.data!="1"){alert("Could not refresh session timeout!\nfunction: processRefreshServerTimeout")}}else{alert("Http Error "+oRequest.status+"\n"+oRequest.statusText+"\nfunction: processResetTimeOut")}}}function RootUnregisterPopup(popup){if(this.oRegistry.oPopUpReg[popup]){this.oRegistry.oPopUpReg[popup]=null}this.rebuildPopUpReg();return this.oRegistry.oPopUpReg}function RootRebuildPopUpReg(){var newPopUpReg={};for(var popup in this.oRegistry.oPopUpReg){if(this.oRegistry.oPopUpReg[popup]!=null){newPopUpReg[popup]=this.oRegistry.oPopUpReg[popup]}}this.oRegistry.oPopUpReg=newPopUpReg}function RootRegisterPopup(popup,oPopup){this.rebuildPopUpReg();this.oRegistry.oPopUpReg[popup]=oPopup;return this.oRegistry.oPopUpReg[popup]}function RootCreatePopUp(p_wndName){if(!p_wndName||p_wndName==""){var wndName="newWnd"}else{var wndName=p_wndName}var wnd=this.registerPopup(wndName,new upPopUpWindow());wnd.id=wndName;wnd.aObjects={};wnd.setRefToRootWin();return wnd}function RootRegisterToolTipPopup(popup,oPopup){this.rebuildToolTipPopupReg();this.oRegistry.oToolTipPopupReg[popup]=oPopup;return this.oRegistry.oToolTipPopupReg[popup]}function RootGetToolTipPopup(popup){return(typeof(this.oRegistry.oToolTipPopupReg[popup])=="object")?this.oRegistry.oToolTipPopupReg[popup]:false}function RootUnregisterToolTipPopup(popup){if(this.oRegistry.oToolTipPopupReg[popup]){this.oRegistry.oToolTipPopupReg[popup]=null}this.rebuildToolTipPopupReg();return this.oRegistry.oToolTipPopupReg}function RootRebuildToolTipPopupReg(){var newToolTipPopupReg={};for(var popup in this.oRegistry.oToolTipPopupReg){if(this.oRegistry.oToolTipPopupReg[popup]!=null){newToolTipPopupReg[popup]=this.oRegistry.oToolTipPopupReg[popup]}}this.oRegistry.oToolTipPopupReg=newToolTipPopupReg}function RootGetFup(p_fupId){var oFup=null;if(this.oRegistry.oFuncPartReg[p_fupId]!=null&&typeof this.oRegistry.oFuncPartReg[p_fupId].oWindow!="unknown"&&this.oRegistry.oFuncPartReg[p_fupId].oWindow!=null&&this.oRegistry.oFuncPartReg[p_fupId].oWindow.oHtml!=null&&typeof this.oRegistry.oFuncPartReg[p_fupId].oWindow.oHtml.document!="unknown"){oFup=this.oRegistry.oFuncPartReg[p_fupId]}else{var stack=this.oRegistry.oFuncPartRegStack;for(var i=stack.length-1;i>=0;i--){if(stack[i]!=null&&typeof stack[i].oWindow!="unknown"&&stack[i].oWindow!=null&&stack[i].id!="undefined"&&stack[i].id==p_fupId&&stack[i].oWindow!=null&&stack[i].oWindow.oHtml!=null){oFup=this.oRegistry.oFuncPartRegStack[i];this.oRegistry.oFuncPartReg[p_fupId]=oFup;this.oRegistry.oFuncPartRegStack[i]=null}}}return oFup}function RootRegisterFup(p_fupId,oNewFup){if(arguments.length<2){return false}var newFuncPartReg={};var oFup=null;for(var fupId in this.oRegistry.oFuncPartReg){if(this.oRegistry.oFuncPartReg[fupId]!=null&&typeof this.oRegistry.oFuncPartReg[fupId].oWindow!="unknown"&&this.oRegistry.oFuncPartReg[fupId].oWindow&&this.oRegistry.oFuncPartReg[fupId].oWindow.oHtml&&typeof this.oRegistry.oFuncPartReg[fupId].oWindow.oHtml.document!="unknown"){var oFup=this.getFup(fupId);newFuncPartReg[fupId]=oFup;if(fupId==p_fupId){if(typeof oFup.oWindow!="unknown"&&oFup.oWindow!=null&&oFup.oWindow.id&&oFup.oWindow.id!=oNewFup.oWindow.id){this.oRegistry.oFuncPartRegStack[this.oRegistry.oFuncPartRegStack.length]=oFup}}}}newFuncPartReg[p_fupId]=oNewFup;this.oRegistry.oFuncPartReg=newFuncPartReg;return true}function RootUnregisterFup(p_fupId){if(arguments.length<1){return false}if(this.oRegistry.oFuncPartReg[p_fupId]){var newFuncPartReg={};for(var fupId in this.oRegistry.oFuncPartReg){if(fupId!=p_fupId&&this.oRegistry.oFuncPartReg[fupId]!=null&&typeof this.oRegistry.oFuncPartReg[fupId].oWindow!="unknown"){newFuncPartReg[fupId]=this.oRegistry.oFuncPartReg[fupId]}}var stack=this.oRegistry.oFuncPartRegStack;for(var i=stack.length-1;i>=0;i--){if(stack[i]!=null&&typeof stack[i].oWindow!="unknown"&&stack[i].oWindow!=null&&stack[i].id!="undefined"&&stack[i].id==p_fupId){this.oRegistry.oFuncPartRegStack[i]=null}}this.oRegistry.oFuncPartReg[p_fupId].oWindow=null;this.oRegistry.oFuncPartReg[p_fupId].oPage=null;if(this.oRegistry.oFuncPartReg[p_fupId].oHtml){this.oRegistry.oFuncPartReg[p_fupId].oHtml.oUp=null}this.oRegistry.oFuncPartReg[p_fupId].oStyle=null;this.oRegistry.oFuncPartReg[p_fupId].oHtml=null;this.oRegistry.oFuncPartReg[p_fupId]=null;this.oRegistry.oFuncPartReg=newFuncPartReg}return true}function RootClosePopUp(wndName){var wnd=null;if(!wndName||wndName==""){return false}wnd=this.oRegistry.oPopUpReg[wndName];if(wnd){wnd.byUpClose=true}if(wnd&&wnd.oHtml&&wnd.oHtml!=null&&wnd.oHtml.open&&!wnd.oHtml.closed){wnd.oHtml.focus();if(wnd.oHtml.unloadHandler&&!this.closeAll){wnd.oHtml.unloadHandler()}wnd.hide()}this.unregisterPopup(wndName);return true}function RootCloseAllPopUp(){for(var i in this.oRegistry.oPopUpReg){if(i!="upType"&&i!=null){this.closePopUp(i)}}return true}function RootCleanUp(){this.closeAll=true;var retStatus=this.closeAllPopUp();if(retStatus){if(this.oPage){this.oPage.oWindow=null;if(this.oPage.oHtml){this.oPage.oHtml.oUp=null}this.oPage.oHtml=null;this.oPage.oStyle=null;this.oPage=null}this.aInfoPipe=null;this.oMenuReg=null;this.oFormatInfo=null;this.oMessage=null;this.oFormatInfo=null;this.oUserInfo=null}}function upFormatInfo(){this.upType="upFormatInfo";this.dateSep="";this.dateFormatString="";this.timeFormatString="";this.leadingNulls="";this.decSep="";this.groupSep="";this.firstDayOfWeek="1";this.lang="de"}function upUserInfo(){this.upType="upUserInfo";this.password="";this.userName=""}function upRegistry(){this.upType="upRegistry";this.oFuncPartReg={};this.oFuncPartRegStack={};this.oPopUpReg={};this.oToolTipPopupReg={};this.oMenuReg={};this.oTopLevelContainerReg={}};
