Tab pages DHTML IE

<%@ Page CodeBehind=”test.aspx.cs” Language=”c#” AutoEventWireup=”false” Inherits=”SLK.RTS.Web.test” %>

<HTML>

            <HEAD>

                        <script language=”javascript”>

                                    function TabClick( nTab )

                                   {          nTab = parseInt(nTab);

                                                var oTab;

                                                var prevTab = nTab-1;

                                                var nextTab = nTab+1;

                                                event.cancelBubble = true;

                                                el = event.srcElement;

                                                for (var i = 0; i < TabPage.length; i++)

                                                {                     

                                                                oTab = Tab[i];

                                                            oTab.className = “clsTab”;

                                                            oTab.style.borderLeftStyle = “”;

                                                            oTab.style.borderRightStyle = “”;

                                                            TabPage[i].style.display = “none”;

                                                }

                                                TabPage[nTab].style.display = “block”;

                                                Tab[nTab].className = “TabSelected”;

                                                oTab = Tab[nextTab];

                                                if (oTab) oTab.style.borderLeftStyle = “none”;

                                                            oTab = Tab[prevTab];

                                                if (oTab) oTab.style.borderRightStyle = “none”;

                                                            event.returnValue = false;

                                                document.getElementById(‘hdnTabSelected’).value = nTab;

                                    }

                                                           

                                    function BodyOnLoad()

                                    {

                                                if(document.getElementById(‘hdnTabSelected’).value!=null)

                                                            TabClick(document.getElementById(‘hdnTabSelected’).value);                                                                  

                                    }

                                    </script>

       <LINK rel=”stylesheet” type=”text/css” href=”http://localhost/RTS/Includes/Style.css”>

       </HEAD>

        <body onload=’BodyOnLoad();’>

            <form runat=”server”>

                <TABLE id=”Table1″ cellSpacing=”0″ cellPadding=”0″ width=”300″ border=”0″>

                    <TR>

                        <td>

                           <input type=”hidden” id=”hdnTabSelected” value=”0″ runat=”server”>

                          </td>

                          <TD id=”Tab” onclick=”TabClick(’0′);”>A</TD>

                           <TD id=”Tab” onclick=”TabClick(’1′);”>B</TD>

                           <TD id=”Tab” onclick=”TabClick(’2′);”>C</TD>

                      </TR>

                  </TABLE>

                   <table id=”TabPage” class=”TabPage”>

                      <TR>

                          <td>Page1

                                           <asp:Button id=”Button1″ runat=”server” Text=”Button”/>&nbsp;

                                            <asp:DropDownList id=”DropDownList1″ runat=”server”/>

                            </td>

                        </tr>

                     </table>

                     <table id=”TabPage” class=”TabPage”>

                              <tr>

                                <td>

                                    Page2

                                </td>

                            </tr>

                        </table>

                        <table id=”TabPage” class=”TabPage”>

                                      <tr>

                                      <td>Page3

                                  </td>

                              </tr>

                        </table>

                        </form>

            </body>

</HTML>