function HandleInputElements(DDLId, TXTId, DDButtonCss, TXTCSS) {
    var ListControl = "";
    var DDControlHtml = "";
    var ListControlMarkup = "";
    var DDText = "";
    var DDLControl = "";
    //Dropdown list

    ListControl = $(this).find("ul");
    // ListControl.hide();

    DDLControl = document.getElementById(DDLId);
    document.getElementById(TXTId).value = DDLControl.options[DDLControl.selectedIndex].text;


    $("." + DDButtonCss).click(function() {
        DDControlHtml = "";
        ListControlMarkup = "<ul>";

        if ($(this).parent().find("ul").length < 1) {
            $(this).parent().find("select").children().each(function() {
                DDControlHtml = DDControlHtml + "<li><a href='#'>" + $(this).html() + "</a></li>";
            });
            ListControlMarkup = ListControlMarkup + DDControlHtml + "</ul>";
            $(this).parent().append(ListControlMarkup);
        }

        ListControl = $(this).parent().find("ul");
        DDText = $(this).parent().find("." + TXTCSS);

        ListControl.toggle();
        ListControl.css({ top: DDText.offset().top + DDText.height() + 6 + "px", left: DDText.offset().left + "px" });

        ListControl.children().each(function() {
            $(this).click(function() {
                DDLControl = document.getElementById(DDLId);
                DDText.attr("value", HtmlDecode($(this).find("a").html()));

                for (var i = 0; i < DDLControl.options.length; i++) {
                    {
                        DDLControl.options[i].text = HtmlDecode(DDLControl.options[i].text);
                        if (DDLControl.options[i].text == DDText.attr("value")) {
                            DDLControl.options[i].selected = true;
                            break
                        }
                    }
                }

                ListControl.hide();
                setTimeout('__doPostBack(\'' + DDLId + '\',\'\')', 0);
            });
            $(".Dropdown").hover(function() { }, function() { ListControl.hide(); });
            $(".DropdownCareers").hover(function() { }, function() { ListControl.hide(); });
            $(".DropdownMedia").hover(function() { }, function() { ListControl.hide(); });
        });
    });

    $("." + TXTCSS).click(function() {
        DDControlHtml = "";
        ListControlMarkup = "<ul>";

        if ($(this).parent().find("ul").length < 1) {
            $(this).parent().find("select").children().each(function() {
                DDControlHtml = DDControlHtml + "<li><a href='#'>" + $(this).html() + "</a></li>";
            });
            ListControlMarkup = ListControlMarkup + DDControlHtml + "</ul>";
            $(this).parent().append(ListControlMarkup);
        }

        ListControl = $(this).parent().find("ul");
        DDText = $(this).parent().find("." + TXTCSS);

        ListControl.toggle();
        ListControl.css({ top: DDText.offset().top + DDText.height() + 6 + "px", left: DDText.offset().left + "px" });

        ListControl.children().each(function() {
            $(this).click(function() {
                DDLControl = document.getElementById(DDLId);
                DDText.attr("value", HtmlDecode($(this).find("a").html()));

                for (var i = 0; i < DDLControl.options.length; i++) {
                    DDLControl.options[i].text = HtmlDecode(DDLControl.options[i].text);

                    if (DDLControl.options[i].text == DDText.attr("value")) {
                        DDLControl.options[i].selected = true;
                        break
                    }
                }

                ListControl.hide();
                setTimeout('__doPostBack(\'' + DDLId + '\',\'\')', 0);
            });
            $(".Dropdown").hover(function() { }, function() { ListControl.hide(); });
            $(".DropdownCareers").hover(function() { }, function() { ListControl.hide(); });
            $(".DropdownMedia").hover(function() { }, function() { ListControl.hide(); });

        });
    });
}