
var DEBUG			=  false;
var FRAME_APPMAIN	= "appMain";
var FRAME_APPMENU	= "appmenu";
var FRAME_APPINFO	= "appinfo";
var FRAME_HIDDEN	= "hiddenFrame";
var FRAME_ROOT		= "wndRoot";
function getHtmlRoot(win)
{
	if(win.opener && win.opener.oUp)
	{
		return getHtmlRoot(win.opener);
	}	
	else if(win.name==FRAME_ROOT || win==top)
	{
		return win;
	}	
	else if(win.parent && win.parent!=win)
	{
		return getHtmlRoot(win.parent);
	}	
	else
	{
		return null;	
	}	
}
var oHtmlRoot = null;
oHtmlRoot = getHtmlRoot(self);
function dbg(p_strMessage)
{
	if(DEBUG) alert(p_strMessage);
}
function msg(p_strMessage)
{
	alert(p_strMessage);
}
function upContainer()
{
	this.upType = "upContainer";
	this.oStyle = null;
	this.oHtml = null;
}
upContainer.prototype.biDirectUpHtml = ContainerBiDirectUpHtml;
function ContainerBiDirectUpHtml(oUpContainer, htmlId)
{
	if(self.oUp && !self.oUp.aObjects)
	{
		self.oUp.aObjects = new Array();
	}
	oUpContainer.oHtml = Browser.getRef(htmlId);
	oUpContainer.oStyle = oUpContainer.oHtml.style;
	oUpContainer.id = htmlId;
	oUpContainer.oHtml.oUp = oUpContainer;
	if(self.oUp && self.oUp.aObjects)
	{
		self.oUp.aObjects[self.oUp.aObjects.length] = oUpContainer;
	}
	return oUpContainer;
}
function upWindow()
{
	this.upType = "upWindow";
	this.id = "";
	this.strOnLoad = "";	
	this.strOnUnLoad = "";		
	this.QueryString = "";
	this.oEvent = null;
	this.oFrameReg = null;
	this.oRegistry = null;
	this.oFormatInfo = null;
	this.aObjects = new Array();
	this.setRefToRootWin = WindowSetRefToRootWin;
	this._setRefToRootWin = Window_setRefToRootWin;
	this.setRefToRootWin();
}
upWindow.prototype.delObjects = WindowDelObjects;
upWindow.prototype.setFocus = WindowSetFocus;
upWindow.prototype.setMenu = WindowSetMenu;
upWindow.prototype.resetAppFrames = WindowResetAppFrames;
upWindow.prototype.requestPage = WindowRequestPage;
upWindow.prototype.openPopUpByTarget = WindowOpenPopUpByTarget;
upWindow.prototype.reload = WindowReload;
upWindow.prototype._reload = Window_Reload;
function WindowReload()
{
	this.oHtml.oUpWinToReload = this;
	if(!this.oHtml.anchor)this.oHtml.anchor = "";
	this.oHtml.setTimeout("if(oUpWinToReload){oUpWinToReload._reload(anchor);};",500);
	return true;
}
function Window_Reload(anchor)
{
	oUpWinToReload = null;
	var oAction = new upActionControl();
	oAction.requestType = 1;
	oAction.oSource = new upSource();
	oAction.oTarget = new upTarget();
	if(this.oHtml.document.forms[0]!=null && typeof this.oHtml.document.forms[0].fr_ActionId != "undefined")
		this.oHtml.document.forms[0].fr_ActionId.value = "";
	if(this.oHtml.document.forms[0]!=null && typeof this.oHtml.document.forms[0].fr_TAN != "undefined")
		this.oHtml.document.forms[0].fr_TAN.value = "";
	oAction.QueryString = this.oHtml.location.search.substring(1,this.oHtml.location.search.length);
	if(this.oFuncPart!=null && typeof this.oFuncPart != "undefined" && typeof this.oFuncPart.recId != "undefined")
		var l_strRecId = this.oFuncPart.recId;
	else
		var l_strRecId = "-1";
	if(!Helper.getQsValueByParam("rq_RecId",oAction.QueryString) && l_strRecId!="-1")
	{
		oAction.QueryString = Helper.setQsValueByParam("rq_RecId", l_strRecId, oAction.QueryString);
	}
	if(anchor && anchor!="")
	{
		oAction.QueryString = Helper.setQsValueByParam("rq_Anchor", anchor, oAction.QueryString);
	}
	oAction.oTarget.rq_TargetFrame = this.name;
	this.byUpClose = true;
	this.byReload = true;
	this.requestPage(oAction, this.oHtml.document.forms[0]);
	if(Browser.mozilla && this.oHtml){this.oHtml.focus();}
}
function WindowDelObjects()
{
	if(!this.aObjects || this.aObjects.length < 1)
		return false;
	var ob = null;
	for(var i=0;i<this.aObjects.length;i++)
	{
		ob = this.aObjects[i];
		if(ob.oHtml==null)
			continue;
		if(typeof(ob)!="unknown" && typeof(ob.oHtml)!="unknown")
		{
			if(typeof(ob.oHtml.oUp)!="unknown")
			{
				ob.oHtml.oUp = null;
			}
			if(ob.oFup)
			{
				ob.oFup = null;
			}	
			ob.oStyle = null;
			ob.oHtml = null;
		}
		ob = null;
		this.aObjects[i] = null;
	}
	this.aObjects = new Array();
}
function WindowResetAppFrames()
{
	if(this.oRegistry && this.oRegistry.oFrameReg && this.oRegistry.oFrameReg[FRAME_APPMENU] && this.oFuncPart && this.oFuncPart.id)
	{	
		if(this.oRegistry.oFrameReg[FRAME_APPMENU].setMenu)
			this.oRegistry.oFrameReg[FRAME_APPMENU].setMenu(this.oFuncPart.id);
	}	
	if(this.oRegistry && this.oRegistry.oFrameReg && this.oRegistry.oFrameReg[FRAME_APPINFO] && this.oFuncPart && this.oFuncPart.id && this.oFuncPart.appId)
	{
		if(this.oRegistry.oFrameReg[FRAME_APPINFO].reset)
			this.oRegistry.oFrameReg[FRAME_APPINFO].reset(this.oFuncPart.id, this.oFuncPart.appId);
	}	
}
function WindowSetMenu(AppId, TargetId, MenuId)
{
	oAction = new upActionControl();
	oAction.oTarget = new upTarget();
	oAction.requestType = 0;
	for(var win in this.oRegistry.oMenuReg)
	{
		doAction = true;
		if (this.oRegistry.oMenuReg[win]!=null && this.oRegistry.oMenuReg[win].oUp!=null)
		{
			oWin = self.oUp.oRegistry.oMenuReg[win];
			if(oWin.location && typeof(oWin.location.search)!="unknown")
			{
				oAction.QueryString = oWin.location.search;
				if(AppId && TargetId && AppId!="-1" && TargetId=="-1" && MenuId && MenuId!="" && MenuId!="-1")
				{
					oAction.QueryString = Helper.setQsValueByParam("rq_TargetMenuId", MenuId, oAction.QueryString);
				}
				else if(TargetId=="-1" && MenuId && MenuId!="" && MenuId!="-1")
				{
					oAction.QueryString = Helper.setQsValueByParam("rq_TargetMenuId", MenuId, oAction.QueryString);		
					oAction.QueryString = Helper.setQsValueByParam("rq_AppId", AppId, oAction.QueryString);
					oAction.QueryString = Helper.setQsValueByParam("rq_TargetId", TargetId, oAction.QueryString);
				}
				else if(AppId && TargetId && AppId!="-1" && TargetId!="-1")
				{
					oAction.QueryString = Helper.deleteParamFromQs("rq_TargetMenuId", oAction.QueryString);
					oAction.QueryString = Helper.deleteParamFromQs("rq_MenuId", oAction.QueryString);
					oAction.QueryString = Helper.setQsValueByParam("rq_AppId", AppId, oAction.QueryString);
					oAction.QueryString = Helper.setQsValueByParam("rq_TargetId", TargetId, oAction.QueryString);
				}	
				else
				{
					if(oWin.name=="appmenu")
						doAction = false;
					oAction.QueryString = Helper.deleteParamFromQs("rq_MenuId", oAction.QueryString);
					oAction.QueryString = Helper.deleteParamFromQs("rq_TargetId", oAction.QueryString);
					oAction.QueryString = Helper.deleteParamFromQs("rq_AppId", oAction.QueryString);
					oAction.QueryString = Helper.deleteParamFromQs("rq_TargetMenuId", oAction.QueryString);
				}
				oAction.QueryString = Helper.setQsValueByParam("rq_LoadSubMenus", "0", oAction.QueryString);
				oAction.QueryString = Helper.deleteParamFromQs("rq_MenuGuid", oAction.QueryString);
			}
			if(doAction)
				oWin.oUp.requestPage(oAction);
		}
	}
}
function WindowSetFocus()
{
	try
	{
		var anchor = Helper.getQsValueByParam("rq_Anchor");
		if(anchor && anchor=="no")
		{
			return;
		}
		if(anchor && anchor!="" && Browser.getRef("ID_" + anchor))
		{
			Browser.gotoAnchor(anchor, this.oHtml.document);	
		}
		else if(this.oPage && this.oPage.oHtml && this.oPage.oHtml.forms && this.oPage.oHtml.forms.length > 0)
		{
			var fm = this.oPage.oHtml.forms[0];
			var oHtmlType = "";
			for(var i=0;i< fm.length;i++)
			{
				oHtml = fm.elements[i];
				strHtmlType = oHtml.type;
				if(strHtmlType != "hidden" && strHtmlType != "button"  && strHtmlType != "submit" && strHtmlType != "select-one")
				{
					oHtml.focus();
					return true;
				}
			}
			Browser.gotoAnchor("upTopAnchor", this.oHtml.document);
		}
		return true;
	}
	catch(e)
	{
		return;
	}
}
function WindowSetRefToRootWin()
{
	if(oHtmlRoot && oHtmlRoot.oUp)
	{
		this._setRefToRootWin(oHtmlRoot.oUp);
	}
}
function Window_setRefToRootWin(oRootWin)
{
	if(oRootWin)
	{
		this.oRootWin = oRootWin;
		this.aInfoPipe = oRootWin.aInfoPipe;
		if(oRootWin.oRegistry)
		{
			this.oRegistry = oRootWin.oRegistry;
			if(oRootWin.oRegistry.oFrameReg)
			{
				this.oFrameReg = oRootWin.oRegistry.oFrameReg;
			}
		}
		if(oRootWin.oFormatInfo)
		{
			this.oFormatInfo = oRootWin.oFormatInfo;
		}
	}
}
function WindowRequestPage(oActionControl, oFm)
{
	var fm = null;
	var submitOK = true;
	var connector = "";
	connector = this.oRootWin.connector;
	URL = connector + "?" + oActionControl.QueryString;
	if (oActionControl.requestType == 1)
	{
		if(oFm)
		{
				fm = oFm;
		}
		else
		{
			if (oActionControl.oHtml.form)
			{
				fm = oActionControl.oHtml.form;
			}
			else
			{
				fm = oActionControl.oHtml.document.forms[0];
			}
		}
		fm.action = URL;
		fm.method = "post";
		if(oActionControl.oTarget.newWindow == 1)
		{
			this.openPopUpByTarget(oActionControl);
			fm.target = oActionControl.oTarget.rq_TargetFrame;
		}
		else
		{
			if (oActionControl.oTarget.rq_TargetFrame!="" && (self.oUp.oRegistry.oFrameReg[oActionControl.oTarget.rq_TargetFrame] || oActionControl.oTarget.rq_TargetFrame==FRAME_HIDDEN))
			{
				fm.target = oActionControl.oTarget.rq_TargetFrame;
			}
			else
			{
				fm.target = "_self";
			}
		}
		if (oActionControl.oSource && oActionControl.oSource.fr_ActionId=="1"  && oActionControl.oHtml.form.submitAction)
		{
			submitOK = oActionControl.oHtml.form.submitAction();
		}
		if (submitOK)
		{
			//oActionControl.oHtml.className = "SCUP_button_standard_submit";
			fm.submit();
			return true;
		}
		else
		{
			fm.fr_ActionId.value = "";
			return false;
		}
	}
	else
	{
		if (oActionControl.oTarget.newWindow && oActionControl.oTarget.newWindow == 1)
		{
			if(oActionControl.oTarget.externalUrl && oActionControl.oTarget.externalUrl)
			{
				window.open(oActionControl.oTarget.externalUrl,"");
			}
			else
			{
				this.openPopUpByTarget(oActionControl);
				if(URL && URL!="" && self.oUp.oRegistry.oPopUpReg[oActionControl.oTarget.rq_TargetFrame] && self.oUp.oRegistry.oPopUpReg[oActionControl.oTarget.rq_TargetFrame].oHtml)
				{
					targetLocation = self.oUp.oRegistry.oPopUpReg[oActionControl.oTarget.rq_TargetFrame].oHtml.document.location;
					targetLocation.href = URL;
				}
			}
		}
		else
		{
			if ((oActionControl.oTarget.rq_TargetFrame!="" && self.oUp.oRegistry.oFrameReg[oActionControl.oTarget.rq_TargetFrame])  || oActionControl.oTarget.rq_TargetFrame==FRAME_HIDDEN)
			{
				targetLocation = oHtmlRoot.oUp.oRegistry.oFrameReg[oActionControl.oTarget.rq_TargetFrame].location
			}
			else
			{
				targetLocation = self.location;
			}
			if(oActionControl.oTarget.externalUrl && oActionControl.oTarget.externalUrl)
			{
				targetLocation.href = oActionControl.oTarget.externalUrl;
			}
			else
			{
				targetLocation.href = URL;
			}	
		}
		return true;
	}
}
function WindowOpenPopUpByTarget(oActionControl)
{
	var width = "";
	var height = "";
	var offsetX = "";
	var offsetY = "";
	var bControlOfRef = 1;
	var fupOfOpener = "";
	if(this.oFuncPart && this.oFuncPart.id)
	{
		fupOfOpener = this.oFuncPart.id;
	}
	var winOfOpener = this.oHtml.name;	
	if(oActionControl.oTarget.windowSettings!="")
	{
		aSettings = oActionControl.oTarget.windowSettings.split(",");
		width = aSettings[0];
		height = aSettings[1];
		offsetX = aSettings[2];
		offsetY = aSettings[3];
		bControlOfRef = aSettings[4];
		fupOfOpener = aSettings[5];
	}
	if(oActionControl.sameWindow=="1" && this.oRootWin.oRegistry.oPopUpReg[oActionControl.oTarget.rq_TargetFrame] && this.oRootWin.oRegistry.oPopUpReg[oActionControl.oTarget.rq_TargetFrame].oHtml && !this.oRootWin.oRegistry.oPopUpReg[oActionControl.oTarget.rq_TargetFrame].oHtml.closed)
	{
		var newWnd = this.oRootWin.oRegistry.oPopUpReg[oActionControl.oTarget.rq_TargetFrame];
		newWnd.samePopup = true;
	}
	else
	{
		var newWnd = this.oRootWin.createPopUp(oActionControl.oTarget.rq_TargetFrame);	
		newWnd.HtmlName = oActionControl.oTarget.rq_TargetFrame;
		if(width!="" && height!="")
		{
			newWnd.setSize(width, height);
		}
		else
		{
			newWnd.setSize(200, 200);
		}
		if(oActionControl.oTarget.props != "")
		{
			newWnd.setProps(oActionControl.oTarget.props);
		}
		if(offsetX!="" && offsetY!="")
		{
			newWnd.setOffset(offsetX, offsetY);
		}
		else
		{
			newWnd.setOffset(10, 0);
		}
		if(bControlOfRef==1)
		{
			newWnd.setControlOfRef(oActionControl);
		}
	}
	if(fupOfOpener && fupOfOpener!="")
	{
		newWnd.fupOfOpener = fupOfOpener;
	}
	if(winOfOpener && winOfOpener!="")
	{
		newWnd.winOfOpener = winOfOpener;
	}
	newWnd.show();
	if(oActionControl.oTargetChanger)
	{
		newWnd.oTargetChanger = oActionControl.oTargetChanger;
	}
}
function upPopUpWindow()
{
	//upWindow.call(this);
	this.upType = "upPopUpWindow";
	this.mimeType = "text/html";
	this.HtmlName = "";
	this.content = "";
	this.width = 400;
	this.height = 400;
	this.widthOrg = 400;
	this.heightOrg = 400;
	this.offsetX = 0;
	this.offsetY = 0;
	this.elePosX = 0;
	this.elePosY = 0;
	this.posX = 0;
	this.posY = 0;
	this.URL = "";
	this.eventScreenX = "";
	this.eventScreenY = "";
	this.props = "dependent=yes,menubar=no,toolbar=no,scrollbars=yes,resizable=yes";
	this.fupOfOpener = "";
	this.winOfOpener = "";	
	this.oHtml = null;
	this.byUpClose = false;
	this.byReload = false;
	this.nextPopup = false;			
	this.samePopup = false;				
	this.oControlOfRef = null;
	this.oRootWin = oHtmlRoot.oUp;
	this.setRefToRootWin = PopUpSetRefToRootWin;
}
upPopUpWindow.prototype = new upWindow();
upPopUpWindow.prototype.setURL = PopUpSetURL;
upPopUpWindow.prototype.setHtmlName = PopUpSetHtmlName;
upPopUpWindow.prototype.setProps = PopUpSetProps;
upPopUpWindow.prototype.setSize = PopUpSetSize;
upPopUpWindow.prototype.setMimeType = PopUpSetMimeType;
upPopUpWindow.prototype.setContent = PopUpSetContent;
upPopUpWindow.prototype.setOffset = PopUpSetOffset;
upPopUpWindow.prototype.setElementPosition = PopUpSetElementPosition;
upPopUpWindow.prototype.setPosition = PopUpSetPosition;
upPopUpWindow.prototype.setActPosition = PopUpSetActPosition;
upPopUpWindow.prototype.resetPosition = PopUpResetPosition;
upPopUpWindow.prototype.resizeByContent = PopUpResizeByContent;
upPopUpWindow.prototype.setControlOfRef = PopUpSetControlOfRef;
upPopUpWindow.prototype.writeHtml = PopUpWriteHtml;
upPopUpWindow.prototype.close = PopUpClose;
upPopUpWindow.prototype.hide = PopUpHide;
upPopUpWindow.prototype.show = PopUpShow;
upPopUpWindow.prototype.refresh = PopUpRefresh;
upPopUpWindow.prototype.print = PopUpPrint;
upPopUpWindow.prototype.isHtmlObject = PopUpIsHtmlObject;
function PopUpPrint(oActControlCont)
{
	if(!this.oHtml || !oActControlCont || !oActControlCont.style)return;
	oActControlCont.style.display = "none";
	oActControlCont.style.visibility = "hidden";
	this.oHtml.print();
	return;
}
function PopUpClose()
{
	this.byUpClose = true;
	this.nextPopup = false;
	if(this.oRootWin && this.id)
	{
		this.oRootWin.closePopUp(this.id);
	}
	else
	{
		this.oHtml.close();
	}
}
function PopUpSetHtmlName(HtmlName)
{
	this.HtmlName = HtmlName;
}
function PopUpResizeByContent(p_bAnyway)
{
	var doc = this.oHtml.document;
	var x = 0, y = 0, w = 0, h = 0;
	var sWidth = screen.availWidth;
	var sHeight = screen.availHeight;
	h = Browser.getWinHeight(this);
	w = Browser.getWinWidth(this);
	if(h < 186)h=186;
	if(w < 186)w=186;
	this.oHtml.scrollBy(1,0)
	x = doc.body.scrollLeft;
	this.oHtml.scrollBy(0,1)
	y = doc.body.scrollTop;
	if(p_bAnyway!=null && p_bAnyway && (x <= 0 && y <= 0))
	{
		this.width = 186;
		this.height = 186;
		this.oHtml.resizeTo(186, 186);
		this.setPosition();
		this.resizeByContent(false);
		return;		
	}
	if (x > 0 || y > 0 )
	{
		this.oHtml.scrollTo(0,0);
		this.oHtml.resizeTo(w,h);
		this.oHtml.scrollBy(sWidth, 0);
		x  = doc.body.scrollLeft;
		if ((w + x) < sWidth)
		{
			this.oHtml.resizeBy(x, 0);
			this.width = w + x;
		}
		else
		{
			this.oHtml.resizeBy(sWidth - w, 0);
			this.width = w + (sWidth - w);
		}
		this.oHtml.scrollTo(0, 0);
		this.oHtml.scrollBy(0, sHeight);
		y = doc.body.scrollTop;
		if ((h + y) < sHeight)
		{
			this.oHtml.resizeBy(0, y);
			this.height = h + y;
		}
		else
		{
			this.oHtml.resizeBy(0, sHeight - h);
			this.height = h + (sHeight - h);
		}
		this.oHtml.scrollTo(0, 0)
		//this.setActPosition();
		this.resetPosition();
	}
}
function PopUpSetRefToRootWin()
{
	if(opener && opener.oUp)
	{
		if(oHtmlRoot && oHtmlRoot.oUp)
		{
			this._setRefToRootWin(oHtmlRoot.oUp);
		}
		else
		{
			this._setRefToRootWin(opener.oUp);
		}
	}
	else if(oHtmlRoot && oHtmlRoot.oUp)
	{
		this._setRefToRootWin(oHtmlRoot.oUp);
	}
	else if(self.oUp)
	{
		this._setRefToRootWin(self.oUp);
	}
}
function PopUpSetContent(text)
{
	this.content = text;
}
function PopUpSetMimeType(mimeType)
{
	this.mimeType = mimeType;
}
function PopUpIsHtmlObject()
{
	if(!this.oHtml || this.oHtml.closed)
	{
		return false;
	}
	return true;
}
function PopUpWriteHtml()
{
	var charset		= "windows-1252";
	if(self.oUp && self.oUp.oFormatInfo && self.oUp.oFormatInfo.charset && self.oUp.oFormatInfo.charset!="")
	{
		charset		= self.oUp.oFormatInfo.charset;
	}
	if(this.isHtmlObject())
	{
		if(this.URL=="" && this.content!="")
		{
 			if(!Browser.ie50 && this.oHtml.document.charset)this.oHtml.document.charset = charset;
			this.oHtml.document.open(this.mimeType);
 			if(this.oHtml.document.charset)this.oHtml.document.charset = charset;		
			this.oHtml.document.write(this.content);
			this.oHtml.document.close();
 			if(this.oHtml.document.charset)this.oHtml.document.charset = charset;
		}
		else if(this.URL!="")
		{
			this.oHtml.document.location.href = this.URL;
		}
		this.oHtml.oUp = this;
	}
	else
	{
		return false;
	}
	return true;
}
function PopUpHide()
{
	if(this.oPage)
	{
		this.oPage.oHtml.oUp = null;
		this.oPage.oHtml = null;
		this.oPage.oWindow = null;
		this.oPage.oStyle = null;				
		this.oPage = null;
	}
	if(this.oHtml.oUp)
	{
		this.oHtml.oUp = null;
	}
	this.oHtml.close();
	this.oRootWin = null;
	this.aInfoPipe = null;
	this.oRegistry = null;
	this.oFrameReg = null;
	this.oFormatInfo = null;
	this.oMessage = null;
	this.oHtml = null;
}
function PopUpShow()
{
	if(this.samePopup)
	{
		this.oHtml = window.open("",this.HtmlName)
	}
	else
	{
		this.setPosition();
		// öffnet Html - Window; falls this.URL gesetzt ist, laden dieser Url
		this.oHtml = window.open((this.URL=="")?this.URL:"blank.html",this.HtmlName,this.props+",width="+this.width+",height="+this.height+",screenX="+this.posX+",left="+this.posX+",screenY="+this.posY+",top="+this.posY+"");
		this.resetPosition();
	}	
	this.oHtml.focus();
	this.oHtml.oUp = this;
	this.oRootWin.registerFrame(this.HtmlName, this.oHtml);
	if(this.content != "")
	{
		this.writeHtml();
	}
}
function PopUpRefresh()
{
	this.writeHtml();
	this.oHtml.oUp = this;
	this.oHtml.focus();
}
function PopUpSetURL(URL)
{
	this.URL = URL;
}
function PopUpSetProps(props)
{
	this.props = props;
}
function PopUpSetSize(width,height)
{
	this.width = parseInt(width);
	this.height = parseInt(height);
}
function PopUpSetOffset(offsetX,offsetY)
{
	this.offsetX = parseInt(offsetX);
	this.offsetY = parseInt(offsetY);
}
function PopUpSetControlOfRef(oControl)
{
	this.oControlOfRef = oControl;
	this.setElementPosition(this.oControlOfRef.getPosition2Screen(),this.oControlOfRef.getWidth());
}
//				als Properties;
function PopUpSetElementPosition(oPosXY,addX)
{
	if(oPosXY)
	{
		this.elePosX = parseInt(oPosXY.posX);
		if(addX && !isNaN(parseInt(addX)))
		{
			this.elePosX = parseInt(oPosXY.posX) + parseInt(addX);
		}
		this.elePosY = parseInt(oPosXY.posY);
	}
}
// DESCRIPTION:	berechnet Positionskoordinaten des PopUp Fensters aus oControlOfRef-Position(zu dem positioniert werden soll) und Offset;
function PopUpSetPosition()
{
	this.posX = parseInt(this.elePosX + this.offsetX);
	this.posY = parseInt(this.elePosY + this.offsetY);
}
// DESCRIPTION:	berechnet Positionskoordinaten des PopUp Fensters aus aktuell bestehender Position;
function PopUpSetActPosition()
{
	if(this.oHtml && this.oHtml.screenTop && !isNaN(this.oHtml.screenTop) && this.oHtml.document.body.offsetHeight && this.oHtml.document.body.offsetHeight!="")
	{
		this.posX = this.oHtml.screenLeft; // - (this.width - this.oHtml.document.body.offsetWidth;
		this.posY = this.oHtml.screenTop - (this.height - this.oHtml.document.body.offsetHeight);
	}	
	else if(this.oHtml && this.oHtml.screenY && !isNaN(this.oHtml.screenY))
	{
		this.posX = this.oHtml.screenX;
		this.posY = this.oHtml.screenY;
	}	
}
// DESCRIPTION:	berechnet Position des PopUp Fensters neu, falls es nicht auf den Bildschirm passt;
function PopUpResetPosition()
{
	this.oHtml.resizeTo(this.width,this.height);
	if (screen && screen.availHeight && !isNaN(this.posY))
	{
		var height = Browser.getWinHeight(this);
		if ((this.posY + height) > screen.availHeight)
		{
			this.posY = screen.availHeight - height;
		}
	}
	if (screen && screen.availWidth && !isNaN(this.posX))
	{
		var width = Browser.getWinWidth(this);
		if ((this.posX + width) > screen.availWidth)
		{
			this.posX = screen.availWidth - width;
		}
	}
	if(!isNaN(this.posX) && !isNaN(this.posY))
	{
		this.oHtml.moveTo(this.posX,this.posY);
	}	
}
function upRootWindow()
{
	//upWindow.call(this);
	this.upType = "upRootWindow";
	this.aInfoPipe = new Array();
	this.oRegistry = new upRegistry();
	this.oRegistry.oFrameReg = new upFrameReg();
	this.oRegistry.oMenuReg = new upMenuReg();
	this.oRegistry.oFrameReg["rootHtml"] = self;
	this.oRegistry.oPopUpReg = new upPopUpReg();
	this.oRegistry.oFuncPartReg = new upFuncPartReg();
	this.closeAll = false;
	this.oFormatInfo = new upFormatInfo();
	this.oUserInfo = new upUserInfo();
}
upRootWindow.prototype = new upWindow();
upRootWindow.prototype.createPopUp = RootCreatePopUp;
upRootWindow.prototype.closePopUp = RootClosePopUp;
upRootWindow.prototype.closeAllPopUp = RootCloseAllPopUp;
upRootWindow.prototype.cleanUp = RootCleanUp;
upRootWindow.prototype.registerFup = RootRegisterFup;
upRootWindow.prototype.unregisterFup = RootUnregisterFup;
upRootWindow.prototype.getFup = RootGetFup;
upRootWindow.prototype.unregisterFrame = RootUnregisterFrame;
upRootWindow.prototype.rebuildFrameReg = RootRebuildFrameReg;
upRootWindow.prototype.registerFrame = RootRegisterFrame;
upRootWindow.prototype.unregisterPopup = RootUnregisterPopup;
upRootWindow.prototype.rebuildPopUpReg = RootRebuildPopUpReg;
upRootWindow.prototype.registerPopup = RootRegisterPopup;
upRootWindow.prototype.timeOutSession = TimeOutSession;
function RootUnregisterFrame(p_frame)
{
	if(this.oRegistry.oFrameReg[p_frame])
	{
		this.oRegistry.oFrameReg[p_frame] = null;
	}
	this.rebuildFrameReg();
	return this.oRegistry.oFrameReg;		
}
function RootRebuildFrameReg()
{
	var newFrameReg = new upFrameReg();
	for(var frame in this.oRegistry.oFrameReg)
	{
		if(this.oRegistry.oFrameReg[frame]!=null )
		{
			newFrameReg[frame] = this.oRegistry.oFrameReg[frame];
		}
	}
	this.oRegistry.oFrameReg = newFrameReg;
}
function RootRegisterFrame(p_frame, oFrame)
{
	this.rebuildFrameReg();
	this.oRegistry.oFrameReg[p_frame] = oFrame;
	return this.oRegistry.oFrameReg[p_frame];	
}
function RootUnregisterPopup(popup)
{
	if(this.oRegistry.oPopUpReg[popup])
	{
		this.oRegistry.oPopUpReg[popup] = null;
	}
	this.rebuildPopUpReg();
	return this.oRegistry.oPopUpReg;
}
function RootRebuildPopUpReg()
{
	var newPopUpReg = new upPopUpReg();
	for(var popup in this.oRegistry.oPopUpReg)
	{
		if(this.oRegistry.oPopUpReg[popup]!=null)
		{
			newPopUpReg[popup] = this.oRegistry.oPopUpReg[popup];
		}
	}
	this.oRegistry.oPopUpReg = newPopUpReg;
}
function RootRegisterPopup(popup, oPopup)
{
	this.rebuildPopUpReg();
	this.oRegistry.oPopUpReg[popup] = oPopup;
	return this.oRegistry.oPopUpReg[popup];
}
function TimeOutSession(p_strUrl)
{
	var l_strUrl = Helper.hexEncodeString(Helper.deleteParamFromQs("rq_MenuId", Helper.hexDecodeString(p_strUrl)));
	l_strUrl = "loggedout.html?url=" + l_strUrl;
	if(self.oUp && self.oUp.oFormatInfo)l_strUrl = Helper.setQsValueByParam("rq_Lang",self.oUp.oFormatInfo.lang, l_strUrl);
	document.location.href = l_strUrl;
}
function RootCreatePopUp(p_wndName)
{
	if (!p_wndName || p_wndName == "" )
	{
		var wndName = "newWnd";
	}
	else
	{
		var wndName = p_wndName;
	}
	var wnd = this.registerPopup(wndName, new upPopUpWindow());
	wnd.id = wndName;
	wnd.aObjects = new Array();
	wnd.setRefToRootWin();
	return wnd;
}
function RootGetFup(p_fupId)
{
	var oFup = null;
	if(this.oRegistry.oFuncPartReg[p_fupId]!=null && typeof this.oRegistry.oFuncPartReg[p_fupId].oWindow!="unknown" && this.oRegistry.oFuncPartReg[p_fupId].oWindow!=null && this.oRegistry.oFuncPartReg[p_fupId].oWindow.oHtml!=null && typeof this.oRegistry.oFuncPartReg[p_fupId].oWindow.oHtml.document!="unknown")
	{
		oFup = this.oRegistry.oFuncPartReg[p_fupId];
	}
	else
	{
		var stack = this.oRegistry.oFuncPartRegStack;
		for(var i=stack.length-1;i>=0;i--)
		{
			if(stack[i]!=null && typeof stack[i].oWindow!="unknown" && stack[i].oWindow!=null && stack[i].id!="undefined" && stack[i].id==p_fupId  && stack[i].oWindow!=null && stack[i].oWindow.oHtml!=null)
			{
				oFup = this.oRegistry.oFuncPartRegStack[i];
				this.oRegistry.oFuncPartReg[p_fupId] = oFup;
				this.oRegistry.oFuncPartRegStack[i] = null;
			}
		}
	}
	return oFup;
}
function RootRegisterFup(p_fupId,oNewFup)
{
	if (arguments.length < 2)
			return false;
	var newFuncPartReg = new upFuncPartReg();
	var oFup = null;
	for(var fupId in this.oRegistry.oFuncPartReg)
	{
		if(this.oRegistry.oFuncPartReg[fupId]!=null && this.oRegistry.oFuncPartReg[fupId].oWindow && typeof this.oRegistry.oFuncPartReg[fupId].oWindow!="unknown"  && this.oRegistry.oFuncPartReg[fupId].oWindow.oHtml && typeof this.oRegistry.oFuncPartReg[fupId].oWindow.oHtml.document!="unknown")
		if(this.oRegistry.oFuncPartReg[fupId]!=null)
		{
			var oFup = this.getFup(fupId);
			newFuncPartReg[fupId] = oFup;
			if(fupId == p_fupId)
			{
				if( typeof oFup.oWindow!="unknown" && oFup.oWindow!=null && oFup.oWindow.id && oFup.oWindow.id!=oNewFup.oWindow.id)
				{
					this.oRegistry.oFuncPartRegStack[this.oRegistry.oFuncPartRegStack.length] = oFup;
				}
			}
		}
	}
	newFuncPartReg[p_fupId] = oNewFup;
	this.oRegistry.oFuncPartReg = newFuncPartReg;
}
function RootUnregisterFup(p_fupId)
{
	if (arguments.length < 1)
		return false;
	if(this.oRegistry.oFuncPartReg[p_fupId])
	{
		var newFuncPartReg = new Array();
		for(var fupId in this.oRegistry.oFuncPartReg)
		{
			if(fupId != p_fupId && this.oRegistry.oFuncPartReg[fupId]!=null && typeof this.oRegistry.oFuncPartReg[fupId].oWindow!="unknown")
			{
				newFuncPartReg[fupId] = this.oRegistry.oFuncPartReg[fupId];
			}
		}
		var stack = this.oRegistry.oFuncPartRegStack;
		for(var i=stack.length-1;i>=0;i--)
		{
			if(stack[i]!=null && typeof stack[i].oWindow!="unknown" && stack[i].oWindow!=null && stack[i].id!="undefined" && stack[i].id==p_fupId)
			{
				this.oRegistry.oFuncPartRegStack[i] = null;
			}
		}
		this.oRegistry.oFuncPartReg[p_fupId].oWindow = null;
		this.oRegistry.oFuncPartReg[p_fupId].oPage = null;							
		if(this.oRegistry.oFuncPartReg[p_fupId].oHtml)
			this.oRegistry.oFuncPartReg[p_fupId].oHtml.oUp = null;
		this.oRegistry.oFuncPartReg[p_fupId].oStyle = null;		
		this.oRegistry.oFuncPartReg[p_fupId].oHtml = null;
		this.oRegistry.oFuncPartReg[p_fupId] = null;
		//self.oUp.oFuncPart = null;	
		this.oRegistry.oFuncPartReg = newFuncPartReg;
	}	
}
function RootClosePopUp(wndName)
{
	var wnd = null;
	if(!wndName || wndName=="")
	{
				return false;
	}
	wnd = this.oRegistry.oPopUpReg[wndName];
	if(wnd)
		wnd.byUpClose=true;
	if(wnd && wnd.oHtml && wnd.oHtml!=null && wnd.oHtml.open && !wnd.oHtml.closed)
	{	
		wnd.oHtml.focus();
		// falls unloadHandler existiert, diesen ausführen; um die Synchronisierung zu garantieren,
		if(wnd.oHtml.unloadHandler && !this.closeAll)
		{
			wnd.oHtml.unloadHandler();
		}
		wnd.hide();
	}
	this.unregisterPopup(wndName);
	this.unregisterFrame(wndName);
	return true;
}
function RootCloseAllPopUp()
{
	for(var i in this.oRegistry.oPopUpReg)
	{
		if (i!="upType" && i!=null)
		{
			this.closePopUp(i);
		}
	}
	return true;
}
function RootCleanUp()
{
	this.closeAll = true;
	var retStatus = this.closeAllPopUp();
	if(retStatus)
	{
		if(this.oPage)
		{
			this.oPage.oWindow = null;
			if(this.oPage.oHtml)
			{
				this.oPage.oHtml.oUp = null;
			}	
			this.oPage.oHtml = null;
			this.oPage.oStyle = null;
			this.oPage = null;
		}	
		this.aInfoPipe = null;
		this.oFrameReg = null;
		this.oMenuReg = null;		
		this.oFormatInfo = null;
		this.oMessage = null;
		this.oFormatInfo = null;
		this.oUserInfo = null;
	}
}
function upFormatInfo()
{
	this.upType = "upFormatInfo";
	this.dateSep= "";
	this.dateFormatString = "";
	this.timeFormatString = "";
	this.leadingNulls = "";
	this.decSep = "";
	this.groupSep = "";
	this.firstDayOfWeek = "1";
	this.lang = "de";
}
function upUserInfo()
{
	this.upType = "upUserInfo";
	this.password= "";
	this.userName = "";
}
function upRegistry()
{
	this.upType = "upRegistry";
	this.oFuncPartReg = new Array();
	this.oFuncPartRegStack = new Array();
	this.oFrameReg = new Array();
	this.oPopUpReg = new Array();
}
function upFuncPartReg()
{
}
function upFuncPartRegStack()
{
}
function upFrameReg()
{
}
function upMenuReg()
{
}
function upPopUpReg()
{
}
function upPage()
{
	this.upType = "upPage";
	this.id = "";
	this.oVariables = null;
	this.oFuncParts = null;
}
upPage.prototype = new upContainer();
function upVariables()
{
}
function upFuncParts()
{
}
function upFuncPart()
{
	this.upType = "upFuncPart";
	this.addParam = "";
	this.id = "";
	this.appId="";
	this.parentId="";
	this.recId="";
	this.oWindow = null;
	this.oPage = null;
}
upFuncPart.prototype = new upContainer();
function upCaption()
{
	this.upType = "upCaption";
}
upCaption.prototype = new upContainer();
function upImage()
{
	this.upType = "upImage";
}
upImage.prototype = new upContainer();
function upUri()
{
	this.upType = "upUri";
}
upUri.prototype = new upContainer();
function upDivContainer()
{
	this.upType = "upDivContainer";
}
upDivContainer.prototype = new upContainer();
function upControl()
{
	this.upType = "";
	this.userName = "";
}
upControl.prototype = new upContainer();
upControl.prototype.fillLeading = ControlFillLeading;
upControl.prototype.getPosition2Screen = ControlGetPosition2Screen;
upControl.prototype.getWidth = ControlGetWidth;
upControl.prototype.setFocusStyle = ControlSetFocusStyle;
upControl.prototype._setFocusStyle = Control_SetFocusStyle;
function ControlSetFocusStyle(p_bFocus)
{
	this._setFocusStyle(p_bFocus);
	return true;	
}
function Control_SetFocusStyle(p_bFocus)
{
	if(this.oHtml.className.indexOf("_notvalid") > -1)
		return true;
	if (p_bFocus)
	{
		this.oHtml.className = "SCUP_" + this.styleType + "_selected";
	}
	else
	{
		if(this.readonly && this.readonly=="1")
			this.oHtml.className = "SCUP_" + this.styleType + "_readonly";
		else	
			this.oHtml.className = "SCUP_" + this.styleType + "_normal";
	}
	return true;
}
function ControlFillLeading(p_Input)
{
	var input = new String(p_Input);
	if(input.length > 1)
	{
		return input;
	}
	else
	{
		return '0' + input;
	}
}
function ControlGetPosition2Screen()
{
	oPosXY = Browser.getPosition2Screen(this.oHtml);
	return oPosXY;
}
function ControlGetWidth()
{
	var width = Browser.getWidth(this.oHtml);
	return parseInt(width);
}
function upActionControl()
{
	this.requestType = 1;
	this.linkType = "0";
	this.description = "";
	this.bFlipStatus = false;
	this.bFlipUseCookie = false;
	this.bDrRec = false;
	this.flipControl = "";
	this.close = "0";
	this.focus = false;
	this.sameWindow = "1";
	this.oWinToReload = null;
	this.bDisabled = false;
}
upActionControl.prototype = new upControl();
upActionControl.prototype.processRequest = ActionProcessRequest;
upActionControl.prototype.setQueryString = ActionSetQueryString;
upActionControl.prototype.handleAddParam = ActionHandleAddParam;
upActionControl.prototype.setTemplateAndFrame = ActionSetTemplateAndFrame;
upActionControl.prototype.changeTarget = ActionChangeTarget;
upActionControl.prototype.changeLang = ActionChangeLang;
upActionControl.prototype._changeLang = Action_ChangeLang;
upActionControl.prototype._changeLangMenu = Action_ChangeLangMenu;
upActionControl.prototype.setStatus = ActionSetStatus;
upActionControl.prototype.setMenu = ActionSetMenu;
upActionControl.prototype.flipFlop = ActionFlipFlop;
upActionControl.prototype._flipFlop = Action_FlipFlop;
upActionControl.prototype.showFFStatus = ActionShowFFStatus;
upActionControl.prototype.promptRcptTo = ActionPromptRcptTo;
upActionControl.prototype.promptRcptCC = ActionPromptRcptCC;
upActionControl.prototype.promptRcptBCC = ActionPromptRcptBCC;
upActionControl.prototype._promptRcpt = Action_PromptRcpt;
upActionControl.prototype._checkRcpt = Action_CheckRcpt;
upActionControl.prototype.disable = Action_Disable;
upActionControl.prototype.enable = Action_Enable;
function Action_Disable()
{
	if((Browser.ie5 || Browser.ie6up) && (this.upType=="upTextActionControl" || this.upType=="upButtonControl"))
	{
		this.oHtml.disabled = true;
		this.oHtml.style.filter="Alpha(opacity=20);";
	}
	else
	{
		this.oHtml.style.filter="Alpha(opacity=20);";
		this.oHtml.style.MozOpacity ="0.3";
		if (this.oImage)
		{
			this.oImage.style.filter="Alpha(opacity=20);";
			this.oImage.style.MozOpacity ="0.3";
		}
		this.onclickAction = this.oHtml.onclick;
		this.oHtml.onclick = doNothing;
	}
	this.bDisabled = true;
}
function doNothing()
{
	return false;
}
function Action_Enable()
{
	if((Browser.ie5 || Browser.ie6up) && (this.upType=="upTextActionControl" || this.upType=="upButtonControl") )
	{
		this.oHtml.disabled = false;
		this.oHtml.style.filter="Alpha(opacity=100);";
	}
	else
	{
		this.oHtml.style.filter="Alpha(opacity=100);";
		this.oHtml.style.MozOpacity ="1";
		if (this.oImage)
		{
			this.oImage.style.filter="Alpha(opacity=100);";
			this.oImage.style.MozOpacity ="1";
		}
		if(this.onclickAction)
		{
			this.oHtml.onclick = this.onclickAction;
		}
	}
	this.bDisabled = false;
}
function ActionPromptRcptTo(internetFormat)
{
	if(!internetFormat || internetFormat=="")
		internetFormat = "1";
	return this._promptRcpt(self.oUp.oMessage.MAIL_PROMPT_COMMENT, internetFormat, "");
}
function ActionPromptRcptCC(internetFormat)
{
	if(!internetFormat || internetFormat=="")
		internetFormat = "1";
	return this._promptRcpt(self.oUp.oMessage.MAIL_CC_PROMPT_COMMENT, internetFormat, "");
}
function ActionPromptRcptBCC(internetFormat)
{
	if(!internetFormat || internetFormat=="")
		internetFormat = "1";
	return this._promptRcpt(self.oUp.oMessage.MAIL_BCC_PROMPT_COMMENT, internetFormat, "");
}
function Action_PromptRcpt(strPromptText, internetFormat, p_strRcpt)
{
	if(!this.oHtml || !this.oHtml.form)
		return false;
	var strRcpt = "";
	if(p_strRcpt || p_strRcpt != "")
		strRcpt = p_strRcpt;
	else	
		strRcpt = "";
	if(!internetFormat || internetFormat=="")
		internetFormat = "1";
	strRcpt = prompt(strPromptText, strRcpt);
	return this._checkRcpt(internetFormat, strRcpt);
}
function Action_CheckRcpt(internetFormat, strRcpt)
{
	if (strRcpt == null ||  strRcpt == "")
		return "";
	strRcpt = strRcpt.replace(/^ +/, "");
	strRcpt = strRcpt.replace(/ +$/, "");
	strRcpt = strRcpt.replace(/,+/g,";");
	strRcpt = strRcpt.replace(/ +/g,";");
	strRcpt = strRcpt.replace(/;{2,}/g,";");
	strRcpt = strRcpt.replace(/;$/,"");
	if(internetFormat && internetFormat == "1")
	{
		reg = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,6}|[0-9]{1,3})(\\]?)$","i");
		aRcpt = strRcpt.split(";");
		validRcpt = "";
		for (i=0;i<aRcpt.length;i++)
		{
			if ((aRcpt[i] == "") || (aRcpt[i]== " "))
			{
				continue;
			}
			if(!reg.test(aRcpt[i]))
			{
				this._promptRcpt(self.oUp.oMessage.MAIL_PROMPT_INVALID + aRcpt[i], internetFormat, strRcpt);
			}
			else
			{
				validRcpt = validRcpt + aRcpt[i];
			}
			if (i < aRcpt.length - 1)
				validRcpt = validRcpt + ";"
		}
		strRcpt = validRcpt;
	}	
	return strRcpt;
}
function Action_FlipFlop(bFlipStatus)
{
	if(this.flipControl!='')
	{
		var oHtmlFlipControl = Browser.getRef("ID_" + this.flipControl);
		if(oHtmlFlipControl)
		{
			if(bFlipStatus==true)
			{
				oHtmlFlipControl.style.visibility = "visible";
				oHtmlFlipControl.style.display = "block";
				this.description = self.oUp.oMessage.FLIPFLOP_CLOSE_JS;
			}
			else
			{
				oHtmlFlipControl.style.visibility = "hidden";
				oHtmlFlipControl.style.display = "none";
				this.description = self.oUp.oMessage.FLIPFLOP_OPEN_JS;
			}
			if(this.bFlipUseCookie && Helper.isCookieEnabled())
			{
				if(bFlipStatus)
				{
					Helper.setCookie("co_FlipFlop" + this.flipControl,"1","1");
				}
				else
				{
					Helper.setCookie("co_FlipFlop" + this.flipControl,"0","1");
				}
			}
			this.bFlipStatus = !this.bFlipStatus;
		}
	}
}
function ActionShowFFStatus()
{
	if(this.flipControl!='')
	{
		var oHtmlFlipControl = Browser.getRef("ID_" + this.flipControl);
		if(oHtmlFlipControl)
		{
			if(this.bFlipStatus==true)
			{
				this.description = self.oUp.oMessage.FLIPFLOP_CLOSE_JS;
			}
			else
			{
				this.description = self.oUp.oMessage.FLIPFLOP_OPEN_JS;
			}
			this.setStatus(true);
		}
	}
}
function ActionFlipFlop(bFlipStatus)
{
	return this._flipFlop(bFlipStatus);
}
function ActionSetStatus(bOnOff)
{
	if(bOnOff)
	{
		if(this.description)
		{
			window.status = this.description;
		}
		else
		{
			window.status = '';
		}
	}
	else
	{
		window.status = '';
	}
}
function ActionSetMenu()
{
	var oAction = new upActionControl();
	oAction.requestType = 0;
	oAction.oTarget = new upTarget();
	for(var win in self.oUp.oRegistry.oMenuReg)
	{
		try
		{
			if (self.oUp.oRegistry.oMenuReg[win]!=null)
			{
				oWin = self.oUp.oRegistry.oMenuReg[win];
				if(oWin.location && typeof(oWin.location.search)!="unknown")
				{
					oAction.QueryString = oWin.location.search;
					oAction.QueryString = Helper.setQsValueByParam("rq_AppId", this.oTarget.rq_AppId, oAction.QueryString);
					oAction.QueryString = Helper.setQsValueByParam("rq_TargetId", this.oTarget.rq_TargetId, oAction.QueryString);
					if(this.oTarget.externalUrl)
						oAction.QueryString = Helper.setQsValueByParam("rq_ExternalUrl", this.oTarget.externalUrl, oAction.QueryString);
					oAction.QueryString = Helper.setQsValueByParam("rq_LoadSubMenus", "0", oAction.QueryString);
					oAction.QueryString = Helper.deleteParamFromQs("rq_MenuId", oAction.QueryString);
					oAction.QueryString = Helper.deleteParamFromQs("rq_TargetMenuId", oAction.QueryString);
				}
				oWin.oUp.requestPage(oAction);
			}
		}
		catch(e)
		{
			self.oUp.oRegistry.oMenuReg[win] = null;
			continue;
		}		
	}
}
function ActionChangeLang()
{
	if(self.oUp && self.oUp.oFormatInfo)
	{
		self.oUp.oFormatInfo.lang = this.oTarget.rq_Lang;
	}
	Helper.setCookie("co_Lang",this.oTarget.rq_Lang,true);
	for(var win in self.oUp.oRegistry.oPopUpReg)
	{
		if(self.oUp.oRegistry.oPopUpReg[win] && self.oUp.oRegistry.oPopUpReg[win].oHtml)
		{
			oWin = self.oUp.oRegistry.oPopUpReg[win].oHtml;
			if(!oWin.closed && oWin!=self &&  oWin!=self.oUp.oRootWin.oHtml && oWin.name!=FRAME_HIDDEN )
			{
				this._changeLang(oWin);
			}
		}	
	}
	for(var win in self.oUp.oRegistry.oFrameReg)
	{
		try
		{
			if(!(self.oUp.oRegistry.oPopUpReg[win]) && self.oUp.oRegistry.oMenuReg[win])
			{
				oWin = self.oUp.oRegistry.oFrameReg[win];
				if(oWin && oWin!=self && oWin.oUp && oWin!=self.oUp.oRootWin.oHtml && oWin.name!=FRAME_HIDDEN)
				{
					this._changeLangMenu(oWin);
				}
			}
		}
		catch(e)
		{
			self.oUp.oRegistry.oMenuReg[win] = null;
			//continue;
		}		
	}
	for(var win in self.oUp.oRegistry.oFrameReg)
	{
		if(!(self.oUp.oRegistry.oPopUpReg[win])  && !(self.oUp.oRegistry.oMenuReg[win]))
		{
			oWin = self.oUp.oRegistry.oFrameReg[win];
            if(oWin && oWin!=self && typeof oWin.oUp!="unknown" && oWin.oUp && oWin!=self.oUp.oRootWin.oHtml && oWin.name!=FRAME_HIDDEN  && (!oWin.oUp.id || oWin.oUp.id!="wndStage"))
			{
				this._changeLang(oWin);
			}
		}
	}
	if(self.oUp && self.oUp.upType && self.oUp.upType=="upPopUpWindow")
	{
		this.QueryString = Helper.setQsValueByParam("rq_Lang",this.oTarget.rq_Lang);
		if(self.document.forms.length==0)
		{
			this.requestType = 0;
			self.oUp.requestPage(this);
		}
		else
		{
			this.requestType = 1;
			self.oUp.requestPage(this, self.document.forms[0]);
		}
		self.focus();
	}
	else
	{
		this.requestType = 1;
		this.QueryString = Helper.setQsValueByParam("rq_Lang",this.oTarget.rq_Lang);
		self.oUp.requestPage(this);
	}
	return true;
}
function Action_ChangeLang(oWin)
{
	if(oWin.location && typeof(oWin.location.search)!="unknown")
	{
		qs = oWin.location.search;
		if(qs=="")
			return false;
		this.QueryString = Helper.setQsValueByParam("rq_Lang", this.oTarget.rq_Lang, qs);
		if(Helper.getQsValueByParam("rq_SourceRecId",this.QueryString)=="-1" && oWin.oUp.oFuncPart && oWin.oUp.oFuncPart.recId)
		{
			this.QueryString = Helper.setQsValueByParam("rq_SourceRecId", oWin.oUp.oFuncPart.recId , this.QueryString);
		}
	}
	if(oWin.document.forms.length==0)
	{
		this.requestType = 0;
		oWin.oUp.byUpClose = true;
		oWin.oUp.byReload = true;
		oWin.oUp.requestPage(this);
	}
	else
	{
		this.requestType = 1;
		oWin.oUp.byUpClose = true;
		oWin.oUp.byReload = true;
		oWin.oUp.requestPage(this, oWin.document.forms[0]);
	}
	return;
}
function Action_ChangeLangMenu(oWin)
{
	if(oWin.location && typeof(oWin.location.search)!="unknown")
	{
		qs = oWin.location.search;
		if(qs=="")
			return false;
		this.QueryString = Helper.setQsValueByParam("rq_Lang", this.oTarget.rq_Lang, qs);
		this.QueryString = Helper.setQsValueByParam("rq_LoadSubMenus", "0", this.QueryString);
		if(Browser.getRef("FG_"+oWin.document.IDlastClicked, oWin.document))
		{
			this.QueryString = Helper.setQsValueByParam("rq_MenuGuid", oWin.document.IDlastClicked, this.QueryString);
		}
	}
	this.requestType = 0;
	oWin.oUp.byUpClose = true;
	oWin.oUp.byReload = true;
	oWin.oUp.requestPage(this);
	return;
}
function ActionProcessRequest(e)
{
	var fm = null;
	this.bornToDie = 0;
	this.closeWin = "";
	if(this.oHtml.form)
	{
		fm = this.oHtml.form;
	}
	if(e)
	{
		 self.oUp.oEvent = e;
		 self.oUp.oRootWin.eventScreenX = e.screenX;
		 self.oUp.oRootWin.eventScreenY = e.screenY;
	}
	else
	{
		self.oUp.oEvent = window.event;
	}
	if(self.oUp.oTargetChanger)
	{
		this.changeTarget();
	}
	if (this.linkType=="1" || !fm  || this.oTarget.rq_ControlType=="file" || this.oTarget.rq_ControlType=="image" || (this.oTarget.rq_TargetUrl && this.oTarget.rq_TargetUrl!=""))
	{
		this.requestType = 0;
	}
	if (this.requestType == 1)
	{
		if (this.oSource)
		{
			if (this.oSource.fr_ActionId)
			{
				fm.fr_ActionId.value = this.oSource.fr_ActionId;
			}
		}
	}
	this.setTemplateAndFrame();
	this.setQueryString();
	this.handleAddParam();
	if(this.closeWin && this.closeWin != "")
	{
		this.QueryString = this.QueryString + "&rq_CloseWin=" + Helper.hexEncodeString(this.closeWin);
	}
	if(this.bornToDie && this.bornToDie == "1")
	{
		this.QueryString = this.QueryString + "&rq_BornToDie=31";
	}
	var retStatus = self.oUp.requestPage(this);	
	if(retStatus)
	{
		if(self.oUp.upType=="upPopUpWindow" || (this.reloadParent=="1" && this.reloadWindowname && this.reloadWindowname!=""))
		{
			// eventuell Mutter Fenster neu laden; Einstellung des ActionControls INNERHALB Popup
			if(this.reloadParent=="1" && self.oUp)
			{
				if( (!self.oUp.winOfOpener || self.oUp.winOfOpener=="") && (!this.reloadWindowname || this.reloadWindowname=="") )
				{
					self.oUp.winOfOpener = FRAME_APPMAIN;
				}
				if(this.reloadWindowname && this.reloadWindowname!="" && oHtmlRoot && oHtmlRoot.oUp && oHtmlRoot.oUp.oRegistry && oHtmlRoot.oUp.oRegistry.oFrameReg && oHtmlRoot.oUp.oRegistry.oFrameReg[this.reloadWindowname])
				{
					this.oWinToReload = oHtmlRoot.oUp.oRegistry.oFrameReg[this.reloadWindowname];
				}
				else if(opener && oHtmlRoot && oHtmlRoot.oUp && oHtmlRoot.oUp.oRegistry && oHtmlRoot.oUp.oRegistry.oFrameReg && oHtmlRoot.oUp.oRegistry.oFrameReg[self.oUp.winOfOpener])
				{
					this.oWinToReload = oHtmlRoot.oUp.oRegistry.oFrameReg[self.oUp.winOfOpener];
				}	
			}
			if(this.oWinToReload != null && this.oWinToReload.oUp)
			{
				var rv = reloadUpWindow(this.oWinToReload);
			}
		}
		if(this.focus)
		{
			window.setTimeout("self.focus()",2000);
		}
	}
	return retStatus;
}
function reloadUpWindow(p_oWindow)
{
	var rv=true;
	if(oHtmlRoot && oHtmlRoot.oUp && oHtmlRoot.oUp.oRegistry && oHtmlRoot.oUp.oRegistry.oFrameReg && oHtmlRoot.oUp.oRegistry.oFrameReg[p_oWindow.name])
	{
		if(p_oWindow.frames.length > 1)
		{
			for(i=0;i<p_oWindow.frames.length;i++)
			{
				if(oHtmlRoot.oUp.oRegistry.oFrameReg[p_oWindow.frames[i].name] && p_oWindow.frames[i].name != self.name)
				{
					rv = reloadUpWindow(oHtmlRoot.oUp.oRegistry.oFrameReg[p_oWindow.frames[i].name])
				}
			}
		}
		else
		{
			if(p_oWindow.oUp && p_oWindow.name != self.name)
			{
				if(Helper.getQsValueByParam("rq_SetAnchor"))
					p_oWindow.anchor = Helper.getQsValueByParam("rq_SetAnchor");
				rv = p_oWindow.oUp.reload();
			}
		}
	}
	return rv;
}
function ActionSetTemplateAndFrame()
{
	if(this.oTarget.newWindowOrg)
	{
		this.oTarget.newWindow = this.oTarget.newWindowOrg;				
		this.oTarget.rq_TargetFrame = this.oTarget.frameOrg;
		this.oTarget.rq_Template = this.oTarget.templateOrg;		
	}
	if(self.oUp.oEvent && ((Browser.ie && self.oUp.oEvent.shiftKey) || (Browser.mozilla && self.oUp.oEvent.ctrlKey && self.oUp.oEvent.type=="click")))
	{
		this.oTarget.newWindowOrg = this.oTarget.newWindow;
		this.oTarget.frameOrg = this.oTarget.rq_TargetFrame;
		this.oTarget.templateOrg = this.oTarget.rq_Template;		
		this.oTarget.rq_TargetFrame = "";
		this.oTarget.rq_Template = "";		
		this.oTarget.newWindow="1";
		if(Browser.mozilla)
		{
			self.oUp.oEvent.stopPropagation();		
		}
	}
	if(this.oTarget.rq_TargetUrl && this.oTarget.rq_TargetUrl!="")
	{
		this.oTarget.rq_Template = "";
		if (this.oTarget.rq_TargetFrame == "")
		{
			if(this.sameWindow || this.sameWindow=="1")
			{
				this.oTarget.rq_TargetFrame = "newWnd"  +  this.id.substring(0,this.id.lastIndexOf("_"));
			}
			else
			{
				this.oTarget.rq_TargetFrame = "newWnd"  + this.id;
			}
		}
	}
	else if(this.linkType=="5")
	{
		if(!(this.oSource && this.oSource.fr_ActionId && this.oSource.fr_ActionId==1))
			this.requestType = 0;
		if(!this.oTarget.rq_TargetFrame || this.oTarget.rq_TargetFrame=="") 
			this.oTarget.rq_TargetFrame = FRAME_HIDDEN;
		this.oTarget.rq_Template = "internal/system/vm/html/misc/hiddenFrame.vm";
	}
	else if(this.oTarget.newWindow && this.oTarget.newWindow=="1")
	{
		if(!this.oTarget.rq_Template || this.oTarget.rq_Template == "")
		{
			if(!this.oTarget.rq_ControlType || (this.oTarget.rq_ControlType!="file" && this.oTarget.rq_ControlType!="image"))
			{
				this.oTarget.rq_Template = "internal/layout/vm/html/frames/popup.vm";
			}
		}
		if (this.oTarget.rq_TargetFrame == "")
		{
			if(this.sameWindow=="1" && this.bDrRec)
			{
					this.oTarget.rq_TargetFrame = "newWnd"  +  this.id.substring(0,this.id.lastIndexOf("_"));
			}
			else
			{
				this.oTarget.rq_TargetFrame = "newWnd"  + this.id;
			}
		}
	}
	else if(self.oUp && self.oUp.upType && self.oUp.upType=="upPopUpWindow")
	{
		if (this.changeParent == "1")
		{
			this.oTarget.rq_TargetFrame = FRAME_APPMAIN;
			this.oTarget.rq_Template = "internal/layout/vm/html/frames/appmain.vm";
		}
		if (this.oTarget.rq_TargetFrame == "")
		{
			this.oTarget.rq_TargetFrame = self.name;
		}
		if(this.oTarget.rq_TargetFrame==self.name)
		{
			if(this.close!="1")
			{
				self.oUp.nextPopup = true;
			}
			else
			{
				self.oUp.nextPopup = false;
			}
		}
		if(!this.oTarget.rq_Template || this.oTarget.rq_Template == "")
		{
			if(!this.oTarget.ControlType || (this.oTarget.ControlType!="file" && this.oTarget.ControlType!="image"))
			{
				this.oTarget.rq_Template = "internal/layout/vm/html/frames/popup.vm";
			}
		}
		if(this.oTargetChanger)
		{
			self.oUp.oTargetChanger = this.oTargetChanger;
		}
		if(this.close && this.close == "1")
		{
			if(this.changeParent == "1")
			{
				this.closeWin = self.name;
			}
			else
			{
				this.bornToDie = 1;
			}	
		}
	}
	else if(self.oUp && self.oUp.upType && self.oUp.upType=="IFrame")
	{
		if(this.oTarget.rq_TargetFrame != "" && (!this.oTarget.rq_Template || this.oTarget.rq_Template == ""))
		{
			this.oTarget.rq_Template = "internal/layout/vm/html/frames/appiframe.vm";
		}
		else
		{
			this.oTarget.rq_Template = "internal/layout/vm/html/frames/appmain.vm";		
		}
		if (this.oTarget.rq_TargetFrame == "")
		{
			 if(self.navigateInside && self.navigateInside == "1")
			 {
				 this.oTarget.rq_TargetFrame = self.name;
			 }
			 else
			 {
				this.oTarget.rq_TargetFrame = FRAME_APPMAIN;
			 }
		}
	}
	else
	{
		if (this.oTarget.rq_TargetFrame == "")
		{
			if(self.oUp.oFrameReg[FRAME_APPMAIN])
			{
				this.oTarget.rq_TargetFrame = FRAME_APPMAIN;
			}
			else
			{
				oHtmlRoot.name;
			}
		}
		if (this.oTarget.rq_Template == "")
		{
			this.oTarget.rq_Template = "internal/layout/vm/html/frames/appmain.vm";
		}
	}
}
function ActionChangeTarget()
{
	var oTargetChanger = self.oUp.oTargetChanger;
	if(oTargetChanger.linkType=="5" && this.oSource && this.oSource.fr_ActionId=="1")
	{
		this.oTarget = oTargetChanger;
		var sourceCtrl = oTargetChanger.sourceCtrl;
		var targetCtrl = oTargetChanger.targetCtrl;
		var optValue = Browser.getValueByElementId("ID_"+sourceCtrl);
		// nur falls DataPicker Id vorhanden, wird DataPicker Request aufgebaut; sonst nur Reinschreiben einer Option ins Dropdown
		this.linkType = "5";
		this.oTarget.addParam = Helper.setQsValueByParam("rq_Datapicker_Type", "1", this.oTarget.addParam);
		this.oTarget.addParam = Helper.setQsValueByParam("rq_Datapicker_Search", optValue, this.oTarget.addParam);
		this.oTarget.addParam = Helper.setQsValueByParam("rq_Datapicker_Control", targetCtrl, this.oTarget.addParam);
		this.oTarget.addParam = Helper.setQsValueByParam("rq_NewEntry","1", this.oTarget.addParam);
		this.changeParent = "1";
		this.reloadParent = "0";
	}
	else if(oTargetChanger.linkType=="7" && (!this.oTarget.newWindow || this.oTarget.newWindow=="0"))
	{
		if(this.oTarget.rq_RecId && this.oTarget.rq_RecId!="")
		{
			this.oTarget.rq_TargetFrame = oTargetChanger.rq_TargetFrame;
			this.oTarget.rq_Template = oTargetChanger.rq_Template;
			this.focus = true;
		}
	}
	// Kind Fenster beim "Speichern" schließen und evtl. Mutter Fenster neu laden;
	else if(oTargetChanger.close=="1")
	{
		this.close = "1";
	}
	else if(oTargetChanger.closeByChange=="1" && this.oSource && (this.oSource.fr_ActionId == "1" || this.oSource.fr_ActionId == "2"))
	{
		this.close = "1";
	}
	if(oTargetChanger.reloadWin && oTargetChanger.reloadWin!="" && self.oUp.oFrameReg[oTargetChanger.reloadWin])
	{
		this.oWinToReload = self.oUp.oFrameReg[oTargetChanger.reloadWin];
	}
	else if(this.oSource && (this.oSource.fr_ActionId == "1" || this.oSource.fr_ActionId == "2") && oTargetChanger.reloadByChangeWin && oTargetChanger.reloadByChangeWin!=""  && self.oUp.oFrameReg[oTargetChanger.reloadByChangeWin])
	{
		this.oWinToReload = self.oUp.oFrameReg[oTargetChanger.reloadByChangeWin];
	}
	if(this.changeParent == "1")
	{
		this.closeWin = self.name;
	}
	else if(this.close && this.close == "1")
	{
		this.bornToDie = 1;
	}
}
function ActionSetQueryString()
{
	this.QueryString = "";
	if (this.oTarget.rq_ClientType && this.oTarget.rq_ClientType!="")
	{
		this.QueryString = "rq_ClientType=" + Helper.hexEncodeString(this.oTarget.rq_ClientType);
	}
	else
	{
		this.QueryString = "rq_ClientType=" + Helper.hexEncodeString("html");
	}
	if (this.oSource && this.oSource.rq_SourceId && this.oSource.rq_SourceId!="")
	{
		this.QueryString = this.QueryString + "&rq_SourceId=" + Helper.hexEncodeString(this.oSource.rq_SourceId);
	}
	else if (this.oFup && this.oFup.id && this.oFup.id!="")
	{
		this.QueryString = this.QueryString + "&rq_SourceId=" + Helper.hexEncodeString(this.oFup.id);
	}
	if (this.oFup && this.oFup.appId && this.oFup.appId!="")
	{
		this.QueryString = this.QueryString + "&rq_SourceAppId=" + Helper.hexEncodeString(this.oFup.appId);
	}
	if (this.oSource && this.oSource.rq_SourceRecId && this.oSource.rq_SourceRecId!="")
	{
		this.QueryString = this.QueryString + "&rq_SourceRecId=" + Helper.hexEncodeString(this.oSource.rq_SourceRecId);
	}
	else if (this.oFup && this.oFup.recId && this.oFup.recId!="")
	{
		this.QueryString = this.QueryString + "&rq_SourceRecId=" + Helper.hexEncodeString(this.oFup.recId);
	}
	if (this.oSource && this.oSource.rq_SourceParentId && this.oSource.rq_SourceParentId!="")
	{
		this.QueryString = this.QueryString + "&rq_SourceParentId=" + Helper.hexEncodeString(this.oSource.rq_SourceParentId);
	}
	else if (this.oFup && this.oFup.parentId && this.oFup.parentId!="")
	{
		this.QueryString = this.QueryString + "&rq_SourceParentId=" + Helper.hexEncodeString(this.oFup.parentId);
	}
	if (parseInt(this.oTarget.rq_TargetId,10) > -1)
	{
		this.QueryString = this.QueryString + "&rq_TargetId=" + Helper.hexEncodeString(this.oTarget.rq_TargetId);
		this.QueryString = this.QueryString + "&rq_AppId=" + Helper.hexEncodeString(this.oTarget.rq_AppId);
	}
	else if (this.oTarget.rq_TargetUrl && this.oTarget.rq_TargetUrl!="")
	{
		this.QueryString = this.QueryString + "&rq_TargetUrl=" + Helper.hexEncodeString(this.oTarget.rq_TargetUrl);
	}
	if (this.oTarget.anchor && this.oTarget.anchor!="")
	{
		this.QueryString = this.QueryString + "&rq_Anchor=" + Helper.hexEncodeString(this.oTarget.anchor);
	}
	if(this.oTarget.rq_RecId && this.oTarget.rq_RecId!="")
	{
		this.QueryString = this.QueryString + "&rq_RecId=" + Helper.hexEncodeString(this.oTarget.rq_RecId);
	}
	else if(this.linkType=="0")
	{
		if(this.oFup && this.oFup.recId && this.oFup.recId!="" && this.oFup.recId!="-1")
		{
			this.QueryString = this.QueryString + "&rq_RecId=" + Helper.hexEncodeString(this.oFup.recId);
		}
		else
		{
			this.QueryString = this.QueryString + "&rq_RecId=" + Helper.hexEncodeString("-1");		
		}
	}
	else if(this.linkType=="2" || this.linkType=="16")
	{
	}
	else if(this.linkType=="6" || this.linkType=="9" || this.linkType=="7")
	{
		this.QueryString = this.QueryString + "&rq_RecId=" + Helper.hexEncodeString("-1");
	}
	if(this.bornToDie==1)
	{
		this.QueryString = this.QueryString + "&rq_Template=" + Helper.hexEncodeString("internal/system/vm/html/misc/close.vm");	
	}
	else if (this.oTarget.rq_Template && this.oTarget.rq_Template!="")
	{
		this.QueryString = this.QueryString + "&rq_Template=" + Helper.hexEncodeString(this.oTarget.rq_Template);
	}
	if (this.oTarget.rq_Lang && this.oTarget.rq_Lang!="")
	{
		this.QueryString = this.QueryString + "&rq_Lang=" + Helper.hexEncodeString(this.oTarget.rq_Lang);
	}
	else if(Helper.getQsValueByParam("rq_Lang") && !Helper.isCookieEnabled() )
	{
		this.QueryString = this.QueryString + "&rq_Lang=" + Helper.hexEncodeString(Helper.getQsValueByParam("rq_Lang"));
	}
	if (this.oTarget.rq_SId && this.oTarget.rq_SId!="")
	{
		this.QueryString = this.QueryString + "&rq_SId=" + Helper.hexEncodeString(this.oTarget.rq_SId);
	}
	if (this.oTarget.rq_ControlName && this.oTarget.rq_ControlName!="")
	{
		this.QueryString = this.QueryString + "&rq_ControlName=" + Helper.hexEncodeString(this.oTarget.rq_ControlName);
	}
	if (this.oTarget.rq_ControlType && this.oTarget.rq_ControlType!="")
	{
		this.QueryString = this.QueryString + "&rq_ControlType=" + Helper.hexEncodeString(this.oTarget.rq_ControlType);
	}
	if (this.oTarget.rq_blInfo && this.oTarget.rq_blInfo!="")
	{
		this.QueryString = this.QueryString + "&rq_blInfo=" + Helper.hexEncodeString(this.oTarget.rq_blInfo);
	}
	if (this.oTarget.rq_CatId && this.oTarget.rq_CatId!="")
	{
		this.QueryString = this.QueryString + "&rq_CatId=" + Helper.hexEncodeString(this.oTarget.rq_CatId);
	}
	if(this.oTarget.rq_Frame && this.oTarget.rq_Frame!="")
	{
		this.QueryString = this.QueryString + "&rq_Frame=" + Helper.hexEncodeString(this.oTarget.rq_Frame);
	}
	else if (self.name && self.name!="")
	{
		this.QueryString = this.QueryString + "&rq_Frame=" + Helper.hexEncodeString(self.name);
	}
	if(Helper.getQsValueByParam("rq_Printview") && Helper.getQsValueByParam("rq_Printview")=="1")
	{
		this.QueryString = this.QueryString + "&rq_Printview=" + Helper.hexEncodeString("1");
	}
}
function ActionHandleAddParam()
{
	if(this.oTarget && this.oTarget.addParam!="")
	{
		this.QueryString = this.QueryString + "&" + this.oTarget.addParam;
	}
	if(Helper.getQsValueByParam("rq_isReminder", this.QueryString) && Helper.getQsValueByParam("rq_isReminder", this.QueryString)=="1")
	{
		this.QueryString = Helper.setQsValueByParam("rq_NoViewpage", "1", this.QueryString);
	}
	var qs_SId = "";
	if(Helper.getQsValueByParam("rq_SId"))
	{
		var sid = Helper.getQsValueByParam("rq_SId");
		if (Helper.isCookieEnabled() == true)
		{
			Helper.setCookie("co_SId", sid, false);
		}
		else
		{
			this.QueryString = Helper.setQsValueByParam("rq_SId", sid, this.QueryString);
		}	
	}
	return;
}
function upTarget()
{
	this.newWindow = "0";
	this.close = "0";
	this.reloadWin = "";
	this.reloadByChangeWin = "";
	this.closeByChange = "0";
	this.rq_Lang = "";
	this.rq_RecId = "";
	this.addParam = "";
	this.rq_TargetFrame = "";
	this.rq_TargetId = "";
	this.rq_AppId = "";
	this.rq_Template = "";
	this.rq_ClientType = "html";
	this.windowSettings = "";
	this.props = "";
}
function upSource()
{
	this.rq_SourceRecId = "";
	this.fr_ActionId = "";
	this.fr_TAN = "";
}
function upUserInfoControl()
{
	this.upType = "upUserInfoControl";
}
upUserInfoControl.prototype = new upActionControl();
function upButtonControl()
{
	this.upType = "upButtonControl";
}
upButtonControl.prototype = new upActionControl();
function upTextActionControl()
{
	this.upType = "upTextActionControl";
	this.bFixTxt = true;
	this.text = "";
}
upTextActionControl.prototype = new upActionControl();
function upImageActionControl()
{
	this.upType = "upImageActionControl";
	this.srcMouseout = "";
	this.srcMouseover = "";
	this.srcFlip = "";
	this.srcFlop = "";
	this.oImage = null;
}
upImageActionControl.prototype = new upActionControl();
upImageActionControl.prototype.changeImg = ImageActionChangeImg;
upImageActionControl.prototype.flipFlop = ImageActionFlipFlop;
function ImageActionFlipFlop(bFlipStatus)
{
	var imgSrc = "";
	this._flipFlop(bFlipStatus);
	if(this.bFlipStatus==true)
	{
		imgSrc = this.srcFlip;
	}
	else
	{
		imgSrc = this.srcFlop;
	}
	if(this.oImage && this.oImage.src)
		this.oImage.src = imgSrc;
	return true;
}
function ImageActionChangeImg(imgSrc)
{
	if (this.oImage && this.oImage.oHtml)
	{
		this.oImage.oHtml.src = imgSrc;
	}
}
function upFileActionControl()
{
	this.upType = "upFileActionControl";
}
upFileActionControl.prototype = new upTextActionControl();
upFileActionControl.prototype.setFileObject = FileActionSetFileObject;
function FileActionSetFileObject(controlName, appId, targetId, recId)
{
	this.linkType = "12";
	this.oTarget = new upTarget();
	this.oTarget.rq_ControlName = controlName;
	this.oTarget.rq_ControlType = "file";
	this.oTarget.rq_AppId = appId;
	this.oTarget.rq_TargetId = targetId;
	this.oTarget.rq_RecId = recId;
	this.oTarget.newWindow = "1";
	this.oTarget.rq_TargetFrame = controlName + recId;
	this.oTarget.windowSettings = "400,400,10,0,1";
	this.oTarget.props = "dependent=yes,menubar=yes,toolbar=no,scrollbars=yes,resizable=yes";
	if(Helper.isCookieEnabled())
	{
		this.oTarget.rq_SId = Helper.getCookieValueByParam("co_SId");
	}
}
function upImageFileActionControl()
{
	this.upType = "upImageFileActionControl";
	this.srcURL = "";
	this.width = "50";
	this.height = "50";
	this.widthOrg = "400";
	this.heightOrg = "400";
	this.scaled = "1";
}
upImageFileActionControl.prototype = new upImageActionControl();
upImageFileActionControl.prototype.setImageProps = ImageFileActionSetImageProps;
upImageFileActionControl.prototype.setImageFileObject = ImageFileActionSetImageFileObject;
function ImageFileActionSetImageFileObject(controlName, appId, targetId, recId, htmlId, controlValue, oFup, strFieldGuid)
{
	this.linkType = "12";
	if(oFup)
	{
		this.oFup = oFup;
	}	
	this.oTarget = new upTarget();
	if(typeof strFieldGuid != "undefined" && controlName==null)
		this.oTarget.addParam = Helper.setQsValueByParam("rq_strFieldGuid",strFieldGuid,this.oTarget.addParam);
	else
		this.oTarget.rq_ControlName = controlName;
	this.oTarget.rq_ControlType = "image";
	this.oTarget.rq_AppId = appId;
	this.oTarget.rq_TargetId = targetId;
	this.oTarget.rq_RecId = recId;
	this.oTarget.newWindow = "1";
	this.oTarget.rq_TargetFrame = controlName + recId;
	this.oTarget.addParam = Helper.setQsValueByParam("rq_ImageSize","original",this.oTarget.addParam);
	this.setImageProps(controlValue);
	var widthOrg = parseInt(this.widthOrg, 10) + 50;
	if(widthOrg > screen.availWidth)widthOrg = parseInt(screen.availWidth, 10);
	var heightOrg = parseInt(this.heightOrg, 10) + 68;
	if(heightOrg > screen.availHeight)heightOrg = parseInt(screen.availHeight, 10);	
	this.oTarget.windowSettings = widthOrg + "," + heightOrg + ",10,0,1";
	if(Helper.isCookieEnabled())
	{
		this.oTarget.rq_SId = Helper.getCookieValueByParam("co_SId");
	}
}
function ImageFileActionSetImageProps(strInput)
{
	if(strInput.indexOf("@") == -1)
	{
		this.description = strInput;
	}
	else
	{
		this.description = strInput.substring(0, strInput.lastIndexOf("@"));
		var strSize = strInput.substring(strInput.lastIndexOf("@") + 1, strInput.length);
		var aSize = strSize.split(",");
		if(!isNaN(parseInt(aSize[0])))this.width = parseInt(aSize[0]);
		if(!isNaN(parseInt(aSize[1])))this.height = parseInt(aSize[1]);
		if(!isNaN(parseInt(aSize[2])))this.widthOrg = parseInt(aSize[2]);
		if(!isNaN(parseInt(aSize[3])))this.heightOrg = parseInt(aSize[3]);
	}
}
function upDropdownActionControl()
{
	this.upType = "upDropdownActionControl";
	this.styleType = "Dropdown_Standard";	
	this.bEdit = true;
	this.max = "1";
	this.min = "1";
	this.sourceType = "0";
}
upDropdownActionControl.prototype = new upActionControl();
upDropdownActionControl.prototype.insertOption = DropdownActionInsertOption;
upDropdownActionControl.prototype.clearOptions = DropdownActionClearOptions;
upDropdownActionControl.prototype.validateRequired = DropdownActionValidateRequired;
upDropdownActionControl.prototype.validateRequiredDo = DropdownActionValidateRequiredDo;
function DropdownActionValidateRequired(p_strMessage)
{
	var l_strMessage = "";
	if (!p_strMessage || p_strMessage=="")
	{
		l_strMessage = self.oUp.oMessage.SELECT_CONSTR_REQUIRED;
	}
	else
	{
		l_strMessage = p_strMessage;
	}
	if (!this.validateRequiredDo())
	{
		alert(l_strMessage);
		return false;
	}
	return true;
}
function DropdownActionClearOptions()
{
	var htmlEle = this.oHtml;
	while(htmlEle.length > 0)
	{
		htmlEle.options[0] = null;
	}
}
function DropdownActionValidateRequiredDo()
{
 var noOfSelected = 0;
 for (var i=0;i< this.oHtml.options.length;i++)
 {
	if (this.oHtml.options[i].selected && this.oHtml.options[i].value!="")
	{
		noOfSelected ++;
	}
 }
 if (noOfSelected < this.min || noOfSelected > this.max)
 {
	return false;
 }
 return true;
}
function DropdownActionInsertOption(p_strText,p_strValue)
{
	var htmlEle = this.oHtml;
	var newOpt = new Option(p_strText,p_strValue);
	htmlEle.options[htmlEle.length] = newOpt;
	htmlEle.options[htmlEle.selectedIndex].selected = false;
	htmlEle.options[htmlEle.length-1].selected = true;
}
function Helper()
{
}
 Helper.trim = HelperTrim;
 Helper.lTrim = HelperLTrim;
 Helper.rTrim = HelperRTrim;
 Helper.makeArray = HelperMakeArray;
 Helper.hexEncodeString = HelperHexEncodeString;
 Helper.hexDecodeString = HelperHexDecodeString;
 Helper.hexDigitToInt = HelperHexDigitToInt;
 Helper.isCookieEnabled = HelperIsCookieEnabled;
 Helper.isInteger = HelperIsInteger;
 Helper.getQsValueByParam = HelperGetQsValueByParam;
 Helper.getCookieValueByParam = HelperGetCookieValueByParam;
 Helper.setCookie = HelperSetCookie;
 Helper.deleteCookie = HelperDeleteCookie;
 Helper.deleteParamFromQs = HelperDeleteParamFromQs;
 Helper.deleteParamFromUrl = HelperDeleteParamFromUrl;
 Helper.setQsValueByParam = HelperSetQsValueByParam;
 Helper.setUrlValueByParam = HelperSetUrlValueByParam;
 Helper.replaceSubstring = HelperReplaceSubstring;
 Helper.getFupId = HelperGetFupId;
 Helper.doCharStuffing = HelperDoCharStuffing;
 Helper.undoCharStuffing = HelperUndoCharStuffing;
 Helper.parseFloat = HelperParseFloat;
 Helper.parseInt = HelperParseInt;
 Helper.sleep = HelperSleep;
 Helper.setLayerText = HelperSetLayerText;
function HelperSetLayerText(p_LayerId, p_strText) 
{ 
	if(document.layers) 
	{
		document.layers[p_LayerId].document.open();
		document.layers[p_LayerId].document.write(p_strText);
		document.layers[p_LayerId].document.close();
	}
	else if(document.all) 
	{
		document.all[p_LayerId].innerHTML=p_strText;
	}
	else if(document.getElementById) 
	{
		while (document.getElementById(p_LayerId).childNodes.length > 0)
			document.getElementById(p_LayerId).removeChild(document.getElementById(p_LayerId).firstChild);
		var text=document.createTextNode(p_strText);
		document.getElementById(p_LayerId).appendChild(text);
	}
}
function HelperSleep(ms)
{
		var now = new Date();
		var exitTime = now.getTime() + ms;
	while (true)
	{
		now = new Date();
		if (now.getTime() > exitTime)
			break;
	}
	return;
}
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 strOut = "";
	for(var i=0; i < aInput.length; i++)
	{
		if(i>0)
		{
			strOut += "||";
		}
		strOut += aInput[i].toString().replace(/\|/g,"|0");
	}
	return strOut;
}
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.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;
	}
	else
	{
		fup = Helper.getQsValueByParam("rq_TargetId");
	}
	return fup;
}
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 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 HelperMakeArray(n)
{
	var arr = new Array(n+1);
	for ( var i = 1; i <= n; i++ )
	{
		arr[i] = 0;
	}
	return arr;
}
function HelperIsCookieEnabled()
{
	document.cookie = "testCookie=cookieEnabled";
	var cookieTest = document.cookie;
	if (cookieTest && cookieTest.indexOf("cookieEnabled")>-1)
	{
		Helper.deleteCookie("testCookie");
		return true;
	}
	else
	{
		return false;
	}
}
function HelperSetCookie(p_strParam,p_strValue,bExpire)
{
	if (this.isCookieEnabled)
	{
		var cookieNew = p_strParam + "=" +  Helper.hexEncodeString(p_strValue);
		cookieNew += "; path=/";
		if (bExpire && bExpire == true)
		{
			var expDate = new Date();
			cookieNew += "; expires=" + expDate.toGMTString(expDate.setTime(expDate.getTime() + (365 * 24 * 60 * 60 * 1000)));
		}
		document.cookie = cookieNew;
		return true;
	}
	else
	{
		return false;
	}
}
function HelperDeleteCookie(p_strParam)
{
	var cookieNew = p_strParam + "=''";
	var expDate = new Date(1970,0,2);
	cookieNew += "; expires=" + expDate.toGMTString();
	Helper.setCookie(cookieNew);
	return true;
}
function HelperGetCookieValueByParam(p_strParam)
{
	if(p_strParam == "")
	{
		return false;
	}
	if ( document.cookie && document.cookie != "")
	{
		var cookieOld = document.cookie;
		var aCookieOld = cookieOld.split(";");
		for (var i=0;i < aCookieOld.length;i++)
		{
			var aCookiePart = aCookieOld[i].split("=");
			if(Helper.trim(aCookiePart[0])==Helper.trim(p_strParam))
			{
				return Helper.hexDecodeString(aCookiePart[1]);
			}
		}
	}
	return false;
}
function HelperDeleteParamFromQs(p_strParam,p_strQs)
{
	var qsSearch = "";
	if(p_strParam == "")
	{
		return false;
	}
	if (HelperDeleteParamFromQs.arguments.length==2)
	{
		qsSearch = p_strQs;
	}
	else if(self.location && typeof(self.location.search)!="unknown")
	{
		qsSearch = self.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 HelperSetUrlValueByParam(p_strParam, p_strValue, 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.setQsValueByParam(p_strParam, p_strValue, l_strQs);
	return l_strLoc + "?" + l_strNewQs;
}
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 HelperSetQsValueByParam(p_strParam,p_strValue,p_strQs)
{
	var qsSearch = "";
	if(p_strParam == "")
	{
		return false;
	}
	if (HelperSetQsValueByParam.arguments.length==3)
	{
		qsSearch = p_strQs;
	}
	else if(self.location && typeof(self.location.search)!="unknown")
	{
		qsSearch = self.location.search;
	}
	var strValue = new String(p_strValue);
	var countPara = 0;
	var qsNew = "";
	var newParam = 1;
	if ( qsSearch != "")
	{
		if(qsSearch.substring(0,1)=="?")
		{
			qsSearch = qsSearch.substring(1,qsSearch.length);
		}
		var aQsSearch = qsSearch.split("&");
		for (countPara = 0;countPara < aQsSearch.length;countPara++)
		{
			if (qsNew != "")
			{
				qsNew = qsNew + "&";
			}
			var aQsPart = aQsSearch[countPara].split("=");
			if (aQsPart[0] == p_strParam)
			{
				qsNew = qsNew + p_strParam + "=" +  Helper.hexEncodeString(strValue);
				newParam = 0;
			}
			else
			{
				qsNew = qsNew + aQsSearch[countPara];
			}
		}
		if (newParam == 1)
		{
			qsNew = qsNew + "&" + p_strParam + "=" +  Helper.hexEncodeString(strValue);
		}
		return qsNew;
	}
	qsNew = p_strParam + "=" +  Helper.hexEncodeString(strValue);
	return qsNew;
}
function HelperGetQsValueByParam(p_strParam,p_strQs)
{
	var qsSearch = "";
	if(p_strParam == "")
	{
		return false;
	}
	if (p_strQs)
	{
		qsSearch = p_strQs;
	}
	else if(self.location && typeof(self.location.search)!="unknown")
	{
		qsSearch = self.location.search;
	}
	var i = 0;
	if(qsSearch != "")
	{
		if(qsSearch.substring(0,1)=='?')
		{
			qsSearch = qsSearch.substring(1,qsSearch.length);
		}
		var aQsSearch = qsSearch.split("&");
		for (i=0;i < aQsSearch.length;i++)
		{
			var aQsPart = aQsSearch[i].split("=");
			if (aQsPart[0] == p_strParam)
			{
				return Helper.hexDecodeString(aQsPart[1]);
			}
		}
	}
	return false;
}
function HelperHexEncodeString(strInput)
{
	if(!strInput || strInput=="")
	{
		return "";
	}
	var i = 0;
	var achHex = new Array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');
	var strOutput = new String();
	for (i = 0;i < strInput.length; i++)
	{
		var codeInput = strInput.charCodeAt(i);
		strOutput += achHex[(codeInput >> 4) & 0x0F] + achHex[codeInput & 0x0F];
	}
	return strOutput;
}
function HelperHexDecodeString(p_strInput)
{
	var strInput = new String(p_strInput);
	var strOutput = new String();
	for (var i = 0; i < strInput.length; i += 2)
	{
		binOutput = (Helper.hexDigitToInt(strInput.substr(i,1)) << 4 | Helper.hexDigitToInt(strInput.substr(i+1,1)));
		strOutput += String.fromCharCode(binOutput);
	}
	return strOutput;
}
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 upBrowser()
{
	this.upType = "Browser";
	this.getRef = BrowserGetRef;
	this.getValue = BrowserGetValue;
	this.getValueByElementId = BrowserGetValueByElementId;
	this.getEventKeyCode = BrowserGetEventKeyCode;
	this.getEventKeyChar = BrowserGetEventKeyChar;
	this.getEventTarget = BrowserGetEventTarget;
	this.getExceptionMessage = BrowserGetExceptionMessage;
	this.getPosition2Screen = BrowserGetPosition2Screen;
	this.getPosition2Page = BrowserGetPosition2Page;
	this.getPosLeft = BrowserGetPosLeft;
	this.getPosTop = BrowserGetPosTop;
	this.getWidth = BrowserGetWidth;
	this.getHeight = BrowserGetHeight;
	this.setValue = BrowserSetValue;
	this.setValueByElementId = BrowserSetValueByElementId;
	this.insertOptByElementId = BrowserInsertOptByElementId;
	this.setBrowserType = BrowserSetBrowserType;
	this.isHandleException = BrowserIsHandleException;
	this.getWinHeight = BrowserGetWinHeight;
	this.getWinWidth = BrowserGetWinWidth;
	this.gotoAnchor = BrowserGotoAnchor;
}
var Browser = new upBrowser();
Browser.setBrowserType();
Browser.handleException = Browser.isHandleException();
function BrowserGotoAnchor(strAnchor, doc)
{
	if(!this.mac_ie5)
	{
		var href = "#" + strAnchor;
		if(Browser.handleException)
		{
			try
			{
				doc.location.href = href;
			}
			catch(e)
			{
				return true;
			}
		}
	}
	return true;
}
function BrowserGetWinHeight(oUp)
{
	var height = 0;
	if (oUp.oHtml.outerHeight)
	{
		height = oUp.oHtml.outerHeight;
	}
	else
	{
		height = oUp.height;
	}
	return height;
}
function BrowserGetWinWidth(oUp)
{
	var width = 0;
	if (oUp.oHtml.outerWidth)
	{
		width = oUp.oHtml.outerWidth;
	}
	else
	{
		width = oUp.width //+ 15;
	}
	return width;
}
function BrowserSetBrowserType()
{
	var agent  = navigator.userAgent.toLowerCase();
	var appVer = navigator.appVersion.toLowerCase();
	var ns6Pos = agent.indexOf('netscape6');
	var iePos  = appVer.toLowerCase().indexOf('msie');
	if (ns6Pos !=-1)
	{
		this.minor = parseFloat(agent.substring(ns6Pos+10))
		this.major = parseInt(this.minor)
	}
	else if (iePos !=-1)
	{
		this.minor = parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)))
		this.major = parseInt(this.minor);
	}
	else
	{
		this.major = parseInt(navigator.appVersion);
		this.minor = parseFloat(navigator.appVersion);
	}
	this.mac   = ((agent.indexOf("mac")!=-1));
	this.opera   = ((agent.indexOf("opera")!=-1));
	this.ns	= ((agent.indexOf('mozilla')!= -1) &&
				 (agent.indexOf('spoofer')== -1) &&
				 (agent.indexOf('opera')==-1) &&
				 (agent.indexOf('compatible')== -1));
	this.ns6= ((agent.indexOf('mozilla')!= -1) &&
				 (agent.indexOf('netscape6')!= -1) &&
				 (agent.indexOf('spoofer')== -1) &&
				 (agent.indexOf('opera')==-1) &&
				 (agent.indexOf('compatible')== -1));
	this.mozilla = ((agent.indexOf('mozilla')!= -1) &&
				 (agent.indexOf('spoofer')== -1) &&
				 (agent.indexOf('opera')==-1) &&
				 (agent.indexOf('compatible')== -1));
	this.ns4   = (this.ns && (this.major == 4));
	this.ns6up   = (this.ns && (this.major >= 6));
	this.ie	= (agent.indexOf("msie")!= -1 && !this.opera);
	this.ie3   = (this.ie && (this.major < 4));
	this.ie4   = (this.ie && (this.major == 4) &&
				 (agent.indexOf("msie 5.0")== -1));
	this.ie5   = (this.ie && (this.major == 5) && !this.opera);
	this.ie50  = (this.ie && (this.major == 5) && !this.opera && this.minor < 5.1);
	this.mac_ie5 = (this.mac && this.ie5);
	this.ie6up   = (this.ie && this.major >= 6 && !this.opera);
	this.dom = (!(!document.documentElement));
	this.linux = (agent.indexOf("inux")!=-1);
}
function BrowserIsHandleException()
{
	var handleException = false;
	if (Browser.ie5 || Browser.ie6up || Browser.ns6up || Browser.opera || Browser.dom)
	{
		handleException = true;
	}
	return handleException;
}
function BrowserGetPosition2Screen(oHtml)
{
	if(!oHtml)
	{
		return false;
	}
	var posX = 0;
	var posY = 0;
	var oPosXY = new Object();
	var oHtmlDoc = self.document;
	var oHtmlWin = self;
	if (oHtmlWin.screenTop==null && self.oUp.oRootWin.eventScreenX && !isNaN(self.oUp.oRootWin.eventScreenX))
	{
		posX = self.oUp.oRootWin.eventScreenX;
		posY = self.oUp.oRootWin.eventScreenY;
	}
	else if(window.event && window.event.screenX && oHtmlWin.top != oHtmlWin.oHtmlRoot)
	{
		posX = parseInt(window.event.screenX);
		posY = parseInt(window.event.screenY);
	}
	else if(oHtmlWin.screenTop!=null && oHtmlWin.screenTop!="undefined")
	{
		oPosXY = this.getPosition2Page(oHtml);
		posX = oPosXY.posX - oHtmlDoc.body.scrollLeft + oHtmlWin.screenLeft;
		posY = oPosXY.posY - oHtmlDoc.body.scrollTop + oHtmlWin.screenTop;
	}
	oPosXY.posX = posX;
	oPosXY.posY = posY;
	return oPosXY;
}
function BrowserGetPosition2Page(oHtml)
{
	var oPosXY = new Object();
	var posX = 0;
	var posY = 0;
	 if (oHtml.offsetParent)
	 {
		posX = this.getPosLeft(oHtml);
		posY = this.getPosTop(oHtml);
	}
	else if (oHtml.offsetLeft && oHtml.offsetTop)
	{
		posX = oHtml.offsetLeft;
		posY = oHtml.offsetTop;
	}
	else if (oHtml.posX && oHtml.posY)
	{
		posX = oHtml.posX;
		posY = oHtml.posY;
	}
	oPosXY.posX = posX;
	oPosXY.posY = posY;
	return oPosXY;
}
function BrowserGetWidth(oHtml)
{
	var width = 0;
	if(oHtml.offsetWidth && !isNaN(oHtml.offsetWidth))
	{
		width = oHtml.offsetWidth;
	}
	else if(oHtml.width && !isNaN(oHtml.width))
	{
		width = oHtml.width;
	}
	return parseInt(width);
}
function BrowserGetHeight(oHtml)
{
	var height = 0;
	if(oHtml.offsetHeight && !isNaN(oHtml.offsetHeight))
	{
		height = oHtml.offsetHeight;
	}
	else if(oHtml.height && !isNaN(oHtml.height))
	{
		height = oHtml.height;
	}
	return parseInt(height);
}
function BrowserGetPosLeft(oHtml)
{
	var posX = oHtml.offsetLeft;
	var oParent=oHtml.offsetParent;
	while(oParent)
	{
		posX = posX + oParent.offsetLeft;
		oParent=oParent.offsetParent;
	}
	return posX;
}
function BrowserGetPosTop(oHtml)
{
	var posY = oHtml.offsetTop;
	var oParent = oHtml.offsetParent;
	while(oParent)
	{
		posY = posY + oParent.offsetTop;
		oParent = oParent.offsetParent;
	}
	return posY;
}
function BrowserGetRef(p_strHtmlEl,p_oTargDoc)
{
	 if(!p_strHtmlEl)
	 {
				return false;
	 }
	 else
	 {
				var l_strHtmlEl = p_strHtmlEl;
	 }
	 var ref = null;
	 var oTargDoc = null;
	 if(!p_oTargDoc)
	 {
				oTargDoc = document;
	 }
	 else
	 {
				oTargDoc = p_oTargDoc;
	 }
	 if (this.ns4)
	 {
		ref = eval("oTargDoc.layers." + l_strHtmlEl);
	 }
	 else if(Browser.opera)
	 {
				ref = eval(oTargDoc.getElementById(l_strHtmlEl));
	 }
	 else if(oTargDoc.getElementById)
	 {
		ref = eval(oTargDoc.getElementById(l_strHtmlEl));
	 }
	 if(!ref)
	 {
				if (DEBUG) alert(self.oUp.oMessage.BROWSER_NO_FLD_REF + "\n(" + l_strHtmlEl + ")");
				return false;
	 }
	 else
	 {
				return ref;
		 }
}
function BrowserInsertOptByElementId(p_strHtmlEl,p_strText,p_strValue,p_oTargDoc)
{
	if(BrowserInsertOptByElementId.arguments.length < 2)
	{
		return false;
	}
	else
	{
		var l_strHtmlEl = p_strHtmlEl;
		var l_strText = p_strText;
		var l_strValue = "";
		if(BrowserInsertOptByElementId.arguments.length > 2)
		{
			l_strValue = p_strValue;
		}
	}
	var oTargDoc = null;
	if(!p_oTargDoc)
	{
		oTargDoc = document;
	}
	else
	{
		oTargDoc = p_oTargDoc;
	}
	var ref = null;
	ref = Browser.getRef(l_strHtmlEl,oTargDoc)
	if(!ref || !(ref.oUp.upType=="upListboxControl" || ref.oUp.upType=="upDropdownControl"  || ref.oUp.upType=="upDropdownActionControl"))
	{
		return false;
	}
	else
	{
		return ref.oUp.insertOption(l_strText,l_strValue);
	}
}
function BrowserSetValueByElementId(p_strHtmlEl,value,p_oTargDoc)
{
	if(!p_strHtmlEl)
	{
		return false;
	}
	else
	{
		var l_strHtmlEl = p_strHtmlEl;
	}
		if(!value)
	{
		value = "";
	}
	var oTargDoc = null;
	if(!p_oTargDoc)
	{
		oTargDoc = document;
	}
	else
	{
		oTargDoc = p_oTargDoc;
	}
	var ref = null;
	ref = Browser.getRef(l_strHtmlEl,oTargDoc);
	if(!ref)
	{
		return false;
	}
	else
	{
		var retValue = Browser.setValue(ref.oUp,value);
		return retValue
	}
}
function BrowserGetValueByElementId(strHtmlEl)
{
	if(arguments.length < 1)
		return false;
	return Browser.getValue(Browser.getRef(strHtmlEl).oUp);
}
function BrowserGetValue(oControl)
{
	var j;
	if (!oControl || !oControl.oHtml )
	{
		return false;
	}
	if(!oControl.bEdit)
	{
		var HtmlValue = "";
		if (oControl.oHtml.innerHTML)
		{
			HtmlValue = oControl.oHtml.innerHTML;
		}
		else if (oControl.oHtml.firstChild && oControl.oHtml.firstChild.nodeValue)
		{
			HtmlValue = oControl.oHtml.firstChild.nodeValue;
		}
		else
		{
			return false;
		}
	}
	else
	{
		if(oControl.upType=="upCheckControl")
		{
			if(oControl.oHtml.checked == true)
			{
				HtmlValue = "1";
			}
			else
			{
				HtmlValue = "0";
			}
		}
		else if(oControl.upType=="upDropdownControl" )
		{
			for(var j=0;j < oControl.oHtml.options.length;j++)
			{
				if(oControl.oHtml.options[j].selected)
				{
					HtmlValue = oControl.oHtml.options[j].value;
					break;
				}
			}
		}
		else if(oControl.upType=="upRadioControlGroup")
		{
			for(var j=0;j < oControl.elements.length;j++)
			{
				if(oControl.elements[j].oHtml.checked == true)
				{
					HtmlValue = oControl.elements[j].oHtml.value;
					break;
				}
			}
		}
		else
		{
			HtmlValue = oControl.oHtml.value;
		}
	}
	return HtmlValue;
}
function BrowserSetValue(oControl,value)
{
	var j;
	if (!oControl || !oControl.oHtml)
	{
		return false;
	}
	if (arguments.length < 2)
	{
		value = "";
	}
	var htmlValue = value;
	if(!oControl.bEdit)
	{
		if (oControl.oHtml.innerHTML)
		{
			oControl.oHtml.innerHTML = htmlValue;
		}
		else if (oControl.oHtml.firstChild && oControl.oHtml.firstChild.nodeValue)
		{
			oControl.oHtml.firstChild.nodeValue = htmlValue;
		}
		else
		{
			alert(self.oUp.oMessage.BROWSER_ERR_VIEW_NOT_WRITABLE);
			return false;
		}
	}
	else
	{
		if(oControl.upType=="upCheckControl")
		{
			if(htmlValue=="1")
			{
				oControl.oHtml.checked = true;
			}
			else
			{
				oControl.oHtml.checked = false;
			}
		}
		else if((oControl.upType=="upDropdownControl" || oControl.upType=="upDropdownActionControl" || oControl.upType=="upListboxControl") && oControl.compareText=="1")
		{
			for(var j=0;j < oControl.oHtml.options.length;j++)
			{
				if(oControl.oHtml.options[j].text == htmlValue)
				{
					oControl.oHtml.options[j].selected = true;
				}
				else
				{
					oControl.oHtml.options[j].selected = false;
				}
			}
			if(oControl.upType=="upDropdownActionControl")
				oControl.oHtml.onchange();
		}
		else if(oControl.upType=="upDropdownControl" || oControl.upType=="upDropdownActionControl" || oControl.upType=="upListboxControl")
		{
			for(var j=0;j < oControl.oHtml.options.length;j++)
			{
				if(oControl.oHtml.options[j].value == htmlValue)
				{
					oControl.oHtml.options[j].selected = true;
				}
				else
				{
					oControl.oHtml.options[j].selected = false;
				}
			}
		}
		else if(oControl.upType=="upRadioControlGroup")
		{
			for(var j=0;j < oControl.elements.length;j++)
			{
				if(oControl.elements[j].oHtml.value==htmlValue)
				{
					oControl.elements[j].oHtml.checked = true;
				}
				else
				{
					oControl.elements[j].oHtml.checked = false;
				}
			}
		}
		else if(oControl.upType=="upTextareaControl" && document.all && oControl.editor && oControl.editor=="1")
		{
			var targWin = oControl.oHtml.form.oUp.oFuncPart.oWindow.oHtml;
			if(targWin.editor_setHTML)
			{
				targWin.editor_setHTML(oControl.oHtml.name, htmlValue);
				oControl.oHtml.value = htmlValue;				
			}	
		}
		else
		{
			oControl.oHtml.value = htmlValue;
		}
	}
	return true;
}
function BrowserGetEventKeyCode()
{
	var codeInput = "";
	if (self.oUp.oEvent.keyCode && self.oUp.oEvent.keyCode!="" && self.oUp.oEvent.keyCode!=0)
	{
	 codeInput =  self.oUp.oEvent.keyCode;
	}
	else
	{
	 codeInput =  self.oUp.oEvent.which;
	}
	return codeInput;
}
function BrowserGetEventKeyChar()
{
	var keyChar = String.fromCharCode(Browser.getEventKeyCode()).toLowerCase();
	return keyChar;
}
function BrowserGetEventTarget()
{
	if (self.oUp.oEvent.target != null)
	{
		oHtml = self.oUp.oEvent.target;
	}
	else if (self.oUp.oEvent.srcElement != null)
	{
		oHtml =  self.oUp.oEvent.srcElement;
	}
	else
	{
		return false;
	}
	return oHtml;
}
function BrowserGetExceptionMessage(exception)
{
	var message = "";
	if (exception.description)
	{
		message =  exception.description;
	}
	else if (exception.message)
	{
		message =  exception.message;
	}
	return message;
}
if(typeof Error != "undefined")
{
	function upException(name,oControl,message,info)
	{
		this.name = name;
		this.oControl = oControl;
		this.message = message;
		this.info = info;
	}
	upException.prototype = new Error();
}
function delPopupRef(oPopup)
{
	if(oPopup.oPage)
	{
		oPopup.oPage.oWindow = null;
		if(oPopup.oPage.oHtml)
			oPopup.oPage.oHtml.oUp = null;
		oPopup.oPage.oHtml = null;
		oPopup.oPage.oStyle = null;
		oPopup.oPage = null;
	}
	if(oPopup.oHtml && oPopup.oHtml.oUp)
	{
		oPopup.oHtml.oUp = null;
	}
	oPopup.oHtml = null;
	if(!oPopup.nextPopup && !oPopup.samePopup)
	{
		oPopup.oRootWin.unregisterPopup(self.name);
		oPopup.oRootWin.unregisterFrame(self.name);
		oPopup.oRootWin = null;
		oPopup.aInfoPipe = null;
		oPopup.oRegistry = null;
		oPopup.oFrameReg = null;
		oPopup.oFormatInfo = null;
		oPopup.oMessage = null;
	}
	else
	{
	}
}
function delFrameRef()
{
	if(self.oUp && self.oUp.oPage)
	{
		if(self.oUp.oPage.oHtml)
		{
			self.oUp.oPage.oHtml.oUp = null;
		}
		self.oUp.oPage.oHtml = null;
		self.oUp.oPage.oWindow = null;
		self.oUp.oPage.oStyle = null;
		self.oUp.oPage = null;
	}
	if(self.oUp)
	{
		self.oUp.oHtml=null;
		self.oUp=null;
	}
}
function getElement(guid)
{
	if(!guid)
		return null;
	if(self && aIdByGuid!="undefined" && aIdByGuid && aIdByGuid[guid] && aIdByGuid[guid]!="undefined")
	{
		var id = aIdByGuid[guid];
		return Browser.getRef(id);
	}	
	else
	{
		return null;	
	}	
}
