/// <summary>
        /// Read Current Page sub-tabs
        /// </summary>
        /// <param name="pageId">
        /// The page ID.
        /// </param>
        /// <returns>
        /// A Pages Box
        /// </returns>
        public static Collection<PageStripDetails> GetPageSettingsPagesBox(int pageId)
        {
            // Create Instance of Connection and Command Object
            using (var connection = Config.SqlConnectionString)
            using (var command = new SqlCommand("rb_GetTabSettings", connection))
            {
                // Mark the Command as a SPROC
                command.CommandType = CommandType.StoredProcedure;

                // PageID passed type FIXED by Bill Anderson (reedtek)
                // see: http://sourceforge.net/tracker/index.php?func=detail&aid=813789&group_id=66837&atid=515929
                // Add Parameters to SPROC
                var parameterPageId = new SqlParameter("@PageID", SqlDbType.Int) { Value = pageId };
                command.Parameters.Add(parameterPageId);

                // The new parameter "PortalLanguage" has been added to sp rb_GetPageSettings
                // Onur Esnaf
                var parameterPortalLanguage = new SqlParameter("@PortalLanguage", SqlDbType.NVarChar, 12)
                    {
                       Value = Thread.CurrentThread.CurrentUICulture.Name
                    };
                command.Parameters.Add(parameterPortalLanguage);

                // Open the database connection and execute the command
                connection.Open();

                using (var result = command.ExecuteReader(CommandBehavior.CloseConnection))
                {
                    var tabs = new Collection<PageStripDetails>();

                    try
                    {
                        while (result.Read())
                        {
                            var tabDetails = new PageStripDetails { PageID = (int)result["PageID"] };
                            var cts = new PageSettings().GetPageCustomSettings(tabDetails.PageID);
                            tabDetails.PageImage = cts["CustomMenuImage"].ToString();
                            tabDetails.ParentPageID = Int32.Parse("0" + result["ParentPageID"]);
                            tabDetails.PageName = (string)result["PageName"];
                            tabDetails.PageOrder = (int)result["PageOrder"];
                            tabDetails.AuthorizedRoles = (string)result["AuthorizedRoles"];
                            tabs.Add(tabDetails);
                        }
                    }
                    finally
                    {
                        // by Manu, fixed bug 807858
                        result.Close();
                    }

                    return tabs;
                }
            }
        }
 /// <summary>
 /// The GetRootPage should get the first level tab:
 ///   <pre>
 ///     + Root
 ///     + Page1
 ///     + SubPage1   -&gt; returns Page1
 ///     + Page2
 ///     + SubPage2   -&gt; returns Page2
 ///     + SubPage2.1 -&gt; returns Page2
 ///   </pre>
 /// </summary>
 /// <param name="tab">
 /// The tab.
 /// </param>
 /// <param name="tabList">
 /// The tab list.
 /// </param>
 /// <returns>
 /// </returns>
 /// <remarks>
 /// </remarks>
 public static PageStripDetails GetRootPage(PageSettings tab, List<PageStripDetails> tabList)
 {
     return GetRootPage(tab.PageID, tabList);
 }
        /// <summary>
        /// Gets the bread crumbs.
        /// </summary>
        /// <param name="tab">The tab.</param>
        /// <param name="tabList">The tab list.</param>
        /// <returns></returns>
        private ArrayList GetBreadCrumbs(PageSettings tab, ArrayList tabList)
        {
            int parentTabID = tab.PageID;
            int test = tab.PageID;

            ArrayList _breadCrumbsText = new ArrayList();

            PageItem myTabItem = new PageItem();
            myTabItem.ID = tab.PageID;
            myTabItem.Name = tab.PageName;
            myTabItem.Order = tab.PageOrder;

            _breadCrumbsText.Add(myTabItem);

            //Search for the root tab in current array
            PageStripDetails rootTab;

            for (int i = 0; i < tabList.Count; i++)
            {
                rootTab = (PageStripDetails) tabList[i];

                if (rootTab.PageID == parentTabID)
                {
                    parentTabID = rootTab.ParentPageID;
                    if (test != rootTab.PageID)
                    {
                        PageItem myItem = new PageItem();
                        myItem.ID = rootTab.PageID;
                        myItem.Name = rootTab.PageName;
                        myItem.Order = rootTab.PageOrder;
                        _breadCrumbsText.Add(myItem);
                    }
                    if (parentTabID != 0)
                        i = -1;
                    else
                        return _breadCrumbsText;
                }
            }
            return _breadCrumbsText;
        }