function addSmile(image_id)
{
		image_id = " "+image_id+" ";
		var comment_obj = document.getElementById('comment');

		if (document.selection) {
			comment_obj.focus();
    		sel = document.selection.createRange();
    		sel.text = image_id;
    		comment_obj.focus();
    	}else if (comment_obj.selectionStart || comment_obj.selectionStart == '0') {
    		var startPos = comment_obj.selectionStart;
    		var endPos = comment_obj.selectionEnd;
    		var cursorPos = endPos;
    		comment_obj.value = comment_obj.value.substring(0, startPos)
    					  + image_id
    					  + comment_obj.value.substring(endPos, comment_obj.value.length);
    		cursorPos += image_id.length;
    		comment_obj.focus();
    		comment_obj.selectionStart = cursorPos;
    		comment_obj.selectionEnd = cursorPos;
    	}
    	else {
    		comment_obj.value += image_id;
    		comment_obj.focus();
    	}
}