<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %>

<!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">
<spb:Header ID="Header1" runat="server">
    <spb:Script runat="server" ID="jquery" Src="~/Utility/jquery/jquery.min-1.4.2.js"
        SetExpireDays="30" />
    <spb:Script runat="server" ID="cookie" Src="~/Utility/jquery/plugin/jquery.cookie.js"
        SetExpireDays="30" />
    <spb:Script runat="server" ID="core" Src="~/Utility/jquery/ui.core.min-1.8.12.js"
        SetExpireDays="30" />
    <spb:Script runat="server" ID="widget" Src="~/Utility/jquery/ui.widget.min-1.8.12.js"
        SetExpireDays="30" />
    <spb:Script runat="server" ID="nyroModal" Src="~/Utility/jquery/plugin/jquery.nyroModal-1.6.2.min.js"
        SetExpireDays="30" />
    <spb:Script runat="server" ID="tabs" Src="~/Utility/jquery/ui.tabs.min-1.8.12.js"
        SetExpireDays="30" />
    <spb:Script runat="server" ID="superfish" Src="~/Utility/jquery/plugin/jquery.superfish-1.4.8.js"
        SetExpireDays="30" />
    <spb:Script runat="server" ID="menuButton" Src="~/Utility/jquery/plugin/jquery.spb.menuButton.js"
        SetExpireDays="30" />
    <spb:Script runat="server" ID="watermarkinput" Src="~/Utility/jquery/plugin/jquery.watermarkinput.js" />
    <spb:Script runat="server" ID="validate" Src="~/Utility/jquery/plugin/jquery.validate-1.7.js"
        SetExpireDays="30" />
    <spb:Script runat="server" ID="global" Src="~/Utility/tunynet_web_ui/global.js" />
    
</spb:Header>
<%string userDomainName = Html.GetParameterFromRouteDateOrQueryString("UserDomainName");
  User currentUser = Users.GetUser(userDomainName, false);
  bool isManage = false;
  if (Globals.GetCurrentUser() != null && currentUser.UserID == Globals.GetCurrentUser().UserID )//|| Globals.GetCurrentUser().IsContentAdministrator)
      isManage = true;  %>
<body <asp:ContentPlaceHolder runat="server" ID="setPageID" />  class="<%if (isManage) Response.Write("tn-page-bg spb-personal-page"); else Response.Write("tn-page-bg spb-guest-page"); %>">
    <div id="tn-doc" class="tn-doc-bg">
        <div id="tn-header" class="tn-header-bg">
            <div class="tn-wrapper tn-helper-clearfix">
                <%  Html.RenderPartial("Controls/Header.ascx", ViewData); %>
            </div>
        </div>
        <div id="tn-content" class="tn-content-bg tn-doc2">
            <div class="tn-wrapper">
                <div class="tn-grid">
                    <%
                        if (isManage)
                        {
                            ViewData["ApplicationID"] = ApplicationIDs.Instance().News();
                            Html.RenderPartial("Controls/ApplicationMenu.ascx");
                        } %>
                    <div class="tn-grid">
                        <div class="spb-main">
                            <div class="spb-head">
                            <%if(!isManage)
                                  Html.RenderPartial("Controls/SubMenu.ascx"); %>
                            </div>
                            <div class="spb-body">
                                <asp:ContentPlaceHolder runat="server" ID="wideContentRegion">
                                <div class="tn-grid">
                                    <asp:ContentPlaceHolder runat="server" ID="wideContent">
                                        <div class="tn-wrapper tn-template-r-170 tn-helper-clearfix">
                                            <div class="tn-main">
                                                <div class="tn-block">
                                                    <asp:ContentPlaceHolder runat="server" ID="manageContent" />
                                                </div>
                                            </div>
                                            <div class="tn-block">
                                                <asp:ContentPlaceHolder runat="server" ID="manageMenusContent" />
                                            </div>
                                        </div>
                                    </asp:ContentPlaceHolder>
                                    </div>

                                </asp:ContentPlaceHolder>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="tn-footer-bg" id="tn-footer">
            <div class="tn-wrapper">
                <% Html.RenderPartial("Controls/Footer.ascx"); %>
            </div>
        </div>
    </div>
</body>
</html>
