var checkErrorCount=0;var checkCodeCount=1;var checkCodeMobile="";function isCorrectChinese(a){var b=/[\u4e00-\u9fa5]/;return b.test(a);}function isCorrectMobile(a){var b=/^(\\+?86)?1(3[456789]|5[012789]|4[7]|8[78])\d{8}$/;return b.test(a);}function isCorrectEMail(a){var b=/(\S)+[@]{1}(\S)+[.]{1}(\w)+/;return b.test(a);}function isCorrectFetion(a){var b=/^\d{6,11}$/;return b.test(a);}function isCorrectPasswords(b){if(b.length>20){return false;}var a=/^[\u0000-\u007f]{6,20}$/;return a.test(b);}function isCorrectCheckcode(a){var b=/\d{4}/;return b.test(a);}function checkMobile(b){var a=document.getElementById(b).value;if(isCorrectMobile(a)){getmodule("checkcode_div","bo_id=cust_info_check_mobile&mobile="+a);}}function clearMsg(){if(document.getElementById("checkcodenum")){var a=document.getElementById("checkcodenum").outerHTML;document.getElementById("reg_alert_5").innerHTML=a;}}function checkMobileNew(){var e=document.getElementById("register_step");var d=document.getElementById("register_msg");var c=document.getElementById("mobile").value;if(c==""){alert("手机号为空！");return;}if(e.value=="0"){var b=document.getElementById("check").value;if(b==null||b==""){document.getElementById("reg_alert_5").innerHTML="";alert("请输入图片中的验证码！");return;}var a=document.getElementById("checkcodenum");if(a==null){document.getElementById("reg_alert_5").innerHTML="";alert("请输入图片中的验证码！");return;}if(a.value==1){alert("验证码错误！");return;}checkMobile("mobile");if(d.value=="0"){return;}document.getElementById("register_step").value="1";document.getElementById("isNotRegister_ul").innerHTML="";goToCheckCodePage();}else{if(e.value=="1"){checkCode("mobile","checkcode");if(d.value=="0"){getmodule("verifi_code","bo_id=cust_info_verifi_code_page");document.getElementById("register_step").value="0";}}}}function callGenerateCheckcodeApp(b){var e=createHashMapValueForCheckCode();var c="ajax.do?method=doApp&app_attribute=cust_info_register_app&uiid=&operationtype=generate&mobile="+b;var d=new Ajax.Request(c,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function a(f){str=f.responseText;}});if(str=="not_overrun_8_hours"){alert("请8小时后再试！");return"not_overrun_8_hours";}else{if(str=="system_error"){alert("系统错误，请重新发送！");return;}else{if(str=="success"){alert("注册验证码已成功发送手机"+b+"，请注意接收！");document.getElementById("register_msg").value="1";}else{if(str=="is_not_sc_mobile"){alert("您的手机号不属于中国移动四川号码，不能注册！");document.getElementById("register_msg").value="0";}else{alert("获取验证码失败！"+b);document.getElementById("register_msg").value="0";}}}}}function createHashMapValueForCheckCode(){var c=new Date();var a=c.getHours();var b=c.getMinutes();return a+"|"+b;}function checkMobileOnblur(){var b=document.getElementById("mobile").value;var c=document.getElementById("checksMobileNum");if(!isCorrectMobile(b)){c.innerHTML="请输入正确的移动手机号码！";document.getElementById("register_msg").value="0";document.getElementById("mobile").focus();document.getElementById("mobile").value="";return;}else{c.innerHTML="";}var d="ajax.do?method=doApp&app_attribute=cust_info_checkMobile_app&uiid=&operationtype=generate&mobile="+b;var e=new Ajax.Request(d,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function a(f){str=f.responseText;}});if(str=="is_not_sc_mobile"){c.innerHTML="仅支持中国移动四川用户";document.getElementById("register_msg").value="0";}}function checkCheckbox(){var a=document.getElementById("checkCodeCheckbox");if(a.checked){document.getElementById("checkCodeSubmit").disabled="";}else{document.getElementById("checkCodeSubmit").disabled="true";}}function checkCode(c,h){var b=document.getElementById(c).value;var g=document.getElementById("checksMobile");if(!isCorrectMobile(b)){g.innerHTML="请输入正确的移动手机号码！";return;}var d=document.getElementById(h).value;if(!isCorrectCheckcode(d)){alert("请输入6位数字验证码！");return;}var e="ajax.do?method=doApp&app_attribute=cust_info_register_app&uiid=&operationtype=validate&mobile="+b+"&checkcode="+d;var f=new Ajax.Request(e,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function a(i){str=i.responseText;}});if(str=="success"){getmodule("main","bo_id=cust_info_check_mobile_next&mobile="+b);}else{alert("验证码输入有误，请重新获取！");document.getElementById("register_msg").value="0";document.getElementById("isNotRegister_ul").innerHTML="<li><span class='font_h'>已经注册了？</span><a href='javascript:goToLoginPage();'>立刻登录</a></li>";}}function custInfokeydown(d){var e=document.getElementById("passwords").value;var b=document.getElementById("passwordsConfirm").value;var a=document.getElementById("nickname").value;var c=document.getElementById("checkCodeCheckbox");if(e!=""&&b!=""&&a!=""&&c.checked){document.getElementById("setPasswordsNextSubmit").disabled=false;}else{document.getElementById("setPasswordsNextSubmit").disabled=true;}}function checkPasswordOnblur(){var b=document.getElementById("passwords").value;var a=document.getElementById("checkPwd");if(!isCorrectPasswords(b)){a.innerHTML="密码输入不符合规则，请重新输入！";return;}else{a.innerHTML="";}}function checkPasswordConfirmOnblur(){var c=document.getElementById("passwords").value;var a=document.getElementById("passwordsConfirm").value;var b=document.getElementById("checkPwdConfirm");if(!isCorrectPasswords(a)){b.innerHTML="密码输入不符合规则，请重新输入！";return;checkPwd.innerHTML="";}if(c!=a){b.innerHTML="两次输入的密码不一致，请重新输入！";document.getElementById("passwords").value="";document.getElementById("passwordsConfirm").value="";return;}else{b.innerHTML="";}}function checkNickNameOnblur(){var a=document.getElementById("nickname").value;var b=document.getElementById("checkNickName");if(a==""){b.innerHTML="你还没有为自己起名字呢！";return;}else{if(a.length>4){b.innerHTML="昵称长度不能超过4个字，请重新输入！";return;}else{b.innerHTML="";}}}function performRegister(){var c=document.getElementById("mobile").value;var b=document.getElementById("passwords").value;var o=document.getElementById("nickname").value;if(o.length>4){alert("昵称长度不能超过4个字，请重新输入！");document.getElementById("nickname").focus();return;}var r="";var g="";var m="";var l="";var d="";var p="";var k=window.location.href;var f=k.substring(k.lastIndexOf("=")+1);var j="ajax.do?method=doApp&app_attribute=cust_info_register_app&uiid=&operationtype=register&mobile="+c+"&passwords="+b+"&nickname="+o+"&invitemd5pwd="+f;var q=new Ajax.Request(j,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function n(s){str=s.responseText;}});if(str!=null&&str!=""&&str!="false"){var t=str.split("@|@");if(t[0]!=null&&t[0]!=""){var h=t[0].split("^_^");r=h[0];g=h[1];}if(t[1]!=null&&t[1]!=""){var a=t[1].split("^_^");m=a[0];l=a[1];}if(t[2]!=null&&t[2]!=""){var i=t[2].split("^_^");singer=i[0];p=i[1];}var e="&mobile="+c+"&mobileModleID="+r+"&mobileModleName="+g+"&regionID="+m+"&regionName="+escape(escape(l))+"&singerID="+d+"&singerName="+escape(escape(p));getmodules("main","cust_user_login_better_info_page_bu"+e);}else{alert("注册失败！");}}function selectMobileManu(){var a=document.getElementById("manu_select").value;document.getElementById("defaultSelectSpan").style.display="none";document.getElementById("selectSpan").style.display="inline";if(a==0){document.getElementById("defaultSelectSpan").style.display="inline";document.getElementById("selectSpan").style.display="none";}getmodule("selectSpan","bo_id=cust_user_login_better_info_page_model_bo&mobile_manu_id="+a);}function goToGuessYouLikePage(){var k="";var c="";var n="";var i="";var b="";var e="";var h="";var d="ajax.do?method=doApp&app_attribute=cust_info_register_app&uiid=&operationtype=get_guess_info";var a=new Ajax.Request(d,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function j(p){str=p.responseText;}});if(str!=null&&str!=""&&str!="false"){var m=str.split("@|@");if(m[0]!=null&&m[0]!=""){var l=m[0].split("^_^");c=l[0];n=l[1];}if(m[1]!=null&&m[1]!=""){var g=m[1].split("^_^");i=g[0];b=g[1];}if(m[2]!=null&&m[2]!=""){var f=m[2].split("^_^");e=f[0];h=f[1];}var o="&mobileModleID="+c+"&mobileModleName="+n+"&regionID="+i+"&regionName="+b+"&singerID="+e+"&singerName="+h;getmodule("main","bo_id=cust_info_save_register_info"+o);}else{alert("猜你喜欢失败！");}}function unescapeChinese(){var a=document.getElementById("regionNameSpan").innerHTML;var b=document.getElementById("singerNameSpan").innerHTML;document.getElementById("regionNameSpan").innerHTML=unescape(a);document.getElementById("singerNameSpan").innerHTML=unescape(b);}function unescapeChineseForLogin(){}function changeMobileModle(){getmodule("pubwin","bo_id=cust_info_modify_mobile_model");showPubWin();}function changeRegion(){getmodule("pubwin","bo_id=cust_info_modify_region");showPubWin();}function changeSinger(){getmodule("pubwin","bo_id=cust_info_modify_singer");showPubWin();}function modifyMobileModel(){var b=document.getElementById("mobile_model_select");var a=b.selectedIndex;document.getElementById("mobileModleSpan").innerHTML=b.options[a].innerHTML;document.getElementById("mobileModleInput").value=b.value;closePubWin();}function modifyRegion(){var b=document.getElementById("region_select");var a=b.selectedIndex;document.getElementById("regionNameSpan").innerHTML=b.options[a].innerHTML;document.getElementById("regionIDInput").value=b.value;closePubWin();}function modifySinger(){var b=document.getElementById("singer_select");var a=b.selectedIndex;document.getElementById("singerNameSpan").innerHTML=b.options[a].innerHTML;document.getElementById("singerIDInput").value=b.value;closePubWin();}function submitGuessInfo(){var a=document.getElementById("mobileModleInput").value;var b=document.getElementById("regionIDInput").value;var c=document.getElementById("singerIDInput").value;var d="&mobile_modle="+a+"&region_id="+b+"&singer_id="+c;getmodules("main","cust_info_guess_you_like_other_bu",d);}function showPubWin(){toCenter(100,50,"pubwin");var b=document.body.clientWidth-event.clientX;var a=document.body.clientHeight-event.clientY;if(b<pubwin.offsetWidth){pubwin.style.left=document.body.scrollLeft+event.clientX-pubwin.offsetWidth;}else{pubwin.style.left=document.body.scrollLeft+event.clientX-20;}if(a<pubwin.offsetHeight){pubwin.style.top=document.body.scrollTop+event.clientY-pubwin.offsetHeight;}else{pubwin.style.top=document.body.scrollTop+event.clientY+5;}return false;}function callLoginDIV(b,a){if(a!=null&&a!="undefined"){a=escape(escape(a));}var c="&function_name="+b+"&function_params="+a;getmodule("pubwin","bo_id=cust_user_login_page_bo_div&logintype=login_div"+c);}function indexCustLogin(l,e,a,s){var d=document.getElementById("cust_login_mobile").value;if(d==null||d=="undefined"||d==""){var q=document.getElementsByName("cust_login_mobile");for(var n=0;n<q.length;n++){if(q[n].value!=null&&q[n].value!="undefined"&&q[n].value!=""){d=q[n].value;break;}}}var c=document.getElementById("cust_login_password").value;if(c==null||c=="undefined"||c==""){var h=document.getElementsByName("cust_login_password");for(var n=0;n<h.length;n++){if(h[n].value!=null&&h[n].value!="undefined"&&h[n].value!=""){c=h[n].value;break;}}}var p=document.getElementsByName("autologin_checkbox");var g="false";for(var n=0;n<p.length;n++){if(p[n]!=null&&p[n]!="undefined"&&p[n].checked){g="true";}}var m="";var b="";if(document.getElementById("is_not_checkCode_login").value=="true"){var j="ajax.do?method=doApp&app_attribute=cust_info_by_check_code&uiid=&mobile="+d+"&checkcode="+c;var o=new Ajax.Request(j,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function k(i){strs=i.responseText;}});if(strs=="success"){var j="/ajax.do?method=doApp&app_attribute=cust_info_register_app&uiid=&operationtype=checkCode&mobile="+d+"&auto_login="+g;var o=new Ajax.Request(j,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function k(i){str=i.responseText;}});if(str=="not_register"){alert("手机号码"+d+"没有注册！");setLoginSuccess(0);return;}else{if(checkErrorCount>=3){document.getElementById("check_pwd_vaild1").style.display="block";setLoginSuccess(0);return;}else{if(document.getElementById("check_pwd_vaild1").style.display=="block"){var r=document.getElementById("check").value;if(r==null||r==""){document.getElementById("reg_alert_5").innerHTML="";alert("请输入图片中的验证码！");return;}var f=document.getElementById("checkcodenum");if(f==null){document.getElementById("reg_alert_5").innerHTML="";alert("请输入图片中的验证码！");return;}if(f.value==1){alert("验证码错误！");return;}}}var t=str.split("@|@");if(t.length==3){m=t[1];b=escape(escape(t[2]));}setLoginSuccess(1);callReplaceAction(s,m);alert("你的密码已经被系统自动设置为本验证码，请登录后到个人中心修改密码！");return;}}else{alert("验证码输入错误，请重新获取验证码！");checkErrorCount++;return;}}else{if(checkErrorCount>=3){if(document.getElementById("check_pwd_vaild1")){if(document.getElementById("check_pwd_vaild1").style.display=="block"){var r=document.getElementById("check").value;if(r==null||r==""){document.getElementById("reg_alert_5").innerHTML="";alert("请输入图片中的验证码！");return;}var f=document.getElementById("checkcodenum");if(f==null){document.getElementById("reg_alert_5").innerHTML="";alert("请输入图片中的验证码！");return;}if(f.value==1){alert("验证码错误！");return;}}}}var j="/ajax.do?method=doApp&app_attribute=cust_info_register_app&uiid=&operationtype=login&mobile="+d+"&passwords="+c+"&auto_login="+g;var o=new Ajax.Request(j,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function k(i){str=i.responseText;}});if(str=="not_register"){alert("手机号码"+d+"没有注册！");setLoginSuccess(0);return;}else{if(str=="not_correct"){document.getElementById("pwd_error").style.display="block";checkErrorCount++;if(checkErrorCount>=3){document.getElementById("check_pwd_vaild1").style.display="block";}setLoginSuccess(0);return;}else{if(str!=""){var t=str.split("@|@");if(t.length==3){m=t[1];b=escape(escape(t[2]));}if(a!=null&&a!="undefined"&&a!=""){getmodules(l,a);callReplaceAction(s,m);}else{if(e!=null&&e!="undefined"&&e!=""){getmodule(l,"bo_id="+e+"&mobile="+d+"&nickname="+escape(escape(m))+"&region_name="+b);callReplaceAction(s,m);}}setLoginSuccess(1);callReplaceAction(s,m);}else{setLoginSuccess(1);alert("登录异常！");return;}}}}}function checkMobileIsNotPurpose(){var a=document.getElementById("cust_login_mobile").value;if(!isCorrectMobile(a)){document.getElementById("mobileErr").style.display="block";setLoginSuccess(0);return;}else{document.getElementById("mobileErr").style.display="none";}}function getCheckCodeByLogin(){var b=document.getElementById("cust_login_mobile").value;if(b==""||b==null){alert("手机号号码不能为空！");return;}if(confirm("使用本验证码登录成功后，将把您的初始密码设为本验证码，您确定要这么做？")){document.getElementById("is_not_checkCode_login").value="true";var e=createHashMapValueForCheckCode();var c="ajax.do?method=doApp&app_attribute=cust_info_register_app&uiid=&operationtype=check_code_login&mobile="+b;var d=new Ajax.Request(c,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function a(f){str=f.responseText;}});if(str=="not_overrun_8_hours"){alert("请8小时后再试！");document.getElementById("is_not_checkCode_login").value="fasle";return;}else{if(str=="system_error"){alert("系统错误，请重新发送！");document.getElementById("is_not_checkCode_login").value="fasle";return;}else{if(str=="success"){alert("临时密码已成功发送手机"+b+"，请注意接收！");return;}else{if(str=="is_not_sc_mobile"){alert("您的手机号不属于中国移动四川号码，不能获取临时密码！");document.getElementById("is_not_checkCode_login").value="fasle";return;}else{alert("获取临时密码失败，请重新获取！");document.getElementById("is_not_checkCode_login").value="fasle";return;}}}}}}function setLoginSuccess(a){var b=document.getElementById("is_login_success");if(b!=null&&b!="undefined"&&b!=""){b.value=a;}}function callReplaceAction(params,nickname){try{if(params!=null&&params!="undefined"&&params!=""){var myJSONObject=null;try{myJSONObject=eval("("+params+")");}catch(e){myJSONObject=params;}if(myJSONObject.length!="undefined"){for(var i=0;i<myJSONObject.length;i++){if(myJSONObject[i]!=null&&myJSONObject[i]!="undefined"){var div_id=myJSONObject[i].div_id;var content=myJSONObject[i].content;if(content.indexOf("{*nickname*}")!=-1){content=content.replace("{*nickname*}",nickname);}var divObj=document.getElementById(div_id);if(divObj!=null&&divObj!="undefined"){document.getElementById(div_id).innerHTML=content;}}}}else{if(myJSONObject!=null&&myJSONObject!="undefined"){var div_id=myJSONObject.div_id;var content=myJSONObject.content;if(content.indexOf("{*nickname*}")!=-1){content=content.replace("{*nickname*}",nickname);}var divObj=document.getElementById(div_id);if(divObj!=null&&divObj!="undefined"){document.getElementById(div_id).innerHTML=content;}}}}else{return;}return;}catch(e){}}function callIndexCustLogin(functionName,functionParams){if(logintype.value=="login_div"){indexCustLogin();var is_login_success=document.getElementById("is_login_success").value;if(is_login_success=="1"){getmodule("top","bo_id=moma_top");getmodule("tail","bo_id=tail");closePubWin();if(functionName!=null&&functionName!="undefined"&&functionName!=""){if(functionParams!=null&&functionParams!="undefined"&&functionParams!=""){functionParams=unescape(functionParams);eval(functionName+".call(this,functionParams)");}else{eval(functionName+".call()");}}else{var nonce_url=window.location.href;var url_subscript=nonce_url.indexOf("initPage");var url_location=nonce_url.substring(url_subscript);var check_location_exit="initPage?topid=index_top&buid=index_head_exit_bu&tailid=tail";var check_location_regist="initPage?topid=register_top&buid=cust_info_mobile_register_change_edition_bu&tailid=tail";if(url_location.indexOf(check_location_exit)>=0||url_location.indexOf(check_location_regist)>=0){window.location="initPage?topid=index_top&buid=index&tailid=tail";}else{window.location.reload();if(document.getElementById("mid_cnt_utility_tools")){getmodule("mid_cnt_utility_tools","bo_id=mid_cnt_utility_tools");}getmodule("tail","bo_id=tail");}}return;}return;}}function goToLoginPage(){getmodule("pubwin","bo_id=cust_user_login_page_bo_div&logintype=login_div");}function custLogout(){var a=document.getElementById("login_mobile").value;var c="ajax.do?method=doApp&app_attribute=cust_info_register_app&uiid=&operationtype=logout&mobile="+a;var d=new Ajax.Request(c,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function b(e){str=e.responseText;}});if(str=="loginout_success"){window.location.reload();}else{alert("登录用户退出失败！");}}function topHeadLogout(a){if(a==null||a=="undefined"||a==""){alert("获取登录用户手机号为空，退出失败！");return;}var c="ajax.do?method=doApp&app_attribute=cust_info_register_app&uiid=&operationtype=logout&mobile="+a;var d=new Ajax.Request(c,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function b(e){str=e.responseText;}});if(str=="loginout_success"){window.location="initPage?topid=index_top&buid=index_head_exit_bu&tailid=tail";}else{alert("登录用户退出失败！");}}function autoCheckForLogin(){var c="";var a="";var f="";var d="ajax.do?method=doApp&app_attribute=cust_info_register_app&uiid=&operationtype=autochecklogin";var e=new Ajax.Request(d,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function b(g){str=g.responseText;}});if(str!=""){performAutoLogin(str);}else{}}function performAutoLogin(g){if(g!=""){var c="";var b="";var f="";var e=g.split("@|@");if(e.length==3){c=e[0];b=e[1];f=e[2];}var a='<span id="top_info" class="buttom_msg_txt"><span id="totalitem_Statistics"></span>&nbsp;<a href="initPage?topid=cust_top&buid=cust_info_index_bu&tailid=tail">'+b+'</a>&nbsp;|&nbsp;<a href="javascript:logoutOnHead();">退出</a>&nbsp;|&nbsp;<a href="initPage?topid=index_top&buid=helper_hot&tailid=tail">帮助</a></span>';document.getElementById("top_info").innerHTML=a;var d="&mobile="+c+"&nickname="+b+"&region_name="+f;getmodule("loginbox","bo_id=index_login_bo"+d);}}function getBackPasswordSubmit(){var e=document.getElementById("cust_mobile").value;if(!isCorrectMobile(e)){alert("请输入正确的移动手机号码！");return;}var c=document.getElementById("check").value;if(c==null||c==""){document.getElementById("reg_alert_5").innerHTML="";alert("请输入图片中的验证码！");return;}var b=document.getElementById("checkcodenum");if(b==null){document.getElementById("reg_alert_5").innerHTML="";alert("请输入图片中的验证码！");return;}if(b.value==1){alert("验证码错误！");return;}var f="ajax.do?method=doApp&app_attribute=cust_info_register_app&uiid=&operationtype=getpasswords&mobile="+e;var g=new Ajax.Request(f,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function d(h){str=h.responseText;}});if(str=="get_success"){alert("密码已成功发送手机"+e+"，请注意接收！");var a=window.location.href.split("&")[3].split("=")[1];a=unescape(a);window.location="initPage?topid=index_login_top&buid=cust_info_login_bu&tailid=tail&redirect_url="+a;}else{if(str=="not_register"){alert("手机("+e+")未注册，不能获取密码！");}else{alert("获取密码失败！");}}}function getBackPasswordPage(){var b=window.location.href;var a="initPage?"+b.split("initPage?")[1];a=escape(escape(a));if(b.indexOf("&redirect_url")!=-1){a=b.substr(b.indexOf("&redirect_url")+14,b.length);a=escape(a);}getmodule("pubwin","bo_id=get_back_password_bo_new&redirect_url="+a);}function callLoginInfoToHeadShowApp(){var c="";var a="";var g="";var d="ajax.do?method=doApp&app_attribute=cust_info_register_app&uiid=&operationtype=autochecklogin";var e=new Ajax.Request(d,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function b(h){str=h.responseText;}});if(str!=""){var f=str.split("@|@");if(f.length==3){c=f[0];a=f[1];g=(escape(f[2]));}}}function logoutOnHead(){getmodule("pubwin","bo_id=top_head_logout_bo");}function initDate(e,f,b){MonDays=[31,28,31,30,31,30,31,31,30,31,30,31];var j=new Date().getFullYear();var a=new Date().getMonth()+1;var g=new Date().getDate();for(var c=j-100;c<=j;c++){e.options.add(new Option(c,c));}e.value=j;for(var c=1;c<=12;c++){f.options.add(new Option(c,c));}f.value=a;var h=MonDays[a-1];if(a==2&&isLeapYear(e.options[e.selectedIndex].value)){h++;}createDay(h,b);b.value=new Date().getDate();}function changeDay(c,d,b){var f=c.options[c.selectedIndex].value;var a=d.options[d.selectedIndex].value;var e=MonDays[a-1];if(a==2&&isLeapYear(f)){e++;}createDay(e,b);stars.setStar();}function createDay(c,a){clearOptions(a);for(var b=1;b<=c;b++){a.options.add(new Option(b,b));}}function clearOptions(a){for(var b=a.options.length-1;b>=0;b--){a.remove(b);}}function isLeapYear(a){return(a%4==0||(a%100==0&&a%400==0));}function completeRegisterSubmit(){var l=document.getElementById("nickname").value;var c="3";var h=document.all.sex_radio;if(h[0].checked){c=h[0].value;}else{if(h[1].checked){c=h[1].value;}else{c=h[2].value;}}var o=document.getElementById("birth_year_select").value;var r=document.getElementById("birth_month_select").value;var a=document.getElementById("birth_day_select").value;var i="";if(o!=""&&r!=""&&a!=""){i=o+"-"+r+"-"+a;}var t=document.getElementById("manu_select").value;var q=document.getElementById("starValue").innerHTML;var e=document.getElementById("hometown_select").value;var k=document.getElementById("livingtown_select").value;var n=document.getElementById("pic").value;var d=document.getElementById("e_mail").value;if(d!=null&&d!=""){if(d.length>128){alert("电子邮件地址长度不能大于128字节！");return;}if(!isCorrectEMail(d)){alert("请输入正确的电子邮件地址！");return;}}var f=document.getElementById("fetion_number").value;if(f!=null&&f!=""){if(f.length>11){alert("飞信号码不能大于11字节！");return;}if(!isCorrectFetion(f)){alert("请输入正确的飞信号码！");return;}}var m=document.getElementById("e_mail_visible_checkbox");var g="0";if(m.checked){g="1";}var j=document.getElementById("fetion_visible_checkbox");var b="0";if(j.checked){b="1";}var p="&nickname="+l+"&cust_sex="+c+"&cust_birth="+i;if(t!=0){var s=document.getElementById("model_select").value;p+="&mobile_model_id="+s;}p+="&constellation="+q+"&hometown="+e+"&livingtown="+k;p+="&picture_path="+n+"&e_mail="+d+"&fetion_number="+f;p+="&e_mail_visible="+g+"&fetion_visible="+b;getmodule("main","bo_id=cust_user_login_better_info_submit_bo"+p);}function goToCheckCodePage(){var a=document.getElementById("mobile").value;getmodule("verifi_code","bo_id=cust_info_checkcode_page&mobile="+a);}function goBackToCheckMobilePage(){var a=document.getElementById("mobile").value;getmodule("main","bo_id=cust_info_check_mobile_page&mobile="+a);}function goBackToCheckCodePage(){var a=document.getElementById("mobile").value;getmodule("main","bo_id=cust_info_checkcode_page&mobile="+a);}var onlyChineseCharactor=function(a){a.value=a.value.replace(/[^\u4E00-\u9FA5]/g,"");};var stars={};stars.setSelect=function(g,f){var e=document.getElementById(g);var d=e.childNodes;var c=[];for(var b=0;b<d.length;b++){if(d[b].nodeType==1&&d[b].tagName.toUpperCase()=="OPTION"){c.push(d[b]);}}for(var a=0;a<c.length;a++){if(c[a].childNodes[0].nodeValue==String(f)){c[a].selected=true;break;}}};stars.Constellation=function(){this.data={"白羊座":["0321","0420"],"金牛座":["0421","0521"],"双子座":["0522","0621"],"巨蟹座":["0622","0722"],"狮子座":["0723","0823"],"处女座":["0824","0923"],"天秤座":["0924","1023"],"天蝎座":["1024","1122"],"射手座":["1123","1221"],"魔羯座":["1222","0120"],"水瓶座":["0121","0219"],"双鱼座":["0220","0320"]};};stars.Constellation.prototype={getStar:function(a){if(a.length!=4||isNaN(a)){alert("输入参数错误,date:"+a);return false;}for(var b in this.data){if(a>=this.data[b][0]&&a<=this.data[b][1]){return b;}}if(a>="1222"||a<="0120"){return"魔羯座";}},getTwo:function(a){if(isNaN(a)){alert("输入参数错误,n:"+a);return false;}return a<=9?"0"+a:a;}};stars.setStar=function(){var b=new stars.Constellation();var d=document.getElementById("birth_month_select").value;var a=document.getElementById("birth_day_select").value;var c=b.getStar(b.getTwo(d)+b.getTwo(a));stars.setSelect("constellation_select",c);document.getElementById("starValue").innerText=c;};stars.getText=function(b){var c=b.childNodes;for(var a=0;a<c.length;a++){if(c[a].nodeType==3){return c[a].nodeValue;}}};stars.getSelectText=function(d,c){var b=d.childNodes;for(var a=0;a<b.length;a++){if(b[a].nodeType==1){if(b[a].getAttribute("value")==c){return stars.getText(b[a]);}}}return null;};stars.selectStar={};function getProvince(a){getCustRegion("",a);}function getCustRegion(prov_id,region_id,prov_name,region_name){var provValue;var provCityName;var _queryId=region_id;if(prov_id){provObj=document.getElementById(prov_id);if(provObj&&provObj.selectedIndex!=-1){provCityName=provObj.options[provObj.selectedIndex].name;provValue=provObj.options[provObj.selectedIndex].id;}else{_queryId=prov_id;}}var requestURL="ajax.do?method=doApp&app_attribute=getCustRegionCode"+(provValue?"&provinceId="+provValue:"");var myAjax=new Ajax.Request(requestURL,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function back(response){str=response.responseText;}});var strObj=eval("("+str+")");var size=strObj.list.length;if(size<1){return;}var desdObj=document.getElementById(_queryId);while(desdObj.childNodes.length>0){desdObj.removeChild(desdObj.firstChild);}if(provValue){for(var i=0;i<size;i++){desdObj.add(new Option(strObj.list[i].regionName,strObj.list[i].regionName));if(region_name){if(region_name==strObj.list[i].regionName){desdObj.selectedIndex=i;}}else{if(provCityName==strObj.list[i].regionName){desdObj.selectedIndex=i;}}}}else{for(var i=0;i<size;i++){var op=document.createElement("option");var text=document.createTextNode(strObj.list[i].provName);op.appendChild(text);op.value=strObj.list[i].provName;op.id=strObj.list[i].provId;op.name=strObj.list[i].cityName;desdObj.appendChild(op);if(!prov_name&&op.id=="10"){op.selected=true;}else{if(prov_name&&prov_name!=""){if(trim(op.value)==prov_name){op.selected=true;}}}}if(prov_name!=null){if(prov_name!=""){getCustRegion(prov_id,region_id,"",region_name);}else{getCustRegion(prov_id,region_id);}}}}function getCustAccountRegion(b,c){var a=document.getElementById("hidProvName").innerText;var d=document.getElementById("hidRegionName").innerText;getCustRegion(b,c,trim(a),trim(d));}function doCheck(){var a=getVal("text");if(!isCorrectChinese(a)){if(!isCorrectMobile(a)){document.getElementById("cust_search_infoMSG").innerHTML="请输入正确的手机号或者昵称";}else{document.getElementById("cust_search_infoMSG").innerHTML="";frmanage_frsearch_submit("cust_mobile",a);}}else{document.getElementById("cust_search_infoMSG").innerHTML="";frmanage_frsearch_submit("nickname",a);}}function doNext(){window.location="initPage?topid=register_top&buid=cust_info_guess_you_like_other_bu&tailid=tail";}function indexHelp(){window.open("initPage?topid=index_top&buid=index_bargain&tailid=tail");}function clearValue(a){a.className="font_click";document.getElementById("text").value="";}function orderRing(a){var b=window.confirm("请确认是否购买？");if(b){var c=a;buyRing(c);}}function checkIsNotLogin(a){if(!document.getElementById("nickname")){getmodule("pubwin","bo_id=cust_user_login_page_bo_div&logintype=login_div");}else{window.location="initPage?topid=board_top&buid=topics&tailid=tail&board_id="+a+"#to_publish_board_topic_anchor";}}function checkInvite(){if(!document.getElementById("nickname")){getmodule("pubwin","bo_id=cust_user_login_page_bo_div&logintype=login_div");}else{getmodule("pubwin","bo_id=frmanage_invite");}}function checkIsJoin(){var c=getVal("cust_id");var b=document.getElementById("myselfEvent");var a=document.getElementById("joinP");if(c!=""&&typeof(a)!="undefined"&&a!=null){b.style.display="block";a.innerHTML="<table border='0'><tr><td><div class='btn_star'><a href='initPage?topid=cust_top&buid=school_singer_upload_photos_bu&tailid=tail'>上传相片</a></div></td><td><div class='btn_star'><a href='initPage?topid=cust_top&buid=school_singer_upload_videos_bu&tailid=tail'>上传视频</a></div></td></tr></table>";}else{if(typeof(a)!="undefined"&&a!=null){b.style.display="none";a.innerHTML="<a href='javascript:checkIsLogin_event_school();'><img src='"+basePath+"/images/btn_regist0.gif' alt='我要报名' name='regist' width='139' height='58' border='0' id='regist' /></a>";}}}function setPageButtonContent(){var a=document.getElementById("joinP");var c=document.getElementById("my_matchs");var b=getVal("cust_id");if(b!=""&&typeof(a)!="undefined"&&a!=null){c.style.display="inline";a.innerHTML="<table border='0'><tr><td><div class='btn_star'><a href='initPage?topid=cust_top&buid=school_singer_upload_photos_bu&tailid=tail'>上传相片</a></div></td><td><div class='btn_star'><a href='initPage?topid=cust_top&buid=school_singer_upload_videos_bu&tailid=tail'>上传视频</a></div></td></tr></table>";}else{if(typeof(a)!="undefined"&&a!=null){c.style.display="none";a.innerHTML="<a href='javascript:checkIsLogin_event_school();'><img src='"+basePath+"/images/btn_regist0.gif' alt='我要报名' name='regist' width='139' height='58' border='0' id='regist' /></a>";}}}function seEventDescMygamesLitStyle(){var a=document.getElementById("event_desc_mygames_li");var b=getVal("cust_id");if(b!=""){a.style.display="inline";}}function eventRedirect(a){if(a=="0"){window.location="initPage?topid=event_static_top&buid=event_con_bu&tailid=tail&activity_id="+getVal("activity_id")+"&activity_type=1";}if(a=="1"){window.location="initPage?topid=event_static_top&buid=school_song_introduce_bu&tailid=tail&activity_id="+getVal("activity_id")+"&activity_type=1";}if(a=="2"){window.location="initPage?topid=cust_top&buid=school_song&tailid=tail";}}function checkIsLogin_event_school(){var a=getVal("nickname");if(a==""){callLoginDIV("returnSign","");}else{var c="ajax.do?method=doApp&app_attribute=prodIsSubQuery&productid=1008";var d=new Ajax.Request(c,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function b(e){str=e.responseText;}});if(str==0){getmodule("pubwin","bo_id=school_singer_msg_bo");}else{window.location="initPage?topid=cust_top&buid=school_singer_first&tailid=tail";}}}function checkIsLogin_event_school_player_info(){var a=getVal("nickname");if(a==""){callLoginDIV("","");}else{var c="ajax.do?method=doApp&app_attribute=prodIsSubQuery&productid=1011";var d=new Ajax.Request(c,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function b(e){str=e.responseText;}});if(str==1){alert("您还没有完成第一步，请完成后再填写个人资料！");return;}else{if(str==0){var c="ajax.do?method=doApp&app_attribute=checkSingerIsNotRegist";var d=new Ajax.Request(c,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function b(e){str=e.responseText;}});if(str=="1"){alert("你已经注册完善本信息，不需要再完善了！");return;}else{getmodules("main","event_school_singer_for_migu_bu");}}else{alert("系统错误，请联系管理员！");return;}}}}function returnSign(){self.location="initPage?topid=cust_top&buid=school_singer_first&tailid=tail";}function deleteValue(){document.getElementById("mobile_txt").value="";}function checkMobileGetValidate(){var c=document.getElementById("mobile_txt").value;if(!isCorrectMobile(c)){document.getElementById("message_error_1").style.display="block";document.getElementById("message_error_text_1").innerHTML="请输入正确的移动手机号码！";document.getElementById("mobile_txt").focus();document.getElementById("mobile_txt").value="";return;}else{document.getElementById("message_error_1").style.display="none";}if(isCorrectMobile(c)){var e="ajax.do?method=doApp&app_attribute=cust_info_register_app&uiid=&operationtype=is_not_register&mobile="+c;var f=new Ajax.Request(e,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function b(g){regist_str=g.responseText;}});if(regist_str=="regist_mobile"){alert("当前手机号"+c+"已经注册过，不需要重新注册！");window.location="initPage?topid=register_top&buid=cust_info_mobile_register_change_edition_bu&tailid=tail";}else{if(regist_str=="not_regist_mobile"){var e="ajax.do?method=doApp&app_attribute=cust_info_checkMobile_app&uiid=&operationtype=generate&mobile="+c;var f=new Ajax.Request(e,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function b(g){str=g.responseText;}});if(str=="is_not_sc_mobile"){document.getElementById("message_error_1").style.display="block";document.getElementById("message_error_text_1").innerHTML="仅支持中国移动四川用户！";return;}else{document.getElementById("message_error_1").style.display="none";}var a=callGenerateCheckcodeApp(c);if(a!="not_overrun_8_hours"){for(var d=1;d<=7;d++){document.getElementById("message_"+d).style.display="block";}}else{window.location="initPage?topid=index_top&buid=index&tailid=tail";}}}}}function checkMobileGetValidateForChangePwd(){var b=document.getElementById("mobile_txt").value;if(!isCorrectMobile(b)){document.getElementById("message_error_1").style.display="block";document.getElementById("message_error_text_1").innerHTML="请输入正确的移动手机号码！";document.getElementById("mobile_txt").value="";return;}else{document.getElementById("message_error_1").style.display="none";}var c="ajax.do?method=doApp&app_attribute=cust_info_checkMobile_app&uiid=&operationtype=generate&mobile="+b;var d=new Ajax.Request(c,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function a(e){str=e.responseText;}});if(str=="is_not_sc_mobile"){document.getElementById("message_error_1").style.display="block";document.getElementById("message_error_text_1").innerHTML="仅支持中国移动四川用户！";return;}else{document.getElementById("message_error_1").style.display="none";}callGenerateCheckcodeAppForChangPwd(b);document.getElementById("set_pwd").style.display="none";document.getElementById("change_password_div").style.display="block";document.getElementById("mobile_number").innerHTML=b;}function checkCodeNew(){var c=document.getElementById("mobile_txt").value;var d=document.getElementById("checkcode").value;var g=document.getElementById("message_code_new");var a=document.getElementById("code_span");if(d==""||d==null){g.style.display="inline";return;}else{g.style.display="none";}if(!isCorrectCheckcode(d)){g.style.display="inline";return;}else{g.style.display="none";}if(!isCorrectMobile(c)){g.style.display="inline";return;}var e="ajax.do?method=doApp&app_attribute=cust_info_by_check_code&uiid=&mobile="+c+"&checkcode="+d;var f=new Ajax.Request(e,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function b(h){str=h.responseText;}});if(str=="success"){g.style.display="none";}else{alert("验证码输入错误，请重新获取验证码！");window.location="initPage?topid=register_top&buid=cust_info_mobile_register_change_edition_bu&tailid=tail";}}function checkPwdNew(){var a=document.getElementById("upwd_new").value;var b=document.getElementById("message_pwd_new");if(!isCorrectPasswords(a)){b.style.display="inline";return;}else{b.style.display="none";}}function checkPwdAgainNew(){var c=document.getElementById("upwd_new").value;var a=document.getElementById("password_new_second").value;var b=document.getElementById("message_pwd_again");if(c!=a){b.style.display="inline";b.innerHTML="您输入的重复密码与上一次不一致，请重新输入！";return;}else{b.style.display="none";}if(!isCorrectPasswords(a)){b.style.display="inline";b.innerHTML="您输入的重复密码格式不正确，请重新输入！";return;}else{b.style.display="none";}}function infoRegisterNew(){if(document.getElementById("checkbox1").checked){var g=document.getElementById("upwd_new").value;var b=document.getElementById("mobile_txt").value;var f=document.getElementById("nickname").value;var h=document.getElementById("password_new_second").value;var d=document.getElementById("checkcode");if(b==""||b==null){alert("手机号不能为空！");return;}if(d==""||d==null){alert("验证码不能为空！");return;}if(h==""||h==null){alert("确认密码不能为空！");return;}if(g==""||g==null){alert("密码不能为空！");return;}if(g.length<6||g.length>16){return;}if(f==""||f==null){alert("昵称不能为空！");return;}var i=docheckkey(f);if(i=="false"){alert("你输入了非法字符！");return;}if(g==h){var c="ajax.do?method=doApp&app_attribute=cust_info_register_app&uiid=&operationtype=register&mobile="+b+"&passwords="+g+"&nickname="+f;var a=new Ajax.Request(c,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function e(j){str=j.responseText;}});if(str!=null&&str!=""&&str!="false"){alert("注册成功！");getmodule("main","bo_id=cust_info_mobile_register_change_edition_success_bo&mobile="+b+"&nickname="+f);}else{alert("注册失败，请重新注册！");self.location="initPage?topid=register_top&buid=cust_info_mobile_register_change_edition_bu&tailid=tail";}}else{alert("两次密码不一致！");}}else{alert("请认真阅读服务条款，勾选后再注册！");}}function getDivForLogin(){getmodule("pubwin","bo_id=cust_user_login_page_div_new_bo&logintype=login_div");}function checkLoginMobile(){var b=document.getElementById("mobile_txt").value;var a=document.getElementById("input_error_mobile");if(!isCorrectMobile(b)){a.style.display="block";return;}else{a.style.display="none";}}function callGenerateCheckcodeAppForChangPwd(b){var c="ajax.do?method=doApp&app_attribute=cust_info_register_app&uiid=&operationtype=generate&mobile="+b;var d=new Ajax.Request(c,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function a(e){str=e.responseText;}});if(str=="success"){checkCodeCount++;alert("注册验证码已成功发送手机"+b+"，请注意接收！");}else{if(str=="is_not_sc_mobile"){alert("您的手机号不属于中国移动四川号码，不能注册！");}else{alert("获取验证码失败！"+b);}}}function setPwdCommit(){var c=document.getElementById("mobile_number").innerHTML;var d=document.getElementById("checkcode").value;var g=document.getElementById("upwd_new").value;var a=document.getElementById("password_new_second").value;if(d==""||d==null){alert("验证码不能为空！");return;}if(g==""||g==null){alert("密码不能为空！");return;}if(g!=a){alert("两次密码不一致！");return;}var e="ajax.do?method=doApp&app_attribute=cust_info_set_pwd_app&uiid=&mobile="+c+"&checkcode="+d+"&pwd="+g;var f=new Ajax.Request(e,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function b(h){str=h.responseText;}});if(str=="false"){alert("验证码输入错误，请重新获取验证码！");window.location="initPage?topid=register_top&buid=cust_user_login_change_password_bu&tailid=tail";}else{if(str=="success"){alert("密码修改成功！");window.location="initPage?topid=index_top&buid=index&tailid=tail";}}}function turnToCustCenter(){if(document.getElementById("email").checked==true){var b="ajax.do?method=doApp&app_attribute=busiSubProd&productId=1014&actionType=0&type=undefined";var c=new Ajax.Request(b,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function a(d){str=d.responseText;}});}window.location="initPage?topid=cust_top&buid=cust_info_index_bu&tailid=tail";}function changeLabelByCustCenter(a){if(a=="set_1"){document.getElementById("cust_info_a").className="sel";document.getElementById("cust_info_b").className="";document.getElementById("cust_info_c").className="";document.getElementById("cust_info_d").className="";document.getElementById("cust_info_e").className="";document.getElementById("cust_info_f").className="";document.getElementById("btn_submit").style.display="block";document.getElementById("favorite_submit").style.display="none";document.getElementById("images_submit").style.display="none";document.getElementById("set_1").style.display="block";document.getElementById("set_2").style.display="none";document.getElementById("set_3").style.display="none";document.getElementById("set_4").style.display="none";document.getElementById("set_5").style.display="none";document.getElementById("set_6").style.display="none";}else{if(a=="set_2"){document.getElementById("cust_info_a").className="";document.getElementById("cust_info_b").className="sel";document.getElementById("cust_info_c").className="";document.getElementById("cust_info_d").className="";document.getElementById("cust_info_e").className="";document.getElementById("cust_info_f").className="";document.getElementById("btn_submit").style.display="none";document.getElementById("favorite_submit").style.display="none";document.getElementById("images_submit").style.display="block";document.getElementById("set_1").style.display="none";document.getElementById("set_2").style.display="block";document.getElementById("set_3").style.display="none";document.getElementById("set_4").style.display="none";document.getElementById("set_5").style.display="none";document.getElementById("set_6").style.display="none";}else{if(a=="set_3"){document.getElementById("cust_info_a").className="";document.getElementById("cust_info_b").className="";document.getElementById("cust_info_c").className="sel";document.getElementById("cust_info_d").className="";document.getElementById("cust_info_e").className="";document.getElementById("cust_info_f").className="";document.getElementById("btn_submit").style.display="none";document.getElementById("favorite_submit").style.display="none";document.getElementById("images_submit").style.display="none";document.getElementById("set_1").style.display="none";document.getElementById("set_2").style.display="none";document.getElementById("set_3").style.display="block";document.getElementById("set_4").style.display="none";document.getElementById("set_5").style.display="none";document.getElementById("set_6").style.display="none";}else{if(a=="set_4"){document.getElementById("cust_info_a").className="";document.getElementById("cust_info_b").className="";document.getElementById("cust_info_c").className="";document.getElementById("cust_info_d").className="sel";document.getElementById("cust_info_e").className="";document.getElementById("cust_info_f").className="";document.getElementById("btn_submit").style.display="block";document.getElementById("favorite_submit").style.display="none";document.getElementById("images_submit").style.display="none";document.getElementById("set_1").style.display="none";document.getElementById("set_2").style.display="none";document.getElementById("set_3").style.display="none";document.getElementById("set_4").style.display="block";document.getElementById("set_5").style.display="none";document.getElementById("set_6").style.display="none";}else{if(a=="set_5"){document.getElementById("cust_info_a").className="";document.getElementById("cust_info_b").className="";document.getElementById("cust_info_c").className="";document.getElementById("cust_info_d").className="";document.getElementById("cust_info_e").className="sel";document.getElementById("cust_info_f").className="";document.getElementById("btn_submit").style.display="block";document.getElementById("favorite_submit").style.display="none";document.getElementById("images_submit").style.display="none";document.getElementById("set_1").style.display="none";document.getElementById("set_2").style.display="none";document.getElementById("set_3").style.display="none";document.getElementById("set_4").style.display="none";document.getElementById("set_5").style.display="block";document.getElementById("set_6").style.display="none";}else{if(a=="set_6"){document.getElementById("cust_info_a").className="";document.getElementById("cust_info_b").className="";document.getElementById("cust_info_c").className="";document.getElementById("cust_info_d").className="";document.getElementById("cust_info_e").className="";document.getElementById("cust_info_f").className="sel";document.getElementById("btn_submit").style.display="none";document.getElementById("favorite_submit").style.display="block";document.getElementById("images_submit").style.display="none";document.getElementById("set_1").style.display="none";document.getElementById("set_2").style.display="none";document.getElementById("set_3").style.display="none";document.getElementById("set_4").style.display="none";document.getElementById("set_5").style.display="none";document.getElementById("set_6").style.display="block";}}}}}}}function changeCheckBoxByfavorite(e,c){var d=["favorite_1","favorite_2","favorite_3","favorite_4","favorite_5","favorite_6","favorite_7","favorite_8","favorite_9","favorite_10","favorite_11","favorite_12","favorite_13","favorite_14","favorite_15","favorite_16","favorite_17","favorite_18","favorite_19","favorite_20","favorite_21","favorite_22","favorite_23","favorite_24","favorite_25","favorite_26","favorite_27","favorite_28","favorite_29","favorite_30","favorite_31","favorite_32","favorite_33","favorite_34","favorite_35","favorite_36"];var a=document.getElementById(c).innerHTML;for(var b=0;b<d.length;b++){if(e==d[b]&&document.getElementById(e).checked==true){document.getElementById("hidden_favorite").value=document.getElementById("hidden_favorite").value+a+"；";}else{if(e==d[b]&&document.getElementById(e).checked==false){document.getElementById("hidden_favorite").value=(document.getElementById("hidden_favorite").value).replace(a+"；","");}}}}function favoriteSubmit(){var a=document.getElementById("hidden_favorite").value+document.getElementById("favorite_context").value;if(a.length==0){alert("兴趣爱好为空，则不能提交！");return false;}else{if(a.length>200){alert("兴趣爱好不能超过200字！");return false;}}alert(a);getmodule("pubwin","bo_id=cust_index_info_favorite_bo&favorite_param="+a);}function saveHeadImg(){var c=document.getElementById("showpic").src;var b=c.indexOf("upload");var f=c.slice(b);var d="ajax.do?method=doApp&app_attribute=cust_info_register_app&uiid=&operationtype=save_img&img_src="+f;var e=new Ajax.Request(d,{asynchronous:false,method:"get",evalScripts:true,onSuccess:function a(g){str=g.responseText;}});if(str=="save_success"){alert("上传成功！");window.location="initPage?topid=cust_top&buid=cust_index_update_info_bu&tailid=tail";}else{if(str=="save_unsuccess"){alert("上传失败！");}}}