<!--
function addsmiley (what,where){
	target = document.getElementById(where);
	if (target !== null)
	{
		if (typeof target.cursorPos != 'undefined')
		{
			var cursorPos = target.cursorPos;
			text = cursorPos.text;
			text = ' ' + what + '';
		}
		else if (typeof target.selectionStart != 'undefined')
		{
			// remember scrollposition
			var scrollTop = target.scrollTop;

			var sStart = target.selectionStart;
			var sEnd = target.selectionEnd;
			text = target.value.substring(sStart, sEnd);
			text = ' ' + what + '';
			target.value = target.value.substr(0, sStart) + text + target.value.substr(sEnd);
			var nStart = sStart == sEnd ? sStart + text.length : sStart;
			var nEnd = sStart + text.length;
			target.setSelectionRange(nStart, nEnd);
		}
		else
		{
			text = '';
			target.value += ' ' + what + '';
		}

		target.focus();
		if (typeof target.cursorPos != 'undefined') {target.onselect();}
	}

}
-->