﻿//우편번호 Pop관련 function
function AddrSearch() {
    w01 = window.open("/member/pop_add.aspx", "address", "left=100, top=100, width=500, height=350, scrollbars=none");
    w01.focus();
}

function searchUser() {
    var searchUserPop = window.open("Pop_searchJejaUser.aspx", "searchUserPop", "left=100, top=100, width=390, height=300, scrollbars=none");
   searchUserPop.focus();
}

function serRecommend(recommendIdVal, recommendNmVal) {
    document.getElementById("hdnIntroJjanUserID").value = recommendIdVal;
    document.getElementById("txtIntroJjanUserNm").value = recommendNmVal;
     
}

function serAddressInfo(zipcodeF, zipcodeA, sidoVar, gugunVar, dongVar, bunji, returnFieldVal) {
    address = sidoVar + " " + gugunVar + " " + dongVar;

    var frmObj = document.getElementById("form1");

    document.getElementById("txtZipcode").value = zipcodeF + zipcodeA;
    document.getElementById("txtAddr1").value = address;
    document.getElementById("txtAddr2").value = bunji;
//    document.getElementById("hdnSido").value = sidoVar;
//    document.getElementById("hdnGugun").value = gugunVar;
//    document.getElementById("hdnDong").value = dongVar;
//    document.getElementById("txtAddr2").focus();
}
function openGiftInfoPop(companyCdVal, memberCdVal, legerIdxVal, modeVal) {
    var GiftInfoPop = window.open("/01_introduction/pop_written.aspx?companyCd=" + companyCdVal + "&memberCd=" + memberCdVal + "&legerIdx=" + legerIdxVal + "&mode=" + modeVal, "GiftInfoPop", "scrollbars=no,resizable=no,width=535,height=720");
    GiftInfoPop.focus();
}

function checkForm() {
    var formObj = document.forms[0];

    if (formObj.ddlCenterCd.value == "") {
        alert("지역을 선택해 주세요.");
        formObj.ddlCenterCd.focus();
        return;
    }

    if (formObj.txtHp.value == "") {
        alert("휴대폰 번호를 입력해 주세요." );
        formObj.txtHp.focus();
        return;
    }
    __doPostBack("btnModify", "");
}

function giftCancel(companyCd, memberCd, legerIdx) {
    if (confirm("해지하시겠습니까?")) {
        //cmsLedgerIdx
        //pop_cancel.aspx
        Popup.openPopup('giftCancelPop', "/01_introduction/pop_cancel.aspx?companyCd=" + companyCd + "&memberCd=" + memberCd + "&legerIdx=" + legerIdx, 200, 300, 440, 445, 'no', 'gray', "D");
//        @companyCd CHAR(6)
//,	@memberCd VARCHAR(20)
//,	@ledgerIdx BIGINT
    }
}