<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>

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

        <script type="text/javascript">
            function GetRadWindow() {
                var oWindow = null;
                if (window.radWindow) oWindow = window.radWindow;
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
                return oWindow;
            }


            function populateFilterValue(arg) {
                var filterValue = document.getElementById("filterValue");
                filterValue.value = arg;
            }

            function AdjustRadWidow() {
                setTimeout(function() { GetRadWindow().autoSize(true) }, 500);
            }

            function returnToParent() {
                //create the argument that will be returned to the parent page
                var oArg = new Object();

                //get the filter value
                oArg.filterValue = document.getElementById("filterValue").value;

                //get a reference to the current RadWindow
                var oWnd = GetRadWindow();

                //Close the RadWindow and send the argument to the parent page
                if (oArg.filterValue) {
                    oWnd.close(oArg);
                }

            }
        </script>

        <div style="width: 268px; height: 193px;">
            <input type="text" style="width: 100px;" id="filterValue" value="" />
            <button title="Submit" id="close" onclick="returnToParent(); return false;">
                Filter</button>
        </div>
    </div>
    </form>
</body>
</html>
