function checkform(){
	if (document.loginbox.userid.value.length ==0){
		alert("Please fill out your Email Address !");
		document.loginbox.userid.focus();
		return false;
	}
	if (document.loginbox.password.value.length==0){
		alert("Please fill out your password !");
		document.loginbox.password.focus();
		return false;
	}
	if (document.loginbox.verifycode.value.length==0){
		alert("Please fill out Turing Number !");
		document.loginbox.verifycode.focus();
		return false;
	}
	return true;
}	


function JM_sh(ob){
if (ob.style.display=="none"){ob.style.display=""}else{ob.style.display="none"};
}
//函数名：fucPWDchk 
//功能介绍：检查是否含有非数字或字母 
//参数说明：要检查的字符串 
//返回值：0：含有 1：全部为数字或字母 
function fucPWDchk(str) 
{ 
var strSource ="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._@-"; 
var ch; 
var i; 
var temp; 

for (i=0;i<=(str.length-1);i++) 
{ 

ch = str.charAt(i); 
temp = strSource.indexOf(ch); 
if (temp==-1) 
{ 
return 0; 
} 
} 
if (strSource.indexOf(ch)==-1) 
{ 
return 0; 
} 
else 
{ 
return 1; 
} 
} 
function jtrim(str) 
{ while (str.charAt(0)==" ") 
{str=str.substr(1);} 
while (str.charAt(str.length-1)==" ") 
{str=str.substr(0,str.length-1);} 
return(str); 
} 
//判断表单输入正误
function Checkreg()
{
	//UserId就是UserMail
	if (!fucPWDchk(document.ADDUser.UserId.value)){
		alert("Please input your Email Address!!");
		document.ADDUser.UserId.focus();
		return false;
		}
	if (document.ADDUser.UserId.value.length < 4 || document.ADDUser.UserId.value.length >=50) {
		alert("Your Email Address length must be between 4 and 50!");
		document.ADDUser.UserId.focus();
		return false;
	}
	
	if (document.ADDUser.UserId.value.indexOf("@") == -1) {
		alert("Please Check your Email Address!");
		document.ADDUser.UserId.focus();
		return false;
	}
	if (document.ADDUser.UserId.value.indexOf(".") == -1) {
		alert("Please Check your Email Address!");
		document.ADDUser.UserId.focus();
		return false;
	}
	
	if (document.ADDUser.pw1.value.length <5 || document.ADDUser.pw1.value.length >=16) {
		alert("Password's length must be between 5 and 16!");
		document.ADDUser.pw1.focus();
		return false;
	}
	
	if (document.ADDUser.pw1.value != document.ADDUser.pw2.value) {
		alert("Your Confirm password error！Please input again.");
		document.ADDUser.pw2.focus();
		return false;
	}	
	if (document.ADDUser.Username.value.length < 2) {
		alert("Please check your full name!");
		document.ADDUser.Username.focus();
		return false;
	}


//	if (document.ADDUser.UserMail.value.length == 0) {
//		alert("Please fill out your e-mail!");
//		document.ADDUser.UserMail.focus();
//		return false;
//	}
	
		if (document.ADDUser.Address.value.length == 0) {
		alert("Please fill out your Address");
		document.ADDUser.Address.focus();
		return false;
	}
		if (document.ADDUser.Country.value.length == 0) {
		alert("Please fill your Country!");
		document.ADDUser.Country.focus();
		return false;
	}
		if (document.ADDUser.HomePhone.value.length == 0) {
		alert("Please fill your Tel!");
		document.ADDUser.HomePhone.focus();
		return false;
	}
}