<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="UI.SiteMaster" %>

<%@ Register Src="~/Controls/Header.ascx" TagName="Header" TagPrefix="uc1" %>
<%@ Register Src="~/Controls/Footer.ascx" TagName="Footer" TagPrefix="uc2" %>
<!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>
    <asp:ContentPlaceHolder ID="HeadContent" runat="server">
    </asp:ContentPlaceHolder>
    <script language="javascript" type="text/javascript">
        function openRadWin(page, windowName) {
            radopen(page, windowName);
        }
    </script>
</head>
<body>

    <div id="page">
        <form id="Form1" runat="server">
            <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
                <script type="text/javascript">
                    function RequestStart(sender, args) {
                        try {
                            if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0 ||
                                    args.get_eventTarget().indexOf("ExportToWordButton") >= 0 ||
                                    args.get_eventTarget().indexOf("ExportToPdfButton") >= 0) {

                                args.set_enableAjax(false);

                                document.getElementById("loadTest").style.visibility = "hidden";
                            }
                            else {
                                document.getElementById("loadTest").style.visibility = "visible";
                            }
                        }
                        catch (ex) {
                            alert(ex);
                        }
                    }

                </script>
            </telerik:RadCodeBlock>
            <telerik:RadWindowManager ID="siteRadWindowManager" runat="server" EnableShadow="true">
                <Windows>
                    <telerik:RadWindow ID="AddVisit" runat="server" ShowContentDuringLoad="false" Width="590px" Modal="true"
                        Height="700px" Title="<%$ Resources:Res, Add_Visits%>" Behaviors="Close" Animation="Fade" EnableShadow="true">
                    </telerik:RadWindow>
                    <telerik:RadWindow ID="EditCustomer" runat="server" ShowContentDuringLoad="false" Width="590px" Modal="true"
                        Height="500px" Title="<%$ Resources:Res, Edit_Customer%>" Behaviors="Close"  Animation="Fade" EnableShadow="true">
                    </telerik:RadWindow>
                    <telerik:RadWindow ID="AddCustomer" runat="server" ShowContentDuringLoad="false" Width="590px" Modal="true"
                        Height="500px" Title="<%$ Resources:Res, Add_Customer%>" Behaviors="Close"  Animation="Fade" EnableShadow="true">
                    </telerik:RadWindow>
                    <telerik:RadWindow ID="EditContact" runat="server" ShowContentDuringLoad="false" Width="590px" Modal="true"
                        Height="475px" Title="<%$ Resources:Res, Edit_Contact%>" Behaviors="Close"  Animation="Fade" EnableShadow="true">
                    </telerik:RadWindow>
                    <telerik:RadWindow ID="AddUser" runat="server" ShowContentDuringLoad="false" Width="590px" AutoSize="true" Modal="true"
                        AutoSizeBehaviors="Height" Title="<%$ Resources:Res, Add_User%>" Behaviors="Close"  Animation="Fade" EnableShadow="true">
                    </telerik:RadWindow>
                    <telerik:RadWindow ID="EditUser" runat="server" ShowContentDuringLoad="false" Width="590px" AutoSize="true" Modal="true"
                        AutoSizeBehaviors="Height" Title="<%$ Resources:Res, Edit_User%>" Behaviors="Close"  Animation="Fade" EnableShadow="true">
                    </telerik:RadWindow>
                    <telerik:RadWindow ID="ViewContacts" runat="server" ShowContentDuringLoad="false" Width="700px" Modal="true"
                        Height="600px" Title="<%$ Resources:Res, Contacts%>" Behaviors="Close"  Animation="Fade" EnableShadow="true">
                    </telerik:RadWindow>
                </Windows>
            </telerik:RadWindowManager>
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server" AsyncPostBackTimeout="36000">
                <Scripts>
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
                </Scripts>
            </telerik:RadScriptManager>
            <telerik:RadAjaxManager ID="RadAjaxManager1" DefaultLoadingPanelID="RadAjaxLoadingPanel1"
                runat="server">
                <ClientEvents OnRequestStart="RequestStart" />
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadAjaxPanel1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="MainContent" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>
            <div id="loadTest">
                <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="css" EnableEmbeddedSkins="false"
                    IsSticky="true" Style="position: absolute; top: 0; left: 0; height: 100%; width: 100%">
                    Loading...
                </telerik:RadAjaxLoadingPanel>
            </div>
            <div id="header">
                <uc1:Header ID="headerUserControl" runat="server" />
            </div>
            <!-- #header -->
            <div id="main">
                <div id="content">
                    <div style="width: 90%">
                        <telerik:RadAjaxPanel ID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1" runat="server">
                            <asp:ContentPlaceHolder ID="MainContent" runat="server">
                            </asp:ContentPlaceHolder>
                        </telerik:RadAjaxPanel>
                    </div>
                </div>
            </div>
            <div class="push">
                <!--Sticky Footer Push-->
            </div>
        </form>
    </div>

    <div id="footer">
        <uc2:Footer ID="footerUserControl" runat="server" />
    </div>

    <!-- #footer -->


</body>
</html>
