private void iInstallQuickLaunch(XmlNode docFiles)
        {
            var appNod = appDef.ApplicationXml.FirstChild.SelectSingleNode("Application");

            if (appNod != null)
            {
                var ndQuickLaunch = appNod.SelectSingleNode("QuickLaunch");
                var ndTopNav      = appNod.SelectSingleNode("TopNav");

                if (ndQuickLaunch != null || ndTopNav != null)
                {
                    var NavParentMessageId = 0;

                    if (bVerifyOnly)
                    {
                        NavParentMessageId = addMessage(0, "Checking Navigation", string.Empty, 0);
                    }
                    else
                    {
                        NavParentMessageId = addMessage(0, "Installing Navigation", string.Empty, 0);
                    }

                    float       max                = 0;
                    XmlNodeList ndTopNavItems      = null;
                    XmlNodeList ndQuickLaunchItems = null;
                    try
                    {
                        ndQuickLaunchItems = ndQuickLaunch.SelectNodes("Item");
                        max += ndQuickLaunchItems.Count;
                    }
                    catch (Exception ex)
                    {
                        Trace.WriteLine(ex.ToString());
                    }
                    try
                    {
                        ndTopNavItems = ndTopNav.SelectNodes("Item");
                        max          += ndTopNavItems.Count;
                    }
                    catch (Exception ex)
                    {
                        Trace.WriteLine(ex.ToString());
                    }

                    float counter = 0;

                    var arrTopNavNavNodes      = new ArrayList();
                    var arrQuickLaunchNavNodes = new ArrayList();

                    if (ndQuickLaunch != null)
                    {
                        var ParentMessageId = addMessage(0, "QuickLaunch", string.Empty, NavParentMessageId);

                        counter = iInstallNavigationItem(oWeb.Navigation.QuickLaunch, ndQuickLaunchItems, ParentMessageId, docFiles, counter, max,
                                                         "QuickLaunch", null, ref arrQuickLaunchNavNodes);
                    }

                    if (ndTopNav != null)
                    {
                        var ParentMessageId = addMessage(0, "TopNav", string.Empty, NavParentMessageId);

                        counter = iInstallNavigationItem(oWeb.Navigation.TopNavigationBar, ndTopNavItems, ParentMessageId, docFiles, counter, max,
                                                         "TopNav", null, ref arrTopNavNavNodes);
                    }
                    //}

                    if (!bVerifyOnly)
                    {
                        if (iCommunity != 0)
                        {
                            var oLiCommunity = oAppList.GetItemById(iCommunity);

                            var arrCurQuickLaunch = new ArrayList();
                            var arrCurTopNav      = new ArrayList();
                            try
                            {
                                arrCurQuickLaunch = new ArrayList(oLiCommunity["QuickLaunch"].ToString().Split(','));
                            }
                            catch (Exception ex)
                            {
                                Trace.WriteLine(ex.ToString());
                            }
                            try
                            {
                                arrCurTopNav = new ArrayList(oLiCommunity["TopNav"].ToString().Split(','));
                            }
                            catch (Exception ex)
                            {
                                Trace.WriteLine(ex.ToString());
                            }

                            arrCurQuickLaunch.AddRange(arrQuickLaunchNavNodes);
                            arrCurTopNav.AddRange(arrTopNavNavNodes);


                            oLiCommunity["QuickLaunch"] = string.Join(",", (string[])arrCurQuickLaunch.ToArray(typeof(string)));
                            oLiCommunity["TopNav"]      = string.Join(",", (string[])arrCurTopNav.ToArray(typeof(string)));
                            oLiCommunity.Update();

                            Applications.CreateQuickLaunchXML(oLiCommunity.ID, oWeb);
                            Applications.CreateTopNavXML(oLiCommunity.ID, oWeb);
                        }
                        else
                        {
                            oListItem["QuickLaunch"] = string.Join(",", (string[])arrQuickLaunchNavNodes.ToArray(typeof(string)));
                            oListItem["TopNav"]      = string.Join(",", (string[])arrTopNavNavNodes.ToArray(typeof(string)));
                            oListItem.Update();

                            Applications.CreateQuickLaunchXML(oListItem.ID, oWeb);
                            Applications.CreateTopNavXML(oListItem.ID, oWeb);
                        }
                    }
                }
            }
        }