﻿function checklogform(){

if(document.userloginform.username.value==''){
alert('用户名不能为空！！');
document.userloginform.username.focus()
return false;
}
if(document.userloginform.password.value==''){
alert('密码不能为空！！');
document.userloginform.password.focus()
return false;
}
if(document.userloginform.repassword.value!=document.userloginform.password.value){
alert('两次密码不同！！');
document.userloginform.username.focus()
return false;
}
if(document.userloginform.email.value==''){
alert('E-mail不能为空！！');
document.userloginform.email.focus()
return false;
}
var email=document.userloginform.email.value;
	if (email.length > 0 && !email.match(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)) {
     alert('提示\n\n请输入有效的E_mail！');
     document.userloginform.email.focus();
     return false
 		} 
if(document.userloginform.yzm.value==''){
alert('验证码不能为空！！');
document.userloginform.yzm.focus()
return false;
}
return true;



}


function checkuserloginform(){
	
	if(document.getElementById('username').value==''){
	
	alert('用户名不能为空');
	return false;
	}
		if(document.getElementById('password').value==''){
	
	alert('密码不能为空');
	return false;
	}

	
	}
