function doSubmitFormLinkButton(formId, checkFormData)
{
	if (typeof(checkFormData) == 'undefined')
	{
		checkFormData = function() { return true;};
	}
	
	var objForm = document.getElementById( formId );
	if( objForm != null )
	{
		if( checkFormData() )
		{
			objForm.submit();
		}
	}

	return false;
}

function doSubmitFormLinkButtonWithParam(formId, paramId, paramValue, checkFormData)
{
	if (typeof(checkFormData) == 'undefined')
	{
		checkFormData = function() { return true;};
	}
	
	var objForm = document.getElementById( formId );
	if( objForm != null )
	{
		var param = document.getElementById(paramId);
		if (param != null)
		{
			param.value = paramValue;
		}
		
		if( checkFormData() )
		{
			objForm.submit();
		}
	}

	return false;
}

function countChars(id, maxChars)
{
	if (typeof(maxChars) == 'undefined')
	{
		maxChars = 512;
	}
	
	var objComment = document.getElementById(id + '_comment');
	if (objComment != null)
	{
		var objCounterDisplay = document.getElementById(id + '_comment_counter');
		if (objCounterDisplay != null)
		{
			objCounterDisplay.value = objComment.value.length + " von " + maxChars + " Zeichen";
		}
	}

	return true;
}


