function ExecuteAction(strForm, strAction)
{
	if (!Validate(strAction))
		return;

	var oForm = document.getElementById(strForm);
	if (oForm != null)
	{
		oForm['txtAction'].value = strAction;
		oForm.submit();
	}
}
function ExecuteActionURL(strForm, strAction)
{
	if (!Validate(strAction))
		return;

	var oForm = document.getElementById(strForm);
	if (oForm != null)
	{
		var strSeparator = '?';
		var strURL = oForm.action;
		
		oForm['txtAction'].value = strAction;
		for (var i=0; i<oForm.elements.length; i++)
		{
			strURL += strSeparator;
			strURL += oForm.elements[i].name + '=' + oForm.elements[i].value;
			strSeparator = '&';
		}
		
		strURL = encodeURI(strURL);
		
		document.URL = strURL;
	}
}
function ProcessEnter(strForm, strAction)
{
	if (window.event.keyCode == 13)
		ExecuteAction(strForm, strAction);
}
function SetCheckedValues(strForm, strCheck, strCheckStore)
{
	var oForm = document.getElementById(strForm);
	if (oForm != null)
	{
		var bFirst = true;
		var oCheckStore = oForm.all(strCheckStore);
		oCheckStore.value = '';

		var arrChecks = document.getElementsByName(strCheck);
		for (var i=0; i<arrChecks.length; i++)
		{
			var oCheck = arrChecks[i];
			if (oCheck.checked)
			{
				if (!bFirst)
					oCheckStore.value += '&&';
				oCheckStore.value += oCheck.value;
			}
		}
	}
}

