function doEmoticon(el, emoticon)
{
	el.focus ();
	if (el.createTextRange && el.selected && el.selected.text.length == 0)
	{
	   	var selected = el.selected;
		selected.text = emoticon;
	}
	else if ((emoticon != null) && (emoticon != ""))
		el.value += emoticon;
	saveSel (el)
}
function saveSel (el)
{
	if (el.createTextRange) 
	{
		s = "" + document.selection.type;
		el.selected = document.selection.createRange().duplicate();
	}
}

