var Integrat = new Object(); Integrat.msg = { _msg : new Array() ,__init : function(val){ /*step 1*/ this._msg[0] = new Array(); this._msg[0][0] = "Check your ID."; this._msg[0][1] = "Check your Password."; this._msg[0][2] = "Select your security question."; this._msg[0][3] = "Check your security answer."; this._msg[0][4] = "Please check TOS box."; this._msg[1] = new Array(); this._msg[1][0] = "Check your ID."; this._msg[1][1] = "Check your Password."; this._msg[1][2] = "Check your Nickname."; this._msg[1][3] = "This ID is not available. Please choose a new ID."; this._msg[1][4] = "Your DontBlynk ID can be used on Playrohan.com."; this._msg[1][5] = "This ID can be used to play all games on Playrohan.com."; this._msg[1][6] = "You can use your existing Password to login."; } } Integrat.msg.__init(); Integrat.common = { _portal_msg : null ,__init : function(){ //try{ Integrat.common._portal_msg = $rj("#portal_msg"); //}catch(e){} } ,__DBcheck : function(para, __date){ var _returnval; var check = $rj.getJSON(S_domain.__PortalHttps + "/Member/Register/check_memberinfo.asp?"+para+"="+__date); check.success(function(data){ try{ Integrat.common._portal_msg.hide().show(); }catch(e){} Integrat.common._portal_msg.html(data.result.returnmsg); if (Number(data.result.returncode) == 0){ _returnval = true; }else{ _returnval = false; } if (para == "userid"){ Integrat.step2.__AccountSuccess(_returnval); } if (para == "nickname"){ Integrat.step2.__NickNameSuccess(_returnval); } }); check.error(function(xhr, ajaxOptions, thrownError){ alert(thrownError); debug.__debug("Ajax_error : " + xhr.status.toString()); debug.__debug("Ajax_error : " + thrownError); }); check.complete(function(data, textStatus){ debug.__debug("Ajax_complete : " + textStatus.toString()); }); } } Integrat.step1 = { _frm : null ,_dont_id : null ,_dont_pw : null ,_dont_question : null ,_dont_answer : null ,_dont_checkbox : null ,__init : function(){ this._frm = $rj("#frm"); this._dont_id = $rj("#dont_id"); this._dont_pw = $rj("#dont_pw"); //this._dont_question = $rj("#dont_question"); //this._dont_answer = $rj("#dont_answer"); this._dont_checkbox = $rj("#dont_checkbox"); } ,__submit : function(){ this.__init(); if (this._dont_id.val() == ""){alert(Integrat.msg._msg[0][0]); this._dont_id.focus(); return; } if (this._dont_pw.val() == ""){alert(Integrat.msg._msg[0][1]); this._dont_pw.focus(); return; } //if (this._dont_question.val() == ""){alert(Integrat.msg._msg[0][2]); this._dont_question.focus(); return; } //if (this._dont_answer.val() == ""){alert(Integrat.msg._msg[0][3]); this._dont_answer.focus(); return; } if (!this._dont_checkbox.is(':checked')){alert(Integrat.msg._msg[0][4]); this._dont_checkbox.focus(); return; } this._frm.submit(); /* var logincheck = $rj.getJSON(S_domain.__PortalHttps + "/Member/Integration/Synch_step1.process.html", this._frm.serialize()); logincheck.success(function(data){ if (data.result.returncode == 0 || data.result.returncode == "-101"){ document.getElementById("frm").action = S_domain.__PortalHttps + "/Member/Integration/Synch_step2.html"; document.getElementById("frm").submit(); }else if (data.result.returncode == "-102"){ if (confirm(Integrat.msg._msg[0][4])){ alert("aaaa"); } }else{ alert(data.result.returnmsg); } debug.__debug("Ajax_success : " + data.result.returncode.toString()); debug.__debug("Ajax_success : " + data.result.returnmsg.toString()); }); logincheck.error(function(xhr, ajaxOptions, thrownError){ debug.__debug("Ajax_error : " + xhr.status.toString()); debug.__debug("Ajax_error : " + thrownError); }); logincheck.complete(function(data, textStatus){ debug.__debug("Ajax_complete : " + textStatus.toString()); }); */ } } Integrat.step2 = { _frm : null ,_portal_id : null ,_portal_pw : null ,_portal_pw_re : null ,_portal_nickname : null ,_portal_id_div : null ,_portal_id_hidden : "" ,_portal_id_text : "" ,_portal_nickname_div : null ,_portal_nickname_hidden : "" ,_portal_nickname_text : "" ,_portal_pw_div : null ,_portal_pw_re_div : null ,_idcheck : null ,_nicknamecheck : null ,_passwordcheck : null ,_code : null ,__init : function(){ this._frm = $rj("#frm"); this._portal_id = $rj("#portal_id"); this._portal_pw = $rj("#portal_pw"); this._portal_pw_re = $rj("#portal_pw_re"); this._portal_nickname = $rj("#portal_nickname"); this._portal_id_div = $rj("#portal_id_div"); this._portal_nickname_div = $rj("#portal_nickname_div"); this._portal_pw_div = $rj("#portal_pw_div"); this._portal_pw_re_div = $rj("#portal_pw_re_div"); this._idcheck = $rj("#idcheck"); this._nicknamecheck = $rj("#nicknamecheck"); this._passwordcheck = $rj("#passwordcheck"); this._code = $rj("#code"); this._code.val(returnval.result.code.toString()); if (returnval.result.duplicate=="true" || returnval.result.newmember=="true"){ this._portal_id_div.html(this._portal_id_text); this._portal_id = $rj("#portal_id_text"); Integrat.common._portal_msg.show().html(Integrat.msg._msg[1][3]); }else if (returnval.result.sealmember=="true"){ this._portal_id_div.html(this._portal_id_hidden + returnval.result.dont_id); this._portal_id = $rj("#portal_id_hidden"); this._portal_id.val(returnval.result.dont_id); Integrat.common._portal_msg.show().html(Integrat.msg._msg[1][4]); this._idcheck.val("1"); }else if (returnval.result.matchingmember=="true"){ this._portal_id_div.html(this._portal_id_hidden + portallogin_id); this._portal_id = $rj("#portal_id_hidden"); this._portal_id.val(portallogin_id); this._idcheck.val("1"); this._portal_nickname_div.html(this._portal_nickname_hidden + portallogin_nickname); this._portal_nickname = $rj("#portal_nickname_hidden"); this._portal_nickname.val(portallogin_nickname); Integrat.common._portal_msg.show().html(Integrat.msg._msg[1][5]); this._nicknamecheck.val("1"); this._portal_pw_div.html(Integrat.msg._msg[1][6]); this._portal_pw_re_div.html(Integrat.msg._msg[1][6]); this._passwordcheck.val("1"); } } ,__submit : function(){ if (this._portal_id.val() == ""){alert(Integrat.msg._msg[1][0]); this._portal_id.focus(); return; } if (this._passwordcheck.val() != 1){ if (this._portal_pw.val() == ""){alert(Integrat.msg._msg[1][1]); this._portal_pw.focus(); return; } if (this._portal_pw.val() != this._portal_pw_re.val()){alert(Integrat.msg._msg[1][1]); this._portal_pw.focus(); return; } } if (this._portal_nickname.val() == ""){alert(Integrat.msg._msg[1][2]); this._portal_nickname.focus(); return; } if (returnval.result.duplicate=="true" || returnval.result.newmember=="true"){ if(this._idcheck.val() == "0"){ Integrat.step2.__AccountCheck(); this._idcheck.focus(); return;} } if(this._nicknamecheck.val() == "0"){ Integrat.step2.__NickNameCheck(); this._nicknamecheck.focus(); return;} this._frm.submit(); } /* UserID = FU_requset("userid") NickName = FU_requset("nickname") Birthday = FU_requset("birthday") PassWord =FU_requset("password") */ ,__NickNameCheck : function(){ Integrat.common.__DBcheck("nickname", this._portal_nickname.val()) } ,__NickNameSuccess : function(checkval){ if(checkval){ this._nicknamecheck.val(1); return true; }else{ this._nicknamecheck.val("0"); return false; } } ,__AccountCheck : function(){ Integrat.common.__DBcheck("userid", this._portal_id.val()) } ,__AccountSuccess : function(checkval){ if(checkval){ this._idcheck.val(1); return true; }else{ this._idcheck.val("0"); return false; } } } $rj(document).ready(function() { Integrat.common.__init(); var _btn_step1 = $rj("#btn_step1"); _btn_step1.click(function(e){Integrat.step1.__submit();}); try{Integrat.step2.__init();}catch(e){} var _btn_step2 = $rj("#btn_step2"); _btn_step2.click(function(e){Integrat.step2.__submit();}); try{ if (returnval.result.duplicate=="true" || returnval.result.newmember=="true"){ var _portal_id = $rj("#portal_id_text"); _portal_id.live({ blur : function(){ if(!Integrat.step2.__AccountCheck()){return;}; } }); } }catch(e){} var _portal_nickname = $rj("#portal_nickname"); _portal_nickname.live({ blur : function(){ if(!Integrat.step2.__NickNameCheck()){return;}; } }); });