<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>

<%@ 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">
    <title></title>
    <style type="text/css">
        html, body, form
        {
            width: 100%;
            height: 100%;
            margin: 0px;
            padding: 0px;
            overflow: hidden;
        }
    </style>
    <script type="text/javascript">
        function OnClientResized(sender, args) {
            var panewidth = $find("DefaultContents").get_width();
            var paneheight = $find("DefaultContents").get_height();

            var firstmenusplitter = $find($telerik.$("#UserControl1Splitter").val());
            firstmenusplitter.resize(panewidth, paneheight);
            firstmenusplitter.repaint();

            var secondmenusplitter = $find($telerik.$("#UserControl2Splitter").val());
            secondmenusplitter.resize(panewidth, paneheight);
            secondmenusplitter.repaint();
        }

        function OnClientTabSelected(sender, args) {
            var panewidth = $find("DefaultContents").get_width();
            var paneheight = $find("DefaultContents").get_height();

            var firstmenusplitter = $find($telerik.$("#UserControl1Splitter").val());
            firstmenusplitter.resize(panewidth, paneheight);
            firstmenusplitter.repaint();

            var secondmenusplitter = $find($telerik.$("#UserControl2Splitter").val());
            secondmenusplitter.resize(panewidth, paneheight);
            secondmenusplitter.repaint();
        }

        function OnClientTabSelecting(sender, args) {

        }
        function OnRequestStart() {
            var pageLoadWindow = $find("RadWindowPageLoad");
            pageLoadWindow.show();
        }

        function OnResponseEnd() {
            var pageLoadWindow = $find("RadWindowPageLoad");
            pageLoadWindow.close();
        }

        function sendingdata() {
            var radAjaxManager = $find("RadAjaxManager1");
            radAjaxManager.ajaxRequest("damn it RadSplitter!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
        }
 
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div style="display: none;">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadWindow ID="RadWindowPageLoad" AutoSize="false" Skin="Simple" Modal="true"
            Overlay="true" VisibleTitlebar="true" Title="Processing..." Behaviors="None"
            VisibleStatusbar="false" Width="400" Height="200" runat="server" Style="position: absolute;
            z-index: 9000;">
            <ContentTemplate>
                <div style="margin-top: 55px; text-align: center; vertical-align: middle;">
                    <asp:Image ID="ImagePageLoading" runat="server" />
                </div>
            </ContentTemplate>
        </telerik:RadWindow>
    </div>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <ClientEvents OnRequestStart="OnRequestStart" OnResponseEnd="OnResponseEnd" />
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="DefaultRadMenu">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="DefaultRadSplitter1" UpdatePanelHeight="100%" />
                    <telerik:AjaxUpdatedControl ControlID="hiddenfields" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="DefaultRadSplitter1" UpdatePanelHeight="100%" />
                    <telerik:AjaxUpdatedControl ControlID="hiddenfields" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadSplitter runat="server" ID="DefaultRadSplitter1" Orientation="Horizontal"
        OnClientResized="OnClientResized" Width="100%" Height="100%">
        <telerik:RadPane runat="server" ID="DefaultHeader" Height="60" CssClass="DefaultHeaderCss"
            Scrolling="None">
            <div style="height: 100%; width: 100%; background-color: Gray;">
                <telerik:RadMenu ID="DefaultRadMenu" runat="server" EnableShadows="true">
                    <Items>
                        <telerik:RadMenuItem Text="first menu" Value="first menu" PostBack="false">
                            <Items>
                                <telerik:RadMenuItem Text="first menu1" Value="WebUserControl1" />
                            </Items>
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem IsSeparator="true" />
                        <telerik:RadMenuItem Text="second menu" Value="second menu" PostBack="false">
                            <Items>
                                <telerik:RadMenuItem Text="second menu1" Value="WebUserControl2" />
                            </Items>
                        </telerik:RadMenuItem>
                    </Items>
                </telerik:RadMenu>
            </div>
        </telerik:RadPane>
        <telerik:RadPane runat="server" ID="DefaultTab" Height="30">
            <telerik:RadTabStrip runat="server" ID="DefaultRadTabStrip" MultiPageID="DefaultMultiPage"
                OnClientTabSelected="OnClientTabSelected" OnClientTabSelecting="OnClientTabSelecting">
                <TabTemplate>
                    <asp:Label ID="LabelTabName" runat="server" Text='<%# DataBinder.Eval(Container, "Text") %>' />
                    <span class="ie6shim"></span>
                </TabTemplate>
            </telerik:RadTabStrip>
        </telerik:RadPane>
        <telerik:RadPane runat="server" ID="DefaultContents" Width="100%" Height="100%" Scrolling="None">
            <telerik:RadMultiPage runat="server" ID="DefaultMultiPage">
            </telerik:RadMultiPage>
        </telerik:RadPane>
        <telerik:RadPane runat="server" ID="DefaultFooter" Height="30">
            <div style="height: 100%; width: 100%; background-color: Gray">
                Footer</div>
        </telerik:RadPane>
    </telerik:RadSplitter>
    <asp:Panel runat="server" ID="hiddenfields">
        <asp:HiddenField runat="server" ID="UserControl1Splitter" />
        <asp:HiddenField runat="server" ID="UserControl2Splitter" />
    </asp:Panel>
    </form>
</body>
</html>
