function chkFrm(){
	
			var gameusername = $('game_username').value;
			var gamepassword = $('game_password').value;
			var gamerepassword = $('game_repassword').value;
			var rcode = $('rcode').value;
			var isok=document.getElementById('isok');	
			var tag=document.getElementById('tag');	
			var tgno = $('tgno');
			if(tgno != undefined) tgno.value=getTG();

			$('f').value=getF();
			
			if(tag==undefined){
				isok.value="1";
			}else{
				isok.value=tag.checked ? "1" : "0";	
				
			}
			
						
			//验证用户名
			if(checkspace(gameusername)){
					 alert('请输入游戏账号');
					 $('game_username').focus();
					 return false;
			}
			if(CKUserName(gameusername)){
					 alert('输入的游戏账号格式错误,请检查');
					 $('game_username').focus();
					 return false;
			}
			
			//验证密码
			if(checkspace(gamepassword)){
						alert('请输入游戏密码');
						$('game_password').focus();
						return false;	
			}else if(CkPswd(gamepassword)){
						alert('输入的游戏密码格式错误,请检查');
						$('game_password').focus();
						return false;
			}
			
			//验证第二次输入的密码 
			if(checkspace(gamerepassword)){
						alert('请再次输入游戏密码');
						$('game_repassword').focus();
						return false;	
			}else if(gamepassword != gamerepassword){
						alert('两次输入的游戏密码不一致,请检查');
						$('game_repassword').focus();
						return false;
			}
			
			//验证码验证
			if(checkspace(rcode)){
					alert('请输入验证码');
					$('rcode').focus();
					return false;
			}
			
			if(isok.value=="0"){
				alert('请先阅读并同意游戏用户服务条款');
				return false;
			}
			
			var pars = "game_username="+gameusername+"&fromurl="+fromurl;		
			var url = '/reg/check.php';
			var response = MyAJAX(url,HTML_GET,pars);		
			if(response!='1'){
						alert(response);
						$('game_username').focus();
						return false;
			}	
			
}
