function withChinese(argStr)
{
	return argStr.match(/^[^\x00-\x7f]+$/);
}

function checkFormEn(theForm)
{
	if (theForm.domain.value.match(/^\s*$/))
	{
		alert("您必须先输入域名！");
		theForm.domain.focus();
		return false;
	}

	if (theForm.domain.value.match(/\s/))
	{
		alert("对不起，您输入的域名中包含空格，请检查后重新输入！");
		theForm.domain.focus();
		return false;
	}

	if (!theForm.domain.value.match(/^[\w\d\-]+$/))
	{
		alert("对不起，您输入的域名无效，请检查后重新输入!");
		theForm.domain.focus();
		return false;
	}

	var domain = theForm.domain.value;
	var root = theForm.root.value;

	setWait(theForm); 
	
	return true;
}

function checkFormCn(theForm)
{
	if (theForm.domain.value.match(/^\s*$/))
	{
		alert("您必须先输入域名！");
		theForm.domain.focus();
		return false;
	}

	if (theForm.domain.value.match(/\s/))
	{
		alert("对不起，您输入的域名中包含空格，请检查后重新输入！");
		theForm.domain.focus();
		return false;
	}

	if (!theForm.domain.value.match(/^[^\x00-\x7f]+$/))
	{
		alert("对不起，您输入的域名无效，请检查后重新输入!");
		theForm.domain.focus();
		return false;
	}

	var domain = theForm.domain.value;
	var root = theForm.root.value;

    	var foundChinese = withChinese(domain);
	var verifyOK = true;
	
	root = root.toLowerCase();
	
	if (foundChinese || root == "cn" || root == "中国" || root == "公司" || root == "网络")
	{
		if (!(root == "com" || root == "net" || root == "org" || root == "cn" || root == "中国" || root == "公司" || root == "网络"))
		{
			alert("对不起，现在我们只支持以 \" .com .net .org .cn .中国 .公司 .网络 \" 为后缀的中文域名。请您重新选择！");
			verifyOK = false;
		} 
		
		else if (!foundChinese)
		{
			alert("对不起，对于 \" .cn .中国 .公司 .网络 \" 后缀，只能注册中文域名。请您重新选择！");
			verifyOK = false;
    	}
    }
	
	if (!verifyOK)
	{
		theForm.domain.focus();
		return false;
	}
	
	setWait(theForm); 
	
	return true;
}

function setneedCheck(theForm,checkvalue)
{
    theForm.needCheck.value=checkvalue;
	return true;
}

function setWait(theForm)
{
	return true;
}
