using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class UserControls_ABCD : System.Web.UI.UserControl
{
    //*********************************
    private static int selected = -1;
    //*********************************
    protected void btnA_Click(object sender, EventArgs e)
    {
        try
        {
            selected = 1;
            btnA.CssClass = "abcdokitem";
            btnB.CssClass = "abcditem";
            btnC.CssClass = "abcditem";
            btnD.CssClass = "abcditem";
        }
        catch
        {
        }
    }
    protected void btnB_Click(object sender, EventArgs e)
    {
        try
        {
            selected = 2;
            btnA.CssClass = "abcditem";
            btnB.CssClass = "abcdokitem";
            btnC.CssClass = "abcditem";
            btnD.CssClass = "abcditem";
        }
        catch
        {
        }
    }
    protected void btnC_Click(object sender, EventArgs e)
    {
        try
        {
            selected = 3;
            btnA.CssClass = "abcditem";
            btnB.CssClass = "abcditem";
            btnC.CssClass = "abcdokitem";
            btnD.CssClass = "abcditem";
        }
        catch
        {
        }
    }
    protected void btnD_Click(object sender, EventArgs e)
    {
        try
        {
            selected = 4;
            btnA.CssClass = "abcditem";
            btnB.CssClass = "abcditem";
            btnC.CssClass = "abcditem";
            btnD.CssClass = "abcdokitem";
        }
        catch
        {
        }
    }

    public static int SelectedIndex
    {
        get
        {
            return selected;
        }
    }

    public void ClearSelection()
    {
        try
        {
            selected = -1;
            btnA.CssClass = "abcditem";
            btnB.CssClass = "abcditem";
            btnC.CssClass = "abcditem";
            btnD.CssClass = "abcditem";
        }
        catch
        {
        }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!Page.IsPostBack)
            {
                selected = -1;
            }
        }
        catch
        {
        }
    }
}
