
function upContainer()
{this.upType="upContainer";this.oStyle=null;this.oHtml=null;}
upContainer.prototype.biDirectUpHtml=ContainerBiDirectUpHtml;upContainer.prototype.biDirectUpHtml2=ContainerBiDirectUpHtml2;upContainer.prototype.clone=ContainerClone;upContainer.prototype._clone=Container_Clone;upContainer.prototype.initCloneContainer=ContainerInitCloneContainer;upContainer.prototype.removeClone=ContainerRemoveClone;function ContainerBiDirectUpHtml(oUpContainer,htmlId,p_oWin)
{if(arguments.length<3)p_oWin=self;return this.biDirectUpHtml2(oUpContainer,p_oWin.document.getElementById(htmlId));}
function ContainerBiDirectUpHtml2(oUpContainer,oHtml)
{var oFup=null;var bHooked=false;oUpContainer.oHtml=oHtml;oUpContainer.oStyle=oUpContainer.oHtml.style;oUpContainer.id=oUpContainer.oHtml.id;oUpContainer.oHtml.oUp=oUpContainer;if(oUpContainer&&oUpContainer.oFup)
{oFup=oUpContainer.oFup;oFup.aObjects[oFup.aObjects.length]=oUpContainer;bHooked=true;}
else if(typeof oFupLoader!="undefined"&&oFupLoader)
{if(oFupLoader.status=="loadingToolTipPopup"&&oFupLoader.oActionControl&&oFupLoader.oActionControl.oToolTipPopup&&oFupLoader.oActionControl.oToolTipPopup.oFuncPart)
{oFup=oFupLoader.oActionControl.oToolTipPopup.oFuncPart;oFup.aObjects[oFup.aObjects.length]=oUpContainer;bHooked=true;}
else if(oFupLoader.status=="loadingFup"&&self.oUp&&self.oUp.oFuncPart)
{oFup=self.oUp.oFuncPart;oFup.aObjects[oFup.aObjects.length]=oUpContainer;bHooked=true;}}
else if(typeof(g_Portal)!="undefined"&&g_Portal&&g_Portal.oFup&&g_Portal.status=="loadingPortal")
{g_Portal.oFup.aObjects.push(oUpContainer);bHooked=true;}
if(!bHooked)
{if(self.oUp&&self.oUp.oFuncPart)
{oFup=self.oUp.oFuncPart;oFup.aObjects[oFup.aObjects.length]=oUpContainer;}
else if(self.oUp&&self.oUp.aObjects)
{self.oUp.aObjects[self.oUp.aObjects.length]=oUpContainer;}}
return oUpContainer;}
function ContainerClone(oHtml,oCloneContainer)
{var oUp=this._clone(new Object(),oHtml,oCloneContainer);oUp=this.biDirectUpHtml2(oUp,oHtml);if(oCloneContainer.oHtml)
oUp.parentCloneContainerId=oCloneContainer.changeId(oCloneContainer.oHtml.id);return oUp;}
function Container_Clone(oUp,oHtml,oCloneContainer)
{for(i in this)
{if(i=="id")
{oUp["id"]=oCloneContainer.changeId(this["id"]);}
else if(i=="userName")
{if(this["userName"].indexOf(self.oUp.oMessage.CLONER_COPY)==-1)
oUp["userName"]=this["userName"]+": "+self.oUp.oMessage.CLONER_COPY;else
oUp["userName"]=this["userName"].substring(0,this["userName"].lastIndexOf(":"))+": "+self.oUp.oMessage.CLONER_COPY;}
else if(i!="oHtml")
{oUp[i]=this[i];}}
return oUp;}
function ContainerInitCloneContainer(p_strSep,oCloneContainer)
{for(i in this)
{if(i=="id")
{this["id"]=this["id"]+p_strSep+"0";}
else if(i=="userName")
{if(this["userName"].indexOf(":")==-1)
this["userName"]=oCloneContainer.userName+": "+this["userName"];else
this["userName"]=this["userName"].substring(0,this["userName"].indexOf(":"))+" - "+oCloneContainer.userName+": "+this["userName"].substring(this["userName"].indexOf(":")+1);}}
if(oCloneContainer.oHtml)
this.parentCloneContainerId=oCloneContainer.oHtml.id;}
function ContainerRemoveClone()
{this.oHtml.oUp=null;this.oHtml=null;}
function upFuncPart()
{this.upType="upFuncPart";this.addParam="";this.id="";this.appId="";this.parentId="";this.recId="";this.oWindow=null;this.oPage=null;this.oForm=null;this.oHtml=null;this.aObjects=new Array();this.oRegistry=new upFuncPartRegistry(this);this.runIn="";this.strOnUnLoad="";}
upFuncPart.prototype=new upContainer();upFuncPart.prototype.unhook=FuncPartUnhook;upFuncPart.prototype.unhookObjects=FuncPartUnhookObjects;upFuncPart.prototype.unhookObject=FuncPartUnhookObject;upFuncPart.prototype.unhookEventHandler=FuncPartUnhookEventHandler;upFuncPart.prototype._unhookEventHandler=FuncPart_UnhookEventHandler;upFuncPart.prototype.cleanIFrames=FuncPartCleanIFrames;function upFuncPartRegistry(p_oFup)
{this.oFup=p_oFup;this.oDatapickerReg=new upDatapickerRegistry(this);}
upFuncPartRegistry.prototype.cleanUp=upFuncPartRegistryCleanUp;function upFuncPartRegistryCleanUp()
{this.oDatapickerReg.cleanUp();}
function upDatapickerRegistry(p_oFupReg)
{this.oFupReg=p_oFupReg;this.oMap={};this.oMapMsg={};}
upDatapickerRegistry.prototype.cleanUp=upDatapickerRegistryCleanUp;upDatapickerRegistry.prototype.addDp=upDatapickerRegistryAdd;upDatapickerRegistry.prototype.addDpMsg=upDatapickerRegistryAddMsg;upDatapickerRegistry.prototype.getDp=upDatapickerRegistryGet;upDatapickerRegistry.prototype.getDpMsg=upDatapickerRegistryGetMsg;function upDatapickerRegistryAdd(p_oDatapicker)
{if(typeof(p_oDatapicker)=="object"&&typeof(p_oDatapicker.strGuid)=="string")
{this.oMap[p_oDatapicker.strGuid]=p_oDatapicker;}}
function upDatapickerRegistryAddMsg(p_oDpMsg)
{if(typeof(p_oDpMsg)=="object"&&typeof(p_oDpMsg.strGuid)=="string"&&typeof(p_oDpMsg.strMsg)=="string")
{this.oMapMsg[p_oDpMsg.strGuid]=p_oDpMsg;}}
function upDatapickerRegistryGet(p_strGuid)
{var l_Ret=false;if(typeof(p_strGuid)=="string"&&p_strGuid.length>0)
{var l_bAbort=false;var l_oMsg=this.getDpMsg(p_strGuid);if(l_oMsg)
{l_bAbort=!l_oMsg.bReturn;}
if(!l_bAbort)
{if(typeof(this.oMap[p_strGuid])=="object")
{l_Ret=this.oMap[p_strGuid];}}}
return l_Ret;}
function upDatapickerRegistryGetMsg(p_strGuid)
{var l_Ret=false;if(typeof(p_strGuid)=="string"&&p_strGuid.length>0)
{if(typeof(this.oMapMsg[p_strGuid])=="object")
{l_Ret=this.oMapMsg[p_strGuid];}}
return l_Ret;}
function upDatapickerRegistryCleanUp()
{for(var guid in this.oMap)
{this.oMap[guid].cleanUp();}
this.oMap={};}
function FuncPartUnhook()
{this.oRegistry.cleanUp();this.unhookEventHandler();this.unhookObjects();this.cleanIFrames();if(this.oWindow&&this.runIn&&(this.runIn=="AppMain"||this.runIn=="ContainerAppMain"))
this.oWindow.oFuncPart=null;if(typeof iTTPTimer=="number")
{window.clearTimeout(iTTPTimer);}
this.oForm=null;this.oHtml=null;this.oWindow=null;this.oPage=null;return true;}
function FuncPartCleanIFrames()
{var aIFrames=document.getElementsByTagName("iframe");if(aIFrames!=null)
{var iLength=aIFrames.length;var oIFrame=null;for(var i=0;i<iLength;i++)
{oIFrame=aIFrames[i];if(!Loader.isExternalUri(oIFrame.src)&&(oIFrame.getAttribute("id")==null||oIFrame.getAttribute("id").indexOf("___Frame")!=-1))
{i--;iLength--
if(oIFrame.innerHTML)oIFrame.innerHTML="";if(oIFrame.parentNode)
oIFrame.parentNode.removeChild(oIFrame);}}}}
function FuncPartUnhookEventHandler()
{if(typeof this.oHtml!="undefined"&&this.oHtml)
{var oHtml=this.oHtml;var aFormNodes=oHtml.getElementsByTagName("form");if(aFormNodes.length>0)
{aFormNodes[0].submitAction=null;aFormNodes[0].action=null;}
var aANodes=oHtml.getElementsByTagName("a");if(aANodes.length>0)this._unhookEventHandler(aANodes);var aInputNodes=oHtml.getElementsByTagName("input");if(aInputNodes.length>0)this._unhookEventHandler(aInputNodes);var aSelectNodes=oHtml.getElementsByTagName("select");if(aSelectNodes.length>0)this._unhookEventHandler(aSelectNodes);var aTextareaNodes=oHtml.getElementsByTagName("textarea");if(aTextareaNodes.length>0)this._unhookEventHandler(aTextareaNodes);var aImgNodes=oHtml.getElementsByTagName("img");if(aImgNodes.length>0)this._unhookEventHandler(aImgNodes);}}
function FuncPart_UnhookEventHandler(ns)
{var ob=null;var events=['onkeydown','onkeyup','onmouseover','onmouseout','onmousedown','onmousemove','onmouseup','ondblclick','onclick','onchange','onfocus','onblur','onload','onunload'];var iLength=ns.length;for(var j=iLength;j--;)
{ob=ns[j];var iLength2=events.length;for(var i=iLength2;i--;)
{ob[events[i]]=null;}}}
function FuncPartUnhookObjects()
{if(typeof this.aObjects=="undefined"||!this.aObjects||this.aObjects.length<1)
return false;var ob=null;for(var i=0;i<this.aObjects.length;i++)
{this.unhookObject(i);}
this.aObjects=new Array();return true;}
function FuncPartUnhookObject(param1)
{var ob,iPos;if(typeof(param1)=="number"&&param1!=null)
{ob=this.aObjects[param1];iPos=param1;}
else if(typeof(param1)=="object"&&param1!=null)
{ob=param1;if(typeof(ob.id)!="undefined")
{for(var i=0;i<this.aObjects.length;i++)
{if(this.aObjects[i]!=null&&ob.id==this.aObjects[i].id)
{iPos=i;break;}}}
else if(typeof(ob.strKey)!="undefined")
{for(var i=0;i<this.aObjects.length;i++){if(ob.strKey==this.aObjects[i].strKey){iPos=i;break;}}}}
else
return;if(typeof ob=="undefined"||ob==null)return;if(ob.upType=="upFuncPart")
{ob.unhook();self.oUp.oRootWin.unregisterFup(ob.id);}
if(typeof(ob.cleanUp)=="object"||typeof(ob.cleanUp)=="function")
{ob.cleanUp();}
if(typeof ob.oHtml=="undefined"||ob.oHtml==null)
{if(typeof ob.oFup!="undefined"&&ob.oFup)
{ob.oFup=null;}
if(typeof this.aObjects[iPos]=="string")
{this.aObjects[iPos]="";}
else
{this.aObjects[iPos]=null;}
return;}
if(typeof(ob)!="unknown"&&typeof(ob.oHtml)!="unknown")
{if(typeof(ob.oHtml.oUp)!="unknown")
{ob.oHtml.oUp=null;}
if(ob.oFup)
{ob.oFup=null;}
if(ob.submitAction)
{ob.submitAction=null;ob.action=null;}
else if(ob.aContainer)
{ob.aContainer=null;}
else if(ob.oHtmlNotSel)
{ob.oHtmlNotSel=null;ob.oHtmlSel=null;ob.oHtmlLeft=null;ob.oHtmlRight=null;ob.oHtmlOut=null;}
if(ob.oToolTipPopup&&ob.oTarget&&ob.oTarget.bNewToolTipPopup)
{ob.oToolTipPopup.closePopup();ob.oToolTipPopup=null;}
if(typeof(ob.eConfirm)=="object"&&ob.eConfirm!=null)
{ob.eConfirm.cleanUp();}
ob.oStyle=null;ob.oHtml=null;}
ob=null;if(isNaN(iPos)||this.aObjects.length<=iPos||iPos<0)
return;try
{if(typeof this.aObjects[iPos].id!="undefined"&&eval("typeof o"+this.aObjects[iPos].id.substring(3))!="undefined")
{eval("o"+this.aObjects[iPos].id.substring(3)+"=null");}
else
{for(var prop in this.aObjects[iPos])
{this.aObjects[iPos][prop]=null;}}}
catch(e)
{ErrorHandler.warn(e,"FuncPartUnhookObject");}
this.aObjects[iPos]=null;}
function upCaption()
{this.upType="upCaption";}
upCaption.prototype=new upContainer();function upImage()
{this.upType="upImage";}
upImage.prototype=new upContainer();function upUri()
{this.upType="upUri";}
upUri.prototype=new upContainer();function upDivContainer()
{this.upType="upDivContainer";}
upDivContainer.prototype=new upContainer();function upControl()
{this.upType="";this.userName="";}
upControl.prototype=new upContainer();upControl.prototype.fillLeading=ControlFillLeading;upControl.prototype.getPosition2Screen=ControlGetPosition2Screen;upControl.prototype.getWidth=ControlGetWidth;upControl.prototype.setFocusStyle=ControlSetFocusStyle;upControl.prototype._setFocusStyle=Control_SetFocusStyle;function ControlSetFocusStyle(p_bFocus)
{this._setFocusStyle(p_bFocus);return true;}
function Control_SetFocusStyle(p_bFocus)
{if(this.oHtml.className.indexOf("_notvalid")>-1||(Browser.ie6&&this.upType=="upDropdownControl"))
return true;if(p_bFocus)
{if(this.upType=="upButtonControl")
{var name=this.oHtml.className.substring(this.oHtml.className.indexOf("_")+1,this.oHtml.className.lastIndexOf("_"));this.oHtml.className="SCUP_"+name+"_hover";}
else
{this.oHtml.className="SCUP_"+this.styleType+"_selected";}}
else
{if(this.readonly&&this.readonly=="1")
{this.oHtml.className="SCUP_"+this.styleType+"_readonly";}
else
{if(this.upType=="upButtonControl")
{var name=this.oHtml.className.substring(this.oHtml.className.indexOf("_")+1,this.oHtml.className.lastIndexOf("_"));this.oHtml.className="SCUP_"+name+"_normal";}
else
{this.oHtml.className="SCUP_"+this.styleType+"_normal";}}}
return true;}
function ControlFillLeading(p_Input)
{var input=new String(p_Input);if(input.length>1)
{return input;}
else
{return'0'+input;}}
function ControlGetPosition2Screen()
{oPosXY=Browser.getPosition2Screen(this.oHtml);return oPosXY;}
function ControlGetWidth()
{var width=Browser.getWidth(this.oHtml);return parseInt(width);}
function uploadClick()
{var oHtmlIFrame=null;var oIframe=document.createElement("iframe");oIframe.setAttribute("name","Upload_IFrame");oIframe.setAttribute("id","Upload_IFrame");oIframe.style.width="100px";oIframe.style.height="100px";oIframe.setAttribute("frameborder","1");oHtmlIFrame=document.body.appendChild(oIframe);var oDocIFrame=window.frames['Upload_IFrame'].document;oDocIFrame.open();oDocIFrame.write('<form name="Upload_Form" id="ID_Upload_Form" enctype="multipart/form-data" method="post"><input type="file" id="ID_Upload_File" name="Upload_File" onchange="alert(this.value)"/><input type="submit" id="ID_Upload_Submit" name="Upload_Submit"/></form>');oDocIFrame.close();window.frames['Upload_IFrame'].document.forms[0].Upload_File.click();}
function upActionControl()
{this.requestType=1;this.linkType="0";this.description="";this.bFlipStatus=false;this.bFlipUseCookie=false;this.bDrRec=false;this.flipControl="";this.closeWin="";this.close="0";this.bornToDie="0";this.reloadParent="0";this.changeParent="0"
this.reloadParentAnyway="0";this.focus=false;this.sameWindow="1";this.reloadWindowname="";this.bDisabled=false;this.oToolTipPopup=null;this.oXmlHttp=new upXmlHttp(this);this.oFup=null;this.oOrgProperties=null;}
upActionControl.prototype=new upControl();upActionControl.prototype.processRequest=ActionProcessRequest;upActionControl.prototype.setQueryString=ActionSetQueryString;upActionControl.prototype.handleAddParam=ActionHandleAddParam;upActionControl.prototype.setCloseAndReload=ActionSetCloseAndReload;upActionControl.prototype.setTemplateAndFrame=ActionSetTemplateAndFrame;upActionControl.prototype.checkModifierKeys=ActionCheckModifierKeys
upActionControl.prototype.changeTarget=ActionChangeTarget;upActionControl.prototype.changeLang=ActionChangeLang;upActionControl.prototype.setStatus=ActionSetStatus;upActionControl.prototype.setMenu=ActionSetMenu;upActionControl.prototype.flipFlopAll=ActionFlipFlopAll;upActionControl.prototype.flipFlop=ActionFlipFlop;upActionControl.prototype._flipFlop=Action_FlipFlop;upActionControl.prototype.showFFStatus=ActionShowFFStatus;upActionControl.prototype.promptRcptTo=ActionPromptRcptTo;upActionControl.prototype.promptRcptCC=ActionPromptRcptCC;upActionControl.prototype.promptRcptBCC=ActionPromptRcptBCC;upActionControl.prototype._promptRcpt=Action_PromptRcpt;upActionControl.prototype._checkRcpt=Action_CheckRcpt;upActionControl.prototype.disable=Action_Disable;upActionControl.prototype.enable=Action_Enable;upActionControl.prototype.clone=ActionClone;upActionControl.prototype.removeClone=ActionRemoveClone;upActionControl.prototype._clone=Action_Clone;upActionControl.prototype.initCloneContainer=ActionInitCloneContainer;function ActionInitCloneContainer(p_strSep,oCloneContainer)
{var iCounter=0;if(this.id)
{this.id=this.id+p_strSep+"0";}
else if(this.userName)
{if(this.userName.indexOf(":")==-1)
this.userName=oCloneContainer.userName+": "+this.userName;else
this.userName=this.userName.substring(0,this.userName.indexOf(":"))+" - "+oCloneContainer.userName+": "+this.userName.substring(this.userName.indexOf(":")+1);}
switch(this.linkType)
{case"6":this.oTargetChanger.targetCtrl=this.oTargetChanger.targetCtrl+p_strSep+iCounter;this.oTargetChanger.actionCtrl=this.oTargetChanger.actionCtrl+p_strSep+iCounter;break;case"8":this.oDate=document.getElementById(this.oDate.id.substring(0,this.oDate.id.lastIndexOf(p_strSep))+p_strSep+iCounter).oUp;break;case"14":this.containerId=this.containerId+p_strSep+iCounter;break;case"15":this.flipControl=this.flipControl+p_strSep+iCounter;break;case"23":if(this.aResponseControls)
{this.aResponseMap={};for(var c in this.aResponseControls)
{this.aResponseMap[c]=c+p_strSep+iCounter;}}
if(this.oXmlHttp.aPostControls)
{for(var c in this.oXmlHttp.aPostControls)
{if((this.oXmlHttp.aPostControls[c].no_multiple_container-oCloneContainer.level)>0&&this.oXmlHttp.aPostControls[c].controlName!=null)
{this.oXmlHttp.aPostControls[c].controlName=this.oXmlHttp.aPostControls[c].controlName+p_strSep+iCounter;}
if(this.oXmlHttp.aPostControls[c].level!=null)
{for(var l in this.oXmlHttp.aPostControls[c].level)
{if(this.oXmlHttp.aPostControls[c].level[l].controlName!=null)
this.oXmlHttp.aPostControls[c].level[l].controlName=this.oXmlHttp.aPostControls[c].level[l].controlName+p_strSep+iCounter;}}}}
break;}
if(oCloneContainer.oHtml)
this.parentCloneContainerId=oCloneContainer.oHtml.id;}
function ActionRemoveClone()
{switch(this.linkType)
{case"6":this.oTargetChanger.targetCtrl=null;this.oTargetChanger.actionCtrl=null;break;case"8":this.oDate=null;break;case"15":this.flipControl=null;break;case"23":this.oXmlHttp.aPostControls=null;this.aResponseMap=null;this.oXmlHttp=null;break;}
this.oHtml.oUp=null;this.oHtml=null;}
function ActionClone(oHtml,oCloneContainer)
{var oUp=this._clone(new Object(),oHtml,oCloneContainer);oUp=this.biDirectUpHtml2(oUp,oHtml);if(typeof this.oHtml.onclick!="undefined")oHtml.onclick=this.oHtml.onclick;if(typeof this.oHtml.onchange!="undefined")oHtml.onchange=this.oHtml.onchange;switch(oUp.linkType)
{case"6":oUp.oTargetChanger.targetCtrl=oCloneContainer.changeId(this.oTargetChanger.targetCtrl);oUp.oTargetChanger.actionCtrl=oCloneContainer.changeId(this.oTargetChanger.actionCtrl);break;case"7":oUp.cloneContainerId=oCloneContainer.changeId(this.cloneContainerId);break;case"22":oUp.cloneContainerId=oCloneContainer.changeId(this.cloneContainerId);break;case"8":oUp.oDate=document.getElementById(oCloneContainer.changeId(this.oDate.id)).oUp;break;case"14":oUp.containerId=oCloneContainer.changeId(this.containerId);break;case"15":oUp.flipControl=oCloneContainer.changeId(this.flipControl);break;case"23":if(this.aResponseMap)
{for(var c in this.aResponseMap)
{oUp.aResponseMap[c]=oCloneContainer.changeIdOfMultipleLevel(this.aResponseMap[c],oHtml);}}
for(var c in this.oXmlHttp.aPostControls)
{if(this.oXmlHttp.aPostControls[c].no_multiple_container>0&&this.oXmlHttp.aPostControls[c].controlName!=null)
{oUp.oXmlHttp.aPostControls[c].controlName=oCloneContainer.changeIdOfMultipleLevel(this.oXmlHttp.aPostControls[c].controlName,oHtml);}
else
{oUp.oXmlHttp.aPostControls[c].controlName=this.oXmlHttp.aPostControls[c].controlName;}
if(this.oXmlHttp.aPostControls[c].level!=null)
{for(var l in this.oXmlHttp.aPostControls[c].level)
{if(this.oXmlHttp.aPostControls[c].level[l].controlName!=null)
oUp.oXmlHttp.aPostControls[c].level[l].controlName=oCloneContainer.changeIdOfMultipleLevel(this.oXmlHttp.aPostControls[c].level[l].controlName,oHtml);}}}
break;}
if(oCloneContainer.oHtml)
oUp.parentCloneContainerId=oCloneContainer.changeId(oCloneContainer.oHtml.id);return oUp;}
function Action_Clone(oUp,oHtml,oCloneContainer)
{for(i in this)
{if(i=="oTarget")
{oUp["oTarget"]=new upTarget();for(var j in this["oTarget"])
{oUp["oTarget"][j]=this["oTarget"][j];}}
else if(i=="userName")
{if(this["userName"].indexOf(self.oUp.oMessage.CLONER_COPY)==-1)
oUp["userName"]=this["userName"]+": "+self.oUp.oMessage.CLONER_COPY;else
oUp["userName"]=this["userName"].substring(0,this["userName"].lastIndexOf(":"))+": "+self.oUp.oMessage.CLONER_COPY;}
if(i=="oTargetChanger")
{oUp["oTargetChanger"]=new upTarget();for(var j in this["oTargetChanger"])
{oUp["oTargetChanger"][j]=this["oTargetChanger"][j];}}
else if(i=="oSource")
{oUp["oSource"]=new upSource();for(var j in this["oSource"])
oUp["oSource"][j]=this["oSource"][j];}
else if(i=="aResponseMap")
{oUp.aResponseMap={};for(var j in this["aResponseMap"])
{oUp.aResponseMap[j]=this["aResponseMap"][j];}}
else if(i=="oXmlHttp")
{oUp["oXmlHttp"]=new upXmlHttp(oUp);for(var j in this["oXmlHttp"])
{if(j=="aPostControls")
{oUp.oXmlHttp.aPostControls={};for(var k in this.oXmlHttp.aPostControls)
{oUp.oXmlHttp.aPostControls[k]={};for(var l in this.oXmlHttp.aPostControls[k])
{if(l=="level")
{if(this.oXmlHttp.aPostControls[k].level!=null)
{oUp.oXmlHttp.aPostControls[k].level={};for(var m in this.oXmlHttp.aPostControls[k].level)
{oUp.oXmlHttp.aPostControls[k].level[m]={};for(var n in this.oXmlHttp.aPostControls[k].level[m])
{oUp.oXmlHttp.aPostControls[k].level[m][n]=this.oXmlHttp.aPostControls[k].level[m][n];}}}
else
{oUp.oXmlHttp.aPostControls[k].level=null;}}
else
{oUp.oXmlHttp.aPostControls[k][l]=this.oXmlHttp.aPostControls[k][l];}}}}
else
{oUp["oXmlHttp"][j]=this["oXmlHttp"][j];}}}
else if(i=="id")
{oUp["id"]=oCloneContainer.changeId(this["id"]);}
else if(i!="oHtml")
{oUp[i]=this[i];}}
return oUp;}
function Action_Disable()
{if(!this.bDisabled&&typeof(this.oHtml.style)=="object")
{if((Browser.ie5||Browser.ie6up)&&(this.upType=="upTextActionControl"||this.upType=="upButtonControl"))
{this.oHtml.disabled=true;}
Helper.style.setOpacity(this.oHtml,40);if(this.oImage)
{Helper.style.setOpacity(this.oImage,40);}
this.onclickAction=this.oHtml.onclick;this.oHtml.onclick=doNothing;this.bDisabled=true;}}
function doNothing()
{return false;}
function Action_Enable()
{if(this.bDisabled&&typeof(this.oHtml.style)=="object")
{if((Browser.ie5||Browser.ie6up)&&(this.upType=="upTextActionControl"||this.upType=="upButtonControl"))
{this.oHtml.disabled=false;}
Helper.style.setOpacity(this.oHtml,100);if(this.oImage)
{Helper.style.setOpacity(this.oImage,100);}
if(this.onclickAction)
{this.oHtml.onclick=this.onclickAction;}
this.bDisabled=false;}}
function ActionPromptRcptTo(internetFormat)
{if(!internetFormat||internetFormat=="")
internetFormat="1";return this._promptRcpt(self.oUp.oMessage.MAIL_PROMPT_COMMENT,internetFormat,"");}
function ActionPromptRcptCC(internetFormat)
{if(!internetFormat||internetFormat=="")
internetFormat="1";return this._promptRcpt(self.oUp.oMessage.MAIL_CC_PROMPT_COMMENT,internetFormat,"");}
function ActionPromptRcptBCC(internetFormat)
{if(!internetFormat||internetFormat=="")
internetFormat="1";return this._promptRcpt(self.oUp.oMessage.MAIL_BCC_PROMPT_COMMENT,internetFormat,"");}
function Action_PromptRcpt(strPromptText,internetFormat,p_strRcpt)
{if(!this.oHtml||!this.oHtml.form)
return false;var strRcpt="";if(p_strRcpt||p_strRcpt!="")
strRcpt=p_strRcpt;else
strRcpt="";if(!internetFormat||internetFormat=="")
internetFormat="1";strRcpt=prompt(strPromptText,strRcpt);return this._checkRcpt(internetFormat,strRcpt);}
function Action_CheckRcpt(internetFormat,strRcpt)
{if(strRcpt==null||strRcpt=="")
return"";strRcpt=strRcpt.replace(/^ +/,"");strRcpt=strRcpt.replace(/ +$/,"");strRcpt=strRcpt.replace(/,+/g,";");strRcpt=strRcpt.replace(/ +/g,";");strRcpt=strRcpt.replace(/;{2,}/g,";");strRcpt=strRcpt.replace(/;$/,"");if(internetFormat&&internetFormat=="1")
{reg=new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,6}|[0-9]{1,3})(\\]?)$","i");aRcpt=strRcpt.split(";");validRcpt="";for(i=0;i<aRcpt.length;i++)
{if((aRcpt[i]=="")||(aRcpt[i]==" "))
{continue;}
if(!reg.test(aRcpt[i]))
{this._promptRcpt(self.oUp.oMessage.MAIL_PROMPT_INVALID+aRcpt[i],internetFormat,strRcpt);}
else
{validRcpt=validRcpt+aRcpt[i];}
if(i<aRcpt.length-1)
validRcpt=validRcpt+";";}
strRcpt=validRcpt;}
return strRcpt;}
function ActionFlipFlopAll()
{if(!this.flipAllList)return false;var id;for(var i=0;i<this.flipAllList.length;i++)
{id=this.flipAllList[i];if(Browser.getRef(id))Browser.getRef(id).onclick();}
return true;}
function Action_FlipFlop(bFlipStatus)
{if(this.flipControl!='')
{var l_strStatus=(bFlipStatus)?"1":"0";var oHtmlFlipControl=Browser.getRef("ID_"+this.flipControl);if(oHtmlFlipControl)
{if(bFlipStatus==true)
{oHtmlFlipControl.style.visibility="visible";oHtmlFlipControl.style.display="";this.description=self.oUp.oMessage.FLIPFLOP_CLOSE_JS;}
else
{oHtmlFlipControl.style.visibility="hidden";oHtmlFlipControl.style.display="none";this.description=self.oUp.oMessage.FLIPFLOP_OPEN_JS;}
if(this.bFlipUseCookie&&Helper.isCookieEnabled())
{Helper.setCookie("co_FlipFlop"+this.flipControl,l_strStatus,"1");}
var l_oHtmlHidden=document.getElementById("ID_FlipFlop"+this.flipControl)
if(l_oHtmlHidden)
{Browser.setValue(l_oHtmlHidden,l_strStatus);}
this.bFlipStatus=!this.bFlipStatus;}}}
function ActionShowFFStatus()
{if(this.flipControl!='')
{var oHtmlFlipControl=Browser.getRef("ID_"+this.flipControl);if(oHtmlFlipControl)
{if(this.bFlipStatus==true)
{this.description=self.oUp.oMessage.FLIPFLOP_CLOSE_JS;}
else
{this.description=self.oUp.oMessage.FLIPFLOP_OPEN_JS;}
this.setStatus(true);}}}
function ActionFlipFlop(bFlipStatus)
{return this._flipFlop(bFlipStatus);}
function ActionSetStatus(bOnOff)
{if(bOnOff)
{if(this.description)
{window.status=this.description;}
else
{window.status='';}}
else
{window.status='';}}
function ActionSetMenu()
{if(!oHtmlRoot.oMenuTree)
return;if(this.oTarget&&this.oTarget.rq_AppGuid)
oHtmlRoot.oMenuTree.resetAll("",this.oTarget.rq_AppGuid,"");else if(this.oTarget&&this.oTarget.rq_AppId)
oHtmlRoot.oMenuTree.resetAll("",this.oTarget.rq_AppId,"");return;}
function ActionChangeLang()
{if(self.oUp&&self.oUp.oFormatInfo)
{self.oUp.oFormatInfo.lang=this.oTarget.rq_Lang;}
Helper.setCookie("co_Lang",this.oTarget.rq_Lang,true);var url=Helper.setUrlValueByParam("rq_Lang",this.oTarget.rq_Lang,oHtmlRoot.oUp.connector);if(!Helper.getCookieValueByParam("co_SId"))
{if(Helper.getQsValueByParam("rq_SId"))
url=Helper.setUrlValueByParam("rq_SId",Helper.getQsValueByParam("rq_SId"),url);}
oHtmlRoot.location.href=url;return true;}
function ActionProcessRequest(e)
{var rv=true;var fm=null;this.bornToDie=0;this.closeWin="";if(this.linkType=="5")return rv;if((typeof this.oFup=="undefined"||this.oFup==null)&&self.oUp.oFuncPart)
this.oFup=self.oUp.oFuncPart;if(this.oHtml&&this.oHtml.form)
{fm=this.oHtml.form;}
else if(this.oHtml)
{fm=getFormObjectByElement(this.oHtml);}
if(typeof e!="undefined"&&e!=null)
{self.oUp.oEvent=e;self.oUp.oRootWin.eventScreenX=e.screenX;self.oUp.oRootWin.eventScreenY=e.screenY;}
else if(typeof window.event!="undefined")
{self.oUp.oEvent=window.event;}
else
{self.oUp.oEvent=null;}
if(self.oUp.oTargetChanger)
{this.changeTarget(self.oUp.oTargetChanger);}
else if(this.oFup&&this.oFup.runIn=="ToolTipPopup"&&this.oFup.oToolTipPopup.oTargetChanger)
{this.changeTarget(this.oFup.oToolTipPopup.oTargetChanger);}
if(this.requestType==1&&(this.linkType=="1"||!fm||this.oTarget.rq_ControlType=="file"||this.oTarget.rq_ControlType=="image"||(this.oTarget.rq_TargetUrl&&this.oTarget.rq_TargetUrl!="")))
{this.requestType=0;}
if((this.requestType==1||this.requestType==3)&&this.oSource&&this.oSource.fr_ActionId&&fm.fr_ActionId)
{fm.fr_ActionId.value=this.oSource.fr_ActionId;}
else if(fm&&fm.fr_ActionId)
{fm.fr_ActionId.value="";}
if(!this.checkModifierKeys())
return false;this.setTemplateAndFrame();this.setQueryString();this.handleAddParam();if(self.oUp.upType=="upPopUpWindow")
{this.setCloseAndReload();}
if(this.oSource&&(this.oSource.fr_ActionId=="1"||this.oSource.fr_ActionId=="2")&&oHtmlRoot.oUp.bDemoMode)
{oHtmlRoot.oUp.adviceShow(self.oUp.oMessage.DEMO_MODE_ADVICE_TITLE,self.oUp.oMessage.DEMO_MODE_ADVICE_TEXT,"DEMO_MODE_ADVICE",null,self);return false;}
if(this.oTarget.type=="rec2ctrl")
{this.oOrgProperties={fr_ActionId:this.oSource.fr_ActionId};this.requestType=1;this.oTarget.rq_TargetFrame=ContainerAgent.getPostIFrameName();this.oTarget.rq_Template="internal/system/vm/html/misc/postiframe.vm";this.QueryString=Helper.setQsValueByParam("rq_TargetFrame",ContainerAgent.getPostIFrameName(),this.QueryString);this.QueryString=Helper.setQsValueByParam("rq_Template","internal/system/vm/html/misc/postiframe.vm",this.QueryString);var l_strTgt=Helper.getQsValueByParam("rq_Control",this.oTarget.addParam);var oTargWin=null;var oTargDoc=null;var srcFrame=Helper.getQsValueByParam("rq_ControlFrame",this.oTarget.addParam);this.QueryString=Helper.setQsValueByParam("rq_Caller",srcFrame,this.QueryString);if(oHtmlRoot.oUp&&oHtmlRoot.oUp.oRegistry&&oHtmlRoot.oUp.oRegistry.oFrameReg[srcFrame]&&typeof oHtmlRoot.oUp.oRegistry.oFrameReg[srcFrame].name!="unknown")
{var oTargWin=oHtmlRoot.oUp.oRegistry.oFrameReg[srcFrame];if(oTargWin&&oTargWin.document)
{var oTargDoc=oTargWin.document;if(oTargDoc)
{var oTargetControl=Browser.getRef("ID_"+l_strTgt,oTargDoc).oUp;self.oLoadAction=this;self.oLoadAction.oRec2ctrlProps={oLoadTgt:oTargetControl,oTargWin:oTargWin}
oTargWin.startFupLoad=function(recId,sourceRecId)
{if(self.oLoadAction)
{var l_oRec2ctrlProps=self.oLoadAction.oRec2ctrlProps;var l_oTgtWin=l_oRec2ctrlProps.oTargWin;var l_oTgtCtrl=l_oRec2ctrlProps.oLoadTgt;if(l_oTgtCtrl.upType=="upDropdownControl"||l_oTgtCtrl.upType=="upListboxControl")
{l_oTgtCtrl.reload();}
l_oTgtWin.Browser.setValue(l_oTgtCtrl,sourceRecId,"key");if(self.oUp.oRootWin.oRegistry.oPopUpReg[self.name])
{self.oUp.oRootWin.oRegistry.oPopUpReg[self.name].close();}
else if(self.oLoadAction.oToolTipPopup)
{self.oLoadAction.oToolTipPopup.closePopup();}}}
rv=self.oUp.requestPage(this);return true;}}}
return false;}
if(this.oTarget.bToolTipPopup)
{this.oTarget.bNewToolTipPopup=true;this.oToolTipPopup.QueryString=this.QueryString;this.oToolTipPopup.oActionControl=this;if(typeof this.oFup!="undefined"&&this.oFup&&this.oFup.runIn=="ToolTipPopup")
{this.oToolTipPopup.oOpeningTTP=this.oFup.oToolTipPopup;}
if(this.oSource&&this.oSource.fr_ActionId==1&&this.oHtml.form&&this.oHtml.form.oUp.bFileUpload)
{this.oOrgProperties={fr_ActionId:this.oSource.fr_ActionId};this.requestType=1;this.oTarget.rq_TargetFrame=ContainerAgent.getPostIFrameName();this.oTarget.rq_Template="internal/system/vm/html/misc/postiframe.vm";if(self.oUp.upType=="upPopUpWindow")
this.QueryString=Helper.setQsValueByParam("rq_Caller",self.name,this.QueryString);this.QueryString=Helper.setQsValueByParam("rq_TargetFrame",ContainerAgent.getPostIFrameName(),this.QueryString);this.QueryString=Helper.setQsValueByParam("rq_Template","internal/system/vm/html/misc/postiframe.vm",this.QueryString);rv=self.oUp.requestPage(this);if(!rv)return false;this.requestType=3;fm.fr_ActionId.value="";this.oSource.fr_ActionId=0;this.QueryString=Helper.deleteParamFromQs("rq_Mail",this.QueryString);this.QueryString=Helper.setQsValueByParam("rq_Template","internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frames/tooltippopup.vm",this.QueryString);this.oTarget.rq_Template="internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frames/tooltippopup.vm";this.oToolTipPopup.oActionControl=this;self.oLoadAction=this;self.startFupLoad=function(recId,sourceRecId){oFupLoader=new upFupLoader();self.oLoadAction.QueryString=Helper.setQsValueByParam("rq_RecId",recId,self.oLoadAction.QueryString);self.oLoadAction.QueryString=Helper.setQsValueByParam("rq_SourceRecId",sourceRecId,self.oLoadAction.QueryString);var rv=oFupLoader.load(self.oLoadAction);};return true;}
else
{oFupLoader=new upFupLoader();rv=oFupLoader.load(this);return rv;}}
if(this.requestType==2||this.requestType==3)
{var bResetUrl=false;if(this.oXmlHttp.strUrl==null||this.oXmlHttp.strUrl=="")
{bResetUrl=true;this.oXmlHttp.strUrl=self.oHtmlRoot.oUp.connector+"?"+this.QueryString;}
else
{if(this.oTarget&&this.oTarget.addParam!="")
{this.oXmlHttp.strUrl=this.oXmlHttp.strUrl+"&"+this.oTarget.addParam;}
if(Helper.getQsValueByParam("rq_SId")&&!Helper.isCookieEnabled())
{this.oXmlHttp.strUrl=Helper.setUrlValueByParam("rq_SId",Helper.getQsValueByParam("rq_SId"),this.oXmlHttp.strUrl);}}
if(this.requestType==3)
{this.oXmlHttp.strMethod="POST";var submitOK=true;if(this.oXmlHttp.bAddFormData)
{if(this.oSource&&this.oSource.fr_ActionId=="1"&&fm.submitAction)
{submitOK=fm.submitAction();}
if(!submitOK)
{fm.fr_ActionId.value="";return false;}
this.oXmlHttp.addForm(fm);if(this.oXmlHttp.bAddHistory)
addHistoryEntry(this.oXmlHttp.strUrl,this.oXmlHttp.aRequestPostData);}}
else
{this.oXmlHttp.strMethod="GET";if(this.oXmlHttp.bAddHistory)
addHistoryEntry(this.oXmlHttp.strUrl,null);}
this.oXmlHttp.send();if(bResetUrl)
this.oXmlHttp.strUrl=null;return true;}
if(this.oFup&&this.oFup.runIn=="ToolTipPopup"&&this.oTarget.newWindow=="0"&&(this.linkType=="0"||this.linkType=="2"||this.linkType=="9"||(this.linkType>="16"&&this.linkType<="21"))&&this.oTarget.rq_TargetFrame!=ContainerAgent.getHiddenFrameName())
{this.oTarget.bNewToolTipPopup=false;this.oToolTipPopup=this.oFup.oToolTipPopup;this.oToolTipPopup.QueryString=this.QueryString;if(this.changeParent==0&&this.linkType!="12")
{this.oTarget.bInsideToolTipPopup=true;if(this.oToolTipPopup.bCloseByChange&&this.oSource&&(this.oSource.fr_ActionId=="1"||this.oSource.fr_ActionId=="2"))
{this.close="1";}
if(this.close=="1")
{this.QueryString=Helper.setQsValueByParam("rq_Template","internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frames/tooltippopup.vm",this.QueryString);this.QueryString=Helper.setQsValueByParam("rq_LoadStaticVm","internal/system/vm/html/misc/closettp.vm",this.QueryString);}
if(!this.oToolTipPopup.bPermitClose)
this.QueryString=Helper.setQsValueByParam("rq_showclosewin","0",this.QueryString);if(this.oSource&&this.oSource.fr_ActionId==1&&this.oHtml.form&&this.oHtml.form.oUp.bFileUpload)
{this.oOrgProperties={fr_ActionId:this.oSource.fr_ActionId};this.oTarget.rq_TargetFrame=ContainerAgent.getPostIFrameName();this.oTarget.rq_Template="internal/system/vm/html/misc/postiframe.vm";if(self.oUp.upType=="upPopUpWindow")
this.QueryString=Helper.setQsValueByParam("rq_Caller",self.name,this.QueryString);this.QueryString=Helper.setQsValueByParam("rq_TargetFrame",ContainerAgent.getPostIFrameName(),this.QueryString);this.QueryString=Helper.setQsValueByParam("rq_Template","internal/system/vm/html/misc/postiframe.vm",this.QueryString);rv=self.oUp.requestPage(this);if(!rv)return false;fm.fr_ActionId.value="";this.oSource.fr_ActionId=0;this.QueryString=Helper.deleteParamFromQs("rq_Mail",this.QueryString);this.QueryString=Helper.setQsValueByParam("rq_Template","internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frames/tooltippopup.vm",this.QueryString);this.oTarget.rq_Template="internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frames/tooltippopup.vm";this.oToolTipPopup.oActionControl=this;self.oLoadAction=this;self.startFupLoad=function(recId,sourceRecId){oFupLoader=new upFupLoader();self.oLoadAction.QueryString=Helper.setQsValueByParam("rq_RecId",recId,self.oLoadAction.QueryString);self.oLoadAction.QueryString=Helper.setQsValueByParam("rq_SourceRecId",sourceRecId,self.oLoadAction.QueryString);var rv=oFupLoader.load(self.oLoadAction);};return true;}
else
{this.oToolTipPopup.oActionControl=this;oFupLoader=new upFupLoader();rv=oFupLoader.load(this);return rv;}}}
if(this.oTarget.newWindow=="0"&&oHtmlRoot.oUp.oWAISettings.bLoadFupByAjax&&((this.oFup&&(this.oFup.runIn=="ContainerAppMain"||this.oFup.runIn=="ContainerPortal"))||((this.oTarget&&this.oTarget.rq_TargetFrame==self.oUp.oRootWin.Stage)||this.changeParent==1)&&ContainerAgent.getStageContainer()!=null)&&(this.linkType=="0"||this.linkType=="2"||this.linkType=="9"||(this.linkType>="16"&&this.linkType<="21"))&&(this.oTarget.rq_TargetFrame==""||(this.oTarget.rq_TargetFrame!=ContainerAgent.getHiddenFrameName())))
{if(this.linkType=="12")
{return self.oUp.requestPage(this);}
else if(this.oSource&&this.oSource.fr_ActionId==1&&((this.oHtml.form&&this.oHtml.form.oUp.bFileUpload)||(oHtmlRoot.oUp.oWAISettings.bBackButton&&this.oFup&&this.oFup.recId=="-1"&&this.oFup.id==this.oTarget.rq_TargetId&&this.oFup.appId==this.oTarget.rq_AppId)))
{this.oTarget.rq_TargetFrame=ContainerAgent.getPostIFrameName();this.oTarget.rq_Template="internal/system/vm/html/misc/postiframe.vm";this.QueryString=Helper.setQsValueByParam("rq_TargetFrame",ContainerAgent.getPostIFrameName(),this.QueryString);this.QueryString=Helper.setQsValueByParam("rq_Template","internal/system/vm/html/misc/postiframe.vm",this.QueryString);rv=self.oUp.requestPage(this);if(!rv)return false;fm.fr_ActionId.value="";this.oSource.fr_ActionId=0;this.oTarget.rq_TargetFrame="";this.oTarget.rq_Template="internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frameless/appmain_xhr.vm";this.QueryString=Helper.deleteParamFromQs("rq_Mail",this.QueryString);this.QueryString=Helper.setQsValueByParam("rq_TargetFrame","",this.QueryString);this.QueryString=Helper.setQsValueByParam("rq_Template","internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frameless/appmain_xhr.vm",this.QueryString);if(self.oUp.upType=="upPopUpWindow"&&this.changeParent==1)
{var oHtmlStage=ContainerAgent.getStageFrame();oHtmlStage.oLoadAction=this;oHtmlStage.writeStartFupLoad();}
else
{self.oLoadAction=this;self.startFupLoad=function(recId,sourceRecId){oFupLoader=new upAppMainFupLoader();self.oLoadAction.QueryString=Helper.setQsValueByParam("rq_RecId",recId,self.oLoadAction.QueryString);self.oLoadAction.QueryString=Helper.setQsValueByParam("rq_SourceRecId",sourceRecId,self.oLoadAction.QueryString);var rv=oFupLoader.load(self.oLoadAction);};}
return true;}
else if(this.oSource&&(this.oSource.fr_ActionId==1||this.oSource.fr_ActionId==2)&&(self.oUp.upType=="upPopUpWindow"||(this.oFup&&this.oFup.runIn!="ContainerAppMain"))&&this.changeParent==1)
{this.oTarget.rq_TargetFrame=ContainerAgent.getPostIFrameName();this.oTarget.rq_Template="internal/system/vm/html/misc/postiframe.vm";this.QueryString=Helper.setQsValueByParam("rq_TargetFrame",ContainerAgent.getPostIFrameName(),this.QueryString);this.QueryString=Helper.setQsValueByParam("rq_Template","internal/system/vm/html/misc/postiframe.vm",this.QueryString);rv=self.oUp.requestPage(this);if(!rv)return false;fm.fr_ActionId.value="";this.oSource.fr_ActionId=0;this.oTarget.rq_TargetFrame="";this.oTarget.rq_Template="internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frameless/stage_xhr.vm";this.QueryString=Helper.deleteParamFromQs("rq_Mail",this.QueryString);this.QueryString=Helper.setQsValueByParam("rq_TargetFrame","",this.QueryString);this.QueryString=Helper.setQsValueByParam("rq_Template","internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frameless/stage_xhr.vm",this.QueryString);var oHtmlStage=ContainerAgent.getStageFrame();oHtmlStage.oLoadAction=this;oHtmlStage.writeStartFupLoad_Stage();return true;}
else if(Helper.getQsValueByParam("rq_Mail",this.oTarget.addParam)=="1"&&(self.oUp.upType=="upPopUpWindow"||(this.oFup&&this.oFup.runIn!="ContainerAppMain"))&&this.changeParent==1)
{this.oTarget.rq_TargetFrame=ContainerAgent.getPostIFrameName();this.oTarget.rq_Template="internal/system/vm/html/misc/postiframe.vm";this.QueryString=Helper.setQsValueByParam("rq_TargetFrame",ContainerAgent.getPostIFrameName(),this.QueryString);this.QueryString=Helper.setQsValueByParam("rq_Template","internal/system/vm/html/misc/postiframe.vm",this.QueryString);rv=self.oUp.requestPage(this);if(!rv)return false;this.oTarget.rq_TargetFrame="";this.oTarget.rq_Template="internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frameless/stage_xhr.vm";this.QueryString=Helper.deleteParamFromQs("rq_Mail",this.QueryString);this.QueryString=Helper.setQsValueByParam("rq_TargetFrame","",this.QueryString);this.QueryString=Helper.setQsValueByParam("rq_Template","internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frameless/stage_xhr.vm",this.QueryString);var oHtmlStage=ContainerAgent.getStageFrame();oHtmlStage.oLoadAction=this;oHtmlStage.writeStartFupLoad_Stage();return true;}
else
{var oldAppId=-1;var oldAppGuid="";if(self.oUp.oFuncPart)
{if(self.oUp.oFuncPart.appId)oldAppId=self.oUp.oFuncPart.appId;if(self.oUp.oFuncPart.appGuid)oldAppGuid=self.oUp.oFuncPart.appGuid;}
if((oldAppGuid==""&&oldAppId==-1)||(this.oTarget.rq_AppId!=""&&oldAppId!=this.oTarget.rq_AppId)||(this.oTarget.rq_AppGuid!=""&&oldAppGuid!=""&&oldAppGuid!=this.oTarget.rq_AppGuid))
{if(!document.getElementById("Container_Stage"))
{var oHtmlStage=ContainerAgent.getStageFrame();oHtmlStage.Loader.loadStageUrl(oHtmlRoot.oUp.connector+"?"+this.QueryString);return true;}
else
{oFupLoader=new upStageLoader();rv=oFupLoader.load(this);return rv;}}
else
{if(document.getElementById("Container_AppMain"))
{oFupLoader=new upAppMainFupLoader();rv=oFupLoader.load(this);return rv;}
else if(this.oFup.runIn=="ContainerPortal"||this.oFup.runIn=="Portal")
{oFupLoader=new upStageLoader();rv=oFupLoader.load(this);return rv;}
else
{var oHtmlStage=ContainerAgent.getStageFrame();if(oHtmlStage.document.getElementById("Container_AppMain"))
{oHtmlStage.Loader.loadUrl(oHtmlRoot.oUp.connector+"?"+this.QueryString);}
else
oHtmlStage.Loader.loadStageUrl(oHtmlRoot.oUp.connector+"?"+this.QueryString);return true;}}}}
else
{return self.oUp.requestPage(this);}}
function writeStartFupLoad()
{self.startFupLoad=function(recId,sourceRecId){var qs=Helper.setQsValueByParam("rq_RecId",recId,self.oLoadAction.QueryString);qs=Helper.setQsValueByParam("rq_SourceRecId",sourceRecId,qs);Loader.loadUrl(oHtmlRoot.oUp.connector+"?"+qs);};}
function writeStartFupLoad_Stage()
{self.startFupLoad=function(recId,sourceRecId){var qs=Helper.setQsValueByParam("rq_RecId",recId,self.oLoadAction.QueryString);qs=Helper.setQsValueByParam("rq_SourceRecId",sourceRecId,qs);Loader.loadStageUrl(oHtmlRoot.oUp.connector+"?"+qs);};}
function resetPostIFrame()
{try
{var oPostIFrame=document.getElementById("ID_PostIframe");if(!oPostIFrame)
return false;if(oPostIFrame.contentWindow)
oPostIFrame.contentWindow.location.replace("javascript:false;");else if(oPostIFrame.location)
oPostIFrame.location.replace("javascript:false;");else
return false;return true;}
catch(e)
{ErrorHandler.warn(e,"resetPostIFrame");return false;}}
function ActionCheckModifierKeys()
{if(!self.oUp.oEvent)
return true;if(this.oTarget.newWindowOrg)
{this.oTarget.newWindow=this.oTarget.newWindowOrg;this.oTarget.rq_TargetFrame=this.oTarget.frameOrg;this.oTarget.rq_Template=this.oTarget.templateOrg;}
if(this.upType=="upTextActionControl"&&typeof self.oUp.oEvent.ctrlKey!="unknown"&&self.oUp.oEvent.ctrlKey)
{return false;}
else if(this.upType!="upTextActionControl"&&typeof self.oUp.oEvent.ctrlKey!="unknown"&&self.oUp.oEvent.ctrlKey)
{this.oTarget.newWindowOrg=this.oTarget.newWindow;this.oTarget.frameOrg=this.oTarget.rq_TargetFrame;this.oTarget.templateOrg=this.oTarget.rq_Template;this.oTarget.rq_TargetFrame="";this.oTarget.rq_Template="";this.oTarget.newWindow="1";if(Browser.mozilla)
self.oUp.oEvent.stopPropagation();}
else if(typeof self.oUp.oEvent.shiftKey!="unknown"&&self.oUp.oEvent.shiftKey)
{this.oTarget.newWindowOrg=this.oTarget.newWindow;this.oTarget.frameOrg=this.oTarget.rq_TargetFrame;this.oTarget.templateOrg=this.oTarget.rq_Template;this.oTarget.rq_TargetFrame="";this.oTarget.rq_Template="";this.oTarget.newWindow="1";if(Browser.mozilla)
{self.oUp.oEvent.stopPropagation();}}
return true;}
function ActionSetTemplateAndFrame()
{var l_bSetTemplate=!((this.oTarget.rq_Template.length>0||Helper.getQsValueByParam("rq_Template",this.oTarget.addParam))&&this.linkType!="5");if(this.oTarget.rq_TargetUrl&&this.oTarget.rq_TargetUrl!="")
{if(l_bSetTemplate)
this.oTarget.rq_Template="";if(this.oTarget.rq_TargetFrame=="")
{if(this.sameWindow||this.sameWindow=="1")
{this.oTarget.rq_TargetFrame="newWnd"+this.id.substring(0,this.id.lastIndexOf("_"));}
else
{this.oTarget.rq_TargetFrame="newWnd"+this.id;}}}
else if(this.oTarget.bToolTipPopup||((this.requestType==0||this.requestType==1)&&this.oFup&&this.oFup.runIn=="ToolTipPopup"&&this.oTarget.rq_TargetFrame!=ContainerAgent.getHiddenFrameName()&&this.changeParent=="0"&&this.oTarget.newWindow=="0"&&(this.linkType=="0"||this.linkType=="2"||this.linkType=="6"||this.linkType=="9"||(this.linkType>="16"&&this.linkType<="21"))))
{this.oTarget.rq_Template="internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frames/tooltippopup.vm";}
else if(this.oTarget.newWindow&&this.oTarget.newWindow=="1"&&this.requestType!=2&&this.requestType!=3)
{if(!this.oTarget.rq_Template||this.oTarget.rq_Template=="")
{if(!this.oTarget.rq_ControlType||(this.oTarget.rq_ControlType!="file"&&this.oTarget.rq_ControlType!="image"))
{if(l_bSetTemplate)this.oTarget.rq_Template="internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frames/popup.vm";}}
if(this.oTarget.rq_TargetFrame=="")
{if(this.sameWindow=="1"&&this.bDrRec)
{this.oTarget.rq_TargetFrame="wnd_"+oHtmlRoot.portalId+"_"+this.id.substring(0,this.id.lastIndexOf("_"));}
else
{this.oTarget.rq_TargetFrame="wnd_"+oHtmlRoot.portalId+"_"+this.id;}}
else if(this.oTarget.rq_TargetFrame.substring(0,4)!="wnd_")
{this.oTarget.rq_TargetFrame="wnd_"+oHtmlRoot.portalId+"_"+this.oTarget.rq_TargetFrame;}}
else if(self.oUp&&self.oUp.upType&&self.oUp.upType=="upPopUpWindow")
{if(this.changeParent=="1")
{if(ContainerAgent.getAppMainFrame())
{this.oTarget.rq_TargetFrame=ContainerAgent.getAppMainFrameName();if(l_bSetTemplate)this.oTarget.rq_Template="internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frames/appmain.vm";}
else
{this.oTarget.rq_TargetFrame=ContainerAgent.getStageFrame().name;if(l_bSetTemplate)this.oTarget.rq_Template="internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frames/stage.vm";}}
if(this.oTarget.rq_TargetFrame=="")
{this.oTarget.rq_TargetFrame=self.name;}
if(!this.oTarget.rq_Template||this.oTarget.rq_Template=="")
{if(this.oTarget.rq_TargetFrame==oHtmlRoot.oUp.Stage)
{if(l_bSetTemplate)this.oTarget.rq_Template="internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frames/stage.vm";}
else if(!this.oTarget.ControlType||(this.oTarget.ControlType!="file"&&this.oTarget.ControlType!="image"))
{if(l_bSetTemplate)this.oTarget.rq_Template="internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frames/popup.vm";}}
if(this.oTargetChanger)
{self.oUp.oTargetChanger=this.oTargetChanger;}}
else if(self.oUp&&self.oUp.upType&&self.oUp.upType=="IFrame")
{if(this.oTarget.rq_TargetFrame!=""&&(!this.oTarget.rq_Template||this.oTarget.rq_Template==""))
{if(l_bSetTemplate)this.oTarget.rq_Template="internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frames/appiframe.vm";}
else
{if(l_bSetTemplate)this.oTarget.rq_Template="internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frames/appmain.vm";}
if(this.oTarget.rq_TargetFrame=="")
{if(self.navigateInside&&self.navigateInside=="1")
{this.oTarget.rq_TargetFrame=self.name;}
else
{this.oTarget.rq_TargetFrame=ContainerAgent.getAppMainFrameName();}}}
else if((this.requestType==0||this.requestType==1)&&this.oTarget.newWindow=="0"&&this.oFup&&this.oFup.runIn=="ContainerAppMain")
{if(l_bSetTemplate)
{if(ContainerAgent.getHiddenFrameName()!=""&&this.oTarget.rq_TargetFrame==ContainerAgent.getHiddenFrameName())
{this.oTarget.rq_Template="internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frames/appmain_hidden.vm";}
else
{if(oHtmlRoot.oUp.oWAISettings.bLoadFupByAjax)
this.oTarget.rq_Template="internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frameless/appmain.vm";else
this.oTarget.rq_Template="internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frames/root.vm";this.oTarget.rq_TargetFrame="";}}}
else
{if(this.changeParent=="1")
{if(ContainerAgent.getAppMainFrame())
{this.oTarget.rq_TargetFrame=ContainerAgent.getAppMainFrameName();if(l_bSetTemplate)this.oTarget.rq_Template="internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frames/appmain.vm";}
else
{this.oTarget.rq_TargetFrame=ContainerAgent.getStageFrame().name;if(l_bSetTemplate)this.oTarget.rq_Template="internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frames/stage.vm";}}
if(this.oTarget.rq_TargetFrame=="")
{if(ContainerAgent.getAppMainFrame())
{this.oTarget.rq_TargetFrame=ContainerAgent.getAppMainFrameName();}
else
{oHtmlRoot.name;}}
if(this.oTarget.rq_TemplateKey!="")
{if(l_bSetTemplate)this.oTarget.rq_Template="internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frames/"+this.oTarget.rq_TemplateKey+".vm";}
else if(this.oTarget.rq_Template=="")
{if(l_bSetTemplate)this.oTarget.rq_Template="internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frames/appmain.vm";}}}
function ActionChangeTarget(oTargetChanger)
{if(typeof oTargetChanger!="object"||typeof oTargetChanger.type!="string")return;if(oTargetChanger.type&&oTargetChanger.type=="rec2ctrl"&&this.oSource&&this.oSource.fr_ActionId=="1")
{var sourceCtrl=oTargetChanger.sourceCtrl;var targetCtrl=oTargetChanger.targetCtrl;var actionCtrl=oTargetChanger.actionCtrl;this.closeWin=self.name;this.close="0";this.reloadParent="0";this.oTarget.addParam=Helper.setQsValueByParam("rq_Control",targetCtrl,this.oTarget.addParam);this.oTarget.addParam=Helper.setQsValueByParam("rq_ControlFrame",oTargetChanger.rq_Frame,this.oTarget.addParam);this.oTarget.type="rec2ctrl";}
else if(oTargetChanger.close=="1")
{this.close="1";}
else if(oTargetChanger.closeByChange=="1"&&this.oSource&&(this.oSource.fr_ActionId=="1"||this.oSource.fr_ActionId=="2"))
{this.close="1";}
if(oTargetChanger.reloadWin&&oTargetChanger.reloadWin!="")
{this.reloadParent="1";}
else if(oTargetChanger.bReloadByChange&&this.oSource&&(this.oSource.fr_ActionId=="1"||this.oSource.fr_ActionId=="2"))
{this.reloadParent="1";}
if(oTargetChanger.reloadContainer)
{this.reloadContainer=oTargetChanger.reloadContainer;}}
function ActionSetQueryString()
{this.QueryString="";if(this.oSource&&this.oSource.rq_SourcePageGuid&&this.oSource.rq_SourcePageGuid!="")
{this.QueryString=Helper.setQsValueByParam("rq_SourcePageGuid",this.oSource.rq_SourcePageGuid,this.QueryString);}
else if(this.oSource&&this.oSource.rq_SourceId&&this.oSource.rq_SourceId!="")
{this.QueryString=Helper.setQsValueByParam("rq_SourceId",this.oSource.rq_SourceId,this.QueryString);}
else if(this.oFup&&this.oFup.id&&this.oFup.id!=""&&this.oFup.id!="-1"&&!isNaN(this.oFup.id))
{this.QueryString=Helper.setQsValueByParam("rq_SourceId",this.oFup.id,this.QueryString);}
if(this.oSource&&this.oSource.rq_SourceAppGuid&&this.oSource.rq_SourceAppGuid!="")
{this.QueryString=Helper.setQsValueByParam("rq_SourceAppGuid",this.oSource.rq_SourceAppGuid,this.QueryString);}
else if(this.oFup&&this.oFup.appGuid&&this.oFup.appGuid!="")
{this.QueryString=Helper.setQsValueByParam("rq_SourceAppGuid",this.oFup.appGuid,this.QueryString);}
if(this.oSource&&this.oSource.rq_SourceAppId&&this.oSource.rq_SourceAppId!="")
{this.QueryString=Helper.setQsValueByParam("rq_SourceAppId",this.oSource.rq_SourceAppId,this.QueryString);}
else if(this.oFup&&this.oFup.appId&&this.oFup.appId!=""&&this.oFup.appId!="-1")
{this.QueryString=Helper.setQsValueByParam("rq_SourceAppId",this.oFup.appId,this.QueryString);}
if(this.oSource&&this.oSource.rq_SourceRecId&&this.oSource.rq_SourceRecId!="")
{this.QueryString=Helper.setQsValueByParam("rq_SourceRecId",this.oSource.rq_SourceRecId,this.QueryString);}
else if(this.oFup&&this.oFup.recId&&this.oFup.recId!="")
{this.QueryString=Helper.setQsValueByParam("rq_SourceRecId",this.oFup.recId,this.QueryString);}
if(this.oSource&&this.oSource.rq_SourceParentId&&this.oSource.rq_SourceParentId!="")
{this.QueryString=Helper.setQsValueByParam("rq_SourceParentId",this.oSource.rq_SourceParentId,this.QueryString);}
else if(this.oFup&&this.oFup.parentId&&this.oFup.parentId!="")
{this.QueryString=Helper.setQsValueByParam("rq_SourceParentId",this.oFup.parentId,this.QueryString);}
if(this.oTarget&&parseInt(this.oTarget.rq_TargetId,10)>-1)
{this.QueryString=Helper.setQsValueByParam("rq_TargetId",this.oTarget.rq_TargetId,this.QueryString);this.QueryString=Helper.setQsValueByParam("rq_AppId",this.oTarget.rq_AppId,this.QueryString);}
if(this.oTarget&&this.oTarget.rq_AppGuid&&this.oTarget.rq_AppGuid!="")
{this.QueryString=Helper.setQsValueByParam("rq_AppGuid",this.oTarget.rq_AppGuid,this.QueryString);if(this.oTarget.rq_TargetGuid&&this.oTarget.rq_TargetGuid!="")
{this.QueryString=Helper.setQsValueByParam("rq_TargetGuid",this.oTarget.rq_TargetGuid,this.QueryString);}}
else if(this.oTarget&&this.oTarget.rq_TargetUrl&&this.oTarget.rq_TargetUrl!="")
{this.QueryString=Helper.setQsValueByParam("rq_TargetUrl",this.oTarget.rq_TargetUrl,this.QueryString);}
if(this.oTarget&&this.oTarget.anchor&&this.oTarget.anchor!="")
{this.QueryString=Helper.setQsValueByParam("rq_Anchor",this.oTarget.anchor,this.QueryString);}
if(!Helper.containsQsParam("rq_RecId",this.oTarget.addParam))
{if(this.oTarget&&this.oTarget.rq_RecId&&this.oTarget.rq_RecId!="")
{this.QueryString=Helper.setQsValueByParam("rq_RecId",this.oTarget.rq_RecId,this.QueryString);}
else if(this.linkType=="0")
{if(this.oFup&&this.oFup.recId&&this.oFup.recId!=""&&this.oFup.recId!="-1")
{this.QueryString=Helper.setQsValueByParam("rq_RecId",this.oFup.recId,this.QueryString);}
else
{this.QueryString=Helper.setQsValueByParam("rq_RecId","-1",this.QueryString);}}
else if(this.linkType=="2"||this.linkType=="16")
{}
else if(this.linkType=="6"||this.linkType=="9")
{this.QueryString=Helper.setQsValueByParam("rq_RecId","-1",this.QueryString);}}
if(this.oTarget&&this.oTarget.rq_Template&&this.oTarget.rq_Template!="")
{this.QueryString=Helper.setQsValueByParam("rq_Template",this.oTarget.rq_Template,this.QueryString);}
if(this.oTarget&&this.oTarget.rq_Lang&&this.oTarget.rq_Lang!="")
{this.QueryString=Helper.setQsValueByParam("rq_Lang",this.oTarget.rq_Lang,this.QueryString);}
else if(Helper.getQsValueByParam("rq_Lang")&&!Helper.isCookieEnabled())
{this.QueryString=Helper.setQsValueByParam("rq_Lang",Helper.getQsValueByParam("rq_Lang"),this.QueryString);}
if(this.oTarget&&this.oTarget.rq_SId&&this.oTarget.rq_SId!="")
{this.QueryString=Helper.setQsValueByParam("rq_SId",this.oTarget.rq_SId,this.QueryString);}
if(this.oTarget&&this.oTarget.rq_ControlName&&this.oTarget.rq_ControlName!="")
{this.QueryString=Helper.setQsValueByParam("rq_ControlName",this.oTarget.rq_ControlName,this.QueryString);}
if(this.oTarget&&this.oTarget.rq_ControlType&&this.oTarget.rq_ControlType!="")
{this.QueryString=Helper.setQsValueByParam("rq_ControlType",this.oTarget.rq_ControlType,this.QueryString);}
if(this.oTarget&&this.oTarget.rq_DispositionType&&this.oTarget.rq_DispositionType!="")
{this.QueryString=Helper.setQsValueByParam("rq_DispositionType",this.oTarget.rq_DispositionType,this.QueryString);}
if(this.oTarget&&this.oTarget.rq_CatId&&this.oTarget.rq_CatId!="")
{this.QueryString=Helper.setQsValueByParam("rq_CatId",this.oTarget.rq_CatId,this.QueryString);}
if(this.oTarget&&this.oTarget.rq_Frame&&this.oTarget.rq_Frame!="")
{this.QueryString=Helper.setQsValueByParam("rq_Frame",this.oTarget.rq_Frame,this.QueryString);}
else if(self.name&&self.name!="")
{this.QueryString=Helper.setQsValueByParam("rq_Frame",self.name,this.QueryString);}}
function ActionSetCloseAndReload()
{if(this.close=="1")
{if(this.changeParent=="1")
{this.closeWin=self.name;}
else
{this.bornToDie=1;}}
if(this.oTarget.rq_TargetFrame==self.name)
{if(this.close!="1"||this.bornToDie=="1")
{self.oUp.nextPopup=true;}
else
{self.oUp.nextPopup=false;}}
if(this.closeWin!="")
{this.QueryString=Helper.setQsValueByParam("rq_CloseWin",this.closeWin,this.QueryString);}
if(this.bornToDie=="1")
{this.QueryString=Helper.setQsValueByParam("rq_Template","internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frames/popup.vm",this.QueryString);this.QueryString=Helper.setQsValueByParam("rq_LoadStaticVm","internal/system/vm/html/misc/close.vm",this.QueryString);}
if(this.reloadParent=="1")
{if(this.reloadParentAnyway=="0"&&(typeof this.reloadContainer=="object"||typeof this.reloadContainer=="function")&&this.reloadContainer!=null)
{this.QueryString=Helper.setQsValueByParam("rq_ReloadParent","container",this.QueryString);}
else
{if(this.reloadWindowname&&this.reloadWindowname!="")
{this.QueryString=Helper.setQsValueByParam("rq_ReloadParent",this.reloadWindowname,this.QueryString);}
else if(opener)
{if(self.oUp.oTargetChanger&&self.oUp.oTargetChanger.reloadWin&&self.oUp.oTargetChanger.reloadWin!=""&&self.oUp.oFrameReg[self.oUp.oTargetChanger.reloadWin])
{self.oUp.reloadWindow=self.oUp.oTargetChanger.reloadWin;}
else if(self.oUp.oTargetChanger&&this.oSource&&(this.oSource.fr_ActionId=="1"||this.oSource.fr_ActionId=="2")&&self.oUp.oTargetChanger.reloadByChangeWin&&self.oUp.oTargetChanger.reloadByChangeWin!=""&&self.oUp.oFrameReg[self.oUp.oTargetChanger.reloadByChangeWin])
{self.oUp.reloadWindow=self.oUp.oTargetChanger.reloadByChangeWin;}
else if(self.oUp.winOfOpener&&self.oUp.winOfOpener!="")
{self.oUp.reloadWindow=self.oUp.winOfOpener;}
else
{self.oUp.reloadWindow=ContainerAgent.getAppMainFrameName();}
this.QueryString=Helper.setQsValueByParam("rq_ReloadParent","window",this.QueryString);}}}
if(this.focus)
{window.setTimeout("self.focus()",2000);}}
function reloadFromPopup()
{try
{if(Helper.getQsValueByParam("rq_ReloadParent")=="container")
{var oTargetChanger=self.oUp.oTargetChanger;if(oTargetChanger&&(typeof oTargetChanger.reloadContainer=="object"||typeof oTargetChanger.reloadContainer=="function")&&oTargetChanger.reloadContainer!=null)
{oTargetChanger.reloadContainer();}}
else if(Helper.getQsValueByParam("rq_ReloadParent")=="window"&&self.oUp.reloadWindow&&self.oUp.reloadWindow!="")
{if(oHtmlRoot.oUp.oRegistry.oFrameReg[self.oUp.reloadWindow])
{var oWinToReload=oHtmlRoot.oUp.oRegistry.oFrameReg[self.oUp.reloadWindow];if(oWinToReload!=null&&typeof oWinToReload.oUp!="unknown"&&oWinToReload.oUp)
{var rv=reloadUpWindow(oWinToReload);}}}}
catch(e)
{alert(e.message);}
finally
{return;}}
function reloadUpWindow(p_oWindow)
{var rv=true;if(oHtmlRoot&&oHtmlRoot.oUp&&oHtmlRoot.oUp.oRegistry&&oHtmlRoot.oUp.oRegistry.oFrameReg&&oHtmlRoot.oUp.oRegistry.oFrameReg[p_oWindow.name])
{if(oHtmlRoot.oUp.oFormatInfo.bFrames&&p_oWindow.frames.length>1)
{for(i=0;i<p_oWindow.frames.length;i++)
{if(oHtmlRoot.oUp.oRegistry.oFrameReg[p_oWindow.frames[i].name]&&p_oWindow.frames[i].name!=self.name)
{rv=reloadUpWindow(oHtmlRoot.oUp.oRegistry.oFrameReg[p_oWindow.frames[i].name]);}}}
else
{if(p_oWindow.oUp&&p_oWindow.name!=self.name)
{if(Helper.getQsValueByParam("rq_SetAnchor"))
p_oWindow.anchor=Helper.getQsValueByParam("rq_SetAnchor");rv=p_oWindow.oUp.reload();}}}
return rv;}
function ActionHandleAddParam()
{if(this.oTarget&&this.oTarget.addParam!="")
{this.QueryString=Helper.mergeQueryStrings(this.QueryString,this.oTarget.addParam);}
if(Helper.getQsValueByParam("rq_isReminder",this.QueryString)&&Helper.getQsValueByParam("rq_isReminder",this.QueryString)=="1")
{this.QueryString=Helper.setQsValueByParam("rq_NoViewpage","1",this.QueryString);}
var sid=Helper.getQsValueByParam("rq_SId");if(sid)
{this.QueryString=Helper.setQsValueByParam("rq_SId",sid,this.QueryString);}
return;}
function upTarget()
{this.type="target";this.newWindow="0";this.close="0";this.reloadWin="";this.bReloadByChange=false;this.reloadByChangeWin="";this.closeByChange="0";this.rq_Lang="";this.rq_RecId="";this.addParam="";this.rq_TargetFrame="";this.rq_TargetId="";this.rq_AppId="";this.rq_AppGuid="";this.rq_Template="";this.rq_TemplateKey="";this.windowSettings="";this.props="";this.bToolTipPopup=false;this.bNewToolTipPopup=false;this.bInsideToolTipPopup=false;this.containerId="";}
function upSource()
{this.rq_SourceRecId="";this.fr_ActionId="";}
function upUserInfoControl()
{this.upType="upUserInfoControl";this.oXmlHttp=new upXmlHttp(this);}
upUserInfoControl.prototype=new upActionControl();function upButtonControl()
{this.upType="upButtonControl";this.styleType="Button_Standard";this.oXmlHttp=new upXmlHttp(this);}
upButtonControl.prototype=new upActionControl();function upTextActionControl()
{this.upType="upTextActionControl";this.styleType="Link_Standard";this.bFixTxt=true;this.text="";this.oXmlHttp=new upXmlHttp(this);}
upTextActionControl.prototype=new upActionControl();function upImageActionControl()
{this.upType="upImageActionControl";this.srcMouseout="";this.srcMouseover="";this.srcFlip="";this.srcFlop="";this.oImage=null;this.oXmlHttp=new upXmlHttp(this);}
upImageActionControl.prototype=new upActionControl();upImageActionControl.prototype.changeImg=ImageActionChangeImg;upImageActionControl.prototype.flipFlop=ImageActionFlipFlop;function ImageActionFlipFlop(bFlipStatus)
{var imgSrc="";this._flipFlop(bFlipStatus);if(this.bFlipStatus==true)
{imgSrc=this.srcFlip;}
else
{imgSrc=this.srcFlop;}
if(this.oImage&&this.oImage.src)
this.oImage.src=imgSrc;return true;}
function ImageActionChangeImg(imgSrc)
{if(this.oImage&&this.oImage.oHtml)
{this.oImage.oHtml.src=imgSrc;}}
function upFileActionControl()
{this.upType="upFileActionControl";}
upFileActionControl.prototype=new upTextActionControl();upFileActionControl.prototype.setFileObject=FileActionSetFileObject;function FileActionSetFileObject(controlName,appId,targetId,recId,bNewWin,dispositionType)
{this.linkType="12";this.oTarget=new upTarget();this.oTarget.rq_ControlName=controlName;this.oTarget.rq_ControlType="file";this.oTarget.rq_AppId=appId;this.oTarget.rq_TargetId=targetId;this.oTarget.rq_RecId=recId;if(arguments.length>4&&!bNewWin)
{this.oTarget.newWindow="0";this.oTarget.rq_TargetFrame=self.name;}
else
{this.oTarget.newWindow="1";if(recId=="-1")
this.oTarget.rq_TargetFrame=controlName+"__1";else
this.oTarget.rq_TargetFrame=controlName+recId;}
if(arguments.length>5)
{this.oTarget.rq_DispositionType=dispositionType;}
else
{this.oTarget.rq_DispositionType="inline";}
this.oTarget.windowSettings="400,400,10,0,1";this.oTarget.props="dependent=yes,menubar=yes,toolbar=no,scrollbars=yes,resizable=yes";if(Helper.isCookieEnabled())
{this.oTarget.rq_SId=Helper.getCookieValueByParam("co_SId");}}
function upImageFileActionControl()
{this.upType="upImageFileActionControl";this.description="";this.srcURL="";this.width="50";this.height="50";this.widthOrg="400";this.heightOrg="400";this.scaled="1";}
upImageFileActionControl.prototype=new upImageActionControl();upImageFileActionControl.prototype.setImageFileObject=ImageFileActionSetImageFileObject;function ImageFileActionSetImageFileObject(controlName,appId,targetId,recId,htmlId,imageProps,oFup,strFieldGuid,dispositionType,bNewWin)
{this.linkType="12";if(oFup)
{this.oFup=oFup;}
this.oTarget=new upTarget();if(typeof strFieldGuid!="undefined"&&strFieldGuid!=""&&controlName==null)
this.oTarget.addParam=Helper.setQsValueByParam("rq_strFieldGuid",strFieldGuid,this.oTarget.addParam);else
this.oTarget.rq_ControlName=controlName;this.oTarget.rq_ControlType="image";this.oTarget.rq_AppId=appId;this.oTarget.rq_TargetId=targetId;this.oTarget.rq_RecId=recId;this.oTarget.newWindow="1";if(arguments.length>8)
{this.oTarget.rq_DispositionType=dispositionType;}
else
{this.oTarget.rq_DispositionType="inline";}
if(arguments.length>9)
{this.oTarget.newWindow=bNewWin;}
else
{this.oTarget.newWindow="1";}
if(recId=="-1")
this.oTarget.rq_TargetFrame=controlName+"__1";else
this.oTarget.rq_TargetFrame=controlName+recId;this.oTarget.addParam=Helper.setQsValueByParam("rq_ImageSize","original",this.oTarget.addParam);var ar=imageProps.split(",");this.width=ar[0];this.height=ar[1];this.widthOrg=ar[2];this.heightOrg=ar[3];if(ar[4]=="1")
this.scaled=true;else
this.scaled=false;this.description=ar[5];var widthOrg=parseInt(this.widthOrg,10)+50;if(widthOrg>screen.availWidth)widthOrg=parseInt(screen.availWidth,10);var heightOrg=parseInt(this.heightOrg,10)+68;if(heightOrg>screen.availHeight)heightOrg=parseInt(screen.availHeight,10);this.oTarget.windowSettings=widthOrg+","+heightOrg+",10,0,1";if(Helper.isCookieEnabled())
{this.oTarget.rq_SId=Helper.getCookieValueByParam("co_SId");}}
upBrowser.prototype.getValue=BrowserGetValue;upBrowser.prototype._getValueUpViewCtrl=BrowserGetValue_UpViewCtrl;upBrowser.prototype._getValueUpEditCtrl=BrowserGetValue_UpEditCtrl;upBrowser.prototype._getValueHtmlCtrl=BrowserGetValue_HtmlCtrl;upBrowser.prototype.getRawValue=BrowserGetRawValue;upBrowser.prototype.getValueByElementId=BrowserGetValueByElementId;upBrowser.prototype.setValue=BrowserSetValue;upBrowser.prototype.setValue_UpViewCtrl=BrowserSetValue_UpViewCtrl;upBrowser.prototype.setValue_UpEditCtrl=BrowserSetValue_UpEditCtrl;upBrowser.prototype.setValue_HtmlCtrl=BrowserSetValue_HtmlCtrl;upBrowser.prototype.setValueByElementId=BrowserSetValueByElementId;upBrowser.prototype.insertValue=BrowserInsertValue;upBrowser.prototype.getEventKeyCode=BrowserGetEventKeyCode;upBrowser.prototype.getEventKeyChar=BrowserGetEventKeyChar;upBrowser.prototype.getEventTarget=BrowserGetEventTarget;upBrowser.prototype.getExceptionMessage=BrowserGetExceptionMessage;upBrowser.prototype.getPosition2Screen=BrowserGetPosition2Screen;upBrowser.prototype.getHtmlRootTop=BrowserGetHtmlRootTop;upBrowser.prototype.getHtmlRootLeft=BrowserGetHtmlRootLeft;upBrowser.prototype.getPosition2Page=BrowserGetPosition2Page;upBrowser.prototype.getPosition2Container=BrowserGetPosition2Container;upBrowser.prototype.getPosLeft=BrowserGetPosLeft;upBrowser.prototype.getPosTop=BrowserGetPosTop;upBrowser.prototype.getPosTopAbs=BrowserGetPosTopAbsolute;upBrowser.prototype.getPosLeftAbs=BrowserGetPosLeftAbsolute;upBrowser.prototype.getWidth=BrowserGetWidth;upBrowser.prototype.getHeight=BrowserGetHeight;upBrowser.prototype.insertOptByElementId=BrowserInsertOptByElementId;upBrowser.prototype.gotoAnchor=BrowserGotoAnchor;function BrowserGotoAnchor(strAnchor,doc)
{if(this.mac_ie5||this.safari||this.konqueror)
return;try
{doc.location.hash=strAnchor;}
catch(e)
{ErrorHandler.warn(e,"BrowserGotoAnchor");return false;}
return true;}
function BrowserGetPosition2Screen(oHtml)
{if(!oHtml)
{return false;}
var posX=0;var posY=0;var oPosXY=new Object();var oHtmlDoc=self.document;var oHtmlWin=self;if(oHtmlWin.screenTop==null&&self.oUp.oRootWin.eventScreenX&&!isNaN(self.oUp.oRootWin.eventScreenX))
{posX=self.oUp.oRootWin.eventScreenX;posY=self.oUp.oRootWin.eventScreenY;}
else if(Browser.opera&&Browser.mdi&&oHtmlWin.screenTop!=null)
{oPosXY=this.getPosition2Page(oHtml);posX=oPosXY.posX+this.getHtmlRootLeft(oHtmlWin);posY=oPosXY.posY+this.getHtmlRootTop(oHtmlWin);}
else if(window.event&&window.event.screenX&&oHtmlWin.top!=oHtmlWin.oHtmlRoot)
{posX=parseInt(window.event.screenX);posY=parseInt(window.event.screenY);}
else if(oHtmlWin.screenTop!=null&&oHtmlWin.screenTop!="undefined")
{oPosXY=this.getPosition2Page(oHtml);posX=oPosXY.posX-Browser.getScrollOffsetLeft(self)+oHtmlWin.screenLeft;posY=oPosXY.posY-Browser.getScrollOffsetTop(self)+oHtmlWin.screenTop;}
oPosXY.posX=posX;oPosXY.posY=posY;return oPosXY;}
function BrowserGetHtmlRootTop(oHtmlWin)
{if(!oHtmlRoot)return 0;var posY=0;if(oHtmlWin.screenTop)
{posY=oHtmlWin.screenTop-oHtmlRoot.screenTop;}
else if(oHtmlWin.screenY)
{posY=oHtmlWin.screenY-oHtmlRoot.screenY;}
return posY;}
function BrowserGetHtmlRootLeft(oHtmlWin)
{if(!oHtmlRoot)return 0;var posX=0;if(oHtmlWin.screenTop)
{posX=oHtmlWin.screenLeft-oHtmlRoot.screenLeft;}
else if(oHtmlWin.screenX)
{posY=oHtmlWin.screenX-oHtmlRoot.screenX;}
return posX;}
function BrowserGetPosition2Page(oHtml,bScrollPos)
{var oPosXY=new Object();var posX=0;var posY=0;if(typeof oHtml=="undefined"||!oHtml)
return oPosXY;if(oHtml.offsetParent)
{posX=this.getPosLeft(oHtml,bScrollPos);posY=this.getPosTop(oHtml,bScrollPos);}
else if(oHtml.offsetLeft&&oHtml.offsetTop)
{posX=oHtml.offsetLeft;posY=oHtml.offsetTop;if(bScrollPos&&oHtml.tagName=="DIV"&&oHtml.scrollTop&&oHtml.scrollLeft)
{posX-=oHtml.scrollLeft;posY-=oHtml.scrollTop;}}
else if(oHtml.posX&&oHtml.posY)
{posX=oHtml.posX;posY=oHtml.posY;}
oPosXY.posX=posX;oPosXY.posY=posY;return oPosXY;}
function BrowserGetPosition2Container(oHtml,bScrollPos)
{var oPosXY=new Object();var posX=0;var posY=0;if(typeof oHtml=="undefined"||!oHtml)
return oPosXY;if(oHtml.offsetParent)
{posX=this.getPosLeftAbs(oHtml,bScrollPos);posY=this.getPosTopAbs(oHtml,bScrollPos);}
else if(oHtml.offsetLeft&&oHtml.offsetTop)
{posX=oHtml.offsetLeft;posY=oHtml.offsetTop;if(bScrollPos&&oHtml.tagName=="DIV"&&oHtml.scrollTop&&oHtml.scrollLeft)
{posX-=oHtml.scrollLeft;posY-=oHtml.scrollTop;}}
else if(oHtml.posX&&oHtml.posY)
{posX=oHtml.posX;posY=oHtml.posY;}
oPosXY.posX=posX;oPosXY.posY=posY;return oPosXY;}
function BrowserGetWidth(oHtml)
{var width=0;if(oHtml.offsetWidth&&!isNaN(oHtml.offsetWidth))
{width=oHtml.offsetWidth;}
else if(oHtml.width&&!isNaN(oHtml.width))
{width=oHtml.width;}
return parseInt(width);}
function BrowserGetHeight(oHtml)
{var height=0;if(oHtml.offsetHeight&&!isNaN(oHtml.offsetHeight))
{height=oHtml.offsetHeight;}
else if(oHtml.height&&!isNaN(oHtml.height))
{height=oHtml.height;}
return parseInt(height);}
function BrowserGetPosLeft(oHtml,bScrollPos)
{var posX=oHtml.offsetLeft;if(bScrollPos&&oHtml.tagName=="DIV"&&oHtml.scrollLeft)
{posX-=oHtml.scrollLeft;}
var oParent=oHtml.offsetParent;while(oParent)
{posX=posX+oParent.offsetLeft;if(bScrollPos&&oParent.tagName=="DIV"&&oParent.scrollLeft)
{posX-=oParent.scrollLeft;}
oParent=oParent.offsetParent;}
return posX;}
function BrowserGetPosTop(oHtml,bScrollPos)
{var posY=oHtml.offsetTop;if(bScrollPos&&oHtml.tagName=="DIV"&&oHtml.scrollTop)
{posY-=oHtml.scrollTop;}
var oParent=oHtml.offsetParent;while(oParent)
{posY=posY+oParent.offsetTop;if(bScrollPos&&oParent.tagName=="DIV"&&oParent.scrollTop)
{posY-=oParent.scrollTop;}
oParent=oParent.offsetParent;}
return posY;}
function BrowserGetPosTopAbsolute(oHtml,bScrollPos)
{var posY=oHtml.offsetTop;if(bScrollPos&&oHtml.tagName=="DIV"&&oHtml.scrollTop)
{posY-=oHtml.scrollTop;}
var oParent=oHtml.offsetParent;while(oParent&&oParent.style.position!="fixed"&&oParent.style.position!="absolute"&&!(oParent.style.position=="relative"&&(!Browser.firefox||oParent.tagName=="DIV")))
{posY=posY+oParent.offsetTop;if(bScrollPos&&oParent.tagName=="DIV"&&oParent.scrollTop)
{posY-=oParent.scrollTop;}
oParent=oParent.offsetParent;}
return posY;}
function BrowserGetPosLeftAbsolute(oHtml,bScrollPos)
{var posX=oHtml.offsetLeft;if(bScrollPos&&oHtml.tagName=="DIV"&&oHtml.scrollLeft)
{posX-=oHtml.scrollLeft;}
var oParent=oHtml.offsetParent;while(oParent&&oParent.style.position!="fixed"&&oParent.style.position!="absolute"&&!(oParent.style.position=="relative"&&(!Browser.firefox||oParent.tagName=="DIV")))
{posX=posX+oParent.offsetLeft;if(bScrollPos&&oParent.tagName=="DIV"&&oParent.scrollLeft)
{posX-=oParent.scrollLeft;}
oParent=oParent.offsetParent;}
return posX;}
function BrowserInsertOptByElementId(p_strHtmlEl,p_strText,p_strValue,p_oTargDoc)
{if(BrowserInsertOptByElementId.arguments.length<2)
{return false;}
else
{var l_strHtmlEl=p_strHtmlEl;var l_strText=p_strText;var l_strValue="";if(BrowserInsertOptByElementId.arguments.length>2)
{l_strValue=p_strValue;}}
var oTargDoc=null;if(!p_oTargDoc)
{oTargDoc=document;}
else
{oTargDoc=p_oTargDoc;}
var ref=null;ref=Browser.getRef(l_strHtmlEl,oTargDoc)
if(!ref||!(ref.oUp.upType=="upListboxControl"||ref.oUp.upType=="upDropdownControl"))
{return false;}
else
{return ref.oUp.insertOption(l_strText,l_strValue);}}
function BrowserSetValueByElementId(p_strId,value,p_oTargDoc)
{if(!p_strId)
return false;var l_strId=p_strId;if(!value)
value="";var oTargDoc=null;if(!p_oTargDoc)
oTargDoc=document;else
oTargDoc=p_oTargDoc;var oHtmlControl=null;oHtmlControl=Browser.getRef(l_strId,oTargDoc);if(!oHtmlControl)
{return false;}
else if(oHtmlControl.oUp)
{return Browser.setValue(oHtmlControl.oUp,value);}
else if(oHtmlControl)
{if(oHtmlControl.value)
{oHtmlControl.value=value;}
else
{if(oHtmlControl.tagName=="TD"&&value=="")
value="&nbsp;";if(typeof oHtmlControl.innerHTML=="string")
oHtmlControl.innerHTML=value;else if(oHtmlControl.firstChild&&oHtmlControl.firstChild.nodeValue)
oHtmlControl.firstChild.nodeValue=value;}}
if(oHtmlRoot.oUp.oWAISettings.bYellowFade)
{if(!(Browser.ie&&oHtmlControl.oUp&&oHtmlControl.oUp.upType&&oHtmlControl.oUp.upType=="upDropdownControl"))
Helper.effect.fadeBGColor(oHtmlControl.id);}
return true;}
function BrowserGetValueByElementId(strHtmlEl,p_Attr)
{if(arguments.length<1)
return false;var l_oHtml=Browser.getRef(strHtmlEl);if(l_oHtml.oUp)
return Browser.getValue(l_oHtml.oUp,p_Attr);else
return Browser.getValue(l_oHtml,p_Attr);}
function BrowserGetValue(oControl,p_Attr)
{var l_Ret=false;if(oControl&&typeof(oControl.oUp)=="object")
{oControl=oControl.oUp;}
if(!oControl||!oControl.oHtml||(oControl&&!oControl.bEdit))
{if(oControl&&typeof(oControl.oHtml)=="object"&&!oControl.bEdit)
{l_Ret=Browser._getValueUpViewCtrl(oControl,p_Attr);}
else if(typeof(oControl)=="object"||!l_Ret)
{l_Ret=Browser._getValueHtmlCtrl(oControl,p_Attr);}}
else
{l_Ret=Browser._getValueUpEditCtrl(oControl,p_Attr);}
return l_Ret;}
function BrowserGetValue_HtmlCtrl(oControl,p_Attr)
{var l_oHtml=oControl;var l_strTag=l_oHtml.tagName.toUpperCase();var l_Ret=false;if(l_strTag=="SELECT"&&l_oHtml.options)
{if(l_oHtml.selectedIndex>-1)
{var l_oOpt=l_oHtml.options[l_oHtml.selectedIndex];l_Ret=(typeof(l_oOpt.value)=="string"&&l_oOpt.value.length>0)?l_oOpt.value:l_oOpt.text;}}
else if(l_strTag=="TEXTAREA"||(l_strTag=="INPUT"&&(l_oHtml.type=="text"||l_oHtml.type=="hidden")))
{l_Ret=l_oHtml.value;}
else if(l_strTag=="INPUT"&&l_oHtml.type=="checkbox")
{l_Ret=l_oHtml.checked;}
else
{if(l_oHtml.innerText)
{l_Ret=l_oHtml.innerText;}
else if(l_oHtml.firstChild&&l_oHtml.firstChild.nodeValue)
{l_Ret=l_oHtml.firstChild.nodeValue;}
else if(typeof(l_oHtml.innerHTML)=="string")
{l_Ret=l_oHtml.innerHTML;}}
return l_Ret;}
function BrowserGetValue_UpEditCtrl(oControl,p_Attr)
{var l_Ret=false;if(oControl.upType=="upCheckControl")
{if(oControl.oHtml.checked==true)
{l_Ret="1";}
else
{l_Ret="0";}}
else if(oControl.upType=="upDropdownControl"||oControl.upType=="upListboxControl")
{for(var j=0;j<oControl.oHtml.options.length;j++)
{if(oControl.oHtml.options[j].selected)
{if(typeof(p_Attr)!="string")
{l_Ret=oControl.oHtml.options[j].value;}
else if(p_Attr=="key")
{if(oControl.sourceType=="0")
{if(typeof oControl.parentCloneContainerId!="undefined")
var aRecIds=eval("aRecId_"+oControl.oHtml.name.substring(0,oControl.oHtml.name.indexOf(IDCOUNTERSEP)));else
var aRecIds=eval("aRecId_"+oControl.oHtml.name);if(typeof(aRecIds)!="undefined"&&aRecIds.length>j)
l_Ret=aRecIds[j];}
else
{l_Ret=oControl.oHtml.options[j].value;}}
else if(p_Attr=="text")
{l_Ret=oControl.oHtml.options[j].text;}
break;}}
if((Browser.safari||Browser.konqueror)&&oControl.oHtml.selectedIndex=="-1"&&oControl.oHtml.options.length>0)
{if(oControl.oHtml.options[0].text!="")
l_Ret=oControl.oHtml.options[0].value;}}
else if(oControl.upType=="upRadioControlGroup")
{for(var j=0;j<oControl.elements.length;j++)
{if(oControl.elements[j].oHtml.checked==true)
{l_Ret=oControl.elements[j].oHtml.value;break;}}}
else if(oControl.upType=="upMultiSelectControl")
{l_Ret=oControl._toOutputString();}
else if(!(Browser.safari2&&!Browser.safari3up)&&oControl.upType=="upTextareaControl"&&oControl.editor=="1"&&oControl.editorType=="fckeditor"&&typeof(FCKeditorAPI)!="undefined")
{var oEditor=FCKeditorAPI.GetInstance(oControl.oHtml.name);if(oEditor&&oEditor.EditorDocument)
{l_Ret=oEditor.GetXHTML(false)}
else
{l_Ret=oControl.oHtml.value;}}
else
{l_Ret=oControl.oHtml.value;}
return l_Ret;}
function BrowserGetValue_UpViewCtrl(oControl,p_Attr)
{var l_Ret=false;if(oControl.displayValue)
{l_Ret=oControl.displayValue;}
else
{l_Ret=this._getValueHtmlCtrl(oControl.oHtml);}
return l_Ret;}
function BrowserGetRawValue(oControl)
{var j;if(!oControl||!oControl.oHtml)
{return false;}
var l_strVal=this.getValue(oControl);if(typeof(l_strVal)=="string"&&l_strVal.length==0)return new String("");if(!l_strVal)
return false;var l_strRawVal=new String("");switch(oControl.upType)
{case"upIntegerControl":case"upFloatControl":case"upCurrencyControl":l_strRawVal=oControl.toJSNumber(l_strVal);break;case"upDateControl":var l_dt=oControl.setDateObjectFromLocal(l_strVal)
l_strRawVal=oControl.toISODateString(l_dt);break;case"upTimeControl":var l_dt=oControl.setDateObjectFromLocal(l_strVal)
l_strRawVal=oControl.toISOTimeString(l_dt);break;case"upDateTimeControl":var l_dt=oControl.setDateObjectFromLocal(l_strVal)
l_strRawVal=oControl.toISODateTimeString(l_dt);break;default:l_strRawVal=l_strVal;}
return l_strRawVal;}
function BrowserInsertValue(oControl,value)
{var l_bDone=false;if(oControl&&typeof(oControl.oUp)=="object")
{oControl=oControl.oUp;}
if(!oControl||!oControl.oHtml)
{return false;}
var l_oHtml=oControl.oHtml;if(arguments.length<2)
{value="";}
var htmlValue=value;var valueType;if(typeof(htmlValue)=="string")
{valueType="string";while(htmlValue.indexOf('=0D')>-1)
{htmlValue=htmlValue.replace(/=0D/,"\n");}}
if(oControl.bEdit)
{if(oControl.upType=="upTextareaControl")
{if(oControl.editor&&oControl.editor=="1"&&!(Browser.safari2&&!Browser.safari3up))
{if(oControl.oHtml.form.oUp.oFuncPart&&oControl.oHtml.form.oUp.oFuncPart!=null)
{while(htmlValue.indexOf('=0D')>-1)
{htmlValue=htmlValue.replace(/=0D/,"<br>");}
var targWin=oControl.oHtml.form.oUp.oFuncPart.oWindow.oHtml;if(oControl.editorType=="fckeditor"&&targWin&&targWin.FCKeditorAPI&&targWin.FCKeditorAPI.GetInstance(oControl.oHtml.name))
{var oEditor=targWin.FCKeditorAPI.GetInstance(oControl.oHtml.name);if(oEditor.EditMode==targWin.FCK_EDITMODE_WYSIWYG)
{oEditor.InsertHtml(htmlValue);l_bDone=true;}
else
{l_oHtml=oEditor.EditingArea.Textarea;}}}}
if(!l_bDone)
{l_oHtml.focus();if(typeof document.selection!='undefined')
{var range=document.selection.createRange();var insText=range.text;range.text=htmlValue;range=document.selection.createRange();if(insText.length==0)
{}
else
{range.moveStart('character',htmlValue.length);}
range.select();}
else if(typeof l_oHtml.selectionStart!='undefined')
{var start=l_oHtml.selectionStart;var end=l_oHtml.selectionEnd;var insText=l_oHtml.value.substring(start,end);l_oHtml.value=l_oHtml.value.substr(0,start)+htmlValue+l_oHtml.value.substr(end);var pos;if(htmlValue.length==0)
{pos=start+htmlValue.length;}
else
{pos=start+htmlValue.length;}
l_oHtml.selectionStart=pos;l_oHtml.selectionEnd=pos;}
else
{l_oHtml.value+=htmlValue;}}}}
return true;}
function BrowserSetValue(oControl,value,p_Attr)
{var l_Ret=false;var l_oHtml=false;if(arguments.length<2)
{value="";}
if(oControl&&typeof(oControl.oUp)=="object")
{oControl=oControl.oUp;}
if(!oControl||!oControl.oHtml||(oControl&&!oControl.bEdit))
{if(oControl&&typeof(oControl.oHtml)=="object"&&!oControl.bEdit)
{l_oHtml=oControl.oHtml;l_Ret=this.setValue_UpViewCtrl(oControl,value,p_Attr);}
else if(typeof(oControl)=="object")
{l_oHtml=oControl;l_Ret=this.setValue_HtmlCtrl(oControl,value,p_Attr);}}
else
{l_oHtml=oControl.oHtml;l_Ret=this.setValue_UpEditCtrl(oControl,value,p_Attr);}
if(l_oHtml&&l_Ret&&oHtmlRoot.oUp.oWAISettings.bYellowFade)
{if(!(Browser.ie&&oControl.upType&&oControl.upType=="upDropdownControl"))
Helper.effect.fadeBGColor(l_oHtml.id,2,2000);}
return l_Ret;}
function BrowserSetValue_HtmlCtrl(oHtml,value,p_Attr)
{var l_strTag=oHtml.tagName.toUpperCase();if(l_strTag=="SELECT"&&oHtml.options)
{var l_bSelected=false;for(var j=0;j<oHtml.options.length;j++)
{if(oHtml.options[j].value==value)
{l_bSelected=true;oHtml.options[j].selected=true;}
else
{oHtml.options[j].selected=false;}}
if(!l_bSelected)
{for(var j=0;j<oHtml.options.length;j++)
{if(oHtml.options[j].text==value)
{l_bSelected=true;oHtml.options[j].selected=true;}
else
{oHtml.options[j].selected=false;}}}
return l_bSelected;}
else if(l_strTag=="TEXTAREA"||(l_strTag=="INPUT"&&(oHtml.type=="text"||oHtml.type=="hidden")))
{oHtml.value=value;}
else if(l_strTag=="INPUT"&&oHtml.type=="checkbox")
{oHtml.checked=((typeof(value)=="boolean"&&value)||value=="1"||value=="true");}
else
{if(l_strTag=="TD"&&value=="")
value="&nbsp;";if(typeof(oHtml.innerHTML)=="string")
{oHtml.innerHTML=value;return true;}
else if(oHtml.firstChild&&oHtml.firstChild.nodeValue)
{oHtml.firstChild.nodeValue=value;return true;}
else
{return false;}}}
function BrowserSetValue_UpEditCtrl(oControl,htmlValue,p_Attr)
{var l_oHtml=oControl.oHtml;if(oControl.upType=="upCheckControl")
{if(htmlValue==true||htmlValue=="true"||htmlValue=="1")
{l_oHtml.checked=true;}
else
{l_oHtml.checked=false;}}
else if(oControl.upType=="upDropdownControl"||oControl.upType=="upListboxControl")
{if(typeof(p_Attr)=="string")
{if(p_Attr=="key"&&oControl.sourceType=="0")
{var aRecIds=eval("aRecId_"+l_oHtml.name);}
var val;for(var j=0;j<l_oHtml.options.length;j++)
{if(p_Attr=="key")
{if(oControl.sourceType=="0"&&typeof(aRecIds)!="undefined")
{val=aRecIds[j];}
else
{val=l_oHtml.options[j].value;}}
else if(p_Attr=="text")
{val=l_oHtml.options[j].text;}
l_oHtml.options[j].selected=(val==htmlValue);}}
else if(oControl.compareText=="1")
{for(var j=0;j<l_oHtml.options.length;j++)
{if(l_oHtml.options[j].text==htmlValue)
{l_oHtml.options[j].selected=true;}
else
{l_oHtml.options[j].selected=false;}}}
else
{for(var j=0;j<l_oHtml.options.length;j++)
{if(l_oHtml.options[j].value==htmlValue)
{l_oHtml.options[j].selected=true;}
else
{l_oHtml.options[j].selected=false;}}}
if((!oControl.onchange||oControl.onchange=="1")&&typeof l_oHtml.onchange!="undefined"&&l_oHtml.onchange!=null)
{l_oHtml.onchange();}}
else if(oControl.upType=="upMultiSelectControl")
{oControl.setFromString(htmlValue);}
else if(oControl.upType=="upRadioControlGroup")
{for(var j=0;j<oControl.elements.length;j++)
{if(oControl.elements[j].oHtml.value==htmlValue)
{oControl.elements[j].oHtml.checked=true;}
else
{oControl.elements[j].oHtml.checked=false;}}}
else if(oControl.upType=="upTextareaControl"&&oControl.editor&&oControl.editor=="1")
{if(l_oHtml.form.oUp.oFuncPart&&l_oHtml.form.oUp.oFuncPart!=null)
{while(htmlValue.indexOf('=0D')>-1)
{htmlValue=htmlValue.replace(/=0D/,"<br>");}
var targWin=l_oHtml.form.oUp.oFuncPart.oWindow.oHtml;if(oControl.editorType=="fckeditor"&&targWin&&targWin.FCKeditorAPI&&targWin.FCKeditorAPI.GetInstance(l_oHtml.name))
{if(Browser.safari2&&!Browser.safari3up)
{l_oHtml.value=htmlValue;}
else
{var oEditor=targWin.FCKeditorAPI.GetInstance(l_oHtml.name);if(oEditor.EditMode==targWin.FCK_EDITMODE_WYSIWYG)
{oEditor.SetHTML(htmlValue);}
else
{oEditor.EditingArea.Textarea.value=htmlValue;}}}
else if(targWin.editor_setHTML)
{targWin.editor_setHTML(l_oHtml.name,htmlValue);l_oHtml.value=htmlValue;}
else
{l_oHtml.value=htmlValue;}}}
else if(oControl.upType=="upTextareaControl")
{while(htmlValue.indexOf('=0D')>-1)
{htmlValue=htmlValue.replace(/=0D/,"\n");}
l_oHtml.value=htmlValue;}
else
{if(l_oHtml.value!=htmlValue)l_oHtml.value=htmlValue;}
return true;}
function BrowserSetValue_UpViewCtrl(oControl,htmlValue,p_Attr)
{if(oControl.displayValue)
{oControl.displayValue=htmlValue;}
l_Ret=this.setValue_HtmlCtrl(oControl.oHtml,htmlValue,p_Attr);}
function BrowserGetEventKeyCode()
{var codeInput="";if(self.oUp.oEvent.keyCode&&self.oUp.oEvent.keyCode!=""&&self.oUp.oEvent.keyCode!=0)
{codeInput=self.oUp.oEvent.keyCode;}
else
{codeInput=self.oUp.oEvent.which;}
return codeInput;}
function BrowserGetEventKeyChar()
{var keyChar=String.fromCharCode(Browser.getEventKeyCode()).toLowerCase();return keyChar;}
function BrowserGetEventTarget()
{if(self.oUp.oEvent.target!=null)
{oHtml=self.oUp.oEvent.target;}
else if(self.oUp.oEvent.srcElement!=null)
{oHtml=self.oUp.oEvent.srcElement;}
else
{return false;}
return oHtml;}
function BrowserGetExceptionMessage(exception)
{var message="";if(exception.description)
{message=exception.description;}
else if(exception.message)
{message=exception.message;}
return message;}
if(typeof Error!="undefined")
{function upException(name,oControl,message,info)
{this.name=name;this.oControl=oControl;this.message=message;this.info=info;}
upException.prototype=new Error();}
function upTableReg()
{this.aTables=new Array();this.register=TableRegRegister;this.unregister=TableRegUnregister;this.getTableByGuid=TableRegGetByGuid;this.getTableByControlName=TableRegGetByControlName;}
function TableRegRegister(controlName,level,name,guid,recordname,recordguid,tabType)
{if(this.getTableByControlName(controlName)!=null)this.unregister(controlName);var oTable=new upTable(controlName,level,name,guid,recordname,recordguid,tabType);this.aTables.push(oTable);return oTable;}
function TableRegUnregister(controlName)
{var oTable=null;var newTableReg=new Array();for(var i=0;i<this.aTables.length;i++)
{oTable=this.aTables[i];if(oTable.controlName!=controlName)
{newTableReg.push(oTable);}}
this.aTables=newTableReg;}
function TableRegGetByGuid(guid)
{var oTable=null;for(var i=0;i<this.aTables.length;i++)
{oTable=this.aTables[i];if(oTable.guid==guid)
{return oTable;}}
return null;}
function TableRegGetByControlName(controlName)
{var oTable=null;for(var i=0;i<this.aTables.length;i++)
{oTable=this.aTables[i];if(oTable.controlName==controlName)
{return oTable;}}
return null;}
function upTable(controlName,level,name,guid,recordname,recordguid,tabType)
{this.controlName=controlName;this.level=level;this.name=name;this.guid=guid;this.recordname=recordname;this.recordguid=recordguid;this.tabType=tabType;this.aTableCols=new Array();this.aRecIds=new Array();this.getCols=TableGetCols;this.getColByGuid=TableGetColByGuid;this.putCol=TablePutCol;}
function TableGetCols()
{return this.aTableCols;}
function TableGetColByGuid(guid)
{for(var i=0;i<this.aTableCols.length;i++)
{if(this.aTableCols[i].guid==guid)
{return this.aTableCols[i];}}
return null;}
function TablePutCol(guid,name,type,displayName)
{var oTableCol=new upTableCol(guid,name,type,displayName);oTableCol.oTable=this;this.aTableCols.push(oTableCol);}
function upTableCol(guid,name,controlType,displayName,tabType)
{this.guid=guid;this.name=name;this.controlType=controlType;this.displayName=displayName;this.getNodeValue=TableColGetNodeValue;this.getNode=TableColGetNode;this._getNodeTC=TableCol_GetNodeTC;this._getNodeST=TableCol_GetNodeST;this._getNodeGD=TableCol_GetNodeGD;}
function TableColGetNodeValue(id)
{var n=this.getNode(id);if(n!=null&&n.firstChild&&(this.controlType=="upDrTextareaVControl"||this.controlType=="upTextareaVControl"))
{return n.innerHTML;}
else if(n!=null&&n.firstChild&&n.firstChild.nodeType==3)
{return n.firstChild.data;}
else if(n!=null&&n.firstChild&&n.firstChild.nodeType==1&&n.firstChild.nodeName=="IMG")
{return n.firstChild.getAttribute("src");}
else return"";}
function TableColGetNode(id)
{if(this.oTable.tabType=="st")return this._getNodeST(id);else if(this.oTable.tabType=="gd")return this._getNodeGD(id);else return this._getNodeTC(id);}
function TableCol_GetNodeTC(id)
{var colname=this.name;var recordname=this.oTable.recordname;var id="ID_"+colname+"_"+recordname+"_"+id;return document.getElementById(id);}
function TableCol_GetNodeGD(recId)
{var colname=this.name;var id="ID_"+colname+"_"+recId;return document.getElementById(id);}
function TableCol_GetNodeST(recId)
{var colname=this.name;var recordname=this.oTable.recordname;var id="ID_"+recordname+"_"+colname+"_"+recId;return document.getElementById(id);}
function getElement(guid)
{if(!guid)
return null;if(self&&typeof self.aIdByGuid!="undefined"&&self.aIdByGuid&&self.aIdByGuid[guid]&&self.aIdByGuid[guid]!="undefined")
{var id=self.aIdByGuid[guid];return Browser.getRef(id);}
else
{return null;}}
function getGuidById(p_strId)
{if(!p_strId)return null;if(self&&typeof self.aIdByGuid!="undefined")
{for(var e in self.aIdByGuid)
{if(self.aIdByGuid[e]==p_strId)
{return e;}}}
return"";}
function openChat()
{oUserInfo=new upTextActionControl();oUserInfo.oHtml=new Object();oUserInfo.oTarget=new upTarget;oUserInfo.oTarget.newWindow="1";oUserInfo.oTarget.rq_TargetFrame="wndChat";oUserInfo.oTarget.addParam=Helper.setQsValueByParam("rq_LoadStaticVm","internal/system/vm/html/chat/push.vm",oUserInfo.oTarget.addParam);oUserInfo.processRequest();return false;}
function getFormObjectByElement(p_oElement,p_bInwards)
{if(p_bInwards)
{var l_Forms=p_oElement.getElementsByTagName("form");if(l_Forms.length>0&&typeof(l_Forms[0])=="object")
{return l_Forms[0];}
else
{return null;}}
else
{var l_oParent=p_oElement.parentNode;if(l_oParent==null)
{return null;}
else if(l_oParent.nodeName=="FORM")
{return l_oParent;}
else if(l_oParent.nodeName!="HTML"&&l_oParent.nodeName!="BODY")
{return getFormObjectByElement(l_oParent,false);}
else
{return null;}}}
function trim(str)
{var a=[];for(i=0;i<str.length;i++)
{if(str.charCodeAt(i)==160)
a.push(" ");else
a.push(str.charAt(i));}
var strOut=a.join("");return strOut.replace(/^\s*|\s*$/g,"");}
function upForm()
{this.upType="upForm";this.bFileUpload=false;this.validateRequired=FormValidateRequired;this.validateValue=FormValidateValue;this.validatePattern=FormValidatePattern;this.setFocusOn=FormSetFocusOn;this.oFuncPart=null;}
upForm.prototype=new upContainer();function FormValidateRequired(p_strMessage)
{var fmValidated=true;var eleValidated=false;var eleName="";var eleNoValList="";var firstNoVal="";var aDoneControls=new Array();var l_strMessage="";if(!p_strMessage||p_strMessage=="")
{l_strMessage=self.oUp.oMessage.FORM_CONSTR_REQUIRED;}
else
{l_strMessage=p_strMessage;}
for(var i=0;i<this.oHtml.length;i++)
{eleUp=null;if((this.oHtml.elements[i].type=="checkbox"&&this.oHtml.elements[i].oUp&&this.oHtml.elements[i].oUp.group)||(this.oHtml.elements[i].type=="radio"&&this.oHtml.elements[i].oUp))
{if(this.oHtml.elements[i].oUp.group.id&&!alreadyDone(aDoneControls,this.oHtml.elements[i].oUp.group.id))
{eleUp=this.oHtml.elements[i].oUp.group;aDoneControls[aDoneControls.length]=this.oHtml.elements[i].oUp.group.id;}}
if(this.oHtml.elements[i].type=="select-multiple"&&this.oHtml.elements[i].oUp&&typeof this.oHtml.elements[i].oUp.oHtmlSel!="undefined"&&this.oHtml.elements[i].oUp.oHtmlSel!=null)
{eleUp=this.oHtml.elements[i].oUp;aDoneControls[aDoneControls.length]=this.oHtml.elements[i].id;}
else if(this.oHtml.elements[i].oUp)
{eleUp=this.oHtml.elements[i].oUp;aDoneControls[aDoneControls.length]=this.oHtml.elements[i].name;}
else
{continue;}
if(eleUp!=null&&eleUp.required&&eleUp.required=="1")
{eleValidated=eleUp.validateRequiredDo();if(eleValidated==false)
{eleUp.oHtml.className="SCUP_"+eleUp.styleType+"_notvalid";if(eleUp.userName&&eleUp.userName!="")
{eleName=eleUp.userName;}
else
{eleName=eleUp.oHtml.id;}
eleNoValList+="<br/>"+eleName;if(firstNoVal==""&&this.oHtml.elements[i].type!="hidden")
{firstNoVal=this.oHtml.elements[i];}
fmValidated=false;}
else
{eleUp.oHtml.className="SCUP_"+eleUp.styleType+"_normal";}}}
if(fmValidated==false)
{var l_strErrDesc=l_strMessage+eleNoValList;var l_aSettings={"autoClose":true,"autoCloseInterval":5000,"waitOnClose":false}
oHtmlRoot.oUp.adviceShow(self.oUp.oMessage.ERROR_INPUT,l_strErrDesc,"FormValidateRequired",l_aSettings,self);if(firstNoVal!=""&&!Browser.i_safari)
{this.setFocusOn(firstNoVal);}
return false;}
else
{return true;}}
function FormSetFocusOn(oHtml)
{try
{if(oHtml.oUp&&oHtml.oUp.upType=="upTextareaControl"&&oHtml.oUp.editor&&oHtml.oUp.editor=="1")
{if(!(Browser.safari2&&!Browser.safari3up)&&oHtml.oUp.editorType=="fckeditor")
{document.getElementById(oHtml.name+"___Frame").contentWindow.focus();}
else
{oHtml.focus();}}
else
{oHtml.focus();}}
catch(e)
{ErrorHandler.warn(e,"FormSetFocusOn");return true;}
return true;}
function FormValidatePattern(p_strMessage)
{var isFmValidated=true;var isValidated=false;var name="";var listOfFailed="";var firstFailed="";var l_strMessage="";var oUp=null;if(!p_strMessage||p_strMessage=="")
{l_strMessage=self.oUp.oMessage.FORM_CONSTR_VALUE;}
else
{l_strMessage=p_strMessage;}
for(var i=0;i<this.oHtml.length;i++)
{if(this.oHtml.elements[i].oUp&&this.oHtml.elements[i].type=="text"&&this.oHtml.elements[i].oUp.pattern&&this.oHtml.elements[i].oUp.pattern!="")
{oUp=this.oHtml.elements[i].oUp;if(this.oHtml.elements[i].value=="")
isValidated=true;else
isValidated=oUp.matchPatternDo();if(!isValidated)
{oUp.oHtml.className="SCUP_"+oUp.styleType+"_notvalid";if(oUp.userName&&oUp.userName!="")
{name=oUp.userName;}
else
{name=oUp.oHtml.id;}
listOfFailed+="<br/>"+name;if(firstFailed=="")
{firstFailed=this.oHtml.elements[i];}
isFmValidated=false;}
else
{oUp.oHtml.className="SCUP_"+oUp.styleType+"_normal";}}}
if(isFmValidated==false)
{var l_strErrDesc=l_strMessage+listOfFailed;var l_aSettings={"autoClose":true,"autoCloseInterval":5000,"waitOnClose":false}
oHtmlRoot.oUp.adviceShow(self.oUp.oMessage.ERROR_INPUT,l_strErrDesc,"FormValidatePattern",l_aSettings,self);if(!Browser.i_safari)
this.setFocusOn(firstFailed);return false;}
else
{return true;}}
function FormValidateValue(p_strMessage)
{var fmValidated=true;var eleValidated=false;var eleName="";var eleNoValList="";var firstNoVal="";var aDoneControls=new Array();var l_strMessage="";if(!p_strMessage||p_strMessage=="")
{l_strMessage=self.oUp.oMessage.FORM_CONSTR_VALUE;}
else
{l_strMessage=p_strMessage;}
for(var i=0;i<this.oHtml.length;i++)
{if(!this.oHtml.elements[i].oUp||this.oHtml.elements[i].type.substr(0,6)=="select"||this.oHtml.elements[i].oUp.upType=="upMultiSelectControl")
{continue;}
else if(this.oHtml.elements[i].type=="checkbox")
{if(this.oHtml.elements[i].oUp.group&&(this.oHtml.elements[i].oUp.group.id&&!alreadyDone(aDoneControls,this.oHtml.elements[i].oUp.group.id)))
{eleUp=this.oHtml.elements[i].oUp.group;aDoneControls[aDoneControls.length]=this.oHtml.elements[i].oUp.group.id;}
else
{continue;}}
else
{eleUp=null;if(this.oHtml.elements[i].oUp)
{eleUp=this.oHtml.elements[i].oUp;}
aDoneControls[aDoneControls.length]=this.oHtml.elements[i].name;}
if(eleUp&&((eleUp.min&&eleUp.min!="")||(eleUp.max&&eleUp.max!="")))
{eleValidated=eleUp.validateValueDo();if(!eleValidated)
{eleUp.oHtml.className="SCUP_"+eleUp.styleType+"_notvalid";if(eleUp.userName&&eleUp.userName!="")
{eleName=eleUp.userName;}
else
{eleName=eleUp.oHtml.id;}
eleNoValList+="<br/>"+eleName;if(firstNoVal=="")
{firstNoVal=this.oHtml.elements[i];}
fmValidated=false;}
else
{eleUp.oHtml.className="SCUP_"+eleUp.styleType+"_normal";}}}
if(fmValidated==false)
{var l_strErrDesc=l_strMessage+eleNoValList;var l_aSettings={"autoClose":true,"autoCloseInterval":5000,"waitOnClose":false}
oHtmlRoot.oUp.adviceShow(self.oUp.oMessage.ERROR_INPUT,l_strErrDesc,"FormValidateValue",l_aSettings,self);if(!Browser.i_safari)
{this.setFocusOn(firstNoVal);}
return false;}
else
{return true;}}
function alreadyDone(aDoneControls,controlName)
{for(var i=0;i<aDoneControls.length;i++)
{if(aDoneControls[i]==controlName)
{return true;}}
return false;}
function upDataControl()
{this.pattern="";this.required="0";this.defaultValue=null;this.inputLegalChars="";this.formula="";this.readonly=false;this.unit="";this.maxlength="";this.bEdit=true;this.bVariable=false;this.skipReadonlyControl=ControlSkipReadonlyControl;this.validateInput=ControlValidateInput;this.matchInput=ControlMatchInput;this.validateInputLength=ControlValidateInputLength;this.validateRequired=ControlValidateRequired;this.validateRequiredDo=ControlValidateRequiredDo;this.validatePattern=ControlValidatePattern;this.matchPattern=ControlMatchPattern;this.matchPatternDo=ControlMatchPatternDo;this.calcValue=ControlCalcValue;this._calcValue=Control_CalcValue;this.setRequiredStyle=ControlSetRequiredStyle;this.toWsInputString=ControlToWsInputString;}
upDataControl.prototype=new upControl();function ControlToWsInputString(p_strValue)
{return p_strValue;}
function ControlSetRequiredStyle()
{if(typeof this.required=="undefined"||this.required==null||!(this.required==1)||!this.oStyle||!self.oUp||!self.oUp.oRootWin||!self.oUp.oRootWin.oFormatInfo.oRequiredStyle)
{return false;}
var oRequiredStyle=self.oUp.oRootWin.oFormatInfo.oRequiredStyle;if(oRequiredStyle["backgroundImage"]!="none")
{this.oStyle["backgroundRepeat"]=oRequiredStyle["backgroundRepeat"];this.oStyle["backgroundImage"]=oRequiredStyle["backgroundImage"];this.oStyle["backgroundPosition"]=oRequiredStyle["backgroundPosition"];}}
function ControlSkipReadonlyControl()
{var fm=this.oHtml.form;var fmLength=fm.length;var start;for(i=0;i<fmLength;i++)
{if(this.oHtml.name==fm.elements[i].name)
{if(i+1>=fmLength)
{start=0;}
else
{start=i+1;}
for(j=start;j<fmLength;j++)
{oHtml=fm.elements[j];if(!oHtml.oUp)
continue;if(oHtml.type!="hidden"&&oHtml.style.display!="none"&&oHtml.oUp.readonly==false)
{if(fm.oUp.setFocusOn(oHtml))
return true;else
continue;}}
self.oUp.setFocus();return true;}}
return false;}
function ControlValidateInput()
{return this.matchInput();}
function ControlMatchInput()
{var key=Browser.getEventKeyCode();var keyCode=self.oUp.oEvent.keyCode;if(key==13)
{var rv=true;if(this.format)rv=this.format();if(rv)return true;return false;}
else if(key==0||key==8)
{return true;}
else if((keyCode==9||(keyCode>=33&&keyCode<=40)||keyCode==45||keyCode==46)&&(typeof self.oUp.oEvent.which!="undefined"&&self.oUp.oEvent.which==0))
{return true;}
else
{var keyChar=Browser.getEventKeyChar();var legalChars=this.inputLegalChars;if(legalChars.indexOf(keyChar)>-1||legalChars.toLowerCase().indexOf(keyChar)>-1)
{return true;}
else
{return false;}}}
function ControlValidateInputLength(p_strMessage)
{var l_strMessage="";if(!p_strMessage||p_strMessage=="")
{l_strMessage=self.oUp.oMessage.CTRL_CONSTR_LENGTH;}
else
{l_strMessage=p_strMessage;}
if(!this.inputLength||this.inputLength=="")
{return true;}
if(this.inputLength<this.oHtml.value.length)
{alert(l_strMessage);this.oHtml.value=this.oHtml.value.substring(0,this.inputLength);return false;}
return true;}
function ControlValidatePattern(p_strMessage)
{var l_strMessage="";if(arguments.length>0)l_strMessage=p_strMessage;else l_strMessage=self.oUp.oMessage.CTRL_CONSTR_PATTERN;return this.matchPattern(l_strMessage);}
function ControlMatchPattern(p_strMessage)
{if(arguments.length<1)
l_strMessage="";else
l_strMessage=p_strMessage;var value=this.oHtml.value;var pattern=this.pattern;if(value=="")
return true;if(!pattern||pattern=="")
return true;if(!this.matchPatternDo())
{if(l_strMessage!="")
{var l_strErrDesc=l_strMessage;var l_aSettings={"autoClose":true,"autoCloseInterval":5000,"waitOnClose":false}
oHtmlRoot.oUp.adviceShow(self.oUp.oMessage.ERROR_INPUT,l_strErrDesc,"ControlMatchPattern",l_aSettings,self)}
if(!Browser.i_safari)
{this.oHtml.focus();setTimeout("document.getElementById('"+this.oHtml.id+"').focus();",100);}
return false;}
return true;}
function ControlMatchPatternDo()
{var value=this.oHtml.value;var pattern=this.pattern;if(pattern.toString().substr(0,1)=="/")
{pattern=pattern.toString().substr(1,pattern.toString().length-1);}
if(pattern.toString().substr(pattern.length-1,1)=="/")
{pattern=pattern.toString().substring(0,pattern.toString().length-1);}
reg=new RegExp(pattern,"i");if(reg.test(value))
return true;else
return false;}
function ControlValidateRequired(p_strMessage)
{var l_strMessage="";if(!p_strMessage||p_strMessage=="")
{l_strMessage=self.oUp.oMessage.CTRL_CONSTR_PATTERN;}
else
{l_strMessage=p_strMessage;}
if(!this.validateRequiredDo())
{var l_strErrDesc=l_strMessage;var l_aSettings={"autoClose":true,"autoCloseInterval":5000,"waitOnClose":false}
oHtmlRoot.oUp.adviceShow(self.oUp.oMessage.ERROR_INPUT,l_strErrDesc,"ControlValidateRequired",l_aSettings,self)
if(!Browser.i_safari)
{this.oHtml.focus();setTimeout("document.getElementById('"+this.oHtml.id+"').focus();",100);}
return false;}
return true;}
function ControlValidateRequiredDo()
{var value=this.oHtml.value;if(value=="")
{return false;}
return true;}
function ControlCalcValue(pFormula,bDuration)
{if(arguments.length<2)bDuration=false;var result=this._calcValue(pFormula,bDuration);return Browser.setValue(this,result);return true;}
function Control_CalcValue(pFormula,bDuration)
{var formula="";var bDT=false;aFormula=pFormula.split("|");for(var i=0;i<aFormula.length;i++)
{var item=aFormula[i];var value="";var result="";var result_iso="";var oControl=null;var oVariable=null;var oDate=null;if(item.substr(0,1)=="F")
{oControl=eval("o"+item.substr(1,item.length));value=Browser.getValue(oControl);if(oControl.upType=='upFloatControl'||oControl.upType=='upIntegerControl'||oControl.upType=='upCurrencyControl')
{value=oControl.toJSNumber(value);if((isNaN(value)||!isFinite(value)))
{throw new upException("N_NaN",oControl,self.oUp.oMessage.CALC_ERR_FLD_NO_VALID_NUMBER,"");}}
if(oControl.upType=='upDateControl'||oControl.upType=='upTimeControl'||oControl.upType=='upDateTimeControl')
{bDT=true;oDate=oControl.setDateObjectFromLocal(value);value=Date.parse(oDate);if((isNaN(value)||!isFinite(value)))
{throw new upException("DT_NaN",oControl,self.oUp.oMessage.CALC_ERR_FLD_NO_VALID_DATE,"");}}}
else if(item.substr(0,1)=="V")
{oVariable=eval("self.oUp.oPage.oVariables."+item.substr(1,item.length));value=oVariable.value;if(oVariable.upType=='upFloatControl'||oVariable.upType=='upIntegerControl')
{value=oVariable.toJSNumber(value);if((isNaN(value)||!isFinite(value)),"")
{throw new upException("N_NaN",oVariable,self.oUp.oMessage.CALC_ERR_VAR_NO_VALID_NUMBER,"");}}
if(oVariable.upType=='upDateControl'||oVariable.upType=='upTimeControl'||oVariable.upType=='upDateTimeControl')
{bDT=true;oDate=oVariable.setDateObjectFromLocal(value);value=Date.parse(oDate);if((isNaN(value)||!isFinite(value)))
{throw new upException("DT_NaN",oVariable,self.oUp.oMessage.CALC_ERR_VAR_NO_VALID_DATE,"");}}}
else if(item.substr(0,1)=="J")
{if(this.upType=='upDateControl'||this.upType=='upDateTimeControl'||this.upType=='upTimeControl')
bDT=true;oVariable=eval("self.oUp.oPage.oVariables."+item.substr(1,item.length));oDate=oVariable;value=Date.parse(oDate);if((isNaN(value)||!isFinite(value)))
{throw new upException("DT_NaN",oVariable,self.oUp.oMessage.CALC_ERR_VAR_NO_VALID_DATE,"");}}
else
{value=item;}
formula=formula+value+' ';}
result=eval(formula);if(bDT)
{if(this.upType=='upIntegerControl')
{result=parseInt(Math.round(result),10);if((isNaN(result)||!isFinite(result)))
{throw new upException("N_NaN","",self.oUp.oMessage.CALC_ERR_RESULT_NO_VALID_NUMBER,formula);}
result=this.toLocalFormat(result);}
else if(this.upType=='upTextControl')
{if((isNaN(result)||!isFinite(result)))
{throw new upException("DT_NaN","",self.oUp.oMessage.CALC_ERR_RESULT_NO_VALID_DATE,formula);}
oDate=new Date();oDate.setTime(Math.abs(result));var oTempDateTimeControl=new upDateTimeControl();if(bDuration)result=oTempDateTimeControl.toLocalDurationString(oDate);else result=oTempDateTimeControl.toLocalHourMinString(oDate);}
else if(this.upType=='upDateControl'||this.upType=='upDateTimeControl'||this.upType=='upTimeControl')
{if((isNaN(result)||!isFinite(result)))
{throw new upException("DT_NaN","",self.oUp.oMessage.CALC_ERR_RESULT_NO_VALID_DATE,formula);}
oDate=new Date();oDate.setTime(Math.abs(result));result=this.toLocalFormat(oDate);}
else
{result="";}}
else
{if((isNaN(result)||!isFinite(result)))
{throw new upException("N_NaN","",self.oUp.oMessage.CALC_ERR_RESULT_NO_VALID_NUMBER,formula);}
result=this.toLocalFormat(result);}
return result;}
function upNumericsMainControl()
{this.min="";this.max="";this.fracDigits=2;this.styleType="Editfield_Number";this.groupSep="";this.getLastZeros=NumericsGetLastZeros;this.correctNumberGroup=NumericsCorrectNumberGroup;this.correctDecimalValue=NumericsCorrectDecimalValue;this.validateValue=NumericsValidateValue;this.validateValueDo=NumericsValidateValueDo;this.round=NumericsRound;this.correctValue=NumericsCorrectValue;this.toWsInputString=NumericsToWsInputString;}
upNumericsMainControl.prototype=new upDataControl();function NumericsToWsInputString(p_strValue)
{return this.toJSNumber(p_strValue).toString();}
function NumericsCorrectValue(input)
{var output="";output=this.toJSNumber(input);if(isNaN(output))
{return false;}
else
{return this.toLocalFormat(output);}}
function NumericsRound(number,decs)
{var decimal;if(!number||number=='')
{return'0';}
var value=0;if(!decs||decs=='')
{decimal=2;}
else
{decimal=decs;}
value=Math.round(number*Math.pow(10,decimal))/Math.pow(10,decimal);return value;}
function NumericsGetLastZeros(decs)
{var strDec="";for(var i=1;i<=decs;i++)
{strDec=strDec+"0";}
return strDec;}
function NumericsCorrectNumberGroup(input)
{var value=input.toString();var groupSep=this.groupSep;if(value=="")
{value="0";}
var checkEnd=0;if(value.substr(0,1)=='+'|value.substr(0,1)=='-')
{checkEnd=1;}
else
{checkEnd=0;}
var checkStart=value.length-1;var j=0;for(i=checkStart;i>=checkEnd;i--)
{if(j==3)
{if(value.charAt(i)!=groupSep)
{value=value.substring(0,i+1)+groupSep+value.substring(i+1,value.length);i++;}
j=0;}
else
{j++;}}
if(this.leadingNulls==false&&value=="0")
{value="";}
else if(this.leadingNulls==false&&value=="-0")
{value="-";}
return value;}
function NumericsCorrectDecimalValue(value)
{var decimal=this.fracDigits;var out="";value=value.toString();if(!value||value.length==0)
{out=this.getLastZeros(decimal);return out;}
if(value.length>decimal)
{return value.substr(0,decimal);}
else
{return value+this.getLastZeros(decimal-value.length);}}
function NumericsValidateValue(p_strMessage)
{var l_strMessage="";if(!p_strMessage||p_strMessage=="")
{l_strMessage=self.oUp.oMessage.NUMERIC_CONSTR_VALUE;}
else
{l_strMessage=p_strMessage;}
if(!this.validateValueDo())
{var l_strErrDesc=l_strMessage;var l_aSettings={"autoClose":true,"autoCloseInterval":5000,"waitOnClose":false}
oHtmlRoot.oUp.adviceShow(self.oUp.oMessage.ERROR_INPUT,l_strErrDesc,"NumericsValidateValue",l_aSettings,self)
if(!Browser.i_safari)
{this.oHtml.focus();setTimeout("document.getElementById('"+this.oHtml.id+"').focus();",100);}
return false;}
return true;}
function NumericsValidateValueDo()
{var bNotInRange=false;var htmlValue;htmlValue=Browser.getValue(this);if(htmlValue.length==0)
{return true;}
var value=this.toJSNumber(htmlValue);if(isNaN(value))
{return false;}
if(this.max!=""&&!isNaN(this.max)&&value>this.max)
{bNotInRange=true;}
if(this.min!=""&&!isNaN(this.min)&&value<this.min)
{bNotInRange=true;}
if(bNotInRange)
{return false;}
return true;}
function upIntegerControl()
{this.groupSep=self.oUp.oFormatInfo.intGroupSep;this.upType="upIntegerControl";this.fracDigits=0;this.allowEmpty=true;this.toJSNumber=IntegerToJSNumber;this.toLocalFormat=IntegerToLocalFormat;this.format=IntegerFormat;this.validateInput=IntegerValidateInput;}
upIntegerControl.prototype=new upNumericsMainControl();function IntegerToJSNumber(input)
{if(input.length==0)
{return parseInt("0",10);}
var output=input;if(this.groupSep!='')
{output=Helper.replaceSubstring(output,this.groupSep,"")}
return parseInt(output,10);}
function IntegerToLocalFormat(input)
{var value=parseInt(input,10);if(isNaN(value))
{return false;}
value=value.toString();value=this.correctNumberGroup(value);return value;}
function IntegerValidateInput()
{this.inputLegalChars="-+0123456789"+this.groupSep;var keyChar=Browser.getEventKeyChar();if(keyChar=="-"&&this.oHtml.value.indexOf("-")>-1)
{return false;}
return this.matchInput();}
function IntegerFormat(p_strMessage)
{var l_strMessage="";if(!p_strMessage||p_strMessage=="")
{l_strMessage=self.oUp.oMessage.INT_CONSTR_PATTERN;}
else
{l_strMessage=p_strMessage;return false;}
var orgValue=Browser.getValue(this);if(orgValue==""&&this.allowEmpty)
return true;var value=this.correctValue(orgValue);if(!value)
{var l_strErrDesc=l_strMessage;var l_aSettings={"autoClose":true,"autoCloseInterval":5000,"waitOnClose":false}
oHtmlRoot.oUp.adviceShow(self.oUp.oMessage.ERROR_INPUT,l_strErrDesc,"IntegerFormat",l_aSettings,self)
if(!Browser.i_safari)
{this.oHtml.focus();setTimeout("document.getElementById('"+this.oHtml.id+"').focus();",100);}
return false;}
else if(orgValue!=value)
{Browser.setValue(this,value);}
return true;}
function upCurrencyControl()
{this.upType="upCurrencyControl";this.groupSep=self.oUp.oFormatInfo.currGroupSep;this.decSep=self.oUp.oFormatInfo.currDecSep;this.fracDigits=self.oUp.oFormatInfo.currFracDigits;this.leadingNulls=self.oUp.oFormatInfo.currLeadNulls;this.inputLegalChars="-+0123456789"+this.groupSep+this.decSep;this.allowEmpty=true;this.toJSNumber=CurrencyToJSNumber;this.toLocalFormat=CurrencyToLocalFormat;this.format=CurrencyFormat;this.validateInput=CurrencyValidateInput;}
upCurrencyControl.prototype=new upNumericsMainControl();function CurrencyToJSNumber(input)
{if(input.length==0)
{return"0";}
var output=input;if(this.groupSep!='')
{output=Helper.replaceSubstring(output,this.groupSep,"")}
output=output.toString().replace(this.decSep,".");return parseFloat(output);}
function CurrencyToLocalFormat(input)
{var value=parseFloat(input);var preDec="";var postDec="";if(isNaN(value))
{return false;}
value=this.round(value,this.fracDigits);value=value.toString();if(value.indexOf(".")>-1)
{preDec=this.correctNumberGroup(value.substring(0,value.indexOf(".")));}
else
{preDec=this.correctNumberGroup(value);}
if(value.indexOf(".")>-1)
{postDec=this.correctDecimalValue(value.substring(value.indexOf(".")+1));}
else
{postDec=this.correctDecimalValue("");}
value=preDec;if(postDec!="")value=value+this.decSep+postDec;return value;}
function CurrencyValidateInput()
{this.inputLegalChars="-+0123456789"+this.groupSep+this.decSep;var keyChar=Browser.getEventKeyChar();if(this.decSep&&keyChar==this.decSep&&this.oHtml.value.indexOf(this.decSep)>-1)
{return false;}
if(keyChar=="-"&&this.oHtml.value.indexOf("-")>-1)
{return false;}
return this.matchInput();}
function CurrencyFormat(p_strMessage)
{var l_strMessage="";if(!p_strMessage||p_strMessage=="")
{l_strMessage=self.oUp.oMessage.CURRENCY_CONSTR_PATTERN;}
else
{l_strMessage=p_strMessage;}
var orgValue=Browser.getValue(this);if(orgValue==""&&this.allowEmpty)
return true;var value=this.correctValue(orgValue);if(!value)
{var l_strErrDesc=l_strMessage;var l_aSettings={"autoClose":true,"autoCloseInterval":5000,"waitOnClose":false}
oHtmlRoot.oUp.adviceShow(self.oUp.oMessage.ERROR_INPUT,l_strErrDesc,"CurrencyFormat",l_aSettings,self)
if(!Browser.i_safari)
{this.oHtml.focus();setTimeout("document.getElementById('"+this.oHtml.id+"').focus();",100);}
return false;}
else if(orgValue!=value)
{Browser.setValue(this,value);}
return true;}
function upFloatControl()
{this.upType="upFloatControl";this.groupSep=self.oUp.oFormatInfo.numGroupSep;this.decSep=self.oUp.oFormatInfo.numDecSep;this.fracDigits=self.oUp.oFormatInfo.numFracDigits;this.leadingNulls=self.oUp.oFormatInfo.numLeadNulls;this.inputLegalChars="-+0123456789"+this.groupSep+this.decSep;this.allowEmpty=true;this.toJSNumber=FloatToJSNumber;this.toLocalFormat=FloatToLocalFormat;this.format=FloatFormat;this.validateInput=FloatValidateInput;}
upFloatControl.prototype=new upNumericsMainControl();function FloatToJSNumber(input)
{if(input.length==0)
{return"0";}
var output=input;if(this.groupSep!='')
{output=Helper.replaceSubstring(output,this.groupSep,"")}
output=output.toString().replace(this.decSep,".");return parseFloat(output);}
function FloatToLocalFormat(input)
{var value=parseFloat(input);var preDec="";var postDec="";if(isNaN(value))
{return false;}
value=this.round(value,this.fracDigits);value=value.toString();if(value.indexOf(".")>-1)
{preDec=this.correctNumberGroup(value.substring(0,value.indexOf(".")));}
else
{preDec=this.correctNumberGroup(value);}
if(value.indexOf(".")>-1)
{postDec=this.correctDecimalValue(value.substring(value.indexOf(".")+1));}
else
{postDec=this.correctDecimalValue("");}
value=preDec;if(postDec!="")value=value+this.decSep+postDec;return value;}
function FloatValidateInput()
{this.inputLegalChars="-+0123456789"+this.groupSep+this.decSep;var keyChar=Browser.getEventKeyChar();if(this.decSep&&keyChar==this.decSep&&this.oHtml.value.indexOf(this.decSep)>-1)
{return false;}
if(keyChar=="-"&&this.oHtml.value.indexOf("-")>-1)
{return false;}
return this.matchInput();}
function FloatFormat(p_strMessage)
{var l_strMessage="";if(!p_strMessage||p_strMessage=="")
{l_strMessage=self.oUp.oMessage.FLOAT_CONSTR_PATTERN;}
else
{l_strMessage=p_strMessage;return false;}
var orgValue=Browser.getValue(this);if(orgValue==""&&this.allowEmpty)
return true;var value=this.correctValue(orgValue);if(!value)
{var l_strErrDesc=l_strMessage;var l_aSettings={"autoClose":true,"autoCloseInterval":5000,"waitOnClose":false}
oHtmlRoot.oUp.adviceShow(self.oUp.oMessage.ERROR_INPUT,l_strErrDesc,"FloatFormat",l_aSettings,self);if(!Browser.i_safari)
{this.oHtml.focus();setTimeout("document.getElementById('"+this.oHtml.id+"').focus();",100);}
return false;}
else if(orgValue!=value)
{Browser.setValue(this,value);}
return true;}
function upDateTimeMainControl()
{this.min="";this.max="";this.inputLegalChars="";this.pattern="";this.styleType="Editfield_Date";this.initDateObject=DateTimeInitDateObject;this.setDateObjectFromLocalDate=DateTimeSetDateObjectFromLocalDate;this.setDateObjectFromLocalTime=DateTimeSetDateObjectFromLocalTime;this.validateDate=DateTimeValidateDate;this.validateTime=DateTimeValidateTime;this.validateDateValue=DateTimeValidateDateValue;this.validateTimeValue=DateTimeValidateTimeValue;this.getCurrDateTime=DateTimeGetCurrDateTime;this.getCurrTime=DateTimeGetCurrTime;this.getCurrDate=DateTimeGetCurrDate;this.getDatePart=DateTimeGetDatePart;this.getTimePart=DateTimeGetTimePart;this.isDateInMonth=DateTimeIsDateInMonth;this.daysInFebruary=DateTimeDaysInFebruary;this.isMonth=DateTimeIsMonth;this.isIntegerInRange=DateTimeIsIntegerInRange;this.getbHours24=DateTimeGetbHours24;this.getTimeSep=DateTimeGetTimeSep;this.getTimeMarker=DateTimeGetTimeMarker;this.getbSeconds=DateTimeGetbSeconds;this.getbFillHours=DateTimeGetbFillHours;this.getTimeString=DateTimeGetTimeString;this.toLocalDateString=DateTimeToLocalDateString;this.toISODateString=DateTimeToISODateString;this.toLocalTimeString=DateTimeToLocalTimeString;this.toISOTimeString=DateTimeToISOTimeString;this.toLocalDurationString=DateTimeToLocalDurationString;this.toLocalHourMinString=DateTimeToLocalHourMinString;this.setCurrent=DateTimeSetCurrent;this.toISODateTimeString=DateTimeToISODateTimeString;this.weekDaysNotToChoose="";this.daysInMonth=new Array(0,31,28,31,30,31,30,31,31,30,31,30,31);this.pickDate=DateTimePickDate;this.setToolTipContent=DateTimeSetToolTipContent;this.getCalendarContent=DateTimeGetCalendarContent;this.getWeekOfYear=DateTimeGetWeekOfYear;this._getWeekOfYear=DateTime_GetWeekOfYear;this.setWeekDaysNotToChoose=DateTimeSetWeekDaysNotToChoose;this.getLastDayOfMonth=DateTimeGetLastDayOfMonth;this.closePicker=DateTimeClosePicker;this.writeClose=DateTimeWriteClose;}
upDateTimeMainControl.prototype=new upDataControl();function DateTimeWriteClose()
{if(this.bToolTipPopup)
{return'self.'+this.oActionControl.oHtml.id+'_TTP.closePopup();';}
else
{return'if(opener &amp;&amp; !opener.closed){self.oUp.close();}else{self.close()}';}}
function DateTimeClosePicker()
{if(this.bToolTipPopup)
{if(this.bUsed&&this.oActionControl.oToolTipPopup)
this.oActionControl.oToolTipPopup.closePopup();}
else
{if(this.bUsed&&wndDatePicker&&wndDatePicker.oHtml&&!wndDatePicker.oHtml.closed)
wndDatePicker.close();}
this.bUsed=false;return;}
function DateTimeSetToolTipContent(content,stage)
{if(stage=="open")
{if(this.oActionControl.oToolTipPopup==null)eval("self."+this.oActionControl.oHtml.id+"_TTP = new upToolTipPopup(this.oActionControl, '"+this.oActionControl.oHtml.id+"_TTP')");var oPosXY=Browser.getPosition2Page(this.oHtml);this.oActionControl.oToolTipPopup.layerY=oPosXY.posY+Browser.getHeight(this.oHtml);this.oActionControl.oToolTipPopup.layerX=oPosXY.posX;}
var contentKey=this.oActionControl.oToolTipPopup.addContent(null,content);this.oActionControl.oToolTipPopup.setContentAttributes(contentKey,{classContainer:"",classHeaderBg:"SCUP_TT_POPUP_Header_normal_BG",classHeader:"SCUP_TT_POPUP_Header_normal",classHeaderLink:"SCUP_TT_POPUP_Header_link",classContentBg:"SCUP_TT_POPUP_normal_BG",classContent:"SCUP_TT_POPUP_normal"});this.oActionControl.oToolTipPopup.getContentObject(contentKey).setPosition(this.oActionControl.oToolTipPopup.layerX,this.oActionControl.oToolTipPopup.layerY,150,100,"button-right");if(stage=="refresh")
{this.oActionControl.oToolTipPopup.unload();}
oTargDoc=self.document;this.oActionControl.oToolTipPopup.showPopup(contentKey);}
function DateTimePickDate(e,p_bSetFocus)
{if(typeof(p_bSetFocus)!="boolean")p_bSetFocus=true;if(this.upType!="upDateControl"&&this.upType!="upDateTimeControl")
{return false;}
self.oUp.oEvent=null;if(e)
{self.oUp.oEvent=e;self.oUp.oRootWin.eventScreenX=e.screenX;self.oUp.oRootWin.eventScreenY=e.screenY;}
if(!isNaN(self.oUp.oFormatInfo.firstDayOfWeek))
{this.firstDayOfWeek=self.oUp.oFormatInfo.firstDayOfWeek;}
this.aWeekDaysToChoose=new Array();for(var i=0;i<=6;i++)
{this.aWeekDaysToChoose[i]=true;}
this.setWeekDaysNotToChoose();var content="";if(this.oHtml.value!="")
{this.format();var content=this.getContent(Browser.getValue(this));}
else
{var content=this.getContent("");}
if(this.bToolTipPopup)
{this.setToolTipContent(content,"open");if(this.oActionControl&&this.oActionControl.oFup)
{if(this.oActionControl.picker)
{this.oActionControl.oToolTipPopup.customOnMouseOver="var inp=document.getElementById('"+this.oActionControl.oDate.oHtml.id+"');if(inp && !inp.oUp.bDoNotClose){Helper.calPickerOpen(inp.oUp);if(inp.oUp.oActionControl.oToolTipPopup.oHtml){inp.oUp.oActionControl.oToolTipPopup.oHtml.focus();}};";this.oActionControl.oToolTipPopup.customOnFocus="var inp=document.getElementById('"+this.oActionControl.oDate.oHtml.id+"');if(inp && !inp.oUp.bDoNotClose){Helper.calPickerOpen(inp.oUp);};";this.oActionControl.oToolTipPopup.customOnMouseOut="var inp=document.getElementById('"+this.oActionControl.oDate.oHtml.id+"');if(inp && inp.oUp && !inp.oUp.bDoNotClose){Helper.calPickerClose(inp.oUp);};";}
if(typeof(this.oActionControl.oFup.strOnUnLoad)=="undefined")this.oActionControl.oFup.strOnUnLoad=new String("");this.oActionControl.oFup.strOnUnLoad+="var inp=document.getElementById('"+this.oActionControl.oDate.oHtml.id+"');if(inp){inp.oUp.closePicker();};";if(this.oActionControl.oToolTipPopup.oHtml)
{if(p_bSetFocus)
{this.oActionControl.oToolTipPopup.oHtml.tabindex=-1;this.oActionControl.oToolTipPopup.oHtml.focus();}}}}
else
{var winName="wndDatePicker"+Math.floor(Math.random()*65535);wndDatePicker=self.oUp.oRootWin.createPopUp(winName);wndDatePicker.setHtmlName(winName);wndDatePicker.setProps("dependent=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes");wndDatePicker.setContent(content);this.setPickerSize(wndDatePicker);wndDatePicker.setControlOfRef(this.oActionControl);wndDatePicker.setOffset(3,0);wndDatePicker.show();wndDatePicker.oHtml.oTargDoc=document;}
this.bUsed=true;return true;}
function DateTimeGetWeekOfYear(oDate)
{var year=oDate.getYear();if(year<1900)
{year+=parseInt(1900);}
year++;var weekOfYear=this._getWeekOfYear(oDate,year);while(weekOfYear<1)
{year--;weekOfYear=this._getWeekOfYear(oDate,year);}
return weekOfYear;}
function DateTime_GetWeekOfYear(oDate,year)
{var mSecPerWeek=6048e5;var day4j=new Date(year,0,4);var weekDay4j=(parseInt(day4j.getDay())+7-parseInt(this.firstDayOfWeek))%7;var weekOfYear=Math.floor(parseFloat(1.05)+(parseFloat(oDate.getTime())-parseInt(day4j.getTime()))/parseInt(mSecPerWeek)+weekDay4j/7);return weekOfYear;}
function DateTimeSetWeekDaysNotToChoose()
{aWeekDaysNotToChoose=this.weekDaysNotToChoose.split(",");for(var i=0;i<aWeekDaysNotToChoose.length;i++)
{this.aWeekDaysToChoose[aWeekDaysNotToChoose[i]]=false;}}
function DateTimeGetLastDayOfMonth(m,y)
{if(m==1||m==3||m==5||m==7||m==8||m==10||m==12)
{return 31;}
else if(m==2)
{return this.daysInFebruary(y);}
else
{return 30;}}
function DateTimeGetCalendarContent(year,month,day,time)
{this.monthNames=self.oUp.oMessage.CAL_MONTH_LIST.split(",");this.dayHeaders=self.oUp.oMessage.CAL_DAY_LIST_ABBRE.split(",");var content=[];var startDay=parseInt(this.firstDayOfWeek);var fup=Helper.getFupId(this);var oDateToday=new Date();if(arguments.length<1)
{var year=oDateToday.getFullYear();}
var preSelYear=year;if(((year%4==0)&&(year%100!=0))||(year%400==0))
{this.daysInMonth[2]=29;}
else
{this.daysInMonth[2]=28;}
if(arguments.length<2)
{var month=oDateToday.getMonth()+1;}
var preSelMonth=month;if(arguments.length<3)
{var day=oDateToday.getDate();}
var lastDayOfMonth=this.getLastDayOfMonth(month,year);if(day>lastDayOfMonth||day<1)
{day=lastDayOfMonth;}
var preSelDay=day;var outputYear=parseInt(year);var outputMonth=parseInt(month);var outputDay=1;var hours,minutes;if(!time)
{time=this.defaultHours+":"+this.defaultMinutes;hours=this.defaultHours;minutes=this.defaultMinutes;}
else
{hours=this.fillLeading(time.substring(0,time.indexOf(":")));minutes=this.fillLeading(time.substring(time.indexOf(":")+1,time.length));}
var oCurrentMonth=new Date(year,month-1,1);var weekDay=oCurrentMonth.getDay();var dayDiff=0;if(weekDay>=startDay)
{dayDiff=weekDay-startDay;}
else
{dayDiff=7-startDay+weekDay;}
if(dayDiff>0)
{outputMonth=outputMonth-1;if(outputMonth<1)
{outputMonth=12;outputYear=parseInt(outputYear)-1;}
outputDay=this.daysInMonth[outputMonth]-dayDiff+1;}
var nextMonth=parseInt(month)+1;var nextMonthYear=year;if(nextMonth>12)
{nextMonth=1;nextMonthYear=parseInt(nextMonthYear)+1;}
var lastMonth=month-1;var lastMonthYear=year;if(lastMonth<1)
{lastMonth=12;lastMonthYear=parseInt(lastMonthYear)-1;}
content.push('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\n');content.push('<html><head><META http-equiv="Content-Type" content="text/html"><title></title>\n');content.push('<META http-equiv="expires" content="0">\n');content.push('<link href="css/'+oHtmlRoot.oUp.oFormatInfo.layoutDir+'/application.css" type="text/css" rel="stylesheet">\n');content.push('<link href="css/calendar.css" type="text/css" rel="stylesheet">\n');content.push('<script charset="UTF-8" src="include/common.js" type="text/javascript"></script>\n');content.push('<script charset="UTF-8" src="include/object.js" type="text/javascript"></script>\n');content.push('</head>\n');content.push('<body class="SCUP_NavCal_PickerWindow_normal" onload="self.oUp.resizeByContent();">\n');content.push('<script type="text/javascript">\n');content.push('try{var test=opener.oUp;}catch(e){alert("'+self.oUp.oMessage.WARNING_PERMISSION_DENIED_PAGE+'");self.close();}');content.push('function getHtmlRoot(win){if(win.name=="wndRoot"){return win;}else if(win.opener && win.opener.oUp){return getHtmlRoot(win.opener);}else if(win==top){return win;}else if(win.parent && win.parent!=win){return getHtmlRoot(win.parent);}else{return null;}}');content.push('var oHtmlRoot = getHtmlRoot(self);');content.push('function getTimeValue(){var oTime=document.getElementById("ID_Time");var value="";for(var j=0;j < oTime.options.length;j++)');content.push('{if(oTime.options[j].selected){value = oTime.options[j].value;break;}}return value;}');content.push('function getRef(strHtmlEl,oTargDoc){if(!strHtmlEl || !oTargDoc || !oTargDoc.getElementById(strHtmlEl)){return false;};return oTargDoc.getElementById(strHtmlEl);}');content.push('if(oHtmlRoot && oHtmlRoot.oUp && oHtmlRoot.oUp.oRegistry.oPopUpReg[self.name]){oWndDatePicker = oHtmlRoot.oUp.oRegistry.oPopUpReg[self.name];oWndDatePicker.oHtml=self;oWndDatePicker.oHtml.oUp=oWndDatePicker}');content.push('else{oWndDatePicker = new upPopUpWindow();oWndDatePicker.setRefToRootWin(oHtmlRoot.oUp);}\n');content.push('</script>\n');content.push('<table border="0" cellspacing="0" cellpadding="0" style="height:100%;width:100%;"><tr><td>\n');content.push('<table class="SCUP_NavCal_CalContainer_normal" style="height:100%;width:100%;" border="0" cellspacing="0" cellpadding="0">\n');content.push('<tr><td colspan="8" class="SCUP_NavCal_MainHeaderBG_normal">\n');content.push('<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>\n');content.push('<td width="1"><a class="SCUP_NavCal_MainHeaderLink" href="javascript:if(getRef(\''+this.oHtml.id+'\',oTargDoc))getRef(\''+this.oHtml.id+'\',oTargDoc).oUp.refreshDatePicker('+lastMonthYear+','+parseInt(lastMonth)+','+day);if(this.upType=="upDateTimeControl")
{content.push(',getTimeValue()');}
content.push(');">&#160;&lt;</a></td>\n');content.push('<td class="SCUP_NavCal_MainHeaderText_normal" width="100%">'+this.monthNames[parseInt(month)-parseInt(1)]+'&#160;'+year+'</td>\n');content.push('<td width="1"><a class="SCUP_NavCal_MainHeaderLink" href="javascript:if(getRef(\''+this.oHtml.id+'\',oTargDoc))getRef(\''+this.oHtml.id+'\',oTargDoc).oUp.refreshDatePicker('+nextMonthYear+','+parseInt(nextMonth)+','+day);if(this.upType=="upDateTimeControl")
{content.push(',getTimeValue()');}
content.push(');">&gt;&#160;</a></td>\n');content.push('</tr></table></td></tr>\n');content.push('<tr>\n');content.push('<td class="SCUP_NavCal_SubHeaderBG_normal"><img alt="" src="images/1px.gif" width="1" height="1" /></td>\n');content.push('<td class="SCUP_NavCal_SubHeaderBG_normal"><span class="SCUP_NavCal_SubHeaderText_normal">'+this.dayHeaders[(7+startDay)%7]+'</span></td>\n');content.push('<td class="SCUP_NavCal_SubHeaderBG_normal"><span class="SCUP_NavCal_SubHeaderText_normal">'+this.dayHeaders[(7+startDay+1)%7]+'</span></td>\n');content.push('<td class="SCUP_NavCal_SubHeaderBG_normal"><span class="SCUP_NavCal_SubHeaderText_normal">'+this.dayHeaders[(7+startDay+2)%7]+'</span></td>\n');content.push('<td class="SCUP_NavCal_SubHeaderBG_normal"><span class="SCUP_NavCal_SubHeaderText_normal">'+this.dayHeaders[(7+startDay+3)%7]+'</span></td>\n');content.push('<td class="SCUP_NavCal_SubHeaderBG_normal"><span class="SCUP_NavCal_SubHeaderText_normal">'+this.dayHeaders[(7+startDay+4)%7]+'</span></td>\n');content.push('<td class="SCUP_NavCal_SubHeaderBG_normal"><span class="SCUP_NavCal_SubHeaderText_normal">'+this.dayHeaders[(7+startDay+5)%7]+'</span></td>\n');content.push('<td class="SCUP_NavCal_SubHeaderBG_normal"><span class="SCUP_NavCal_SubHeaderText_normal">'+this.dayHeaders[(7+startDay+6)%7]+'</span></td>\n');content.push('</tr>\n');for(var row=1;row<=6;row++)
{var oActDate=new Date(outputYear,outputMonth-1,outputDay);var weekOfYear=this.getWeekOfYear(oActDate);content.push('<tr valign="top" >\n');content.push('<td class="SCUP_NavCal_RowHeaderBG_normal"><span class="SCUP_NavCal_RowHeaderText_normal">'+weekOfYear+'</span></td>\n');for(var col=1;col<=7;col++)
{var oActDate=new Date(outputYear,outputMonth-1,outputDay);if(outputMonth==oDateToday.getMonth()+1&&outputDay==oDateToday.getDate()&&outputYear==oDateToday.getFullYear())
{CellClass="SCUP_NavCal_CellBG_current";}
else if(outputMonth==preSelMonth&&outputDay==preSelDay&&outputYear==preSelYear)
{CellClass="SCUP_NavCal_CellBG_selected";}
else
{CellClass="SCUP_NavCal_CellBG_normal";}
if((oActDate.getDay()=="0"||oActDate.getDay()=="6")&&(outputMonth==preSelMonth&&outputDay==preSelDay&&outputYear==preSelYear))
{ContentClass="SCUP_NavCal_CellTextWeekend";}
else if((oActDate.getDay()=="0"||oActDate.getDay()=="6")&&outputMonth==month)
{ContentClass="SCUP_NavCal_CellTextWeekend";}
else if(outputMonth==preSelMonth&&outputDay==preSelDay&&outputYear==preSelYear)
{ContentClass="SCUP_NavCal_CellTextNormal";}
else if(outputMonth==month)
{ContentClass="SCUP_NavCal_CellTextNormal";}
else
{ContentClass="SCUP_NavCal_CellTextOtherMonth";}
var oActDate=new Date(outputYear,outputMonth-1,outputDay);var strPrintDay="";if(outputDay<10)
{strPrintDay+=outputDay;}
else
{strPrintDay+=outputDay;}
if(this.aWeekDaysToChoose[oActDate.getDay()])
{content.push('<td class="'+CellClass+'"><a class="'+ContentClass+'" href="#" ');if(this.upType=="upDateTimeControl")
{content.push(' onclick="getRef(\''+this.oHtml.id+'\',oTargDoc).oUp.refreshDatePicker('+outputYear+','+outputMonth+','+outputDay+',getTimeValue());');content.push('return false;">');}
else
{content.push(' onclick="getRef(\''+this.oHtml.id+'\',oTargDoc).oUp.setValueByDatePicker('+outputDay+','+outputMonth+','+outputYear+');');content.push(this.writeClose());content.push('return false;">');}
content.push(strPrintDay+'</a></td>\n');}
else
{content.push('<td class="'+CellClass+'"><span class="'+ContentClass+'">'+strPrintDay+'</span></td>\n');}
outputDay++;if(outputDay>this.daysInMonth[outputMonth])
{outputDay=1;outputMonth=parseInt(outputMonth)+1;}
if(outputMonth>12)
{outputMonth=1;outputYear=parseInt(outputYear)+1;}}
content.push('</tr>\n');}
content.push('<tr><td class="SCUP_NavCal_TodayLinkBG_normal" colspan="8">');content.push('<a class="SCUP_NavCal_TodayLink" href="#"');if(this.upType=="upDateTimeControl")
{content.push(' onclick="getRef(\''+this.oHtml.id+'\',oTargDoc).oUp.refreshDatePicker('+oDateToday.getFullYear()+','+(oDateToday.getMonth()+1)+','+oDateToday.getDate()+',getTimeValue());');content.push('return false;">');}
else
{content.push(' onclick="getRef(\''+this.oHtml.id+'\',oTargDoc).oUp.setValueByDatePicker('+oDateToday.getDate()+','+(oDateToday.getMonth()+1)+','+oDateToday.getFullYear());content.push(');');content.push(this.writeClose());content.push('return false;">');}
content.push(self.oUp.oMessage.CAL_TODAY+'</a>');content.push('</td></tr>\n');if(this.upType=="upDateTimeControl")
{content.push('<tr><td class="SCUP_NavCal_TimeTodayContainer" colspan="8"><table width="100%" cellspacing="0" cellpadding="0" border="0"><tr>\n');content.push('<td width="22%" class="SCUP_NavCal_TimeLabel_normal">'+self.oUp.oMessage.CAL_TIME_OF_DAY+'</td>');content.push('<td width="56%" align="center"><input type="hidden" id="ID_Year" value="'+year+'" /><input type="hidden" id="ID_Month" value="'+month+'" /><input type="hidden" id="ID_Day" value="'+day+'" />');content.push(this.writeTimeDropdown(hours,minutes));content.push('</td>\n');content.push('<td width="22%"><img alt="" src="images/1px.gif" width="1" height="1" /></td></tr></table></td></tr>');}
content.push('</table></td></tr>\n');if(this.upType=="upDateTimeControl")
{content.push('<tr><td class="SCUP_NavCal_ButtonsBG_normal" style="white-space:nowrap;">');content.push('<table cellpadding="0" cellspacing="0"><tr><td>');content.push('<button value="'+self.oUp.oMessage.CAL_OK+'" name="ok" class="SCUP_Button_Standard_normal" style="width:60px;" onclick="if(getRef(\''+this.oHtml.id+'\',oTargDoc))getRef(\''+this.oHtml.id+'\',oTargDoc).oUp.setValueByDatePicker(document.getElementById(\'ID_Day\').value,document.getElementById(\'ID_Month\').value,document.getElementById(\'ID_Year\').value');content.push(',getTimeValue());');content.push(this.writeClose());content.push('return false;">'+self.oUp.oMessage.CAL_OK+'</button>');content.push('</td><td style="padding-left:5px;">');content.push('<button value="'+self.oUp.oMessage.CAL_CANCEL+'" name="ok" class="SCUP_Button_Standard_normal" style="width:80px;"');content.push(' onclick="');content.push(this.writeClose());content.push('return false;">'+self.oUp.oMessage.CAL_CANCEL+'</button>');content.push('</td><tr></table>');content.push('</td></tr>\n');}
content.push('</table></body></html>\n');return content.join("");}
function getTimeValue()
{var oTime=document.getElementById("ID_Time");var value="";for(var j=0;j<oTime.options.length;j++)
{if(oTime.options[j].selected)
{value=oTime.options[j].value;break;}}
return value;}
function DateTimeInitDateObject()
{var oDate=new Date();oDate.setHours('00');oDate.setMinutes('00');oDate.setSeconds('00');oDate.setMilliseconds('00');oDate.setFullYear('1970');oDate.setMonth('0');oDate.setDate('1');return oDate;}
function DateTimeSetDateObjectFromLocalDate(oDate,strDate)
{if(arguments.length<2)
{return false;}
oDate.setFullYear(this.getDatePart(strDate,"y"));oDate.setMonth(this.getDatePart(strDate,"M")-1);oDate.setDate(this.getDatePart(strDate,"d"));return oDate;}
function DateTimeSetDateObjectFromLocalTime(oDate,strTime)
{if(arguments.length<2)
{return false;}
oDate.setHours(this.getTimePart(strTime,"h"));oDate.setMinutes(this.getTimePart(strTime,"m"));oDate.setSeconds(this.getTimePart(strTime,"s"));return oDate;}
function DateTimeGetDatePart(strDate,partSymbol)
{if(arguments.length<2)
{return strDate;}
var partString="";aDate=Helper.trim(strDate).split(this.dateSep);var aDateFormatTemp=this.dateFormat.split(this.dateSep);var aDateFormat=new Array();for(var i=0;i<aDateFormatTemp.length;i++)
{aDateFormat[aDateFormatTemp[i].substring(0,1)]=i;}
partString=aDate[aDateFormat[partSymbol]];return parseInt(partString,10);}
function DateTimeGetTimePart(strTime,partSymbol)
{if(arguments.length<2)
{return strTime;}
var dayTimeAdd=0;var seconds,minutes,hours,timeMarker,result,reg,output;var dtCurrDate=new Date();reg=new RegExp(this.timePattern,"i")
result=Helper.trim(strTime).match(reg);if(!result)
{output=strTime;}
if(partSymbol=="h")
{hour=parseInt(Helper.trim(result[1]),10);if(this.bSeconds)
{timeMarker=result[7];}
else
{timeMarker=result[5];}
if(timeMarker!=null)
{timeMarker=timeMarker.toLowerCase();}
else
{timeMarker="";}
if(this.bHours24!=1)
{if(timeMarker&&(timeMarker=="pm"||timeMarker=="PM")&&hour=="12")
{hour=12;}
else if(timeMarker&&(timeMarker=="pm"||timeMarker=="PM"))
{hour=parseInt(hour)
hour+=12;}
if(timeMarker&&(timeMarker=="am"||timeMarker=="AM")&&hour=="12")
{hour=0;}}
if(isNaN(hour)||!this.isIntegerInRange(hour,0,23))
{hour=dtCurrDate.getHours();}
output=hour;}
if(partSymbol=="m")
{minutes=parseInt(Helper.trim(result[3]),10);if(isNaN(minutes)||!this.isIntegerInRange(minutes,0,59))
{minutes="00";}
output=minutes;}
if(partSymbol=="s")
{if(this.bSeconds)
{seconds=parseInt(Helper.trim(result[5]),10);}
if(isNaN(seconds)||!this.isIntegerInRange(seconds,0,59))
{seconds="00";}
output=seconds;}
return parseInt(output,10);}
function DateTimeToLocalDateString(oDate)
{var dateSep=this.dateSep;var df=this.dateFormat;var output="";aDf=df.split(dateSep);for(i=0;i<aDf.length;i++)
{if(aDf[i]=="dd")
{output=output+this.fillLeading(oDate.getDate());}
else if(aDf[i]=="yyyy")
{output=output+oDate.getFullYear();}
else if(aDf[i]=="MM")
{output=output+this.fillLeading(oDate.getMonth()+1);}
if(i<aDf.length-1)
{output=output+dateSep;}}
return output;}
function DateTimeToISODateString(oDate)
{if(!oDate)return"";return oDate.getFullYear()+"-"+this.fillLeading(oDate.getMonth()+1)+"-"+this.fillLeading(oDate.getDate());}
function DateTimeToLocalHourMinString(oDate)
{var output="";var marker="";this.setDateTimeProps();oDateTemp=new Date();oDateTemp.setFullYear(1970);oDateTemp.setMonth(0);oDateTemp.setDate(1);oDateTemp.setUTCHours(oDate.getUTCHours());oDateTemp.setUTCMinutes(oDate.getUTCMinutes());oDateTemp.setUTCSeconds(oDate.getUTCSeconds());oDateTemp.setTime(Date.parse(oDate)-Date.parse(oDateTemp));var hours=Math.round(oDateTemp.getTime()/(1000*60*60));hours=parseInt(hours,10)+oDate.getUTCHours();output=hours;output=output+this.aTimeSep[0]+this.fillLeading(oDate.getUTCMinutes());if(this.bSeconds)
{output=output+this.aTimeSep[1]+this.fillLeading(oDate.getUTCSeconds());}
return output;}
function DateTimeToISODateTimeString(oDate)
{if(!oDate)return"";var output=this.toISODateString(oDate)+" "+this.toISOTimeString(oDate);return output;}
function DateTimeToLocalDurationString(oDate)
{var output="";var value="";var marker="";this.setDateTimeProps();oDateTemp=new Date();oDateTemp.setFullYear(1970);oDateTemp.setMonth(0);oDateTemp.setDate(1);oDateTemp.setUTCHours(oDate.getUTCHours());oDateTemp.setUTCMinutes(oDate.getUTCMinutes());oDateTemp.setUTCSeconds(oDate.getUTCSeconds());oDateTemp.setTime(Date.parse(oDate)-Date.parse(oDateTemp));var days=Math.round(oDateTemp.getTime()/(1000*60*60*24));value=days;if(value>0)
{output=output+value+" ";if(value==1)
{marker=self.oUp.oMessage.CAL_DAY;}
else
{marker=self.oUp.oMessage.CAL_DAYS;}
output=output+marker+"  ";}
value=oDate.getUTCHours();if(value>0)
{output=output+value+" ";if(value==1)
{marker=self.oUp.oMessage.CAL_HOUR;}
else
{marker=self.oUp.oMessage.CAL_HOURS;}
output=output+marker+"  ";}
value=oDate.getMinutes();if(value>0)
{output=output+value+" ";if(value==1)
{marker=self.oUp.oMessage.CAL_MINUTE;}
else
{marker=self.oUp.oMessage.CAL_MINUTES;}
output=output+marker+"  ";}
value=oDate.getSeconds();if(value>0)
{output=output+value+" ";if(value==1)
{marker=self.oUp.oMessage.CAL_SECOND;}
else
{marker=self.oUp.oMessage.CAL_SECONDS;}
output=output+marker+"  ";}
return output;}
function DateTimeToLocalTimeString(oDate)
{var output="";output=this.getTimeString(oDate.getHours(),this.fillLeading(oDate.getMinutes()),this.fillLeading(oDate.getSeconds()));return output;}
function DateTimeToISOTimeString(oDate)
{if(!oDate)return"";return this.fillLeading(oDate.getHours())+":"+this.fillLeading(oDate.getMinutes())+":"+this.fillLeading(oDate.getSeconds());}
function DateTimeGetTimeString(hour,minutes,seconds,p_strTimeMarker)
{var timeString="";var timeMarker="";this.bFillHours=this.getbFillHours();this.aTimeSep=this.getTimeSep();if(this.bHours24==0)
{if(!p_strTimeMarker)
{if(hour>11)
{timeMarker="PM";}
else
{timeMarker="AM";}}
else
{timeMarker=p_strTimeMarker;}
if(hour==0)
{hour=12;}
if(hour>12)
{hour=hour-12;}}
if(this.bFillHours)
{timeString=Helper.trim(this.fillLeading(hour));}
else
{timeString=Helper.trim(hour);}
timeString=timeString+this.aTimeSep[0]+this.fillLeading(minutes);var ind=1;if(this.bSeconds)
{timeString=timeString+this.aTimeSep[ind]+Helper.trim(this.fillLeading(seconds));ind++;}
if(this.bTimeMarker)
{timeString=timeString+this.aTimeSep[ind]+timeMarker;}
return timeString;}
function DateTimeGetTimeSep()
{var startPos=0;var strLegalTimeSymbols="Hhmsa";var timeFormat=this.timeFormat;if(typeof timeFormat=="undefined")
timeFormat=self.oUp.oFormatInfo.timeFormat;var aTimeSep=new Array();var j=0;for(var i=0;i<timeFormat.length;i++)
{if(strLegalTimeSymbols.indexOf(timeFormat.substr(i,1))>-1)
{if(i>startPos)
{aTimeSep[j]=timeFormat.substring(startPos,i);j++;startPos=i+1;}
else
{startPos++;}}}
return aTimeSep;}
function DateTimeGetbSeconds()
{var format=this.timeFormat;var bSeconds=false;if(format.indexOf('ss')>-1)
{bSeconds=true;}
return bSeconds;}
function DateTimeGetbFillHours()
{var format=this.timeFormat;var bFillHours=false;if(format.toLowerCase().indexOf('hh')>-1)
{bFillHours=true;}
return bFillHours;}
function DateTimeGetTimeMarker()
{var format=this.timeFormat;var bTimeMarker=false;if(format.indexOf('aa')>-1||format.indexOf('a')>-1)
{bTimeMarker=true;}
return bTimeMarker;}
function DateTimeGetbHours24()
{var format=this.timeFormat;var bHours24=1;if(format.indexOf('h')>-1)
{bHours24=0;}
else
{bHours24=1;}
return bHours24;}
function DateTimeValidateDate(strDate)
{var day,month,year;var dtCurrDate=new Date();var dateSep=this.dateSep;var newValue="";strDate=Helper.trim(new String(strDate));if(strDate.indexOf(dateSep)>-1)
{day=this.getDatePart(strDate,"d");month=this.getDatePart(strDate,"M");year=this.getDatePart(strDate,"y");}
else if(strDate.length==State.done)
{year=strDate;}
else
{day=strDate;}
if(String(month)==String("")||isNaN(month)||!this.isMonth(month))
{month=dtCurrDate.getMonth()+1;}
if(String(day)==String("")||isNaN(day)||!this.isDateInMonth(day,month,year)||day<1)
{day=dtCurrDate.getDate();}
if(String(year)==String("")||isNaN(year)||year>9999)
{year=dtCurrDate.getFullYear();}
else
{if(year<100&&year>30)
{year=1900+year;}
if(year<=30)
{year=2000+year;}}
if(month==2&&day>this.daysInFebruary(year))
{day=this.daysInFebruary(year);}
var oDate=this.initDateObject();oDate.setFullYear(year);oDate.setMonth(parseInt(month,10)-1);oDate.setDate(day);newValue=this.toLocalDateString(oDate);return newValue;}
function DateTimeValidateDateValue(date)
{var day,month,year;var bNotInRange=false;var dateInRange="between";var input=Helper.trim(date);day=this.getDatePart(input,"d");month=this.getDatePart(input,"M");year=this.getDatePart(input,"y");var dateInt=parseInt(this.fillLeading(year).toString()+this.fillLeading(month).toString()+this.fillLeading(day).toString());var regMinMax=new RegExp("^\\s*((\\d{1,4})(\\-)(\\d{1,2})(\\-)(\\d{1,2}) ?){1}\\s*((\\d{1,2})?(:)?(\\d{1,2})?(:)?(\\d{1,2})? *((A|P)M)?)?\\s*$")
var min=Helper.trim(this.min);if(min!="")
{if(this.utc&&this.utc=='1')
{var oDateMin=this.setUTCDateObjectFromISO(min);}
else
{var oDateMin=this.setDateObjectFromISO(min);}
var dayMin=this.fillLeading(oDateMin.getDate());var monthMin=this.fillLeading(oDateMin.getMonth()+1);var yearMin=this.fillLeading(oDateMin.getFullYear());dateMinInt=parseInt(yearMin.toString()+monthMin.toString()+dayMin.toString());}
var max=Helper.trim(this.max);if(max!="")
{if(this.utc&&this.utc=='1')
{var oDateMax=this.setUTCDateObjectFromISO(max);}
else
{var oDateMax=this.setDateObjectFromISO(max);}
var dayMax=this.fillLeading(oDateMax.getDate());var monthMax=this.fillLeading(oDateMax.getMonth()+1);var yearMax=this.fillLeading(oDateMax.getFullYear());dateMaxInt=parseInt(this.fillLeading(yearMax).toString()+this.fillLeading(monthMax).toString()+this.fillLeading(dayMax).toString());}
if((max!=""&&isNaN(dateMaxInt))||(min!=""&&isNaN(dateMinInt)))
{return false;}
if(max!=""&&dateInt>dateMaxInt)
{bNotInRange=true;}
if(max!=""&&dateInt==dateMaxInt)
{dateInRange="max";}
if(min!=""&&dateInt<dateMinInt)
{bNotInRange=true;}
if(min!=""&&dateInt==dateMinInt)
{dateInRange="min";}
if(max!=""&&dateInt==dateMaxInt&&min!=""&&dateInt==dateMinInt)
{dateInRange="minmax";}
if(bNotInRange)
{return false;}
return dateInRange;}
function DateTimeValidateTimeValue(strTime,what)
{var timeMarker;if(!strTime)
{return false;}
if(!what)
{what="range";}
switch(what)
{case"min":var bCheckMax=false;var bCheckMin=true;break;case"max":var bCheckMax=true;var bCheckMin=false;break;default:var bCheckMin=true;var bCheckMax=true;break;}
var newValue="";var input=Helper.trim(strTime);var seconds="";var bNotInRange=false;var reg=new RegExp(this.timePattern,"i")
var result=input.match(reg);if(!result)
{return false;}
var hour=parseInt(Helper.trim(result[1]),10);var minutes=parseInt(Helper.trim(result[3]),10);if(this.bSeconds)
{seconds=parseInt(Helper.trim(result[5]),10);}
if(this.bTimeMarker)
{if(this.bSeconds&&result[7])
{timeMarker=result[7].toLowerCase();}
else if(result[5])
{timeMarker=result[5].toLowerCase();}}
if(this.bHours24!=1)
{if(timeMarker&&(timeMarker=="pm"||timeMarker=="PM"))
{hour=parseInt(hour);hour+=12;}}
var timeInt=this.fillLeading(hour)+this.fillLeading(minutes);if(this.bSeconds)
{timeInt=timeInt+this.fillLeading(seconds);}
else
{timeInt=timeInt+'00';}
timeInt=parseInt(Helper.trim(timeInt),10);var min=Helper.trim(this.min);if(min!="")
{if(this.utc&&this.utc=='1')
{var oTimeMin=this.setUTCDateObjectFromISO(min);}
else
{var oTimeMin=this.setDateObjectFromISO(min);}
var hourMin=this.fillLeading(oTimeMin.getHours());var minutesMin=this.fillLeading(oTimeMin.getMinutes());var secondsMin=this.fillLeading(oTimeMin.getSeconds());timeMinInt=parseInt(hourMin.toString()+minutesMin.toString()+secondsMin.toString(),10);}
var max=Helper.trim(this.max);if(max!="")
{if(this.utc&&this.utc=='1')
{var oTimeMax=this.setUTCDateObjectFromISO(max);}
else
{var oTimeMax=this.setDateObjectFromISO(max);}
var hourMax=this.fillLeading(oTimeMax.getHours());var minutesMax=this.fillLeading(oTimeMax.getMinutes());var secondsMax=this.fillLeading(oTimeMax.getSeconds());timeMaxInt=parseInt(hourMax.toString()+minutesMax.toString()+secondsMax.toString(),10);}
if(max!=""&&!isNaN(timeMaxInt)&&bCheckMax&&timeInt>timeMaxInt)
{bNotInRange=true;}
if(min!=""&&!isNaN(timeMinInt)&&bCheckMin&&timeInt<timeMinInt)
{bNotInRange=true;}
if(bNotInRange)
{return false;}
return true;}
function DateTimeValidateTime(time)
{var dayTimeAdd=0;var newValue="";var seconds="";var dtCurrDate=new Date();var input=new String(time);input=Helper.trim(input);var timeMarker;var reg=new RegExp(this.timePattern,"i")
var result=input.match(reg);if(!result)
{return this.getCurrTime();}
var hour=parseInt(Helper.trim(result[1]),10);var minutes=parseInt(Helper.trim(result[3]),10);if(this.bSeconds)
{seconds=parseInt(Helper.trim(result[5]),10);timeMarker=result[7];}
else
{var timeMarker=result[5];}
if(timeMarker!=null)
{timeMarker=timeMarker.toLowerCase();}
else
{timeMarker="";}
if(isNaN(hour)||!this.isIntegerInRange(hour,0,23))
{hour=dtCurrDate.getHours();}
if(this.bHours24!=1)
{if((timeMarker=="pm"||timeMarker=="PM")&&hour=="12")
{hour=12;}
else if(timeMarker=="pm"||timeMarker=="PM")
{hour=parseInt(hour)
hour+=12;}
if((timeMarker=="am"||timeMarker=="AM")&&hour=="12")
{hour=0;}}
if(isNaN(minutes)||!this.isIntegerInRange(minutes,0,59))
{minutes="00";}
if(this.bSeconds&&(isNaN(seconds)||!this.isIntegerInRange(seconds,0,59)))
{seconds="00";}
var oDate=this.initDateObject();oDate.setHours(hour);oDate.setMinutes(minutes);oDate.setSeconds(seconds);newValue=this.toLocalTimeString(oDate);return newValue;}
function DateTimeValidateFromIso(strDate,bReturn)
{this.setDateTimeProps();var day,month,year;var dtCurrDate=new Date();var dateSep="-";this.aTimeSep=this.getTimeSep();var newValue="";strDate=Helper.trim(new String(strDate));var day=strDate.substring(8,10);var month=strDate.substring(5,7);var year=strDate.substring(0,4);var hour=strDate.substring(11,13);var minutes=strDate.substring(14,16);var seconds=strDate.substring(17,19);if(month==""||isNaN(month)||!this.isMonth(month))
{month=dtCurrDate.getMonth()+1;}
if(day==""||isNaN(day)||!this.isDateInMonth(day,month,year)||day<1)
{day=dtCurrDate.getDate();}
if(String(year)==String("")||isNaN(year)||year>9999)
{year=dtCurrDate.getFullYear();}
else
{if(year<100&&year>30)
{year=1900+year;}
if(year<=30)
{year=2000+year;}}
if(month==2&&day>this.daysInFebruary(year))
{day=this.daysInFebruary(year);}
var oDate=this.initDateObject();oDate.setFullYear(year);oDate.setMonth(parseInt(month,10)-1);oDate.setDate(day);newDateValue=this.toLocalDateString(oDate);var oDate=this.initDateObject();oDate.setHours(hour);oDate.setMinutes(minutes);oDate.setSeconds(seconds);newTimeValue=this.toLocalTimeString(oDate);if(bReturn)
return newDateValue+' '+newTimeValue;else
Browser.setValue(this,newDateValue+' '+newTimeValue);}
function TimeValidateFromIso(strDate,bReturn)
{this.setTimeProps();var day,month,year;var dtCurrDate=new Date();var dateSep="-";this.aTimeSep=this.getTimeSep();var newValue="";strDate=Helper.trim(new String(strDate));var hour=strDate.substring(11,13);var minutes=strDate.substring(14,16);var seconds=strDate.substring(17,19);var oDate=this.initDateObject();oDate.setHours(hour);oDate.setMinutes(minutes);oDate.setSeconds(seconds);newTimeValue=this.toLocalTimeString(oDate);if(bReturn)
return newTimeValue;else
Browser.setValue(this,newTimeValue);}
function DateValidateFromIso(strDate,bReturn)
{this.setDateProps();var day,month,year;var dtCurrDate=new Date();var dateSep="-";this.aTimeSep=this.getTimeSep();var newValue="";strDate=Helper.trim(new String(strDate));var day=strDate.substring(8,10);var month=strDate.substring(5,7);var year=strDate.substring(0,4);if(month==""||isNaN(month)||!this.isMonth(month))
{month=dtCurrDate.getMonth()+1;}
if(day==""||isNaN(day)||!this.isDateInMonth(day,month,year)||day<1)
{day=dtCurrDate.getDate();}
if(String(year)==String("")||isNaN(year)||year>9999)
{year=dtCurrDate.getFullYear();}
else
{if(year<100&&year>30)
{year=1900+year;}
if(year<=30)
{year=2000+year;}}
if(month==2&&day>this.daysInFebruary(year))
{day=this.daysInFebruary(year);}
var oDate=this.initDateObject();oDate.setFullYear(year);oDate.setMonth(parseInt(month,10)-1);oDate.setDate(day);newDateValue=this.toLocalDateString(oDate);if(bReturn)
return newDateValue;else
Browser.setValue(this,newDateValue);}
function DateTimeGetCurrTime()
{var dateTime=new Date();var hour=this.fillLeading(dateTime.getHours());var minutes=this.fillLeading(dateTime.getMinutes());var seconds=this.fillLeading(dateTime.getSeconds());time=this.getTimeString(hour,minutes,seconds);return time;}
function DateTimeGetCurrDate()
{var oDate=new Date();oDate.setFullYear(oDate.getFullYear());oDate.setMonth(oDate.getMonth());oDate.setDate(oDate.getDate());newValue=this.toLocalDateString(oDate);return newValue;}
function DateTimeGetCurrDateTime()
{this.setDateTimeProps();this.oHtml.value=this.getCurrDate()+' '+this.getCurrTime();}
function TimeSetCurrent()
{this.oHtml.value=this.getCurrTime();}
function DateSetCurrent()
{this.oHtml.value=this.getCurrDate();}
function DateTimeSetCurrent()
{this.setDateTimeProps();newValue=this.getCurrDate()+' '+this.getCurrTime();this.oHtml.value=newValue;}
function DateTimeIsDateInMonth(day,month,year)
{if(String(year)==String(""))
{return false;}
var daysInMonth=Helper.makeArray(12);daysInMonth[1]=31;daysInMonth[2]=29;daysInMonth[3]=31;daysInMonth[4]=30;daysInMonth[5]=31;daysInMonth[6]=30;daysInMonth[7]=31;daysInMonth[8]=31;daysInMonth[9]=30;daysInMonth[10]=31;daysInMonth[11]=30;daysInMonth[12]=31;var intDay=parseInt(day,10);var intMonth=parseInt(month,10);var intYear=parseInt(year,10);if(intDay>daysInMonth[intMonth])
{return false;}
if((intMonth==2)&&(intDay>this.daysInFebruary(intYear)))
{return false;}
return true;}
function DateTimeDaysInFebruary(year)
{if(((year%4==0)&&(!(year%100==0))||(year%400==0)))
{return 29;}
else
{return 28;}}
function DateTimeIsIntegerInRange(s,a,b)
{if(!Helper.isInteger(s))
{return false;}
var num=parseInt(s,10);return((num>=a)&&(num<=b));}
function DateTimeIsMonth(s)
{return this.isIntegerInRange(s,1,12);}
function upDateTimeControl()
{this.upType="upDateTimeControl";this.dateSep=self.oUp.oFormatInfo.dateSep;this.dateFormat=self.oUp.oFormatInfo.dateFormat;this.timeFormat=self.oUp.oFormatInfo.timeFormat;this.getIsolatedDateTime=DateTimeGetIsolatedDateTime;this.validateValue=DateTimeValidateValue;this.validateValueDo=DateTimeValidateValueDo;this.format=DateTimeFormat;this.setDateTimeProps=DateTimeSetDateTimeProps;this.validateInput=DateTimeValidateInput;this.toLocalFormat=DateTimeToLocalFormat;this.setDateObjectFromLocal=DateTimeSetDateObjectFromLocal;this.setDateObjectFromISO=DateTimeSetDateObjectFromISO;this.setUTCDateObjectFromISO=DateTimeSetUTCDateObjectFromISO;this.validateFromIso=DateTimeValidateFromIso;this.toWsInputString=DateTimeToWsInputString;this.getContent=DateTimeGetContent;this.refreshDatePicker=DateTimeRefreshDatePicker;this.setValueByDatePicker=DateTimeSetValueByDatePicker;this.setPickerSize=DateTimeSetPickerSize;this.writeTimeDropdown=DateTimeWriteTimeDropdown;this.bUsed=false;this.oActionControl=null;this.timeInterval=30;this.defaultHours="12";this.defaultMinutes="00";this.bToolTipPopup=true;}
upDateTimeControl.prototype=new upDateTimeMainControl();function DateTimeToWsInputString(p_strValue)
{var oDate=this.setDateObjectFromLocal(p_strValue);return this.toISODateString(oDate)+"T"+this.toISOTimeString(oDate);}
function DateTimeSetDateObjectFromLocal(input)
{if(input=="")return null;this.setDateTimeProps();var oDate=this.initDateObject();var aDateTime=this.getIsolatedDateTime(input);if(!aDateTime)
{return false;}
if(aDateTime[0])
{oDate=this.setDateObjectFromLocalDate(oDate,aDateTime[0]);}
if(aDateTime[1])
{oDate=this.setDateObjectFromLocalTime(oDate,aDateTime[1]);}
return oDate;}
function DateTimeSetDateObjectFromISO(input)
{var oDate=new Date();oDate.setFullYear(input.substr(0,4));oDate.setMonth(input.substr(5,2)-1);oDate.setDate(input.substr(8,2));oDate.setHours(input.substr(11,2));oDate.setMinutes(input.substr(14,2));oDate.setSeconds(input.substr(17,2));return oDate;}
function DateTimeSetUTCDateObjectFromISO(input)
{var oDate=new Date();oDate.setUTCFullYear(input.substr(0,4));oDate.setUTCMonth(input.substr(5,2)-1);oDate.setUTCDate(input.substr(8,2));oDate.setUTCHours(input.substr(11,2));oDate.setUTCMinutes(input.substr(14,2));oDate.setUTCSeconds(input.substr(17,2));return oDate;}
function DateTimeToLocalFormat(oDate)
{if(!oDate)
{return false;}
this.setDateTimeProps();var output="";var date=this.toLocalDateString(oDate);var time=this.toLocalTimeString(oDate);output=date+" "+time;return output;}
function DateTimeSetDateTimeProps()
{var df=this.dateFormat;var dateLength1=df.substring(0,df.indexOf(this.dateSep)).length;var dateLength2=df.substring(dateLength1+1,df.indexOf(this.dateSep,dateLength1+1)).length;var dateLength3=df.substring(dateLength1+dateLength2+1,df.length-1).length;this.datePattern="^(\\d{1,"+dateLength1+"})?(\\"+this.dateSep;this.datePattern=this.datePattern+")?(\\d{1,"+dateLength2;this.datePattern=this.datePattern+"})?(\\"+this.dateSep+")?(\\d{1,";this.datePattern=this.datePattern+dateLength3+"})? *$";this.aTimeSep=this.getTimeSep();this.bTimeMarker=this.getTimeMarker();this.bSeconds=this.getbSeconds();this.bHours24=this.getbHours24();this.timePattern="^(\\d{1,2})?(\\"+this.aTimeSep[0]+")?(\\d{1,2})?";var ind=1;if(this.bSeconds)
{this.timePattern=this.timePattern+"(\\"+this.aTimeSep[ind]+")?(\\d{1,2})?";ind++;}
if(this.bTimeMarker)
{this.timePattern=this.timePattern+"(\\"+this.aTimeSep[ind]+")?((A|P)M)?";}
this.timePattern=this.timePattern+" *$";this.timePatternMinMax="^\\s*((\\d{1,4})?(\\-)?(\\d{1,2})?(\\-)?(\\d{1,2}) +)?((\\d{1,2})?(:)?(\\d{1,2})?(:)?(\\d{1,2})? *((A|P)M)?)?\\s*$"}
function DateTimeValidateInput()
{this.inputLegalChars="0123456789 "+this.dateSep;this.aTimeSep=this.getTimeSep();for(i=0;i<this.aTimeSep.length;i++)
{this.inputLegalChars=this.inputLegalChars+this.aTimeSep[i];}
if(this.bTimeMarker)
{this.inputLegalChars=this.inputLegalChars+"apmAPM";}
return this.matchInput();}
function DateTimeGetIsolatedDateTime(input)
{if(!input)
{var value=new String(this.oHtml.value);}
else
{var value=input;}
var aDateTime=new Array(2);var datePattern,timePattern,dateTimePattern
this.aTimeSep=this.getTimeSep();this.bTimeMarker=this.getTimeMarker();this.bSeconds=this.getbSeconds();var df=this.dateFormat;var dateLength1=df.substring(0,df.indexOf(this.dateSep)).length;var dateLength2=df.substring(dateLength1+1,df.indexOf(this.dateSep,dateLength1+1)).length;var dateLength3=df.substring(dateLength1+dateLength2+1,df.length-1).length;datePattern="^((\\d{1,"+dateLength1+"})?(\\"+this.dateSep;datePattern=datePattern+")?(\\d{1,"+dateLength2;datePattern=datePattern+"})?(\\"+this.dateSep+")?(\\d{1,";datePattern=datePattern+dateLength3+"})?)?";timePattern="((\\d{1,2})?(\\"+this.aTimeSep[0]+")?(\\d{1,2})?";var ind=1;if(this.bSeconds)
{timePattern=timePattern+"(\\"+this.aTimeSep[ind]+")?(\\d{1,2})?";ind++;}
if(this.bTimeMarker)
{timePattern=timePattern+"(\\"+this.aTimeSep[ind]+")?((A|P)M)?";}
timePattern=timePattern+") *$";dateTimePattern=datePattern+" *"+timePattern;if(value.indexOf(" ")==-1&&value.indexOf(this.aTimeSep[0])>-1)
{var regExpTime=new RegExp(timePattern,"i");var resultTime=value.match(regExpTime);aDateTime[0]=false;if(resultTime&&resultTime[1])aDateTime[1]=resultTime[1];else aDateTime[1]=false;}
else
{var regExpDate=new RegExp(dateTimePattern,"i");var resultDateTime=value.match(regExpDate);if(resultDateTime&&resultDateTime[1])
{aDateTime[0]=resultDateTime[1];}
else
{aDateTime[1]=false;}
if(resultDateTime&&resultDateTime[7])
{aDateTime[1]=resultDateTime[7];}
else
{aDateTime[1]=false;}}
return aDateTime;}
function DateTimeValidateValue(p_strMessage)
{var l_strMessage="";if(!p_strMessage||p_strMessage=="")
{l_strMessage=self.oUp.oMessage.DATETIME_CONSTR_VALUE;}
else
{l_strMessage=p_strMessage;}
if(!this.validateValueDo())
{var l_strErrDesc=l_strMessage;var l_aSettings={"autoClose":true,"autoCloseInterval":5000,"waitOnClose":false}
oHtmlRoot.oUp.adviceShow(self.oUp.oMessage.ERROR_INPUT,l_strErrDesc,"DateTimeValidateValue",l_aSettings,self)
if(!Browser.i_safari)
{this.oHtml.focus();setTimeout("document.getElementById('"+this.oHtml.id+"').focus();",100);}
return false;}
return true;}
function DateTimeValidateValueDo()
{this.setDateTimeProps();var value=new String(Browser.getValue(this));if(value.length==0)
{return true;}
var dateInRange=false;var bIsValid=false;var aDateTime=this.getIsolatedDateTime();if(aDateTime)
{var date=Helper.trim(aDateTime[0]);dateInRange=this.validateDateValue(date);}
switch(dateInRange)
{case false:bIsValid=false;break;case"between":bIsValid=true;break;default:if(aDateTime[1])
{bIsValid=this.validateTimeValue(aDateTime[1],dateInRange);}
break;}
if(bIsValid)
{return true;}
return false;}
function DateTimeFormat(p_strMessage)
{this.setDateTimeProps();var l_strMessage="";if(!p_strMessage||p_strMessage=="")
{l_strMessage=self.oUp.oMessage.DATETIME_CONSTR_PATTERN;}
else
{l_strMessage=p_strMessage;}
var orgValue=new String(Browser.getValue(this));if(orgValue.length==0)
{return true;}
var newValue="";var aDateTime=this.getIsolatedDateTime();if(aDateTime&&aDateTime[0])
{strDate=aDateTime[0];newValue=Helper.trim(this.validateDate(strDate));}
else
{newValue=this.getCurrDate();}
if(aDateTime&&aDateTime[1])
{strTime=aDateTime[1];newValue+=' '+Helper.trim(this.validateTime(strTime));}
else
{newValue+=' '+this.getCurrTime();}
if(orgValue!=newValue)
Browser.setValue(this,newValue);return true;}
function DateTimeWriteTimeDropdown(preSelectedHours,preSelectedMinutes)
{if(arguments.length<2)
{preSelectedHours=this.defaultHours;preSelectedMinutes=this.defaultMinutes;}
var preSelectedTime=preSelectedHours+":"+preSelectedMinutes;var contentTime=[];contentTime.push('<select id="ID_Time" class="SCUP_Dropdown_Standard_normal"');if(this.bToolTipPopup)
{if(this.oActionControl&&this.oActionControl.picker)
{contentTime.push(' onfocus="var inp=document.getElementById(\''+this.oActionControl.oDate.oHtml.id+'\');if(inp && inp.oUp){inp.oUp.bDoNotClose=true;};"');contentTime.push(' onblur="var inp=document.getElementById(\''+this.oActionControl.oDate.oHtml.id+'\');if(inp && inp.oUp){inp.oUp.bDoNotClose=false;Helper.calPickerClose(inp.oUp);};"');}}
contentTime.push('>');var textH,valueH,text,value;var preSelectNextHour=false;var stepHours=1;var timeInterval;var bHours24=this.getbHours24();if(isNaN(parseInt(this.timeInterval))||this.timeInterval==0)
timeInterval=parseInt(30,10);else
timeInterval=parseInt(this.timeInterval,10);stepHours=Math.ceil(timeInterval/60);for(h=0;h<24;h=h+stepHours)
{valueH=this.fillLeading(new String(h))+":";if(bHours24=="0")
{if(h==0)
{textH="12";}
else if(h>12)
{textH=new String(parseInt(h,10)-12);}
else
textH=new String(h);}
else
{textH=new String(h);}
textH=this.fillLeading(textH)+":";for(m=0;m<60;m=m+timeInterval)
{text="";value="";value=valueH+this.fillLeading(m);text=textH+this.fillLeading(m);if(bHours24=="0")
{text=text+" ";if(h>parseInt(11,10))text+="PM";else text+="AM";}
contentTime.push('<option value="'+value+'"');if(value==preSelectedTime)
{contentTime.push(' selected ');}
else if(preSelectedHours==h&&Math.round(preSelectedMinutes-(Math.floor(preSelectedMinutes/timeInterval)*timeInterval))>0)
{if(preSelectedMinutes>(m-timeInterval/2)&&preSelectedMinutes<=(m+timeInterval/2))
contentTime.push(' selected ');else if(preSelectedMinutes>(60-timeInterval/2))
preSelectNextHour=true;}
else if(preSelectNextHour)
{contentTime.push(' selected ');preSelectNextHour=false;}
contentTime.push('>'+text+'</option>');}}
contentTime.push('</select>');return contentTime.join("");}
function DateTimeSetPickerSize(wndDatePicker)
{if(Browser.opera)wndDatePicker.setSize(220,230);else if(Browser.konqueror)wndDatePicker.setSize(200,260);else wndDatePicker.setSize(175,220);}
function DateTimeGetContent(strDate)
{var content="";if(strDate!="")
{var oDate=this.setDateObjectFromLocal(strDate);var hours=oDate.getHours();var minutes=oDate.getMinutes();var time=hours+":"+minutes;var content=this.getCalendarContent(this.getDatePart(strDate,"y"),this.getDatePart(strDate,"M"),this.getDatePart(strDate,"d"),time);}
else
content=this.getCalendarContent();return content;}
function DateTimeRefreshDatePicker(year,month,day,time)
{if(arguments.length==4)
{var content=this.getCalendarContent(year,month,day,time);}
else
{var content=this.getCalendarContent();}
if(this.bToolTipPopup)
{this.setToolTipContent(content,"refresh");}
else
{wndDatePicker.setContent(content);wndDatePicker.refresh();wndDatePicker.oHtml.oTargDoc=document;}}
function DateTimeSetValueByDatePicker(day,month,year,time)
{var oDate=new Date(year,parseInt(month,10)-1,day);oDate.setHours(time.substring(0,time.indexOf(":")));oDate.setMinutes(time.substring(time.indexOf(":")+1,time.length));oDate.setSeconds(0);Browser.setValue(this,this.toLocalFormat(oDate));if(typeof this.oHtml.onchange=="function")
this.oHtml.onchange();}
function DateSetPickerSize(wndDatePicker)
{if(Browser.opera)wndDatePicker.setSize(220,200);else wndDatePicker.setSize(175,187);}
function DateGetContent(strDate)
{var content="";if(strDate!="")
content=this.getCalendarContent(this.getDatePart(strDate,"y"),this.getDatePart(strDate,"M"),this.getDatePart(strDate,"d"));else
content=this.getCalendarContent();return content;}
function DateRefreshDatePicker(year,month,day)
{if(arguments.length==3)
{var content=this.getCalendarContent(year,month,day);}
else
{var content=this.getCalendarContent();}
if(this.bToolTipPopup)
{this.setToolTipContent(content,"refresh");}
else
{wndDatePicker.setContent(content);wndDatePicker.refresh();wndDatePicker.oHtml.oTargDoc=document;}}
function DateSetValueByDatePicker(day,month,year)
{var oDate=new Date(year,parseInt(month,10)-1,day);oDate.setHours(12);oDate.setMinutes(0);oDate.setSeconds(0);Browser.setValue(this,this.toLocalFormat(oDate));if(typeof this.oHtml.onchange=="function")
this.oHtml.onchange();}
function getRef(strHtmlEl,oTargDoc)
{if(!strHtmlEl||!oTargDoc||!oTargDoc.getElementById(strHtmlEl))
{return false;}
return oTargDoc.getElementById(strHtmlEl);}
function upDateControl()
{this.upType="upDateControl";this.dateSep=self.oUp.oFormatInfo.dateSep;this.dateFormat=self.oUp.oFormatInfo.dateFormat;this.validateValue=DateValidateValue;this.validateValueDo=DateValidateValueDo;this.format=DateFormat;this.validateInput=DateValidateInput;this.setDateProps=DateSetDateProps;this.toLocalFormat=DateToLocalFormat;this.setDateObjectFromLocal=DateSetDateObjectFromLocal;this.setDateObjectFromISO=DateSetDateObjectFromISO;this.validateFromIso=DateValidateFromIso;this.setCurrent=DateSetCurrent;this.toWsInputString=DateToWsInputString;this.getContent=DateGetContent;this.refreshDatePicker=DateRefreshDatePicker;this.setValueByDatePicker=DateSetValueByDatePicker;this.setPickerSize=DateSetPickerSize;}
upDateControl.prototype=new upDateTimeMainControl();function DateToWsInputString(p_strValue)
{var oDate=this.setDateObjectFromLocal(p_strValue);return this.toISODateString(oDate);}
function DateSetDateObjectFromLocal(strDate)
{if(strDate=="")return null;this.setDateProps();var oDate=this.initDateObject();oDate=this.setDateObjectFromLocalDate(oDate,strDate);return oDate;}
function DateSetDateObjectFromISO(strDate)
{this.setDateProps();var oDate=this.initDateObject();oDate.setFullYear(strDate.substr(0,4));oDate.setMonth(strDate.substr(5,2)-1);oDate.setDate(strDate.substr(8,2));return oDate;}
function DateToLocalFormat(oDate)
{this.setDateProps();var output="";if(oDate)
{output=this.toLocalDateString(oDate);}
return output;}
function DateSetDateProps()
{var df=this.dateFormat;var dateLength1=df.substring(0,df.indexOf(this.dateSep)).length;var dateLength2=df.substring(dateLength1+1,df.indexOf(this.dateSep,dateLength1+1)).length;var dateLength3=df.substring(dateLength1+dateLength2+1,df.length-1).length;this.datePattern="^(\\d{1,"+dateLength1+"})?(\\"+this.dateSep;this.datePattern=this.datePattern+")?(\\d{1,"+dateLength2;this.datePattern=this.datePattern+"})?(\\"+this.dateSep+")?(\\d{1,";this.datePattern=this.datePattern+dateLength3+"})? *$";}
function DateValidateInput()
{this.inputLegalChars="0123456789 "+this.dateSep;return this.matchInput();}
function DateValidateValue(p_strMessage)
{var l_strMessage="";if(!p_strMessage||p_strMessage=="")
{l_strMessage=self.oUp.oMessage.DATE_CONSTR_VALUE;}
else
{l_strMessage=p_strMessage;}
if(!this.validateValueDo())
{var l_strErrDesc=l_strMessage;var l_aSettings={"autoClose":true,"autoCloseInterval":5000,"waitOnClose":false}
oHtmlRoot.oUp.adviceShow(self.oUp.oMessage.ERROR_INPUT,l_strErrDesc,"DateValidateValue",l_aSettings,self)
if(!Browser.i_safari)
{this.oHtml.focus();setTimeout("document.getElementById('"+this.oHtml.id+"').focus();",100);}
return false;}
return true;}
function DateValidateValueDo()
{this.setDateProps();var strDate=new String(Browser.getValue(this));if(strDate.length==0)
{return true;}
if(!this.validateDateValue(strDate))
{return false;}
else
{return true;}}
function DateFormat()
{this.setDateProps();var orgDate=new String(Browser.getValue(this));if(orgDate.length==0)
{return true;}
var date=Helper.trim(this.validateDate(orgDate));if(date!=orgDate)
Browser.setValue(this,date);return true;}
function upTimeControl()
{this.upType="upTimeControl";this.timeFormat=self.oUp.oFormatInfo.timeFormat;this.validateValue=TimeValidateValue;this.validateValueDo=TimeValidateValueDo;this.format=TimeFormat;this.validateInput=TimeValidateInput;this.setTimeProps=TimeSetTimeProps;this.toLocalFormat=TimeToLocalFormat;this.setDateObjectFromLocal=TimeSetDateObjectFromLocal;this.setDateObjectFromISO=TimeSetDateObjectFromISO;this.validateFromIso=TimeValidateFromIso;this.setCurrent=TimeSetCurrent;this.toWsInputString=TimeToWsInputString;}
upTimeControl.prototype=new upDateTimeMainControl();function TimeToWsInputString(p_strValue)
{var oDate=this.setDateObjectFromLocal(p_strValue);return this.toISOTimeString(oDate);}
function TimeSetDateObjectFromLocal(strTime)
{if(strTime=="")return null;this.setTimeProps();var oDate=this.initDateObject();oDate=this.setDateObjectFromLocalTime(oDate,strTime);return oDate;}
function TimeSetDateObjectFromISO(strTime)
{var oDate=this.initDateObject();oDate.setHours(strTime.substr(11,2));oDate.setMinutes(strTime.substr(14,2));oDate.setSeconds(strTime.substr(17,2));return oDate;}
function TimeToLocalFormat(oDate)
{this.setTimeProps();var output="";if(oDate)
{output=this.toLocalTimeString(oDate);}
return output;}
function TimeSetTimeProps()
{this.aTimeSep=this.getTimeSep();this.bTimeMarker=this.getTimeMarker();this.bSeconds=this.getbSeconds();this.bHours24=this.getbHours24();this.timePattern="^(\\d{1,2})?(\\"+this.aTimeSep[0]+")?(\\d{1,2})?";var ind=1;if(this.bSeconds)
{this.timePattern=this.timePattern+"(\\"+this.aTimeSep[ind]+")?(\\d{1,2})?";ind++;}
if(this.bTimeMarker)
{this.timePattern=this.timePattern+"(\\"+this.aTimeSep[ind]+")?((A|P)M)?";}
this.timePattern=this.timePattern+" *$";this.timePatternMinMax="^\\s*((\\d{1,4})?(\\-)?(\\d{1,2})?(\\-)?(\\d{1,2}) +)?((\\d{1,2})?(:)?(\\d{1,2})?(:)?(\\d{1,2})? *((A|P)M)?)?\\s*$"}
function TimeValidateInput()
{this.bTimeMarker=this.getTimeMarker();this.aTimeSep=this.getTimeSep();this.inputLegalChars="0123456789 ";for(i=0;i<this.aTimeSep.length;i++)
{this.inputLegalChars=this.inputLegalChars+this.aTimeSep[i];}
if(this.bTimeMarker)
{this.inputLegalChars=this.inputLegalChars+"apmAPM";}
return this.matchInput();}
function TimeValidateValue(p_strMessage)
{var l_strMessage="";if(!p_strMessage||p_strMessage=="")
{l_strMessage=self.oUp.oMessage.TIME_CONSTR_VALUE;}
else
{l_strMessage=p_strMessage;}
if(!this.validateValueDo())
{var l_strErrDesc=l_strMessage;var l_aSettings={"autoClose":true,"autoCloseInterval":5000,"waitOnClose":false}
oHtmlRoot.oUp.adviceShow(self.oUp.oMessage.ERROR_INPUT,l_strErrDesc,"TimeValidateValue",l_aSettings,self)
if(!Browser.i_safari)
{this.oHtml.focus();setTimeout("document.getElementById('"+this.oHtml.id+"').focus();",100);}
return false;}
return true;}
function TimeValidateValueDo()
{this.setTimeProps();var strTime=new String(Browser.getValue(this));if(strTime.length==0)
{return true;}
var bIsTimeValid=true;bIsTimeValid=this.validateTimeValue(strTime);if(bIsTimeValid)
{return true;}
else
{return false;}}
function TimeFormat()
{this.setTimeProps();var orgTime=new String(Browser.getValue(this));if(orgTime.length==0)
{return true;}
var time=Helper.trim(this.validateTime(orgTime));if(time!=orgTime)
Browser.setValue(this,time);return true;}
function upTextareaControl()
{this.upType="upTextareaControl";this.styleType="Textarea_Standard";this.encoding=false;this.editor="0";this.iLineHeight=14;this.validateRequiredDo=TextAreaControlValidateRequiredDo;this.setRows=TextAreaControlSetRows;}
upTextareaControl.prototype=new upDataControl();function TextAreaControlSetRows()
{var cols=this.oHtml.cols;var str=this.oHtml.value;str=str.replace(/\r\n?/,"\n");var lines=1;var chars=0;var space=0;var txtAfterSpace=0;for(i=0;i<str.length;i++)
{var c=str.charAt(i);chars++;if(c=="\n"||chars>cols){lines++;if(space>0){if(Browser.ie&&c==" "&&txtAfterSpace>0)
{chars=(i-txtAfterSpace);}
else
{chars=(i-space);}
space=0;txtAfterSpace=0;}
else{chars=0;}}
else if(c==" ")
{space=i;txtAfterSpace=0;}
else if(space>0&&txtAfterSpace==0)
{txtAfterSpace=i-1;}}
this.oHtml.setAttribute("rows",lines);this.oHtml.style.height=(lines*this.iLineHeight+2)+"pt";}
function TextAreaControlValidateRequiredDo()
{var value=new String();if(!(Browser.safari2&&!Browser.safari3up)&&this.upType=="upTextareaControl"&&this.editor&&this.editor=="1"&&this.editorType=="fckeditor")
{value=Browser.getValue(this);}
else
{value=this.oHtml.value;}
if(value=="")
{return false;}
return true;}
function upTextMainControl()
{}
upTextMainControl.prototype=new upDataControl();function upTextControl()
{this.upType="upTextControl";this.styleType="Editfield_Standard";this.textTransform=0;this.transformTextByInput=TextTransformTextByInput;}
upTextControl.prototype=new upTextMainControl();function upUriImageControl()
{this.upType="upUriImageControl";this.bEdit=false;this.oHtmlImg=null;}
upUriImageControl.prototype=new upTextControl();upUriImageControl.prototype.viewInOrgSize=upUriImageControlViewInOrgSize;function upUriImageControlViewInOrgSize()
{var l_oImg=null;if(!this.bEdit)
l_oImg=this.oHtml;if(l_oImg!=null&&l_oImg.src!="")
{var text='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html lang="$lang"><head>\n<link rel="stylesheet" type="text/css" href="css/'+oHtmlRoot.oUp.oFormatInfo.layoutDir+'/application.css">\n<title></title>';text=text+'<sc'+'ript charset="'+self.oUp.oFormatInfo.charset+'" type="text/javascript" src="include/common.js"><\/script>';text=text+'<sc'+'ript charset="'+self.oUp.oFormatInfo.charset+'" type="text/javascript" src="include/object.js"><\/script>';text=text+'\n</head><body class="SCUP_Application_Standard_normal" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onload="self.oUp.resizeByContent();">';text=text+'\n<sc'+'ript  type="text/javascript">if(opener && opener.oUp.oRegistry && opener.oUp.oRegistry.oPopUpReg[self.name])';text=text+'{oUriImgPop = opener.oUp.oRegistry.oPopUpReg[self.name]}';text=text+'else{oUriImgPop = new opener.upPopUpWindow();oUriImgPop.setRefToRootWin(opener.oUp);}';text=text+'oUriImgPop.oHtml = self;oUriImgPop.oHtml.oUp = oUriImgPop;self.oUp.byUpClose = true;';text=text+'</sc'+'ript>';text=text+'\n<a href="#" onclick="self.close();return false;"><img border="0" src="'+l_oImg.src+'"></a>';text=text+'\n</body></html>';wndUriImg=oHtmlRoot.oUp.createPopUp("wndUriImg");wndUriImg.setHtmlName("wndUriImg");wndUriImg.setContent(text);wndUriImg.setSize(20,20);wndUriImg.setElementPosition(Browser.getPosition2Screen(l_oImg),null);wndUriImg.show();}}
function upDurationControl()
{this.upType="upDurationControl";this.styleType="Editfield_Standard";this.textTransform=0;this.UNIT_MINUTE=new Array("MIN","MINUTE","MINUTES","MINUTEN");this.UNIT_HOUR=new Array("H","S","HOUR","STUNDE","HOURS","STUNDEN");this.UNIT_DAY=new Array("D","T","DAY","TAG","DAYS","TAGE");this.UNIT_WEEK=new Array("W","WEEK","WOCHE","WEEKS","WOCHEN");this.UNIT_MONTH=new Array("M","MONTH","MONAT","MONTHS","MONATE");this.UNIT_MINUTE[this.UNIT_MINUTE.length]=self.oUp.oMessage.CAL_MINUTE;this.UNIT_MINUTE[this.UNIT_MINUTE.length]=self.oUp.oMessage.CAL_MINUTES;this.UNIT_HOUR[this.UNIT_HOUR.length]=self.oUp.oMessage.CAL_HOUR;this.UNIT_HOUR[this.UNIT_HOUR.length]=self.oUp.oMessage.CAL_HOURS;this.UNIT_DAY[this.UNIT_DAY.length]=self.oUp.oMessage.CAL_DAY;this.UNIT_DAY[this.UNIT_DAY.length]=self.oUp.oMessage.CAL_DAY;this.UNIT_WEEK[this.UNIT_WEEK.length]=self.oUp.oMessage.CAL_WEEK;this.UNIT_WEEK[this.UNIT_WEEK.length]=self.oUp.oMessage.CAL_WEEKS;this.UNIT_MONTH[this.UNIT_MONTH.length]=self.oUp.oMessage.CAL_MONTH;this.UNIT_MONTH[this.UNIT_MONTH.length]=self.oUp.oMessage.CAL_MONTHS;this.transformTextByInput=TextTransformTextByInput;this.validate=funcValidateDuration;this.getDurationInMilliseconds=funcGetDurationInMilliseconds;this.format=funcFormatDuration;this._arrayContainsVal=funcArrayContainsVal;}
upDurationControl.prototype=new upTextMainControl();function funcGetDurationInMilliseconds()
{var l_lMilliseconds=-1;pattern="^([0-9]{1,6})([a-zA-Z]{1,7})$";reg=new RegExp(pattern,"i")
var strInput=new String(Browser.getValue(this));strInput=strInput.replace(/ /,"");if(reg.test(strInput))
{var aUserInput=reg.exec(strInput)
if(aUserInput.length==3)
{l_lNumber=aUserInput[1];l_strUnit=aUserInput[2];if(l_lNumber!=''&&l_strUnit!='')
{if(this._arrayContainsVal(this.UNIT_MINUTE,l_strUnit))
{l_lMilliseconds=60000;}
else if(this._arrayContainsVal(this.UNIT_HOUR,l_strUnit))
{l_lMilliseconds=3600000;}
else if(this._arrayContainsVal(this.UNIT_DAY,l_strUnit))
{l_lMilliseconds=86400000;}
else if(this._arrayContainsVal(this.UNIT_WEEK,l_strUnit))
{l_lMilliseconds=604800000;}
else if(this._arrayContainsVal(this.UNIT_MONTH,l_strUnit))
{l_lMilliseconds=2592000000;}
if(l_lMilliseconds!=-1)
return(l_lMilliseconds*l_lNumber);}}}
return false;}
function funcFormatDuration()
{var l_lMilliseconds=-1;pattern="^([0-9]{1,6})([a-zA-Z]{1,7})$";reg=new RegExp(pattern,"i")
var strInput=new String(Browser.getValue(this));strInput=strInput.replace(/ /,"");if(reg.test(strInput))
{var aUserInput=reg.exec(strInput)
if(aUserInput.length==3)
{l_lNumber=aUserInput[1];l_strUnit=aUserInput[2];if(l_lNumber!=''&&l_strUnit!='')
{if(this._arrayContainsVal(this.UNIT_MINUTE,l_strUnit))
{l_lMilliseconds=60000;if(l_lNumber>1)
l_strUnitFormated=self.oUp.oMessage.CAL_MINUTES;else
l_strUnitFormated=self.oUp.oMessage.CAL_MINUTE;Browser.setValue(this,l_lNumber+' '+l_strUnitFormated);}
else if(this._arrayContainsVal(this.UNIT_HOUR,l_strUnit))
{l_lMilliseconds=3600000;if(l_lNumber>1)
l_strUnitFormated=self.oUp.oMessage.CAL_HOURS;else
l_strUnitFormated=self.oUp.oMessage.CAL_HOUR;Browser.setValue(this,l_lNumber+' '+l_strUnitFormated);}
else if(this._arrayContainsVal(this.UNIT_DAY,l_strUnit))
{l_lMilliseconds=86400000;if(l_lNumber>1)
l_strUnitFormated=self.oUp.oMessage.CAL_DAYS;else
l_strUnitFormated=self.oUp.oMessage.CAL_DAY;Browser.setValue(this,l_lNumber+' '+l_strUnitFormated);}
else if(this._arrayContainsVal(this.UNIT_WEEK,l_strUnit))
{l_lMilliseconds=604800000;if(l_lNumber>1)
l_strUnitFormated=self.oUp.oMessage.CAL_WEEKS;else
l_strUnitFormated=self.oUp.oMessage.CAL_WEEK;Browser.setValue(this,l_lNumber+' '+l_strUnitFormated);}
else if(this._arrayContainsVal(this.UNIT_MONTH,l_strUnit))
{l_lMilliseconds=2592000000;if(l_lNumber>1)
l_strUnitFormated=self.oUp.oMessage.CAL_MONTHS;else
l_strUnitFormated=self.oUp.oMessage.CAL_MONTH;Browser.setValue(this,l_lNumber+' '+l_strUnitFormated);}
if(l_lMilliseconds!=-1)
return(l_lMilliseconds*l_lNumber);}}}
return false;}
function funcValidateDuration()
{var l_lMilliseconds=-1;pattern="^([0-9]{1,6})([a-zA-Z]{1,7})$";reg=new RegExp(pattern,"i")
var strInput=new String(Browser.getValue(this));strInput=strInput.replace(/ /,"");if(reg.test(strInput))
{var aUserInput=reg.exec(strInput)
if(aUserInput.length==3)
{l_lNumber=aUserInput[1];l_strUnit=aUserInput[2];if(l_lNumber!=''&&l_strUnit!='')
{if(this._arrayContainsVal(this.UNIT_MINUTE,l_strUnit))
{return true;}
else if(this._arrayContainsVal(this.UNIT_HOUR,l_strUnit))
{return true;}
else if(this._arrayContainsVal(this.UNIT_DAY,l_strUnit))
{return true;}
else if(this._arrayContainsVal(this.UNIT_WEEK,l_strUnit))
{return true;}
else if(this._arrayContainsVal(this.UNIT_MONTH,l_strUnit))
{return true;}}}}
return false;}
function funcArrayContainsVal(p_Array,p_val)
{if(typeof p_Array=='object'&&p_val)
{if(typeof p_val=='string')
p_val=p_val.toUpperCase();for(i=0;i<p_Array.length;i++)
{if(typeof p_Array[i]=='string')
l_strArray=p_Array[i].toUpperCase();else
l_strArray=p_Array[i];if(p_Array[i]==p_val)
return true;}}
return false;}
function TextTransformTextByInput()
{var key="";var textTransform=this.textTransform;var oldValue=this.oHtml.value;key=Browser.getEventKeyCode();if(key==0||key==8||key==9||key==13||(key>=33&&key<=40)||key==45||key==46)
{return true;}
strInput=String.fromCharCode(key);this.oHtml.value=oldValue+(TextTransformText(strInput,textTransform));return false;}
function TextTransformText(strInput,textTransform)
{switch(textTransform)
{case"1":strOutput=strInput.toUpperCase();break;case"2":strOutput=strInput.toLowerCase();break;default:strOutput=strInput;break;}
return strOutput;}
function upEmailControl()
{this.upType="upEmailControl";this.styleType="Editfield_Email";this.protocol="mailto:";this.internetFormat=1;this.validatePattern=EmailValidatePattern;}
upEmailControl.prototype=new upTextMainControl();function EmailValidatePattern(p_strMessage)
{var l_strMessage="";if(!p_strMessage||p_strMessage=="")
{l_strMessage=self.oUp.oMessage.MAIL_CONSTR_PATTERN;}
else
{l_strMessage=p_strMessage;}
if(this.internetFormat=="1")
{var usr="([a-zA-Z0-9][a-zA-Z0-9_.-]*|\"([^\\\\\x80-\xff\015\012\"]|\\\\[^\x80-\xff])+\")";var domain="([a-zA-Z0-9][a-zA-Z0-9._-]*\\.)*[a-zA-Z0-9][a-zA-Z0-9._-]*\\.[a-zA-Z]{2,5}";this.pattern="^"+usr+"\@"+domain+"$";}
return this.matchPattern(l_strMessage)}
function upUriControl()
{this.upType="upUriControl";this.styleType="Editfield_Link";this.protocol="http://";}
upUriControl.prototype=new upTextMainControl();function upSelectMainControl()
{this.upType="upSelectMainControl";this.width="";this.max="1";this.min="1";this.sourceType="0";this.oAddParams={};this.aKeys=new Array();this.keyTimer=null;this.setPressedKey=SelectSetPressedKey;this.analysePressedKeys=SelectAnalysePressedKeys;this.validateRequired=SelectValidateRequired;this.validateRequiredDo=SelectValidateRequiredDo;this.insertOption=SelectInsertOption;this.clearOptions=SelectClearOptions;this.setFocusStyle=SelectSetFocusStyle;this.refreshSelect=SelectRefreshSelect;this._refreshSelect=Select_RefreshSelect;this.__refreshSelect=Select__RefreshSelect;this.initDependency=SelectInitDependency;this.reload=SelectReload;}
function SelectInitDependency(p_Filter,p_oProps)
{Loader.loadJsFileOnDemand("include/filter.js");this.oFilter=null;this.triggerDependency=SelectTriggerDependency;if(typeof(p_Filter)=="object"&&p_Filter!=null&&p_Filter.upType=="upFilter")
{this.oFilter=p_Filter;}
else if(typeof(p_Filter)=="object"&&p_Filter!=null&&typeof(p_Filter.length)=="number"&&p_Filter.length==1)
{this.oFilter=new upFilter();this.oFilter.initFromObject(p_Filter[0]);}
for(var prop in p_oProps)this[prop]=p_oProps[prop];}
function SelectTriggerDependency()
{var l_bRet=false;if(typeof(this.oHtmlFilter)!="object"||this.oHtmlFilter==null)this.oHtmlFilter=document.getElementById("ID_CurrentFilter_"+this.oHtml.name);if(typeof(this.oHtmlFilter)=="object"&&this.oHtmlFilter!=null&&this.oHtmlFilter)
{if(typeof(this.oFilter)=="object"&&this.oFilter!=null&&this.oFilter)
{var l_strFilter=this.oFilter.getAsString();this.oHtmlFilter.value=Helper.hexEncodeString(l_strFilter);l_bRet=this.reload();this.oHtmlFilter.value='';}
else
{oHtmlRoot.oUp.adviceShow("Error","No dependency filter defined!","DEPENDENCY_ERROR_MISSING_FILTER",null,self);}}
else
{oHtmlRoot.oUp.adviceShow("Error","Missing dependency filter field!","DEPENDENCY_ERROR_MISSING_FILTERFIELD",null,self);}
return l_bRet;}
function SelectReload()
{if(typeof(this.oHtmlContainer)=="undefined")this.oHtmlContainer=this.oHtml.parentNode;if(typeof(this.oHtml.form)=="undefined")
{oHtmlRoot.oUp.adviceShow("Error: Reload Control","Missing form reference!<br>control: "+this.userName+"<br>function: process_SimpleAjaxContainerLoadStaticVm","ERROR_AJAX_PROCESS",null,self);return false;}
if(typeof(this.oHtml.form.oUp)=="undefined")
{oHtmlRoot.oUp.adviceShow("Error: Reload Control","Missing Fup reference!<br>control: "+this.userName+"<br>function: process_SimpleAjaxContainerLoadStaticVm","ERROR_AJAX_PROCESS",null,self);return false;}
var l_oFup=this.oHtml.form.oUp.oFuncPart;if(typeof(this.strReloadVm)!="string")this.strReloadVm="internal/application/vm/html/"+l_oFup.appGuid+"/container/"+this.oHtml.name+"_container.vm";if(typeof(this.oAjaxCont)=="undefined")
{this.oAjaxCont=new upSimpleAjaxContainer(this.oHtmlContainer,{oHtmlForm:this.oHtml.form,bAsync:false,bAddHistory:false,bLoadCss:false,oFup:this.oHtml.form.oUp.oFuncPart,bLoadJs:false});}
var l_oRqs={};for(var rq in this.oAddParams){l_oRqs[rq]=this.oAddParams[rq];}
var l_selected=Browser.getValue(this,"key");var id=this.oHtml.id;this.oHtml.oUp=null;this.oHtml=null;var l_bRet=this.oAjaxCont.loadAppSnippetVm(this.strReloadVm,l_oRqs);this.oHtml=document.getElementById(id);if(this.oHtml)
{this.oHtml.oUp=this;Browser.setValue(this,l_selected,"key");}
else
{oHtmlRoot.oUp.adviceShow("Error: Reload Control","Can't reference to reloaded control: "+this.userName+"<br>function: SelectReload","SelectReload",null,self);return false;}
return l_bRet;}
upSelectMainControl.prototype=new upDataControl();function SelectSetFocusStyle(p_bFocus)
{if(Browser.mozilla&&Browser.linux)
return true;this._setFocusStyle(p_bFocus);return true;}
function SelectSetPressedKey(e)
{self.oUp.oEvent=e;var keyCode=Browser.getEventKeyCode();var keyChar=String.fromCharCode(keyCode);if(keyCode>=65&&keyCode<=90)
{keyChar=keyChar.toLowerCase();}
else if(keyCode>=48&&keyCode<=57)
{}
else if(keyCode>=96&&keyCode<=105)
{keyCode=keyCode-48;keyChar=String.fromCharCode(keyCode);}
else
{switch(keyCode)
{case 190:keyChar=".";break;case 188:keyChar=",";break;case 189:case 109:keyChar="-";break;case 187:break;case 107:keyChar="+";break;case 32:keyChar=" ";break;default:keyChar="";break;}}
if(this.keyTimer!=null)
{window.clearTimeout(this.keyTimer);this.keyTimer=null;}
if(keyChar!="")
{this.aKeys.push(keyChar);this.analysePressedKeys(false);this.keyTimer=window.setTimeout("if(document.getElementById('"+this.id+"')){document.getElementById('"+this.id+"').oUp.analysePressedKeys(true);}",500);}
return true;}
function SelectAnalysePressedKeys(p_bReset)
{if(this.aKeys.length>0)
{var bFound=false;var strKeys=this.aKeys.join("");var lCurrPos=this.oHtml.options.selectedIndex;if(lCurrPos>=this.oHtml.options.length)lCurrPos=0;for(var i=0;i<this.oHtml.options.length;i++)
{if(this.oHtml.options[lCurrPos].text.toLowerCase().substr(0,this.aKeys.length)==strKeys)
{this.oHtml.options[lCurrPos].selected=true;if(typeof this.oHtml.onchange=="function")
{this.oHtml.onchange();}
bFound=true;break;}
lCurrPos++;if(lCurrPos>=this.oHtml.options.length)lCurrPos=0;}
if(bFound)
window.status="analyse keys: "+strKeys+"  ->  found";else
window.status="analyse keys: "+strKeys+"  ->  not found";}
else
{window.defaultStatus="";}
if(p_bReset)
{window.clearTimeout(this.keyTimer);this.aKeys=new Array();}
return true;}
function SelectRefreshSelect(p_bEmptyEntry)
{var guid;if(this.targetCtrlGUID&&this.targetCtrlGUID!="")guid=this.targetCtrlGUID;else guid=Helper.getQsValueByParam("rq_RefreshSelect_Control");var l_bEmptyEntry=true;if(arguments.length>0)l_bEmptyEntry=p_bEmptyEntry;if(!guid)
return false;var srcFrame=Helper.getQsValueByParam("rq_Frame");if(srcFrame&&srcFrame!=""&&oHtmlRoot.oUp&&oHtmlRoot.oUp.oRegistry&&oHtmlRoot.oUp.oRegistry.oFrameReg[srcFrame])
{return this._refreshSelect(guid,oHtmlRoot.oUp.oRegistry.oFrameReg[srcFrame],l_bEmptyEntry);}
return false;}
function Select_RefreshSelect(guid,oTargWin,p_bEmptyEntry)
{try
{this.__refreshSelect(guid,oTargWin,p_bEmptyEntry);}
catch(e)
{alert(Browser.getExceptionMessage(e))
return false;}}
function Select__RefreshSelect(guid,oTargWin,p_bEmptyEntry)
{var l_bEmptyEntry=p_bEmptyEntry;bFound=false;if(!guid||!oTargWin)
return false;var oHtmlDestCtrl=oTargWin.getElement(guid);if(!oHtmlDestCtrl)
return false;var oUpDestCtrl=oHtmlDestCtrl.oUp;var selectedOptionValue="";if(oUpDestCtrl.oHtml.options.selectedIndex>-1)
{selectedOptionValue=oUpDestCtrl.oHtml.options[oUpDestCtrl.oHtml.options.selectedIndex].value;}
oUpDestCtrl.clearOptions();var oldOpt=null;if((l_bEmptyEntry&&this.oHtml.options.length>=1&&this.oHtml.options[0].value!="")||(Browser.firefox&&this.oHtml.options.length==0))
{oUpDestCtrl.insertOption("","");}
for(var i=0;i<this.oHtml.options.length;i++)
{oldOpt=this.oHtml.options[i];oUpDestCtrl.insertOption(oldOpt.text,oldOpt.value);}
l_strCompareText=oUpDestCtrl.compareText;oUpDestCtrl.compareText="0";if(selectedOptionValue!="")
{Browser.setValue(oUpDestCtrl,0);Browser.setValue(oUpDestCtrl,selectedOptionValue);}
else
{Browser.setValue(oUpDestCtrl,0);}
oUpDestCtrl.compareText=l_strCompareText;return true;}
function SelectClearOptions()
{var htmlEle=this.oHtml;while(htmlEle.length>0)
{htmlEle.options[0]=null;}}
function SelectInsertOption(p_strText,p_strValue)
{var htmlEle=this.oHtml;var newOpt=new Option(p_strText,p_strValue);htmlEle.options[htmlEle.length]=newOpt;}
function SelectValidateRequired(p_strMessage)
{var l_strMessage="";if(!p_strMessage||p_strMessage=="")
{l_strMessage=self.oUp.oMessage.SELECT_CONSTR_REQUIRED;}
else
{l_strMessage=p_strMessage;}
if(!this.validateRequiredDo())
{var l_strErrDesc=l_strMessage;var l_aSettings={"autoClose":true,"autoCloseInterval":5000,"waitOnClose":false}
oHtmlRoot.oUp.adviceShow(self.oUp.oMessage.ERROR_INPUT,l_strErrDesc,"SelectValidateRequired",l_aSettings,self)
if(!Browser.i_safari)
{this.oHtml.focus();setTimeout("document.getElementById('"+this.oHtml.id+"').focus();",100);}
return false;}
return true;}
function SelectValidateRequiredDo()
{var noOfSelected=0;for(var i=0;i<this.oHtml.options.length;i++)
{if(this.oHtml.options[i].selected&&this.oHtml.options[i].value!="")
{noOfSelected++;}}
if((Browser.safari||Browser.konqueror)&&noOfSelected==0&&this.upType=="upDropdownControl"&&this.oHtml.selectedIndex=="-1"&&this.oHtml.options.length>0)
{if(this.oHtml.options[0].value!="")
noOfSelected=1;}
if(noOfSelected<this.min||noOfSelected>this.max)
{return false;}
return true;}
function upListboxControl()
{this.upType="upListboxControl";this.styleType="Listbox_Standard";this.max="1";this.min="1";this.multiple=false;this.visibleEntries=1;}
upListboxControl.prototype=new upSelectMainControl();function upDropdownControl()
{this.upType="upDropdownControl";this.styleType="Dropdown_Standard";this.max="1";this.min="1";}
upDropdownControl.prototype=new upSelectMainControl();function upCheckControlGroup()
{this.upType="upCheckControlGroup";this.styleType="CheckboxGroup_Standard";this.max="";this.min=1;this.validateRequired=CheckControlGroupValidateRequired;this.validateRequiredDo=CheckControlGroupValidateRequiredDo;this.validateValue=CheckControlGroupValidateValue;this.validateValueDo=CheckControlGroupValidateValueDo;}
upCheckControlGroup.prototype=new upDataControl();function CheckControlGroupValidateRequired(p_strMessage)
{var l_strMessage="";if(!p_strMessage||p_strMessage=="")
{l_strMessage=self.oUp.oMessage.CHECK_CONSTR_REQUIRED;}
else
{l_strMessage=p_strMessage;}
if(!this.validateRequiredDo())
{var l_strErrDesc=l_strMessage;var l_aSettings={"autoClose":true,"autoCloseInterval":5000,"waitOnClose":false}
oHtmlRoot.oUp.adviceShow(self.oUp.oMessage.ERROR_INPUT,l_strErrDesc,"CheckControlGroupValidateRequired",l_aSettings,self)
return false;}
return true;}
function CheckControlGroupValidateRequiredDo()
{var min=1;var noOfChecked=0;for(var i=0;i<this.elements.length;i++)
{if(this.elements[i].oHtml.checked)
{noOfChecked++;}}
if(noOfChecked<min)
{return false;}
return true;}
function CheckControlGroupValidateValue(p_strMessage)
{var l_strMessage="";if(!p_strMessage||p_strMessage=="")
{l_strMessage=self.oUp.oMessage.CHECK_CONSTR_REQUIRED;}
else
{l_strMessage=p_strMessage;}
if(!this.validateRequiredDo())
{var l_strErrDesc=l_strMessage;var l_aSettings={"autoClose":true,"autoCloseInterval":5000,"waitOnClose":false}
oHtmlRoot.oUp.adviceShow(self.oUp.oMessage.ERROR_INPUT,l_strErrDesc,"CheckControlGroupValidateValue",l_aSettings,self)
return false;}
return true;}
function CheckControlGroupValidateValueDo()
{var noOfChecked=0;for(var i=0;i<this.elements.length;i++)
{if(this.elements[i].oHtml.checked)
{noOfChecked++;}}
if(this.min!=""&&!isNaN(this.min)&&noOfChecked<this.min)
{return false;}
if(this.max!=""&&!isNaN(this.max)&&noOfChecked>this.max)
{return false;}
return true;}
function upCheckControl()
{this.upType="upCheckControl";this.styleType="Checkbox_Standard";this.validateRequired=CheckControlValidateRequired;this.validateRequiredDo=CheckControlValidateRequiredDo;}
upCheckControl.prototype=new upDataControl();function CheckControlValidateRequired(p_strMessage)
{var l_strMessage="";if(!p_strMessage||p_strMessage=="")
{l_strMessage=self.oUp.oMessage.CHECK_CONSTR_REQUIRED;}
else
{l_strMessage=p_strMessage;}
if(!this.validateRequiredDo())
{var l_strErrDesc=l_strMessage;var l_aSettings={"autoClose":true,"autoCloseInterval":5000,"waitOnClose":false}
oHtmlRoot.oUp.adviceShow(self.oUp.oMessage.ERROR_INPUT,l_strErrDesc,"CheckControlValidateRequired",l_aSettings,self)
return false;}
return true;}
function CheckControlValidateRequiredDo()
{if(this.oHtml.checked)
{return true;}
return false;}
function upRadioControlGroup()
{this.upType="upRadioControlGroup";this.styleType="RadioGroup_Standard";this.elements=null;this.validateRequired=RadioControlGroupValidateRequired;this.validateRequiredDo=RadioControlGroupValidateRequiredDo;this.clone=RadioControlGroupClone;this._clone=RadioControlGroup_Clone;this.initCloneContainer=RadioControlGroupInitCloneContainer;}
upRadioControlGroup.prototype=new upDataControl();function RadioControlGroupInitCloneContainer(p_strSep,oCloneContainer)
{var iCounter=0;for(i in this)
{if(i=="id")
{this["id"]=this["id"]+"_"+iCounter;}
else if(i=="userName")
{if(this["userName"].indexOf(":")==-1)
this["userName"]=oCloneContainer.userName+": "+this["userName"];else
this["userName"]=this["userName"].substring(0,this["userName"].indexOf(":"))+" - "+oCloneContainer.userName+": "+this["userName"].substring(this["userName"].indexOf(":")+1);}}}
function RadioControlGroupClone(oHtml,iCounter)
{var oUp=this._clone(new Object(),oHtml,iCounter);oUp=this.biDirectUpHtml2(oUp,oHtml);return oUp;}
function RadioControlGroup_Clone(oUp,oHtml,iCounter)
{var strNewId="";var strOldId="";var oUpRadio=null;for(i in this)
{if(i=="id")
{oUp["id"]=this["id"].substring(0,this["id"].lastIndexOf("_"))+"_"+iCounter;}
else if(i=="userName")
{if(this["userName"].indexOf(self.oUp.oMessage.CLONER_COPY)==-1)
oUp["userName"]=this["userName"]+": "+self.oUp.oMessage.CLONER_COPY;else
oUp["userName"]=this["userName"].substring(0,this["userName"].lastIndexOf(":"))+": "+self.oUp.oMessage.CLONER_COPY;}
else if(i!="oHtml")
{oUp[i]=this[i];}}
return oUp;}
function RadioControlGroupValidateRequired(p_strMessage)
{var l_strMessage="";if(!p_strMessage||p_strMessage=="")
{l_strMessage=self.oUp.oMessage.RADIO_CONSTR_REQUIRED;}
else
{l_strMessage=p_strMessage;}
if(!this.validateRequiredDo())
{var l_strErrDesc=l_strMessage;var l_aSettings={"autoClose":true,"autoCloseInterval":5000,"waitOnClose":false}
oHtmlRoot.oUp.adviceShow(self.oUp.oMessage.ERROR_INPUT,l_strErrDesc,"RadioControlGroupValidateRequired",l_aSettings,self)
return false;}
return true;}
function RadioControlGroupValidateRequiredDo()
{for(var i=0;i<this.elements.length;i++)
{if(this.elements[i].oHtml.checked)
{return true;}}
return false;}
function upRadioControl()
{this.upType="upRadioControl";this.styleType="Radio_Standard";this.group=null;}
upRadioControl.prototype=new upDataControl();function upFileMainControl()
{this.description="";this.hasRecord=false;this.validateRequiredDo=ControlValidateRequiredFileMainControlDo;}
upFileMainControl.prototype=new upDataControl();function ControlValidateRequiredFileMainControlDo()
{if(!this.hasRecord)
{var value=this.oHtml.value;if(value=="")
{return false;}}
return true;}
function upFileControl()
{this.upType="upFileControl";this.styleType="Editfield_Standard";}
upFileControl.prototype=new upFileMainControl();function upImageFileControl()
{this.upType="upImageFileControl";this.styleType="Editfield_Standard";}
upImageFileControl.prototype=new upFileMainControl();function WiKiLink(p_strAppId,p_strTargetId,p_strRecId,p_Headline,p_object)
{var oOpen=new upTextActionControl();oOpen=oOpen.biDirectUpHtml(oOpen,p_object.id);oOpen.oTarget=new upTarget();oOpen.oFup=self.oUp.oFuncPart;oOpen.oTarget.newWindow="0";oOpen.oTarget.rq_RecId=p_strRecId;oOpen.oTarget.rq_AppId=p_strAppId;oOpen.oTarget.rq_TargetId=p_strTargetId;oOpen.oTarget.addParam=Helper.setQsValueByParam("rq_wikiheadline",p_Headline,oOpen.oTarget.addParam);oOpen.processRequest();}
function WiKiToggleHistory(p_strActionId,p_strContainerId,p_oFup)
{var l_oHtmlAction=(document.getElementById(p_strActionId))?document.getElementById(p_strActionId):false;var l_oHtmlContainer=(document.getElementById(p_strContainerId))?document.getElementById(p_strContainerId):false;if(l_oHtmlAction&&l_oHtmlContainer)
{if(oMsgNotifier.isVisible(p_strActionId))
{oMsgNotifier.close(true,p_strActionId);}
else
{if(oMsgNotifier.isVisible())
{oMsgNotifier.close();}
contentKey=oMsgNotifier.addNodeById(l_oHtmlContainer,p_strActionId);oMsgNotifier.setContentAttribute(contentKey,"autoClose",true);oMsgNotifier.setContentAttribute(contentKey,"autoCloseInterval",10000);oMsgNotifier.setContentAttribute(contentKey,"checkLayerHeight",true);oMsgNotifier.setContentAttribute(contentKey,"checkLayerWidth",true);oMsgNotifier.setContentAttribute(contentKey,"closeButton",false);oMsgNotifier.setContentAttribute(contentKey,"opacity",100);oPosXY=Browser.getPosition2Page(l_oHtmlAction);buttonX=oPosXY.posX;buttonY=oPosXY.posY;buttonWidth=Browser.getWidth(l_oHtmlAction);buttonHeight=Browser.getHeight(l_oHtmlAction);tooltipWidth=200;tooltipHeight=70;tooltipX=buttonX;tooltipY=buttonY+buttonHeight;oMsgNotifier.getContentObject(contentKey).setPosition(tooltipX,tooltipY,tooltipWidth,tooltipHeight,"top-right");oMsgNotifier.show(contentKey);}
if(p_oFup)
{p_oFup.strOnUnLoad+="if(oMsgNotifier.isVisible('"+p_strActionId+"')){oMsgNotifier.close(true,'"+p_strActionId+"');};";}}}
function upMultiSelectControl()
{this.upType="upMultiSelectControl";this.styleType="Listbox";this.min="1";this.max="-1";this.aFixEntries=new Array();this.oLeft=null;this.oRight=null;this.oHtmlNotSel=null;this.oHtmlSel=null;this.oHtmlOut=null;this.moveOpt=MultiSelectMoveOpt;this.moveAllOptions=MultiSelectMoveAllOptions;this._select=MultiSelect_Select;this._deSelect=MultiSelect_DeSelect;this.select=MultiSelectSelect;this.moveOptionByValue=MultiSelectMoveOptionByValue;this.deSelect=MultiSelectDeSelect;this.moveUp=MultiSelectMoveUp;this.moveDown=MultiSelectMoveDown;this._moveUp=MultiSelect_MoveUp;this._moveDown=MultiSelect_MoveDown;this.toOutputString=MultiSelectToOutputString;this._toOutputString=MultiSelect_ToOutputString;this.setFromString=MultiSelectSetFromString;this.validateRequiredDo=MultiSelectValidateRequiredDo;this.hasSelectedEntries=MultiSelectHasSelectedEntries;this.clone=MultiSelectClone;this._clone=MultiSelect_Clone;this.initCloneContainer=MultiSelectInitCloneContainer;this.removeClone=MultiSelectRemoveClone;}
upMultiSelectControl.prototype=new upDataControl();function MultiSelectRemoveClone()
{this.oHtml.oUp=null;this.oHtmlNotSel=null;this.oHtmlSel=null;this.oHtmlOut=null;this.oHtmlRight=null;this.oHtmlLeft=null;this.oHtml=null;}
function MultiSelectInitCloneContainer(p_strSep,oCloneContainer)
{var iCounter=0;var id=this.oHtml.id;var aId=id.split(IDCOUNTERSEP);for(i in this)
{if(i=="id")
{this["id"]=this["id"]+p_strSep+iCounter;}
else if(i=="oHtmlNotSel")
{this["oHtmlNotSel"]=document.getElementById(aId[0]+"_NotSel"+IDCOUNTERSEP+aId[1]);}
else if(i=="oHtmlSel")
{this["oHtmlSel"]=document.getElementById(aId[0]+IDCOUNTERSEP+aId[1]);}
else if(i=="oHtmlOut")
{this["oHtmlOut"]=document.getElementById(aId[0]+"_Out"+IDCOUNTERSEP+aId[1]);}
else if(i=="oHtmlLeft")
{this["oHtmlLeft"]=document.getElementById(aId[0]+"_Left"+IDCOUNTERSEP+aId[1]);}
else if(i=="oHtmlRight")
{this["oHtmlRight"]=document.getElementById(aId[0]+"_Right"+IDCOUNTERSEP+aId[1]);}
else if(i=="userName")
{if(this["userName"].indexOf(":")==-1)
this["userName"]=oCloneContainer.userName+": "+this["userName"];else
this["userName"]=this["userName"].substring(0,this["userName"].indexOf(":"))+" - "+oCloneContainer.userName+": "+this["userName"].substring(this["userName"].indexOf(":")+1);}}}
function MultiSelectClone(oHtml,oCloneContainer)
{var oUp=this._clone(new Object(),oHtml,oCloneContainer);oUp=this.biDirectUpHtml2(oUp,oHtml);oUp.oHtmlNotSel.ondblclick=function(){oUp.select()};oUp.oHtmlSel.ondblclick=function(){oUp.deSelect()};oUp.oHtmlLeft.onclick=function(){oUp.deSelect()};oUp.oHtmlRight.onclick=function(){oUp.select()};return oUp;}
function MultiSelect_Clone(oUp,oHtml,oCloneContainer)
{for(i in this)
{if(i=="id")
{oUp["id"]=oCloneContainer.changeId(this["id"]);}
else if(i=="userName")
{if(this["userName"].indexOf(self.oUp.oMessage.CLONER_COPY)==-1)
oUp["userName"]=this["userName"]+": "+self.oUp.oMessage.CLONER_COPY;else
oUp["userName"]=this["userName"].substring(0,this["userName"].lastIndexOf(":"))+": "+self.oUp.oMessage.CLONER_COPY;}
else if(i=="oHtmlNotSel")
{oUp["oHtmlNotSel"]=document.getElementById(oCloneContainer.changeId(this["oHtmlNotSel"].id));}
else if(i=="oHtmlSel")
{oUp["oHtmlSel"]=document.getElementById(oCloneContainer.changeId(this["oHtmlSel"].id));}
else if(i=="oHtmlOut")
{oUp["oHtmlOut"]=document.getElementById(oCloneContainer.changeId(this["oHtmlOut"].id));}
else if(i=="oHtmlLeft")
{oUp["oHtmlLeft"]=document.getElementById(oCloneContainer.changeId(this["oHtmlLeft"].id));}
else if(i=="oHtmlRight")
{oUp["oHtmlRight"]=document.getElementById(oCloneContainer.changeId(this["oHtmlRight"].id));}
else if(i!="oHtml")
{oUp[i]=this[i];}}
return oUp;}
function MultiSelectMoveOptionByValue(oSource,oTarget,value)
{var optNew=null;for(var j=0;j<oSource.options.length;j++)
{if(oSource.options[j].value==value)
{optNew=new Option(oSource.options[j].text,oSource.options[j].value);oTarget.options[oTarget.options.length]=optNew;oSource.options[j]=null;return;}}
return;}
function MultiSelectHasSelectedEntries(p_lMin,p_bCheckFixEntries)
{if(!arguments.length>0)p_lMin=1;l_lEntries=this.oHtmlSel.options.length;if(p_bCheckFixEntries&&this.aFixEntries.length>0)l_lEntries+=this.aFixEntries.length;if(l_lEntries>=p_lMin)
return true;else
return false;}
function MultiSelectMoveUp()
{if(this.oHtmlSel&&this.oHtmlSel!=null&&this.oHtmlSel.options)
{if(this.oHtmlSel.options.selectedIndex>-1)
{this._moveUp(this.oHtmlSel);}}}
function MultiSelectMoveDown()
{if(this.oHtmlSel&&this.oHtmlSel!=null&&this.oHtmlSel.options)
{if(this.oHtmlSel.options.selectedIndex>-1)
{this._moveDown(this.oHtmlSel);}}}
function MultiSelect_MoveUp(colbox)
{var l_aRemove=new Array();var l_aOption=new Array();var l_aOptions=new Array();if(!colbox.options[0].selected)
{l_bLastOptIsSelected=false;for(i=colbox.options.length-1;i>=0;i--)
{if(colbox.options[i].selected)
{if(i==colbox.options.length-1)
l_bLastOptIsSelected=true;if(i==0)
{l_bLast=true;newPos=colbox.options.length-1;}
else
{l_bLast=false;newPos=i-1;}
l_aRemove[l_aRemove.length]=i;var l_aOption=new Array();l_aOption[0]=newPos;l_aOption[1]=colbox.options[i].value;l_aOption[2]=colbox.options[i].text;l_aOption[3]=l_bLast;l_aOptions[l_aOptions.length]=l_aOption;}}
for(i=0;i<l_aRemove.length;i++)
{colbox.options[l_aRemove[i]]=null;}
for(i=l_aOptions.length-1;i>=0;i--)
{posNew=l_aOptions[i][0];if(posNew>colbox.options.length)
posNew=colbox.options.length;else if(!l_aOptions[i][3]&&posNew==colbox.options.length)
posNew--;if(posNew<colbox.options.length)
{for(k=colbox.options.length-1;k>=posNew;k--)
{value=colbox.options[k].value;text=colbox.options[k].text;selected=colbox.options[k].selected;newEntry=new Option();colbox.options[k+1]=newEntry;colbox.options[k+1].text=text;colbox.options[k+1].value=value;colbox.options[k+1].selected=selected;}}
newEntry=new Option();colbox.options[posNew]=newEntry;colbox.options[posNew].text=l_aOptions[i][2];colbox.options[posNew].value=l_aOptions[i][1];colbox.options[posNew].selected=true;}}}
function MultiSelect_MoveDown(colbox)
{var l_aRemove=new Array();var l_aOption=new Array();var l_aOptions=new Array();if(!colbox.options[colbox.options.length-1].selected)
{for(i=0;i<colbox.options.length;i++)
{if(colbox.options[i].selected)
{if(i==(colbox.options.length-1))
newPos=0;else
newPos=i+1;l_aRemove[l_aRemove.length]=i;var l_aOption=new Array();l_aOption[0]=newPos;l_aOption[1]=colbox.options[i].value;l_aOption[2]=colbox.options[i].text;l_aOptions[l_aOptions.length]=l_aOption;}}
for(i=l_aOptions.length-1;i>=0;i--)
{colbox.options[l_aRemove[i]]=null;}
for(i=0;i<l_aOptions.length;i++)
{posNew=l_aOptions[i][0];if(posNew>colbox.options.length)
posNew=colbox.options.length;if(posNew<=colbox.options.length)
{for(k=colbox.options.length-1;k>=posNew;k--)
{value=colbox.options[k].value;text=colbox.options[k].text;selected=colbox.options[k].selected;newEntry=new Option();colbox.options[k+1]=newEntry;colbox.options[k+1].text=text;colbox.options[k+1].value=value;colbox.options[k+1].selected=selected;}}
newEntry=new Option();colbox.options[posNew]=newEntry;colbox.options[posNew].text=l_aOptions[i][2];colbox.options[posNew].value=l_aOptions[i][1];colbox.options[posNew].selected=true;}}}
function MultiSelectMoveAllOptions(oSource,oTarget)
{var optNew=null;while(oSource.options.length>0)
{optNew=new Option(oSource.options[0].text,oSource.options[0].value);oTarget.options[oTarget.options.length]=optNew;oSource.options[0]=null;}
return true;}
function MultiSelectMoveOpt(oSource,oTarget)
{var firstSelected="";var selected="";var optNew=null;firstSelected=oSource.selectedIndex;if(firstSelected==-1)
{alert(self.oUp.oMessage.MULTI_SEL_NO_SELECT);return true;}
while(oSource.selectedIndex!=-1)
{indSelected=oSource.selectedIndex;if(indSelected==-1)
break;optNew=new Option(oSource.options[indSelected].text,oSource.options[indSelected].value);oTarget.options[oTarget.length]=optNew;oSource.options[indSelected]=null;}
return true;}
function MultiSelect_Select()
{if(this.max>-1&&this.max<=this.oHtmlSel.options.length)return;this.moveOpt(this.oHtmlNotSel,this.oHtmlSel);}
function MultiSelect_DeSelect()
{this.moveOpt(this.oHtmlSel,this.oHtmlNotSel);}
function MultiSelectSelect()
{this._select();this.toOutputString();}
function MultiSelectDeSelect()
{this._deSelect();this.toOutputString();}
function MultiSelectSetFromString(strOptions)
{this.moveAllOptions(this.oHtmlSel,this.oHtmlNotSel);if(strOptions=="")return;var aOptions=Helper.undoCharStuffing(strOptions);for(var i=0;i<aOptions.length;i++)
{this.moveOptionByValue(this.oHtmlNotSel,this.oHtmlSel,aOptions[i]);}
this.toOutputString();}
function MultiSelectToOutputString()
{if(this.oHtmlOut&&this.oHtmlOut!=null)
{this.oHtmlOut.value=this._toOutputString();return true;}
else
{return false;}}
function MultiSelect_ToOutputString()
{var strOut="";var aOptions=new Array();for(var i=0;i<this.oHtmlSel.options.length;i++)
{aOptions[aOptions.length]=this.oHtmlSel.options[i].value;}
for(var j=0;j<this.aFixEntries.length;j++)
{aOptions[aOptions.length]=this.aFixEntries[j];}
return Helper.doCharStuffing(aOptions);}
function MultiSelectValidateRequiredDo()
{if(this.oHtmlSel.options.length<this.min)
{return false;}
return true;}
function upDistributeControl()
{this.upType="upDistributeControl";}
upDistributeControl.prototype=new upMultiSelectControl();function upDistributeParticipantsControl()
{this.upType="upDistributeParticipantsControl";}
upDistributeParticipantsControl.prototype=new upMultiSelectControl();function upDistributorControl()
{this.upType="upDistributorControl";}
upDistributorControl.prototype=new upMultiSelectControl();function upDistributeOrgUnitsControl()
{this.upType="upDistributeOrgUnitsControl";this.aOrgUnits=new Array();this.setOrgUnit=funcSetOrgUnit;this.getOrgUnit=funcGetOrgUnit;this.moveOpt=MultiSelectMoveOptOrgUnit;}
upDistributeOrgUnitsControl.prototype=new upMultiSelectControl();function funcSetOrgUnit(p_strId,p_bHasRight)
{if(p_strId)
{this.aOrgUnits[p_strId]=new Array();this.aOrgUnits[p_strId]['hasRight']=p_bHasRight;}}
function funcGetOrgUnit(p_strId)
{this.hasRight=funcHasRight;if(p_strId)
{this.id=p_strId;this.orgUnit=this.aOrgUnits[p_strId];return this.aOrgUnits[p_strId];}
else
{this.id=null;this.orgUnit=null;return null;}}
function funcHasRight()
{return this.orgUnit['hasRight'];}
function MultiSelectMoveOptOrgUnit(oSource,oTarget)
{var firstSelected="";var selected="";var optNew=null;var msgNotMoved="";firstSelected=oSource.selectedIndex;if(firstSelected==-1)
{alert(self.oUp.oMessage.MULTI_SEL_NO_SELECT);return true;}
while(oSource.selectedIndex!=-1)
{indSelected=oSource.selectedIndex;if(indSelected==-1)
break;optNew=new Option(oSource.options[indSelected].text,oSource.options[indSelected].value);if(this.getOrgUnit(oSource.options[indSelected].value)!=null&&this.getOrgUnit(oSource.options[indSelected].value).hasRight)
{oTarget.options[oTarget.length]=optNew;oSource.options[indSelected]=null;}
else
{oSource.options[indSelected].selected=false;msgNotMoved+="\t"+oSource.options[indSelected].text+"\n";}}
if(msgNotMoved!="")
alert(self.oUp.oMessage.MULTI_SEL_NOTMOVED+"\n\n"+msgNotMoved);return true;}
function upFlipFlopControl()
{this.upType="upFlipFlopControl";this.bUsePictures=1;this.bCookieOnOpenState=true;this.pathOpenPic='./images/assets/navigation/opened.gif';this.pathClosePic='./images/assets/navigation/closed.gif';this.bUseLastFlop=0;this.sPreSub=null;this.sPrePic=null;this.iLastId=-1;this.isCookie=Helper.isCookieEnabled();this.aFlipStatus=new Array();if(document.layers)
{this.visible='show';this.hidden='hide';}
else if(document.all||document.getElementById)
{this.visible='visible';this.hidden='hidden';}
this._picOpen=FFpicOpen;this._picClose=FFpicClose;this.flipAll=FFlipAll;this.flopAll=FFlopAll;this.flipFlop=FFlipFlop;this.onlyFlip=FFonlyFlip;this._lastFlop=FFlastFlop;this._flip=FFlip;this._flop=FFlop;this._setCookie=FSetCookie;this.getStatus=FFgetStatus;}
function FFgetStatus(Id)
{subId=this.sPreSub+Id;subObject=Browser.getRef(subId);if(subObject.style.display=="block"||subObject.style.display=="")
return"open";else
return"closed";}
function FFpicOpen(Id)
{picId=this.sPrePic+Id;Browser.getRef(picId).src=this.pathOpenPic;}
function FFpicClose(Id)
{picId=this.sPrePic+Id;Browser.getRef(picId).src=this.pathClosePic;}
function FFlipAll()
{if(this.bUseLastFlop==0)
{for(var Id in this.aFlipStatus)
{subId=this.sPreSub+Id;if(!Browser.getRef(subId))
continue;Browser.getRef(subId).style.display="";Browser.getRef(subId).style.visibility=this.visible;if(this.bUsePictures)this._picOpen(Id);this._setCookie(Id,true);this.aFlipStatus[Id]=true;}}}
function FFlopAll()
{if(this.bUseLastFlop==0)
{for(var Id in this.aFlipStatus)
{subId=this.sPreSub+Id;if(!Browser.getRef(subId))
continue;Browser.getRef(subId).style.display="none";Browser.getRef(subId).style.visibility=this.hidden;if(this.bUsePictures)this._picClose(Id);this._setCookie(Id,false);this.aFlipStatus[Id]=false;}}}
function FFlipFlop(Id)
{subId=this.sPreSub+Id;subObject=Browser.getRef(subId);if(subObject.style.display==""||subObject.style.display=="")this._flop(subObject,Id);else this._flip(subObject,Id);this.iLastId=Id;return void(0);}
function FFonlyFlip(Id)
{subId=this.sPreSub+Id;subObject=Browser.getRef(subId);if(subObject.style.display!="block"&&subObject.style.display!="")this._flip(subObject,Id);this.iLastId=Id;return void(0);}
function FFlastFlop(Id)
{subId=this.sPreSub+Id;subObject=Browser.getRef(subId);if(subObject.style.display=="block"||subObject.style.display=="")this._flop(subObject,Id);}
function FFlip(subObj,Id)
{subObj.style.display="";subObj.style.visibility=this.visible;this.aFlipStatus[Id]=true;this._setCookie(Id,true);if(this.bUsePictures)this._picOpen(Id);if((this.bUseLastFlop==1)&&(this.iLastId!=Id)&&(this.iLastId>-1))
{this._lastFlop(this.iLastId);}}
function FFlop(subObj,Id)
{subObj.style.display="none";subObj.style.visibility=this.hidden;this.aFlipStatus[Id]=false;this._setCookie(Id,false);if(this.bUsePictures)this._picClose(Id);}
function FSetCookie(p_strId,p_bOpen)
{if(!this.isCookie)
return;var l_bSet=false;if(p_bOpen&&this.bCookieOnOpenState)
l_bSet=true;else if(!p_bOpen&&!this.bCookieOnOpenState)
l_bSet=true;if(l_bSet)
{Helper.setCookie("co_"+p_strId,"1","0");}
else
{if(Helper.getCookieValueByParam("co_"+p_strId)!=false)
Helper.deleteCookie("co_"+p_strId);}
return;}
function UpDrRecordSelection()
{this.ofrHidden=null;this.aControlIds=new Array();this.aPushPop=new Array();this.strPreselType=null;this.strCheckPrefix=null;this.strTableGuid=null;this.doPushPop=funcDoPushPop;this.getAsString=funcGetAsString;this.setFormField=funcSetFormField;this.initFromString=funcInitFromString;this.initCheckboxFields=funcInitCheckboxFields;this._getCheckboxFieldsByTableReg=funcGetCheckboxFieldsByTableReg;this._getCheckboxFieldsByControlList=funcGetCheckboxFieldsByControlList;this.registerCheckBox=funcRegisterCheckbox;this.resetCurrentCheckBoxes=funcResetCurrentCheckBoxes;this.reset=funcResetRecordSelection;}
function funcResetRecordSelection()
{this.aPushPop=new Array();this.initCheckboxFields();}
function funcResetCurrentCheckBoxes()
{this.aControlIds=new Array();}
function funcRegisterCheckbox(p_strHtmlId)
{if(arguments.length<1||typeof(p_strHtmlId)!="string")return false;this.aControlIds.push(p_strHtmlId);}
function UpDrRecordSelectionEntry()
{this.name=null;this.value=null;}
function funcInitCheckboxFields()
{if(this.aControlIds&&this.aControlIds.length>0)
{var l_aControls=this._getCheckboxFieldsByControlList();}
else
{var l_aControls=this._getCheckboxFieldsByTableReg();}
for(var i=0;i<l_aControls.length;i++)
{var l_oChkField=l_aControls[i];if(l_oChkField&&typeof l_oChkField=="object")
{var l_strEntryName=l_oChkField.value;var l_bIsSelected=(this.strPreselType=="1")?true:false;for(var k=0;k<this.aPushPop.length;k++)
{if(this.aPushPop[k].name==l_strEntryName&&this.aPushPop[k].value!=l_bIsSelected)
{l_bIsSelected=(this.strPreselType=="1")?false:true;}}
l_oChkField.checked=l_bIsSelected;}}
this.setFormField();}
function funcGetCheckboxFieldsByControlList()
{var l_aRet=new Array();for(var i=(this.aControlIds.length-1);i>=0;i--)
{if(typeof(this.aControlIds[i])=="string")
{var l_oHtml=document.getElementById(this.aControlIds[i]);if(l_oHtml&&typeof(l_oHtml)=="object")
l_aRet.push(l_oHtml);else
this.aControlIds.splice(i,1);}
else
this.aControlIds.splice(i,1);}
return l_aRet;}
function funcGetCheckboxFieldsByTableReg()
{var l_aRet=new Array();if(oTableReg&&oTableReg.getTableByGuid(this.strTableGuid))
{if(oTableReg.getTableByGuid(this.strTableGuid).aRecIds)
{for(var i=0;i<oTableReg.getTableByGuid(this.strTableGuid).aRecIds.length;i++)
{var l_lRecId=oTableReg.getTableByGuid(this.strTableGuid).aRecIds[i];var l_oChkField=document.getElementById(this.strCheckPrefix+l_lRecId);if(l_oChkField&&typeof l_oChkField=="object")
{l_aRet.push(l_oChkField);}}}}
return l_aRet;}
function funcDoPushPop(p_strName,p_Value,p_bSetFormField)
{if(p_strName!="")
{var l_bIsAvailable=false;var l_lPos=-1;for(var i=0;i<this.aPushPop.length;i++)
{if(this.aPushPop[i].name==p_strName)
{l_bIsAvailable=true;l_lPos=i;break;}}
if(!l_bIsAvailable)
{var l_onewEntry=new UpDrRecordSelectionEntry();this.aPushPop.push(l_onewEntry);l_lPos=(this.aPushPop.length-1);}
this.aPushPop[l_lPos].name=p_strName;this.aPushPop[l_lPos].value=p_Value;if(p_bSetFormField)
this.setFormField();}}
function funcGetAsString()
{var p_Value=(this.strPreselType=="1")?false:true;var l_aOut=[];var l_bAdd=false;for(var i=0;i<this.aPushPop.length;i++)
{l_bAdd=false;if(p_Value!=null)
{if(this.aPushPop[i].value==p_Value)
l_bAdd=true;}
else
{l_bAdd=true;}
if(l_bAdd)
{if(l_aOut.length>0)l_aOut.push('||');l_aOut.push(this.aPushPop[i].name);}}
return l_aOut.join("");}
function funcSetFormField()
{if(typeof this.ofrHidden!="undefined"&&this.ofrHidden!=null)
{this.ofrHidden.value=this.getAsString()}}
function funcInitFromString(p_strLastSel)
{var p_Value=(this.strPreselType=="1")?false:true;if(typeof p_strLastSel!="undefined"&&p_strLastSel!=null&&p_strLastSel!='')
{this.aPushPop=new Array();var l_aLastSel=Helper.undoCharStuffing(p_strLastSel);for(var i=0;i<l_aLastSel.length;i++)
{var l_onewEntry=new UpDrRecordSelectionEntry();l_onewEntry.name=l_aLastSel[i];l_onewEntry.value=p_Value;this.aPushPop.push(l_onewEntry);}}
if(this.ofrHidden&&p_strLastSel!=null)
this.ofrHidden.value=p_strLastSel;}
if(self.name!="wndDlgConfirm")
{upActionControl.prototype.eConfirm=new UpEnhancedConfirm();}
upActionControl.prototype.getConfirmDialog=funcGetConfirmDialog;upActionControl.prototype.confirmDelete=funcConfirmDelete;upActionControl.prototype.confirmOk=funcConfirmOk;upActionControl.prototype.confirmYesNoCancel=funcConfirmYesNoCancel;function funcGetConfirmDialog(p_strName,p_bToolTip)
{this.eConfirm.oActionCtrl=this;this.eConfirm.oActionCtrlObjektName='o'+this.oHtml.name;if(this.oFup&&this.oFup.runIn=="ToolTipPopup")
this.bToolTipConfirmDialog=true;else if(arguments.length>=2)
this.bToolTipConfirmDialog=p_bToolTip;else
this.bToolTipConfirmDialog=false;return this.eConfirm.getDialog(p_strName);}
function funcConfirmDelete(oHtml,e,title,descrition,p_bToolTip)
{this.eConfirm.oActionCtrl=this;if(this.oFup&&this.oFup.runIn=="ToolTipPopup")
this.bToolTipConfirmDialog=true;else if(arguments.length>=5)
this.bToolTipConfirmDialog=p_bToolTip;else
this.bToolTipConfirmDialog=true;this.eConfirm.oActionCtrlObjektName='o'+this.oHtml.name;oDialog=oHtml.oUp.eConfirm.getDialog("delete");if(oDialog.bFinished)
{switch(oDialog.getReturn())
{case 0:l_bDeleteReturn=false;oDialog.eConfirm.removeDialog("delete");break;case 1:l_bDeleteReturn=true;break;}}
else
{if(arguments.length>=3&&title!=null)
oDialog.title=title;else
oDialog.title='<span style="white-space:nowrap;">'+self.oUp.oMessage.CTRL_CONFIRM_DELETE+'</span>';if(arguments.length>=4&&descrition!=null)
oDialog.description=descrition;else
oDialog.description="<img src=\"images/assets/common/delete.png\" border=\"0\">";oDialog.buttons=[oDialog.BUTTON_YES,oDialog.BUTTON_NO];oDialog.show(e);return false;}
return l_bDeleteReturn;}
function funcConfirmOk(oHtml,e,title,descrition,p_bToolTip)
{this.eConfirm.oActionCtrl=this;this.eConfirm.oActionCtrlObjektName='o'+this.oHtml.name;if(this.oFup&&this.oFup.runIn=="ToolTipPopup")
this.bToolTipConfirmDialog=true;else if(arguments.length>=2)
this.bToolTipConfirmDialog=p_bToolTip;else
this.bToolTipConfirmDialog=false;oDialog=oHtml.oUp.eConfirm.getDialog("ok");if(oDialog.bFinished)
{return true;}
else
{if(arguments.length>=3&&title!=null)
oDialog.title=title;else
oDialog.title="<span style='white-space:nowrap;'>"+self.oUp.oMessage.CTRL_CONFIRM_DELETE+"</span>";if(arguments.length>=4&&descrition!=null)
oDialog.description=descrition;else
oDialog.description="<img src=\"images/assets/common/delete.png\" border=\"0\">";oDialog.buttons=[oDialog.BUTTON_OK];oDialog.show(e);return false;}}
function funcConfirmYesNoCancel(oHtml,e,title,descrition,p_bToolTip)
{this.eConfirm.oActionCtrl=this;this.eConfirm.oActionCtrlObjektName='o'+this.oHtml.name;if(this.oFup&&this.oFup.runIn=="ToolTipPopup")
this.bToolTipConfirmDialog=true;else if(arguments.length>=2)
this.bToolTipConfirmDialog=p_bToolTip;else
this.bToolTipConfirmDialog=false;oDialog=oHtml.oUp.eConfirm.getDialog("yesnocancel");if(oDialog.bFinished)
{return oDialog.getReturn();}
else
{if(arguments.length>=3&&title!=null)
oDialog.title=title;else
oDialog.title="<span style='white-space:nowrap;'>"+self.oUp.oMessage.CTRL_CONFIRM_DELETE+"</span>";if(arguments.length>=4&&descrition!=null)
oDialog.description=descrition;else
oDialog.description="<img src=\"images/assets/common/delete.png\" border=\"0\">";oDialog.buttons=[oDialog.BUTTON_YES,oDialog.BUTTON_NO,oDialog.BUTTON_CANCEL];oDialog.show(e);return false;}}
function UpEnhancedConfirm()
{this.count=0;this.aDialogs={};this.oActionCtrl=null;this.addDialog=funcEnhancedConfirmAddDialog;this.removeDialog=funcEnhancedConfirmRemoveDialog;this.removeAllDialogs=funcEnhancedConfirmRemoveAllDialogs;this.getDialog=funcEnhancedConfirmGetDialog;this.isDialogFinished=funcEnhancedConfirmIsDialogFinished;this.cleanUp=funcEnhancedConfirmCleanUp;}
function funcEnhancedConfirmCleanUp()
{this.removeAllDialogs();this.aDialogs={};this.count=0;this.oActionCtrl=null;}
function funcEnhancedConfirmAddDialog(p_strName)
{this.aDialogs[p_strName]=new UpDialogEnhancedConfirm(p_strName);this.aDialogs[p_strName].eConfirm=this;return this.aDialogs[p_strName];}
function funcEnhancedConfirmRemoveDialog(p_strName)
{if(typeof this.aDialogs[p_strName]!="undefined"&&this.aDialogs[p_strName]!=null&&this.aDialogs[p_strName].upType=="UpDialogEnhancedConfirm")
{if(this.aDialogs[p_strName].wndDlgConfirm!=null)this.aDialogs[p_strName].wndDlgConfirm.bUsed=false;this.aDialogs[p_strName].close();this.aDialogs[p_strName]=null;}}
function funcEnhancedConfirmRemoveAllDialogs()
{for(var dlg in this.aDialogs)
this.removeDialog(dlg);}
function funcEnhancedConfirmGetDialog(p_strName)
{if(typeof this.aDialogs[p_strName]!="undefined"&&this.aDialogs[p_strName]!=null)
return this.aDialogs[p_strName];else
return this.addDialog(p_strName);}
function funcEnhancedConfirmIsDialogFinished(p_strName)
{if(typeof this.aDialogs[p_strName]!="undefined"&&this.aDialogs[p_strName]!=null&&this.aDialogs[p_strName].bFinished)
{return true;}
else
{return false;}}
function UpDialogEnhancedConfirm(p_strDlgName)
{this.BUTTON_YES={className:"upButtonControl",title:self.oUp.oMessage.GEN_YES,onclick:null,returnValue:1,style:"width:70px;"};this.BUTTON_NO={className:"upButtonControl",title:self.oUp.oMessage.GEN_NO,onclick:null,returnValue:0,style:"width:70px;"};this.BUTTON_CANCEL={className:"upButtonControl",title:self.oUp.oMessage.GEN_CANCEL,onclick:null,returnValue:-1,style:"width:70px;"};this.BUTTON_OK={className:"upButtonControl",title:self.oUp.oMessage.GEN_OK,onclick:null,returnValue:1,style:"width:70px;"};this.buttons=[this.BUTTON_YES,this.BUTTON_NO,this.BUTTON_CANCEL];this.upType="UpDialogEnhancedConfirm";this.title="";this.description="";this.bReturn=false;this.bAbort=false;this.bFinished=false;this.callAnalyseData=null;this.returnValue=-1;this.wndOpener=null;this.wndDlgConfirm=null;this.dlgName=p_strDlgName;this.getContent=funcEnhancedConfirmGetContent;this.getReturn=funcEnhancedConfirmGetReturn;this.setSize=funcEnhancedConfirmSetSize;this.show=funcEnhancedConfirmShow;this.close=funcEnhancedConfirmClose;this.abort=funcEnhancedConfirmAbort;this.init=funcEnhancedConfirmInit;this.reset=funcEnhancedConfirmReset;this.resetWndOpener=funcEnhancedConfirmResetWndOpener;this.setListener=funcEnhancedConfirmSetListener;this.renderButton=funcEnhancedConfirmRenderButton;}
function funcEnhancedConfirmGetReturn()
{var returnVal=(!isNaN(this.returnValue))?Number(this.returnValue):this.returnValue;return returnVal;}
function funcEnhancedConfirmShow(e)
{this.bFinished=false;if(!this.eConfirm.oActionCtrl||this.eConfirm.oActionCtrl==null)
{return false;}
var oActionControl=this.eConfirm.oActionCtrl;this.eConfirm.oActionCtrl.disable();this.wndOpener=window;self.oUp.oEvent=null;if(typeof e!="undefined"&&e!=null)
{self.oUp.oEvent=e;self.oUp.oRootWin.eventScreenX=e.screenX;self.oUp.oRootWin.eventScreenY=e.screenY;if(typeof e.pageX=="number")
{var l_iPosX=(e.pageX>100)?(e.pageX-100):(e.pageX);var l_iPosY=(e.pageY>100)?(e.pageY-100):(e.pageY);}
else if(typeof e.clientX=="number")
{var l_iPosX=(e.clientX+(oDocBody.scrollLeft||0));var l_iPosY=(e.clientY+(oDocBody.scrollTop||0));if(l_iPosY>100)l_iPosY-=100;if(l_iPosX>100)l_iPosX-=100;}}
else
{var oPosXY=Browser.getPosition2Page(oActionControl.oHtml);var l_iPosY=(oPosXY.posY>100)?oPosXY.posY-100:oPosXY.posY;var l_iPosX=oPosXY.posX;}
var content="";var content=this.getContent();if(oActionControl.bToolTipConfirmDialog)
{if(oActionControl.oToolTipPopup==null||typeof(wndDlgConfirm)=="undefined")wndDlgConfirm=new upToolTipPopup(oActionControl,"wndDlgConfirm",false);oActionControl.oToolTipPopup.layerY=l_iPosY;oActionControl.oToolTipPopup.layerX=l_iPosX;var contentKey=oActionControl.oToolTipPopup.addContent("",content);oActionControl.oToolTipPopup.getContentObject(contentKey).setPosition(oActionControl.oToolTipPopup.layerX,oActionControl.oToolTipPopup.layerY,250,250,"button-right");oActionControl.oToolTipPopup.showPopup(contentKey);oActionControl.oToolTipPopup.strOnUnLoad+="var oAct=document.getElementById('"+oActionControl.id+"');if(oAct && oAct.oUp){oAct.oUp.enable();};"
evalResponseJs(content);}
else
{wndDlgConfirm=self.oUp.oRootWin.createPopUp("wndDlgConfirm")
wndDlgConfirm.setHtmlName("wndDlgConfirm");wndDlgConfirm.setProps("dependent=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes");wndDlgConfirm.setContent(content);this.setSize(wndDlgConfirm);if(oActionControl&&oActionControl!=null)
wndDlgConfirm.setControlOfRef(oActionControl);wndDlgConfirm.setOffset(-100,-50);wndDlgConfirm.show();}
this.wndDlgConfirm=wndDlgConfirm;this.setListener(wndDlgConfirm);return true;}
function funcEnhancedConfirmGetContent()
{var fup=Helper.getFupId(this.eConfirm.oActionCtrl);var a=[];if(!this.eConfirm.oActionCtrl.bToolTipConfirmDialog)
{a.push('<html><head><META http-equiv="Content-Type" content="text/html;"><title>Confirm Dialog</title>\n');a.push('<link href="css/'+oHtmlRoot.oUp.oFormatInfo.layoutDir+'/application.css" type="text/css" rel="stylesheet">\n');a.push('<script charset="UTF-8" src="include/common.js" type="text/javascript"></script>\n');a.push('<script charset="UTF-8" src="include/object.js" type="text/javascript"></script>\n');}
a.push('<script type="text/javascript">\n');a.push('var bException = false;\n');if(!this.eConfirm.oActionCtrl.bToolTipConfirmDialog)
{a.push('try{var test=opener.oUp;}catch(e){alert("'+self.oUp.oMessage.WARNING_PERMISSION_DENIED_PAGE+'");self.close();}\n');a.push('var strOnload = "self.focus();if(self.oUp){window.oUp.resizeByContent(true);if(window.scrollbars){setTimeout(\'window.oUp.resizeByContent(true);\',100);}}wndDlgConfirm.bUsed = true;"\n');a.push('var strOnUnLoad = "onunloadWndConfirm();"\n');a.push('function getRef(strHtmlEl,oTargDoc){if(!strHtmlEl || !oTargDoc || !oTargDoc.getElementById(strHtmlEl)){return false;}return oTargDoc.getElementById(strHtmlEl);}');a.push('function getHtmlRoot(win){if(win.name=="wndRoot"){return win;}else if(win.opener && win.opener.oUp){return getHtmlRoot(win.opener);}else if(win==top){return win;}else if(win.parent && win.parent!=win){return getHtmlRoot(win.parent);}else{return null;}}');a.push('function onunloadWndConfirm(){if(self.eConfirm){if(!self.eConfirm.bFinished){self.eConfirm.abort();returnToOpener();}self.eConfirm.resetWndOpener();}}\n');}
a.push('function setReturnWndConfirm(p_lVal,e){if(isNaN(p_lVal) && !(typeof(p_lVal)==\'string\' && p_lVal.length>0)){p_lVal = -1;};if(self.eConfirm){wndDlgConfirm.bUsed = false;self.eConfirm.bReturn = true;self.eConfirm.bFinished = true;self.eConfirm.returnValue = p_lVal;self.eConfirm.resetWndOpener();');a.push('self.eConfirm.close();returnToOpener(e);');a.push('}}\n');a.push('function returnToOpener(e)');a.push('{');a.push('if(oTargetObj && oTargetObj.oUp){oTargetObj.oUp.enable();}');if(this.callAnalyseData!=null)
{a.push(this.callAnalyseData);}
else
{if(this.eConfirm.oActionCtrl.bToolTipConfirmDialog)
a.push('oTargetObj.onclick();');else
a.push('oTargetObj.onclick(e);');}
a.push('}');if(this.eConfirm.oActionCtrl.bToolTipConfirmDialog)
{a.push('self.setReturnWndConfirm=setReturnWndConfirm;');oTargDoc=document;}
else
{a.push('var oHtmlRoot = getHtmlRoot(self);\n');a.push('if(oHtmlRoot && oHtmlRoot.oUp && oHtmlRoot.oUp.oRegistry.oPopUpReg[self.name]){wndDlgConfirm = oHtmlRoot.oUp.oRegistry.oPopUpReg[self.name];wndDlgConfirm.oHtml=self;wndDlgConfirm.oHtml.oUp=wndDlgConfirm}');a.push('else{wndDlgConfirm = new upPopUpWindow();wndDlgConfirm.setRefToRootWin(oHtmlRoot.oUp);}\n');a.push('if(self.oUp && self.oUp.oRegistry.oFuncPartReg[\''+fup+'\']){var oTargFuncPart=self.oUp.oRegistry.oFuncPartReg[\''+fup+'\'];var oTargWindow = oTargFuncPart.oWindow.oHtml;var oTargDoc=self.oUp.oRegistry.oFuncPartReg[\''+fup+'\'].oPage.oHtml;}\n');a.push('else if(opener){var oTargDoc=opener.document}\n');a.push('if(typeof oTargDoc == "undefined" || !getRef("'+this.eConfirm.oActionCtrl.oHtml.id+'",oTargDoc) || !getRef("'+this.eConfirm.oActionCtrl.oHtml.id+'",oTargDoc).oUp || typeof getRef("'+this.eConfirm.oActionCtrl.oHtml.id+'",oTargDoc).oUp == "undefined"){bException=true;window.close();}\n');a.push('if(bException){strOnload = "window.close();";strOnUnLoad = "";}\n');}
a.push('var oTargetObj = getRef("'+this.eConfirm.oActionCtrl.oHtml.id+'",oTargDoc);\n');a.push('if(!bException)self.eConfirm = getRef("'+this.eConfirm.oActionCtrl.oHtml.id+'",oTargDoc).oUp.eConfirm.getDialog("'+this.dlgName+'");\n');a.push('</script>\n');if(!this.eConfirm.oActionCtrl.bToolTipConfirmDialog)
{a.push('</head>\n');a.push('<body onunload="eval(strOnUnLoad);" onBlur="self.focus();" class="SCUP_Application_Standard_normal" style="height:100%;vertical-align : middle;" marginwidth="0" marginheight="0" topmargin="0" rightmargin="0" leftmargin="0" onload="eval(strOnload)">\n');a.push('<script charset="$charset" type="text/javascript" src="include/custom/custom.js"></script>\n');}
a.push('<form accept-charset="$charset" name="Form_ED">');a.push('<table border="0" cellspacing="10" cellpadding="0" width="100%" height="100%">\n');a.push('<tr>\n');a.push('<td height="100%" valign="middle" style="vertical-align : middle;">\n');a.push('<table border="0" cellspacing="0" cellpadding="0" width="100%" height="120">\n');if(this.title!="")
{a.push('<tr>\n');a.push('<td class="SCUP_Text_H3_normal" style="text-align : center;" align="middle">'+this.title+'</td>\n');a.push('</tr>\n');a.push('<tr>\n');a.push('<td>&nbsp;</td>\n');a.push('</tr>\n');}
if(typeof(this.description)=="string"&&this.description!="")
{a.push('<tr>\n');a.push('<td class="SCUP_Text_Standard_normal" style="text-align : center;" align="middle">'+this.description+'</td>\n');a.push('</tr>\n');a.push('<tr>\n');a.push('<td>&nbsp;</td>\n');a.push('</tr>\n');}
else if(typeof(this.description)=="object"&&this.description.length>0)
{a.push('<tr>\n');a.push('<td class="SCUP_Text_Standard_normal" style="text-align : center;" align="middle">');for(var i=0;i<this.description.length;i++)
{switch(this.description[i].type)
{case"text":a.push(this.description[i].value);break;case"button":a.push(this.renderButton(this.description[i].value,i,false));break;}}
a.push('</td>\n</tr>\n');}
a.push('<tr>\n');a.push('<td style="text-align:center; white-space:nowrap;" align="middle">\n');for(var i in this.buttons)
{var button=this.buttons[i];if(i==0)
isSelected=true;else
isSelected=false;a.push(this.renderButton(button,i,isSelected));}
a.push('</td>\n');a.push('</tr>\n');a.push('</table>\n');a.push('</td>\n');a.push('</tr>\n');a.push('</table>\n');a.push('</form>');if(!this.eConfirm.oActionCtrl.bToolTipConfirmDialog)
{a.push('</body></html>\n');}
return a.join("");}
function funcEnhancedConfirmSetSize(wndDlgConfirm)
{wndDlgConfirm.setSize(190,190);}
function funcEnhancedConfirmClose()
{if(this.eConfirm&&this.eConfirm.oActionCtrl&&this.eConfirm.oActionCtrl.bToolTipConfirmDialog&&this.wndDlgConfirm!=null&&typeof this.wndDlgConfirm.bUsed!="undefined"&&!this.wndDlgConfirm.bUsed&&this.wndDlgConfirm!=null)
{try
{this.wndDlgConfirm.closePopup();}catch(e){}
this.wndDlgConfirm=null;}
else if(this.wndDlgConfirm&&this.wndDlgConfirm.oHtml&&!this.wndDlgConfirm.oHtml.closed&&typeof this.wndDlgConfirm.bUsed!="undefined"&&!this.wndDlgConfirm.bUsed)
{if(!this.bReturn&&!this.bFinished)
this.bAbort=true;wndDlgConfirm.close();}
return;}
function funcEnhancedConfirmRenderButton(button,i,bSelected)
{var strReturn="";switch(button.className)
{case"upButtonControl":if(!isNaN(button.returnValue)||(typeof(button.returnValue)=="string"&&button.returnValue.length>0))
{strReturn+='<input style="'+button.style+'" onclick="setReturnWndConfirm(\''+button.returnValue+'\')" id="ID_Button_'+i+'" name="Button_'+i+'" class="SCUP_Button_Standard_normal" type="button" value="'+button.title+'"/>\n';if(bSelected)
{strReturn+='<script type="text/javascript">\n';if(this.eConfirm.oActionCtrl.bToolTipConfirmDialog)
{strReturn+='self.oUp.strOnLoad += \'document.getElementById("ID_Button_'+i+'").focus();\'';}
else
{strReturn+='strOnload += \'document.forms[0].Button_'+i+'.focus();\'';}
strReturn+='</script>\n';}}
break;}
return strReturn;}
function funcEnhancedConfirmSetListener()
{var oActionControl=this.eConfirm.oActionCtrl;if(oActionControl.bToolTipConfirmDialog)
{if(oActionControl.oFup&&oActionControl.oFup.runIn=="ToolTipPopup")
{this.strWndOpenerOnUnLoad=oActionControl.oFup.oToolTipPopup.strOnUnLoad;oActionControl.oFup.oToolTipPopup.strOnUnLoad="checkWndConfirm("+this.eConfirm.oActionCtrlObjektName+");"+oActionControl.oFup.oToolTipPopup.strOnUnLoad;}
else
{this.strWndOpenerOnUnLoad=self.oUp.strOnUnLoad;self.oUp.strOnUnLoad="checkWndConfirm("+this.eConfirm.oActionCtrlObjektName+");"+self.oUp.strOnUnLoad;}}
else
{this.strWndOpenerOnUnLoad=this.wndOpener.oUp.strOnUnLoad;this.strWndOpenerOnFocus=this.wndOpener.oUp.onFocus;this.wndOpener.oUp.strOnUnLoad="checkWndConfirm("+this.eConfirm.oActionCtrlObjektName+");"+this.wndOpener.oUp.strOnUnLoad;this.wndOpener.onFocus=this.eConfirm.oActionCtrlObjektName+'.eConfirm.wndDlgConfirm.focus();';}}
function funcEnhancedConfirmResetWndOpener()
{var oActionControl=this.eConfirm.oActionCtrl;this.wndDlgConfirm.bUsed=false;if(this.eConfirm&&this.eConfirm.oActionCtrl&&this.eConfirm.oActionCtrl.bToolTipConfirmDialog)
{if(oActionControl.oFup&&oActionControl.oFup.runIn=="ToolTipPopup")
{oActionControl.oFup.oToolTipPopup.strOnUnLoad=this.strWndOpenerOnUnLoad;}
else
{self.oUp.strOnUnLoad=this.strWndOpenerOnUnLoad;}}
else if(this.wndOpener&&this.wndOpener.oUp)
{this.wndOpener.oUp.strOnUnLoad=this.strWndOpenerOnUnLoad;this.wndOpener.onFocus=this.strWndOpenerOnFocus;}}
function funcEnhancedConfirmAbort()
{if(this.wndDlgConfirm)
this.wndDlgConfirm.bUsed=false;this.bFinished=true;this.bUsed=false;this.bAbort=true;}
function funcEnhancedConfirmInit()
{}
function funcEnhancedConfirmReset()
{}
function checkWndConfirm(openerCtrl)
{if(openerCtrl&&openerCtrl.eConfirm)
{openerCtrl.eConfirm.cleanUp()}}
if(typeof(g_TTRegistry)=="undefined"||g_TTRegistry==null)
{g_TTRegistry=new upTooltipRegistry();}
function upTooltipRegistry()
{this.aTT=[];this.aZindex=new Array(1000);}
upTooltipRegistry.prototype.addTT=upTooltipRegistryAdd;upTooltipRegistry.prototype.getTT=upTooltipRegistryGet;upTooltipRegistry.prototype.removeTT=upTooltipRegistryRemove;upTooltipRegistry.prototype.getList=upTooltipRegistryGetList;upTooltipRegistry.prototype.pushZindex=upTooltipRegistryPushZindex;upTooltipRegistry.prototype.popZindex=upTooltipRegistryPopZindex;upTooltipRegistry.prototype.cleanZindex=upTooltipRegistryCleanZindex;function upTooltipRegistryPushZindex()
{this.aZindex.push(false);return this.aZindex.length;}
function upTooltipRegistryPopZindex(p_iZi)
{if(typeof(p_iZi)!="number")
{this.aZindex.pop();}
else
{p_iZi--;if(p_iZi<this.aZindex.length)
{this.aZindex[p_iZi]=true;}}
this.cleanZindex();}
function upTooltipRegistryCleanZindex()
{var last=this.aZindex.length-1;for(var i=last;i>=0;i--)
{if(this.aZindex[i])
{this.aZindex.pop();}
else
{break;}}}
function upTooltipRegistryGetList()
{return this.aTT;}
function upTooltipRegistryGet(p_strKey)
{var l_Ret=false;for(var i=0;i<this.aTT.length;i++)
{if(this.aTT[i].strLayerName==p_strKey)
{l_Ret=this.aTT[i];break;}}
return l_Ret;}
function upTooltipRegistryAdd(p_oTT)
{if(!this.getTT(p_oTT.strLayerName))
{this.aTT.push(p_oTT);}
return true;}
function upTooltipRegistryRemove(p_oTT)
{for(var i=0;i<this.aTT.length;i++)
{if(this.aTT[i].strLayerName==p_oTT.strLayerName)
{this.aTT.splice(i,1);break;}}}
var MouseX=0;var MouseY=0;var isNetscape=false;var isMSIE=false;function upToolTip(strObjectName,strLayerName)
{this.objectName=strObjectName;this.strStatus="idle";if(strLayerName!=null&&typeof strLayerName=='string')
this.strLayerName=strLayerName;else
this.strLayerName="containerTooltip";this.getBrowserInfos=funcGetBrowserInfos;this.getBrowserInfos();this.strTooltipOnLoad='';this.bLayer=false;this.oFader=new upFader();this.aWindowRegion=null;;this.aContentArray=new Array();this.aQueue=new Array();this.lContentKey=0;this.bInit=false;this.maxTrials=10;this.currentTrial=0;this.positionHandling=null;this.fixedPinPosition=null;this.currKey=null;this.bShowHeader=null;this.bCloseButton=null;this.positionHandling=null;this.layerPosition=null;this.fixedPos=null;this.iDelayedTimeout=-1;this.strDelayedKey=null;this.iMouseXDiff=null;this.iMouseYDiff=null;this._resetAutoClose=funcResetAutoClose;this._init=funcInitTooltip;this._hide=funcHideTooltip;this._moveTo=funcMoveTooltipTo;this._makeVisible=_funcMakeVisibleTooltip;this._releaseMouse=funcReleaseMouseTooltip;this._catchMouse=funcCatchMouseTooltip;this._setContent=funcSetContentTooltip;this._isVisible=funcIsVisibleTooltip;this._getRegion=funcGetRegionTooltip;this._getWindowRegion=funcGetWindowRegionTooltip;this._getWindowScrollY=funcGetWindowScrollYTooltip;this._getWindowScrollX=funcGetWindowScrollXTooltip;this._calcPositionXYWH=funcCalcPositionXYWH;this._resetDivFixedPos=funcResetDivFixedPos;this._handleQueue=funcHandleQueue;this._isInQueue=funcIsInQueue;this._close=funcCloseTooltipStep2;this._fadeIn=funcTooltipFadeIn;this._fadeOut=funcTooltipFadeOut;this._abortFading=funcTooltipAbortFading;this.setOpacity=funcSetOpacity;this.trialKey=-1;this.showCloseButton=funcShowCloseButtonTooltip;this.onMouseOver=funcTooltipOnMouseOver;this.onMouseOut=funcTooltipOnMouseOut;this.onFocus=funcTooltipOnFocus;this._setContainerEvents=funcSetContainerEvents;this._cleanUp=funcTooltip_CleanUp;this.cleanUp=funcTooltipCleanUp;this.refreshCloseInterval=funcRefreshCloseInterval;this.close=funcCloseTooltip;this.clearContent=funcClearContent;this.addContent=funcAddContentTooltip_byText;this.addContentById=funcAddContentTooltip_byTextId
this.addObject=funcAddContentTooltip_byObject;this.addNodeById=funcAddNodeTooltip_byId;this.getContentObject=funcGetContentObjectTooltip;this.show=funcShowTooltip;this._show=func_ShowTooltip;this._clearDelay=func_ClearDelay;this.resize=funcResizeTooltip;this.quickView=funcQuickViewTooltip;this.reset=funcResetTooltip;this.setContentAttribute=setContentAttributeTooltip;this.setContentAttributes=setContentAttributesTooltip;this.setDefaults=funcSetDefaults;this.init=funcInit;this.isVisible=funcIsVisible;this.setPosition=funcSetPosition;this.customOnMouseOver=null;this.customOnMouseOut=null;this.customOnFocus=null;this.onResize=funcOnResizeTooltip;this.strTooltipOnLoad+=this.objectName+'.init();';this.setDefaults();}
function upTooltipContent(p_oContainer)
{this.oHtml=p_oContainer;this.key=null;this.width="250";this.heigth="100";this.iMaxHeight=null;this.classContainer="";this.classHeaderBg="SCUP_TT_MOUSEOVER_Header_normal_BG";this.classHeader="SCUP_TT_MOUSEOVER_Header_normal";this.classHeaderLink="SCUP_TT_MOUSEOVER_Header_Link";this.classContentBg="SCUP_TT_MOUSEOVER_normal_BG";this.classContent="SCUP_TT_MOUSEOVER_normal";this.text="";this.node=null;this.parentNode=null;this.title=null;this.autoClose=false;this.autoCloseInterval=10000;this.waitOnClose=false;this.bReplaceSame=false;this.extensionOfInterval=true;this.autoCloseId=-1;this.positionHandling=null;this.fixedPinPosition=null;this.closeButton=null;this.opacity=100;this.fadeIn=false;this.fadeInType="opacity";this.fadeInSteps=10;this.fadeOut=false;this.bShowHeader=null;this.bCloseButton=null;this.fadeOutType="opacity";this.fadeOutSteps=10;this.checkLayerHeight=false;this.checkLayerWidth=false;this.layerPosition=null;this.bModal=false;this.bShowDelayed=false;this.iDelay=350;this.setPosition=funcTooltipContentSetPosition;this.setPositionRelative=funcTooltipContentSetPositionRelative;this.strOnload="";this.strOnUnload="";this.oTgtContainer=false;}
function funcTooltipContentSetPosition(x,y,width,height,type)
{if((this.positionHandling==null||this.positionHandling=="fixed")&&arguments.length>=4&&!isNaN(x)&&!isNaN(y)&&!isNaN(width)&&!isNaN(height))
{this.positionHandling="fixed";this.fixedPinPosition=type;this.layerPosition=new Array();this.layerPosition.x=x;this.layerPosition.y=y;this.layerPosition.width=width;this.layerPosition.height=height;this.width=width;this.height=height;}}
function funcTooltipContentSetPositionRelative(p_oHtml)
{if(arguments.length==0||p_oHtml==null||!p_oHtml)return false;if(p_oHtml.tagName=="TABLE")
{var e;if(document.getElementById(p_oHtml.id+"_ttp"))
{return this.setPositionRelative(document.getElementById(p_oHtml.id+"_ttp"));}
else
{var l_iLength=p_oHtml.childNodes.length;for(var i=0;i<l_iLength;i++)
{e=p_oHtml.childNodes[i];if(e.tagName=="TBODY"||e.tagName=="TR")
{return this.setPositionRelative(e);break;}}}}
else if(p_oHtml.tagName=="TBODY")
{return this.setPositionRelative(p_oHtml.firstChild);}
else if(p_oHtml.tagName=="TR"||p_oHtml.tagName=="TH")
{var l_iCells=0;var l_iLength=p_oHtml.childNodes.length;var e,c;for(var i=0;i<l_iLength;i++)
{e=p_oHtml.childNodes[i];if(e.tagName=="TD"||e.tagName=="TH")
{c=e.getAttribute("colspan");if(!isNaN(c)&&Number(c)>0)
l_iCells+=Number(c);else
l_iCells++;}}
if(l_iCells>0)
{var t=null;if(p_oHtml.parentNode.tagName=="TABLE")
t=p_oHtml.parentNode;if(p_oHtml.parentNode.parentNode.tagName=="TABLE")
t=p_oHtml.parentNode.parentNode;if(t!=null)
{var id=t.id+"_ttp"
var tr,td;var l_iLength=t.childNodes.length;for(var i=0;i<l_iLength;i++)
{e=t.childNodes[i];if(e.tagName=="TBODY")
{t=e;break;}}
tr=document.createElement("tr");td=document.createElement("td");td.colSpan=l_iCells;td.id=id;tr.appendChild(td);td=null;tr.style.visibility="hidden";tr.style.display="none";t.appendChild(tr);tr=null;return this.setPositionRelative(document.getElementById(id));}}}
else if(p_oHtml.tagName=="TD"||p_oHtml.tagName=="DIV"||p_oHtml.tagName=="SPAN"||p_oHtml.tagName=="BODY")
{this.positionHandling="relative";this.oHtmlTargetContainer=p_oHtml;this.bShowHeader=false;return true}
return false;}
function funcOnResizeTooltip(e)
{if(this.currKey!=null&&this.currKey!=''&&this.isVisible(this.currKey))
{if(this.aContentArray[this.currKey].bModal)
{var oDivX=document.getElementById("ID_modalTTBack"+this.currKey);if(oDivX)
{var w=window.innerWidth?window.innerWidth:window.document.body.clientWidth;var h=window.innerHeight?window.innerHeight:window.document.body.clientHeight;w=Math.max(w,BrowserGetOffsetWidth(window));h=Math.max(h,BrowserGetOffsetHeight(window));oDivX.style.width=w+"px";oDivX.style.height=h+"px";l_aLayerParams=this._calcPositionXYWH(this.currKey);if(typeof l_aLayerParams!='object')
return false;this._moveTo(l_aLayerParams);}}}}
function funcSetContainerEvents()
{if(typeof this.oHtml!="undefined")
{this.oHtml.oUp=this;this.oHtml.onmouseover=this.onMouseOver;this.oHtml.onmouseout=this.onMouseOut;this.oHtml.onfocus=this.onFocus;}}
function funcTooltipOnMouseOver(e)
{if(this.oUp==null||typeof(this.oUp)!="object")
{this.onmouseover=null;this.onmouseout=null;}
else
{if(this.oUp.refreshCloseInterval)this.oUp.refreshCloseInterval(this.oUp.currKey);if(this.oUp.customOnMouseOver!=null)
{if(typeof(this.oUp.customOnMouseOver)=="string")
self.eval(this.oUp.customOnMouseOver);else
this.oUp.customOnMouseOver(e);}}}
function funcTooltipOnFocus(e)
{if(this.oUp!=null&&typeof(this.oUp)=="object")
{if(this.oUp.refreshCloseInterval)this.oUp.refreshCloseInterval(this.oUp.currKey);if(this.oUp.customOnFocus!=null)
{if(typeof(this.oUp.customOnFocus)=="string")
self.eval(this.oUp.customOnFocus);else
this.oUp.customOnFocus(e);}}}
function funcTooltipOnMouseOut()
{if(this.oUp.customOnMouseOut!=null)
{if(typeof(this.oUp.customOnMouseOut)=="string")
self.eval(this.oUp.customOnMouseOut);else
this.oUp.customOnMouseOut(e);}}
function funcSetDefaults()
{this.currKey='';this.bShowHeader=false;this.bCloseButton=false;this.positionHandling="dynamic";this.fixedPos=false;}
function funcSetPosition(x,y,width,height,type)
{if(arguments.length>=4&&!isNaN(x)&&!isNaN(y)&&!isNaN(width)&&!isNaN(height))
{this.positionHandling="fixed";this.fixedPinPosition=type;this.layerPosition=new Array();this.layerPosition.x=x;this.layerPosition.y=y;this.layerPosition.width=width;this.layerPosition.height=height;}}
function setContentAttributeTooltip(p_lKey,p_strName,p_strValue)
{if(p_lKey!=null&&p_lKey!=-1&&p_lKey!="")
{if(this.aContentArray&&typeof this.aContentArray[p_lKey]=="object")
{this.aContentArray[p_lKey][p_strName]=p_strValue;}}}
function setContentAttributesTooltip(p_lKey,p_oProps)
{if(p_lKey!=null&&p_lKey!=-1&&p_lKey!="")
{for(var prop in p_oProps)
{this.aContentArray[p_lKey][prop]=p_oProps[prop];}}}
function funcInit(p_bCleanUp)
{if(arguments.length<1)p_bCleanUp=true;this._init(p_bCleanUp);}
function funcInitTooltip(p_bCleanUp)
{this.oHtml=getElementByName(this.strLayerName,document);this.parentContainer=this.oHtml.parentNode;this.bInit=true;if(p_bCleanUp)
{var l_oFup=false;var fupId=Helper.getFupId(this.oHtml);if(fupId&&oHtmlRoot.oUp.oRegistry.oFuncPartReg[fupId])
{l_oFup=oHtmlRoot.oUp.oRegistry.oFuncPartReg[fupId];}
else if(self.oUp&&self.oUp.oFuncPart)
{l_oFup=self.oUp.oFuncPart;}
if(l_oFup&&l_oFup.aObjects)
{l_oFup.aObjects.push(this);}
else if(self.oUp&&self.oUp.strOnUnLoad)
{self.oUp.strOnUnLoad="if(typeof("+this.objectName+")!='undefined' && "+this.objectName+"!=null){"+this.objectName+"._cleanUp();}"+self.oUp.strOnUnLoad;}}
g_TTRegistry.addTT(this);this._catchMouse();this._setContainerEvents();}
function funcCatchMouseTooltip()
{if(g_TTRegistry.getList().length==1)
{if(typeof(EventManager)=="object"||typeof(EventManager)=="function")
{this.iListenerMouseMove=EventManager.addListener(document,"mousemove",MouseMove);}
else
{if(isNetscape){self.onmousemove=MouseMove;}
if(isMSIE){document.onmousemove=MouseMove;}}}}
function funcTooltip_CleanUp()
{try
{if(this.isVisible())this.close(true,null,false,false);}
catch(e)
{ErrorHandler.warn(e,"funcTooltip_CleanUp");}
this._releaseMouse();this._clearDelay();g_TTRegistry.removeTT(this);}
function funcTooltipCleanUp()
{this._cleanUp();}
function funcReleaseMouseTooltip()
{if(g_TTRegistry.getList().length==1)
{if(typeof(EventManager)=="object"||typeof(EventManager)=="function")
{EventManager.removeListener(this.iListenerMouseMove);}
else
{if(isNetscape){self.onmousemove="";}
if(isMSIE){document.onmousemove="";}}}}
function _funcMakeVisibleTooltip(p_strFaderType)
{if(typeof(this.oHtml)!="undefined")
{this.oHtml.style.visibility="visible";this.oHtml.style.display="";if(p_strFaderType=="opacity")
this.setOpacity(0);else
this.setOpacity(this.aContentArray[this.currKey].opacity);}}
function funcHideTooltip()
{if(this.currKey!=null&&this.currKey!=''&&typeof this.aContentArray[this.currKey]=="object"&&this.aContentArray[this.currKey].autoCloseId!=-1)
{this._resetAutoClose(this.currKey);}
if(typeof this.oHtml!="undefined")
{this.oHtml.style.visibility="hidden";}
if(this.aContentArray[this.currKey])
{this.setOpacity(this.aContentArray[this.currKey].opacity);}}
function funcIsVisibleTooltip()
{if(typeof(this.oHtml)!="undefined"&&this.oHtml!=null)
{return(this.oHtml.style.visibility=="visible")}}
function funcIsVisible(p_key)
{if(funcIsVisible.arguments.length==1)
{if(this._isVisible()&&this.currKey==p_key)
return true;else
return false;}
else
{if(this._isVisible())
return true;else
return false;}}
function funcMoveTooltipTo(p_aParams)
{var l_oCnt=this.aContentArray[this.currKey]
if(typeof(this.oHtml)!="undefined")
{if(l_oCnt.positionHandling=="relative"&&l_oCnt.oHtmlTargetContainer)
{l_oCnt.oHtmlSourceContainer=this.oHtml.parentNode;l_oCnt.oHtmlSourceContainer.removeChild(this.oHtml);this.oHtml.style.position="relative";this.oHtml.style.visibility="visible";this.oHtml.style.display="";this.oHtml.style.width="100%";l_oCnt.oHtmlTargetContainer.appendChild(this.oHtml);if(l_oCnt.oHtmlTargetContainer.style.visibility=="hidden")
{l_oCnt.oHtmlTargetContainer.style.visibility="visible";l_oCnt.oHtmlTargetContainer.style.display="";l_oCnt.strOnUnload+="var o=document.getElementById('"+l_oCnt.oHtmlTargetContainer.id+"');if(o){o.style.visibility='hidden';o.style.display='none';}";}
else if(l_oCnt.oHtmlTargetContainer.parentNode&&l_oCnt.oHtmlTargetContainer.parentNode.style.visibility=="hidden")
{l_oCnt.oHtmlTargetContainer.parentNode.style.visibility="visible";l_oCnt.oHtmlTargetContainer.parentNode.style.display="";l_oCnt.strOnUnload+="var o=document.getElementById('"+l_oCnt.oHtmlTargetContainer.parentNode.id+"');if(o){o.style.visibility='hidden';o.style.display='none';}";}}
else
{if(p_aParams.lPosY<0||p_aParams.lPosX<0)
this.oHtml.style.position=(Browser.ie&&!Browser.ie7up)?"absolute":"fixed";else
this.oHtml.style.position="absolute";if(p_aParams.lPosY<0)
{this.oHtml.style.bottom=(p_aParams.lPosY+1)+"px";}
else
this.oHtml.style.top=(p_aParams.lPosY)+"px";if(p_aParams.lPosX<0)
{this.oHtml.style.right=(p_aParams.lPosX+1)+"px";}
else
this.oHtml.style.left=(p_aParams.lPosX)+"px";}
if(Browser.ie6)
{var bHide=false;if(this.oHtml.style.display=="none")
{this.oHtml.style.display="";bHide=true;}
if(document.getElementById("Container_Stage"))
var l_oPosXY=Browser.getPosition2Container(this.oHtml);else
var l_oPosXY=Browser.getPosition2Page(this.oHtml);var oIframe=null;if(document.getElementById(this.currKey+"_mask")!=null)
{oIframe=document.getElementById(this.currKey+"_mask");}
else
{oIframe=document.createElement("iframe");oIframe.setAttribute("id",this.currKey+"_mask");oIframe.setAttribute("name",this.currKey+"_mask");oIframe.setAttribute("frameborder","0");oIframe.setAttribute("src","javascript:false");oIframe.style.position="absolute";oIframe.style.zIndex=this.aContentArray[this.currKey].zIndex-1;oIframe.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=0)";var temp=this.oHtml.parentNode.appendChild(oIframe);temp=null;}
if(l_oCnt.bModal)
{var w=window.innerWidth?window.innerWidth:window.document.body.clientWidth;var h=window.innerHeight?window.innerHeight:window.document.body.clientHeight;w=Math.max(w,BrowserGetOffsetWidth(window));h=Math.max(h,BrowserGetOffsetHeight(window));oIframe.style.top="0px";oIframe.style.width=w+"px";oIframe.style.height=h+"px";}
else
{oIframe.style.top=l_oPosXY.posY;oIframe.style.left=l_oPosXY.posX;oIframe.style.width=this.oHtml.offsetWidth;oIframe.style.height=this.oHtml.offsetHeight;}
if(bHide)this.oHtml.style.display="none";oIframe=null;}}}
function funcSetContentTooltip(p_strContent)
{if(typeof(this.oHtml)!="undefined")
{this.oHtml.innerHTML=p_strContent;}}
function funcGetRegionTooltip(p_lKey)
{oContent=this.aContentArray[p_lKey]
var c=new Array();if(typeof(this.oHtml)!="undefined")
{if(this.positionHandling=="fixed"&&oContent.checkLayerHeight)
{var realContainerHeight=(this.ns4up)?this.oHtml.document.height:this.oHtml.offsetHeight;if(this.layerPosition!=null&&oContent.checkLayerHeight&&this.layerPosition.height!=realContainerHeight)
{var remainderHeight=(this.layerPosition.height-realContainerHeight);switch(this.fixedPinPosition)
{case"bottom-right":case"bottom-left":if(!Browser.ie||Browser.ie7up)break;this.layerPosition.y+=remainderHeight;break;}
this.layerPosition.height-=remainderHeight;}}
if(this.positionHandling=="fixed"&&oContent.checkLayerWidth)
{var realContainerWidth=(this.ns4up)?this.oHtml.document.width:this.oHtml.offsetWidth;if(this.layerPosition!=null&&oContent.checkLayerWidth)
{var remainderWidth=(this.layerPosition.width-realContainerWidth);switch(this.fixedPinPosition)
{case"bottom-right":case"top-right":if(!Browser.ie||Browser.ie7up)break;case"bottom-left":this.layerPosition.x+=remainderWidth;break;}
this.layerPosition.width-=remainderWidth;}}
if(isNetscape)
{if((typeof(this.oHtml.offsetWidth)!="undefined")&&(typeof this.oHtml.offsetHeight!="undefined"))
{c.height=this.oHtml.offsetHeight;c.width=this.oHtml.offsetWidth;}
else
{c.left=this.oHtml.left;if(typeof c.left!="undefined")
{c.right=c.left+this.oHtml.clip.width;c.top=this.oHtml.top;c.down=c.top+this.oHtml.clip.height;c.height=this.oHtml.height;c.width=this.oHtml.clip.width;}}}
if(isMSIE)
{if(this.layerPosition!=null&&oContent.checkLayerHeight&&this.layerPosition.height<realContainerHeight)
this.layerPosition.height=realContainerHeight;if(this.layerPosition!=null&&oContent.checkLayerWidth&&this.layerPosition.width<realContainerWidth)
this.layerPosition.width=realContainerWidth;c.left=parseInt(this.oHtml.style.left);c.right=c.left+this.oHtml.offsetWidth;c.top=parseInt(this.oHtml.style.top);c.down=c.top+this.oHtml.offsetHeight;c.width=this.oHtml.offsetWidth;c.height=this.oHtml.offsetHeight;}
this.LayerRegion=c;}}
function funcGetWindowRegionTooltip()
{var c=new Array();if(this.ns4up)
{c.height=self.innerHeight;c.width=self.innerWidth-10;}
else if(this.ns4||Browser.safari)
{c.height=self.innerHeight;c.width=self.innerWidth;}
else if(this.ie4up)
{c.width=self.oDocBody.clientWidth;c.height=self.oDocBody.clientHeight;}
else if(this.iedom)
{c.width=self.oDocBody.clientWidth+self.oDocBody.scrollLeft;c.height=self.oDocBody.clientHeight+self.oDocBody.scrollTop;}
this.aWindowRegion=c;}
function funcGetWindowScrollYTooltip()
{if(isNetscape)
{return self.pageYOffset;}
if(isMSIE)
{return self.oDocBody.scrollTop;}}
function funcGetWindowScrollXTooltip()
{if(isNetscape)
{return self.pageXOffset;}
if(isMSIE)
{return self.oDocBody.scrollLeft;}}
function funcGetContentObjectTooltip(p_lKey)
{if(this.aContentArray&&typeof this.aContentArray[p_lKey]=="object")
{return this.aContentArray[p_lKey];}
else
{return null;}}
function funcClearContent(p_lKey)
{if(this.aContentArray&&typeof this.aContentArray[p_lKey]=="object")
{this.aContentArray[p_lKey]=null;}
var aContentArrayNew=new Array();for(var c in this.aContentArray)
{if(this.aContentArray[c]!=null)aContentArrayNew[c]=this.aContentArray[c];}
this.aContentArray=aContentArrayNew;return true;}
function funcAddContentTooltip_byText(p_strTitle,p_strText)
{var newTooltipContent=new upTooltipContent(this);this.lContentKey=Math.round(Math.random()*350000);if(!p_strText||p_strText==null)
p_strText="";if(p_strTitle!=null)
{newTooltipContent.title=p_strTitle;this.bShowHeader=true;}
newTooltipContent.text=p_strText;newTooltipContent.key=this.lContentKey;this.aContentArray[this.lContentKey]=newTooltipContent;return this.lContentKey;}
function funcAddContentTooltip_byTextId(p_strTitle,p_strText,p_lId)
{if(p_lId!=this.currKey||p_strText!=this.aContentArray[this.currKey].text)
{if(p_lId==this.currKey)this.close(true,this.currKey,false,true);var newTooltipContent=new upTooltipContent(this);if(!p_strText||p_strText==null)
p_strText="";if(p_strTitle!=null)
{newTooltipContent.title=p_strTitle;this.bShowHeader=true;}
newTooltipContent.text=p_strText;newTooltipContent.key=p_lId;this.aContentArray[p_lId]=newTooltipContent;}
return p_lId;}
function funcAddNodeTooltip_byId(p_oNode,p_lId)
{if(p_oNode!=null&&typeof p_oNode=="object")
{if(p_lId!=this.currKey)
{var newTooltipContent=new upTooltipContent(this);newTooltipContent.title=null;this.bShowHeader=false;newTooltipContent.node=p_oNode;newTooltipContent.key=p_lId;newTooltipContent.width=p_oNode.width;newTooltipContent.height=100;this.aContentArray[p_lId]=newTooltipContent;}
return p_lId;}
else
return-1;}
function funcAddContentTooltip_byObject(p_oTooltipContent)
{if(p_oTooltipContent!=null)
{if(this.currKey!=p_oTooltipContent.key)
{this.aContentArray[p_oTooltipContent.key]=p_oTooltipContent;if(p_oTooltipContent.title!=null)
this.bShowHeader=true;}
return p_oTooltipContent.key;}
else
{return-1;}}
function func_ClearDelay()
{if(this.iDelayedTimeout>-1)window.clearTimeout(this.iDelayedTimeout);this.strDelayedKey=null;}
function funcShowTooltip(p_lKey)
{if(this.strStatus=="close"&&p_lKey==this.currKey)return;if(p_lKey==null)
{this._handleQueue();return;}
else if(p_lKey==-1)
{return;}
if(typeof this.aContentArray[p_lKey]=="object"&&this.bInit&&(!this._isVisible()||!this.aContentArray[p_lKey].waitOnClose||(p_lKey==this.currKey&&this.aContentArray[p_lKey].bReplaceSame)))
{if(p_lKey!=this.currKey&&this.aContentArray[p_lKey].bShowDelayed)
{if(this.strDelayedKey!=p_lKey)
{this._clearDelay();this.strDelayedKey=p_lKey;if(!isNaN(p_lKey))
this.iDelayedTimeout=window.setTimeout(this.objectName+"._show("+p_lKey+");",this.aContentArray[p_lKey].iDelay);else
this.iDelayedTimeout=window.setTimeout(this.objectName+"._show('"+p_lKey+"');",this.aContentArray[p_lKey].iDelay);}}
else
{this._show(p_lKey);}}
else
{l_bInQueue=this._isInQueue(p_lKey);if(!this.bInit&&!l_bInQueue&&p_lKey!=this.currKey)
{self.clearTimeout(this.trialKey);if(!this.aContentArray[p_lKey].waitOnClose)
this.aQueue.unshift(this.aContentArray[p_lKey])
else
this.aQueue.push(this.aContentArray[p_lKey]);if(this.trialKey==-1&&this.currentTrial<=this.maxTrials)
{this.trialKey=self.setTimeout(this.objectName+".currentTrial++;"+this.objectName+".trialKey=-1;"+this.objectName+".show();",3000);}}
else if(!l_bInQueue)
{self.clearTimeout(this.trialKey);this.aQueue.push(this.aContentArray[p_lKey]);if(this.trialKey==-1&&this.currentTrial<=this.maxTrials)
this.trialKey=self.setTimeout(this.objectName+".currentTrial++;"+this.objectName+".trialKey=-1;"+this.objectName+".show();",3000);}}
return true;}
function func_ShowTooltip(p_lKey)
{if(p_lKey==null)
{this._handleQueue();return;}
else if(p_lKey==-1)
{return;}
if(this.isVisible())this.close((p_lKey!=this.currKey),this.currKey,false,true);if(this._isInQueue(p_lKey))
this.aQueue.shift();this.currKey=p_lKey;this.strStatus="show";if(this.aContentArray[p_lKey].bModal)g_TTRegistry.pushZindex();if(Browser.ie6)g_TTRegistry.pushZindex();this.aContentArray[p_lKey].zIndex=g_TTRegistry.pushZindex();if(this.aContentArray[p_lKey].bModal)
{var oDivX=document.createElement("div");var l_iOpacity=75;var w=window.innerWidth?window.innerWidth:window.document.body.clientWidth;var h=window.innerHeight?window.innerHeight:window.document.body.clientHeight;w=Math.max(w,BrowserGetOffsetWidth(window));h=Math.max(h,BrowserGetOffsetHeight(window));oDivX.id="ID_modalTTBack"+p_lKey;oDivX.style.zIndex=(this.aContentArray[p_lKey].zIndex-2);oDivX.style.backgroundColor="#666666";oDivX.style.position=(Browser.ie&&!Browser.ie7up)?"absolute":"fixed";oDivX.style.top="0px";oDivX.style.width=w+"px";oDivX.style.height=h+"px";Helper.style.setOpacity(oDivX,l_iOpacity);document.getElementsByTagName("body")[0].appendChild(oDivX);oDivX=null;this.oModalResizeListener=EventManager.addListener(window,"resize",this.objectName+".onResize(e);");}
var theText=this.aContentArray[p_lKey].text;var theNode=this.aContentArray[p_lKey].node;var theTitle=this.aContentArray[p_lKey].title;var theWidth=this.aContentArray[p_lKey].width;var theHeight=(this.aContentArray[p_lKey].iMaxHeight!=null)?this.aContentArray[p_lKey].iMaxHeight:this.aContentArray[p_lKey].height;var theClassContainer=this.aContentArray[p_lKey].classContainer;var theClassHeaderBg=this.aContentArray[p_lKey].classHeaderBg;var theClassHeader=this.aContentArray[p_lKey].classHeader;var theClassHeaderLink=this.aContentArray[p_lKey].classHeaderLink;var theClassContentBg=this.aContentArray[p_lKey].classContentBg;var theClassContent=this.aContentArray[p_lKey].classContent;var l_aCnt=[];if(this.aContentArray[p_lKey].positionHandling!=null)
this.positionHandling=this.aContentArray[p_lKey].positionHandling;if(this.aContentArray[p_lKey].fixedPinPosition!=null)
this.fixedPinPosition=this.aContentArray[p_lKey].fixedPinPosition;if(this.aContentArray[p_lKey].layerPosition!=null)
this.layerPosition=this.aContentArray[p_lKey].layerPosition;if(typeof this.aContentArray[p_lKey].closeButton=="boolean")
this.showCloseButton(this.aContentArray[p_lKey].closeButton);if(typeof(this.aContentArray[p_lKey].bShowHeader)=="boolean")
{this.bShowHeader=this.aContentArray[p_lKey].bShowHeader;}
else
{if(theTitle!=null&&theTitle!="")
this.bShowHeader=true;else
this.bShowHeader=false;}
if(theNode!=null)
{theNode.style.display="";if(theNode.style.visibility=="hidden")theNode.style.visibility="visible";this.oHtml.style.visibility="hidden";this.aContentArray[p_lKey].parentNode=theNode.parentNode;tooltipNode=document.createElement("span");tooltipNode.onmouseover=this.objectName+".refreshCloseInterval('"+p_lKey+"');";tooltipNode.onfocus=this.objectName+".refreshCloseInterval('"+p_lKey+"');";tooltipNode.appendChild(theNode);this.oHtml.appendChild(tooltipNode);tooltipNode=null;theNode.onmouseover=this.objectName+".refreshCloseInterval('"+p_lKey+"');";theNode.onfocus=this.objectName+".refreshCloseInterval('"+p_lKey+"');";theNode=null;}
else
{l_aCnt.push("<table class=\""+theClassContainer+"\"");l_aCnt.push("cellspacing=\"0\" cellpadding=\"0\" width=\""+theWidth+"\">");if(this.bShowHeader)
{l_aCnt.push("<tr><td class=\""+theClassHeaderBg+"\">");l_aCnt.push("<table cellpadding=\"0\" cellspacing=\"0\" style=\"width: 100%;\" ");l_aCnt.push(">");if(theTitle!=null)
{l_aCnt.push("<td width=\"99%\" ");l_aCnt.push("><span class=\""+theClassHeader+"\">");l_aCnt.push(theTitle);l_aCnt.push("</span></td>");}
l_aCnt.push("<td width=\"1%\" style=\"text-align : right;\">");if(this.bCloseButton)l_aCnt.push("<a href=\"#\" class=\""+theClassHeaderLink+"\" onclick=\""+this.objectName+".close(true, '"+p_lKey+"');\"><img src=\"images/assets/common/close_small.png\" width=\"9\" height=\"9\" border=\"0\"></a>");l_aCnt.push("</td>");l_aCnt.push("</tr>");l_aCnt.push("</table>");l_aCnt.push("</td></tr>");}
l_aCnt.push("<tr><td class=\""+theClassContentBg+"\" ");l_aCnt.push(">");l_aCnt.push("<div style=\"position:relative;\" class=\""+theClassContent+"\" height=\""+theHeight+"\" ");if(this.aContentArray[p_lKey].autoClose&&this.aContentArray[p_lKey].extensionOfInterval)
{l_aCnt.push("onmouseover=\""+this.objectName+".refreshCloseInterval('"+p_lKey+"')\" ");l_aCnt.push("onfocus=\""+this.objectName+".refreshCloseInterval('"+p_lKey+"')\" ");}
l_aCnt.push(">");if(theText!=null)
{l_aCnt.push(theText);}
l_aCnt.push("</div></td></tr></table>");this._setContent(l_aCnt.join(""));}
if(this.aContentArray[p_lKey].oTgtContainer&&typeof(this.aContentArray[p_lKey].oTgtContainer)=="object"){this.aContentArray[p_lKey].oTgtContainer.appendChild(this.oHtml);}
if(this.aContentArray[p_lKey].iMaxHeight!=null&&this.oHtml.offsetHeight>this.aContentArray[p_lKey].iMaxHeight)
{this.oHtml.style.height=this.aContentArray[p_lKey].iMaxHeight+"px";this.oHtml.style.overflow="auto";this.oHtml.style.width=(this.oHtml.offsetWidth+17)+"px";;}
l_aLayerParams=this._calcPositionXYWH(p_lKey);if(typeof l_aLayerParams!='object')
return false;this.oHtml.style.visibility="visible";this.oHtml.style.display="none";this._moveTo(l_aLayerParams);this.oHtml.style.zIndex=this.aContentArray[p_lKey].zIndex;this.oHtml.setAttribute("tabindex",-1);this.oHtml.setAttribute("role","alertdialog");if(this.aContentArray[p_lKey].fadeIn)
{this._makeVisible(this.aContentArray[p_lKey].fadeInType);this._fadeIn();}
else
{this._makeVisible();}
if(this.aContentArray[p_lKey].bModal)
{window.setTimeout(this.objectName+".onResize();",1);}
if(this.fixedPos&&!this.aContentArray[p_lKey].fadeIn)
{this.oHtml.style.position="relative";this.layerTopOffset=parseInt(this.oHtml.style.top)-self.oDocBody.scrollTop;self.setTimeout(this.objectName+"._resetDivFixedPos()",20);}
if(this.aContentArray[p_lKey].autoClose&&!isNaN(this.aContentArray[p_lKey].autoCloseInterval))
{this.aContentArray[p_lKey].autoCloseId=self.setTimeout(this.objectName+".close(true, '"+p_lKey+"');",this.aContentArray[p_lKey].autoCloseInterval);}
if(typeof(this.aContentArray[p_lKey].strOnload)=="string"&&this.aContentArray[p_lKey].strOnload!="")
{window.eval(this.aContentArray[p_lKey].strOnload);}
return true;}
function funcResizeTooltip()
{if(this.currKey==null||!this._isVisible())return;var l_aLayerParams=this._calcPositionXYWH(this.currKey);if(typeof l_aLayerParams=='object')this._moveTo(l_aLayerParams);return true;}
function funcTooltipFadeIn()
{switch(this.aContentArray[this.currKey].fadeInType)
{case"move_right":this.oFader=new upFader_Move();this.oFader.fadeIn(this.oHtml.id,this.aContentArray[this.currKey].fadeInSteps,"right");break;case"move_left":this.oFader=new upFader_Move();this.oFader.fadeIn(this.oHtml.id,this.aContentArray[this.currKey].fadeInSteps,"left");break;default:this.oFader=new upFader_Opacity();this.oFader.fadeIn(this.oHtml.id,this.aContentArray[this.currKey].opacity,this.aContentArray[this.currKey].fadeInSteps);break;}}
function funcTooltipFadeOut(p_bReset,p_bHandleQueue)
{this._abortFading();var onFadeOutFinished="self."+this.objectName+"._close("+p_bReset+", \""+this.currKey+"\", "+p_bHandleQueue+")"
switch(this.aContentArray[this.currKey].fadeOutType)
{case"move_right":this.oFader=new upFader_Move();this.oFader.fadeOut(this.oHtml.id,this.aContentArray[this.currKey].fadeOutSteps,"right",onFadeOutFinished);break;case"move_left":this.oFader=new upFader_Move();this.oFader.fadeOut(this.oHtml.id,this.aContentArray[this.currKey].fadeOutSteps,"left",onFadeOutFinished);break;default:this.oFader=new upFader_Opacity();this.oFader.fadeOut(this.oHtml.id,this.aContentArray[this.currKey].opacity,this.aContentArray[this.currKey].fadeOutSteps,null,onFadeOutFinished);break;}}
function funcTooltipAbortFading()
{if(this.oFader!=null&&typeof this.oFader=="object")
this.oFader.clear(this.oHtml.id);}
function funcIsInQueue(p_lKey)
{if(this.aQueue.length>0)
{for(var entry in this.aQueue)
{if(this.aQueue[entry].key==p_lKey)
return true;}
return false;}
else
{return false;}}
function funcQuickViewTooltip(p_strTitle,p_strText,p_oContentAttributes)
{if(p_oContentAttributes&&typeof(p_oContentAttributes.key)=="string")
{contentKey=this.addContentById(p_strTitle,p_strText,p_oContentAttributes.key);}
else
{contentKey=this.addContent(p_strTitle,p_strText);}
this.setContentAttribute(contentKey,"opacity","90")
this.setContentAttribute(contentKey,"closeButton",false)
this.setContentAttribute(contentKey,"waitOnClose",false)
this.setContentAttribute(contentKey,"fadeIn",false)
this.setContentAttribute(contentKey,"fadeInSteps",10)
this.setContentAttribute(contentKey,"fadeOut",true)
this.setContentAttribute(contentKey,"fadeOutSteps",10)
if(arguments.length==3)this.setContentAttributes(contentKey,p_oContentAttributes);return this.show(contentKey);}
function funcCalcPositionXYWH(p_lKey)
{l_aReturn=new Array();this._getWindowRegion();this._getRegion(p_lKey);windowWidth=this.aWindowRegion.width+this._getWindowScrollX();windowHeight=this.aWindowRegion.height+this._getWindowScrollY();screenWidth=Browser.getClientWidth(self);screenHeight=Browser.getClientHeight(self);;layerWidth=this.LayerRegion.width;layerHeight=this.LayerRegion.height;if(this.positionHandling=="dynamic")
{if(this.iMouseXDiff==null||this.iMouseYDiff==null)
{this.iMouseXDiff=Browser.getPosLeft(this.oHtml)-Browser.getPosLeftAbs(this.oHtml);this.iMouseYDiff=Browser.getPosTop(this.oHtml)-Browser.getPosTopAbs(this.oHtml);}
MouseX-=this.iMouseXDiff;MouseY-=this.iMouseYDiff;var X=MouseX;var Y=MouseY;if(isMSIE)
{Y+=this._getWindowScrollY();X+=this._getWindowScrollX();}
if((typeof this.aWindowRegion.width!="undefined")&&(typeof this.aWindowRegion.height!="undefined"))
{if(layerWidth==null||layerWidth==0||layerWidth=="")layerWidth=theWidth;if(windowWidth<(layerWidth+X))
{X=(X-layerWidth);}
else
{X+=10;}
if(windowHeight<(layerHeight+Y)&&Y>windowHeight/2)
{Y=(Y-layerHeight);}
else
{}}
l_aReturn.lPosX=X;l_aReturn.lPosY=Y;l_aReturn.lWidth=layerWidth;l_aReturn.lHeight=layerHeight;}
else if(this.positionHandling=="bottom-right")
{X=this.aWindowRegion.width-layerWidth;Y=((Browser.ie&&!Browser.ie7up)||Browser.i_safari)?(this.aWindowRegion.height-layerHeight+self.oDocBody.scrollTop):-1;l_aReturn.lPosX=X;l_aReturn.lPosY=Y;l_aReturn.lWidth=layerWidth;l_aReturn.lHeight=layerHeight;}
else if(this.positionHandling=="bottom-left")
{X=0;Y=((Browser.ie&&!Browser.ie7up)||Browser.i_safari)?(this.aWindowRegion.height-layerHeight+self.oDocBody.scrollTop):-1;l_aReturn.lPosX=X;l_aReturn.lPosY=Y;l_aReturn.lWidth=layerWidth;l_aReturn.lHeight=layerHeight;}
else if(this.positionHandling=="middle-center")
{X=Browser.getScrollOffsetLeft(self)+Math.max(10,screenWidth/2-layerWidth/2);Y=Browser.getScrollOffsetTop(self)+Math.max(10,screenHeight/2-layerHeight/2);l_aReturn.lPosX=X;l_aReturn.lPosY=Y;l_aReturn.lWidth=layerWidth;l_aReturn.lHeight=layerHeight;}
else if(this.layerPosition!=null)
{l_aReturn.lPosX=this.layerPosition.x;l_aReturn.lPosY=this.layerPosition.y;l_aReturn.lWidth=this.layerPosition.width;l_aReturn.lHeight=this.layerPosition.height;}
else
{return null;}
return l_aReturn;}
function funcResetDivFixedPos()
{var pxTop=parseInt(this.layerTopOffset)+parseInt(self.oDocBody.scrollTop);var pxLeft=parseInt(this.layerLeftOffset)+parseInt(self.oDocBody.scrollLeft);this.oHtml.style.top=pxTop+"px";this.oHtml.style.left=pxLeft+"px";}
function funcRefreshCloseInterval(p_lKey)
{if(p_lKey!=null&&p_lKey!=-1&&typeof this.aContentArray[p_lKey]=="object"&&this.aContentArray[p_lKey].autoCloseId!=-1)
{self.clearTimeout(this.aContentArray[p_lKey].autoCloseId);this.aContentArray[p_lKey].autoCloseId=self.setTimeout(this.objectName+".close(false, '"+p_lKey+"');",this.aContentArray[p_lKey].autoCloseInterval);}}
function funcResetAutoClose(p_lKey)
{self.clearTimeout(this.aContentArray[p_lKey].autoCloseId);this.aContentArray[p_lKey].autoCloseId=-1;}
function funcCloseTooltip(p_bReset,p_lKey,p_bHandleQueue,p_bAbort)
{if(this.strStatus=="close")return;this.strStatus="close";this._clearDelay();if(arguments.length<4||typeof p_bAbort!="boolean")
p_bAbort=false;if(arguments.length<3||p_bHandleQueue==null)
p_bHandleQueue=true;var key=false;if(arguments.length>=2&&p_lKey!=null)
{key=p_lKey;}
else if(this.currKey!="")
{key=this.currKey;}
if(!key)
{this.strStatus="idle";return false;}
if(key!=this.currKey&&p_bReset)
{this.clearContent(key);this.strStatus="idle";return true;}
if(key!=null&&key!=-1&&typeof this.aContentArray[key]=="object"&&this.aContentArray[key].autoCloseId!=-1)
{this._resetAutoClose(key);}
this._resetAutoClose(this.currKey);if(key!=null&&key!=-1&&this.aContentArray[key]&&this.aContentArray[key].fadeOut&&!p_bAbort)
{var c=this.aContentArray[key];this._fadeOut(p_bReset,p_bHandleQueue);c.isFadingOut=new Boolean(true);return;}
else
{if(p_bAbort)this._abortFading();this._close(p_bReset,key,p_bHandleQueue);}
this._clearDelay();}
function funcCloseTooltipStep2(p_bReset,p_lKey,p_bHandleQueue)
{key=p_lKey;this.currKey=p_lKey;if(key!=null&&key!=-1&&key!=""&&typeof this.aContentArray[key]=="object")
{if(this.aContentArray[key].bModal)g_TTRegistry.popZindex(this.aContentArray[p_lKey].zIndex-2);if(Browser.ie6)g_TTRegistry.popZindex(this.aContentArray[p_lKey].zIndex-1);g_TTRegistry.popZindex(this.aContentArray[p_lKey].zIndex);if(this.aContentArray[key].node!=null)
{this.aContentArray[key].node.style.display="none";if(typeof this.aContentArray[key].parentNode=="object"&&this.aContentArray[key].parentNode!=null)
{if(typeof(this.aContentArray[key].parentNode.tagName)!="undefined")
{this.aContentArray[key].parentNode.appendChild(this.aContentArray[key].node);}
else
{this.aContentArray[key].node.parentNode.removeChild(this.aContentArray[key].node);}}}
if(this.aContentArray[key].bModal)
{EventManager.removeListener(this.oModalResizeListener);var oDivX=document.getElementById("ID_modalTTBack"+key);if(oDivX)
{if(Browser.opera)
{l_iOpacity=1;Helper.style.setOpacity(oDivX,l_iOpacity);window.setTimeout("document.getElementsByTagName('body')[0].removeChild(document.getElementById('ID_modalTTBack"+key+"'));",0)}
else
{document.getElementsByTagName("body")[0].removeChild(oDivX);}
oDivX=null;}}
if(Browser.ie6&&document.getElementById(this.currKey+"_mask")!=null)
{document.getElementById(this.currKey+"_mask").style.filter="";var nT=document.getElementById(this.currKey+"_mask").removeNode(true);nt=null;}
if(this.aContentArray[key].oTgtContainer&&typeof(this.aContentArray[key].oTgtContainer)=="object"){this.parentContainer.appendChild(this.oHtml);}
if(this.aContentArray[key].positionHandling=="relative"&&this.aContentArray[key].oHtmlTargetContainer&&this.aContentArray[key].oHtmlSourceContainer)
{this.oHtml.parentNode.removeChild(this.oHtml);this.oHtml=this.aContentArray[key].oHtmlSourceContainer.appendChild(this.oHtml)}
if(this.aContentArray[key].strOnUnload!="")self.eval(this.aContentArray[key].strOnUnload)
if(arguments.length<1||p_bReset)this.clearContent(key);}
var l_lCount=this.oHtml.childNodes.length;for(i=0;i<l_lCount;i++)
{this.oHtml.removeChild(this.oHtml.childNodes[0]);}
this.reset();this._hide();this.currKey='';if(p_bHandleQueue)
{this._handleQueue();}}
function funcHandleQueue()
{if(typeof this.aQueue=="object"&&this.aQueue.length>0)
{this.addObject(this.aQueue[0]);key=this.aQueue[0].key;this.show(key);}}
function funcResetTooltip()
{var id=this.oHtml.id;var parent=this.oHtml.parentNode;var isBidirect=false;if(this.oHtml&&this.oHtml.oUp)
{isBidirect=true;}
parent.removeChild(this.oHtml);this.oHtml=document.createElement("div");this.oHtml.id=id;parent.appendChild(this.oHtml);if(isBidirect)
{this.oHtml.oUp=this;}
this.oHtml.style.position="absolute";this.currKey='';this.lContentKey=0;this.setDefaults();this.strStatus="idle";}
function MouseMove(e)
{if(!e)e=window.event;if(typeof e.pageX=="number")
{MouseX=e.pageX;MouseY=e.pageY;}
else if(typeof e.clientX=="number")
{MouseX=e.clientX+(document.body.scrollLeft||0);MouseY=e.clientY+(document.body.scrollTop||0);}}
function stringToNumber(s)
{return parseInt(('0'+s),10)}
function getElementByName(p_strName,doc)
{return Browser.getRef(p_strName,doc);}
function funcGetBrowserInfos()
{if(Browser.ie4||Browser.ie5||Browser.ie6up)
isMSIE=true;if(Browser.ns4)
isNetscape=true;if(Browser.dom&&!isMSIE)
isNetscape=true;this.ns4up=(document.layers)?1:0;this.ie4up=(document.all)?1:0;this.iedom=document.all||document.getElementById;this.ns4=(document.layers)?true:false;this.ie4=(document.all&&!this.ie4)?true:false;this.ie5=(document.all&&this.ie4)?true:false;this.ns6=(this.ie4&&navigator.appName.indexOf("Netscape")>=0)?true:false;this.w3c=(document.getElementById)?true:false;this.iedom=document.all||document.getElementById;}
function funcSetOpacity(p_lOpacity)
{if(p_lOpacity==100&&Browser.ie6)return;if(arguments.length<1||p_lOpacity==null||!isNaN(this.lOpacity))
{if(!isNaN(this.lOpacity))
p_lOpacity=this.lOpacity;else
p_lOpacity=100;}
var l_currOpa=Helper.style.getComputedStylePropByElement(this.oHtml,"opacity");if(p_lOpacity!=-1&&this.oHtml&&p_lOpacity!=null&&(p_lOpacity!=100||(typeof(l_currOpa)!="undefined"&&l_currOpa!=0)))
{Helper.style.setOpacity(this.oHtml,p_lOpacity);}}
function funcShowCloseButtonTooltip(p_bShow)
{this.bCloseButton=p_bShow;if(p_bShow)
{this.bShowHeader=true;}}
FADE_ARRAY=new Array();function upFader()
{this.Browser=new Object();this.Browser.iedom=document.all||document.getElementById;}
upFader.prototype=BrowserSetBrowserType;upFader.prototype.fadeIn=function(){};upFader.prototype.fadeOut=function(){};upFader.prototype.clear=upFaderClear;upFader.prototype._getRegion=upFader_GetRegionInternal;upFader.prototype._setClip=upFader_SetClipInternal;function upFaderClear(p_strHtmlId)
{if(typeof FADE_ARRAY[p_strHtmlId]=="object"&&FADE_ARRAY[p_strHtmlId]!=null)
{if(FADE_ARRAY[p_strHtmlId]['timeout']!=null&&FADE_ARRAY[p_strHtmlId]['timeout']!=-1)
{self.clearTimeout(FADE_ARRAY[p_strHtmlId]['timeout']);FADE_ARRAY[p_strHtmlId]['timeout']=null;}
FADE_ARRAY[p_strHtmlId]=null;}}
function upFader_GetRegionInternal()
{var c=new Object();if(this.Browser.iedom)
{c.left=parseInt(this.oHtml.style.left);c.right=c.left+this.oHtml.offsetWidth;c.top=parseInt(this.oHtml.style.top);c.down=c.top+this.oHtml.offsetHeight;c.width=this.oHtml.offsetWidth;c.height=this.oHtml.offsetHeight;}
return c;}
function upFader_SetClipInternal(p_oClip)
{this.oHtml.style.clip="rect("+p_oClip.top+"px "+p_oClip.right+"px "+p_oClip.bottom+"px "+p_oClip.left+"px )";for(var attr in p_oClip)
{this.currClip[attr]=p_oClip[attr];}}
function upFader_Opacity()
{}
upFader_Opacity.prototype=new upFader();upFader_Opacity.prototype.fadeIn=upFader_OpacityFadeIn;upFader_Opacity.prototype._fadeIn=upFader_Opacity_FadeIn;upFader_Opacity.prototype.fadeOut=upFader_OpacityFadeOut;upFader_Opacity.prototype._fadeOut=upFader_Opacity_FadeOut;function upFader_OpacityFadeIn(p_strHtmlId,p_iMaxOpacity,p_iSteps,p_iOpacity,p_strEvalOnFinished)
{var oHtml=document.getElementById(p_strHtmlId);window.defaultStatus="";if(Browser.opera||arguments.length<1||p_strHtmlId==null||!document.getElementById(p_strHtmlId))
{if(p_strEvalOnFinished!=null)
{eval(p_strEvalOnFinished);}
return;}
if(FADE_ARRAY[p_strHtmlId]==null||typeof FADE_ARRAY[p_strHtmlId]!="object")
FADE_ARRAY[p_strHtmlId]={};FADE_ARRAY[p_strHtmlId].fader=this;if(arguments.length<2||p_iMaxOpacity==null||isNaN(p_iMaxOpacity))
p_iMaxOpacity=100;if(arguments.length<3||p_iSteps==null||isNaN(p_iSteps))
p_iSteps=1;if(arguments.length<4||p_iOpacity==null||isNaN(p_iOpacity))
p_iOpacity=0;FADE_ARRAY[p_strHtmlId].iStart=new Date().getTime();FADE_ARRAY[p_strHtmlId].oHtml=oHtml;FADE_ARRAY[p_strHtmlId].iSteps=p_iSteps;FADE_ARRAY[p_strHtmlId].iOpacity=p_iOpacity;FADE_ARRAY[p_strHtmlId].iMaxOpacity=p_iMaxOpacity;FADE_ARRAY[p_strHtmlId].strEvalOnFinished=p_strEvalOnFinished;FADE_ARRAY[p_strHtmlId].timeout=window.setInterval("if(FADE_ARRAY['"+p_strHtmlId+"']!=null){FADE_ARRAY['"+p_strHtmlId+"']['fader']._fadeIn('"+p_strHtmlId+"');}",20);}
function upFader_Opacity_FadeIn(p_strHtmlId)
{if(FADE_ARRAY[p_strHtmlId]==null||typeof FADE_ARRAY[p_strHtmlId]!="object")return;var l_oF=FADE_ARRAY[p_strHtmlId];if(l_oF.iOpacity<100)
{Helper.style.setOpacity(l_oF.oHtml,l_oF.iOpacity);l_oF.iOpacity+=l_oF.iSteps;var l_iEnd=new Date().getTime();if(l_iEnd-l_oF.iStart>100)
{l_oF.iOpacity=100;}
l_oF.iStart=new Date().getTime();}
if(l_oF.iOpacity>=100)
{window.clearInterval(l_oF.timeout);Helper.style.setOpacity(l_oF.oHtml,100);if(l_oF.strEvalOnFinished!=null)
{eval(l_oF.strEvalOnFinished);}
FADE_ARRAY[p_strHtmlId]["timeout"]=null;FADE_ARRAY[p_strHtmlId]=null;}}
function upFader_OpacityFadeOut(p_strHtmlId,p_iMaxOpacity,p_iSteps,p_iOpacity,p_strEvalOnFinished)
{var oHtml=document.getElementById(p_strHtmlId);window.defaultStatus="";if(Browser.opera||arguments.length<1||p_strHtmlId==null||!document.getElementById(p_strHtmlId))
{if(p_strEvalOnFinished!=null)
{eval(p_strEvalOnFinished);}
return;}
if(FADE_ARRAY[p_strHtmlId]==null||typeof FADE_ARRAY[p_strHtmlId]!="object")
FADE_ARRAY[p_strHtmlId]={};FADE_ARRAY[p_strHtmlId].fader=this;if(arguments.length<2||p_iMaxOpacity==null||isNaN(p_iMaxOpacity))
p_iMaxOpacity=100;if(arguments.length<3||p_iSteps==null||isNaN(p_iSteps))
p_iSteps=1;if(arguments.length<4||p_iOpacity==null||isNaN(p_iOpacity))
p_iOpacity=p_iMaxOpacity;FADE_ARRAY[p_strHtmlId].iStart=new Date().getTime();FADE_ARRAY[p_strHtmlId].oHtml=oHtml;FADE_ARRAY[p_strHtmlId].iSteps=p_iSteps;FADE_ARRAY[p_strHtmlId].iOpacity=p_iOpacity;FADE_ARRAY[p_strHtmlId].iMaxOpacity=p_iMaxOpacity;FADE_ARRAY[p_strHtmlId].strEvalOnFinished=p_strEvalOnFinished;FADE_ARRAY[p_strHtmlId].timeout=window.setInterval("if(FADE_ARRAY['"+p_strHtmlId+"']!=null){FADE_ARRAY['"+p_strHtmlId+"']['fader']._fadeOut('"+p_strHtmlId+"');}",20);}
function upFader_Opacity_FadeOut(p_strHtmlId)
{if(FADE_ARRAY[p_strHtmlId]==null||typeof(FADE_ARRAY[p_strHtmlId])!="object")return;var l_oF=FADE_ARRAY[p_strHtmlId];if(l_oF.iOpacity>0)
{Helper.style.setOpacity(l_oF.oHtml,l_oF.iOpacity);l_oF.iOpacity-=l_oF.iSteps;var l_iEnd=new Date().getTime();if(l_iEnd-l_oF.iStart>50)
{l_oF.iOpacity=0;}
l_oF.iStart=new Date().getTime();}
if(l_oF.iOpacity<=0)
{window.clearInterval(l_oF.timeout);Helper.style.setOpacity(l_oF.oHtml,0);if(l_oF.strEvalOnFinished!=null)
{eval(l_oF.strEvalOnFinished);}
FADE_ARRAY[p_strHtmlId]["timeout"]=null;FADE_ARRAY[p_strHtmlId]=null;}}
function upFader_Move()
{this.oFinalRegion=null;this.lSteps=null;this.oHtml=null;this.currClip=new Object();this.lStepWidth=null;this.lStepHeight=null;this.strDirection=null;this.strOnFinished=null;}
upFader_Move.prototype=new upFader();upFader_Move.prototype.fadeIn=upFader_MoveFadeIn;upFader_Move.prototype.fadeOut=upFader_MoveFadeOut;upFader_Move.prototype.clear=upFader_MoveClear;upFader_Move.prototype._fadeIn=upFader_MoveFadeInInternal;upFader_Move.prototype._fadeOut=upFader_MoveFadeOutInternal;upFader_Move.prototype._reset=upFader_MoveResetInternal;function upFader_MoveFadeIn(p_strHtmlId,p_lSteps,p_strDirection,p_strOnFinished)
{if(arguments.length<1||p_strHtmlId==null||!document.getElementById(p_strHtmlId))
return;if(FADE_ARRAY[p_strHtmlId]==null||typeof FADE_ARRAY[p_strHtmlId]!="object")
FADE_ARRAY[p_strHtmlId]=new Array();FADE_ARRAY[p_strHtmlId]["fader"]=this;var oHtml=document.getElementById(p_strHtmlId);if(arguments.length<2||isNaN(p_lSteps))
p_lSteps=10;if(arguments.length<3||p_strDirection==null)
p_strDirection="right";this.strOnFinished=p_strOnFinished;this.lSteps=p_lSteps;this.oHtml=oHtml;this.oFinalRegion=this._getRegion();this.strDirection=p_strDirection;this.lStepWidth=parseInt(this.oFinalRegion.width/this.lSteps);this.lStepHeight=parseInt(this.oFinalRegion.height/this.lSteps);switch(p_strDirection)
{case"right":this.oHtml.style.left=(this.oFinalRegion.left-this.oFinalRegion.width)+"px";var l_oClip=new Object();l_oClip.top=0;l_oClip.right=this.oFinalRegion.width;l_oClip.bottom=this.oFinalRegion.height;l_oClip.left=this.oFinalRegion.width;this._setClip(l_oClip);break;case"left":this.oHtml.style.overflow="hidden";this.oHtml.style.width="0px";this.oHtml.style.left=this.oFinalRegion.right+"px";break;}
this._fadeIn();}
function upFader_MoveFadeInInternal()
{var l_bSetTimeOut=false;var currRegion=this._getRegion();switch(this.strDirection)
{case"right":if((currRegion.left+this.lStepWidth)<this.oFinalRegion.left)
{l_bSetTimeOut=true;this.oHtml.style.left=(currRegion.left+this.lStepWidth)+"px";var l_oClip=new Object();l_oClip.top=0;l_oClip.right=this.oFinalRegion.width;l_oClip.bottom=this.oFinalRegion.height;l_oClip.left=this.oFinalRegion.width-(currRegion.left+this.lStepWidth);this._setClip(l_oClip);}
break;case"left":if((currRegion.width+this.lStepWidth)<this.oFinalRegion.width)
{l_bSetTimeOut=true;this.oHtml.style.overflow="hidden";this.oHtml.style.width=(currRegion.width+this.lStepWidth)+"px";this.oHtml.style.left=(currRegion.left-this.lStepWidth)+"px";}
break;}
if(l_bSetTimeOut)
{FADE_ARRAY[this.oHtml.id]["timeout"]=window.setTimeout("if(FADE_ARRAY['"+this.oHtml.id+"']!=null){FADE_ARRAY['"+this.oHtml.id+"']['fader']._fadeIn()}",5);}
else
{this._reset();if(this.strOnFinished!=null)
eval(this.strOnFinished);}}
function upFader_MoveFadeOut(p_strHtmlId,p_lSteps,p_strDirection,p_strOnFinished)
{if(arguments.length<1||p_strHtmlId==null||!document.getElementById(p_strHtmlId))
return;if(FADE_ARRAY[p_strHtmlId]==null||typeof FADE_ARRAY[p_strHtmlId]!="object")
FADE_ARRAY[p_strHtmlId]=new Array();FADE_ARRAY[p_strHtmlId]["fader"]=this;var oHtml=document.getElementById(p_strHtmlId);if(arguments.length<2||isNaN(p_lSteps))
p_lSteps=10;if(arguments.length<3||p_strDirection==null)
p_strDirection="right";this.strOnFinished=p_strOnFinished;this.lSteps=p_lSteps;this.oHtml=oHtml;this.oFinalRegion=this._getRegion();this.strDirection=p_strDirection;this.lStepWidth=parseInt(this.oFinalRegion.width/this.lSteps);this.lStepHeight=parseInt(this.oFinalRegion.height/this.lSteps);var l_oClip=new Object();l_oClip.top=0;l_oClip.right=this.oFinalRegion.width;l_oClip.bottom=this.oFinalRegion.height;l_oClip.left=0;this._setClip(l_oClip);this._fadeOut();}
function upFader_MoveFadeOutInternal()
{var l_bSetTimeOut=false;var currRegion=this._getRegion();switch(this.strDirection)
{case"right":if((currRegion.width-this.lStepWidth)>0)
{l_bSetTimeOut=true;this.oHtml.style.overflow="hidden";this.oHtml.style.width=(currRegion.width-this.lStepWidth)+"px";this.oHtml.style.left=(currRegion.left+this.lStepWidth)+"px";}
break;case"left":if((currRegion.left-this.lStepWidth)>(this.oFinalRegion.left-this.oFinalRegion.width))
{l_bSetTimeOut=true;this.oHtml.style.left=(currRegion.left-this.lStepWidth)+"px";var l_oClip=new Object();l_oClip.top=0;l_oClip.right=this.oFinalRegion.width;l_oClip.bottom=this.oFinalRegion.height;l_oClip.left=this.oFinalRegion.width-(currRegion.left-this.lStepWidth);this._setClip(l_oClip);}
break;}
if(l_bSetTimeOut)
{FADE_ARRAY[this.oHtml.id]["timeout"]=window.setTimeout("if(FADE_ARRAY['"+this.oHtml.id+"']!=null){FADE_ARRAY['"+this.oHtml.id+"']['fader']._fadeOut()}",5);}
else
{this._reset();if(this.strOnFinished!=null)
eval(this.strOnFinished);}}
function upFader_MoveClear(p_strHtmlId)
{if(typeof FADE_ARRAY[p_strHtmlId]=="object"&&FADE_ARRAY[p_strHtmlId]!=null)
{if(FADE_ARRAY[p_strHtmlId]['timeout']!=null&&FADE_ARRAY[p_strHtmlId]['timeout']!=-1)
{self.clearTimeout(FADE_ARRAY[p_strHtmlId]['timeout']);FADE_ARRAY[p_strHtmlId]['timeout']=null;}
FADE_ARRAY[p_strHtmlId].fader._reset();FADE_ARRAY[p_strHtmlId]=null;}}
function upFader_MoveResetInternal()
{if(this.oFinalRegion!=null)
{this.oHtml.style.overflow="auto";var l_oClip=new Object();l_oClip.top=0;l_oClip.right=this.oFinalRegion.width;l_oClip.bottom=this.oFinalRegion.height;l_oClip.left=0;this._setClip(l_oClip);this.oHtml.style.width=this.oFinalRegion.width+"px";this.oHtml.style.left=this.oFinalRegion.left+"px";}}
function upFader_Clip()
{this.oFinalRegion=null;this.lSteps=null;this.oHtml=null;this.currClip=new Object();this.lStepWidth=null;this.lStepHeight=null;this.strDirection=null;this.strOnFinished=null;}
upFader_Clip.prototype=new upFader();upFader_Clip.prototype.fadeIn=upFader_ClipFadeIn;upFader_Clip.prototype.fadeOut=upFader_ClipFadeOut;upFader_Clip.prototype.clear=upFader_ClipClear;upFader_Clip.prototype._fadeIn=upFader_ClipFadeInInternal;upFader_Clip.prototype._fadeOut=upFader_ClipFadeOutInternal;upFader_Clip.prototype._reset=upFader_ClipResetInternal;function upFader_ClipFadeIn(p_strHtmlId,p_lSteps,p_strDirection,p_strOnFinished)
{if(arguments.length<1||p_strHtmlId==null||!document.getElementById(p_strHtmlId))
return;if(FADE_ARRAY[p_strHtmlId]==null||typeof FADE_ARRAY[p_strHtmlId]!="object")
FADE_ARRAY[p_strHtmlId]=new Array();FADE_ARRAY[p_strHtmlId]["fader"]=this;var oHtml=document.getElementById(p_strHtmlId);if(arguments.length<2||isNaN(p_lSteps))
p_lSteps=10;if(arguments.length<3||p_strDirection==null)
p_strDirection="right";this.strOnFinished=p_strOnFinished;this.lSteps=p_lSteps;this.oHtml=oHtml;this.oFinalRegion=this._getRegion();this.strDirection=p_strDirection;this.lStepWidth=this.oFinalRegion.width/this.lSteps;this.lStepHeight=this.oFinalRegion.height/this.lSteps;switch(p_strDirection)
{case"right":var l_oClip=new Object();l_oClip.top=0;l_oClip.right=0;l_oClip.bottom=this.oFinalRegion.height;l_oClip.left=0;this._setClip(l_oClip);break;case"left":var l_oClip=new Object();l_oClip.top=0;l_oClip.right=this.oFinalRegion.width;l_oClip.bottom=this.oFinalRegion.height;l_oClip.left=this.oFinalRegion.width;this._setClip(l_oClip);break;}
this._fadeIn();}
function upFader_ClipFadeInInternal()
{var l_bSetTimeOut=false;var currRegion=this._getRegion();switch(this.strDirection)
{case"right":if((this.currClip.right+this.lStepWidth)<this.oFinalRegion.width)
{l_bSetTimeOut=true;this.currClip.right+=this.lStepWidth;this._setClip(this.currClip);}
break;case"left":if((this.currClip.left-this.lStepWidth)>0)
{l_bSetTimeOut=true;this.currClip.left-=this.lStepWidth;this._setClip(this.currClip);}
break;}
if(l_bSetTimeOut)
{FADE_ARRAY[this.oHtml.id]["timeout"]=window.setTimeout("if(FADE_ARRAY['"+this.oHtml.id+"']!=null){FADE_ARRAY['"+this.oHtml.id+"']['fader']._fadeIn()}",10);}
else
{this._reset();if(this.strOnFinished!=null)
eval(this.strOnFinished);}}
function upFader_ClipFadeOut(p_strHtmlId,p_lSteps,p_strDirection,p_strOnFinished)
{if(arguments.length<1||p_strHtmlId==null||!document.getElementById(p_strHtmlId))
return;if(FADE_ARRAY[p_strHtmlId]==null||typeof FADE_ARRAY[p_strHtmlId]!="object")
FADE_ARRAY[p_strHtmlId]=new Array();FADE_ARRAY[p_strHtmlId]["fader"]=this;var oHtml=document.getElementById(p_strHtmlId);if(arguments.length<2||isNaN(p_lSteps))
p_lSteps=10;if(arguments.length<3||p_strDirection==null)
p_strDirection="right";this.strOnFinished=p_strOnFinished;this.lSteps=p_lSteps;this.oHtml=oHtml;this.oFinalRegion=this._getRegion();this.strDirection=p_strDirection;this.lStepWidth=this.oFinalRegion.width/this.lSteps;this.lStepHeight=this.oFinalRegion.height/this.lSteps;var l_oClip=new Object();l_oClip.top=0;l_oClip.right=this.oFinalRegion.width;l_oClip.bottom=this.oFinalRegion.height;l_oClip.left=0;this._setClip(l_oClip);this._fadeOut();}
function upFader_ClipFadeOutInternal()
{var l_bSetTimeOut=false;switch(this.strDirection)
{case"right":if((this.currClip.left+this.lStepWidth)<this.oFinalRegion.width)
{l_bSetTimeOut=true;this.currClip.left+=this.lStepWidth;this._setClip(this.currClip);}
break;case"left":if((this.currClip.right-this.lStepWidth)>0)
{l_bSetTimeOut=true;this.currClip.right-=this.lStepWidth;this._setClip(this.currClip);}
break;}
if(l_bSetTimeOut)
{FADE_ARRAY[this.oHtml.id]["timeout"]=window.setTimeout("if(FADE_ARRAY['"+this.oHtml.id+"']!=null){FADE_ARRAY['"+this.oHtml.id+"']['fader']._fadeOut()}",10);}
else
{this._reset();if(this.strOnFinished!=null)
eval(this.strOnFinished);}}
function upFader_ClipClear(p_strHtmlId)
{if(typeof FADE_ARRAY[p_strHtmlId]=="object"&&FADE_ARRAY[p_strHtmlId]!=null)
{if(FADE_ARRAY[p_strHtmlId]['timeout']!=null&&FADE_ARRAY[p_strHtmlId]['timeout']!=-1)
{self.clearTimeout(FADE_ARRAY[p_strHtmlId]['timeout']);FADE_ARRAY[p_strHtmlId]['timeout']=null;}
FADE_ARRAY[p_strHtmlId].fader._reset();FADE_ARRAY[p_strHtmlId]=null;}}
function upFader_ClipResetInternal()
{if(this.oFinalRegion!=null)
{this.oHtml.style.overflow="auto";var l_oClip=new Object();l_oClip.top=0;l_oClip.right=this.oFinalRegion.width;l_oClip.bottom=this.oFinalRegion.height;l_oClip.left=0;this._setClip(l_oClip);}}
function upToolTipPopup(p_oActionControl,p_strObjectName,p_bIsModal,p_strDragAreaId)
{this.addContentProps={};this.oActionControl=p_oActionControl;this.oActionControl.oToolTipPopup=this;this.bModalTTP=(typeof(p_bIsModal)=="boolean")?p_bIsModal:false;this.objectName=p_strObjectName;if(arguments.length<3)
{this.bHasDragger=true;this.bPermitClose=true;}
else
{this.bHasDragger=!p_bIsModal;this.bPermitClose=!p_bIsModal;}
this.bHasHeader=true;var oFup=this.oActionControl.oFup;if(oFup.runIn=="ToolTipPopup")
{this.containerName=oFup.oToolTipPopup.containerName+"_c"+p_strObjectName;}
else
{this.containerName="c"+p_strObjectName;}
if(this.bHasDragger&&(typeof p_strDragAreaId=="undefined"||!p_strDragAreaId||p_strDragAreaId==""))
{this.dragAreaId=this.containerName+"_Header";}
else if(this.bHasDragger)
{this.dragAreaId=p_strDragAreaId;}
else
{this.dragAreaId="";}
if(document.getElementById(this.containerName)==null)
{var oDiv=document.createElement("div");oDiv.id=this.containerName;oDiv.name=this.containerName;oDiv.style.position="absolute";oDiv.style.visibility="hidden";this.oHtml=document.getElementsByTagName("body")[0].appendChild(oDiv);}
else
{this.oHtml=document.getElementById(this.containerName);}
this.oHtml.containertype="tooltippopup";this.oHtml.oUp=this;upToolTip.call(this,this.objectName,this.containerName);this._setContainerEvents();this.contentKey=0;this.bInit=true;this.oTargetChanger=null;this.reloadContainer=null;this.bReloadByChange=false;this.bReloadPage=false;this.bChildRecord=false;this.oFuncPart=null;this.layerX=-1;this.layerY=-1;this.strOnUnLoad="";this.oPosition={};this.oPosition.offsetX=0;this.oPosition.offsetY=0;this.oPosition.align="left";this.oPosition.valign="bottom";this.loaded=false;this.isPinned=true;if(this.bHasDragger)
{this.oDragger=new upToolTipDragger(this);}
this.QueryString="";this.title="";this.oOpeningTTP=null;if(this.bPermitClose&&self.oUp.oRootWin.countToolTipPopup()==0)
{EventManager.addListener(document,"keydown",closeByEsc);}
self.oUp.oRootWin.registerToolTipPopup(this.objectName,this);this.setPositionProperties=funcToolTipSetPositionProperties;this.showPopup=funcToolTipShow;this.reload=funcToolTipReload;this.unload=funcToolTipUnload;this.closePopup=funcToolTipClose;this.setFocus=funcToolTipFocus;this.resetPosition=funcToolTipResetPosition;}
function funcToolTipSetPositionProperties(p_iOffsetX,p_iOffsetY,p_strAlign,p_strVAlign)
{this.oPosition.offsetX=p_iOffsetX;this.oPosition.offsetY=p_iOffsetY;this.oPosition.align=p_strAlign;this.oPosition.valign=p_strVAlign;}
function funcToolTipReload()
{var oAction=new upActionControl();oAction.oSource=new upSource();oAction.oTarget=new upTarget();oAction.oHtml=new Object();oAction.oXmlHttp=new upXmlHttp();oAction.oXmlHttp.bAsync=false;if(this.oFuncPart.oForm.oHtml)
{oAction.requestType=1;if(typeof this.oFuncPart.oForm.oHtml.fr_ActionId!="undefined")
this.oFuncPart.oForm.oHtml.fr_ActionId.value="";oAction.oHtml.form=this.oFuncPart.oForm.oHtml;}
else
{oAction.requestType=0;}
oAction.QueryString=this.QueryString;var l_strRecId="-1";if(typeof this.oFuncPart.recId!="undefined")
l_strRecId=this.oFuncPart.recId;if((Helper.getQsValueByParam("rq_RecId",oAction.QueryString)=="-1"||!Helper.getQsValueByParam("rq_RecId",oAction.QueryString))&&l_strRecId!="-1")
{oAction.QueryString=Helper.setQsValueByParam("rq_RecId",l_strRecId,oAction.QueryString);}
oAction.oTarget.bToolTipPopup=true;oAction.oTarget.bNewToolTipPopup=false;oAction.oTarget.bInsideToolTipPopup=true;oAction.oFup=this.oFuncPart;oAction.oToolTipPopup=this;oAction.oToolTipPopup.oActionControl=oAction;this.oActionControl.oToolTipPopup=this;self.oFupLoader=new upFupLoader();self.oFupLoader.load(oAction);}
function funcToolTipResetPosition()
{if(this.positionHandling!="fixed"&&this.positionHandling!="dynamic")return false;if(this.oHtml==null)return false;var oContainer=this.oHtml;var bReset=false;var oldLayerX=this.layerX;var oldLayerY=this.layerY;var height=oContainer.offsetHeight;var availableHeight=Browser.getClientHeight(self);if((this.layerY+height-self.oDocBody.scrollTop)>availableHeight)
{if(document.getElementById("Container_Stage"))
{var oStagePos=Browser.getPosition2Page(document.getElementById("Container_Stage"));var stagePosY=oStagePos.posY;if((availableHeight-stagePosY)>height)
this.layerY=self.oDocBody.scrollTop+availableHeight-height;else
this.layerY=self.oDocBody.scrollTop+stagePosY+10;}
else
{if(availableHeight>height)
this.layerY=self.oDocBody.scrollTop+availableHeight-height;else
this.layerY=self.oDocBody.scrollTop+10;}
bReset=true;}
else if(this.layerY<self.oDocBody.scrollTop)
{this.layerY=self.oDocBody.scrollTop+10;bReset=true;}
var width=oContainer.offsetWidth;var availableWidth=Browser.getClientWidth(self);if((this.layerX+width-self.oDocBody.scrollLeft)>availableWidth)
{if(availableWidth>width)
this.layerX=self.oDocBody.scrollLeft+availableWidth-width;else
this.layerX=self.oDocBody.scrollLeft+10;bReset=true;}
if(this.oActionControl&&typeof this.oActionControl.isMO!="undefined"&&this.oActionControl.isMO)
{switch(this.oActionControl.strMOType)
{case"mouse-top":this.layerY=(MouseY-height-5);if(this.layerY<0){this.layerX=MouseX+10;this.layerY=MouseY;}
break;default:var oPosXY=Browser.getPosition2Page(this.oActionControl.oHtml);if(this.layerX<oldLayerX)
this.layerY=oPosXY.posY+Browser.getHeight(this.oActionControl.oHtml);if(this.layerY<oldLayerY)
this.layerX=oPosXY.posX+Browser.getWidth(this.oActionControl.oHtml);}}
if(bReset&&!isNaN(this.layerX)&&!isNaN(this.layerY))
{oContainer.style.top=this.layerY+"px";oContainer.style.left=this.layerX+"px";;}
if(Browser.ie6&&document.getElementById(this.contentKey+"_mask"))
{document.getElementById(this.contentKey+"_mask").style.left=oContainer.style.left;document.getElementById(this.contentKey+"_mask").style.top=oContainer.style.top;}
return;}
function funcToolTipShow(contentKey)
{this.oActionControl.oToolTipPopup=this;if(this.oActionControl.oTarget&&this.oActionControl.oTarget.bNewToolTipPopup)
{this.oOpeningActionControl=this.oActionControl;this.oOpeningActionControl.oToolTipPopup=this;}
this.show(contentKey);this.contentKey=contentKey;this.resetPosition();if(this.bHasDragger&&this.oDragger!=null&&this.oHtml!=null)this.oDragger.load(this.dragAreaId);this.loaded=true;}
function funcToolTipUnload()
{if(this.oFuncPart&&this.oFuncPart.strOnUnLoad!="")
{eval(this.oFuncPart.strOnUnLoad);}
if(this.strOnUnLoad!="")eval(this.strOnUnLoad);this.strOnUnLoad="";if(self.oLoadAction)self.oLoadAction=null;if(self.startFupLoad)self.startFupLoad=null;if(this.oFuncPart)
{this.oFuncPart.unhook();this.oFuncPart.oToolTipPopup=null;self.oUp.oRootWin.unregisterFup(this.oFuncPart.id);this.oFuncPart=null;}
if(this.bHasDragger&&this.oDragger!=null)this.oDragger.unload();this.oHtml.innerHTML="";this._close(true,this.contentKey,false);this.loaded=false;}
function funcToolTipClose()
{this.unload();if(this.bHasDragger&&this.oDragger!=null)
{this.oDragger.finalize();this.oDragger=null;}
self.oUp.oRootWin.unregisterToolTipPopup(this.objectName);if(this.bPermitClose&&self.oUp.oRootWin.countToolTipPopup()==0)
EventManager.removeListener(document,"keydown",closeByEsc);if(this.oOpeningActionControl)
{this.oOpeningActionControl.oToolTipPopup=null;}
if(this.oActionControl!=null&&this.oActionControl.oHtml!=null)
{var actionId=this.oActionControl.oHtml.id;this.oActionControl.oToolTipPopup=null;this.oActionControl=null;}
this.oTargetChanger=null;this.reloadContainer=null;this.oOpeningTTP=null;if(this.oHtml)this.oHtml.oUp=null;this.oHtml=null;var oHtml=document.getElementById(this.containerName);if(oHtml&&oHtml!=null)
{if(Browser.ie)
{oHtml.removeNode(true);}
else
{oHtml.parentNode.removeChild(oHtml);}}
eval(this.objectName+"= null")
if(actionId&&document.getElementById(actionId))
{eval("try{document.getElementById('"+actionId+"').focus()}catch(e){}",200);}
return;}
function funcToolTipFocus()
{try
{var oHtml=null;var anchor=Helper.getQsValueByParam("rq_Anchor",this.QueryString);if(anchor&&anchor=="no")
{return;}
if(anchor&&anchor!=""&&document.getElementById("ID_"+anchor))
{Browser.gotoAnchor(anchor,document);}
else if(this.oFuncPart&&this.oFuncPart.oForm&&this.oFuncPart.oForm.oHtml&&this.oFuncPart.oForm.oHtml.length>0)
{var fm=this.oFuncPart.oForm.oHtml;var oHtmlType="";for(var i=0;i<fm.length;i++)
{oHtml=fm.elements[i];strHtmlType=oHtml.type;if(strHtmlType!="hidden"&&strHtmlType!="button"&&strHtmlType!="submit"&&strHtmlType!="select-one")
{if(!(Browser.safari2&&!Browser.safari3up)&&oHtml.oUp&&oHtml.oUp.upType=="upTextareaControl"&&oHtml.oUp.editorType&&oHtml.oUp.editorType=="fckeditor")
{document.getElementById(oHtml.name+"___Frame").contentWindow.focus();}
else
{oHtml.focus();}
return true;}}}
if(!Browser.ie&&!Browser.opera&&this.oHtml!=null)
{}
return true;}
catch(e)
{ErrorHandler.warn(e,"funcToolTipFocus");return false;}}
function closeByEsc(e)
{window.oUp.oEvent=e||window.event;var keyCode=Browser.getEventKeyCode();if(keyCode==27)
{window.oUp.oRootWin.popToolTipPopup();return false;}}
function upToolTipDragger(p_oToolTipPopup)
{this.oToolTipPopup=p_oToolTipPopup;this.oContainer=null;this.oDragArea=null;this.mousePosX=0;this.mousePosY=0;this.clickOffsetX=0;this.clickOffsetY=0;this.load=funcToolTipDraggerLoad;this.unload=funcToolTipDraggerUnload;this.start=funcToolTipDraggerStart;this.stop=funcToolTipDraggerStop;this.drag=funcToolTipDraggerDrag;this.finalize=funcToolTipDraggerFinalize;}
function funcToolTipDraggerLoad(p_dragAreaId)
{this.oDragArea=document.getElementById(p_dragAreaId);this.oContainer=this.oToolTipPopup.oHtml;if(this.oDragArea)
{this.oDragArea.onmousedown=startDrag;this.oDragArea.oDragger=this;}}
function funcToolTipDraggerUnload()
{if(this.oDragArea)
{this.oDragArea.onmousedown=null;this.oDragArea.oDragger=this;this.oDragArea=null;this.oContainer=null;}}
function funcToolTipDraggerFinalize()
{this.oToolTipPopup=null;}
function startDrag(e)
{this.oDragger.start(e);self.event?self.event.preventDefault:e.preventDefault();}
function funcToolTipDraggerStart(e)
{this.mousePosX=document.all?self.event.clientX:e.pageX;this.mousePosY=document.all?self.event.clientY:e.pageY;this.clickOffsetX=this.mousePosX-this.oContainer.offsetLeft;this.clickOffsetY=this.mousePosY-this.oContainer.offsetTop;if(Browser.ie)
{oldOnSelectStart=document.onselectstart;document.onselectstart=function(){return false;};}
self.oDragger=this;EventManager.addListener(document,"mouseup",stopDrag);EventManager.addListener(document,"mousemove",drag);}
function stopDrag(e)
{if(self.oDragger)self.oDragger.stop(e);}
function funcToolTipDraggerStop(e)
{this.oToolTipPopup.layerX=parseInt(this.mousePosX-this.clickOffsetX);this.oToolTipPopup.layerY=parseInt(this.mousePosY-this.clickOffsetY);if(Browser.ie)
{document.onselectstart=oldOnSelectStart;}
self.oDragger=null;EventManager.removeListener(document,"mousemove",drag);EventManager.removeListener(document,"mouseup",stopDrag);}
function drag(e)
{if(self.oDragger)self.oDragger.drag(e);}
function funcToolTipDraggerDrag(e)
{this.mousePosX=document.all?self.event.clientX:e.pageX;this.mousePosY=document.all?self.event.clientY:e.pageY;if(document.getElementById("Container_Stage"))
{var oContPos=Browser.getPosition2Page(document.getElementById("Container_Stage"));var contPosY=oContPos.posY;if(this.mousePosY<contPosY+10)
{if(this.mousePosY<=1)
stopDrag();return;}
var contPosX=oContPos.posX;if(this.mousePosX<contPosX+10)
{return;}}
else
{if(this.mousePosY<10)
{return;}
if(this.mousePosX<10)
{return;}}
this.oContainer.style.left=parseInt(this.mousePosX-this.clickOffsetX)+"px";this.oContainer.style.top=parseInt(this.mousePosY-this.clickOffsetY)+"px";if(Browser.ie&&document.getElementById(this.oToolTipPopup.contentKey+"_mask"))
{document.getElementById(this.oToolTipPopup.contentKey+"_mask").style.left=this.oContainer.style.left;document.getElementById(this.oToolTipPopup.contentKey+"_mask").style.top=this.oContainer.style.top;}}
Array.prototype.contains=function(obj){var i,listed=false;for(i=0;i<this.length;i++){if(this[i]===obj){listed=true;break;}}
return listed;};Array.prototype.remove=function(n){if(n>=0&&n<this.length){if(n<this.length){var x=-1;while((++x)<this.length){if(x>=n){this[x]=this[x+1];}}}
this.pop();}};Array.prototype.insert=function(index){index=Math.min(Math.max(index,0),this.length);tmp=this.slice(index,this.length);for(i=0;i<arguments.length-1;i++){this[index+i]=arguments[i+1];}
for(y=index+i,j=0;j<tmp.length;j++){this[y+j]=tmp[j];}
return this;}
Array.prototype.clone=function(){var clonedArray=[];var length=this.length;for(var index=0;index<length;index++){clonedArray[index]=this[index];}
return clonedArray;}
String.prototype.zf=function(l){return'0'.string(l-this.length)+this;}
String.prototype.string=function(l){var s='',i=0;while(i++<l){s+=this;}return s;}
Number.prototype.zf=function(l){return this.toString().zf(l);}
Date.prototype.format=function(f)
{this.aMonthNames=self.oUp.oMessage.CAL_MONTH_LIST.split(",")
this.aDayNames=self.oUp.oMessage.CAL_DAY_LIST.split(",")
if(!this.valueOf())
return'&nbsp;';var d=this;return f.replace(/(yyyy|yy|MMMMM|MMM|MM|M|EEEEE|EEE|EE|E|dd|d|HH|H|hh|h|mm|ss|a)/gi,function($1)
{switch($1)
{case'yyyy':return d.getFullYear();case'yy':return d.getFullYear().toString().substr(2,3);case'MMMMM':return d.aMonthNames[d.getMonth()];case'MMM':return d.aMonthNames[d.getMonth()].substr(0,3);case'MM':return(d.getMonth()+1).zf(2);case'M':return(d.getMonth()+1);case'EEEEE':return d.aDayNames[d.getDay()];case'EEE':return d.aDayNames[d.getDay()].substr(0,3);case'EE':return d.aDayNames[d.getDay()].substr(0,2);case'E':return d.aDayNames[d.getDay()].substr(0,1);case'dd':return d.getDate().zf(2);case'd':return d.getDate();case'HH':return d.getHours().zf(2);case'H':return d.getHours();case'hh':return((h=d.getHours()%12)?h:12).zf(2);case'h':return((h=d.getHours()%12)?h:12);case'mm':return d.getMinutes().zf(2);case'ss':return d.getSeconds().zf(2);case'a':return d.getHours()<12?'a':'p';}});}
Date.prototype.resetTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);}
Date.prototype.add=function(p_strInterval,p_iNum){return Helper.dateAdd(p_strInterval,p_iNum,this)};Date.prototype.getDatePartByDepth=function(p_iDepth){switch(p_iDepth){case 1:return this.getMilliseconds();case 2:return this.getSeconds();case 3:return this.getMinutes();case 4:return this.getHours();case 5:return this.getDay();case 6:return this.getMonth();case 7:return this.getYear();default:return-1;}};function upSimpleAjax()
{this.upType="upSimpleAjax";this.oProcessFunc=null;this.oHtmlForm=null;this.bAsync=true;this.iTimeout=null;this.bAddHistory=true;this.oRqParams={};this.oFrmParams={};this.oFup=null;}
upSimpleAjax.prototype.loadUrl=upSimpleAjaxLoadUrl;upSimpleAjax.prototype.loadStaticVm=upSimpleAjaxLoadStaticVm;upSimpleAjax.prototype.loadJsonVm=upSimpleAjaxLoadJsonVm;upSimpleAjax.prototype.loadXmlVm=upSimpleAjaxLoadXmlVm;upSimpleAjax.prototype._loadVm=upSimpleAjax_LoadVm;upSimpleAjax.prototype.loadAppSnippetVm=upSimpleAjaxLoadAppSnippetVm;upSimpleAjax.prototype.loadAppSnippetJsonVm=upSimpleAjaxLoadAppSnippetJsonVm;upSimpleAjax.prototype.cleanUp=upSimpleAjaxCleanUp;function upSimpleAjaxCleanUp(p_bUnload)
{}
function upSimpleAjaxLoadStaticVm(p_strVm,p_oReqParams,p_oFrmParams)
{return this._loadVm(p_strVm,p_oReqParams,p_oFrmParams,"DEFAULT");}
function upSimpleAjaxLoadXmlVm(p_strVm,p_oReqParams,p_oFrmParams)
{return this._loadVm(p_strVm,p_oReqParams,p_oFrmParams,"XML");}
function upSimpleAjaxLoadJsonVm(p_strVm,p_oReqParams,p_oFrmParams)
{return this._loadVm(p_strVm,p_oReqParams,p_oFrmParams,"JSON");}
function upSimpleAjax_LoadVm(p_strVm,p_oReqParams,p_oFrmParams,p_strResponseHandlerMode)
{var url=Helper.getBaseUrl();if(p_strResponseHandlerMode&&p_strResponseHandlerMode=="JSON")
url=Helper.setUrlValueByParam("rq_Template","internal/layout/vm/html/frames/json_snippet.vm",url);else
url=Helper.setUrlValueByParam("rq_Template","internal/layout/vm/html/frames/xmlhttp_snippet.vm",url);url=Helper.setUrlValueByParam("rq_VM",p_strVm,url);if(typeof(this.oRqParams)=="object"&&this.oRqParams!=null)
{for(rqName in this.oRqParams)
{url=Helper.setUrlValueByParam(rqName,this.oRqParams[rqName],url);}}
if(typeof(p_oReqParams)=="object"&&p_oReqParams!=null)
{for(rqName in p_oReqParams)
{url=Helper.setUrlValueByParam(rqName,p_oReqParams[rqName],url);}}
return this.loadUrl(url,p_oFrmParams,p_strResponseHandlerMode);}
function upSimpleAjaxLoadAppSnippetJsonVm(p_strVm,p_oReqParams,p_oFrmParams)
{this.loadAppSnippetVm(p_strVm,p_oReqParams,p_oFrmParams,"JSON");}
function upSimpleAjaxLoadAppSnippetVm(p_strVm,p_oReqParams,p_oFrmParams,p_strResponseHandlerMode)
{var fupUrl=false;if(this.oFup!=null)
{fupUrl=(this.oFup.oHtml)?ContainerAgent.getFupUrl(this.oFup.oHtml):ContainerAgent.getFupUrl(this.oFup);}
var url=Helper.getBaseUrl();if(p_strResponseHandlerMode&&p_strResponseHandlerMode=="JSON")
{url=Helper.setUrlValueByParam("rq_Template","internal/layout/vm/html/frames/xmlhttp_appsnippet_js.vm",url);}
else
{url=Helper.setUrlValueByParam("rq_Template","internal/layout/vm/html/frames/xmlhttp_appsnippet.vm",url);}
url=Helper.setUrlValueByParam("rq_VM",p_strVm,url);if(typeof(this.oRqParams)=="object"&&this.oRqParams!=null)
{for(rqName in this.oRqParams)
{url=Helper.setUrlValueByParam(rqName,this.oRqParams[rqName],url);}}
if(typeof(p_oReqParams)=="object"&&p_oReqParams!=null)
{for(rqName in p_oReqParams)
{url=Helper.setUrlValueByParam(rqName,p_oReqParams[rqName],url);}}
if(!Helper.getQsValueByParam("rq_AppId",url)||!Helper.getQsValueByParam("rq_AppGuid",url))
{if(this.oFup!=null&&typeof(this.oFup)=="object")
{url=Helper.setUrlValueByParam("rq_AppId",this.oFup.appId,url);url=Helper.setUrlValueByParam("rq_TargetId",this.oFup.id,url);url=Helper.setUrlValueByParam("rq_RecId",this.oFup.recId,url);}
var l_strSourceParentId=Helper.getQsValueByParam("rq_SourceParentId",fupUrl);var l_strSourceRecId=Helper.getQsValueByParam("rq_SourceRecId",fupUrl);var l_strSourceId=Helper.getQsValueByParam("rq_SourceId",fupUrl);var l_strSourceAppId=Helper.getQsValueByParam("rq_SourceAppId",fupUrl);if(l_strSourceAppId&&l_strSourceId)
{url=Helper.setUrlValueByParam("rq_SourceAppId",l_strSourceAppId,url);url=Helper.setUrlValueByParam("rq_SourceId",l_strSourceId,url);if(l_strSourceParentId&&l_strSourceParentId!="-1"&&l_strSourceRecId)
{url=Helper.setUrlValueByParam("rq_SourceRecId",l_strSourceRecId,url);url=Helper.setUrlValueByParam("rq_SourceParentId",l_strSourceParentId,url);}
else
{if(l_strSourceRecId&&l_strSourceRecId!="-1")
{url=Helper.setUrlValueByParam("rq_SourceRecId",l_strSourceRecId,url);if(this.oFup!=null&&typeof(this.oFup)=="object"&&this.oFup.parentId&&this.oFup.parentId!="")
{url=Helper.setUrlValueByParam("rq_SourceParentId",this.oFup.parentId,url);}}
else if(this.oFup!=null&&typeof(this.oFup)=="object"&&this.oFup.parentId&&this.oFup.parentId!="")
{url=Helper.setUrlValueByParam("rq_SourceRecId",this.oFup.parentId,url);}}}}
if(Helper.getQsValueByParam("rq_AppId",url)||Helper.getQsValueByParam("rq_AppGuid",url))
{return this.loadUrl(url,p_oFrmParams,p_strResponseHandlerMode);}
else
{oHtmlRoot.oUp.adviceShow("Error","Missing rq_AppId or rq_AppGuid parameter.<br>Please set reference to current Fup-Object or set parameter manually in p_oReqParams!<br><br>function: upSimpleAjaxLoadAppSnippetVm","ERROR_LOAD_APPSNIPPETVM",null,self);return false;}}
function upSimpleAjaxLoadUrl(p_strUrl,p_oFrmParams,p_strResponseHandlerMode)
{var oXmlHttp=new upXmlHttp();oXmlHttp.bAsync=this.bAsync;if(typeof(this.iTimeout)=="number"&&this.iTimeout!=null)oXmlHttp.iTimeout=this.iTimeout;if(this.oHtmlForm!=null||(typeof(p_oFrmParams)=="object"&&p_oFrmParams!=null)||(typeof(this.oFrmParams)=="object"&&this.oFrmParams!=null))
{oXmlHttp.strMethod="POST";if(this.oHtmlForm!=null)oXmlHttp.addForm(this.oHtmlForm,false);for(var frmName in p_oFrmParams)
{oXmlHttp.addPostData(frmName,p_oFrmParams[frmName]);}
for(var frmName in this.oFrmParams)
{oXmlHttp.addPostData(frmName,this.oFrmParams[frmName]);}}
else
{oXmlHttp.strMethod="GET";}
oXmlHttp.bAddFormData=true;oXmlHttp.bAddHistory=this.bAddHistory;if(this.oProcessFunc!=null&&(typeof(this.oProcessFunc)=="object"||typeof(this.oProcessFunc)=="function"))
{oXmlHttp.bProcessResponse=true;if(p_strResponseHandlerMode&&p_strResponseHandlerMode=="JSON")
{oXmlHttp.processResponse=new Function("ResponseHandler.processJson("+this.oProcessFunc+")");}
else if(p_strResponseHandlerMode&&p_strResponseHandlerMode=="XML")
{oXmlHttp.processResponse=new Function("ResponseHandler.processXml("+this.oProcessFunc+")");}
else
{oXmlHttp.processResponse=this.oProcessFunc;}}
else
{oXmlHttp.bProcessResponse=false;}
oXmlHttp.strUrl=p_strUrl;self.oCurrAjaxCont=this;if(this.bAsync)
{oXmlHttp.send();return true;}
else
{return oXmlHttp.send();}}
function upSimpleAjaxContainer(p_oHtmlContainer,p_oProps)
{this.upType="upSimpleAjaxContainer";this.oHtml=p_oHtmlContainer;this.oProcessFunc=processResponse_SimpleAjaxContainer;this.bLoadCss=true;this.bLoadJs=true;this.strOnLoad="";this.strOnUnload="";for(var prop in p_oProps)this[prop]=p_oProps[prop];}
upSimpleAjaxContainer.prototype=new upSimpleAjax();upSimpleAjaxContainer.prototype.cleanUp=upSimpleAjaxContainerCleanUp;function upSimpleAjaxContainerCleanUp(p_bUnload)
{if(typeof(this.strOnUnload)=="string"&&this.strOnUnload.length>0)eval(this.strOnUnload);while(this.oHtml.childNodes.length>0){this.oHtml.removeChild(this.oHtml.firstChild);}}
function processResponse_SimpleAjaxContainer()
{try
{if(oRequest.readyState==State.done)
{var l_bRet=false;if(oRequest.status==Status.ok)
{if(!ErrorHandler.Ajax.checkXMLResponse("processResponse_SimpleAjaxContainer",oRequest))
{return;}
if(self.oCurrAjaxCont)
{self.oCurrAjaxCont.cleanUp(false);if(oRequest.responseXML&&oRequest.responseXML.documentElement&&oRequest.responseXML.documentElement.firstChild)
{l_nodeRoot=oRequest.responseXML.documentElement;var content=l_nodeRoot.firstChild.data;self.oCurrAjaxCont.oHtml.innerHTML=content;if(self.oCurrAjaxCont.bLoadCss)Loader.loadCssFilesOnDemand(content);if(self.oCurrAjaxCont.bLoadJs)Loader.loadJsFilesOnDemand(content);var aReturn=self.evalResponseJs(content);if(aReturn[1]!="")Helper.safeEval(aReturn[1],self);self.oCurrAjaxCont.strOnUnload=(aReturn[0]!="")?aReturn[0]:"";if(typeof(self.oCurrAjaxCont.strOnLoad)=="string"&&self.oCurrAjaxCont.strOnLoad.length>0)self.eval(self.oCurrAjaxCont.strOnLoad);l_bRet=true;}
else
{oHtmlRoot.oUp.adviceShow("Ajax Error: Process","Wrong or missing type of response document!<br>function: processResponse_SimpleAjaxContainer","ERROR_AJAX_PROCESS",null,self);}}
else
{oHtmlRoot.oUp.adviceShow("Ajax Error: Process","Unknown ajax trigger container!<br>function: processResponse_SimpleAjaxContainer","ERROR_AJAX_PROCESS",null,self);}}
else
{oHtmlRoot.oUp.adviceShow("Http Error","Status: "+oRequest.status+"<br>function: processResponse_SimpleAjaxContainer","ERROR_AJAX_PROCESS",null,self);}
return l_bRet;}}
catch(oExc)
{ErrorHandler.Ajax.handleJsException("processResponse_SimpleAjaxContainer",oRequest,oExc);return;}}