<%@ Page Language="C#" AutoEventWireup="true"  %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
	<style type="text/css"> 
		.reTool .InsertEmoticon
		{
			background-image: url(Emoticons/1.gif);
		}
	</style>
</head>
<body class="BODY">
	<form id="form1" runat="server">
	<telerik:RadScriptManager ID="ScriptManager1" runat="server" />
	<telerik:RadEditor runat="server" ID="RadEditor1">
		<Tools>
			<telerik:EditorToolGroup>
				<telerik:EditorTool Name="InsertEmoticon" Text="Insert Smiley" />
			</telerik:EditorToolGroup>
		</Tools>
	</telerik:RadEditor>

	<script type="text/javascript">
		Telerik.Web.UI.Editor.CommandList["InsertEmoticon"] = function (commandName, editor, args) {
			var myCallbackFunction = function (sender, args) {

				editor.pasteHtml(String.format("<img src='{0}' border='0' align='middle' alt='emoticon' /> ", args.image));
			}

			editor.showExternalDialog(
			"InsertEmoticon.aspx",
			{},
			400,
			310,
			myCallbackFunction,
			null,
			"Insert Emoticon",
			true,
			Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
			false,
			true);
		};
	</script>

	</form>
</body>
</html>