function _checkID() {if(f && f.id) {if(!_checkTextField($(f.id))) {return;}var pattern = /^[A-Za-z]{1}[A-Za-z0-9]{3,19}$/;if(!pattern.test($(f.id).val())) {_alertSwitch(true, f.id, checkIDFormatMsg.replace(/\n/g, "
"));return;}_submit("/actions/front/user/check-id", true);}else {_alertSwitch(true, null, errorMsg.replace(/\n/g, "
"), "err");}}function _checkIDDone(_result) {if(_result) {_alertSwitch(true, null, availableIDMsg.replace(/\n/g, "
"));}else {_alertSwitch(true, null, unavailableIDMsg.replace(/\n/g, "
"), "err");}}function _frontZipcode() {var search_input, search_btn, post_list;search_input = $("#post_search .post_input input[type='text']");search_btn = $("#post_search .post_input a:first");post_list = $("#post_search .post_list");search_input.val("");post_list.find("dl.post_cont").remove();$('#post_search').fadeIn(function() {function _exec() {post_list.find("dl.post_cont").remove();if(!_checkZipcodeTextField(search_input.first())) {return;}if(!_checkZipcodeTextField(search_input.last())) {return;}$.ajax({ "cache": false, "type": "POST", "url": "/ajax/system/zipcode/grid", "dataType": "json", "data": { "zipcodeDoro": search_input.first().val(), "zipcodeBuildingNo": search_input.last().val() }, "success": function(_data) { var rows = _data.rows; var dl, dt, dd, input; if(rows) { if(rows.length > 0) { var item; for(var idx in rows) { item = rows[idx]; dl = $(doc.createElement("dl")); dl.attr("class", "post_cont"); dt = $(doc.createElement("dt")); dt.html(item["우편번호"]); dd = $(doc.createElement("dd")); dd.html(item["주소"]); input = $(doc.createElement("input")); input.attr("type", "hidden"); input.val(item["우편번호 키값"]); dd.append(input); dl.append(dt); dl.append(dd); post_list.append(dl); } post_list.find("dl.post_cont").click(function(_e) { var post, addr, seq; post = $(this).find("dt").text(); addr = $(this).find("dd").text(); seq = $(this).find("input[type='hidden']").val(); $("#tab2 #join_addre").val(post); $("#tab2 #join_addre2").val(addr); f.zipSeq.value = seq; $('#fade, #post_search').fadeOut(function() { $("#tab2 #join_addre3").focus(); });return false; }); } else { dl = $(doc.createElement("dl")); dl.attr("class", "post_cont"); dd = $(doc.createElement("dd")); dd.css("width", "100%"); dd.html(noResultMsg); dl.append(dd); post_list.append(dl); } } }, "error": function(_data) { _alertSwitch(true, null, errorMsg.replace(/\n/g, "
"), "err"); }});}search_input.first().focus();search_input.keyup(function(_e) {if(_e.keyCode == 13) {_exec();}return false;});search_btn.click(function(_e) {_exec();});});$('#fade').css({'filter': 'alpha(opacity=80)'}).fadeIn();$('#menu_close').click(function () {$('#fade, #post_search').fadeOut();return false;});}function _join() {if(f && f.name && f.id && f.pwd &&f.telecom && f.mobile && f.email) {var pattern;if(!_checkTextField($(f.name))) {return;}if(!_checkTextField($(f.id))) {return;}pattern = /^[A-Za-z]{1}[A-Za-z0-9]{3,19}$/;if(!pattern.test($(f.id).val())) {_alertSwitch(true, f.id, checkIDFormatMsg.replace(/\n/g, "
"));return;}if(!_checkTextField($(f.pwd))) {return;}pattern = /^.*(?=.*\d)(?=.*[a-zA-Z])(?=.*[!@#$%^&+=]).*$/;if($(f.pwd).val().length < 8 || !pattern.test($(f.pwd).val())) {_alertSwitch(true, f.pwd, checkPWDFormatMsg.replace(/\n/g, "
"));return;}if(!_checkTextField($("#join_pwc"))) {return;}if($(f.pwd).val() != $("#join_pwc").val()) {_alertSwitch(true, $("#join_pwc")[0], discordPWDMsg.replace(/\n/g, "
"));return;}if(!_checkSelectField($(f.telecom))) {return;}if(!_checkTextField($("#join_hp"))) {return;}if(!_checkTextField($("#join_hp2"))) {return;}if(!_checkTextField($("#join_hp3"))) {return;}if(!_checkTextField($("#join_email"))) {return;}if(!_checkTextField($("#join_email2"))) {return;}f.mobile.value = $("#join_hp").val() + $("#join_hp2").val() + $("#join_hp3").val();f.email.value = $("#join_email").val() + "@" + $("#join_email2").val();_submit("/actions/front/user/join", true);}else {_alertSwitch(true, null, errorMsg.replace(/\n/g, "
"), "err");}}function _after() {$("ul.tabs li").unbind("click");_blind(false);$("ul.tabs li").removeClass("active").css("color", "#d1d1d1");$("ul.tabs li[rel='tab3']").addClass("active").css("color", "#92213c");$(".tab_content").hide();$("#tab3").fadeIn();}win.onload = function() {$("ul.tabs li").unbind("click");$("#tab1 a.sys_all_check").click(function(_e) {$("#tab1 .chk_btn input[type='checkbox']").prop("checked", true);});$("ul.tabs li[rel='tab2'], #tab1 a.sys_next").click(function(_e) {var objectCnt, checkedCnt;objectCnt = $("#tab1 .chk_btn input[type='checkbox']").length;checkedCnt = $("#tab1 .chk_btn input[type='checkbox']:checked").length;if(objectCnt != checkedCnt) {_alertSwitch(true, null, checkAgreeMsg.replace(/\n/g, "
"));return;}$("ul.tabs li").removeClass("active").css("color", "#d1d1d1");$("ul.tabs li[rel='tab2']").addClass("active").css("color", "#92213c");$(".tab_content").hide();$("#tab2").fadeIn();});$("#tab2 a.sys_check_id").click(function(_e) {_checkID();});$("#tab2 input.join_hp").keyup(function(_e) {if(_e.keyCode == 8 || _e.keyCode == 9 || _e.keyCode == 46) {return;}var pattern = /^[0-9]+$/;if(!pattern.test($(this).val())) {_alertSwitch(true, $(this)[0], onlyNumbersMsg.replace(/\n/g, "
"));return;}});$("#tab2 select.sys_email_list").change(function(_e) {var domainObj = $("#join_email2");if($(this).val().length > 0) {domainObj.prop("readonly", true);domainObj.val($(this).val());}else {domainObj.val("");domainObj.focus();domainObj.prop("readonly", false);}});$("#tab2 a.sys_zipcode").click(function(_e) {_frontZipcode();});$("#tab2 a.sys_next").click(function(_e) {_join();});$("ul.tabs li[rel='tab1'], #tab2 a.sys_prev").click(function(_e) {$("ul.tabs li").removeClass("active").css("color", "#d1d1d1");$("ul.tabs li[rel='tab1']").addClass("active").css("color", "#92213c");$(".tab_content").hide();$("#tab1").fadeIn();});};