function checkphone(){

	if(check_phone(document.phone_one.phone)==false)
		{
			alert("请正确输入您的手机号码");
			document.phone_one.phone.focus();
			return false;
		}

	sendRequest("/charge/check_phone.asp?phone="+document.phone_one.phone.value+"&random="+Math.random());
	if(return_value=="0"){
	alert("暂时不支持此类号码充值!");
	document.phone_one.phone.focus();
    document.phone_one.phone.select();
    return false
	}
}


function check_phone(obj){
 IPvalidate = true;
 if(phone_p_t_09.test(obj.value)) { 
  return true;
 } else {
  IPvalidate=false;
 }
 
 if (IPvalidate==false) {
  return false;
 } 
 return true;
}

function checkphone_two(){
	var obj;
	obj=document.phone_two;

	if(obj.email){
		
		if(obj.email.value.length!=0 || obj.email.value.length < 100){
			if (obj.email.value.charAt(0)=="." ||        
				 obj.email.value.charAt(0)=="@"||       
				 obj.email.value.indexOf('@', 0) == -1 || 
				 obj.email.value.indexOf('.', 0) == -1 || 
				 obj.email.value.lastIndexOf("@")==obj.email.value.length-1 || 
				 obj.email.value.lastIndexOf(".")==obj.email.value.length-1)
			 {
			  alert("Email地址格式不正确！");
			  obj.email.focus();
			  return false;
			  }
	   }
	 else
	  {
	   alert("Email不能为空且不大于100个字符！");
	   obj.email.focus();
	   return false;
	   } 
		
	}
	
	if(obj.phone_re.value=="")
		{
			alert("请再次输入您的手机号码");
			obj.phone_re.focus();
			return false;
		}
	if(obj.phone_re.value!=obj.phone.value)
	{
		alert("您输入手机号码有错误!");
		obj.phone_re.focus();
		return false;
	}
}

function onchangephone(id){

document.getElementById("youhuiid").innerHTML=document.getElementById("phoneid_"+id).innerHTML;
}

function click_phone_input(thisinput)
{
	//domainnameinfo.className = "show exactness";
	document.getElementById("phone_des").innerHTML = "<font color='red'>*</font>请再次输入你需要充值的手机号码";
}
function check_phone_input(thisinput)
{
	if(thisinput.value=="")
	document.getElementById("phone_des").innerHTML = "<font color='red'>*</font>请再次输入你需要充值的手机号码";
	else if(thisinput.value!=document.phone_two.phone.value)
	document.getElementById("phone_des").innerHTML = "<font color='red'>手机号输入有误</font>";
	else
	document.getElementById("phone_des").innerHTML = "<font color='green'>输入正确</font>";
	
}

function checkgame(){



		 ajaxProcess_alert('/i_ajax/new_ajaxchecksession.asp?slecttype='+document.getElementById('selectjj').value+'&t='+Math.random(),'')
		// alert(document.getElementById('jsalert09').innerHTML)
		// checkgame('n');

	
	
//	if(document.game_one.classid.value==""||document.game_one.classid.value=="0000")
//		{
//			alert("请选择游戏名");
//			document.game_one.classid.focus();
//			return false;
//		}
//	if(document.game_one.cardid.value==""||document.game_one.cardid.value=="000000")
//		{
//			alert("请选择面值");
//			document.game_one.cardid.focus();
//			return false;
//		}

}

function checkgame_two(){
	if(document.game_two.gamearea){
	if(document.game_two.gamearea.value=="")
		{
			alert("请选择用户游戏区域");
			document.game_two.gamearea.focus();
			return false;
		}
	}
	if(document.game_two.gamesrv){
	if(document.game_two.gamesrv.value=="")
		{
			alert("请选择服务器组");
			document.game_two.gamesrv.focus();
			return false;
		}
	}
	if(document.game_two.game_userid){
		if(document.game_two.game_userid.value=="")
			{
				alert("请输入账户名");
				document.game_two.game_userid.focus();
				return false;
			}
	}
	
	if(document.game_two.regame_userid){
		if(document.game_two.regame_userid.value=="")
		{
			alert("请输入确认账户名");
			document.game_two.regame_userid.focus();
			return false;
		}	
		if(document.game_two.game_userid.value!=document.game_two.regame_userid.value)
			{
				alert("输入的账户名与确认账户名不同哦！");
				document.game_two.game_userid.focus();
				return false;
			}
	}

		
	if(document.game_two.email.value.length!=0 || document.game_two.email.value.length < 100){
			if (document.game_two.email.value.charAt(0)=="." ||        
				 document.game_two.email.value.charAt(0)=="@"||       
				 document.game_two.email.value.indexOf('@', 0) == -1 || 
				 document.game_two.email.value.indexOf('.', 0) == -1 || 
				 document.game_two.email.value.lastIndexOf("@")==document.game_two.email.value.length-1 || 
				 document.game_two.email.value.lastIndexOf(".")==document.game_two.email.value.length-1)
			 {
			  alert("Email地址格式不正确！");
			  document.game_two.email.focus();
			  return false;
			  }
	   }
	 else
	  {
	   alert("Email不能为空且不大于100个字符！");
	   document.game_two.email.focus();
	   return false;
	   } 
}