<script language='javascript'>
<if="$editor_id != '' ">
	<if="$this->ipsclass->input['_lite']">
			function add_smilie(scode, smid)
			{
				var _image = document.getElementById(smid).src;
				_image     = _image.replace( /.*\/(.+?)$/, "$1" );
				try
				{
					opener.IPS_Lite_Editor[ '{$editor_id}' ].insert_emoticon( smid.replace( 'smid_', '' ), _image, scode, this );
				}
				catch(error)
				{
				}
			}
	<else />
		function add_smilie(scode, smid)
		{
			var _image = document.getElementById(smid).src;
			_image     = _image.replace( /.*\/(.+?)$/, "$1" );
			try
			{
				opener.IPS_editor[ '{$editor_id}' ].insert_emoticon( smid.replace( 'smid_', '' ), _image, scode, this );
			}
			catch(error)
			{
			}
		}
	</if>
<else />
	function add_smilie(scode, smid)
	{
		surl = document.getElementById(smid).src;
		opener.emoticon( scode, '', surl );
	}
</if>
</script>