Partial Class Visitors_NonProducts
    Inherits CharterCMSPage


	Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        MyBase.SetTemplate(2)
        Dim _menuItem As MenuItem
		Dim _productItem As ProductItem
		Dim _nonProductItem As NonProductItem

    If Not IsPostBack Then

            Dim d As DateTime = CachedControls.getExpireDate()

      If HttpContext.Current.Cache.Item("Template2") Is Nothing Then
        HttpContext.Current.Cache.Insert("Template2", DateTime.Now, Nothing, d, System.TimeSpan.Zero, System.Web.Caching.CacheItemPriority.NotRemovable, Nothing)
      End If

      Response.AddCacheItemDependency("Template2") 'CacheKey.OutputCacheDurationKey)

      If Application(Request.Url.LocalPath) Is Nothing Then
        Application.Add(Request.Url.LocalPath, "Template2")
      End If

      If Not (Request.QueryString(QueryStringName.NonProductItem) Is Nothing) Then
        _nonProductItem = CType(Request.QueryString(QueryStringName.NonProductItem), NonProductItem)

        Select Case _nonProductItem
          Case NonProductItem.InternetServices
            _productItem = ProductItem.Internet
            _menuItem = MenuItem.Internet
          Case NonProductItem.InternetCharterNet
            _productItem = ProductItem.Internet
            _menuItem = MenuItem.Internet
          Case NonProductItem.InternetMail
            _productItem = ProductItem.Internet
            _menuItem = MenuItem.Internet
          Case NonProductItem.InternetWebSpace
            _productItem = ProductItem.Internet
            _menuItem = MenuItem.Internet
          Case NonProductItem.InternetSecurity
            _productItem = ProductItem.Internet
            _menuItem = MenuItem.Internet
          Case NonProductItem.SystemRequirements
            _productItem = ProductItem.Internet
            _menuItem = MenuItem.Internet
          Case NonProductItem.TestYourComputer
            _productItem = ProductItem.Internet
            _menuItem = MenuItem.Internet
          Case NonProductItem.HomeNetworking
            _productItem = ProductItem.Internet
            _menuItem = MenuItem.Internet
          Case NonProductItem.TelephoneServices, NonProductItem.TelephoneIntlCalling
            _productItem = ProductItem.Telephone
            _menuItem = MenuItem.Telephone
        End Select

                'ucHeader.SelectedItem = _menuItem
        ucLocalNavigation.Item = _menuItem
        ucLocalNavigation.SubItem2 = _nonProductItem
        ucContactUs.Item = _menuItem
        If Request.QueryString(QueryStringName.Section) Is Nothing Then
          ucCustomContent2.ContentKey = _nonProductItem.ToString() & ":Body"
        Else
          If Not (Request.QueryString(QueryStringName.NonProductItem) Is Nothing) AndAlso _nonProductItem = NonProductItem.TelephoneIntlCalling Then
            Select Case Request.QueryString(QueryStringName.Section)
              Case "1"
                ucCustomContent2.ContentKey = NonProductItem.TelephoneIntlCallingAsia.ToString & ":Body"
              Case "2"
                ucCustomContent2.ContentKey = NonProductItem.TelephoneIntlCallingMexico.ToString & ":Body"
              Case Else
                ucCustomContent2.ContentKey = _nonProductItem.ToString() & ":Body"
            End Select
          Else
            ucCustomContent2.ContentKey = _nonProductItem.ToString() & ":Body"
          End If
        End If
        ucSupport.Item = _productItem
        ucSupport.Mode = SupportMode.SingleProduct
      End If
    End If
	End Sub
End Class
