function showhideElement(action, id, x, y, btnid) //action is either "show" or "hide", id is the id of the element, x and y are the button ID numbers
{
    if (action == "show") //if the action is show
    {
        document.getElementById('spanImageButton' + x).style.display = 'none'; //hide the show button
        document.getElementById('spanImageButton' + y).style.display = ''; //show the hide button
        document.getElementById(id).style.display = 'block'; //show the element
        document.getElementById(btnid).focus();

    }
    else if (action == "hide") //if the action is hide
    {
        document.getElementById('spanImageButton' + x).style.display = ''; //show the show button
        document.getElementById('spanImageButton' + y).style.display = 'none'; //hide the hide button
        document.getElementById(id).style.display = 'none'; //hide the element
        document.getElementById(btnid).focus();
    }
}

function DisableEnableGroups(DiabledElementName, EnabledElementName) {
    //enable/disable controls to be gray-out
    disableElement(document.getElementById(DiabledElementName), true);
    //document.getElementById(DiabledElementName).Checked = "False";

    disableElement(document.getElementById(EnabledElementName), false);

    //below code is for hiding the control
    //document.all(DiabledElementName).style.display = "block";
    //document.all(EnabledElementName).style.display = "none";
}


function disableElement(el, disable) {
    try {
        el.disabled = disable;
    }
    catch (E) {
    }

//    if (el.childNodes && el.childNodes.length > 0) {
//        for (var x = 0; x < el.childNodes.length; x++) {
//            disableElement(el.childNodes[x], disable);
//        }
//    }
}


//this script does not return any values to the originating page.