function insertSmile(smile, obj)
	{
		var pos = getCaretPos(getObj('insertComment'));
		var text = getObj('insertComment').value;
		if (!isOp) {
			var s1 = text.substr(0, pos);
			var s2 = text.substr(pos);
			text = s1 + '['+smile+']' + s2;
		} else text += '['+smile+']';
		
		getObj('insertComment').value = text;
		
		if (obj) hideSmiles(obj.parentNode.parentNode);
	}
	
function showSmiles (obj) {
	obj.style.display = 'block';
}

function hideSmiles (obj) {
	obj.style.display = '';
}
	
	
function img2smiles (text)
{
	text = text.replace(/<img.*?src="\/img\/smiles\/(.*?)?.gif".*?>/gi, '[$1]');
	return text;
}