	var announceTitleCounter = null;
	var announceTitleMax;

	var announceTextCounter = null;
	var announceTextMax;

	function announceSetColor(element, current, maximum)
	{
		var color = "";
		var className = 'announce_chars_green';

		if (current>(maximum/5*4)) {
			if (current<(maximum)) {
				className = 'announce_chars_yellow';
			}
			else {
				className = 'announce_chars_red';
			}
		}



/*
		if (current>(maximum/3*2)) {
			if (current<(maximum/10*9)) {
				className = 'announce_chars_yellow';
			}
			else {
				className = 'announce_chars_red';
			}
		}
*/

		element.className = 'announce_chars '+className;
	}


	function announceTitleChange()
	{
		currentLength = document.getElementById('ikfex_atitle').value.length;
		announceTitleCounter.innerHTML = currentLength+"/"+announceTitleMax;
		announceSetColor(announceTitleCounter, currentLength, announceTitleMax);
	}


	function announceTextChange()
	{
		currentLength = document.getElementById('ikfex_atext').value.length;
		announceTextCounter.innerHTML = currentLength+"/"+announceTextMax;
		announceSetColor(announceTextCounter, currentLength, announceTextMax);
	}


