function makeRootWindow(p_portalId,p_frHiddenPull,p_frHidden,p_lang,p_firstDay,p_charset,p_connector,p_pwMinLength,p_bIsAnonymous,p_bYellowFade,p_oRootWndProps)
{oHtmlRoot=self;oHtmlRoot.portalId=p_portalId;self.name=FRAME_ROOT;aVarFrameNames=new Array();aVarFrameNames["hiddenPull"]=p_frHiddenPull;aVarFrameNames["hidden"]=p_frHidden;setFrameConsts();return _makeRootWindow(p_lang,p_firstDay,p_charset,p_connector,p_pwMinLength,p_bIsAnonymous,p_bYellowFade,p_oRootWndProps);}
function makeStageRootWindow(p_portalId,p_frHiddenStage1,p_frHiddenStage2,p_frAppMain,p_lang,p_firstDay,p_charset,p_connector,p_pwMinLength,p_bIsAnonymous,p_bYellowFade,p_oRootWndProps)
{oHtmlRoot=self;oHtmlRoot.portalId=p_portalId;if(!bRootInsidePortal)self.name=FRAME_ROOT;oHtmlRoot.aVarFrameNames=new Array();oHtmlRoot.aVarFrameNames["stage"]=FRAME_ROOT;oHtmlRoot.aVarFrameNames["hiddenStage1"]=p_frHiddenStage1;oHtmlRoot.aVarFrameNames["hiddenPull"]=p_frHiddenStage1;oHtmlRoot.aVarFrameNames["hiddenStage2"]=p_frHiddenStage2;oHtmlRoot.aVarFrameNames["hidden"]=p_frHiddenStage2;oHtmlRoot.aVarFrameNames["appMain"]=p_frAppMain;setFrameConsts();setDocBody();strOnUnLoad="self.oUp.cleanUp();";oWin=_makeRootWindow(p_lang,p_firstDay,p_charset,p_connector,p_pwMinLength,p_bIsAnonymous,p_bYellowFade);return oWin;}
function makePersistentStageRootWindow(p_portalId,p_frPostIframe,p_frHidden,p_lang,p_firstDay,p_charset,p_connector,p_pwMinLength,p_bIsAnonymous,p_bYellowFade,p_oRootWndProps)
{oHtmlRoot=self;oHtmlRoot.portalId=p_portalId;if(!bRootInsidePortal)self.name=FRAME_ROOT;oHtmlRoot.aVarFrameNames=new Array();oHtmlRoot.aVarFrameNames["stage"]=FRAME_ROOT;oHtmlRoot.aVarFrameNames["appMain"]=FRAME_ROOT;oHtmlRoot.aVarFrameNames["hidden"]=p_frHidden;oHtmlRoot.aVarFrameNames["hiddenPull"]=p_frHidden;oHtmlRoot.aVarFrameNames["hiddenStage1"]=p_frHidden;oHtmlRoot.aVarFrameNames["hiddenStage2"]=p_frHidden;oHtmlRoot.aVarFrameNames["postiframe"]=p_frPostIframe;setFrameConsts();setDocBody();oWin=_makeRootWindow(p_lang,p_firstDay,p_charset,p_connector,p_pwMinLength,p_bIsAnonymous,p_bYellowFade,p_oRootWndProps);oWin.Stage=FRAME_ROOT;oWin.strOnUnLoad="self.oUp.cleanUp();";if(!Browser.opera||Browser.opera920up)
{oWin.strOnLoad+="createBrowserHistory();";}
return oWin;}
function makeAppRootWindow(p_portalId,p_lang,p_firstDay,p_charset,p_connector,p_pwMinLength,p_bIsAnonymous,p_bYellowFade,p_oRootWndProps,p_frPostIframe)
{oHtmlRoot=self;oHtmlRoot.portalId=p_portalId;if(!bRootInsidePortal)self.name=FRAME_ROOT;oHtmlRoot.aVarFrameNames=new Array();oHtmlRoot.aVarFrameNames["appMain"]=FRAME_ROOT;if(p_frPostIframe)oHtmlRoot.aVarFrameNames["postiframe"]=p_frPostIframe;setFrameConsts();setDocBody();var oWin=_makeRootWindow(p_lang,p_firstDay,p_charset,p_connector,p_pwMinLength,p_bIsAnonymous,p_bYellowFade,p_oRootWndProps);oWin.strOnUnLoad="self.oUp.delObjects();";return oWin;}
function makePortalRootWindow(p_portalId,p_lang,p_firstDay,p_charset,p_connector,p_pwMinLength,p_bIsAnonymous,p_bYellowFade,p_oRootWndProps)
{oHtmlRoot=self;oHtmlRoot.portalId=p_portalId;if(!bRootInsidePortal)self.name=FRAME_ROOT;oHtmlRoot.aVarFrameNames=new Array();oHtmlRoot.aVarFrameNames["stage"]=FRAME_ROOT;setFrameConsts();setDocBody();return _makeRootWindow(p_lang,p_firstDay,p_charset,p_connector,p_pwMinLength,p_bIsAnonymous,p_bYellowFade,p_oRootWndProps);}
function _makeRootWindow(p_lang,p_firstDay,p_charset,p_connector,p_pwMinLength,p_bIsAnonymous,p_bYellowFade,p_oRootWndProps)
{var oWin=new upRootWindow();oWin.oHtml=self;oWin.oHtml.oUp=oWin;oWin.id="oRoot";oWin.oPage=new upPage();oWin.oPage.id='oPageRoot';oWin.oPage.oHtml=self.document;oWin.oPage.oWindow=oWin;oWin.oPage.oHtml.oUp=oWin.oPage;oWin.oFormatInfo=new upFormatInfo();oWin.oFormatInfo.bFrames=false;oWin.oFormatInfo.layoutDir='layout1';oWin.oFormatInfo.defaultLang='de';oWin.oFormatInfo.numLeadNulls=true;oWin.oFormatInfo.currLeadNulls=true;oWin.oFormatInfo.numDecSep='\,';oWin.oFormatInfo.numGroupSep='\.';oWin.oFormatInfo.numFracDigits='2';oWin.oFormatInfo.currDecSep='\,';oWin.oFormatInfo.currGroupSep='\.';oWin.oFormatInfo.intGroupSep='\.';oWin.oFormatInfo.currFracDigits='2';oWin.oFormatInfo.dateSep='.';oWin.oFormatInfo.dateFormat='dd.MM.yyyy';oWin.oFormatInfo.timeFormat='HH:mm';oWin.oFormatInfo.oRequiredStyle=new Array();oWin.oFormatInfo.oRequiredStyle["backgroundImage"]="none";oWin.oFormatInfo.oRequiredStyle["backgroundRepeat"]="";oWin.oFormatInfo.oRequiredStyle["backgroundPosition"]="";oWin.oFormatInfo.aAppMainPaddings=new Array();oWin.oFormatInfo.aAppMainPaddings["top"]="15";oWin.oFormatInfo.aAppMainPaddings["left"]="15";oWin.oFormatInfo.aAppMainPaddings["bottom"]="5";oWin.oFormatInfo.aAppMainPaddings["right"]="10";oWin.oFormatInfo.lang=p_lang;oWin.oFormatInfo.firstDayOfWeek=parseInt(p_firstDay)-1;oWin.oFormatInfo.charset=p_charset;oWin.connector=p_connector;oWin.oWAISettings={};oWin.oWAISettings.bYellowFade=p_bYellowFade;oWin.oWAISettings.oYellowFade={cssProp:"",jsProp:"",value:""};oWin.oWAISettings.bLoadFupByAjax=true;oWin.oWAISettings.bBackButton=true;oWin.pwdMinLength=parseInt(p_pwMinLength)-1;oWin.oRootWin=self.oUp;oWin.bIsAnonymous=p_bIsAnonymous;oWin.portalName="$Portal.getPortalName()";oWin.Stage='P0_0_1_2_1';if(Helper.getQsValueByParam("rq_loggedouturl"))
oWin.loggedoutUrl=Helper.getQsValueByParam("rq_loggedouturl");else
oWin.loggedoutUrl="";oWin.setRefToRootWin();oWin.bDemoMode=false;for(var prop in p_oRootWndProps)
{oWin[prop]=p_oRootWndProps[prop];}
return oWin;}
function makeAppMainWindow(p_frPostIframe)
{if(p_frPostIframe)
oHtmlRoot.aVarFrameNames["postiframe"]=p_frPostIframe;setFrameConsts();setDocBody();var oWin=_makeAppMainWindow();if(self.name.substr(0,6)!="hidden")
{oWin.strOnLoad="self.oUp.resetAppFrames();self.oUp.setFocus();";oWin.strOnUnLoad="self.oUp.delObjects();";}
oWin.oRegistry.oFrameReg[self.name]=self;if(Browser.ie)if(document.getElementById("ID_PAGE"))document.getElementById("ID_PAGE").style.width="95%";oWin.bFrameAppMain=true;return oWin;}
function _makeAppMainWindow()
{var oWin=new upWindow();oWin.oHtml=self;oWin.oHtml.oUp=oWin;oWin.id="oAppMain";oWin.oPage=new upPage();oWin.oPage.id='oPageAppMain';oWin.oPage.oHtml=self.document;oWin.oPage.oWindow=oWin;oWin.oPage.oHtml.oUp=oWin.oPage;oWin.setRefToRootWin();return oWin;}
function makePopup(p_lResizeWin)
{setFrameConsts();setDocBody();var oPopup=_makePopup(p_lResizeWin);return oPopup;}
function _makePopup(p_lResizeWin)
{if(oHtmlRoot&&oHtmlRoot.oUp&&oHtmlRoot.oUp.oRegistry&&oHtmlRoot.oUp.oRegistry.oPopUpReg[self.name])
{var oPopup=oHtmlRoot.oUp.oRegistry.oPopUpReg[self.name];oPopup.aObjects=new Array();}
else
{var oPopup=new upPopUpWindow();oHtmlRoot.oUp.oRegistry.oPopUpReg[self.name]=oPopup;oPopup.setRefToRootWin();}
oPopup.oHtml=self;oPopup.oHtml.oUp=oPopup;oPopup.oPage=new upPage();oPopup.oPage.id='oPopup';oPopup.oPage.oHtml=self.document;oPopup.oPage.oWindow=oPopup;oPopup.oPage.oHtml.oUp=oPopup.oPage;oPopup.oPage.oStyle=Browser.getRef('ID_Popup').style;oPopup.strOnLoad="self.oUp.setFocus();";if(p_lResizeWin=="1")oPopup.strOnLoad="try{self.oUp.resizeByContent();}catch(e){}"+oPopup.strOnLoad;oPopup.strOnUnLoad="try{self.oUp.delObjects();}catch(e){}";oPopup.samePopup=false;if(document.addEventListener)
document.addEventListener("keydown",handleReload,true);else
document.onkeydown=handleReload;return oPopup;}
function unloadHandler()
{if(self.oUp.oFuncPart&&self.oUp.oFuncPart.strOnUnLoad!="")eval(self.oUp.oFuncPart.strOnUnLoad);eval(self.oUp.strOnUnLoad);}
function handleReload(e)
{self.oUp.oEvent=e||window.event;if(Browser.getEventKeyCode()==116||(Browser.getEventKeyCode()==82&&self.oUp.oEvent.ctrlKey))
{oPopup.nextPopup=true;}
return true;}
function makeStageWindow(p_frAppMain,p_frHiddenStage1,p_frHiddenStage2)
{oHtmlRoot.aVarFrameNames["stage"]=self.name;oHtmlRoot.aVarFrameNames["appMain"]=p_frAppMain;oHtmlRoot.aVarFrameNames["hiddenStage1"]=p_frHiddenStage1;oHtmlRoot.aVarFrameNames["hiddenStage2"]=p_frHiddenStage2;setFrameConsts();setDocBody();oWin=_makeWindow();oWin.id="wndStage";return oWin;}
function makePersistentStageWindow(p_frPostIframe,p_frAppMain)
{oHtmlRoot.aVarFrameNames["stage"]=p_frAppMain;oHtmlRoot.aVarFrameNames["appMain"]=p_frAppMain;oHtmlRoot.aVarFrameNames["postiframe"]=p_frPostIframe;self.name=p_frAppMain;oHtmlRoot.oUp.Stage=p_frAppMain;setFrameConsts();setDocBody();oWin=_makeWindow();oHtmlRoot.oUp.oRegistry.oFrameReg[p_frAppMain]=self;oWin.strOnUnLoad="";oWin.id="wndStage";if(!(Browser.safari||Browser.opera||Browser.konqueror))
oHtmlRoot.createBrowserHistory();return oWin;}
function makeChangePortalWindow()
{oHtmlRoot.aVarFrameNames["stage"]=self.name;setFrameConsts();oHtmlRoot.oUp.oRegistry.oFrameReg[self.name]=self;oWin=new upWindow();oWin.oHtml=self;oWin.oHtml.oUp=oWin;oWin.id="wndChangePortal";return oWin;}
function makePortalWindow()
{oHtmlRoot.aVarFrameNames["stage"]=self.name;setFrameConsts();setDocBody();oWin=_makeWindow();oWin.id="wndPortal";return oWin;}
function makeWindow()
{setFrameConsts();setDocBody();oWin=_makeWindow();return oWin;}
function _makeWindow()
{oWin=new upWindow();oWin.oHtml=self;oWin.oHtml.oUp=oWin;oWin.id="wndInclude";oHtmlRoot.oUp.oRegistry.oFrameReg[self.name]=self;oWin.oPage=new upPage();oWin.oPage.id='oPageInclude';oWin.oPage.oHtml=self.document;oWin.oPage.oWindow=oWin;oWin.oPage.oHtml.oUp=oWin.oPage;return oWin;}
function setFrameConsts()
{FRAME_HIDDEN="hiddenFrame";FRAME_HIDDEN_STAGE1="hiddenFrameStage1";FRAME_HIDDEN_STAGE2="hiddenFrameStage2";if(oHtmlRoot.aVarFrameNames["hidden"])FRAME_HIDDEN=oHtmlRoot.aVarFrameNames["hidden"];if(oHtmlRoot.aVarFrameNames["hiddenStage1"])FRAME_HIDDEN_STAGE1=oHtmlRoot.aVarFrameNames["hiddenStage1"];if(oHtmlRoot.aVarFrameNames["hiddenStage2"])FRAME_HIDDEN_STAGE2=oHtmlRoot.aVarFrameNames["hiddenStage2"];}
function setDocBody()
{if(Browser.safari||Browser.konqueror)
{oDocBody=self.document.body;}
else if(Browser.isBackCompat(self))
{oDocBody=self.document.body;}
else
{oDocBody=self.document.documentElement;}}
function setTimeOut(p_strAppRequest,p_bNewReq,p_lTimeOut)
{if(self.name!=oHtmlRoot.aVarFrameNames["hidden"]&&self.name!=oHtmlRoot.aVarFrameNames["hiddenPull"]&&self.name!=oHtmlRoot.aVarFrameNames["hiddenStage1"]&&self.name!=oHtmlRoot.aVarFrameNames["hiddenStage2"]&&self.name.substr(0,7)!="planner")
{var oCurrRootWin=self.oUp.oRootWin;var l_strAppRequest="";if(p_bNewReq)
{l_strAppRequest=Helper.hexEncodeString(p_strAppRequest);oCurrRootWin.l_strTimeOutRequest=l_strAppRequest;}
else
{if(oCurrRootWin.l_strTimeOutRequest!=null)
l_strAppRequest=oCurrRootWin.l_strTimeOutRequest;}
if(l_strAppRequest!=null)
{l_lTimeOut=p_lTimeOut;if(l_lTimeOut>60000)
{l_lTimeOut-=60000;}
l_lTimeOutWarn=l_lTimeOut-20000;oCurrRootWin.l_lTimeOut=l_lTimeOut;oCurrRootWin.l_lTimeOutWarn=l_lTimeOutWarn;if(!isNaN(oCurrRootWin.l_lTimeOutVar))
{oCurrRootWin.oHtml.clearTimeout(oCurrRootWin.l_lTimeOutVar);oCurrRootWin.oHtml.clearTimeout(oCurrRootWin.l_lTimeOutWarnVar);}
oCurrRootWin.l_lTimeOutVar=oCurrRootWin.oHtml.setTimeout("oHtmlRoot.oUp.timeOutSession('"+l_strAppRequest+"')",l_lTimeOut);oCurrRootWin.l_lTimeOutWarnVar=oCurrRootWin.oHtml.setTimeout("oHtmlRoot.oUp.timeOutSessionWarn()",l_lTimeOutWarn);}}}
