<%@ Control Language="VB" AutoEventWireup="false" CodeFile="BrowseSupport.ascx.vb"
    Inherits="Controls_BrowseSupport" %>
<%@ Register Src="../Controls/CustomContent.ascx" TagName="CustomContent" TagPrefix="uc" %>
<script type="text/javascript" src="../Scripts/tooltip.js"></script>
<asp:Panel ID="SupportTopRequestWithAskAQuestion" runat="server" Visible="false">
    <asp:Literal ID="ltrContentSupportTopRequestContent" runat="server"></asp:Literal>
</asp:Panel>
<!-- This is the old control and it needs the javascript becasue in the new one we moved it 
to the content and this uses a  diffrent content -->
<asp:Panel ID="SupportTopRequestOnly" Visible="true" runat="server">
<script language="javascript" type="text/javascript">
    function fnDisplay(type)
        {
          
           var objVideo,objInternet,objTelephone,objMail,objOnlineSecurity,objAccount,objList;
           objVideo = document.getElementById("dvQuickLinks_Video");
           objInternet = document.getElementById("dvQuickLinks_Internet");
           objTelephone = document.getElementById("dvQuickLinks_Telephone");
           objMail = document.getElementById("dvQuickLinks_Email");
           objOnlineSecurity = document.getElementById("dvQuickLinks_OnlineSecurity");
           objAccount = document.getElementById("dvQuickLinks_Account");

           objList = document.getElementById("selCategory");
           
           if(objVideo != null)
           {            
            objVideo.style.display = "none";
            objInternet.style.display = "none";
            objTelephone.style.display = "none";
            objMail.style.display = "none";
            objOnlineSecurity.style.display = "none";
            objAccount.style.display = "none";
            
            switch (type) 
                {
                case 'cable': 
                    objVideo.style.display = "block";
                    objList.options[0].selected = "selected"; 
                    break;
                case 'account': 
                    objAccount.style.display = "block";
                    objList.options[3].selected = "selected"; 
                    break;
                 case 'email': 
                    objMail.style.display = "block";
                    objList.options[1].selected = "selected";
                    break;
                 case 'telephone': 
                    objTelephone.style.display = "block";
                    objList.options[5].selected = "selected";
                    break;
                 case 'onlinesecurity': 
                    objOnlineSecurity.style.display = "block";
                    objList.options[4].selected = "selected";
                    break;                    
                 default: 
                    objInternet.style.display = "block";
                    objList.options[2].selected = "selected";
                    break;
                }
        
             }
        }
        
     function fnDisplayHelpfulLinks(type)
        {
           var obj;
            
            fnHideHelpfulLinks();
            
                    
             obj = eval("document.getElementById('dvHelpfulLinks_" + type + "')");
               if(obj != null)
               {     
                   try
                    {       
                        obj.style.display = "block";
                    }
                catch(e)
                    {
                        
                    }
               }
            
                else
               {     
                   obj = document.getElementById('dvHelpfulLinks_default');
                   try
                    {       
                        obj.style.display = "block";
                    }
                catch(e)
                    {
                    }
               }

        }
        
        
          function fnHideHelpfulLinks()
            {
                  var i,string1,objCategory;
                  var myRegExp = /(dvHelpfulLinks)/;
                  var matchPos1;
                  var expandable = document.getElementsByName("dvHelpfulLinks");
                  
                  if ((expandable != null) && (expandable.length > 0))
                     {
                        for(i=0; i<expandable.length; i++)
                             {
                                try
                                    {
                                       objCategory = eval("document.getElementById('" + expandable[i].id + "')");
                                       if(objCategory != null)
                                       {            
                                        objCategory.style.display = "none";
                                       }
                                    }
                                catch(e)
                                    {
                                     
                                    }
                                }
                       }
                       else
                       {
                            for(i=0; i<document.all.length; i++)
                                {
                                if(document.all(i).id != null)
                                    {
                                      string1 =   document.all(i).id;
                                      matchPos1 = string1.search(myRegExp)
                                      if(matchPos1 != -1)
                                        {
                                            try
                                                {
                                                    document.all(i).style.display = "none";
                                                }
                                            catch(e)
                                                {
                                                    alert(e.message);
                                                }
                                        }
                                    }
                                }
                      }
            } 
            
        
        function fnOpen(val)
        {
           try
            {       
                var objCategory = document.getElementById(val); 
        		var topic = $(objCategory).parents(".expandingTopic");

        		topic.toggleClass("expanded");
		        topic.hasClass("expanded") ? topic.children("div:first").show() : topic.children("div:first").hide();
		        topic.parent().children(".expandingTopic").length == topic.parent().children(".expandingTopic.expanded").length ? $(".expandAllTopicBtn").addClass("collapseState") : $(".expandAllTopicBtn").removeClass("collapseState");
            }
           catch(e)
            {
            }
        }
        
        function fnExpandAll()
            {
                  var i,string1,objCategory;
                  var myRegExp = /(dv)*(Expand)/;
                  var matchPos1;
                  var expandable = document.getElementsByName("dvExpandable");
                  
                  if ((expandable != null) && (expandable.length > 0))
                     {
                        for(i=0; i<expandable.length; i++)
                             {
                                try
                                    {
                                       objCategory = eval("document.getElementById('" + expandable[i].id + "')");
                                       if(objCategory != null)
                                       {            
                                        objCategory.onclick();
                                       }
                                    }
                                catch(e)
                                    {
                                     alert(e.message)
                                    }
                                }
                       }
                       else
                       {
                            for(i=0; i<document.all.length; i++)
                                {
                                if(document.all(i).id != null)
                                    {
                                      string1 =   document.all(i).id;
                                      matchPos1 = string1.search(myRegExp)
                                      if(matchPos1 != -1)
                                        {
                                            try
                                                {
                                                    document.all(i).click();
                                                }
                                            catch(e)
                                                {
                                                    
                                                }
                                        }
                                    }
                                }
                      }
            } 
       
       function fnCollapseAll()
            {
                  var i,string1,objCategory;
                  var myRegExp = /(dv)*(Collapse)/;
                  var matchPos1;
                  var expandable = document.getElementsByName("dvCollapsable");
                  
                  if ((expandable != null) && (expandable.length > 0))
                     {
                        for(i=0; i<expandable.length; i++)
                             {
                                try
                                    {
                                       objCategory = eval("document.getElementById('" + expandable[i].id + "')");
                                       if(objCategory != null)
                                       {            
                                        objCategory.onclick();
                                       }
                                    }
                                catch(e)
                                    {
                                     
                                    }
                                }
                       }
                       else
                       {
                            for(i=0; i<document.all.length; i++)
                                {
                                if(document.all(i).id != null)
                                    {
                                      string1 =   document.all(i).id;
                                      matchPos1 = string1.search(myRegExp)
                                      if(matchPos1 != -1)
                                        {
                                            try
                                                {
                                                    document.all(i).click();
                                                }
                                            catch(e)
                                                {
                                                    
                                                }
                                        }
                                    }
                                }
                      }
            } 
            

</script>
    <div class="roundedFlexible">
        <div id="gray" class="roundedTopLeft">
            <div id="gray" class="roundedTopRight">
                <div id="gray" class="roundedBotRight">
                    <div id="gray" class="roundedBotLeft">
                        <h2>
                            Top Requests:</h2>
                        <div class="solidRoundedGray">
                            <div class="solidRoundedTop">
                                <div>
                                </div>
                            </div>
                            <div id="selectcategory" style="padding-left: 5px;">
                                Please choose a category:
                                <table border="0">
                                    <tr>
                                        <td>
                                            <select id="selCategory" onchange="javascript:fnDisplay(this.value)">
                                                <option value="cable">Cable</option>
                                                <option value="email">E-Mail</option>
                                                <option selected="selected" value="internet">Internet</option>
                                                <option value="account">My Account & Billing</option>
                                                <option value="onlinesecurity">Online Security</option>
                                                <option value="telephone">Telephone</option>
                                            </select>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <div id="solidRoundedContent">
                                <asp:Literal ID="ltrContent" runat="server"></asp:Literal>
                            </div>
                            <div class="solidRoundedBot">
                                <div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Panel>
