function show(id)
{
    document.getElementById(id).style.display = 'inline';
}

function hide(id)
{
    document.getElementById(id).style.display = 'none';
}

function enable(id)
{
    document.getElementById(id).disabled = false;
}

function disable(id)
{
    document.getElementById(id).disabled = true;
}

function selectitem(id, val)
{
    var a = document.getElementById(id);
    if (val) {
        a.options[0].value = 2;
        a.options[0].text = "   2";
    } else {
        a.options[0].value = 0;
        a.options[0].text = "   0";
    }
    a.selectedIndex = val;
}