function regInput(obj, reg, inputStr)
	{
		var docSel	= document.selection.createRange()
		if (docSel.parentElement().tagName != "INPUT")	return false
		oSel = docSel.duplicate()
		oSel.text = ""
		var srcRange	= obj.createTextRange()
		oSel.setEndPoint("StartToStart", srcRange)
		var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
		return reg.test(str)
	}

function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}

function isnum(str)
{
	rset="";
	for(i=0;i<str.length;i++)
	{
		if(str.charAt(i)>="0" && str.charAt(i)<="9")
		{
		}
		else
		{
			return 0;
		}
	}
	return 1;
}

function incnum(str)
{
	rset="";
	for(i=0;i<str.length;i++)
	{
		if(str.charAt(i)>="0" && str.charAt(i)<="9")
		{
			return 1;
		}
		else
		{
		}
	}
	return 0;
}

function checkuu()
{
  if(checkspace(document.loginfo.username.value)) {
	document.loginfo.username.focus();
        alert("会员名不能为空！");
	return false;
  }
  if(checkspace(document.loginfo.password.value)) {
	document.loginfo.password.focus();
        alert("密码不能为空！");
	return false;
  }
  if(checkspace(document.loginfo.codestr.value)) {
	document.loginfo.codestr.focus();
	alert("验证码不能为空");
	return false;
  }
  if (! isnum(document.loginfo.codestr.value))
  {
	document.loginfo.codestr.focus();
	alert("验证码必须是数字，请正确填写！");
	return false;
  }
}