// JavaScript Document
function getpass(){
	String.prototype.Trim = function(){return this.replace(/^\s+|\s+$/g,"");}   
	String.prototype.Ltrim = function(){return this.replace(/^\s+/g, "");}   
	String.prototype.Rtrim = function(){return this.replace(/\s+$/g, "");}
	String.prototype.Qtrim = function(){return this.replace(/(^[\s\u3000]*)|([\s\u3000]*$)/g, "");}
	var f=document.myform;
	var str=document.myform.UserLogin.value;
	if(f.UserLogin.value==""){
	alert("登录名不能为空!");
	f.UserLogin.focus();
	return(false);
	} if (str!=str.Trim()||str!=str.Ltrim()||str!=str.Rtrim()||str!=str.Qtrim()) {
  	alert("不能包含空格!");
  	return(false);
	}
	
	if(f.UserEmail.value==""){
	alert("注册邮箱不能为空!");
	f.UserEmail.focus();
	return(false);
	}if(f.UserEmail.value.length > 0 && !f.UserEmail.value.match( /^.+@.+$/ ) ) {
	alert("注册邮格式不正确!");
 	return(false);
 	}
	
	/*if(f.UserQuestion.value==""){
	alert("密码问题不能为空!");
	f.UserQuestion.focus();
	return(false);
	}
	if(f.UserAnser.value==""){
	alert("密码答案不能为空!");
	f.UserAnser.focus();
	return(false);
	}*/
	if(f.postcode.value==""){
	alert("验证码不能为空!");
	f.postcode.focus();
	return(false);
	}
	return true;
}
