function AddOptionToSelect(el, text, value)
{
    var option = document.createElement("option");
    option.text = text;
    option.value = value;
			
    try
    {
        el.add(option, null);
    }
    catch (exc)
    {
        el.add(option);
    }
}

function SetSelectValue(select, value)
{
	for (var n = 0; n < select.options.length; n++)
		if (select.options[n].value == value)
		{
			select.selectedIndex = n;
			return;
		}
}
