if(form1.corporation.checked){
var ErrorInfo="";var email="";var telphone=""; var name=""; var flags=0;
email=document.form1.email.value;
name=document.form1.linkname.value;
telphone=document.form1.linktel.value;
//alert(email+" + " + telphone);
if (document.form1.linkname.value=="") {ErrorInfo = ErrorInfo + "用户名为空!\n"; flags=1;}
if (document.form1.linktel.value=="") {ErrorInfo = ErrorInfo + "电话号码为空!\n"; flags=1;}
if (email!="") {ErrorInfo = ErrorInfo + "邮箱地址为空!\n"; flags=1;}
if (isNaN(document.form1.linktel.value)) {ErrorInfo = ErrorInfo + "电话号码中包含有非数字字符!\n"; flags=1;}
if(email!=""){if (email.lastIndexOf("@")== -1 || email.lastIndexOf(".") == -1)
{ErrorInfo = ErrorInfo + "邮箱地址不合法!\n地址格式应为emailname@host. "; flags=1;}}
if (flags){ alert (ErrorInfo); return false;} else{
if((document.form1.linktel.value.length<7) || (document.form1.linktel.value.length>11) ||((document.form1.linktel.value.length>7) && (document.form1.linktel.value.length<11))) {
if(confirm("系统检测到您的电话号码存在问题,是否继续?"))
{
return true;
}else{
return false;
}
}
}