var already = false; function processDropDowns() { // IE fix var Lst_id = ""; if (document.getElementById("LstDatabaseGas") != null) { Lst_id = "LstDatabaseGas"; } if (document.getElementById("LstDatabaseLiquid") != null) { Lst_id = "LstDatabaseLiquid"; } if (Lst_id != "") { if (already == false) { var LstDatabase = document.getElementById(Lst_id); var selected = 0; if (LstDatabase.selectedIndex > 0) selected = LstDatabase.options[LstDatabase.selectedIndex].value; $("#" + Lst_id + " option").each(function () { var loc_txt = getLocalizedString($(this).text(), 'en-US') $(this).text(loc_txt); }); var options = $("#" + Lst_id + " option"); options.sort(function (a, b) { if (a.text > b.text) return 1; else if (a.text < b.text) return -1; else return 0 }) $("#" + Lst_id).empty().append(options); if (selected > 0) LstDatabase.value = selected; else LstDatabase.value = -1; } } else { $('select').each(function (index) { //if ($(this).id != undefined) { options = $(this).children('option'); for (var i = 0; i < options.length; i++) { var en_txt = options[i].text; var loc_txt = getLocalizedString(en_txt, 'en-US'); if (loc_txt != en_txt) { options[i].text = loc_txt; } } //} var selected = $(this).val(); options.sort(function (a, b) { if (a.text > b.text) return 1; else if (a.text < b.text) return -1; else return 0 }) $(this).empty().append(options); $(this).val(selected); }); } } function processSpans() { $("span").each(function (index) { var en_txt = $(this).text(); var en_html = $(this).html(); if (en_html.indexOf("