
function HelperMain(win)
{this.oWin=win||self;this.oDoc=this.oWin.document;this.event=new upEventHelper(this);this.listbox=new upListboxHelperReg(this);this.dbconflict=new upDbConflictHelper(this);this.style=new upStyleHelper(this);this.effect=new upEffectHelper(this);if(this.oWin.name!=self.name&&typeof(oHtmlRoot)=="object")
{for(var methode in oHtmlRoot.Array.prototype)this.oWin.eval("self.Array.prototype."+methode+"=oHtmlRoot.Array.prototype."+methode);for(var methode in oHtmlRoot.Number.prototype)this.oWin.eval("self.Number.prototype."+methode+"=oHtmlRoot.Number.prototype."+methode);for(var methode in oHtmlRoot.String.prototype)this.oWin.eval("self.String.prototype."+methode+"=oHtmlRoot.String.prototype."+methode);for(var methode in oHtmlRoot.Date.prototype)this.oWin.eval("self.Date.prototype."+methode+"=oHtmlRoot.Date.prototype."+methode);}
this.charset="UTF-8";var l_oFormatInfo=false;if(this.oWin.oUp&&this.oWin.oUp.oFormatInfo)
{l_oFormatInfo=this.oWin.oUp.oFormatInfo;}
else if(oHtmlRoot&&oHtmlRoot.oUp&&oHtmlRoot.oUp.oFormatInfo)
{l_oFormatInfo=oHtmlRoot.oUp.oFormatInfo;}
if(l_oFormatInfo&&l_oFormatInfo.charset&&typeof(l_oFormatInfo.charset)=="string")
{this.charset=l_oFormatInfo.charset;}}
function HelperMainClone(win)
{return new HelperMain(win);}
HelperMain.prototype.clone=HelperMainClone;HelperMain.prototype.trim=HelperTrim;HelperMain.prototype.lTrim=HelperLTrim;HelperMain.prototype.rTrim=HelperRTrim;HelperMain.prototype.getUrlFromUpAction=HelperGetUrlFromUpAction;HelperMain.prototype.sendToClipboard=HelperSendToClipboard;HelperMain.prototype.getQsValueByParam=HelperGetQsValueByParam;HelperMain.prototype.getUrlValueByParam=HelperGetUrlValueByParam;HelperMain.prototype.hexEncodeString=HelperHexEncodeString;HelperMain.prototype.dec2hex=dec2hex;HelperMain.prototype.hexEncodeUTF8=HelperHexEncodeUTF8;HelperMain.prototype.hexEncodeLatin1=HelperHexEncodeLatin1;HelperMain.prototype.hexDecodeString=HelperHexDecodeString;HelperMain.prototype.hexDecodeUTF8=HelperHexDecodeUTF8;HelperMain.prototype.hexDecodeLatin1=HelperHexDecodeLatin1;HelperMain.prototype.hexDigitToInt=HelperHexDigitToInt;HelperMain.prototype.getCookieValueByParam=HelperGetCookieValueByParam;HelperMain.prototype.deleteCookie=HelperDeleteCookie;HelperMain.prototype.isCookieEnabled=HelperIsCookieEnabled;HelperMain.prototype.setCookie=HelperSetCookie;HelperMain.prototype.setQsValueByParam=HelperSetQsValueByParam;HelperMain.prototype.containsQsParam=HelperContainsQsParam;HelperMain.prototype.mergeQueryStrings=HelperMergeQueryStrings;HelperMain.prototype.setUrlValueByParam=HelperSetUrlValueByParam;HelperMain.prototype.deleteParamFromUrl=HelperDeleteParamFromUrl;HelperMain.prototype.deleteParamFromQs=HelperDeleteParamFromQs;HelperMain.prototype.htmlEncode=HelperHtmlEncode;HelperMain.prototype._htmlEncode=Helper_HtmlEncode;HelperMain.prototype.makeRegExpPattern=HelperMakeRegExpPattern;HelperMain.prototype.getBaseUrl=HelperGetBaseUrl;HelperMain.prototype.getAbsBaseUrl=HelperGetAbsBaseUrl;HelperMain.prototype.xmlDecode=HelperXmlDecode;HelperMain.prototype.jsEncode=HelperJsEncode;HelperMain.prototype._jsEncode=Helper_JsEncode;HelperMain.prototype.closeTooltip=HelperCloseTooltip;HelperMain.prototype.makeArray=HelperMakeArray;HelperMain.prototype.isInteger=HelperIsInteger;HelperMain.prototype.replaceSubstring=HelperReplaceSubstring;HelperMain.prototype.getFupId=HelperGetFupId;HelperMain.prototype.doCharStuffing=HelperDoCharStuffing;HelperMain.prototype.undoCharStuffing=HelperUndoCharStuffing;HelperMain.prototype.parseFloat=HelperParseFloat;HelperMain.prototype.parseInt=HelperParseInt;HelperMain.prototype.setLayerText=HelperSetLayerText;HelperMain.prototype.disableRequired=funcHelperDisableRequired;HelperMain.prototype.compareValues=funcHelperCompareValues;HelperMain.prototype.resetDatapickerFields=funcHelperResetDatapickerFields;HelperMain.prototype.setValueToNA=funcHelperSetValueToNA;HelperMain.prototype.setElementVisibilty=funcHelperSetElementVisibilty;HelperMain.prototype.toggleElementVisibilty=funcHelperToggleElementVisibilty;HelperMain.prototype.setPickerColor=funcHelperColorPickerSetColor;HelperMain.prototype.getDateObject=HelperMainGetDateObject;HelperMain.prototype.getNumberObject=HelperMainGetNumberObject;HelperMain.prototype.getIntegerStringByLocal=HelperMainGetIntegerStringByLocal;HelperMain.prototype.getFloatStringByLocal=HelperMainGetFloatStringByLocal;HelperMain.prototype.getCurrencyStringByLocal=HelperMainGetCurrencyStringByLocal;HelperMain.prototype.getIntegerByLocalString=HelperMainGetIntegerByLocalString;HelperMain.prototype.getFloatByLocalString=HelperMainGetFloatByLocalString;HelperMain.prototype.getCurrencyByLocalString=HelperMainGetCurrencyByLocalString;HelperMain.prototype.toLocalString=HelperMainToLocalString;HelperMain.prototype.writeLocalString=HelperMainWriteLocalString;HelperMain.prototype.checkRequired=HelperMainCheckRequired;HelperMain.prototype.getLocalDurationString=HelperMainGetLocalDurationString;HelperMain.prototype.calculate=HelperMainCalculate;HelperMain.prototype.setFullDays=HelperMainSetFullDays;HelperMain.prototype.inking=HelperMainInking;HelperMain.prototype.inkingDate=HelperMainInkingDate;HelperMain.prototype.inkingString=HelperMainInkingString;HelperMain.prototype.getRow=HelperMainGetRow;HelperMain.prototype.getCol=HelperMainGetCol;HelperMain.prototype.makeAppRequest=HelperMainMakeAppRequest;HelperMain.prototype.calPickerOpen=calPickerOpen;HelperMain.prototype.calPickerClose=calPickerClose;HelperMain.prototype.colorPickerShow=colorPickerShow;HelperMain.prototype.getObject=HelperMainGetObject;HelperMain.prototype.createElement=HelperMainCreateElement;HelperMain.prototype.showTTP=HelperMainShowTTP;HelperMain.prototype.closeTTP=HelperMainCloseTTP;HelperMain.prototype.isTTPOpen=HelperMainIsTTPOpen;HelperMain.prototype.resizeByContent=HelperMainResizeByContent;HelperMain.prototype.removeChildNodes=HelperMainRemoveChildNodes;HelperMain.prototype.resetFavourites=HelperMainResetFavourites;HelperMain.prototype.safeEval=HelperMainSafeEval;HelperMain.prototype.getUniqueKey=upHelperMainGetUniqueKey;HelperMain.prototype.startTimer=HelperMainStartTimer;HelperMain.prototype.stopTimer=HelperMainStopTimer;HelperMain.prototype.parseXmlString=HelperMainParseXmlString;HelperMain.prototype.getHtmlByJsEventSupport=HelperMainGetHtmlByJsEventSupport;HelperMain.prototype._getHtmlByJsEventSupport=HelperMainGetHtmlByJsEventSupport_Inner;function HelperMainGetHtmlByJsEventSupport(p_oHtml,p_strEvent)
{var l_aEvents=[];var l_Ret=false;switch(p_strEvent)
{case"onresize":l_aEvents=["a","address","b","big","blockquote","body","button","cite","code","dd","dfn","div","dl","dt","em","fieldset","form","frame","h1> to <h6","hr","i","img","input","kbd","label","legend","li","object","ol","p","pre","samp","select","small","span","strong","sub","sup","table","textarea","tt","ul","var"];break;}
if(typeof(p_oHtml)!="undefined"&&p_oHtml!=null&&l_aEvents.length>0)
{l_Ret=this._getHtmlByJsEventSupport(p_oHtml,l_aEvents);}
return l_Ret;}
function HelperMainGetHtmlByJsEventSupport_Inner(p_oHtml,p_aEvents)
{if(p_aEvents.contains(p_oHtml.tagName.toLowerCase()))
{return p_oHtml;}
else if(p_oHtml.parentNode)
{return this._getHtmlByJsEventSupport(p_oHtml.parentNode,p_aEvents)}
else
{return false;}}
function HelperMainParseXmlString(p_strXml)
{if(window.ActiveXObject)
{var doc=new ActiveXObject("Microsoft.XMLDOM");doc.async="false";doc.loadXML(p_strXml);}
else
{var parser=new DOMParser();var doc=parser.parseFromString(p_strXml,"text/xml");}
return doc.documentElement;}
function HelperMainStartTimer(p_strKey)
{if(typeof(this.aStopWatch)=="undefined"||this.aStopWatch==null)this.aStopWatch=[];this.aStopWatch.push([new Date(),p_strKey||null]);}
function HelperMainStopTimer()
{var l_strRet="";if(typeof(this.aStopWatch)!="undefined"&&this.aStopWatch!=null&&this.aStopWatch.length>0)
{if(this.aStopWatch.length>1)
{for(var i=1;i<this.aStopWatch.length;i++)
{if(i>1)l_strRet+=" - ";if(this.aStopWatch[i][1]!=null)l_strRet+=" ("+this.aStopWatch[i][1]+") ";l_strRet+=((this.aStopWatch[i][0].getTime()-this.aStopWatch[0][0].getTime()))}
l_strRet+=" ==> ";}
var dtEnd=new Date();if(this.aStopWatch[0][1]!=null)l_strRet+=" ("+this.aStopWatch[0][1]+") ";l_strRet+=((dtEnd.getTime()-this.aStopWatch[0][0].getTime()))
this.aStopWatch=[];}
return l_strRet;}
function HelperMainCreateElement(p_strEl,p_strId,p_strStyleClass,p_aStyles)
{if(arguments.length>=2)
{function _upCreateElement(doc)
{var newElement=doc.createElement(p_strEl);newElement.id=p_strId;if(typeof(p_strStyleClass)=="string")newElement.className=p_strStyleClass;if(typeof(p_aStyles)=="object")
{var newElementStyle=newElement.style;for(var l_Style in p_aStyles)
{if(l_Style=="zIndex"&&(Browser.ie8up||Browser.ie8compat)&&isNaN(p_aStyles[l_Style]))newElementStyle.l_Style=p_aStyles[l_Style];else newElementStyle[l_Style]=p_aStyles[l_Style];}}
return newElement;}
return _upCreateElement(this.oDoc);}
return false;}
function HelperMainGetObject(key)
{var l_aBuffer=new Array();l_aBuffer.push("oHtmlRoot.oUp.oRegistry.oJsReg.getObject('"+key+"', this.oWin");for(var i=1;i<arguments.length;i++)
{l_aBuffer.push(",");l_aBuffer.push("arguments["+i+"]")}
l_aBuffer.push(")");return eval(l_aBuffer.join(""));}
function upEffectHelper(helper)
{this.oHlp=helper;this.oWin=this.oHlp.oWin;this.oDoc=this.oHlp.oDoc;}
upEffectHelper.prototype.expandDown=HelperExpandDown;upEffectHelper.prototype.collapseLeft=HelperCollapseLeft;upEffectHelper.prototype.expandRight=HelperExpandRight;upEffectHelper.prototype.collapseUp=HelperCollapseUp;upEffectHelper.prototype._expandDown=Helper_ExpandDown;upEffectHelper.prototype._collapseLeft=Helper_CollapseLeft;upEffectHelper.prototype._expandRight=Helper_ExpandRight;upEffectHelper.prototype._collapseUp=Helper_CollapseUp;upEffectHelper.prototype.fadeBGColor=HelperFadeBGColor;function HelperExpandDown(p_oHtml,p_strOnFinish)
{if(p_oHtml.bHasRunningEffect)return false;if(arguments.length<2)p_strOnFinish=new String("");p_oHtml.style.display="";p_oHtml.style.visibility="visible";var l_iHeight=p_oHtml.offsetHeight;var l_iWidth=p_oHtml.offsetWidth;p_oHtml.style.position="absolute";p_oHtml.style.height=l_iHeight+"px";p_oHtml.style.width=l_iWidth+"px";var l_oContainer=this.oDoc.createElement("div");l_oContainer.id=p_oHtml+"_expandcontainer";p_oHtml.parentNode.insertBefore(l_oContainer,p_oHtml);l_oContainer.style.width=l_iWidth+"px";l_oContainer.appendChild(p_oHtml);p_oHtml.bHasRunningEffect=true;this.oWin.Helper.effect._expandDown(p_oHtml.id,l_oContainer.id,l_iWidth,0,l_iWidth,l_iHeight,p_strOnFinish);return true;}
function Helper_ExpandDown(p_strHtmlId,p_strHtmlContainerId,p_iCurrWidth,p_iCurrHeight,p_iEndWidth,p_iEndHeight,p_strOnFinish)
{var l_oHtml=this.oDoc.getElementById(p_strHtmlId);var l_oHtmlCont=this.oDoc.getElementById(p_strHtmlContainerId);var i=((p_iEndHeight-p_iCurrHeight)/10);if(i<1)
{i=2;}
p_iCurrHeight=Math.ceil(p_iCurrHeight+i);if(p_iCurrHeight<p_iEndHeight)
{l_oHtmlCont.style.height=p_iCurrHeight+"px";l_oHtml.style.clip="rect(0px, "+p_iEndWidth+"px, "+p_iCurrHeight+"px, 0px)";this.oWin.setTimeout("Helper.effect._expandDown('"+p_strHtmlId+"', '"+p_strHtmlContainerId+"', "+p_iCurrWidth+", "+p_iCurrHeight+", "+p_iEndWidth+", "+p_iEndHeight+", '"+p_strOnFinish+"');",5);}
else
{l_oHtml.bHasRunningEffect=false;l_oHtml.style.height="100%";l_oHtml.style.width="100%";l_oHtml.style.clip="rect(0px, "+p_iEndWidth+"px, "+p_iEndHeight+"px, 0px)";l_oHtmlCont.parentNode.insertBefore(l_oHtml,l_oHtmlCont);l_oHtml.parentNode.removeChild(l_oHtmlCont);l_oHtml.style.position="relative";this.oHlp.safeEval(p_strOnFinish);}}
function HelperCollapseUp(p_oHtml,p_strOnFinish)
{if(p_oHtml.bHasRunningEffect)return false;if(arguments.length<2)p_strOnFinish=new String("");p_oHtml.style.display="";p_oHtml.style.visibility="visible";var l_iHeight=p_oHtml.offsetHeight;var l_iWidth=p_oHtml.offsetWidth;p_oHtml.style.position="absolute";p_oHtml.style.height=l_iHeight+"px";p_oHtml.style.width=l_iWidth+"px";var l_oContainer=this.oDoc.createElement("div");l_oContainer.id=p_oHtml+"_expandcontainer";p_oHtml.parentNode.insertBefore(l_oContainer,p_oHtml);l_oContainer.style.width=l_iWidth+"px";l_oContainer.style.height=l_iHeight+"px";l_oContainer.appendChild(p_oHtml);p_oHtml.bHasRunningEffect=true;this.oWin.Helper.effect._collapseUp(p_oHtml.id,l_oContainer.id,l_iWidth,l_iHeight,p_strOnFinish);return true;}
function Helper_CollapseUp(p_strHtmlId,p_strHtmlContainerId,p_iCurrWidth,p_iCurrHeight,p_strOnFinish)
{var l_oHtml=this.oDoc.getElementById(p_strHtmlId);var l_oHtmlCont=this.oDoc.getElementById(p_strHtmlContainerId);var i=(p_iCurrHeight/10);if(i<1)
{i=1;}
p_iCurrHeight=Math.ceil(p_iCurrHeight-i);if(p_iCurrHeight>0)
{l_oHtmlCont.style.height=p_iCurrHeight+"px";l_oHtml.style.clip="rect(0px, "+p_iCurrWidth+"px, "+p_iCurrHeight+"px, 0px)";this.oWin.setTimeout("Helper.effect._collapseUp('"+p_strHtmlId+"', '"+p_strHtmlContainerId+"', "+p_iCurrWidth+", "+p_iCurrHeight+", '"+p_strOnFinish+"');",5);}
else
{l_oHtml.bHasRunningEffect=false;l_oHtmlCont.parentNode.insertBefore(l_oHtml,l_oHtmlCont);l_oHtml.parentNode.removeChild(l_oHtmlCont);l_oHtml.style.position="relative";l_oHtml.style.visibility="hidden";l_oHtml.style.display="none";this.oHlp.safeEval(p_strOnFinish);}}
function HelperExpandRight(p_oHtml)
{p_oHtml.style.display="";p_oHtml.style.visibility="visible";var l_iHeight=p_oHtml.offsetHeight;var l_iWidth=p_oHtml.offsetWidth;p_oHtml.style.position="absolute";p_oHtml.style.height=l_iHeight+"px";p_oHtml.style.width=l_iWidth+"px";var l_oContainer=this.oDoc.createElement("div");l_oContainer.id=p_oHtml+"_expandcontainer";p_oHtml.parentNode.insertBefore(l_oContainer,p_oHtml);l_oContainer.style.height=l_iHeight+"px";l_oContainer.appendChild(p_oHtml);this.oWin.Helper.effect._expandRight(p_oHtml.id,l_oContainer.id,0,l_iHeight,l_iWidth,l_iHeight);}
function Helper_ExpandRight(p_strHtmlId,p_strHtmlContainerId,p_iCurrWidth,p_iCurrHeight,p_iEndWidth,p_iEndHeight)
{var l_oHtml=this.oDoc.getElementById(p_strHtmlId);var l_oHtmlCont=this.oDoc.getElementById(p_strHtmlContainerId);var i=((p_iEndWidth-p_iCurrWidth)/15);if(i<1)
{i=2;}
p_iCurrWidth=Math.ceil(p_iCurrWidth+i);if(p_iCurrWidth<p_iEndWidth)
{l_oHtmlCont.style.width=p_iCurrWidth+"px";l_oHtml.style.clip="rect(0px, "+p_iCurrWidth+"px, "+p_iEndHeight+"px, 0px)";this.oWin.setTimeout("Helper.effect._expandRight('"+p_strHtmlId+"', '"+p_strHtmlContainerId+"', "+p_iCurrWidth+", "+p_iCurrHeight+", "+p_iEndWidth+", "+p_iEndHeight+");",10);}
else
{l_oHtml.style.height="100%";l_oHtml.style.clip="rect(0px, "+p_iEndWidth+"px, "+p_iEndHeight+"px, 0px)";l_oHtmlCont.parentNode.insertBefore(l_oHtml,l_oHtmlCont);l_oHtml.parentNode.removeChild(l_oHtmlCont);l_oHtml.style.position="relative";}}
function HelperCollapseLeft(p_oHtml)
{p_oHtml.style.display="";p_oHtml.style.visibility="visible";var l_iHeight=p_oHtml.offsetHeight;var l_iWidth=p_oHtml.offsetWidth;p_oHtml.style.position="absolute";p_oHtml.style.height=l_iHeight+"px";p_oHtml.style.width=l_iWidth+"px";var l_oContainer=this.oDoc.createElement("div");l_oContainer.id=p_oHtml+"_expandcontainer";p_oHtml.parentNode.insertBefore(l_oContainer,p_oHtml);l_oContainer.style.width=l_iWidth+"px";l_oContainer.style.height=l_iHeight+"px";l_oContainer.appendChild(p_oHtml);this.oWin.Helper.effect._collapseLeft(p_oHtml.id,l_oContainer.id,l_iWidth,l_iHeight);}
function Helper_CollapseLeft(p_strHtmlId,p_strHtmlContainerId,p_iCurrWidth,p_iCurrHeight)
{var l_oHtml=this.oDoc.getElementById(p_strHtmlId);var l_oHtmlCont=this.oDoc.getElementById(p_strHtmlContainerId);var i=(p_iCurrWidth/15);if(i<1)
{i=1;}
p_iCurrWidth=Math.ceil(p_iCurrWidth-i);if(p_iCurrWidth>0)
{l_oHtmlCont.style.width=p_iCurrWidth+"px";l_oHtml.style.clip="rect(0px, "+p_iCurrWidth+"px, "+p_iCurrHeight+"px, 0px)";this.oWin.setTimeout("Helper.effect._collapseLeft('"+p_strHtmlId+"', '"+p_strHtmlContainerId+"', "+p_iCurrWidth+", "+p_iCurrHeight+");",10);}
else
{l_oHtmlCont.parentNode.insertBefore(l_oHtml,l_oHtmlCont);l_oHtml.parentNode.removeChild(l_oHtmlCont);l_oHtml.style.position="relative";l_oHtml.style.visibility="hidden";l_oHtml.style.display="none";}}
function HelperFadeBGColor(p_strId,p_iFps,p_iDuration,p_strCssProp,p_strJsProp,p_strFrom,p_strTo)
{var oYellowFade=oHtmlRoot.oUp.oWAISettings.oYellowFade;if(typeof setYellowFadeProps!="undefined")
setYellowFadeProps();var strId=p_strId;var iFps=20;if(p_iFps)
iFps=p_iFps;var iDuration=2000;if(p_iDuration)
iDuration=p_iDuration;var strCssProp="background-color";if(p_strCssProp)
strCssProp=p_strCssProp;else if(oYellowFade.cssProp!="")
strCssProp=oYellowFade.cssProp;var strJsProp="backgroundColor";if(p_strJsProp)
strJsProp=p_strJsProp;else if(oYellowFade.jsProp!="")
strJsProp=oYellowFade.jsProp;var strFromPraefix="";var strFrom="#FFFF99";if(p_strFrom)
strFrom=p_strFrom;else if(oYellowFade.value!="")
strFrom=oYellowFade.value;if(strFrom.indexOf("#")>0)
{strFromPraefix=strFrom.substring(0,strFrom.indexOf("#"));strFrom=strFrom.substring(strFrom.indexOf("#"));}
if(!p_strTo)
var strTo=this.oHlp.style.getComputedStyleProp(strId,strCssProp,true);else
var strTo=p_strTo;var iFrames=Math.round(iFps*(iDuration/1000));var iInterval=iDuration/iFrames;var iDelay=iInterval*1;var iFrame=0;var redFrom=parseInt(strFrom.substr(1,2),16);var greenFrom=parseInt(strFrom.substr(3,2),16);var blueFrom=parseInt(strFrom.substr(5,2),16);var redTo=parseInt(strTo.substr(1,2),16);var greenTo=parseInt(strTo.substr(3,2),16);var blueTo=parseInt(strTo.substr(5,2),16);var r,g,b,strHexColor;while(iFrame<iFrames)
{r=Math.floor(redFrom*((iFrames-iFrame)/iFrames)+redTo*(iFrame/iFrames));g=Math.floor(greenFrom*((iFrames-iFrame)/iFrames)+greenTo*(iFrame/iFrames));b=Math.floor(blueFrom*((iFrames-iFrame)/iFrames)+blueTo*(iFrame/iFrames));strHexColor=this.oHlp.style.makeHexRGB(r,g,b);this.oWin.setTimeout("if(document.getElementById('"+strId+"'))document.getElementById('"+strId+"').style."+strJsProp+"='"+strFromPraefix+strHexColor+"';",iDelay);iFrame++;iDelay=iInterval*iFrame;}
this.oWin.setTimeout("if(document.getElementById('"+strId+"'))document.getElementById('"+strId+"').style."+strJsProp+"='"+strFromPraefix+strTo+"';",iDelay);}
function upStyleHelper(helper)
{this.oHlp=helper;this.oWin=this.oHlp.oWin;this.oDoc=this.oHlp.oDoc;}
upStyleHelper.prototype.loadStyleSheets=upStyleHelperLoadStyleSheets;upStyleHelper.prototype.loadAllStyleSheets=upStyleHelperLoadAllStyleSheets
upStyleHelper.prototype.loadDocStyleSheets=upStyleHelperLoadDocStyleSheets
upStyleHelper.prototype.findStyleSheetRule=upStyleHelperFindStyleSheetRule;upStyleHelper.prototype.findStyleSheetRuleByElement=upStyleHelperFindStyleSheetRuleByElement;upStyleHelper.prototype.getStylePropsFromElement=upStyleHelperGetStylePropsFromElement;upStyleHelper.prototype.getMeasureInfos=upStyleHelperGetMeasureInfos;upStyleHelper.prototype.addStyleSheets=upStyleHelperAddStyleSheets;upStyleHelper.prototype.changeClassBySuffix=upStyleHelperChangeClassBySuffix;upStyleHelper.prototype.getMeasurePropsByRule=upStyleHelperGetMeasurePropsByRule;upStyleHelper.prototype.getMeasurePropsByElement=upStyleHelperGetMeasurePropsByElement;upStyleHelper.prototype.registerStyleSheet=upStyleHelperRegisterStyleSheet;upStyleHelper.prototype.unregisterStyleSheet=upStyleHelperUnregisterStyleSheet;upStyleHelper.prototype.getComputedStyleProp=upStyleHelperGetComputedStyleProp;upStyleHelper.prototype.getComputedStylePropByElement=upStyleHelperGetComputedStylePropByElement;upStyleHelper.prototype.makeHexRGB=upStyleHelperMakeHexRGB;upStyleHelper.prototype.setAbsoluteWidth=upStyleHelperSetAbsoluteWidth;upStyleHelper.prototype.setAbsoluteHeight=upStyleHelperSetAbsoluteHeight;upStyleHelper.prototype.setOpacity=upStyleHelperSetOpacity;function upStyleHelperSetOpacity(p_oHtml,p_iOpacity)
{if(typeof(p_iOpacity)!="number"||!p_oHtml)return;if(!p_oHtml.currentStyle||!p_oHtml.currentStyle.hasLayout)p_oHtml.style.zoom=1;p_oHtml.style.opacity=""+p_iOpacity/100;p_oHtml.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+p_iOpacity+");";p_oHtml.style.MozOpacity=""+p_iOpacity/100;p_oHtml.style.KHTMLOpacity=""+p_iOpacity/100;}
function upEventHelper(helper)
{this.oHlp=helper;this.oWin=this.oHlp.oWin;this.oDoc=this.oHlp.oDoc;}
upEventHelper.prototype.cancelBubble=upEventHelperCancelBubble;function upListboxHelperReg(helper)
{this.oHlp=helper;this.oWin=this.oHlp.oWin;this.oDoc=this.oHlp.oDoc;}
upListboxHelperReg.prototype.register=upListboxHelperRegRegister;function upListboxHelperRegRegister(p_strName,p_aListboxes)
{if(p_strName==null||typeof(p_strName)!="string"||p_strName.length<=0)
{p_strName=this.oHlp.getUniqueKey();}
this[p_strName]=new upListboxHelper(this);this[p_strName].addListbox(p_aListboxes);this[p_strName].strKey=p_strName;return this[p_strName];}
function upListboxHelper(reg)
{this.oRegistry=reg;this.oWin=reg.oWin;this.oDoc=reg.oDoc;this.colArray=new Array();this.colbox=null;this.strKey=null;this.onchange=null;}
upListboxHelper.prototype.addListbox=upListboxHelperAddListbox;upListboxHelper.prototype.selectListbox=upListboxHelperSelectListbox;upListboxHelper.prototype.insert=upListboxHelperInsert;upListboxHelper.prototype.remove=upListboxHelperRemove;upListboxHelper.prototype.moveLeft=upListboxHelperMoveLeft;upListboxHelper.prototype.moveRight=upListboxHelperMoveRight;upListboxHelper.prototype.moveUp=upListboxHelperMoveUp;upListboxHelper.prototype.moveDown=upListboxHelperMoveDown;upListboxHelper.prototype.moveRightMultiple=upListboxHelperMoveRightMultiple;upListboxHelper.prototype.moveLeftMultiple=upListboxHelperMoveLeftMultiple;upListboxHelper.prototype.moveUpMultiple=upListboxHelperMoveUpMultiple;upListboxHelper.prototype.moveDownMultiple=upListboxHelperMoveDownMultiple;upListboxHelper.prototype.insertMultiple=upListboxHelperInsertMultiple;upListboxHelper.prototype.removeMultiple=upListboxHelperRemoveMultiple;upListboxHelper.prototype.getCountOfSelectedItems=upListboxHelperGetCountOfSelectedItems;upListboxHelper.prototype.doCharStuffing=upListboxHelperDoCharStuffing;upListboxHelper.prototype.getSelected=upListboxHelperGetSelected;upListboxHelper.prototype._onchange=upListboxHelper_Onchange;function upDbConflictHelper(helper)
{this.oHlp=helper;this.oWin=this.oHlp.oWin;this.oDoc=this.oHlp.oDoc;this.checkUpBySysidentAndObject=upDbConflictHelperCheckUpBySysidentAndObject;}
function HelperSetLayerText(p_LayerId,p_strText)
{if(document.all)
{this.oDoc.all[p_LayerId].innerHTML=p_strText;}
else if(this.oDoc.getElementById)
{while(this.oDoc.getElementById(p_LayerId).childNodes.length>0)
this.oDoc.getElementById(p_LayerId).removeChild(this.oDoc.getElementById(p_LayerId).firstChild);var text=this.oDoc.createTextNode(p_strText);this.oDoc.getElementById(p_LayerId).appendChild(text);}}
function HelperParseFloat(strLocalFloat)
{var oFloat=new upFloatControl();return parseFloat(oFloat.toJSNumber(strLocalFloat));}
function HelperParseInt(strLocalInt)
{var oInt=new upIntegerControl();return parseInt(oInt.toJSNumber(strLocalInt));}
function HelperDoCharStuffing(aInput)
{var out=new Array();for(var i=0;i<aInput.length;i++)
{if(i>0)out.push("||");out.push(aInput[i].toString().replace(/\|/g,"|0"));}
return out.join("");}
function HelperUndoCharStuffing(strInput)
{var aOut=new Array();var value="";var aTemp=strInput.split("||");for(var i=0;i<aTemp.length;i++)
{aOut[i]=aTemp[i].toString().replace(/\|0/g,"|");}
return aOut;}
function HelperGetFupId(oControl)
{var fup="";if(oControl!=null&&typeof(oControl)=="object")
{if(oControl.oFup)
{fup=oControl.oFup.id;}
else if(oControl&&oControl.oHtml&&oControl.oHtml.form&&oControl.oHtml.form.oUp&&oControl.oHtml.form.oUp.oFuncPart)
{fup=oControl.oHtml.form.oUp.oFuncPart.id;}
var oParent;if(oControl.parentNode)
{oParent=oControl.parentNode;}
else if(oControl.oHtml&&oControl.oHtml.parentNode)
{oParent=oControl.oHtml.parentNode;}
while(oParent)
{if(oParent.oUp&&oParent.oUp.upType=="upFuncPart")
{fup=oParent.oUp.id;break;}
oParent=oParent.parentNode;}}
if(fup=="")
{if(this.oWin&&this.oWin.oUp&&this.oWin.oUp.oFuncPart)
{fup=this.oWin.oUp.oFuncPart.id;}
else
{fup=this.getQsValueByParam("rq_TargetId");}}
return fup;}
function HelperMainSafeEval(p_strCode,p_oWin)
{if(arguments.length<2)p_oWin=this.oWin;if(Browser.safari)
{p_oWin.setTimeout(""+p_strCode,0);}
else
{p_oWin.eval(p_strCode);}
return true;}
function upHelperMainGetUniqueKey(p_strPre)
{if(arguments.length<1)p_strPre="ID_";a=1+99999999*(Math.random());a=Math.round(a);return(p_strPre+a);}
function HelperMainResetFavourites(p_strId,p_oConfirm)
{if(arguments.length==2)
{if(typeof(p_oConfirm)=="object"&&p_oConfirm.bConfirm&&typeof(p_oConfirm.oHtmlAction)=="object")
{var rvDelete=p_oConfirm.oHtmlAction.oUp.confirmDelete(p_oConfirm.oHtmlAction,p_oConfirm.oEvent,self.oUp.oMessage.CONFIRM_DELETE_FAVOURITES);if(!rvDelete)return false;}}
var l_bRet=new Boolean(false);if(typeof(oFavRegistry)!="object")
{Loader.loadJsFileOnDemand("include/favourite.js");}
if(typeof(oFavRegistry)=="object")
{l_bRet=oFavRegistry.resetFavourites(p_strId);}
return true;}
function HelperReplaceSubstring(p_strString,p_strSubstringFrom,p_strSubstringTo)
{var l_strStingOut="";if(!p_strString||p_strString=="")
{return"";}
else
{var l_strString=p_strString.toString();}
if(!p_strSubstringFrom||p_strSubstringFrom=="")
{return l_strString;}
else
{var l_strSubstringFrom=p_strSubstringFrom.toString();}
if(!p_strSubstringTo)
{l_strSubstringTo="";}
else
{var l_strSubstringTo=p_strSubstringTo.toString();}
var l_lStartPos=0;var l_lEndPos=l_strString.indexOf(l_strSubstringFrom,0);while(l_lEndPos!=-1)
{for(var i=l_lStartPos;i<l_lEndPos;i++)
{l_strStingOut+=l_strString.charAt(i);}
l_strStingOut+=l_strSubstringTo;l_lStartPos=l_lEndPos+l_strSubstringFrom.length;l_lEndPos=l_strString.indexOf(l_strSubstringFrom,l_lStartPos);}
for(i=l_lStartPos;i<l_strString.length;i++)
{l_strStingOut+=l_strString.charAt(i);}
return l_strStingOut;}
function HelperIsInteger(s)
{if(isNaN(parseInt(s,10)))
{return false;}
else
{return true;}}
function HelperMakeArray(n)
{var arr=new Array(n+1);for(var i=1;i<=n;i++)
{arr[i]=0;}
return arr;}
function HelperCloseTooltip(p_oHtml)
{var l_oForm=null;if(arguments.length>0&&p_oHtml&&typeof p_oHtml=="object"&&!/#document/.test(p_oHtml.nodeName))
{if(!/(FORM)/.test(p_oHtml.nodeName))
{l_oForm=getFormObjectByElement(p_oHtml);}
else if(/(FORM)/.test(p_oHtml.nodeName))
{l_oForm=p_oHtml;}
if(l_oForm&&l_oForm!=null&&l_oForm!=false&&typeof l_oForm=="object")
{if(l_oForm!=false&&typeof l_oForm=="object"&&l_oForm.oUp&&typeof l_oForm.oUp=="object"&&l_oForm.oUp.tooltip&&l_oForm.oUp.tooltip._isVisible())
{l_oForm.oUp.tooltip.close();}
else if(p_oHtml.document&&p_oHtml.document.oMsgNotifier&&typeof p_oHtml.document.oMsgNotifier=="object"&&p_oHtml.document.oMsgNotifier._isVisible())
{p_oHtml.document.oMsgNotifier.close();}}}
else
{if(arguments.length>0&&p_oHtml&&typeof p_oHtml=="object"&&/#document/.test(p_oHtml.nodeName))
{var l_oDoc=p_oHtml;}
else
{var l_oDoc=this.oDoc;}
if(l_oDoc.forms.length>0)
{for(var i=0;i<this.oDoc.forms.length;i++)
{l_oForm=this.oDoc.forms[i];this.closeTooltip(l_oForm);}}}
return true;}
function HelperXmlDecode(s)
{s=s.replace(/&quot;/g,"\"");s=s.replace(/&gt;/g,">");s=s.replace(/&lt;/g,"<");s=s.replace(/&#x27;/g,"'");s=s.replace(/&amp;/g,"&");return s;}
function HelperJsEncode(s)
{var out=[];for(var i=0;i<s.length;i++)
{out.push(this._jsEncode(s.charAt(i)));}
return out.join("");}
function Helper_JsEncode(c)
{var out_c="";switch(c)
{case"\'":out_c="\\'";break;case"\"":out_c='\\"';break;case"\\":out_c="\\\\";break;case"\r":out_c="\\r";break;case"\n":out_c="\\n";break;default:out_c=c;}
return out_c;}
function HelperHtmlEncode(s,bInsertNbsp,bInsertBr)
{var out=[];for(var i=0;i<s.length;i++)
{out.push(this._htmlEncode(s.charAt(i),bInsertNbsp,bInsertBr));}
return out.join("");}
function Helper_HtmlEncode(c,bInsertNbsp,bInsertBr)
{var out_c=c;switch(c)
{case"&":out_c="&amp;";break;case"\"":out_c="&quot;";break;case">":out_c="&gt;";break;case"<":out_c="&lt;";break;case" ":if(bInsertNbsp)
out_c="&nbsp;";break;case"\n":if(bInsertBr)
out_c="<br>";break;}
return out_c;}
function HelperGetBaseUrl()
{var baseurl=this.oWin.oHtmlRoot.oUp.connector;if(!this.getCookieValueByParam("co_SId"))
{if(this.getQsValueByParam("rq_SId"))
baseurl=this.setUrlValueByParam("rq_SId",this.getQsValueByParam("rq_SId"),baseurl);}
if(!this.getCookieValueByParam("co_Lang"))
{if(this.getQsValueByParam("rq_Lang"))
baseurl=this.setUrlValueByParam("rq_Lang",this.getQsValueByParam("rq_Lang"),baseurl);}
return baseurl;}
function HelperGetAbsBaseUrl()
{var l_strUrl;if(typeof(oHtmlRoot.oUp.strAbsBaseUrl)=="string"&&oHtmlRoot.oUp.strAbsBaseUrl.length>0)
{l_strUrl=oHtmlRoot.oUp.strAbsBaseUrl;}
else
{l_strUrl=this.oDoc.location.protocol+"//"+this.oWin.location.host+this.getBaseUrl();}
return l_strUrl;}
function HelperLTrim(s)
{if(arguments.length==0||typeof(s)=="undefined")
return false;return s.replace(/^\s+/g,"");}
function HelperRTrim(s)
{if(arguments.length==0||typeof(s)=="undefined")
return false;return s.replace(/\s+$/g,"");}
function HelperTrim(s)
{if(arguments.length==0||typeof(s)=="undefined")
return false;s=new String(s);return s.replace(/^\s+|\s+$/g,"");}
function HelperDeleteParamFromUrl(p_strParam,p_strUrl)
{var l_strNewQs;var l_strLoc=p_strUrl.substring(0,p_strUrl.indexOf("?"));var l_strQs=p_strUrl.substring(p_strUrl.indexOf("?"));l_strNewQs=this.deleteParamFromQs(p_strParam,l_strQs);return l_strLoc+"?"+l_strNewQs;}
function HelperDeleteParamFromQs(p_strParam,p_strQs)
{var qsSearch="";if(p_strParam=="")
{return false;}
if(this.deleteParamFromQs.arguments.length==2)
{qsSearch=p_strQs;}
else if(this.oWin.location&&typeof(this.oWin.location.search)!="unknown")
{qsSearch=this.oWin.location.search;}
else
{return false;}
var countPara=0;var qsNew="";if(qsSearch.substring(0,1)=="?")
{qsSearch=qsSearch.substring(1,qsSearch.length);}
var aQsSearch=qsSearch.split("&");for(countPara=0;countPara<aQsSearch.length;countPara++)
{var aQsPart=aQsSearch[countPara].split("=");if(aQsPart[0]==p_strParam)
{qsNew=qsNew;}
else
{if(qsNew!="")
{qsNew=qsNew+"&";}
qsNew=qsNew+aQsSearch[countPara];}}
return qsNew;}
function HelperIsCookieEnabled()
{if(navigator.cookieEnabled!="undefined")return navigator.cookieEnabled;document.cookie="testCookie=cookieEnabled";var cookieTest=document.cookie;if(cookieTest&&cookieTest.indexOf("cookieEnabled")>-1)
{this.deleteCookie("testCookie");return true;}
else
{return false;}}
function HelperSetCookie(p_strParam,p_strValue,bExpire,p_lTimeOut)
{var l_strNewCookie;var l_lTimeOut;var l_strExpire;if(this.isCookieEnabled)
{l_strNewCookie=p_strParam+"=";l_strExpire="";if(COOKIEVAR.isEncoded(p_strParam))
{l_strNewCookie+=this.hexEncodeString(p_strValue);}
else
{l_strNewCookie+=p_strValue;}
if(bExpire&&bExpire==true)
{var expDate=new Date();l_strExpire="; expires="+expDate.toGMTString(expDate.setTime(expDate.getTime()+(365*24*60*60*1000)));}
if(p_lTimeOut&&!isNaN(p_lTimeOut))
{var expDate=new Date();l_strExpire="; expires="+expDate.toGMTString(expDate.setTime(expDate.getTime()+p_lTimeOut));}
l_strNewCookie+=l_strExpire;document.cookie=l_strNewCookie;return true;}
else
{return false;}}
function HelperDeleteCookie(p_strParam)
{var cookieNew=p_strParam+"=''";var expDate=new Date(1970,0,2);cookieNew+="; expires="+expDate.toGMTString();this.setCookie(cookieNew);return true;}
function HelperGetCookieValueByParam(p_strParam)
{var strValue;if(p_strParam=="")
{return false;}
if(document.cookie&&document.cookie!="")
{var cookies=document.cookie;var aCookies=cookies.split(";");for(var i=0;i<aCookies.length;i++)
{var aCookiePart=aCookies[i].split("=");if(this.trim(aCookiePart[0])==this.trim(p_strParam))
{if(COOKIEVAR.isEncoded(p_strParam))
strValue=this.hexDecodeString(aCookiePart[1]);else
strValue=aCookiePart[1];return strValue;}}}
return false;}
function HelperGetUrlFromUpAction(p_oAct)
{var l_strText=new String("");if(typeof(p_oAct)=="object"&&(p_oAct.upType=="upTextActionControl"||p_oAct.upType=="upButtonControl"||p_oAct.upType=="upImageActionControl"||p_oAct.upType=="upActionControl"))
{p_oAct.setTemplateAndFrame();p_oAct.setQueryString();p_oAct.handleAddParam();l_strText=this.getAbsBaseUrl();l_strText+=(l_strText.indexOf("?")==-1)?"?":"&";l_strText+=p_oAct.QueryString;}
return l_strText;}
function HelperSendToClipboard(arg,props)
{var l_oProps={strMsgTitle:"Clipboard",strMsgBody:"Text copied to clipboard",bFallback:true,iTextHeight:10,iTextWidth:60,strTextStyles:"overflow:auto;"};for(var prop in props)
{l_oProps[prop]=props[prop];}
if(arguments.length<1||arg==null)return false
var l_strText=new String("");var l_bRet=false;if(typeof(arg)=="object"&&(arg.upType=="upTextActionControl"||arg.upType=="upButtonControl"||arg.upType=="upImageActionControl"||arg.upType=="upActionControl"))
{l_strText=this.getUrlFromUpAction(arg);}
else if(typeof(arg)=="string")
{l_strText=arg;}
if(l_strText.length>0)
{if(window.clipboardData)
{window.clipboardData.setData("Text",l_strText);l_bRet=true;}
else if(window.netscape)
{try
{netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');var str=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);if(!str)return false;str.data=l_strText;var trans=Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);if(!trans)return false;trans.addDataFlavor("text/unicode");trans.setTransferData("text/unicode",str,l_strText.length*2);var clipid=Components.interfaces.nsIClipboard;var clip=Components.classes["@mozilla.org/widget/clipboard;1"].getService(clipid);if(!clip)return false;clip.setData(trans,null,clipid.kGlobalClipboard);l_bRet=true;}
catch(e)
{}}}
if(l_bRet)
{oHtmlRoot.oUp.adviceShow(l_oProps.strMsgTitle,l_oProps.strMsgBody,"COPY_TO_CLIPBOARD_SUCCESS",null,this.oWin);}
else if(l_oProps.bFallback&&l_strText.length>0)
{oHtmlRoot.oUp.adviceShow(l_oProps.strMsgTitle,'<textarea id="ID_ClipboardText" style="'+l_oProps.strTextStyles+'" rows="'+l_oProps.iTextHeight+'" cols="'+l_oProps.iTextWidth+'">'+l_strText+'</textarea>',"SHOW_TEXT_IN_TOOLTIP",{strOnload:"var e=document.getElementById('ID_ClipboardText');if(e){e.select();}"},this.oWin);l_bRet=true;}
return l_bRet;}
function HelperSetUrlValueByParam(p_strParam,p_strValue,p_strUrl)
{var l_strNewQs="";var l_strQs="";var l_strQs2="";var l_strLoc=p_strUrl;var l_strAnchor="";if(p_strUrl.indexOf("?")>-1)
{l_strLoc=p_strUrl.substring(0,p_strUrl.indexOf("?"));l_strQs=p_strUrl.substring(p_strUrl.indexOf("?"));}
if(l_strQs.lastIndexOf("#")>-1)
{l_strQs2=l_strQs.substring(0,l_strQs.lastIndexOf("#"));l_strAnchor=l_strQs.substring(l_strQs.lastIndexOf("#"),l_strQs.length);}
else
{l_strQs2=l_strQs;}
l_strNewQs=this.setQsValueByParam(p_strParam,p_strValue,l_strQs2);return l_strLoc+"?"+l_strNewQs+l_strAnchor;}
function HelperContainsQsParam(p_strParam,p_strQs)
{if(p_strParam=="")
{return false;}
var qsSearch="";if(arguments.length==2)
{qsSearch=p_strQs;}
else if(this.oWin.location&&typeof(this.oWin.location.search)!="unknown")
{qsSearch=this.oWin.location.search;}
var countPara=0;if(qsSearch!="")
{if(qsSearch.indexOf("?")>-1&&qsSearch.substring(0,1)=="?")
{qsSearch=qsSearch.substring(1,qsSearch.length);}
var aQsSearch=qsSearch.split("&");for(countPara=0;countPara<aQsSearch.length;countPara++)
{var aQsPart=aQsSearch[countPara].split("=");if(aQsPart[0]==p_strParam)
{return true;}}}
return false;}
function HelperMergeQueryStrings(string1,string2)
{if(arguments.length<1)
{return new String("");}
else if(arguments.length<2)
{return string1;}
var countPara=0;if(string2!="")
{if(string2.indexOf("?")>-1&&string2.substring(0,1)=="?")
{string2=string2.substring(1,string2.length);}
var aQsSearch=string2.split("&");for(countPara=0;countPara<aQsSearch.length;countPara++)
{var aQsPart=aQsSearch[countPara].split("=");string1=Helper.setQsValueByParam(aQsPart[0],aQsPart[1],string1,false)}}
return string1;}
function HelperSetQsValueByParam(p_strParam,p_strValue,p_strQs,p_bHexEnc)
{if(p_strParam=="")
{return false;}
var qsSearch="";if(arguments.length>=3)
{qsSearch=p_strQs;}
else if(this.oWin.location&&typeof(this.oWin.location.search)!="unknown")
{qsSearch=this.oWin.location.search;}
if(qsSearch.lastIndexOf("#")>-1)
{qsSearch=qsSearch.substring(0,qsSearch.lastIndexOf("#"));}
var strValue=new String(p_strValue);p_bHexEnc=(arguments.length<4)?true:p_bHexEnc;if(QSVAR.isEncoded(p_strParam)&&p_bHexEnc)
strValue=this.hexEncodeString(strValue);var countPara=0;var qsNew=[];var newParam=1;if(qsSearch!="")
{if(qsSearch.indexOf("?")>-1&&qsSearch.substring(0,1)=="?")
{qsSearch=qsSearch.substring(1,qsSearch.length);}
var aQsSearch=qsSearch.split("&");for(countPara=0;countPara<aQsSearch.length;countPara++)
{if(qsNew.length>0)
{qsNew.push("&");}
var aQsPart=aQsSearch[countPara].split("=");if(aQsPart[0]==p_strParam)
{qsNew.push(p_strParam+"="+strValue);newParam=0;}
else
{qsNew.push(aQsSearch[countPara]);}}
if(newParam==1)
{qsNew.push("&"+p_strParam+"="+strValue);}
return qsNew.join("");}
return(p_strParam+"="+strValue);}
function HelperGetUrlValueByParam(p_strParam,p_strUrl)
{var l_strQs="";var l_strQs2="";var l_strAnchor="";if(p_strUrl.indexOf("?")>-1)
{l_strQs=p_strUrl.substring(p_strUrl.indexOf("?"));}
else
{l_strQs=p_strUrl;}
if(l_strQs.lastIndexOf("#")>-1)
{l_strQs2=l_strQs.substring(0,l_strQs.lastIndexOf("#"));}
else
{l_strQs2=l_strQs;}
return this.getQsValueByParam(p_strParam,l_strQs2);}
function HelperGetQsValueByParam(p_strParam,p_strQs)
{var qsSearch="";var strValue;if(p_strParam=="")
{return false;}
if(arguments.length==2&&typeof(p_strQs)=="string")
{qsSearch=p_strQs;}
else
{if(oHtmlRoot&&oHtmlRoot.oUp&&oHtmlRoot.oUp.oRegistry)
{this.oHtmlStageWin=ContainerAgent.getStageFrame();this.oHtmlStage=ContainerAgent.getStageContainer();this.oHtmlAppMain=ContainerAgent.getAppMainContainer();}
if(this.oHtmlAppMain&&typeof(this.oHtmlAppMain.url)=="string"&&this.oWin&&this.oWin.name==this.oHtmlStageWin.name)
{qsSearch=this.oHtmlAppMain.url;}
else if(this.oHtmlStage&&typeof(this.oHtmlStage.url)=="string"&&this.oWin&&this.oWin.name==this.oHtmlStageWin.name)
{qsSearch=this.oHtmlStage.url;}
else if(this.oWin.location&&typeof(this.oWin.location.search)!="unknown")
{qsSearch=this.oWin.location.search;}}
if(qsSearch=="")
return false;var l_iQM=qsSearch.indexOf("?");if(l_iQM>-1)
{qsSearch=qsSearch.substring((l_iQM+1),qsSearch.length);}
var l_iAnchor=qsSearch.indexOf("#");if(l_iAnchor>-1)
{qsSearch=qsSearch.substring(0,l_iAnchor);}
var aQsSearch=qsSearch.split("&");for(var i=0;i<aQsSearch.length;i++)
{var aQsPart=aQsSearch[i].split("=");if(aQsPart[0]==p_strParam)
{if(QSVAR.isEncoded(p_strParam))
strValue=this.hexDecodeString(aQsPart[1]);else
strValue=aQsPart[1];return strValue;}}}
function HelperHexDigitToInt(ch)
{var outCh="";if('0'<=ch&&ch<='9')
{outCh=ch-'0';}
if('A'<=ch&&ch<='F')
{ch="0x"+ch;outCh=10+parseInt(ch)-parseInt('0xA');}
if('a'<=ch&&ch<='f')
{ch="0x"+ch;outCh=10+ch-parseInt('0xa');}
if(outCh)
{return outCh;}
else
{return"no Hex Value";}}
function HelperHexEncodeString(strInput)
{if(!strInput||strInput=="")
return"";if(this.charset=="UTF-8")
return this.hexEncodeUTF8(strInput);else return this.hexEncodeLatin1(strInput);}
function HelperHexEncodeLatin1(strInput)
{var hexOutput=new Array();for(var i=0;i<strInput.length;i++)
{var c=strInput.charCodeAt(i);hexOutput.push(dec2hex(c));}
return hexOutput.join("");}
function HelperHexEncodeUTF8(strInput)
{var hexOutput=new Array();var l=strInput.length;for(var i=0;i<l;i++)
{var c=strInput.charCodeAt(i);if(c<128)
hexOutput.push(dec2hex(c));else if((c>127)&&(c<2048))
{hexOutput.push(dec2hex((c>>6)|192));hexOutput.push(dec2hex((c&63)|128));}
else
{hexOutput.push(dec2hex((c>>12)|224));hexOutput.push(dec2hex(((c>>6)&63)|128));hexOutput.push(dec2hex((c&63)|128));}}
return hexOutput.join("");}
var achHex=new Array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');function dec2hex(dec)
{return achHex[(dec>>4)&0x0F]+achHex[dec&0x0F];}
function HelperHexDecodeString(strInput)
{if(this.charset=="UTF-8")
return this.hexDecodeUTF8(strInput);else
return this.hexDecodeLatin1(strInput);}
function HelperHexDecodeLatin1(strInput)
{var strOutput=new Array();if(typeof strInput!="undefined")
{var binOutput;for(var i=0;i<strInput.length;i+=2)
{binOutput=(this.hexDigitToInt(strInput.substr(i,1))<<4|this.hexDigitToInt(strInput.substr(i+1,1)));strOutput.push(String.fromCharCode(binOutput));}}
return strOutput.join("");}
function HelperHexDecodeUTF8(strInput)
{var strOutput=new Array();if(typeof strInput!="undefined")
{var i=0;var c=c1=c2=0;var l;while(i<strInput.length)
{l=parseInt("0x"+strInput.substr(i,2));if(l<128)
{c=strInput.substr(i,2);strOutput.push(String.fromCharCode("0x"+c));i+=2;}
else if((l>191)&&(l<224))
{c=strInput.substr(i,2);c2=strInput.substr(i+2,2);strOutput.push(String.fromCharCode(((parseInt("0x"+c)&31)<<6)|(parseInt("0x"+c2)&63)));i+=4;}
else
{c=strInput.substr(i,2);c2=strInput.substr(i+2,2);c3=strInput.substr(i+4,2);strOutput.push(String.fromCharCode(((parseInt("0x"+c)&15)<<12)|((parseInt("0x"+c2)&63)<<6)|(parseInt("0x"+c3)&63)));i+=6;}}}
return strOutput.join("");}
function HelperMakeRegExpPattern(strIn)
{var pattern=new Array();var c="";if(typeof strIn=="undefined"||strIn=="")return"";for(var i=0;i<strIn.length;i++)
{c=strIn.substr(i,1);if(c=="-"||c=="^"||c=="\\"||c=="$"||c=="*"||c=="."||c=="+"||c=="["||c=="]"||c=="|")c="\\"+c;pattern.push(c);}
return"^["+pattern.join("")+"]*$";}
function funcHelperColorPickerSetColor(div_id,inp_id,color)
{var oDiv=this.oDoc.getElementById(div_id);if(oDiv&&oDiv!=null)
{if(color!="")
{oDiv.style.backgroundColor=color;oDiv.style.backgroundImage="";}
else
{oDiv.style.backgroundColor="";oDiv.style.backgroundRepeat="repeat";oDiv.style.backgroundPosition="center";oDiv.style.backgroundImage="url(images/assets/common/colorpicker_transparent.png)";}}
if(this.oDoc.getElementById(inp_id))this.oDoc.getElementById(inp_id).value=color;}
function funcHelperDisableRequired(p_oHtml)
{if(p_oHtml!=null&&p_oHtml.oUp)
{p_oHtml.oUp.required="0";return true;}
else
{return false;}}
function funcHelperCompareValues(oHtmlField1,oHtmlField2)
{if(oHtmlField1!=null&&oHtmlField2!=null&&oHtmlField1.oUp&&oHtmlField2.oUp&&oHtmlField1.oUp.upType==oHtmlField2.oUp.upType)
{if(oHtmlField1.oUp.upType=='upDateControl'||oHtmlField1.oUp.upType=='upTimeControl'||oHtmlField1.oUp.upType=='upDateTimeControl')
{var oDate1=new Date();var oDate2=new Date();l_strDate1=trim(Browser.getValue(oHtmlField1.oUp));l_strDate2=trim(Browser.getValue(oHtmlField2.oUp));if(l_strDate1!=''&&l_strDate2!='')
{oDate1=oHtmlField1.oUp.setDateObjectFromLocal(l_strDate1);oDate2=oHtmlField2.oUp.setDateObjectFromLocal(l_strDate2);if(Date.parse(oDate1)==Date.parse(oDate2))
return 1;else if(Date.parse(oDate1)>Date.parse(oDate2))
return 2;else
return 0;}}
else if(oHtmlField1.oUp.upType=='upFloatControl'||oHtmlField1.oUp.upType=='upIntegerControl'||oHtmlField1.oUp.upType=='upCurrencyControl')
{var number1=oHtmlField1.oUp.toJSNumber(trim(Browser.getValue(oHtmlField1.oUp)));var number2=oHtmlField2.oUp.toJSNumber(trim(Browser.getValue(oHtmlField2.oUp)));if(!isNaN(number1)&&!isNaN(number2))
{if(number1==number2)
return 1;else if(number1>number2)
return 2;else
return 0;}}}
return-1;}
function funcHelperResetDatapickerFields(l_oDatapicker,l_aFields)
{if(l_oDatapicker.selectedIndex<=0)
{for(var fieldId in l_aFields)
{if(l_aFields[fieldId]!=null&&typeof l_aFields[fieldId]=="object")
l_aFields[fieldId].value="";}}}
function funcHelperSetValueToNA(p_oHtml,p_oText)
{if(p_oHtml!=null&&p_oHtml.oUp&&trim(Browser.getValue(p_oHtml.oUp))=="")
{var out=new String();if(arguments.length>=2)
out=p_oText;else
{if(p_oHtml.oUp.upType=="upFloatControl"||p_oHtml.oUp.upType=="upIntegerControl"||p_oHtml.oUp.upType=="upCurrencyControl")
{out=p_oHtml.oUp.toLocalFormat("0");}}
Browser.setValue(p_oHtml.oUp,out);}}
function funcHelperToggleElementVisibilty(p_strElement)
{if(typeof(p_strElement)=="string"&&this.oDoc.getElementById(p_strElement))
{this.oWin.Helper.setElementVisibilty((this.oDoc.getElementById(p_strElement).style.visibility=="hidden"||this.oDoc.getElementById(p_strElement).style.display=="none"),p_strElement);}}
function funcHelperSetElementVisibilty(p_bVisible,p_strElement,p_bKeepPlaceFree)
{if(arguments.length>=2&&p_strElement!=null&&this.oDoc.getElementById(p_strElement)!=null)
{if(p_bVisible)
{this.oDoc.getElementById(p_strElement).style.visibility="visible";this.oDoc.getElementById(p_strElement).style.display="";}
else
{this.oDoc.getElementById(p_strElement).style.visibility="hidden";if(!p_bKeepPlaceFree||p_bKeepPlaceFree==null)
this.oDoc.getElementById(p_strElement).style.display="none";}}
else
return false;}
function calPickerOpen(p_oUp,optionsDate)
{if(p_oUp&&(p_oUp.upType=="upDateTimeControl"||p_oUp.upType=="upDateControl"||p_oUp.upType=="upTimeControl"))
{if(Browser.ie6&&typeof(oAction)=="object"&&typeof(oAction.oDate)=="object"&&oAction.oDate.bUsed&&oAction.oDate.oHtml.id!=p_oUp.oHtml.id)
{oAction.oDate.oHtml.oUp.closePicker();}
if(p_oUp.bUsed&&p_oUp.oActionControl.oToolTipPopup)
{this.oWin.clearTimeout(this.oWin.iPickerCloseTimeout);}
else
{if(typeof(this.oWin.oLastPick)=="object")
{this.oWin.clearTimeout(this.oWin.iPickerCloseTimeout);this.oWin.oLastPick.bUsed=false;}
oAction=new this.oWin.upActionControl();oAction.oHtml=new Object();oAction.oHtml.id="ID_CalPicker";oAction.oFup=p_oUp.oHtml.form.oUp.oFuncPart;oAction.linkType="8";oAction.oHtml.form=p_oUp.oHtml.form;oAction.oDate=p_oUp;oAction.picker=true;oAction.oDate.oActionControl=oAction;oAction.oDate.bToolTipPopup=true;for(property in optionsDate)
{oAction.oDate[property]=optionsDate[property];}
oAction.oDate.pickDate(null,false);}}
this.oWin.oLastPick=p_oUp;return true;}
function calPickerClose(p_oUp)
{if(p_oUp&&p_oUp.oHtml&&p_oUp.bUsed)this.oWin.iPickerCloseTimeout=this.oWin.setTimeout("var oHtml=document.getElementById('"+p_oUp.oHtml.id+"');if(oHtml && oHtml.oUp && oHtml.oUp.bUsed){oHtml.oUp.closePicker();};",200);return true;}
function colorPickerShow(html,form,fup,color,onchange)
{this.showTTP(html,fup,"oTTP_CalColorChooser",{rq_LoadStaticVm:"internal/system/vm/html/misc/colorchooser.vm",rq_formName:form.name,rq_field:color.name,rq_Fup:fup.id,rq_ShowNoColor:"1",rq_TTP:"oTTP_CalColorChooser",rq_showclosewin:"0","rq_customOnChange":onchange},{bHasHeader:true});}
function HelperMainShowTTP(p_oHtml,p_oFup,p_strTTP,p_oAddParams,p_oTTPProps,p_oTTPContentProps)
{if(arguments.length<4)return false;if(typeof(p_strTTP)!="string"||p_strTTP==null)
{var dt=new Date()
p_strTTP="oTTP_"+dt.getTime();}
else
{if(this.isTTPOpen(p_strTTP))
this.closeTTP(p_strTTP);}
if(typeof(p_oFup)!="object"||p_oFup==null)
{p_oFup=oHtmlRoot.oUp.getFup(this.getFupId(p_oHtml));}
if(typeof(p_oHtml)!="object"||p_oHtml==null)
{var x=100;var y=100;}
else
{var pos=Browser.getPosition2Page(p_oHtml);var x=pos.posX;var y=pos.posY+p_oHtml.offsetHeight;}
var l_strAction=p_strTTP+"_Action";this.oWin[l_strAction]=new this.oWin.upActionControl();this.oWin[l_strAction].oHtml=p_oHtml||new Object();this.oWin[l_strAction].linkType="0";if(p_oFup&&p_oFup!=null&&typeof(p_oFup)=="object")
{this.oWin[l_strAction].oFup=p_oFup;p_oFup.aObjects.push(this.oWin[l_strAction])}
this.oWin[l_strAction].oTarget=new this.oWin.upTarget();var ev=this.oWin.eval("typeof("+p_strTTP+")");if(ev!="object"&&ev!=null)this.oWin.eval("window."+p_strTTP+"={}");if(this.oWin[l_strAction].oToolTipPopup==null)
{this.oWin[p_strTTP]=new this.oWin.upToolTipPopup(this.oWin[l_strAction],p_strTTP);}
this.oWin[l_strAction].oTarget.rq_Template="internal/layout/vm/html/"+oHtmlRoot.oUp.oFormatInfo.layoutDir+"/frames/tooltippopup.vm";this.oWin[l_strAction].oTarget.bToolTipPopup=true;for(var param in p_oAddParams)
{if(typeof(p_oAddParams[param])=="string")
{if(param=="rq_RecId")
{this.oWin[l_strAction].oTarget.rq_RecId=p_oAddParams[param];}
else
this.oWin[l_strAction].oTarget.addParam=Helper.setQsValueByParam(param,p_oAddParams[param],this.oWin[l_strAction].oTarget.addParam);}}
if(typeof(this.oWin[p_strTTP])=="object"&&this.oWin[p_strTTP].oTTP_CalColorChooser!=null&&this.oWin[p_strTTP].oActionControl)
{this.oWin[p_strTTP].oActionControl.oToolTipPopup=null;}
this.oWin[p_strTTP].layerX=x;this.oWin[p_strTTP].layerY=y;this.oWin[p_strTTP].bHasHeader=true;if(p_oTTPProps!=null){for(var prop in p_oTTPProps){this.oWin[p_strTTP][prop]=p_oTTPProps[prop];}}
if(p_oTTPContentProps!=null)this.oWin[p_strTTP].addContentProps=p_oTTPContentProps;if(typeof(this.oWin[l_strAction].oTarget.rq_RecId)!="string"||this.oWin[l_strAction].oTarget.rq_RecId=="")
{this.oWin[l_strAction].oTarget.rq_RecId="-1";}
this.oWin[l_strAction].processRequest();return p_strTTP;}
function HelperMainCloseTTP(p_strTTP)
{if(arguments.length<1||p_strTTP==null)return false;if(typeof(this.oWin[p_strTTP])=="object"&&this.oWin[p_strTTP]!=null&&this.oWin[p_strTTP].oActionControl)
{var a=this.oWin[p_strTTP].oActionControl;this.oWin[p_strTTP].closePopup();}}
function HelperMainIsTTPOpen(p_strTTP)
{var l_bRet=false;if(arguments.length>0||p_strTTP==null)
{if(oHtmlRoot.oUp.oRegistry.oToolTipPopupReg[p_strTTP])
{l_bRet=true;}}
return l_bRet;}
function HelperMainResizeByContent(p_oWindow)
{if(arguments.length<1||!p_oWindow||p_oWindow==null)return false;if(!p_oWindow.style&&p_oWindow==this.oWin.top)
{if(p_oWindow.oUp&&p_oWindow.oUp.upType=="upPopUpWindow")
{p_oWindow.oUp.resizeByContent();}}
else if(p_oWindow.style)
{if(Browser.firefox)
{var iFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf('Firefox')).split('/')[1];var ffEH=parseFloat(iFFVersion)>=0.1?3:0;}
else
{var ffEH=0;}
var l_iWidth=l_iHeight=0;if(p_oWindow.contentDocument)
{if(p_oWindow.contentDocument.body.scrollWidth)
l_iWidth=p_oWindow.contentDocument.body.scrollWidth;else if(p_oWindow.contentDocument.body.offsetWidth)
l_iWidth=(p_oWindow.contentDocument.body.offsetWidth);}
else
{if(p_oWindow.Document&&p_oWindow.Document.body.scrollWidth)
l_iWidth=(p_oWindow.Document.body.scrollWidth);}
if(p_oWindow.contentDocument)
{if(p_oWindow.contentDocument.body.scrollHeight)
l_iHeight=p_oWindow.contentDocument.body.scrollHeight;else if(p_oWindow.contentDocument.body.offsetHeight)
l_iHeight=(p_oWindow.contentDocument.body.offsetHeight+ffEH);}
else
{if(p_oWindow.Document&&p_oWindow.Document.body.scrollHeight)
l_iHeight=(p_oWindow.Document.body.scrollHeight);}
if(l_iWidth>0&&l_iHeight>0)
{p_oWindow.style.width=l_iWidth+'px';p_oWindow.style.height=l_iHeight+'px';}}}
function HelperMainRemoveChildNodes(p_oHtml,p_oFup)
{var bUnhook=(arguments.length==2&&typeof(p_oFup)=="object");while(p_oHtml.firstChild!=null&&p_oHtml.childNodes.length>0){if(p_oHtml.firstChild.childNodes.length>0)this.removeChildNodes(p_oHtml.firstChild,p_oFup);if(bUnhook&&p_oHtml.firstChild.oUp&&p_oHtml.firstChild.oUp!=null)
{p_oFup.unhookObject(p_oHtml.firstChild);}
p_oHtml.removeChild(p_oHtml.firstChild);}}
function HelperMainGetDateObject(oHtml)
{if(!oHtml||!oHtml.oUp||oHtml.value==""){return null;}
return oHtml.oUp.setDateObjectFromLocal(oHtml.value);}
function HelperMainGetNumberObject(oHtml)
{if(!oHtml||!oHtml.oUp||oHtml.value==""){return null;}
return oHtml.oUp.toJSNumber(oHtml.value);}
function HelperMainGetIntegerStringByLocal(strValue)
{var oInt=new this.oWin.upIntegerControl();return new String(oInt.toJSNumber(strValue));}
function HelperMainGetFloatStringByLocal(strValue)
{var oFloat=new this.oWin.upFloatControl();return new String(oFloat.toJSNumber(strValue));}
function HelperMainGetCurrencyStringByLocal(strValue)
{var oCurr=new this.oWin.upCurrencyControl();return new String(oCurr.toJSNumber(strValue));}
function HelperMainGetIntegerByLocalString(strValue)
{var oInt=new this.oWin.upIntegerControl();return oInt.toJSNumber(strValue);}
function HelperMainGetFloatByLocalString(strValue)
{var oFloat=new this.oWin.upFloatControl();return oFloat.toJSNumber(strValue);}
function HelperMainGetCurrencyByLocalString(strValue)
{var oCurr=new this.oWin.upCurrencyControl();return oCurr.toJSNumber(strValue);}
function HelperMainToLocalString(oHtml,Value)
{if(arguments.length<2||!oHtml||!oHtml.oUp){return null;}
return oHtml.oUp.toLocalFormat(Value);}
function HelperMainWriteLocalString(oHtml,value)
{if(arguments.length<2||!oHtml||!oHtml.oUp){return false;}
this.oWin.Browser.setValue(oHtml.oUp,oHtml.oUp.toLocalFormat(value));return true;}
function HelperMainCheckRequired(oHtml,strMessage)
{if(!oHtml||!oHtml.oUp){return false;}
if(arguments.length<2)strMessage="";if(!oHtml||!oHtml.oUp){return false;}
return oHtml.oUp.validateRequired(strMessage);}
function HelperMainGetLocalDurationString(oHtmlDateFrom,oHtmlDateTo)
{if(!oHtmlDateFrom||!oHtmlDateFrom.oUp||!oHtmlDateTo||!oHtmlDateTo.oUp){return false;}
var iDiff=Date.parse(Helper.getDateObject(oHtmlDateTo))-Date.parse(Helper.getDateObject(oHtmlDateFrom));var oDateDiff=new Date();oDateDiff.setTime(Math.abs(iDiff));return oHtmlDateFrom.oUp.toLocalDurationString(oDateDiff);}
function HelperMainCalculate(oHtml1,oHtml2,strOp,oHtmlResult)
{try
{if(!oHtml1||!oHtml1.oUp||!oHtml2||!oHtml2.oUp||!strOp||!oHtmlResult||!oHtmlResult.oUp){return false;}
return oHtmlResult.oUp.calcValue("F"+oHtml1.name+"|"+strOp+"|"+"F"+oHtml2.name);}
catch(e)
{if(e instanceof upException)
{var toAlert=e.message;if(e.oControl&&e.oControl.userName&&e.oControl.userName!="")
{toAlert=toAlert+"\n\("+e.oControl.userName+"\)";}
if(e.info&&e.info!="")
{toAlert=toAlert+"\n\("+e.info+"\)";}
alert(toAlert);}
else
{alert(Browser.getExceptionMessage(e));}
return false;}}
function HelperMainSetFullDays(oHtmlCheck,oHtmlFrom,oHtmlTo)
{if(!oHtmlCheck.checked)
{oHtmlFrom.disabled=false;oHtmlTo.disabled=false;return;}
if(oHtmlFrom.value=="")
{oFrom=new Date();}
else
{oFrom=oHtmlFrom.oUp.setDateObjectFromLocal(oHtmlFrom.value);}
oFrom.setHours('00');oFrom.setMinutes('00');oFrom.setSeconds('00');oHtmlFrom.value=oHtmlFrom.oUp.toLocalFormat(oFrom);if(oHtmlTo.value=="")
{oTo=oHtmlTo.oUp.initDateObject();oTo.setDate(parseInt(oFrom.getDate(),10)+1);oTo.setMonth(oFrom.getMonth());oTo.setFullYear(oFrom.getFullYear());}
else
{oTo=Helper.getDateObject(oHtmlTo);if(!(oTo.getHours()=="00"&&oTo.getMinutes()=="00"&&oTo.getSeconds()=="00"))
{oTo.setDate(parseInt(oTo.getDate(),10)+1);}
else if(oFrom.getTime()==oTo.getTime())
{oTo=oTo.add("d",1);}}
oTo.setHours('00');oTo.setMinutes('00');oTo.setSeconds('00');oHtmlTo.value=oHtmlTo.oUp.toLocalFormat(oTo);return;}
function HelperMainInking(control,op,comp,color,colored)
{var id,value;var oFloat=null;var idStart="ID_"+control;var spans=this.oDoc.getElementsByTagName("span");for(var i=0;i<spans.length;i++)
{span=spans[i];if(span.getAttribute("id")&&span.getAttribute("id").length>idStart.length)
{id=span.getAttribute("id");if(idStart==id.substring(0,idStart.length))
{value=span.firstChild.nodeValue;flValue=Helper.getFloatStringByLocal(value);switch(colored)
{case"span":if(span.style)
{if(this.oWin.eval(flValue+op+comp))
span.style.backgroundColor=color;}
break;case"cell":if(span.parentNode.nodeName.toLowerCase()=="td"&&span.parentNode.style)
{if(this.oWin.eval(flValue+op+comp))
span.parentNode.style.backgroundColor=color;}
break;default:if(span.parentNode.parentNode.nodeName.toLowerCase()=="tr"&&span.parentNode.parentNode.style)
{if(this.oWin.eval(flValue+op+comp))
span.parentNode.parentNode.style.backgroundColor=color;}}}}}}
function HelperMainInkingDate(control,op,type,color,colored)
{var id,value;var oDate=null;if(type=="date")
oDate=new this.oWin.upDateControl();else
oDate=new this.oWin.upDateTimeControl();this.oWin.oCompDate=new Date();if(type=="date")
{this.oWin.oCompDate.setHours('00');this.oWin.oCompDate.setMinutes('00');this.oWin.oCompDate.setSeconds('00');}
var idStart="ID_"+control;var spans=this.oDoc.getElementsByTagName("span");for(var i=0;i<spans.length;i++)
{span=spans[i];if(span.getAttribute("id")&&span.getAttribute("id").length>idStart.length)
{id=span.getAttribute("id");if(idStart==id.substring(0,idStart.length))
{value=span.firstChild.nodeValue;this.oWin.oCellDate=oDate.setDateObjectFromLocal(value);switch(colored)
{case"span":if(span.style)
{if(this.oWin.eval("oCellDate"+op+"oCompDate"))
span.style.backgroundColor=color;}
break;case"cell":if(span.parentNode.nodeName.toLowerCase()=="td"&&span.parentNode.style)
{if(this.oWin.eval("oCellDate"+op+"oCompDate"))
span.parentNode.style.backgroundColor=color;}
break;default:if(span.parentNode.parentNode.nodeName.toLowerCase()=="tr"&&span.parentNode.parentNode.style)
{if(this.oWin.eval("oCellDate"+op+"oCompDate"))
span.parentNode.parentNode.style.backgroundColor=color;}}}}}}
function HelperMainInkingString(control,op,comp,color,colored)
{var id,value;var idStart="ID_"+control;var spans=this.oDoc.getElementsByTagName("span");for(var i=0;i<spans.length;i++)
{span=spans[i];if(span.getAttribute("id")&&span.getAttribute("id").length>idStart.length)
{id=span.getAttribute("id");if(idStart==id.substring(0,idStart.length))
{value=Helper.trim(span.firstChild.nodeValue);if(this.oWin.eval("'"+value+"'"+op+"'"+comp+"'"))
{switch(colored)
{case"span":span.style.backgroundColor=color;break;case"cell":var td=this.getCol(span);td.style.backgroundColor=color;break;default:var tr=this.getRow(span);tr.style.backgroundColor=color;}}}}}}
function HelperMainGetRow(no)
{if(no.nodeName.toLowerCase()=="tr")
{return no;}
else
{if(no.parentNode)
{no=this.getRow(no.parentNode);}
else
{return null;}}
return no;}
function HelperMainGetCol(no)
{if(no.nodeName.toLowerCase()=="td")
{return no;}
else
{if(no.parentNode)
{no=this.getCol(no.parentNode);}
else
{return null;}}
return no;}
function HelperMainMakeAppRequest(p_strAppId,p_strTargetId,p_strRecId,p_bNewWindow,p_bClosePopup,p_bChangeParent)
{if(arguments.length<2)return false;if(arguments.length<4)p_bNewWindow=false;if(arguments.length<5)p_bClosePopup,p_bChangeParent=false;if(arguments.length<6)p_bChangeParent=false;var oAction=new this.oWin.upActionControl();oAction.oHtml=new Object();if(this.oWin&&this.oWin.oUp&&this.oWin.oUp.oFuncPart)oAction.oFup=this.oWin.oUp.oFuncPart;oAction.oTarget=new this.oWin.upTarget();if(p_strAppId.length==40)
oAction.oTarget.addParam=Helper.setQsValueByParam("rq_AppGuid",p_strAppId,oAction.oTarget.addParam);else
oAction.oTarget.rq_AppId=p_strAppId;if(p_strTargetId.length==40)
oAction.oTarget.addParam=Helper.setQsValueByParam("rq_TargetGuid",p_strTargetId,oAction.oTarget.addParam);else
oAction.oTarget.rq_TargetId=p_strTargetId;if(p_strRecId!=null)oAction.oTarget.rq_RecId=p_strRecId;if(this.oWin.opener&&this.oWin.opener.oUp)
{if(p_bChangeParent)
{oAction.changeParent="1";}
if(p_bClosePopup)oAction.close="1";}
if(p_bNewWindow&&!p_bChangeParent)
{oAction.oTarget.newWindow="1";oAction.oTarget.rq_TemplateKey="popup";oAction.oTarget.windowSettings=BrowserGetOffsetWidth(this.oWin)+","+BrowserGetOffsetHeight(this.oWin)+",100,100,0"}
else
{oAction.setMenu();oAction.oTarget.rq_TemplateKey="stage";oAction.oTarget.rq_TargetFrame=oHtmlRoot.oUp.Stage;}
oAction.processRequest();}
upStyleHelper.prototype._getElementInfos=upStyleHelper_GetElementInfos;upStyleHelper.prototype._setRulesByStyleSheets=upStyleHelper_SetRulesByStyleSheets;upStyleHelper.prototype._propertyToStyle=upStyleHelper_PropertyToStyle;function upStyleHelperGetComputedStyleProp(p_strId,p_strProp,p_bNoTransparent)
{var ob=this.oDoc.getElementById(p_strId);return this.getComputedStylePropByElement(ob,p_strProp,p_bNoTransparent)}
function upStyleHelperGetComputedStylePropByElement(p_oHtml,p_strProp,p_bNoTransparent)
{var oStyle;var strValue="";var bColorProp=(p_strProp.toLowerCase().indexOf("background-color")>-1);while(p_oHtml)
{if(this.oDoc.defaultView&&this.oDoc.defaultView.getComputedStyle){oStyle=this.oDoc.defaultView.getComputedStyle(p_oHtml,"");strValue=(oStyle!=null)?oStyle.getPropertyValue(p_strProp):"";}
else if(window.getComputedStyle){strValue=this.oWin.getComputedStyle(p_oHtml,null).getPropertyValue(p_strProp);}
else if(p_oHtml.currentStyle){strValue=p_oHtml.currentStyle[this._propertyToStyle(p_strProp)];}
if(!p_bNoTransparent||!bColorProp||(strValue!=""&&strValue!="transparent")||p_oHtml.tagName=="BODY")
break;p_oHtml=p_oHtml.parentNode;}
if(p_bNoTransparent&&bColorProp&&(strValue==""||strValue=="transparent"||strValue=="rgba(0, 0, 0, 0)"))
strValue="#FFFFFF";if(bColorProp)
{var rgb=strValue.match(/rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/);if(rgb)
strValue=this.makeHexRGB(parseInt(rgb[1]),parseInt(rgb[2]),parseInt(rgb[3]));}
return strValue;}
function upStyleHelperMakeHexRGB(r,g,b)
{r=r.toString(16);if(r.length==1)
r='0'+r;g=g.toString(16);if(g.length==1)
g='0'+g;b=b.toString(16);if(b.length==1)
b='0'+b;return"#"+r+g+b;}
function upStyleHelper_PropertyToStyle(property)
{if(property=="float"){property=((typeof(window.cssFloat)=="undefined")?"style":"css")+property.charAt(0).toUpperCase()+property.substring(1);}
else if(property.indexOf("-")>=0){syntax=property.split("-");property=syntax[0];for(var i=1;i<syntax.length;i++){property+=syntax[i].charAt(0).toUpperCase()+syntax[i].substring(1);}}
return property;}
function upStyleHelperRegisterStyleSheet(p_strKey,p_strStyleSheet)
{if(arguments.length<1||typeof(p_strStyleSheet)!="string")return false;var l=this.oDoc.createElement("link");l.setAttribute("href",p_strStyleSheet);l.setAttribute("media","screen");l.setAttribute("rel","stylesheet");l.setAttribute("type","text/css");l.setAttribute("id",p_strKey);this.oDoc.getElementsByTagName("head")[0].appendChild(l);return true;}
function upStyleHelperUnregisterStyleSheet(p_strKey)
{if(arguments.length<1||typeof(p_strKey)!="string"||!this.oDoc.getElementById(p_strKey))return false;this.oDoc.getElementsByTagName("head")[0].removeChild(this.oDoc.getElementById(p_strKey));}
function upStyleHelperChangeClassBySuffix(p_oHtml,p_strSuffix)
{if(arguments.length<1||p_oHtml==null||typeof(p_oHtml)!="object")return;if(arguments.length<2||p_strSuffix==null||typeof(p_strSuffix)!="string")p_strSuffix="normal";if(p_oHtml.className.lastIndexOf("_")>-1)p_oHtml.className=p_oHtml.className.substr(0,p_oHtml.className.lastIndexOf("_")+1)+p_strSuffix;p_oHtml=null;}
function upStyleHelperGetMeasurePropsByElement(p_oHtml,p_aProps,p_bUseCache)
{var l_bClassName=(typeof(p_oHtml.className)=="string"&&p_oHtml.className!="")?true:false;var l_oReturn=(l_bClassName)?this.getMeasurePropsByRule(p_oHtml.className,p_aProps,p_bUseCache):new Object();for(property in p_aProps)
{if(!l_bClassName)l_oReturn[property]=p_aProps[property];l_oReturn[property]=Math.max(this.getMeasureInfos(p_oHtml.style[property]).iMeasureValue,l_oReturn[property]);}
return l_oReturn;}
function upStyleHelperGetMeasurePropsByRule(p_strRule,p_aProps,p_bUseCache)
{if(arguments.length<3)return null;p_bUseCache=false;if(p_bUseCache&&typeof(this.oAnalysedMeasureRules[p_strRule])=="object")return this.oAnalysedMeasureRules[p_strRule];var oHtmlRule=this.findStyleSheetRule(p_strRule);var l_oReturn=new Object();var l_bFoundRule=(oHtmlRule==null||typeof(oHtmlRule)!="object")?false:true;for(property in p_aProps)
{l_oReturn[property]=p_aProps[property];if(l_bFoundRule)
{l_oReturn[property]=this.getMeasureInfos(oHtmlRule.style[property]).iMeasureValue;}}
this.oAnalysedMeasureRules[p_strRule]=l_oReturn;return l_oReturn;}
function upStyleHelperGetMeasureInfos(p_strMeasure)
{var l_oReturn=new Object();l_oReturn.strMeasureUnit="px";l_oReturn.iMeasureValue=0;if(arguments.length==1&&p_strMeasure!=null&&p_strMeasure!="")
{p_strMeasure=p_strMeasure.replace(/ /,"");var pattern1="^([0-9]{1,6})([a-zA-Z]{1,7})$";var reg1=new RegExp(pattern1,"i")
var pattern2="^([0-9]{1,6})$";var reg2=new RegExp(pattern2,"i")
if(reg1.test(p_strMeasure))
{var aTmp=reg1.exec(p_strMeasure);l_oReturn.strMeasureUnit=aTmp[1];l_oReturn.iMeasureValue=parseInt(aTmp[0],10);}
else if(reg2.test(p_strMeasure))
{l_oReturn.iMeasureValue=parseInt(p_strMeasure,10);}}
return l_oReturn;}
function upStyleHelperSetAbsoluteWidth(p_oHtml,p_iWidth)
{if(arguments.length<0||!p_oHtml||p_oHtml==null)return false;if(isNaN(p_iWidth))return false;var l_iBorderLeft=Math.max(this.getMeasureInfos(this.getComputedStylePropByElement(p_oHtml,"border-left-width")).iMeasureValue,0);var l_iBorderRight=Math.max(this.getMeasureInfos(this.getComputedStylePropByElement(p_oHtml,"border-right-width")).iMeasureValue,0);var l_iPaddingLeft=Math.max(this.getMeasureInfos(this.getComputedStylePropByElement(p_oHtml,"padding-left")).iMeasureValue,0);var l_iPaddingRight=Math.max(this.getMeasureInfos(this.getComputedStylePropByElement(p_oHtml,"padding-right")).iMeasureValue,0);if(this.getComputedStylePropByElement(p_oHtml,"border-collapse")&&p_oHtml.tagName=="TD")
{var iTmp;if(Browser.ie)
{if(p_oHtml.previousSibling!=null&&p_oHtml.tagName=="TD")
{iTmp=Math.max(this.getMeasureInfos(this.getComputedStylePropByElement(p_oHtml.previousSibling,"border-right-width")).iMeasureValue,0)
iTmp=Math.max(l_iBorderLeft,iTmp);if(iTmp>0)l_iBorderLeft=Math.ceil(iTmp/2);}
if(p_oHtml.nextSibling!=null&&p_oHtml.tagName=="TD")
{iTmp=Math.max(this.getMeasureInfos(this.getComputedStylePropByElement(p_oHtml.nextSibling,"border-left-width")).iMeasureValue,0)
iTmp=Math.max(l_iBorderRight,iTmp);if(iTmp>0)l_iBorderRight=Math.ceil(iTmp/2);}}
else if(Browser.opera)
{if(p_oHtml.previousSibling!=null&&p_oHtml.tagName=="TD")
{iTmp=Math.max(this.getMeasureInfos(this.getComputedStylePropByElement(p_oHtml.previousSibling,"border-right-width")).iMeasureValue,0)
iTmp=Math.max(l_iBorderLeft,iTmp);if(iTmp>0)l_iBorderLeft=Math.ceil(iTmp/2);}
else
l_iBorderLeft=0;if(l_iBorderRight>0&&p_oHtml.nextSibling!=null&&p_oHtml.tagName=="TD")
{iTmp=Math.max(this.getMeasureInfos(this.getComputedStylePropByElement(p_oHtml.nextSibling,"border-left-width")).iMeasureValue,0)
iTmp=Math.max(l_iBorderRight,iTmp);if(iTmp>0)l_iBorderRight=Math.ceil(iTmp/2);}}
else
{if(p_oHtml.tagName=="TD")
{if(p_oHtml.previousSibling!=null)
{iTmp=Math.max(this.getMeasureInfos(this.getComputedStylePropByElement(p_oHtml.previousSibling,"border-right-width")).iMeasureValue,0)
iTmp=Math.max(l_iBorderLeft,iTmp);if(iTmp>0)l_iBorderLeft=Math.floor(iTmp*0.5);}
else if(l_iBorderLeft>0)
l_iBorderLeft=Math.ceil(l_iBorderLeft*0.5);;if(p_oHtml.nextSibling!=null)
{iTmp=Math.max(this.getMeasureInfos(this.getComputedStylePropByElement(p_oHtml.nextSibling,"border-left-width")).iMeasureValue,0)
iTmp=Math.max(l_iBorderRight,iTmp);if(iTmp>0)l_iBorderRight=Math.ceil(iTmp*0.5);}
else if(l_iBorderRight>0)
l_iBorderRight=Math.floor(l_iBorderRight*0.5);}}}
p_oHtml.style.width=(p_iWidth-l_iBorderLeft-l_iBorderRight-l_iPaddingLeft-l_iPaddingRight)+"px";p_oHtml=null;}
function upStyleHelperSetAbsoluteHeight(p_oHtml,p_iHeight)
{if(arguments.length<0||!p_oHtml||p_oHtml==null)return false;if(isNaN(p_iHeight))return false;var l_iBorderTop=Math.max(this.getMeasureInfos(this.getComputedStylePropByElement(p_oHtml,"border-top-width")).iMeasureValue,0);var l_iBorderBottom=Math.max(this.getMeasureInfos(this.getComputedStylePropByElement(p_oHtml,"border-bottom-width")).iMeasureValue,0);var l_iPaddingTop=Math.max(this.getMeasureInfos(this.getComputedStylePropByElement(p_oHtml,"padding-top")).iMeasureValue,0);var l_iPaddingBottom=Math.max(this.getMeasureInfos(this.getComputedStylePropByElement(p_oHtml,"padding-bottom")).iMeasureValue,0);p_oHtml.style.height=(p_iHeight-l_iBorderTop-l_iBorderBottom-l_iPaddingTop-l_iPaddingBottom)+"px";p_oHtml=null;}
function upStyleHelper_GetElementInfos(p_oHtml)
{if(typeof p_oHtml!="object")return null;var l_oReturn=new Object();l_oReturn.iBorderLeftEffective=0;l_oReturn.iBorderRightEffective=0;l_oReturn.iBorderTopEffective=0;l_oReturn.iBorderBottomEffective=0;l_oReturn.iBorderLeft=0;l_oReturn.iBorderRight=0;l_oReturn.iBorderTop=0;l_oReturn.iBorderBottom=0;l_oReturn.iPaddingLeft=0;l_oReturn.iPaddingRight=0;l_oReturn.iPaddingTop=0;l_oReturn.iPaddingBottom=0;l_oReturn.bBorderCollapseModel=false;var l_aStyleProps={borderLeftWidth:"",borderRightWidth:"",borderTopWidth:"",borderBottomWidth:"",paddingLeft:"",paddingRight:"",paddingTop:"",paddingBottom:"",borderCollapse:""}
var l_iWidth=0;l_oHtmlStyles=this.getStylePropsFromElement(p_oHtml,l_aStyleProps);if(l_oHtmlStyles.borderCollapse!="collapse")
{l_oReturn.iBorderLeft=this.getMeasureInfos(l_oHtmlStyles.borderLeftWidth).iMeasureValue;l_oReturn.iBorderLeftEffective=l_oReturn.iBorderLeft;l_oReturn.iBorderRight=this.getMeasureInfos(l_oHtmlStyles.borderRightWidth).iMeasureValue;l_oReturn.iBorderRightEffective=l_oReturn.iBorderRight;}
else
{l_oReturn.bBorderCollapseModel=true;if(Browser.ie)
{var l_iWidthLeft=0;var l_iPrevWidthRight=0;l_iWidthLeft=this.getMeasureInfos(l_oHtmlStyles.borderLeftWidth).iMeasureValue;l_oReturn.iBorderLeft=l_iWidthLeft;l_oReturn.iBorderLeftEffective=l_iWidthLeft;if(p_oHtml.previousSibling!=null&&p_oHtml.tagName=="TD")
{l_oHtmlStylesPrev=this.getStylePropsFromElement(p_oHtml.previousSibling,{borderLeftWidth:"",borderRightWidth:"",paddingLeft:"",paddingRight:"",paddingTop:"",paddingBottom:""});l_iPrevWidthRight=this.getMeasureInfos(l_oHtmlStylesPrev.borderRightWidth).iMeasureValue;var iEffBL=Math.max(l_iWidthLeft,l_iPrevWidthRight);if(iEffBL>0)l_oReturn.iBorderLeftEffective=Math.ceil(iEffBL/2);}
var l_iWidthRight=0;var l_iNextWidthLeft=0;l_iWidthRight=this.getMeasureInfos(l_oHtmlStyles.borderRightWidth).iMeasureValue;l_oReturn.iBorderRight=l_iWidthRight;l_oReturn.iBorderRightEffective=l_iWidthRight;if(p_oHtml.nextSibling!=null&&p_oHtml.tagName=="TD")
{l_oHtmlStylesNext=this.getStylePropsFromElement(p_oHtml.nextSibling,{borderLeftWidth:"",borderRightWidth:"",paddingLeft:"",paddingRight:""});l_iNextWidthLeft=this.getMeasureInfos(l_oHtmlStylesNext.borderLeftWidth).iMeasureValue;var iEffBR=Math.max(l_iWidthRight,l_iNextWidthLeft);if(iEffBR>0)l_oReturn.iBorderRightEffective=Math.floor(iEffBR/2);}}
else if(Browser.opera)
{var l_iWidthLeft=0;var l_iPrevWidthRight=0;l_iWidthLeft=this.getMeasureInfos(l_oHtmlStyles.borderLeftWidth).iMeasureValue;l_oReturn.iBorderLeft=l_iWidthLeft;l_oReturn.iBorderLeftEffective=l_iWidthLeft;if(p_oHtml.previousSibling!=null&&p_oHtml.tagName=="TD")
{l_oHtmlStylesPrev=this.getStylePropsFromElement(p_oHtml.previousSibling,{borderLeftWidth:"",borderRightWidth:"",paddingLeft:"",paddingRight:"",paddingTop:"",paddingBottom:""});l_iPrevWidthRight=this.getMeasureInfos(l_oHtmlStylesPrev.borderRightWidth).iMeasureValue;}
var iEffBL=Math.max(l_iWidthLeft,l_iPrevWidthRight);if(iEffBL>0)l_oReturn.iBorderLeftEffective=Math.floor(iEffBL/2);var l_iWidthRight=0;var l_iNextWidthLeft=0;l_iWidthRight=this.getMeasureInfos(l_oHtmlStyles.borderRightWidth).iMeasureValue;l_oReturn.iBorderRight=l_iWidthRight;l_oReturn.iBorderRightEffective=l_iWidthRight;if(l_iWidthRight>0)
{if(p_oHtml.nextSibling!=null&&p_oHtml.tagName=="TD")
{l_oHtmlStylesNext=this.getStylePropsFromElement(p_oHtml.nextSibling,{borderLeftWidth:"",borderRightWidth:"",paddingLeft:"",paddingRight:""});l_iNextWidthLeft=this.getMeasureInfos(l_oHtmlStylesNext.borderLeftWidth).iMeasureValue;}
var iEffBR=Math.max(l_iWidthRight,l_iNextWidthLeft);if(iEffBR>0)l_oReturn.iBorderRightEffective=Math.ceil(iEffBR/2);}}
else
{var l_iWidthLeft=0;var l_iPrevWidthRight=0;l_iWidthLeft=this.getMeasureInfos(l_oHtmlStyles.borderLeftWidth).iMeasureValue;l_oReturn.iBorderLeft=l_iWidthLeft;l_oReturn.iBorderLeftEffective=l_iWidthLeft;if(p_oHtml.previousSibling!=null&&p_oHtml.tagName=="TD")
{l_oHtmlStylesPrev=this.getStylePropsFromElement(p_oHtml.previousSibling,{borderLeftWidth:"",borderRightWidth:"",paddingLeft:"",paddingRight:"",paddingTop:"",paddingBottom:""});l_iPrevWidthRight=this.getMeasureInfos(l_oHtmlStylesPrev.borderRightWidth).iMeasureValue;}
var iEffBL=Math.max(l_iWidthLeft,l_iPrevWidthRight);if(iEffBL>0)l_oReturn.iBorderLeftEffective=Math.floor(iEffBL/2);var l_iWidthRight=0;var l_iNextWidthLeft=0;l_iWidthRight=this.getMeasureInfos(l_oHtmlStyles.borderRightWidth).iMeasureValue;l_oReturn.iBorderRight=l_iWidthRight;l_oReturn.iBorderRightEffective=l_iWidthRight;if(p_oHtml.nextSibling!=null&&p_oHtml.tagName=="TD")
{l_oHtmlStylesNext=this.getStylePropsFromElement(p_oHtml.nextSibling,{borderLeftWidth:"",borderRightWidth:"",paddingLeft:"",paddingRight:""});l_iNextWidthLeft=this.getMeasureInfos(l_oHtmlStylesNext.borderLeftWidth).iMeasureValue;}
var iEffBR=Math.max(l_iWidthRight,l_iNextWidthLeft);if(iEffBR>0)l_oReturn.iBorderRightEffective=Math.ceil(iEffBR/2);}}
l_oReturn.iPaddingLeft=0;l_oReturn.iPaddingRight=0;l_oReturn.iPaddingTop=0;l_oReturn.iPaddingBottom=0;l_oReturn.iPaddingLeft=this.getMeasureInfos(l_oHtmlStyles.paddingLeft).iMeasureValue;l_oReturn.iPaddingRight=this.getMeasureInfos(l_oHtmlStyles.paddingRight).iMeasureValue;l_oReturn.iPaddingTop=this.getMeasureInfos(l_oHtmlStyles.paddingTop).iMeasureValue;l_oReturn.iPaddingBottom=this.getMeasureInfos(l_oHtmlStyles.paddingBottom).iMeasureValue;p_oHtml=null;return l_oReturn;}
function upStyleHelperFindStyleSheetRuleByElement(oHtml,bElementDefaultClass)
{if(arguments.length<1||typeof bElementDefaultClass!="boolean")bElementDefaultClass=true;var l_return=null;if(oHtml&&typeof oHtml=="object")
{if(oHtml.className!="")
{l_return=this.findStyleSheetRule("."+oHtml.className);if(l_return==null)l_return=this.findStyleSheetRule(oHtml.nodeName+"."+oHtml.className);}
else if(bElementDefaultClass)
{l_return=this.findStyleSheetRule(oHtml.nodeName);}}
p_oHtml=null;return l_return;}
function upStyleHelperFindStyleSheetRule(ruleName)
{if(arguments.length<1||ruleName==null)return null;var rule=null;rule=this.aLoadedStyleSheetRules[ruleName.toUpperCase()];if(rule==null)rule=this.aLoadedStyleSheetRules["."+ruleName.toUpperCase()];return rule;}
function upStyleHelperLoadStyleSheets(p_aCss)
{if(arguments.length<1||p_aCss==null||typeof p_aCss!="object")return false;var l_aStyleSheetsTemp,l_aStyleSheets=new Array();if(this.oDoc.styleSheets)l_aStyleSheetsTemp=this.oDoc.styleSheets;else
{var l_aTmp=(this.oDoc.getElementsByTagName)?this.oDoc.getElementsByTagName('link'):(this.oDoc.all)?this.oDoc.all.tags('LINK'):new Array();for(var x=0;l_aTmp[x];x++)
{var rel=l_aTmp[x].rel?l_aTmp[x].rel:l_aTmp[x].getAttribute?l_aTmp[x].getAttribute('rel'):'';if(typeof rel=="string"&&rel.toLowerCase().indexOf("style")>-1)
{l_aStyleSheetsTemp[l_aStyleSheetsTemp.length]=l_aTmp[x];}}}
var l_iCssLength=p_aCss.length;var l_iSSTmpLength=l_aStyleSheetsTemp.length;for(var i=0;i<l_iCssLength;i++)
{for(var k=0;k<l_iSSTmpLength;k++)
{if(l_aStyleSheetsTemp[k].href!=null&&l_aStyleSheetsTemp[k].href.indexOf(p_aCss[i])>-1)
{l_aStyleSheets.push(l_aStyleSheetsTemp[k]);break;}}}
this._setRulesByStyleSheets(l_aStyleSheets);return true;}
function upStyleHelperLoadAllStyleSheets()
{var rule=null;var l_aStyleSheets=new Array();if(this.oDoc.styleSheets)l_aStyleSheets=this.oDoc.styleSheets;else
{var l_aTmp=(this.oDoc.getElementsByTagName)?this.oDoc.getElementsByTagName('link'):(this.oDoc.styleSheets&&this.oDoc.all)?this.oDoc.all.tags('LINK'):new Array();for(var x=0;l_aTmp[x];x++)
{var rel=l_aTmp[x].rel?l_aTmp[x].rel:l_aTmp[x].getAttribute?l_aTmp[x].getAttribute('rel'):'';if(typeof rel=="string"&&rel.toLowerCase().indexOf("style")>-1)
{l_aStyleSheets[l_aStyleSheets.length]=l_aTmp[x];}}}
this._setRulesByStyleSheets(l_aStyleSheets);this.loadDocStyleSheets();}
function upStyleHelperLoadDocStyleSheets()
{var l_docStyles=(this.oDoc.getElementsByTagName)?this.oDoc.getElementsByTagName('style'):(this.oDoc.all)?this.oDoc.all.tags('STYLE'):new Array();if(l_docStyles&&l_docStyles[0]&&l_docStyles[0].styleSheet)
{this._setRulesByStyleSheets(new Array(l_docStyles[0].styleSheet));}}
function upStyleHelper_SetRulesByStyleSheets(l_aStyleSheets)
{if(l_aStyleSheets&&l_aStyleSheets.length>0)
{for(var k=0;k<l_aStyleSheets.length;k++)
{var rules=new Array();if(l_aStyleSheets[k].rules)
rules=l_aStyleSheets[k].rules;if(l_aStyleSheets[k].cssRules)
rules=l_aStyleSheets[k].cssRules;var l_iRules=rules.length;for(var i=0;i<l_iRules;i++)
{if(rules[i].selectorText.toString().indexOf(",")>-1)
{var l_aSubRules=rules[i].selectorText.toString().replace(/\n/,"").split(",");var l_iSubRulesLength=l_aSubRules.length;for(var l=0;l<l_iSubRulesLength;l++)this.aLoadedStyleSheetRules[l_aSubRules[l].toString().toUpperCase()]=rules[i];}
else
{this.aLoadedStyleSheetRules[rules[i].selectorText.toString().toUpperCase()]=rules[i];}}}}}
function upStyleHelperGetStylePropsFromElement(oHtml,aPropList)
{var l_oReturn=new Object();var oHtmlRule=this.findStyleSheetRuleByElement(oHtml,false);for(property in aPropList)
{l_oReturn[property]=aPropList[property];if(property=="borderCollapse"&&oHtml.tagName=="TD")
{var l_oHtmlTable=null;var l_oCurr=oHtml;while(typeof l_oCurr=="object")
{if(typeof l_oCurr.parentNode=="object")
{if(l_oCurr.parentNode==null)
break;else if(l_oCurr.parentNode.tagName=="TABLE")
{var l_oHtmlTable=l_oCurr.parentNode;if(this.getStylePropsFromElement(l_oHtmlTable,{borderCollapse:""}).borderCollapse=="collapse")l_oReturn[property]="collapse";break;}
else
l_oCurr=l_oCurr.parentNode;}
else
break;}}
else
{if(oHtmlRule!=null&&oHtmlRule.style[property]!='undefined'&&oHtmlRule.style[property]!="")
{l_oReturn[property]=oHtmlRule.style[property];}
if(oHtml.style[property]!='undefined'&&oHtml.style[property]!="")
{l_oReturn[property]=oHtml.style[property];}}}
oHtml=null;return l_oReturn;}
function upStyleHelperAddStyleSheets(p_aCss)
{for(var idSS in p_aCss)
{var styleEl=this.oDoc.createElement('link');styleEl.setAttribute('rel','stylesheet');styleEl.setAttribute('type','text/css');styleEl.setAttribute('href',p_aCss[idSS]);this.oDoc.getElementsByTagName('head')[0].appendChild(styleEl);}}
function upEventHelperCancelBubble(e)
{if(e.cancelable)e.preventDefault();if(e.stopPropagation)e.stopPropagation();e.cancelBubble=true;if(e.preventDefault){e.preventDefault()}else{e.returnValue=false;}}
function upListboxHelperAddListbox(p_aLists)
{if(p_aLists)
{k=0;for(var id in p_aLists)
{if(this.oDoc.getElementById(p_aLists[id]))
{var oHtml=this.oDoc.getElementById(p_aLists[id]);if(k==0)this.colbox=oHtml;this.colArray[k]=oHtml;k++;}}}}
function upListboxHelperSelectListbox(oColBox)
{if(this.colbox!=oColBox)
{if(this.colbox!=null&&this.colbox.selectedIndex!=-1)
{index=this.colbox.selectedIndex;this.colbox.selectedIndex=-1;}
this.colbox=oColBox;}}
function upListboxHelperInsert(strTxt,strValue,intPos)
{pos=this.colbox.selectedIndex;len=this.colbox.length;posNew=len;if(strTxt==null)return false;if(strValue==null)return false;if(pos==-1)
{if(intPos==null||intPos>=len||intPos<0)
{posNew=len;pos=len;}
else
{pos=intPos-1;posNew=pos+1;}}
else posNew=pos+1;strTxt=Helper.hexEncodeString(strTxt);strValue=Helper.hexEncodeString(strValue);this.oWin.eval("document.getElementById('"+this.colbox.id+"').options["+len+"] = new Option(Helper.hexDecodeString('"+strTxt+"'),Helper.hexDecodeString('"+strValue+"'), true, true);");for(var i=len;i>pos;i--)
{if(i==0)break;this.colbox.options[i].text=this.colbox.options[i-1].text;this.colbox.options[i].value=this.colbox.options[i-1].value;}
this.colbox.options[posNew].text=Helper.hexDecodeString(strTxt);this.colbox.options[posNew].value=Helper.hexDecodeString(strValue);this.colbox.options[posNew].selected=true;}
function upListboxHelperRemove()
{pos=this.colbox.selectedIndex;len=this.colbox.length;if(len==0)return;if(pos==-1)return;posNew=pos;if(pos==len-1)posNew=pos-1;else posNew=pos;for(var i=pos;i<len-1;i++)
{this.colbox.options[i].text=this.colbox.options[i+1].text;this.colbox.options[i].value=this.colbox.options[i+1].value;}
this.colbox.options[len-1]=null;if(this.colbox.length>0)this.colbox.options[posNew].selected=true;return true;}
function upListboxHelperMoveLeft()
{pos=this.colbox.selectedIndex;len=this.colbox.length;colIndex=0;colIndexNew=0;if(pos==-1)return;for(var i=0;i<this.colArray.length;i++)
{if(this.colArray[i]==this.colbox)
{colIndex=i;break;}}
if(colIndex==0)colIndexNew=this.colArray.length-1;else colIndexNew=colIndex-1;strTxt=this.colbox.options[pos].text;strValue=this.colbox.options[pos].value;this.remove();this.selectListbox(this.colArray[colIndexNew])
this.insert(strTxt,strValue,pos);this._onchange();}
function upListboxHelperMoveRight()
{pos=this.colbox.selectedIndex;len=this.colbox.length;colIndex=0;colIndexNew=0;if(pos==-1)return;for(var i=0;i<this.colArray.length;i++)
{if(this.colArray[i]==this.colbox)
{colIndex=i;break;}}
if(colIndex==this.colArray.length-1)colIndexNew=0;else colIndexNew=colIndex+1;strTxt=this.colbox.options[pos].text;strValue=this.colbox.options[pos].value;this.remove();this.selectListbox(this.colArray[colIndexNew])
this.insert(strTxt,strValue,pos);this._onchange();}
function upListboxHelperMoveUp()
{pos=this.colbox.selectedIndex;len=this.colbox.length;posNew=0;if(pos==-1)return;textTmp=this.colbox.options[pos].text;valueTmp=this.colbox.options[pos].value;if(pos==0)
{posNew=len-1;for(var k=1;k<this.colbox.length;k++)
{this.colbox.options[k-1].text=this.colbox.options[k].text;this.colbox.options[k-1].value=this.colbox.options[k].value;}}
else
{posNew=pos-1;this.colbox.options[pos].text=this.colbox.options[posNew].text;this.colbox.options[pos].value=this.colbox.options[posNew].value;}
this.colbox.options[posNew].text=textTmp;this.colbox.options[posNew].value=valueTmp;this.colbox.options[posNew].selected=true;this._onchange();}
function upListboxHelperMoveDown()
{pos=this.colbox.selectedIndex;len=this.colbox.length;posNew=0;if(pos==-1)return;textTmp=this.colbox.options[pos].text;valueTmp=this.colbox.options[pos].value;if(pos==len-1)
{posNew=0;for(var k=this.colbox.length-2;k>=0;k--)
{this.colbox.options[k+1].text=this.colbox.options[k].text;this.colbox.options[k+1].value=this.colbox.options[k].value;}}
else
{posNew=pos+1;this.colbox.options[pos].text=this.colbox.options[posNew].text;this.colbox.options[pos].value=this.colbox.options[posNew].value;}
this.colbox.options[posNew].text=textTmp;this.colbox.options[posNew].value=valueTmp;this.colbox.options[posNew].selected=true;this._onchange();}
function upListboxHelperMoveRightMultiple()
{pos=this.colbox.selectedIndex;if(pos==-1)return;for(var i=0;i<this.colArray.length;i++)
{if(this.colArray[i]==this.colbox)
{colIndex=i;break;}}
if(colIndex==this.colArray.length-1)colIndexNew=0;else colIndexNew=colIndex+1;var l_aSelected=new Array();for(var i=0;i<this.colbox.options.length;i++)
{if(this.colbox.options[i].selected)
{strTxt=this.colbox.options[i].text;strValue=this.colbox.options[i].value;l_aSelected[l_aSelected.length]=new Array(strValue,strTxt);}}
this.removeMultiple();this.selectListbox(this.colArray[colIndexNew])
this.insertMultiple(l_aSelected);this._onchange();}
function upListboxHelperMoveLeftMultiple()
{var pos=this.colbox.selectedIndex;if(pos==-1)return;for(var i=0;i<this.colArray.length;i++)
{if(this.colArray[i]==this.colbox)
{colIndex=i;break;}}
if(colIndex==0)colIndexNew=this.colArray.length-1;else colIndexNew=colIndex-1;var strTxt,strValue;var l_aSelected=new Array();for(var i=0;i<this.colbox.options.length;i++)
{if(this.colbox.options[i].selected)
{strTxt=this.colbox.options[i].text;strValue=this.colbox.options[i].value;l_aSelected[l_aSelected.length]=new Array(strValue,strTxt);}}
this.removeMultiple();this.selectListbox(this.colArray[colIndexNew])
this.insertMultiple(l_aSelected);this._onchange();}
function upListboxHelperMoveUpMultiple()
{pos=this.colbox.selectedIndex;len=this.colbox.length;posNew=0;if(pos==-1)return;var l_aRemove=new Array();var l_aOption=new Array();var l_aOptions=new Array();if(!this.colbox.options[0].selected)
{l_bLastOptIsSelected=false;for(var i=this.colbox.options.length-1;i>=0;i--)
{if(this.colbox.options[i].selected)
{if(i==this.colbox.options.length-1)
l_bLastOptIsSelected=true;if(i==0)
{l_bLast=true;newPos=this.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]=this.colbox.options[i].value;l_aOption[2]=this.colbox.options[i].text;l_aOption[3]=l_bLast;l_aOptions[l_aOptions.length]=l_aOption;}}
for(var i=0;i<l_aRemove.length;i++)
{this.colbox.options[l_aRemove[i]]=null;}
var newEntry,posNew,value,text,selected,l_oOpt;for(var i=l_aOptions.length-1;i>=0;i--)
{l_oOpt=l_aOptions[i];posNew=l_aOptions[i][0];if(posNew>this.colbox.options.length)
posNew=this.colbox.options.length;else if(!l_aOptions[i][3]&&posNew==this.colbox.options.length)
posNew--;if(posNew<this.colbox.options.length)
{for(var k=this.colbox.options.length-1;k>=posNew;k--)
{value=this.colbox.options[k].value;text=this.colbox.options[k].text;selected=this.colbox.options[k].selected;this.oWin.eval("document.getElementById('"+this.colbox.id+"').options["+(k+1)+"] = new Option('"+text+"','"+value+"', "+selected+", "+selected+");");newEntry=null;}}
this.oWin.eval("document.getElementById('"+this.colbox.id+"').options["+posNew+"] = new Option('"+l_oOpt[2]+"','"+l_oOpt[1]+"', true, true);");}}
this._onchange();}
function upListboxHelperGetSelected()
{var l_aOptions=new Array();pos=this.colbox.selectedIndex;len=this.colbox.length;for(var i=0;i<this.colbox.options.length;i++)
{if(this.colbox.options[i].selected)
{l_aOptions.push(this.colbox.options[i]);}}
return l_aOptions;}
function upListboxHelperMoveDownMultiple()
{pos=this.colbox.selectedIndex;len=this.colbox.length;posNew=0;if(pos==-1)return;var l_aRemove=new Array();var l_aOption=new Array();var l_aOptions=new Array();if(!this.colbox.options[this.colbox.options.length-1].selected)
{for(var i=0;i<this.colbox.options.length;i++)
{if(this.colbox.options[i].selected)
{if(i==(this.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]=this.colbox.options[i].value;l_aOption[2]=this.colbox.options[i].text;l_aOptions[l_aOptions.length]=l_aOption;}}
for(var i=l_aOptions.length-1;i>=0;i--)
{this.colbox.options[l_aRemove[i]]=null;}
var posNew,value,text,newEntry;for(var i=0;i<l_aOptions.length;i++)
{posNew=l_aOptions[i][0];if(posNew>this.colbox.options.length)
posNew=this.colbox.options.length;if(posNew<=this.colbox.options.length)
{for(var k=this.colbox.options.length-1;k>=posNew;k--)
{value=this.colbox.options[k].value;text=this.colbox.options[k].text;selected=this.colbox.options[k].selected;this.oWin.eval("document.getElementById('"+this.colbox.id+"').options["+(k+1)+"] = new Option('"+text+"','"+value+"', "+selected+", "+selected+");");}}
this.oWin.eval("document.getElementById('"+this.colbox.id+"').options["+posNew+"] = new Option('"+l_aOptions[i][2]+"','"+l_aOptions[i][1]+"', true, true);");}}
this._onchange();}
function upListboxHelperRemoveMultiple()
{for(var i=this.colbox.length-1;i>=0;i--)
{if(this.colbox.options[i].selected)
{this.colbox.options[i]=null;}}
return true;}
function upListboxHelperInsertMultiple(p_aSelected)
{for(var k=0;k<p_aSelected.length;k++)
{if(p_aSelected[k].length==2)
{this.insert(p_aSelected[k][1],p_aSelected[k][0]);}}}
function upListboxHelperGetCountOfSelectedItems(p_oSelect)
{if(arguments.length<1||p_oSelect==null)
p_oSelect=this.colbox;if(p_oSelect.selectedIndex==-1)
{return-1;}
else
{var l_lCount=0;for(var k=0;k<p_oSelect.options.length;k++)
{if(p_oSelect.options[k].selected)
l_lCount++;}}
return l_lCount;}
function upListboxHelperDoCharStuffing(p_oSelect,p_bText,p_bSelectedOnly)
{if(arguments.length<1||p_oSelect==null)
{var l_aTemp=new Array();for(var i=0;i<this.colArray.length;i++)
{l_aTemp.push(this.doCharStuffing(this.colArray[i],p_bText));}
return Helper.doCharStuffing(l_aTemp);}
if(arguments.length<2||p_bSelectedOnly==null)
p_bSelectedOnly=false;var aOptions=new Array();for(var k=0;k<p_oSelect.options.length;k++)
{if(p_oSelect.options[k].selected||!p_bSelectedOnly)
{if(typeof p_bText=="undefined"||p_bText==false)
aOptions.push(p_oSelect.options[k].value);else
aOptions.push(p_oSelect.options[k].text);}}
return Helper.doCharStuffing(aOptions);}
function upListboxHelper_Onchange()
{if(this.onchange!=null)
{switch(typeof(this.onchange))
{case"string":this.oWin.eval(this.onchange+"(Helper.listbox['"+this.strKey+"']);");break;case"object":case"function":this.onchange(this);break;}}}
function upDbConflictHelperCheckUpBySysidentAndObject(p_strDBFieldSysident,p_oHtml,p_bOnlyNew)
{if(arguments.length<2||p_strDBFieldSysident==null||!p_oHtml||typeof(p_oHtml)!="object"||typeof(p_oHtml.oUp)!="object"||typeof(p_oHtml.oUp.upType)!="string"||!p_oHtml.form||!p_oHtml.form.oUp||!p_oHtml.form.oUp.oFuncPart)
{var l_oRet=new Object();l_oRet.bError=true;l_oRet.iErrorId=1;l_oRet.strErrorDesc="wrong type of arguments or missing argument";l_oRet.bConflict=false;}
else if(p_oHtml.form.oUp.oFuncPart.recId!="-1"&&p_oHtml.form.oUp.oFuncPart.recId!=""&&p_bOnlyNew)
{var l_oRet=new Object();l_oRet.bError=false;l_oRet.iErrorId=-1;l_oRet.strErrorDesc="";l_oRet.bConflict=false;}
else
{var l_oRet=new Object();l_oRet.bError=true;l_oRet.iErrorId=-1;l_oRet.strErrorDesc="unknown error";l_oRet.bConflict=false;window.retConflictCheckUp=l_oRet;var l_strValue=Browser.getValue(p_oHtml.oUp);if(l_strValue!="")
{switch(p_oHtml.oUp.upType)
{case"upIntegerControl":case"upCurrencyControl":case"upFloatControl":case"upDateTimeControl":case"upDateControl":case"upTimeControl":l_strValue=Browser.getRawValue(p_oHtml.oUp);break;}}
var oXmlHttp=new this.oWin.upXmlHttp();oXmlHttp.strMethod="POST";var url=this.getBaseUrl();url=this.setUrlValueByParam("rq_Template","internal/system/vm/html/misc/getconflictBySysidentAndObject.vm",url);oXmlHttp.addPostData("fr_sysident",p_strDBFieldSysident);oXmlHttp.addPostData("fr_searchvalue",l_strValue.replace(/'/,"''"));oXmlHttp.addPostData("fr_appid",p_oHtml.form.oUp.oFuncPart.appId);oXmlHttp.addPostData("fr_fupid",p_oHtml.form.oUp.oFuncPart.id);oXmlHttp.addPostData("fr_recid",p_oHtml.form.oUp.oFuncPart.recId);oXmlHttp.addPostData("fr_controlname",p_oHtml.name);oXmlHttp.bProcessResponse=true;oXmlHttp.processResponse=function(){if(oRequest.readyState==State.done)
{if(oRequest.status==Status.ok)
{var oXmlResponseDoc=oRequest.responseXML.documentElement;if(oXmlResponseDoc.getElementsByTagName('error').length>0)
{window.retConflictCheckUp.iErrorId=oXmlResponseDoc.getElementsByTagName('error')[0].attributes.getNamedItem("code").value;window.retConflictCheckUp.strErrorDesc=oXmlResponseDoc.getElementsByTagName('error')[0].firstChild.data;}
else if(oXmlResponseDoc.getElementsByTagName('result').length>0)
{var l_iCount=oXmlResponseDoc.getElementsByTagName('result')[0].firstChild.data;if(!isNaN(l_iCount))
{l_iCount=parseInt(l_iCount);if(l_iCount>0)
{window.retConflictCheckUp.bError=false;window.retConflictCheckUp.iErrorId=-1;window.retConflictCheckUp.strErrorDesc="";window.retConflictCheckUp.bConflict=true;}
else
{window.retConflictCheckUp.bError=false;window.retConflictCheckUp.iErrorId=-1;window.retConflictCheckUp.strErrorDesc="";window.retConflictCheckUp.bConflict=false;}}
else
{window.retConflictCheckUp.bError=true;window.retConflictCheckUp.iErrorId=2;window.retConflictCheckUp.strErrorDesc="returned resultcount is not a number";window.retConflictCheckUp.bConflict=false;}}
return;}
else
{window.retConflictCheckUp.iErrorId=oRequest.status;window.retConflictCheckUp.strErrorDesc="Http Error "+oRequest.status;}}};oXmlHttp.bAsync=false;oXmlHttp.strUrl=url;oXmlHttp.send();return window.retConflictCheckUp;}
return l_oRet;}
function HelperMainGetWeekNumber(p_oDate)
{dowOffset=typeof(dowOffset)=='int'?dowOffset:0;var newYear=new Date(p_oDate.getFullYear(),0,1);var day=newYear.getDay()-dowOffset;day=(day>=0?day:day+7);var daynum=Math.floor((p_oDate.getTime()-newYear.getTime()-
(p_oDate.getTimezoneOffset()-newYear.getTimezoneOffset())*60000)/86400000)+1;var weeknum;if(day<5)
{weeknum=Math.floor((daynum+day-1)/7)+1;if(weeknum>52)
{nYear=new Date(p_oDate.getFullYear()+1,0,1);nday=nYear.getDay()-dowOffset;nday=nday>=0?nday:nday+7;weeknum=nday<4?1:53;}}
else
{weeknum=Math.floor((daynum+day-1)/7);if(weeknum==0)
return this.getWeekNumber(new Date(p_oDate.getFullYear()-1,11,31));}
return weeknum;}
function HelperMainDateAdd(p_strInterval,p_iNum,p_oDate)
{if(typeof p_oDate!="object")return new Date();if(!p_strInterval||p_iNum==0)return p_oDate;var dtTmp=new Date(p_oDate);switch(p_strInterval.toLowerCase())
{case"ms":dtTmp.setMilliseconds(dtTmp.getMilliseconds()+p_iNum);break;case"s":dtTmp.setSeconds(dtTmp.getSeconds()+p_iNum);break;case"mi":dtTmp.setMinutes(dtTmp.getMinutes()+p_iNum);break;case"h":dtTmp.setHours(dtTmp.getHours()+p_iNum);break;case"d":dtTmp.setDate(dtTmp.getDate()+p_iNum);break;case"mo":dtTmp.setMonth(dtTmp.getMonth()+p_iNum);break;case"y":dtTmp.setFullYear(dtTmp.getFullYear()+p_iNum);break;}
return dtTmp;}
function HelperMainDateComparedToNow(p_oDate)
{if(p_oDate.oHtml)p_oDate=p_oDate.oHtml;if(p_oDate&&p_oDate.oUp&&(p_oDate.oUp.upType=="upDateTimeControl"||p_oDate.oUp.upType=="upDateControl"||p_oDate.oUp.upType=="upTimeControl"))
{if(p_oDate.oUp.upType=="upDateTimeControl")
var dCurrentDate=p_oDate.oUp.setDateObjectFromLocal(p_oDate.oUp.getCurrDate()+" "+p_oDate.oUp.getCurrTime());else
var dCurrentDate=p_oDate.oUp.setDateObjectFromLocal(p_oDate.oUp.getCurrDate());l_strDate=trim(Browser.getValue(p_oDate.oUp));var dInputDate=p_oDate.oUp.setDateObjectFromLocal(l_strDate);if(Date.parse(dCurrentDate)>Date.parse(dInputDate))
return 0;else if(Date.parse(dCurrentDate)<Date.parse(dInputDate))
return 2;else if(Date.parse(dCurrentDate)==Date.parse(dInputDate))
return 1;else
return-1;}
else
{return-1;}}
HelperMain.prototype.setCurrentDate=funcHelperSetCurrentDate;HelperMain.prototype.setDateTo=funcHelperSetDateTo;HelperMain.prototype.setDateFrom=funcHelperSetDateFrom;HelperMain.prototype.validateFromTo=funcHelperValidateFromTo;HelperMain.prototype.dateComparedToNow=HelperMainDateComparedToNow;HelperMain.prototype.dateAdd=HelperMainDateAdd;HelperMain.prototype.getWeekNumber=HelperMainGetWeekNumber;function funcHelperSetCurrentDate(p_oDate,p_bOverwrite)
{if(typeof p_oDate!='undefined')
{if(p_bOverwrite||(!p_bOverwrite&&p_oDate.value==''))
{p_oDate.oUp.setCurrent();}}
return true;}
function funcHelperSetDateTo(p_oFieldFrom,p_oFieldTo,p_lMilli)
{p_oFieldFrom.oUp.format();if(arguments.length==3&&!isNaN(p_lMilli))
{l_lMilli=p_lMilli;}
else
{if(p_oFieldFrom.oUp.upType=='upDateControl')
l_lMilli=86400000;else
l_lMilli=3600000;}
var dtFrom=p_oFieldFrom.oUp.setDateObjectFromLocal(p_oFieldFrom.value);var dtTo=p_oFieldTo.oUp.setDateObjectFromLocal(p_oFieldTo.value);if(p_oFieldFrom.value!=""&&(p_oFieldTo.value==""||dtFrom>dtTo))
{p_oFieldTo.oUp.calcValue("F"+p_oFieldFrom.name+"|+|"+l_lMilli)}
return true;}
function funcHelperSetDateFrom(p_oFieldFrom,p_oFieldTo,p_lMilli)
{p_oFieldTo.oUp.format();if(arguments.length==3&&!isNaN(p_lMilli))
{l_lMilli=p_lMilli;}
else
{if(p_oFieldFrom.oUp.upType=='upDateControl')
l_lMilli=86400000;else
l_lMilli=1800000;}
var dtFrom=p_oFieldFrom.oUp.setDateObjectFromLocal(p_oFieldFrom.value);var dtTo=p_oFieldTo.oUp.setDateObjectFromLocal(p_oFieldTo.value);if(p_oFieldTo.value!=""&&(p_oFieldFrom.value==""||dtFrom>dtTo))
{p_oFieldFrom.oUp.calcValue("F"+p_oFieldTo.name+"|-|"+l_lMilli)}
return true;}
function funcHelperValidateFromTo(p_oFieldFrom,p_oFieldTo,p_bMsg)
{if(arguments.length<3)
p_bMsg=true;if(p_oFieldFrom!=null&&p_oFieldTo!=null&&p_oFieldFrom.oUp!=null&&p_oFieldTo.oUp!=null)
{if(this.compareValues(p_oFieldFrom,p_oFieldTo)==2)
{if(p_bMsg)alert(self.oUp.oMessage.CAL_ERR_START_GREATER_THAN_END);return false;}
else
{return true;}}
return true;}
