function test() { alert("ok"); } function openWin(url) { window.open(url,"",""); } function show_calendar(id) { var x,y,URL,para; x = event.clientX + 20; y = event.clientY + 120; URL='calendar.asp?form=form1&field=' + id; para='directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,left='+x+',top='+y+',width=190,height=140' window.open(URL,'',para); } //trim spaces with regular expression String.prototype.trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ""); } //Count string byte number, return integer String.prototype.ByteCount = function() { txt = this.replace(/(<.*?>)/ig,""); txt = txt.replace(/([\u0391-\uFFE5])/ig, "11"); var count = txt.length; return count; } function default_focus(objName) { eval("document.form1."+objName+".focus();"); } //check empty when mouse lost the input box function check_must_input(thisinput,infoid) { if( thisinput.value.trim() == "" ) { eval(infoid+".className='show null';"); eval(infoid+".innerHTML='必填项目!';"); } } //check empty when mouse lost the input box function check_maybe_input(thisinput,infoid) { if( thisinput.value.trim() == "" ) { eval(infoid+".className='show maybe';"); eval(infoid+".innerHTML='填了会更方便';"); } } //--------------------------------------------------Uname---------------------------------------------- //mouse onclick the Uname box function click_Uname_input(thisinput) { regUnameinfo.className="show exactness"; regUnameinfo.innerHTML="必须在2至20个字符之间"; } //mouse lost the Uname box function check_Uname_input(thisinput) { var count = thisinput.value.trim().ByteCount(); var rn = /^[a-zA-Z0-9\-\_]{2,20}$/; if( count == 0 ) { regUnameinfo.className="show null"; regUnameinfo.innerHTML="必填项目!"; default_focus("Uname"); } else if ((!thisinput.value.match(rn)) || (count < 2 || count > 20)) { regUnameinfo.className="show err"; regUnameinfo.innerHTML="输入无效!"; default_focus("Uname"); } else { document.all.check_now.src="lib-check-reg.asp?Uname=" + thisinput.value.trim(); } } //--------------------------------------------------email---------------------------------------------- //mouse onclick the email box function click_email_input(thisinput) { regemailinfo.className = "show exactness"; regemailinfo.innerHTML = "您个人的E-mail"; } //mouse lost the email box function check_email_input(thisinput) { var re = /^[_a-zA-Z0-9\-\.]+@([\-_a-zA-Z0-9]+\.)+[a-zA-Z0-9]{2,3}$/; if ( (thisinput.value.trim() == "") ) { regemailinfo.className = "show null"; regemailinfo.innerHTML = "必填项目!"; } if (thisinput.value.trim() != ""){ if (!thisinput.value.match(re)) { regemailinfo.className = "show err"; regemailinfo.innerHTML = "输入无效!"; default_focus("email"); } else { document.all.check_now.src="lib-check-reg.asp?email=" + thisinput.value.trim(); } } } //--------------------------------------------------password---------------------------------------------- //mouse onclick the password box function click_password_input(thisinput) { regpassinfo.className = "show exactness"; regpassinfo.innerHTML = "必须在2至20个字符之间"; } //mouse lost the password box function check_password_input(thisinput) { var count = thisinput.value.trim().ByteCount(); if ( (thisinput.value.trim() == "") ) { regpassinfo.className="show null"; regpassinfo.innerHTML="必填项目!"; } else if ( count < 6 || count > 20 ) { regpassinfo.className = "show err"; regpassinfo.innerHTML = "输入无效!"; default_focus("Upsw"); } else { regpassinfo.className = "show exactness"; regpassinfo.innerHTML = "通过!"; } } //--------------------------------------------------confirm password---------------------------------------------- //mouse onclick the chkpass box function click_chkpass_input(thisinput) { var oPass = form1.Upsw.value; if( oPass == "") { form1.Upsw.focus(); }else{ regpass2info.className="show exactness"; regpass2info.innerHTML="请再输入一次密码"; } } //mouse lost the chkpass box function check_chkpass_input(thisinput) { var oPass = document.form1.Upsw.value; if( thisinput.value=="" ) { regpass2info.className="show null"; regpass2info.innerHTML = "必填项目!"; } else if(thisinput.value != oPass) { regpass2info.className="show err"; regpass2info.innerHTML = "跟上面的密码不相同!"; default_focus("chkUpsw"); } else { regpass2info.className = "show exactness"; regpass2info.innerHTML = "通过!"; } } //--------------------------------------------------password2---------------------------------------------- //mouse onclick the password2 box function click_password2_input(thisinput) { regpassinfo2.className = "show exactness"; regpassinfo2.innerHTML = "必须在2至20个字符之间"; } //mouse lost the password2 box function check_password2_input(thisinput) { var count = thisinput.value.trim().ByteCount(); if ( (thisinput.value.trim() == "") ) { regpassinfo2.className="show null"; regpassinfo2.innerHTML="必填项目!"; } else if ( count < 6 || count > 20 ) { regpassinfo2.className = "show err"; regpassinfo2.innerHTML = "输入无效!"; default_focus("Upsw2"); } else { regpassinfo2.className = "show exactness"; regpassinfo2.innerHTML = "通过!"; } } //--------------------------------------------------confirm password2---------------------------------------------- //mouse onclick the chkpass2 box function click_chkpass2_input(thisinput) { var oPass = form1.Upsw2.value; if( oPass == "") { form1.Upsw2.focus(); }else{ regpass2info2.className="show exactness"; regpass2info2.innerHTML="请再输入一次密码"; } } //mouse lost the chkpass2 box function check_chkpass2_input(thisinput) { var oPass = form1.Upsw2.value; if( thisinput.value=="" ) { regpass2info2.className="show null"; regpass2info2.innerHTML = "必填项目!"; } else if(thisinput.value != oPass) { regpass2info2.className="show err"; regpass2info2.innerHTML = "跟上面的密码不相同!"; default_focus("chkUpsw2"); } else { regpass2info2.className = "show exactness"; regpass2info2.innerHTML = "通过!"; } } //--------------------------------------------------psw---------------------------------------------- //mouse lost the password box function check_psw_input(thisinput) { var count = thisinput.value.trim().ByteCount(); var re = /^[a-zA-Z0-9]*[a-zA-Z]+[a-zA-Z0-9]*$/; if ( thisinput.value.trim() == "" ) { regpswinfo.className="show null"; regpswinfo.innerHTML="必填项目!"; } else if ( count < 6 || count > 20 ) { regpswinfo.className = "show err"; regpswinfo.innerHTML = "输入位数无效!"; default_focus("psw"); } else if (!thisinput.value.match(re)) { regpswinfo.className = "show err"; regpswinfo.innerHTML = "无效!6-20位字母和数字,至少有一个字母"; default_focus("psw"); } else { regpswinfo.className = "show exactness"; regpswinfo.innerHTML = "通过!"; } } function check_psw2_input(thisinput) { var oPass = document.form1.psw.value; if( thisinput.value=="" ) { regpsw2info.className="show null"; regpsw2info.innerHTML = "必填项目!"; } else if(thisinput.value != oPass) { regpsw2info.className="show err"; regpsw2info.innerHTML = "跟上面的密码不相同!"; default_focus("psw2"); } else { regpsw2info.className = "show exactness"; regpsw2info.innerHTML = "通过!"; } } //--------------------------------------------------website---------------------------------------------- //mouse onclick the website box function click_website_input(thisinput) { regwebsiteinfo.className="show exactness"; regwebsiteinfo.innerHTML="请以http://开头"; } //mouse lost the website box function check_website_input(thisinput) { var count = thisinput.value.trim().ByteCount(); if( count == 0 ) { //regwebsiteinfo.className="show maybe"; //regwebsiteinfo.innerHTML="填了会更方便!"; regwebsiteinfo.className="show null"; regwebsiteinfo.innerHTML = "必填项目!"; } else if ((thisinput.value.trim() != "") && (count < 2 || count > 50)) { regwebsiteinfo.className="show err"; regwebsiteinfo.innerHTML="输入无效!"; default_focus("website"); } else { regwebsiteinfo.className = "show exactness"; regwebsiteinfo.innerHTML = "通过!"; } } //--------------------------------------------------company---------------------------------------------- //mouse onclick the company box function click_company_input(thisinput) { regcompanyinfo.className="show exactness"; regcompanyinfo.innerHTML="必须在2至50个汉字之间"; } //mouse lost the company box function check_company_input(thisinput) { var count = thisinput.value.trim().ByteCount(); if( count == 0 ) { //regcompanyinfo.className="show maybe"; //regcompanyinfo.innerHTML="填了会更方便!"; regcompanyinfo.className="show null"; regcompanyinfo.innerHTML = "必填项目!"; } else if ((thisinput.value.trim() != "") && (count < 2 || count > 50)) { regcompanyinfo.className="show err"; regcompanyinfo.innerHTML="输入无效!"; default_focus("company"); } else { regcompanyinfo.className = "show exactness"; regcompanyinfo.innerHTML = "通过!"; } } //--------------------------------------------------Faddr---------------------------------------------- //mouse onclick the Faddr box function click_Faddr_input(thisinput) { regFaddrinfo.className="show exactness"; regFaddrinfo.innerHTML="必须在2至50个汉字之间"; } //mouse lost the Faddr box function check_Faddr_input(thisinput) { var count = thisinput.value.trim().ByteCount(); if( count == 0 ) { regFaddrinfo.className="show maybe"; regFaddrinfo.innerHTML="填了会更方便!"; } else if ((thisinput.value.trim() != "") && (count < 2 || count > 50)) { regFaddrinfo.className="show err"; regFaddrinfo.innerHTML="输入无效!"; default_focus("Faddr"); } else { regFaddrinfo.className = "show exactness"; regFaddrinfo.innerHTML = "通过!"; } } //--------------------------------------------------postcode------------------------------------------- //mouse onclick the postcode box function click_postcode_input(thisinput) { regpostcodeinfo.className="show exactness"; regpostcodeinfo.innerHTML=""; } //mouse lost the postcode box function check_postcode_input(thisinput) { var count = thisinput.value.trim().ByteCount(); //var rai = /^\d{6}$/; if (count == 0) { regpostcodeinfo.className="show maybe"; regpostcodeinfo.innerHTML="填了会更方便!"; } else if (count < 2 || count > 20) { regpostcodeinfo.className='show err'; regpostcodeinfo.innerHTML="输入无效!"; default_focus("postcode"); } else { regpostcodeinfo.className = 'show exactness'; regpostcodeinfo.innerHTML = '通过!'; } } //--------------------------------------------------change Byear-------------------------------------- function change_Byear(thisinput) { var yyyy = thisinput.value.trim(); if( yyyy != "" ) { document.all.age.value = year2age(yyyy); document.all.animal.value = year2animal(yyyy); } } function year2age(yyyy) { var now = new Date(); var nowY = now.getYear(); return nowY-yyyy; } function year2animal(yyyy) { var Animals = new Array("鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"); return Animals[(yyyy-4)%12]; } //--------------------------------------------------change Bmonth / Bday-------------------------------------- function change_Bmonth(thisinput) { var mm = thisinput.value.trim(); if( mm != "" ) { dd = document.all.Bday.value; if( dd != "" ){document.all.star.value = mmdd2star(mm,dd)} } } function change_Bday(thisinput) { var dd = thisinput.value.trim(); if( dd != "" ) { mm = document.all.Bmonth.value; if( dd != "" ){document.all.star.value = mmdd2star(mm,dd)} } } function mmdd2star(mm,dd) { if (mm == 1 && dd >=20 || mm == 2 && dd <=18) {return "水瓶座";} if (mm == 2 && dd >=19 || mm == 3 && dd <=20) {return "双鱼座";} if (mm == 3 && dd >=21 || mm == 4 && dd <=19) {return "白羊座";} if (mm == 4 && dd >=20 || mm == 5 && dd <=20) {return "金牛座";} if (mm == 5 && dd >=21 || mm == 6 && dd <=21) {return "双子座";} if (mm == 6 && dd >=22 || mm == 7 && dd <=22) {return "巨蟹座";} if (mm == 7 && dd >=23 || mm == 8 && dd <=22) {return "狮子座";} if (mm == 8 && dd >=23 || mm == 9 && dd <=22) {return "室女座";} if (mm == 9 && dd >=23 || mm == 10 && dd <=22) {return "天秤座";} if (mm == 10 && dd >=23 || mm == 11 && dd <=21) {return "天蝎座";} if (mm == 11 && dd >=22 || mm == 12 && dd <=21) {return "人马座";} if (mm == 12 && dd >=22 || mm == 1 && dd <=19) {return "摩羯座";} } //--------------------------------------------------note---------------------------------------------- //mouse onclick the note textarea function click_note_input(thisinput) { regnoteinfo.className="show exactness"; regnoteinfo.innerHTML="限10字到1000字之间"; } //mouse lost the note textarea function check_note_input(thisinput) { if( thisinput.value.length == 0 ) { regnoteinfo.className="show null"; regnoteinfo.innerHTML="必填项目!"; } else if((thisinput.value != "") && (thisinput.value.length < 10 || thisinput.value.length > 1000)) { regnoteinfo.className="show err"; regnoteinfo.innerHTML="输入无效!"; default_focus("note"); } else { regnoteinfo.className = "show exactness"; regnoteinfo.innerHTML = "通过!"; } } //--------------------------------------------------checkcode---------------------------------------------- //mouse onclick the checkcode box function click_checkcode_input(thisinput) { regcheckcodeinfo.className="show exactness"; regcheckcodeinfo.innerHTML=""; } function change_checkcode_input(thisinput) { var count = thisinput.value.trim().ByteCount(); var rai = /^\d{4}$/; if (!thisinput.value.match(rai)) { regcheckcodeinfo.className='show err'; regcheckcodeinfo.innerHTML="输入无效!"; default_focus("checkcode"); } } //mouse lost the checkcode box function check_checkcode_input(thisinput) { var count = thisinput.value.trim().ByteCount(); var rai = /^\d{4}$/; if (count == 0) { regcheckcodeinfo.className="show null"; regcheckcodeinfo.innerHTML="必填项目!"; } else if (!thisinput.value.match(rai)) { regcheckcodeinfo.className='show err'; regcheckcodeinfo.innerHTML="输入无效!"; default_focus("checkcode"); } else { document.all.check_now.src="lib-check-reg.asp?Ccode=" + thisinput.value.trim(); } } //--------------------------------------------------realname---------------------------------------------- //mouse onclick the realname box function click_realname_input(thisinput) { regrealnameinfo.className="show exactness"; regrealnameinfo.innerHTML="请填身份证上的姓名"; } //mouse lost the realname box function check_realname_input(thisinput) { var count = thisinput.value.trim().ByteCount(); if( count == 0 ) { regrealnameinfo.className="show null"; regrealnameinfo.innerHTML="必填项目!"; } else if ((thisinput.value.trim() != "") && (count < 2 || count > 20)) { regrealnameinfo.className="show err"; regrealnameinfo.innerHTML="输入无效!"; default_focus("Rname"); } else { regrealnameinfo.className = 'show exactness'; regrealnameinfo.innerHTML = '通过!'; } } //--------------------------------------------------idnum---------------------------------------------- //mouse onclick the idnum box function click_idnum_input(thisinput) { regidnuminfo.className="show exactness"; regidnuminfo.innerHTML="请填15或18位身份证号"; } //mouse lost the idnum box function check_idnum_input(thisinput) { var count = thisinput.value.trim().ByteCount(); var rai = /^\d{15}$|^\d{18}$|^\d{17}x$/; if (count == 0) { regidnuminfo.className="show null"; regidnuminfo.innerHTML="必填项目!"; } else if (!thisinput.value.match(rai)) { regidnuminfo.className='show err'; regidnuminfo.innerHTML="输入无效!"; default_focus("idnum"); } else { regidnuminfo.className = 'show exactness'; regidnuminfo.innerHTML = '通过!'; } } //--------------------------------------------------tel---------------------------------------------- //mouse onclick the tel box function click_tel_input(thisinput) { regQQinfo.className="show exactness"; regQQinfo.innerHTML=""; } //mouse lost the tel box function check_tel_input(thisinput) { var count = thisinput.value.trim().ByteCount(); var rs = /^[0-9\-\+]{8,20}$/; if (count == 0) { //regtelinfo.className="show maybe"; //regtelinfo.innerHTML="填了会更方便!"; regtelinfo.className="show null"; regtelinfo.innerHTML = "必填项目!"; } else if((!thisinput.value.match(rs)) || (count < 8 || count > 20)) { regtelinfo.className='show err'; regtelinfo.innerHTML="输入无效!"; default_focus("tel"); } else { regtelinfo.className = 'show exactness'; regtelinfo.innerHTML = '通过!'; } } //--------------------------------------------------fax---------------------------------------------- //mouse onclick the fax box function click_fax_input(thisinput) { regQQinfo.className="show exactness"; regQQinfo.innerHTML="区号+号码"; } //mouse lost the fax box function check_fax_input(thisinput) { var count = thisinput.value.trim().ByteCount(); var rs = /^[0-9\-\+]{8,20}$/; if (count == 0) { regfaxinfo.className="show maybe"; regfaxinfo.innerHTML="填了会更方便!"; } else if((!thisinput.value.match(rs)) || (count < 8 || count > 20)) { regfaxinfo.className='show err'; regfaxinfo.innerHTML="输入无效!"; default_focus("fax"); } else { regfaxinfo.className = 'show exactness'; regfaxinfo.innerHTML = '通过!'; } } //--------------------------------------------------mobile---------------------------------------------- //mouse onclick the mobile box function click_mobile_input(thisinput) { regmobileinfo.className="show exactness"; regmobileinfo.innerHTML="请输入11位手机号码"; } //mouse lost the mobile box function check_mobile_input(thisinput) { var count = thisinput.value.trim().ByteCount(); var rai = /^\d{11}$/; if (count == 0) { //regmobileinfo.className="show maybe"; //regmobileinfo.innerHTML="填了会更方便!"; regmobileinfo.className="show null"; regmobileinfo.innerHTML = "必填项目!"; } else if (!thisinput.value.match(rai)) { regmobileinfo.className='show err'; regmobileinfo.innerHTML="输入无效!"; default_focus("mobile"); } else { regmobileinfo.className = 'show exactness'; regmobileinfo.innerHTML = '通过!'; } } //--------------------------------------------------QQ---------------------------------------------- //mouse onclick the QQ box function click_QQ_input(thisinput) { regQQinfo.className="show exactness"; regQQinfo.innerHTML="请填5~11位QQ号码"; } //mouse lost the QQ box function check_QQ_input(thisinput) { var count = thisinput.value.trim().ByteCount(); var rs = /^[0-9]{5,11}$/; if (count == 0) { regQQinfo.className="show maybe"; regQQinfo.innerHTML="填了会更方便!"; } else if((!thisinput.value.match(rs)) || (count < 5 || count > 9)) { regQQinfo.className='show err'; regQQinfo.innerHTML="输入无效!"; default_focus("QQ"); } else { regQQinfo.className = 'show exactness'; regQQinfo.innerHTML = '通过!'; } } //--------------------------------------------------MSN---------------------------------------------- //mouse onclick the MSN box function click_MSN_input(thisinput) { regMSNinfo.className = "show exactness"; regMSNinfo.innerHTML = "请填Email格式的MSN帐号"; } //mouse lost the MSN box function check_MSN_input(thisinput) { var re = /^[_a-zA-Z0-9\-\.]+@([\-_a-zA-Z0-9]+\.)+[a-zA-Z0-9]{2,3}$/; if ( (thisinput.value.trim() == "") ) { regMSNinfo.className = "show maybe"; regMSNinfo.innerHTML = "填了会更方便!"; } else if (!thisinput.value.match(re)) { regMSNinfo.className = "show err"; regMSNinfo.innerHTML = "输入无效!"; default_focus("MSN"); } else { regMSNinfo.className = 'show exactness'; regMSNinfo.innerHTML = '通过!'; } } //--------------------------------------------------cases---------------------------------------------- //mouse onclick the cases box function click_cases_input(thisinput) { regcasesinfo.className="show exactness"; regcasesinfo.innerHTML="可增加一个信用等级"; } //mouse lost the cases box function check_cases_input(thisinput) { var count = thisinput.value.trim().ByteCount(); var rai = /^[0-9]+$/; if (count == 0) { regcasesinfo.className="show null"; regcasesinfo.innerHTML="必填项目!"; } else if (!thisinput.value.match(rai)) { regcasesinfo.className='show err'; regcasesinfo.innerHTML="输入无效!"; default_focus("cases"); } else { regcasesinfo.className = 'show exactness'; regcasesinfo.innerHTML = '通过!'; } } //--------------------------------------------------height---------------------------------------------- //mouse onclick the height box function click_height_input(thisinput) { regheightinfo.className="show exactness"; regheightinfo.innerHTML="请填130~260之间的数值!"; } //mouse lost the height box function check_height_input(thisinput) { var count = thisinput.value.trim().ByteCount(); var rs = /^[0-9]{3}$/; if( count == 0 ) { regheightinfo.className="show null"; regheightinfo.innerHTML="必填项目!"; } else if((!thisinput.value.match(rs)) || (thisinput.value < 130 || thisinput.value > 260)) { regheightinfo.className="show err"; regheightinfo.innerHTML="输入无效!"; default_focus("height"); } else { regheightinfo.className = "show exactness"; regheightinfo.innerHTML = "通过!"; } } //--------------------------------------------------weight---------------------------------------------- //mouse onclick the weight box function click_weight_input(thisinput) { regweightinfo.className="show exactness"; regweightinfo.innerHTML="请填30~200之间的数值!"; } //mouse lost the weight box function check_weight_input(thisinput) { var count = thisinput.value.trim().ByteCount(); var rs = /^[0-9]{2,3}$/; if( count == 0 ) { regweightinfo.className="show null"; regweightinfo.innerHTML="必填项目!"; } else if((!thisinput.value.match(rs)) || (thisinput.value < 30 || thisinput.value > 200)) { regweightinfo.className="show err"; regweightinfo.innerHTML="输入无效!"; default_focus("weight"); } else { regweightinfo.className = "show exactness"; regweightinfo.innerHTML = "通过!"; } } //--------------------------------------------------check children---------------------------------------------- function check_children_input(thisinput) { var v = thisinput.value.trim(); document.all.children_list.src="lib-children-list.asp?numb=" + v; } //--------------------------------------------------check brosis---------------------------------------------- function check_brosis_input(thisinput) { document.all.brosis_list.src="lib-brosis-list.asp?numb=" + thisinput.value.trim(); } //==================================================================================================== //--------------------------------- Check submit form1 from register -------------------------------------------- function chkForm1(objForm) { var Uname = objForm.Uname.value; var Upsw = objForm.Upsw.value; var chkUpsw = objForm.chkUpsw.value; var email = objForm.email.value; var company = objForm.company.value; var website = objForm.website.value; var Rname = objForm.Rname.value; var tel = objForm.tel.value; var mobile = objForm.mobile.value; var checkcode = objForm.checkcode.value; if (Uname == ""){objForm.Uname.focus();return false;} if (Upsw == ""){objForm.Upsw.focus();return false;} if (chkUpsw == ""){objForm.chkUpsw.focus();return false;} if (Upsw != chkUpsw){alert("wrong re-enter password!");objForm.chkUpsw.focus();return false;} if (email == ""){objForm.email.focus();return false;} var re = /^[_a-zA-Z0-9\-\.]+@([\-_a-zA-Z0-9]+\.)+[a-zA-Z0-9]{2,3}$/; if (!email.match(re)){alert("wrong E-mail!");objForm.email.focus();return false;} if (company == ""){objForm.company .focus();return false;} if (website == ""){objForm.website.focus();return false;} if (Rname == ""){objForm.Rname .focus();return false;} if (tel == ""){objForm.tel.focus();return false;} if (mobile == ""){objForm.mobile.focus();return false;} if (checkcode == ""){objForm.checkcode.focus();return false;} var rai = /^\d{4}$/; if (!checkcode.match(rai)){alert("验证码错误!");objForm.checkcode.focus();return false;} return true; } //--------------------------------- Check submit form1 from user-info -------------------------------------------- function chkForm1a(objForm) { var checkcode = objForm.checkcode.value; var Upsw = objForm.Upsw.value; var chkUpsw = objForm.chkUpsw.value; var email = objForm.email.value; var company = objForm.company.value; var website = objForm.website.value; var Rname = objForm.Rname.value; var tel = objForm.tel.value; var mobile = objForm.mobile.value; if (Upsw != chkUpsw){objForm.chkUpsw.focus();return false;} if (email == ""){objForm.email.focus();return false;} var re = /^[_a-zA-Z0-9\-\.]+@([\-_a-zA-Z0-9]+\.)+[a-zA-Z0-9]{2,3}$/; if (!email.match(re)){alert("wrong E-mail!");objForm.email.focus();return false;} if (company == ""){objForm.company .focus();return false;} if (website == ""){objForm.website.focus();return false;} if (Rname == ""){objForm.Rname .focus();return false;} if (tel == ""){objForm.tel.focus();return false;} if (mobile == ""){objForm.mobile.focus();return false;} if (checkcode == ""){objForm.checkcode.focus();return false;} var rai = /^\d{4}$/; if (!checkcode.match(rai)){alert("验证码错误!");objForm.checkcode.focus();return false;} return true; }