
function get_threads (select, forum_threads)
{
    var thread_select = document.getElementById("forum_thread_select");
    var threads = forum_threads[select.value];

    if (thread_select) {
        while (thread_select.childNodes[0]) {
            thread_select.removeChild(thread_select.childNodes[0]);

        }

        for (var i in threads) {
            var option = document.createElement("option");
            option.value = threads[i][0];
            option.text = threads[i][1];

            try {
                thread_select.add(option, null); // standards compliant; doesn't work in IE

            } catch (ex) {
                thread_select.add(option); // IE only

            }

        }

    }
    
}
