/* 관리자 아이디 등록  */
function doInsertAdmin() {
    var fo_obj = xGetElementById("fo_obj");
    var sel_obj = fo_obj._admin_member;
    var admin_id = fo_obj.admin_id.value;
    if(!admin_id) return;

    var opt = new Option(admin_id,admin_id,true,true);
    sel_obj.options[sel_obj.options.length] = opt;

    fo_obj.admin_id.value = '';
    sel_obj.size = sel_obj.options.length;
    sel_obj.selectedIndex = -1;

    var members = new Array();
    for(var i=0;i<sel_obj.options.length;i++) {
        members[members.length] = sel_obj.options[i].value;
        
    }
    fo_obj.admin_member.value = members.join(',');

    fo_obj.admin_id.focus();
}

/* 관리자 아이디 삭제  */
function doDeleteAdmin() {
    var fo_obj = xGetElementById("fo_obj");
    var sel_obj = fo_obj._admin_member;
    sel_obj.remove(sel_obj.selectedIndex);

    sel_obj.size = sel_obj.options.length;
    sel_obj.selectedIndex = -1;

    var members = new Array();
    for(var i=0;i<sel_obj.options.length;i++) {
        members[members.length] = sel_obj.options[i].value;
    }
    fo_obj.admin_member.value = members.join(',');
}

/* 권한 선택용 */
function doShowGrantZone() {
    jQuery(".grant_default").each( function() {
        var id = "#zone_"+this.name.replace(/_default$/,'');
        if(!jQuery(this).val()) jQuery(id).css("display","block");
        else jQuery(id).css("display","none");
    } );
}

function completeCashbookConfigGrantUpdate(ret_obj) {
	var mid_url = ret_obj['mid_url'];
	var ret_act = ret_obj['ret_act'];
	alert(ret_obj['message']);
	//location.href = "?mid=" + mid_url + "&act="+ret_act;
}