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

<!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">
    <title>Insert Emoticon</title>
</head>
<body>
    <form id="form1" runat="server">

    <script type="text/javascript">

        function getRadWindow() //mandatory for the RadWindow dialogs functionality
        {
            if (window.radWindow) {
                return window.radWindow;
            }
            if (window.frameElement && window.frameElement.radWindow) {
                return window.frameElement.radWindow;
            }
            return null;
        }


        function initDialog() //called when the dialog is initialized
        {
            var oWindow = getRadWindow();
            var clientParameters = getRadWindow().ClientParameters;
            oWindow.add_beforeClose(windowBeforeCloseHandler);


        }
        if (window.attachEvent) {
            window.attachEvent("onload", initDialog);
        }
        else if (window.addEventListener) {
            window.addEventListener("load", initDialog, false);
        }

        function windowBeforeCloseHandler(oWindow, args) {
            args.set_cancel(true);
            oWindow.remove_beforeClose(windowBeforeCloseHandler);
            var closeArgument = {};
            closeArgument.image = "Emoticons/smil1.GIF"
            oWindow.close(closeArgument);
        }

        function insertEmoticon(url) //fires when the Insert Link button is clicked
        {
            var oWindow = getRadWindow();
            oWindow.remove_beforeClose(windowBeforeCloseHandler);
            var closeArgument = {};
            closeArgument.image = url
            getRadWindow().close(closeArgument);
        }
    </script>

    <style>
        img
        {
            cursor: hand;
        }
    </style>
    <fieldset>
        <legend>Click on Emoticon to insert</legend>
        <img src="Emoticons/smil1.GIF" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/smil2.GIF" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/smil9.GIF" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/smil3.GIF" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/smil4.GIF" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/smil5.GIF" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/smil6.GIF" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/smil7.GIF" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/smil8.GIF" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/smil10.GIF" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/smil11.GIF" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/1.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/2.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/3.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/4.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/5.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/6.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/7.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/8.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/9.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/10.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/11.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/12.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/13.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/14.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/15.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/16.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/17.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/18.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/19.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/20.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/21.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/22.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/23.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/24.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/25.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/26.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/27.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/28.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/29.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/30.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/31.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/32.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/33.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/34.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/35.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/36.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/37.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/38.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/39.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/40.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/41.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/42.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/43.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/44.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/45.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/46.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/47.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/48.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/49.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/50.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/51.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/52.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/53.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/54.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/55.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/56.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/57.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/58.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/59.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/60.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/61.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/62.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/63.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/64.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/65.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/66.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/67.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/68.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/69.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/70.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/71.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/72.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/73.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/74.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/75.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/76.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/77.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/78.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/79.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/80.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/81.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/82.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/83.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/84.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/85.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/86.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/87.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/88.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/89.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/90.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/91.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/92.gif" onclick="insertEmoticon(this.src)" />
        <img src="Emoticons/93.gif" onclick="insertEmoticon(this.src)" />
    </fieldset>
    </form>
</body>
</html>
