function Event_main_popup(p_loginLnk) { if (0 < $("#p_login").length) { $("#p_login").ie6BugDialog("close"); } if (0 < $("#p_popup_login_layer").length) { $("#p_popup_login_layer").ie6BugDialog("close"); } if (0 < $("#p_mainpopup").length) { $("#p_mainpopup").ie6BugDialog("close"); } if (p_loginLnk=='top') { $("
").attr("id", "p_mainpopup") .load("/event/2013/Event_main_popup.asp?posi="+p_loginLnk, function() { $(this) .ie6BugDialog("show", {parent: $("#container")}) .css("top", 130) .find("input[name='user_name']") .focus(); }); }else{ $("").attr("id", "p_mainpopup") .load("/event/2013/Event_main_popup.asp", function() { $(this) .ie6BugDialog("show", {parent: $("#container")}) .css("top", Math.floor(($(window).height() - this.offsetHeight) / 2) + $(window).scrollTop()) .find("input[name='user_name']") .focus(); }); } } function close_main_popup(){ $("#p_mainpopup").ie6BugDialog("close"); } function open_popup_login_layer(p_loginLnk) { if (0 < $("#p_login").length) { $("#p_login").ie6BugDialog("close"); } if (0 < $("#p_popup_login_layer").length) { $("#p_popup_login_layer").ie6BugDialog("close"); } $("").attr("id", "p_popup_login_layer") .load("/event/2013/popup_login_layer.asp?posi="+p_loginLnk, function() { $(this) .ie6BugDialog("show", {parent: $("#container")}) .css("left", 280) .css("top", Math.floor(($(window).height() - this.offsetHeight) / 2) + $(window).scrollTop()) .find("input[name='userID']") .focus(); }); } function close_popup_login_layer() { $("#p_popup_login_layer").ie6BugDialog("close"); // 로그인 취소시 관련 callback이 등록되어 있으면 실행. if ($.aftCancelLogin != undefined) { $.aftCancelLogin(); $.extend({ aftCancelLogin: function() { return ; } }); } // 로그인 취소시에는 로그인 후 실행할 callback이 등록되어있으면 제거. if ($.aftLogin != undefined) { $.extend({ aftLogin: function() { return ; } }); } } // login submit $("#btn_event_login").live("click", eventLogin); function eventLogin() { var frm = document.frm_mevent_login; if (frm.userId.value.split(" ").join("") == "") { alert("회원아이디를 입력하십시오."); frm.userId.focus(); return false; } if (frm.pwd.value.split(" ").join("") == "") { alert("비밀번호를 입력하십시오."); frm.pwd.focus(); return false; } var loginFrame = $("").attr("id", "if_login") .attr("name", "if_login") .attr("marginWidth", "0px") .attr("marginHeight", "0px") .attr("frameborder", "1px") .attr("width", "0px") .attr("height", "0px") .attr("scrolling", "no") .attr("src", "about:blank"); $("body").append(loginFrame); if (self.frames[loginFrame.attr("name")].name != loginFrame.attr("name")) { self.frames[loginFrame.attr("name")].name = loginFrame.attr("name"); } frm.method = "post"; if ( frm.ssl_login.checked ) { frm.action = "/service/login/svc_event_confirm.asp"; } else { frm.action = "/service/login/svc_event_confirm.asp"; } frm.target = loginFrame.attr("name"); frm.submit(); } function loginSucc2() { $.ajax({ url: '/service/login/svc_login_user.asp', type: 'POST', data: '', dataType: 'json', //timeout: 3000, error: function() { alert("Login 정보 확인 중 오류 발생."); }, success: function(p_data) { if (p_data.is_login) { if ($.aftLogin != undefined) { $.aftLogin(p_data); $.extend({ aftLogin: function() { return ; } }); } if ($.aftCancelLogin != undefined) { $.extend({ aftCancelLogin: function() { return ; } }); } dispLoginInfo(p_data); var posi = document.getElementById('posi').value; $("#p_popup_login_layer").ie6BugDialog("close"); Event_main_popup(posi); } else { Event_main_popup(); } } }); }