function player_chk1()
{
  var site;
  var ename;
  var cname;
  var passwd;
  var passwdcf;
  var gg;
  var lx;
  var wuxing;
  var tg;
  var basic_gg;
  var basic_lx;
  var basic_wuxing;
  var basic_tg;
  var total_gift=0;
  var money;
  var pk;
  var nk;
  var pkdao;
  var nkdao;
  var jiemino;
  var jiemidao;
  var qn;
  var qujing;

  site=this.document.player1.site.value;
  ename=this.document.player1.ename.value;
  cname=this.document.player1.cname.value;
  passwd=this.document.player1.passwd.value;
  passwdcf=this.document.player1.passwdcf.value;
  gg=this.document.player1.gg.value;
  lx=this.document.player1.lx.value;
  wuxing=this.document.player1.wuxing.value;
  tg=this.document.player1.tg.value;
  basic_gg=this.document.player1.basic_gg.value;
  basic_lx=this.document.player1.basic_lx.value;
  basic_wuxing=this.document.player1.basic_wuxing.value;
  basic_tg=this.document.player1.basic_tg.value;
  total_gift=parseInt(basic_tg)+parseInt(basic_gg)+parseInt(basic_wuxing)+parseInt(basic_lx);
  money=this.document.player1.money.value;
  pk=this.document.player1.pk.value;
  nk=this.document.player1.nk.value;
  pkdao=this.document.player1.pkdao.value;
  nkdao=this.document.player1.nkdao.value;
  jiemino=this.document.player1.jiemino.value;
  jiemidao=this.document.player1.jiemidao.value;
  qujing=this.document.player1.qujing.value;
  qn=this.document.player1.qn.value;

  if (site.length<=0)
  {
	alert("游戏类别不能为空！    ");
	this.document.player1.site.focus();
	return false;
  }
 
  if (ename.length<1)
  {
  	alert("玩家英文名不能为空！    ");
  	this.document.player1.ename.focus();
  	return false;
  }

  if (ename.length<3)
  {
  	alert("你英文ID也太短了吧？wiz能让你注册么？！    ");
  	this.document.player1.ename.focus();
  	return false;
  }

  if (ename.length>8)
  {
  	alert("你英文ID也太长了吧？wiz能让你注册么？！    ");
  	this.document.player1.ename.focus();
  	return false;
  }

  if (cname.length<1)
  {
  	alert("玩家中文名不能为空！    ");
  	this.document.player1.cname.focus();
  	return false;
  }

  if (cname.length<2)
  {
  	alert("你中文ID也太短了吧？wiz能让你注册么？！    ");
  	this.document.player1.cname.focus();
  	return false;
  }

  if (cname.length>6)
  {
  	alert("你中文ID也太长了吧？wiz能让你注册么？！    ");
  	this.document.player1.cname.focus();
  	return false;
  }
  
  if (passwd.length<1)
  {
  	alert("玩家密码不能为空！    ");
  	this.document.player1.passwd.focus();
  	return false;
  }
  
  if (passwdcf.length<1)
  {
  	alert("玩家密码确认不能为空！    ");
  	this.document.player1.passwdcf.focus();
  	return false;
  }
  
  if (passwdcf!=passwd)
  {
  	alert("两次密码输入不符，请确认！   ");
  	this.document.player1.passwdcf.focus();
  	return false;
  }

  if (gg.length>0)
  {
  	if (isNaN(gg))
  	{
  		alert("请在根骨栏填入阿拉伯数字！  ");
  		this.document.player1.gg.focus();
  		return false;
  	}  
  	if (gg>40)
  	{
  		alert("这么高的根骨应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player1.gg.focus();
  		return false;
  	}
  	if (gg<10)
  	{
  		alert("这么低的根骨真是前无古人后无来者，本站庙小容不了大佛，对不起了！  ");
  		this.document.player1.gg.focus();
  		return false;
  	}
  }  

  if (lx.length>0)
  {
  	if (isNaN(lx))
  	{
  		alert("请在灵性栏填入阿拉伯数字！  ");
  		this.document.player1.lx.focus();
  		return false;
  	}  
  	if (lx>40)
  	{
  		alert("这么高的灵性应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player1.lx.focus();
  		return false;
  	}
  	if (lx<10)
  	{
  		alert("这么低的灵性真是前无古人后无来者，本站庙小容不了大佛，对不起了！  ");
  		this.document.player1.lx.focus();
  		return false;
  	}
  }    

  if (wuxing.length>0)
  {
  	if (isNaN(wuxing))
  	{
  		alert("请在悟性栏填入阿拉伯数字！  ");
  		this.document.player1.wuxing.focus();
  		return false;
  	}  
  	if (wuxing>40)
  	{
  		alert("这么高的悟性应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player1.wuxing.focus();
  		return false;
  	}
  	if (wuxing<10)
  	{
  		alert("这么低的悟性真是前无古人后无来者，本站庙小容不了大佛，对不起了！  ");
  		this.document.player1.wuxing.focus();
  		return false;
  	}
  }    

  if (tg.length>0)
  {
  	if (isNaN(tg))
  	{
  		alert("请在体格栏填入阿拉伯数字！  ");
  		this.document.player1.tg.focus();
  		return false;
  	}  
  	if (tg>40)
  	{
  		alert("这么高的体格应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player1.tg.focus();
  		return false;
  	}
  	if (tg<10)
  	{
  		alert("这么低的体格真是前无古人后无来者，本站庙小容不了大佛，对不起了！  ");
  		this.document.player1.tg.focus();
  		return false;
  	}
  }    


  if (basic_gg.length>0)
  {
  	if (isNaN(basic_gg))
  	{
  		alert("请在根骨栏填入阿拉伯数字！  ");
  		this.document.player1.basic_gg.focus();
  		return false;
  	}  
  	if (basic_gg>30)
  	{
  		alert("这么高的根骨应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player1.basic_gg.focus();
  		return false;
  	}
  	if (basic_gg<10)
  	{
  		alert("这么低的根骨真是前无古人后无来者，本站庙小容不了大佛，对不起了！  ");
  		this.document.player1.basic_gg.focus();
  		return false;
  	}
  }  

  if (basic_lx.length>0)
  {
  	if (isNaN(basic_lx))
  	{
  		alert("请在灵性栏填入阿拉伯数字！  ");
  		this.document.player1.basic_lx.focus();
  		return false;
  	}  
  	if (basic_lx>30)
  	{
  		alert("这么高的灵性应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player1.basic_lx.focus();
  		return false;
  	}
  	if (basic_lx<10)
  	{
  		alert("这么低的灵性真是前无古人后无来者，本站庙小容不了大佛，对不起了！  ");
  		this.document.player1.basic_lx.focus();
  		return false;
  	}
  }    

  if (basic_wuxing.length>0)
  {
  	if (isNaN(basic_wuxing))
  	{
  		alert("请在悟性栏填入阿拉伯数字！  ");
  		this.document.player1.basic_wuxing.focus();
  		return false;
  	}  
  	if (basic_wuxing>30)
  	{
  		alert("这么高的悟性应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player1.basic_wuxing.focus();
  		return false;
  	}
  	if (basic_wuxing<10)
  	{
  		alert("这么低的悟性真是前无古人后无来者，本站庙小容不了大佛，对不起了！  ");
  		this.document.player1.basic_wuxing.focus();
  		return false;
  	}
  }    

  if (basic_tg.length>0)
  {
  	if (isNaN(basic_tg))
  	{
  		alert("请在体格栏填入阿拉伯数字！  ");
  		this.document.player1.basic_tg.focus();
  		return false;
  	}  
  	if (basic_tg>30)
  	{
  		alert("这么高的体格应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player1.basic_tg.focus();
  		return false;
  	}
  	if (basic_tg<0)
  	{
  		alert("这么低的体格真是前无古人后无来者，本站庙小容不了大佛，对不起了！  ");
  		this.document.player1.basic_tg.focus();
  		return false;
  	}
  }    

  if (total_gift>90)
  {
	alert("基础天赋总和大于90了！  ");
	this.document.player1.basic_gg.focus();
	return false;
  }

  if (money.length>0)
  {
  	if (isNaN(money))
  	{
  		alert("请在存款栏填入阿拉伯数字！  ");
  		this.document.player1.money.focus();
  		return false;
  	}  
  	if (money>500000)
  	{
  		alert("您是天下第一富翁了吧？钱财不可露白，是不是少报一点，这样税收也少交一点，嘻嘻！  ");
  		this.document.player1.money.focus();
  		return false;
  	}
  	if (money<0)
  	{
  		alert("这么穷还活著作什么！  ");
  		this.document.player1.money.focus();
  		return false;
  	}
  }    

  if (pk.length>0)
  {
  	if (isNaN(pk))
  	{
  		alert("请在PK栏填入阿拉伯数字！  ");
  		this.document.player1.pk.focus();
  		return false;
  	}  
  	if (pk>1000)
  	{
  		alert("PK了这么多人真够辛苦的，要让人相信也很辛苦呀！  ");
  		this.document.player1.pk.focus();
  		return false;
  	}
  	if (pk<0)
  	{
  		alert("没PK过人就直说吧，这不是什么丢脸的事，嘻嘻！  ");
  		this.document.player1.pk.focus();
  		return false;
  	}
  }      
  
  if (nk.length>0)
  {
  	if (isNaN(nk))
  	{
  		alert("请在NK栏填入阿拉伯数字！  ");
  		this.document.player1.nk.focus();
  		return false;
  	}  
  	if (nk>1000000)
  	{
  		alert("NK了这么多NPC真够辛苦的吧？要让人相信也很辛苦呀！  ");
  		this.document.player1.nk.focus();
  		return false;
  	}
  	if (nk<0)
  	{
  		alert("您要是一个NPC都没NK过我信，可这负的，hmm....?！  ");
  		this.document.player1.nk.focus();
  		return false;
  	}
  	if (parseInt(nk)<parseInt(pk))
  	{
  		alert("大哥！你杀的人怎么比pk人数还少？这个算法......  ");
  		this.document.player1.nk.focus();
  		return false;
  	}
  }  

  
  if (pkdao.length>0)
  {
  	if (isNaN(pkdao))
  	{
  		alert("请在PK道行栏填入阿拉伯数字！  ");
  		this.document.player1.pkdao.focus();
  		return false;
  	}  
  	if (pkdao>15000)
  	{
  		alert("离谱了吧，PK弄到这么多道行你还能活到现在？  ");
  		this.document.player1.pkdao.focus();
  		return false;
  	}
  	if (pkdao<0)
  	{
  		alert("离谱了吧，哪里有负的PK道行？！  ");
  		this.document.player1.pkdao.focus();
  		return false;
  	}
  }  

  if (nkdao.length>0)
  {
  	if (isNaN(nkdao))
  	{
  		alert("请在NK道行栏填入阿拉伯数字！  ");
  		this.document.player1.nkdao.focus();
  		return false;
  	}  
  	if (nkdao>5000)
  	{
  		alert("这么高的NK道行前所未闻哪！  ");
  		this.document.player1.nkdao.focus();
  		return false;
  	}
  	if (nkdao<0)
  	{
  		alert("离谱了吧，哪里有负的NK道行？   ");
  		this.document.player1.nkdao.focus();
  		return false;
  	}
  }  
      

  if (jiemino.length>0)
  {
  	if (isNaN(jiemino))
  	{
  		alert("请在解谜数目栏填入阿拉伯数字！  ");
  		this.document.player1.jiemino.focus();
  		return false;
  	}  
  	if (jiemino>1000000)
  	{
  		alert("花狗也解不了这么多谜呀！  ");
  		this.document.player1.jiemino.focus();
  		return false;
  	}
  	if (jiemino<0)
  	{
  		alert("没解过谜没人笑你呀，不用放个负的惊世骇俗吧？！  ");
  		this.document.player1.jiemino.focus();
  		return false;
  	}
  }


  if (jiemidao.length>0)
  {
  	if (isNaN(jiemidao))
  	{
  		alert("请在解谜道行栏填入阿拉伯数字！  ");
  		this.document.player1.jiemidao.focus();
  		return false;
  	}  
  	if (jiemidao>200000)
  	{
  		alert("这么高的解谜道行应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player1.jiemidao.focus();
  		return false;
  	}
  	if (jiemidao<0)
  	{
  		alert("解谜解出负道行真是前无古人后无来者呀，佩服！  ");
  		this.document.player1.jiemidao.focus();
  		return false;
  	}
  }  


        
  if (qn.length>0)
  {
  	if (isNaN(qn))
  	{
  		alert("请在解谜潜能栏填入阿拉伯数字！  ");
  		this.document.player1.qn.focus();
  		return false;
  	}  
  	if (qn>99999999)
  	{
  		alert("这么多的潜能奖励用不完了吧？？  ");
  		this.document.player1.qn.focus();
  		return false;
  	}
  	if (qn<0)
  	{
  		alert("解迷解成这样，心痛吧？？  ");
  		this.document.player1.qn.focus();
  		return false;
  	}
  }  


  if (qujing.length>0)
  {
  	if (isNaN(qujing))
  	{
  		alert("请在取经数目栏填入阿拉伯数字！  ");
  		this.document.player1.qujing.focus();
  		return false;
  	}  
  	if (qujing>200)
  	{
  		alert("如来佛每天亲自接送您呀？！  ");
  		this.document.player1.qujing.focus();
  		return false;
  	}
  	if (qujing<0)
  	{
  		alert("没取经没人笑你呀，不用放个负的惊世骇俗吧？！  ");
  		this.document.player1.qujing.focus();
  		return false;
  	}
  }      
  return true;
  
}

function player_chk2()
{
  var skills=new Array();
  skills[0]=this.document.player2.basic_force;
  skills[1]=this.document.player2.spells;
  skills[2]=this.document.player2.unarmed;
  skills[3]=this.document.player2.parry;
  skills[4]=this.document.player2.literate;
  skills[5]=this.document.player2.fork;
  skills[6]=this.document.player2.stick;
  skills[7]=this.document.player2.dodge;
  skills[8]=this.document.player2.sword;
  skills[9]=this.document.player2.hammer;
  skills[10]=this.document.player2.blade;
  skills[11]=this.document.player2.whip;
  skills[12]=this.document.player2.staff;
  skills[13]=this.document.player2.steal;
  skills[14]=this.document.player2.bainiao;
  skills[15]=this.document.player2.bingpo;
  skills[16]=this.document.player2.cuixin;
  skills[17]=this.document.player2.yingzhua;
  skills[18]=this.document.player2.xiaoyao;
  skills[19]=this.document.player2.throwing;
  skills[20]=this.document.player2.ningxie;
  skills[21]=this.document.player2.dengxian;
  skills[22]=this.document.player2.baihua;
  skills[23]=this.document.player2.moondance;
  skills[24]=this.document.player2.moonforce;
  skills[25]=this.document.player2.moonshentong;
  skills[26]=this.document.player2.snowsword;
  skills[27]=this.document.player2.jueqing;
  skills[28]=this.document.player2.yaofa;
  skills[29]=this.document.player2.qixiu;
  skills[30]=this.document.player2.kugu;
  skills[31]=this.document.player2.lingfu;
  skills[32]=this.document.player2.yinfeng;
  skills[33]=this.document.player2.huntian;
  skills[34]=this.document.player2.bagua;
  skills[35]=this.document.player2.sanqing;
  skills[36]=this.document.player2.fumozhang;
  skills[37]=this.document.player2.kaishan;
  skills[38]=this.document.player2.yange;
  skills[39]=this.document.player2.zhenyuan;
  skills[40]=this.document.player2.taiyi;
  skills[41]=this.document.player2.wuxingquan;
  skills[42]=this.document.player2.xiaofeng;
  skills[43]=this.document.player2.jindou;
  skills[44]=this.document.player2.liangyi;
  skills[45]=this.document.player2.puti;
  skills[46]=this.document.player2.qianjun;
  skills[47]=this.document.player2.wuxiang;
  skills[48]=this.document.player2.dao;
  skills[49]=this.document.player2.buddhism;
  skills[50]=this.document.player2.jienan;
  skills[51]=this.document.player2.lotusmove;
  skills[52]=this.document.player2.lotusforce;
  skills[53]=this.document.player2.lunhui;
  skills[54]=this.document.player2.huoyun;
  skills[55]=this.document.player2.liehuo;
  skills[56]=this.document.player2.sheqi;
  skills[57]=this.document.player2.guiying;
  skills[58]=this.document.player2.gouhun;
  skills[59]=this.document.player2.jinghun;
  skills[60]=this.document.player2.kusang;
  skills[61]=this.document.player2.zhuihun;
  skills[62]=this.document.player2.bihai;
  skills[63]=this.document.player2.dragonfight;
  skills[64]=this.document.player2.dragonforce;
  skills[65]=this.document.player2.fengbo;
  skills[66]=this.document.player2.dragonstep;
  skills[67]=this.document.player2.huntianchui;
  skills[68]=this.document.player2.yangyan;
  skills[69]=this.document.player2.qianshou;
  skills[70]=this.document.player2.mace;
  skills[71]=this.document.player2.spear;
  skills[72]=this.document.player2.rake;
  skills[73]=this.document.player2.axe;
  skills[74]=this.document.player2.wusi-mace;
  skills[75]=this.document.player2.baguazhou;
  skills[76]=this.document.player2.archery;
  skills[77]=this.document.player2.bawang-qiang;
  skills[78]=this.document.player2.changquan;
  skills[79]=this.document.player2.yanxing-steps;
  skills[80]=this.document.player2.lengquan-force;
  skills[81]=this.document.player2.zouxiao;

  
  for (i=0;i<82;i++)
  {
  	if (skills[i].value.length>0)
  	{
  		if(isNaN(skills[i].value))
  		{
  			alert("技能必须是一个阿拉伯数值！    ");
  			skills[i].focus();
  			return false;
  		}
  		
  		if(skills[i].value>2000)
  		{
  			alert("技能太高了吧老大？你以为自己真的天下第一呀？？");
  			skills[i].focus();
  			return false;
  		}
  		
  		if(skills[i].value<0)
  		{
  			alert("老大太谦虚了吧，还有负技能吗？？");
  			skills[i].focus();
  			return false;
  		}
  	}
  }
  return true;

  var wx;
  var dh;
  var nl;
  var fl;
  var hp;
  var js;

  wx=this.document.player2.wx.value;
  dh=this.document.player2.dh.value;
  nl=this.document.player2.nl.value;
  fl=this.document.player2.fl.value;
  hp=this.document.player2.hp.value;
  js=this.document.player2.js.value;


 if (wx.length>0)
  {
  	if (isNaN(wx))
  	{
  		alert("请在武学栏填入阿拉伯数字！  ");
  		this.document.player2.wx.focus();
  		return false;
  	}
  	if (wx>200000000)
  	{
  		alert("这么高的武学应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player2.wx.focus();
  		return false;
  	}
  	if (wx<0)
  	{
  		alert("这么低的武学真是前无古人后无来者，本站庙小容不了大佛，对不起了！  ");
  		this.document.player2.wx.focus();
  		return false;
  	}
  }
  
  if (dh.length>0)
  {
  	if (isNaN(dh))
  	{
  		alert("请在道行栏填入阿拉伯数字！  ");
  		this.document.player2.dh.focus();
  		return false;
  	}  
  	if (dh>150000)
  	{
  		alert("这么高的道行应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player2.dh.focus();
  		return false;
  	}
  	if (dh<0)
  	{
  		alert("这么低的道行真是前无古人后无来者，本站庙小容不了大佛，对不起了！  ");
  		this.document.player2.dh.focus();
  		return false;
  	}
  }  
  
  if (nl.length>0)
  {
  	if (isNaN(nl))
  	{
  		alert("请在内力栏填入阿拉伯数字！  ");
  		this.document.player2.nl.focus();
  		return false;
  	}  
  	if (nl>200)
  	{
  		alert("这么高的内力应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player2.nl.focus();
  		return false;
  	}
  	if (nl<0)
  	{
  		alert("这么低的内力真是前无古人后无来者，本站庙小容不了大佛，对不起了！  ");
  		this.document.player2.nl.focus();
  		return false;
  	}
  }  

  if (fl.length>0)
  {
  	if (isNaN(fl))
  	{
  		alert("请在栏填入阿拉伯数字！  ");
  		this.document.player2.fl.focus();
  		return false;
  	}  
  	if (fl>15000)
  	{
  		alert("这么高的法力应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player2.fl.focus();
  		return false;
  	}
  	if (fl<0)
  	{
  		alert("这么低的法力真是前无古人后无来者，本站庙小容不了大佛，对不起了！  ");
  		this.document.player2.fl.focus();
  		return false;
  	}
  }  
  
  if (hp.length>0)
  {
  	if (isNaN(hp))
  	{
  		alert("请在气血栏填入阿拉伯数字！  ");
  		this.document.player2.hp.focus();
  		return false;
  	}  
  	if (hp>4000)
  	{
  		alert("这么高的气血应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player2.hp.focus();
  		return false;
  	}
  	if (hp<0)
  	{
  		alert("这么低的气血还活着真是奇迹呀！  ");
  		this.document.player2.hp.focus();
  		return false;
  	}
  }

  if (js.length>0)
  {
  	if (isNaN(js))
  	{
  		alert("请在精神栏填入阿拉伯数字！  ");
  		this.document.player2.js.focus();
  		return false;
  	}  
  	if (js>4000)
  	{
  		alert("这么高的精神应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player2.js.focus();
  		return false;
  	}
  	if (js<0)
  	{
  		alert("这么低的精神还活着真是奇迹呀！  ");
  		this.document.player2.js.focus();
  		return false;
  	}
  }    


}

function player_chk()
{
  var ename;
  var cname;
  var passwd;
  var passwdcf;
  var mudlib;
  var wx;
  var dh;
  var nl;
  var fl;
  var hp;
  var js;
  var gg;
  var lx;
  var wuxing;
  var tg;
  var basic_gg;
  var basic_lx;
  var basic_wuxing;
  var basic_tg;
  var total_gift=0;
  var money;
  var pk;
  var nk;
  var pkdao;
  var nkdao;
  var jiemino;
  var jiemidao;
  var qujing;
  var qn;
  
  ename=this.document.player.ename.value;
  cname=this.document.player.cname.value;
  passwd=this.document.player.passwd.value;
  passwdcf=this.document.player.passwdcf.value;
  mudlib=this.document.player.mudlib.value;
  wx=this.document.player.wx.value;
  dh=this.document.player.dh.value;
  nl=this.document.player.nl.value;
  fl=this.document.player.fl.value;
  hp=this.document.player.hp.value;
  js=this.document.player.js.value;
  gg=this.document.player.gg.value;
  lx=this.document.player.lx.value;
  wuxing=this.document.player.wuxing.value;
  tg=this.document.player.tg.value;
  basic_gg=this.document.player.basic_gg.value;
  basic_lx=this.document.player.basic_lx.value;
  basic_wuxing=this.document.player.basic_wuxing.value;
  basic_tg=this.document.player.basic_tg.value;
  total_gift=parseInt(basic_tg)+parseInt(basic_gg)+parseInt(basic_wuxing)+parseInt(basic_lx);
  money=this.document.player.money.value;
  pk=this.document.player.pk.value;
  nk=this.document.player.nk.value;
  pkdao=this.document.player.pkdao.value;
  nkdao=this.document.player.nkdao.value;
  jiemino=this.document.player.jiemino.value;
  jiemidao=this.document.player.jiemidao.value;
  qn=this.document.player.qn.value;
  qujing=this.document.player.qujing.value;
  
  
  if (ename.length<1)
  {
  	alert("玩家英文名不能为空！    ");
  	this.document.player.ename.focus();
  	return false;
  }
  
  if (cname.length<1)
  {
  	alert("玩家中文名不能为空！    ");
  	this.document.player.cname.focus();
  	return false;
  }
  
  if (passwd.length<1)
  {
  	alert("玩家密码不能为空！    ");
  	this.document.player.passwd.focus();
  	return false;
  }
  
  if (passwdcf.length<1)
  {
  	alert("玩家密码确认不能为空！    ");
  	this.document.player.passwdcf.focus();
  	return false;
  }
  
  if (mudlib.length<1)
  {
  	alert("西游记类别不能为空！    ");
  	this.document.player.mudlib.focus();
  	return false;
  }
  
  
  if (passwdcf!=passwd)
  {
  	alert("两次密码输入不符，请确认！   ");
  	this.document.player.passwdcf.focus();
  	return false;
  }
  
  if (wx.length>0)
  {
  	if (isNaN(wx))
  	{
  		alert("请在武学栏填入阿拉伯数字！  ");
  		this.document.player.wx.focus();
  		return false;
  	}
  	if (wx>200000000)
  	{
  		alert("这么高的武学应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player.wx.focus();
  		return false;
  	}
  	if (wx<0)
  	{
  		alert("这么低的武学真是前无古人后无来者，本站庙小容不了大佛，对不起了！  ");
  		this.document.player.wx.focus();
  		return false;
  	}
  }
  
  if (dh.length>0)
  {
  	if (isNaN(dh))
  	{
  		alert("请在道行栏填入阿拉伯数字！  ");
  		this.document.player.dh.focus();
  		return false;
  	}  
  	if (dh>150000)
  	{
  		alert("这么高的道行应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player.dh.focus();
  		return false;
  	}
  	if (dh<0)
  	{
  		alert("这么低的道行真是前无古人后无来者，本站庙小容不了大佛，对不起了！  ");
  		this.document.player.dh.focus();
  		return false;
  	}
  }  
  
  if (nl.length>0)
  {
  	if (isNaN(nl))
  	{
  		alert("请在内力栏填入阿拉伯数字！  ");
  		this.document.player.nl.focus();
  		return false;
  	}  
  	if (nl>200)
  	{
  		alert("这么高的内力应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player.nl.focus();
  		return false;
  	}
  	if (nl<0)
  	{
  		alert("这么低的内力真是前无古人后无来者，本站庙小容不了大佛，对不起了！  ");
  		this.document.player.nl.focus();
  		return false;
  	}
  }  

  if (fl.length>0)
  {
  	if (isNaN(fl))
  	{
  		alert("请在法力栏填入阿拉伯数字！  ");
  		this.document.player.fl.focus();
  		return false;
  	}  
  	if (fl>15000)
  	{
  		alert("这么高的法力应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player.fl.focus();
  		return false;
  	}
  	if (fl<0)
  	{
  		alert("这么低的法力真是前无古人后无来者，本站庙小容不了大佛，对不起了！  ");
  		this.document.player.fl.focus();
  		return false;
  	}
  }  
  
  if (hp.length>0)
  {
  	if (isNaN(hp))
  	{
  		alert("请在气血栏填入阿拉伯数字！  ");
  		this.document.player.hp.focus();
  		return false;
  	}  
  	if (hp>5000)
  	{
  		alert("这么高的气血应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player.hp.focus();
  		return false;
  	}
  	if (hp<0)
  	{
  		alert("这么低的气血还活着真是奇迹呀！  ");
  		this.document.player.hp.focus();
  		return false;
  	}
  }

  if (js.length>0)
  {
  	if (isNaN(js))
  	{
  		alert("请在精神栏填入阿拉伯数字！  ");
  		this.document.player.js.focus();
  		return false;
  	}  
  	if (js>4000)
  	{
  		alert("这么高的精神应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player.js.focus();
  		return false;
  	}
  	if (js<0)
  	{
  		alert("这么低的精神还活着真是奇迹呀！  ");
  		this.document.player.js.focus();
  		return false;
  	}
  }    

  if (gg.length>0)
  {
  	if (isNaN(gg))
  	{
  		alert("请在根骨栏填入阿拉伯数字！  ");
  		this.document.player.gg.focus();
  		return false;
  	}  
  	if (gg>40)
  	{
  		alert("这么高的根骨应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player.gg.focus();
  		return false;
  	}
  	if (gg<10)
  	{
  		alert("这么低的根骨真是前无古人后无来者，本站庙小容不了大佛，对不起了！  ");
  		this.document.player.gg.focus();
  		return false;
  	}
  }  

  if (lx.length>0)
  {
  	if (isNaN(lx))
  	{
  		alert("请在灵性栏填入阿拉伯数字！  ");
  		this.document.player.lx.focus();
  		return false;
  	}  
  	if (lx>40)
  	{
  		alert("这么高的灵性应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player.lx.focus();
  		return false;
  	}
  	if (lx<10)
  	{
  		alert("这么低的灵性真是前无古人后无来者，本站庙小容不了大佛，对不起了！  ");
  		this.document.player.lx.focus();
  		return false;
  	}
  }    

  if (wuxing.length>0)
  {
  	if (isNaN(wuxing))
  	{
  		alert("请在悟性栏填入阿拉伯数字！  ");
  		this.document.player.wuxing.focus();
  		return false;
  	}  
  	if (wuxing>40)
  	{
  		alert("这么高的悟性应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player.wuxing.focus();
  		return false;
  	}
  	if (wuxing<10)
  	{
  		alert("这么低的悟性真是前无古人后无来者，本站庙小容不了大佛，对不起了！  ");
  		this.document.player.wuxing.focus();
  		return false;
  	}
  }    

  if (tg.length>0)
  {
  	if (isNaN(tg))
  	{
  		alert("请在体格栏填入阿拉伯数字！  ");
  		this.document.player.tg.focus();
  		return false;
  	}  
  	if (tg>40)
  	{
  		alert("这么高的体格应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player.tg.focus();
  		return false;
  	}
  	if (tg<10)
  	{
  		alert("这么低的体格真是前无古人后无来者，本站庙小容不了大佛，对不起了！  ");
  		this.document.player.tg.focus();
  		return false;
  	}
  }    


  if (basic_gg.length>0)
  {
  	if (isNaN(basic_gg))
  	{
  		alert("请在根骨栏填入阿拉伯数字！  ");
  		this.document.player.basic_gg.focus();
  		return false;
  	}  
  	if (basic_gg>30)
  	{
  		alert("这么高的根骨应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player.basic_gg.focus();
  		return false;
  	}
  	if (basic_gg<10)
  	{
  		alert("这么低的根骨真是前无古人后无来者，本站庙小容不了大佛，对不起了！  ");
  		this.document.player.basic_gg.focus();
  		return false;
  	}
  }  

  if (basic_lx.length>0)
  {
  	if (isNaN(basic_lx))
  	{
  		alert("请在灵性栏填入阿拉伯数字！  ");
  		this.document.player.basic_lx.focus();
  		return false;
  	}  
  	if (basic_lx>30)
  	{
  		alert("这么高的灵性应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player.basic_lx.focus();
  		return false;
  	}
  	if (basic_lx<10)
  	{
  		alert("这么低的灵性真是前无古人后无来者，本站庙小容不了大佛，对不起了！  ");
  		this.document.player.basic_lx.focus();
  		return false;
  	}
  }    

  if (basic_wuxing.length>0)
  {
  	if (isNaN(basic_wuxing))
  	{
  		alert("请在悟性栏填入阿拉伯数字！  ");
  		this.document.player.basic_wuxing.focus();
  		return false;
  	}  
  	if (basic_wuxing>30)
  	{
  		alert("这么高的悟性应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player.basic_wuxing.focus();
  		return false;
  	}
  	if (basic_wuxing<10)
  	{
  		alert("这么低的悟性真是前无古人后无来者，本站庙小容不了大佛，对不起了！  ");
  		this.document.player.basic_wuxing.focus();
  		return false;
  	}
  }    

  if (basic_tg.length>0)
  {
  	if (isNaN(basic_tg))
  	{
  		alert("请在体格栏填入阿拉伯数字！  ");
  		this.document.player.basic_tg.focus();
  		return false;
  	}  
  	if (basic_tg>30)
  	{
  		alert("这么高的体格应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player.basic_tg.focus();
  		return false;
  	}
  	if (basic_tg<10)
  	{
  		alert("这么低的体格真是前无古人后无来者，本站庙小容不了大佛，对不起了！  ");
  		this.document.player.basic_tg.focus();
  		return false;
  	}
  }    

  if (total_gift>90)
  {
	alert("基础天赋总和大于90了！  ");
	this.document.player.basic_tg.focus();
	return false;
  }

  if (money.length>0)
  {
  	if (isNaN(money))
  	{
  		alert("请在存款栏填入阿拉伯数字！  ");
  		this.document.player.money.focus();
  		return false;
  	}  
  	if (money>500000)
  	{
  		alert("您是天下第一富翁了吧？钱财不可露白，是不是少报一点，这样税收也少交一点，嘻嘻！  ");
  		this.document.player.money.focus();
  		return false;
  	}
  	if (money<0)
  	{
  		alert("这么穷还活著作什么！  ");
  		this.document.player.money.focus();
  		return false;
  	}
  }    

  if (pk.length>0)
  {
  	if (isNaN(pk))
  	{
  		alert("请在PK栏填入阿拉伯数字！  ");
  		this.document.player.pk.focus();
  		return false;
  	}  
  	if (pk>1000)
  	{
  		alert("PK了这么多人真够辛苦的，要让人相信也很辛苦呀！  ");
  		this.document.player.pk.focus();
  		return false;
  	}
  	if (pk<0)
  	{
  		alert("没PK过人就直说吧，这不是什么丢脸的事，嘻嘻！  ");
  		this.document.player.pk.focus();
  		return false;
  	}
  }      
  
  if (nk.length>0)
  {
  	if (isNaN(nk))
  	{
  		alert("请在NK栏填入阿拉伯数字！  ");
  		this.document.player.nk.focus();
  		return false;
  	}  
  	if (nk>5000000)
  	{
  		alert("NK了这么多NPC真够辛苦的吧？要让人相信也很辛苦呀！  ");
  		this.document.player.nk.focus();
  		return false;
  	}
  	if (nk<0)
  	{
  		alert("您要是一个NPC都没NK过我信，可这负的，hmm....?！  ");
  		this.document.player.nk.focus();
  		return false;
  	}
  	if (parseInt(nk)<parseInt(pk))
  	{
  		alert("大哥！你杀的人怎么比pk人数还少？这个算法......  ");
  		this.document.player.nk.focus();
  		return false;
  	}
  }  
  
  if (pkdao.length>0)
  {
  	if (isNaN(pkdao))
  	{
  		alert("请在PK道行栏填入阿拉伯数字！  ");
  		this.document.player.pkdao.focus();
  		return false;
  	}  
  	if (pkdao>15000)
  	{
  		alert("离谱了吧，PK弄到这么多道行你还能活到现在？  ");
  		this.document.player.pkdao.focus();
  		return false;
  	}
  	if (pkdao<0)
  	{
  		alert("离谱了吧，哪里有负的PK道行？！  ");
  		this.document.player.pkdao.focus();
  		return false;
  	}
  }  

  if (nkdao.length>0)
  {
  	if (isNaN(nkdao))
  	{
  		alert("请在NK道行栏填入阿拉伯数字！  ");
  		this.document.player.nkdao.focus();
  		return false;
  	}  
  	if (nkdao>5000)
  	{
  		alert("这么高的NK道行前所未闻哪！  ");
  		this.document.player.nkdao.focus();
  		return false;
  	}
  	if (nkdao<0)
  	{
  		alert("离谱了吧，哪里有负的NK道行？   ");
  		this.document.player.nkdao.focus();
  		return false;
  	}
  }  
      
  if (jiemidao.length>0)
  {
  	if (isNaN(jiemidao))
  	{
  		alert("请在解谜道行栏填入阿拉伯数字！  ");
  		this.document.player.jiemidao.focus();
  		return false;
  	}  
  	if (jiemidao>100000)
  	{
  		alert("这么高的解谜道行应该天下第一了吧？是不是稍微降低一点，让后辈也有机会出出头？  ");
  		this.document.player.jiemidao.focus();
  		return false;
  	}
  	if (jiemidao<0)
  	{
  		alert("解谜解出负道行真是前无古人后无来者呀，佩服！  ");
  		this.document.player.jiemidao.focus();
  		return false;
  	}
  }  

  if (qn.length>0)
  {
  	if (isNaN(qn))
  	{
  		alert("请在解谜潜能栏填入阿拉伯数字！  ");
  		this.document.player.qn.focus();
  		return false;
  	}  
  	if (qn>99999999)
  	{
  		alert("这么多的潜能奖励用不完了吧？？  ");
  		this.document.player.qn.focus();
  		return false;
  	}
  	if (qn<0)
  	{
  		alert("解迷解成这样，心痛吧？？  ");
  		this.document.player.qn.focus();
  		return false;
  	}
  }  
        
  if (jiemino.length>0)
  {
  	if (isNaN(jiemino))
  	{
  		alert("请在解谜数目栏填入阿拉伯数字！  ");
  		this.document.player.jiemino.focus();
  		return false;
  	}  
  	if (jiemino>1000000)
  	{
  		alert("巫师帮你解谜呀？！  ");
  		this.document.player.jiemino.focus();
  		return false;
  	}
  	if (jiemino<0)
  	{
  		alert("没解过谜没人笑你呀，不用放个负的惊世骇俗吧？！  ");
  		this.document.player.jiemino.focus();
  		return false;
  	}
  }          

  if (qujing.length>0)
  {
  	if (isNaN(qujing))
  	{
  		alert("请在取经数目栏填入阿拉伯数字！  ");
  		this.document.player.qujing.focus();
  		return false;
  	}  
  	if (qujing>500)
  	{
  		alert("如来佛每天亲自接送您呀？！  ");
  		this.document.player.qujing.focus();
  		return false;
  	}
  	if (qujing<0)
  	{
  		alert("没取经没人笑你呀，不用放个负的惊世骇俗吧？！  ");
  		this.document.player.qujing.focus();
  		return false;
  	}
  }  


  var skills=new Array();
  skills[0]=this.document.player.basic_force;
  skills[1]=this.document.player.spells;
  skills[2]=this.document.player.unarmed;
  skills[3]=this.document.player.parry;
  skills[4]=this.document.player.literate;
  skills[5]=this.document.player.fork;
  skills[6]=this.document.player.stick;
  skills[7]=this.document.player.dodge;
  skills[8]=this.document.player.sword;
  skills[9]=this.document.player.hammer;
  skills[10]=this.document.player.blade;
  skills[11]=this.document.player.whip;
  skills[12]=this.document.player.staff;
  skills[13]=this.document.player.steal;
  skills[14]=this.document.player.bainiao;
  skills[15]=this.document.player.bingpo;
  skills[16]=this.document.player.cuixin;
  skills[17]=this.document.player.yingzhua;
  skills[18]=this.document.player.xiaoyao;
  skills[19]=this.document.player.throwing;
  skills[20]=this.document.player.ningxie;
  skills[21]=this.document.player.dengxian;
  skills[22]=this.document.player.baihua;
  skills[23]=this.document.player.moondance;
  skills[24]=this.document.player.moonforce;
  skills[25]=this.document.player.moonshentong;
  skills[26]=this.document.player.snowsword;
  skills[27]=this.document.player.jueqing;
  skills[28]=this.document.player.yaofa;
  skills[29]=this.document.player.qixiu;
  skills[30]=this.document.player.kugu;
  skills[31]=this.document.player.lingfu;
  skills[32]=this.document.player.yinfeng;
  skills[33]=this.document.player.huntian;
  skills[34]=this.document.player.bagua;
  skills[35]=this.document.player.sanqing;
  skills[36]=this.document.player.fumozhang;
  skills[37]=this.document.player.kaishan;
  skills[38]=this.document.player.yange;
  skills[39]=this.document.player.zhenyuan;
  skills[40]=this.document.player.taiyi;
  skills[41]=this.document.player.wuxingquan;
  skills[42]=this.document.player.xiaofeng;
  skills[43]=this.document.player.jindou;
  skills[44]=this.document.player.liangyi;
  skills[45]=this.document.player.puti;
  skills[46]=this.document.player.qianjun;
  skills[47]=this.document.player.wuxiang;
  skills[48]=this.document.player.dao;
  skills[49]=this.document.player.buddhism;
  skills[50]=this.document.player.jienan;
  skills[51]=this.document.player.lotusmove;
  skills[52]=this.document.player.lotusforce;
  skills[53]=this.document.player.lunhui;
  skills[54]=this.document.player.huoyun;
  skills[55]=this.document.player.liehuo;
  skills[56]=this.document.player.sheqi;
  skills[57]=this.document.player.guiying;
  skills[58]=this.document.player.gouhun;
  skills[59]=this.document.player.jinghun;
  skills[60]=this.document.player.kusang;
  skills[61]=this.document.player.zhuihun;
  skills[62]=this.document.player.bihai;
  skills[63]=this.document.player.dragonfight;
  skills[64]=this.document.player.dragonforce;
  skills[65]=this.document.player.fengbo;
  skills[66]=this.document.player.dragonstep;
  skills[67]=this.document.player.huntianchui;
  skills[68]=this.document.player.yangyan;
  skills[69]=this.document.player.qianshou;
  skills[70]=this.document.player.mace;
  skills[71]=this.document.player.spear;
  skills[72]=this.document.player.rake;
  skills[73]=this.document.player.axe;
  skills[74]=this.document.player.wusi-mace;
  skills[75]=this.document.player.baguazhou;
  skills[76]=this.document.player.archery;
  skills[77]=this.document.player.bawang-qiang;
  skills[78]=this.document.player.changquan;
  skills[79]=this.document.player.yanxing-steps;
  skills[80]=this.document.player.lengquan-force;
  skills[81]=this.document.player.zouxiao;
  var j=-1;
  for (i=0;i<82;i++)
  {
  	if (skills[i].value.length>0)
  	{
  		if(isNaN(skills[i].value))
  		{
  			alert("技能必须是一个阿拉伯数值！    ");
  			skills[i].focus();
  			return false;
  		}
  		
  		if(skills[i].value>2000)
  		{
  			alert("技能太高了吧老大？你以为自己真的天下第一呀？？");
  			skills[i].focus();
  			return false;
  		}
  		
  		if(skills[i].value<0)
  		{
  			alert("老大太谦虚了吧，还有负技能吗？？");
  			skills[i].focus();
  			return false;
  		}
		j++;
		if (j>parseInt(basic_lx))
		{
		  	alert("大哥你的基本灵性不能支持那么多的技能，身子要紧啊！  ");
	  		this.document.player.basic_lx.focus();
		  	return false;
		} 		
  	}
  }
  return true;
}

function check_mudsite()
{

  var mudlib;
  mudlib=this.document.register.mudlib;


	if (mudlib.value.length<=0)
	{
		alert("游戏类别不能为空！");
		this.document.register.mudlib.focus();
		return false;
	}
	return true;
}

function checkStr(str)  
{  
       var  s  =  str.replace(/\*/g,  "");  
       var  b  =  s.replace(/[^\x00-\xff]/g,"**").length;  
       var  cn=  b  -  s.length;  
       var  en=  s.length  -  cn  +  str.length  -  s.length;  
       alert("字符串中文字有  "+  cn  +"  个\r\n字符串英文字有  "+  en  +"  个")  
       return false;
}
