function SetStatusBarText(strText)
{
	self.status = strText;
	//window.status = strText;
}

var strSavedStatusBarText = '';
function BeginDisplayStatusBarText(strStatusBarText)
{
	strSavedStatusBarText = self.status;
	SetStatusBarText(strStatusBarText);
	return true;
}

function EndDisplayStatusBarText()
{
	SetStatusBarText(strSavedStatusBarText);
	return true;
}


function DoNotSubmitAction()
{
	return true;
}

var bActionSubmited = false;
function SubmitAction(strAction, strActionControl, strActionParameter, strActionHistoryMode, bConfirmAction, strConfirmText, bHighlightConfirm)
{
	var bActionConfirmed = true;
	if (true == bConfirmAction)
	{
		var obTR = null;
		var oTRBackgroundColor = null;

		if (true == bHighlightConfirm)
		{
			var ob = null;
			//ob = document.getElementById(strActionControl + "_" + strActionControl + "Button");
			ob = document.getElementById(strActionControl  + "Button");
			if (undefined == ob)
			{
				//ob = document.getElementById(strActionControl + "_" + strActionControl + "Link");
				ob = document.getElementById(strActionControl + "Link");
			}
			
			if (undefined != ob)
			{
				var z = ob;
				while(z != null)
				{
					if ('TR' == z.nodeName.toUpperCase())
					{
						obTR = z;
						z = null;
					}
					else
					{
						z = z.parentNode;
					}
				}
				if (null != obTR)
				{
					oTRBackgroundColor = obTR.style.backgroundColor;
					obTR.style.backgroundColor = '#D3D3DF';
				}
			}
		}
			
		if (confirm(strConfirmText))
		{
		}
		else
		{
			bActionConfirmed = false;
		}
		
		if (null != obTR)
		{
			obTR.style.backgroundColor = oTRBackgroundColor;
		}
	}
	
	if (true == bActionConfirmed)
	{
		try
		{
			OnBeforeSubmit();
		}
		catch(ex)
		{
		}

		document.getElementById("_ActionParameter").value = strActionParameter;
		document.getElementById("_Action").value = strAction;
		document.getElementById("_ActionControl").value = strActionControl;
		document.getElementById("_ActionHistoryMode").value = strActionHistoryMode;
		
		/* 
		document.forms[0].submit();
		RP - in FF if back button / backspace is pressed, the JS isn't initialised any more and  bActionSubmited remains = true*/
		if ( (false == bActionSubmited) || ((true == bActionSubmited) && ( browser.isNS ) ) )
		{
			bActionSubmited = true;
			document.forms[0].submit();
		}
		
	}
	
	return false;
}
