function insertSmiley(_text, _image, _target) {

	// Check if target is a WYSIWYG editor
	try {
		
		tinyMCE.execInstanceCommand(_target, "mceInsertContent", false, "<img src=\"files/sty/smileys/" + _image + "\" alt=\"" + _text.replace("\"", "&quot;") + "\" />");
	
	}
	catch(ex) {

		getById(_target).value += " " + _text + " ";
		getById(_target).focus();
		
	}

}
