//
function doSearch(action, list) {
    //
    var form = document.input;
    if (form == null) {
        return;
    }

    //
    form.operation.value = "search";
    //
    for (var i = 0; i < form.elements[list].length; i++) {
        form.elements[list].item(i).selected = true;
    }
    //
    form.elements[action].value = "true";
    //
    form.submit();
}
//
function doAssign(action, list, object, message) {
    //
    var form = document.input;
    if (form == null) {
        return;
    }
    //
    if (action == 'action_group_assignUser' || action == 'action_resource_assignUser' || action == 'action_resource_setNetwork') {
        //
        if (!confirm(
            message + "\n"
            + "よろしいですか？")) {
            return;
        }
    } else if (action == 'action_group_deassignUser' || action == 'action_resource_deassignUser' || action == 'action_resource_setNetwork') {
        //
        if (!confirm(
            message + "\n"
            + "よろしいですか？")) {
            return;
        }
    } else {
        return;
    }
    //
    form.operation.value = "update";
    //
    for (var i = 0; i < form.elements[list].length; i++) {
        form.elements[list].item(i).selected = true;
    }
    //
    form.elements[action].value = "true";
    //
    form.submit();
}
//
function doChangePage(page_num) {
    //
    var form = document.input;
    if (form == null) {
        return;
    }
    //
    if (page_num > 0) {
        form.page_num.value = page_num;
    }
    //
    form.action_group_readUser.value = "true";
    form.file_output.value = "0";
    //
    location.replace("");
    //
    form.submit();
}
//
function doDownloadFile() {
    //
    var form = document.input;
    if (form == null) {
        return;
    }
    //
    form.action_group_readUser.value = "true";
    form.page_num.value = "1";
    form.file_output.value = "1";
    //
    location.replace("");
    //
    form.submit();
}
//
function checkType() {
    var type = document.getElementsByName('type');

    for (i = 0; i < type.length; i++) {
        if (type[i].checked) {
            radioFunc(type[i]);
            break;
        }
    }
}
