function AddHeading($HeadingName, $Link, $web)
{
    $CreateSPNavigationNode = [Microsoft.SharePoint.Publishing.Navigation.SPNavigationSiteMapNode]::CreateSPNavigationNode

    $pubWeb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($web)
    $qlNav = $pubWeb.Navigation.CurrentNavigationNodes

    $headingNode = $CreateSPNavigationNode.Invoke($HeadingName, $Link, [Microsoft.SharePoint.Publishing.NodeTypes]::Heading, $qlNav)
    $web.Update()
}