//index gamejs
function showhidegame(flag)
{
	document.getElementById("game_"+flag).style.display="block";
	for (i=1;i<11;i++)
	{
		if (i!=parseInt(flag))
		{
			document.getElementById("game_"+i.toString()).style.display="none";
		}	
	}
}
//index gamejs
function decorate(obj,num)
{
  document.getElementById(obj).className="t2";
  for (i=1;i<11;i++)
  {
    if (num!=i&&document.getElementById("td"+i.toString()))
    {
      document.getElementById("td"+i.toString()).className="t1";
    }
  }
}
//goPage
function go(clsId,obj)
{
	if (parseInt(obj)==1)
	{
		location.href="/goods-"+clsId+".html";
	}
	else
	{
		location.href="/goods-"+clsId+"-"+obj+".html";
	}
}
//gopage in the myissue.html
function goIssue(obj)
{
	location.href="/myissue-"+obj+".html";
}
function goPage(obj1,obj2)
{
	location.href=obj1+"?pagenum="+obj2;
}
//chkusr1
function chkReg1(obj)
{
	if (obj.godName.value=="")
	{
		alert("请填写您的电子邮件!");
		obj.godName.focus();
		return false; 
	}
	else if (obj.godName.value.indexOf('@')==-1||obj.godName.value.indexOf('.')==-1)
	{
		alert("请填写有效的电子邮件地址!");
		obj.godName.focus();
		return false; 
	}
	else if (obj.godPwd.value=="")
	{
		alert("请输入您的密码!");
		obj.godPwd.focus();
		return false; 
	}
	else if (obj.godPwd.value.length<6)
	{
		alert("您输入的密码太短!");
		obj.godPwd.focus();
		return false; 
	}
	else if (obj.godPwd.value.length>20)
	{
		alert("您输入的密码大于20位字符!");
		obj.godPwd.focus();
		return false; 
	}
	else if (obj.trueName.value=="")
	{
		alert("请输入您的真实姓名!");
		obj.trueName.focus();
		return false; 
	}
	//else if (obj.addr.value=="")
	//{
	//	alert("请输入您的详细地址!");
	//	obj.addr.focus();
	//	return false; 
	//}
	else if (obj.telCountry.value=="")
	{
		alert("请选择您所在的国家!");
		obj.telCountry.focus();
		return false; 
	}
	else if (obj.tel.value=="")
	{
		alert("请输入您的联系方式,以便我们在第一时间内联系您!");
		obj.tel.focus();
		return false; 
	}
}
//chkusr2
function chkReg2(obj)
{
	//if (obj.godName.value=="")
	//{
	//	alert("请填写您的电子邮件!");
	//	obj.godName.focus();
	//	return false; 
	//}
	//else if (obj.godName.value.indexOf('@')==-1||obj.godName.value.indexOf('.')==-1)
	//{
	//	alert("请填写有效的电子邮件地址!");
	//	obj.godName.focus();
	//	return false; 
	//}
	if (obj.godPwd.value!=""&&obj.godPwd.value.length<6)
	{
		alert("您输入的密码太短!");
		obj.godPwd.focus();
		return false; 
	}
	else if (obj.godPwd.value!=""&&obj.godPwd.value.length>20)
	{
		alert("您输入的密码大于20位字符!");
		obj.godPwd.focus();
		return false; 
	}
	else if (obj.trueName.value=="")
	{
		alert("请输入您的真实姓名!");
		obj.trueName.focus();
		return false; 
	}
	//else if (obj.addr.value=="")
	//{
	//	alert("请输入您的详细地址!");
	//	obj.addr.focus();
	//	return false; 
	//}
	else if (obj.telCountry.value=="")
	{
		alert("请选择您所在的国家!");
		obj.telCountry.focus();
		return false; 
	}
	else if (obj.tel.value=="")
	{
		alert("请输入您的联系方式,以便我们在第一时间内联系您!");
		obj.tel.focus();
		return false; 
	}
}
//chklogin
function chkLogin(obj)
{
	if (obj.godName.value=="")
	{
		alert("请填写您的电子邮件!");
		obj.godName.focus();
		return false; 
	}
	else if (obj.godName.value.indexOf('@')==-1||obj.godName.value.indexOf('.')==-1)
	{
		alert("请填写有效的电子邮件地址!");
		obj.godName.focus();
		return false; 
	}
	else if (obj.godPwd.value=="")
	{
		alert("请输入您的密码!");
		obj.godPwd.focus();
		return false; 
	}
	else if (obj.godPwd.value.length<6)
	{
		alert("您输入的密码小于6位!");
		obj.godPwd.focus();
		return false; 
	}
	else if (obj.godPwd.value.length>20)
	{
		alert("您输入的密码大于20位字符!");
		obj.godPwd.focus();
		return false; 
	}
}
//chkmodpwd
function chkmodpwd(obj)
{
	if (obj.oldpwd.value=="")
	{
		alert("请输入原密码!");
		obj.oldpwd.focus();
		return false; 
	}
	else if ((obj.oldpwd.value.length<6)||(obj.oldpwd.value.length>20))
	{
		alert("请输入6到20位的字符!");
		obj.oldpwd.focus();
		return false; 
	}
	else if (obj.newpwd.value=="")
	{
		alert("请输入新密码!");
		obj.newpwd.focus();
		return false; 
	}
	else if ((obj.newpwd.value.length<6)||(obj.newpwd.value.length>20))
	{
		alert("请输入6到20位的字符!");
		obj.newpwd.focus();
		return false; 
	}
	else if (obj.confirmpwd.value=="")
	{
		alert("您再输入一遍!");
		obj.confirmpwd.focus();
		return false; 
	}
	else if ((obj.newpwd.value)!=(obj.confirmpwd.value))
	{
		alert("两次密码输入不一致!");
		obj.confirmpwd.focus();
		return false; 
	}
}
//chkfindpwd
function chkfindpwd(obj)
{
	if (obj.newpwd.value=="")
	{
		alert("请输入新密码!");
		obj.newpwd.focus();
		return false; 
	}
	else if ((obj.newpwd.value.length<6)||(obj.newpwd.value.length>20))
	{
		alert("请输入6到20位的字符!");
		obj.newpwd.focus();
		return false; 
	}
	else if (obj.confirmpwd.value=="")
	{
		alert("您再输入一遍!");
		obj.confirmpwd.focus();
		return false; 
	}
	else if ((obj.newpwd.value)!=(obj.confirmpwd.value))
	{
		alert("两次密码输入不一致!");
		obj.confirmpwd.focus();
		return false; 
	}
}
//chkemail
function chkEmail(obj)
{
	if (obj.email.value=="")
	{
		alert("请输入您的电子邮箱!");
		obj.email.focus();
		return false; 
	}
	else if ((obj.email.value.indexOf('@')==-1)||(obj.email.value.indexOf('.')==-1))
	{
		alert("请填写有效的电子邮件地址!");
		obj.email.focus();
		return false; 
	}
}
//chkOrder
function chkOrder(obj,para1)
{
	if (obj.curr.value=="")
	{
		alert("请您选择相应的支付货币,如果不能选择,请换用IE浏览器!");
		obj.curr.focus();
		return false;
	}
	else if (para1=="2"&&obj.charge.value=="")
	{
		alert("请填写直充的相关资料,否则我们无法为您的游戏充值!");
		obj.charge.focus();
		return false;
	}
	else if (obj.charge.value.length>500)
	{
		alert("输入的字符不能大于500!");
		obj.charge.focus();
		return false;
	}
	else if (obj.godBeizhu.value.length>1000)
	{
		alert("输入的字符不能大于1000!");
		obj.godBeizhu.focus();
		return false;
	}
	else if (obj.payUnit.value!="CNY"&&obj.foreignPrice.value=="")
	{
		alert("正在更新价格,请您等一小会再提交订单!");
		return false;
	}
}
//
function chkGodOrder(obj)
{
	if (obj.orderNum.value=="")
	{
		alert("请输入要查询的订单号!");
		obj.orderNum.focus();
		return false;
	}
	else if (isNaN(obj.orderNum.value))
	{
		alert("请输入有效数字!");
		obj.orderNum.focus();
		return false;
	}
}
//chk the message.html
function chkMes(obj)
{
	if (obj.author.value=="")
	{
		alert("请注册会员或登陆!");
		obj.author.focus();
		return false;
	}
	else if (obj.typeId.value=="")
	{
		alert("请选择问题类型!");
		obj.typeId.focus();
		return false;
	}
	else if (obj.authorBeizhu.value=="")
	{
		alert("请输入您的问题!");
		obj.authorBeizhu.focus();
		return false;
	}
}
//


