<!--
function Juge(theForm)
{
 
  if (theForm.uid.value == "")
  {
    alert("请输入用户名!");
    theForm.uid.focus();
    return (false);
  }

  if (!checktext(theForm.uid.value)){
    alert("\用户名中含有空格或无效字符!");
    theForm.uid.select();
    theForm.uid.focus();
    return (false);
  }

	var checkOKpass = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";
	var checkStrpass = theForm.uid.value;
	var allValidpass = true;
	for (i = 0;  i < checkStrpass.length;  i++)
	{
		ch = checkStrpass.charAt(i);
		for (j = 0;  j < checkOKpass.length;  j++)
		if (ch == checkOKpass.charAt(j))
			break;
		if (j == checkOKpass.length)
		{
			allValidpass = false;
			break;
		}
	}

	if (!allValidpass)
	{
	alert("用户名有效值为数字或字母");
	theForm.uid.select();
	theForm.uid.focus();
		return (false);
	}
	
  if (theForm.password.value == "")
  {
    alert("请输入密码!");
    theForm.password.focus();
    return (false);
  }

  if (theForm.password.value.length < 6)
  {
    alert("\请输入6-20位密码");
    return (false);
  }

  if (theForm.password.value !=theForm.password1.value)
  {
    alert("您输入的密码与确认密码不符!");
    theForm.password.select();
    theForm.password.focus();
	theForm.password1.value="";
    return (false);
  }

	var checkOKpass = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";
	var checkStrpass = theForm.password.value;
	var allValidpass = true;
	for (i = 0;  i < checkStrpass.length;  i++)
	{
		ch = checkStrpass.charAt(i);
		for (j = 0;  j < checkOKpass.length;  j++)
		if (ch == checkOKpass.charAt(j))
			break;
		if (j == checkOKpass.length)
		{
			allValidpass = false;
			break;
		}
	}

	if (!allValidpass)
	{
	alert("密码有效值为数字或字母");
	theForm.password.select();
    theForm.password.focus();
	theForm.password1.value="";
		return (false);
	}
	
  if (theForm.dwmc.value == "")
  {
    alert("请输入企业名称!");
    theForm.dwmc.focus();
    return (false);
  }

  if (theForm.dwdz.value == "")
  {
    alert("请输入企业地址!");
    theForm.dwdz.focus();
    return (false);
  }

	var checkdigOK = "0123456789";
	var checkStr = theForm.yb.value;
	var allValid = true;
	for (i = 0;  i < checkStr.length;  i++)
	{
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkdigOK.length;  j++)
		if (ch == checkdigOK.charAt(j))
			break;
		if (j == checkdigOK.length)
		{
			allValid = false;
			break;
		}
	}

	if (theForm.yb.value.length != 6)
	{
			allValid = false;
	}

	if (!allValid)
	{
		alert("请输入正确的邮政编码!");
		theForm.yb.select();
		theForm.yb.focus();
		return (false);
	}

  if (theForm.lxr.value == "")
  {
    alert("请输入联系人!");
    theForm.lxr.focus();
    return (false);
  }

	var checkStr = theForm.quhao.value;
	var allValid = true;
	for (i = 0;  i < checkStr.length;  i++)
	{
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkdigOK.length;  j++)
		if (ch == checkdigOK.charAt(j))
			break;
		if (j == checkdigOK.length)
		{
			allValid = false;
			break;
		}
	}

	if (theForm.quhao.value.length < 2 || theForm.quhao.value.length > 4 )
	{
			allValid = false;
	}

	if (!allValid)
	{
		alert("请输入正确的长途区号!");
		theForm.quhao.focus();
		return (false);
	}

	var checkdigOK = "0123456789+-,; ";
	var checkStr = theForm.lxdh.value;
	var allValid = true;
	for (i = 0;  i < checkStr.length;  i++)
	{
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkdigOK.length;  j++)
		if (ch == checkdigOK.charAt(j))
			break;
		if (j == checkdigOK.length)
		{
			allValid = false;
			break;
		}
	}

	if (theForm.lxdh.value.length < 6)
	{
			allValid = false;
	}

	if (!allValid)
	{
		alert("请输入正确的电话号码!");
		theForm.lxdh.focus();
		return (false);
	}

	var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_@.";
	var checkStr = theForm.dzxx.value;
	var allValid = true;
	for (i = 0;  i < checkStr.length;  i++)
	{
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkOK.length;  j++)
		if (ch == checkOK.charAt(j))
			break;
		if (j == checkOK.length)
		{
			allValid = false;
			break;
		}
	}

	address=theForm.dzxx.value;
    if(address.length>0)
	{
        i=address.indexOf("@");
        if(i==-1)
		{
			window.alert("对不起，电子信箱地址无效！")
			theForm.dzxx.focus();
			return false
        }
       ii=address.indexOf(".")
        if(ii==-1)
		{
			window.alert("对不起，电子信箱地址无效！")
			theForm.dzxx.focus();
			return false
        }

    }
	if (!checktext(theForm.dzxx.value))
	{
		alert("请输入正确的电子信箱地址！");
		theForm.dzxx.select();
		theForm.dzxx.focus();
		return (false);
	}


  if (theForm.qygk.value.length > 254)
  {
    alert("对不起，企业简介内容超长，请删除部分内容");
    return (false);
  }
  
  if (theForm.qygke.value.length > 254)
  {
    alert("对不起，英文简介内容超长，请删除部分内容");
    return (false);
  }

       alert("点击确定表示您确认发布的信息真实有效");
               return true;
}


function checktext(text)
{
  allValid = true;

  for (i = 0;  i < text.length;  i++)
	{
	if (text.charAt(i) == " " || text.charAt(i) == "'")
		{
		allValid = false;
		break;
		}
	}

return allValid;
}

function rege(theForm)
{
  if (theForm.uid.value == "")
  {
    alert("请输入用户名!");
    theForm.uid.focus();
    return (false);
  }


  if (!checktext(theForm.uid.value)){
    alert("用户名中不能含有空格或无效字符!");
    theForm.uid.select();
    theForm.uid.focus();
    return (false);
  }

	var checkOKpass = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";
	var checkStrpass = theForm.uid.value;
	var allValidpass = true;
	for (i = 0;  i < checkStrpass.length;  i++)
	{
		ch = checkStrpass.charAt(i);
		for (j = 0;  j < checkOKpass.length;  j++)
		if (ch == checkOKpass.charAt(j))
			break;
		if (j == checkOKpass.length)
		{
			allValidpass = false;
			break;
		}
	}

	if (!allValidpass)
	{
	alert("用户名有效值为数字或字母");
	theForm.uid.select();
	theForm.uid.focus();
		return (false);
	}
	
  if (theForm.pwd.value == "")
  {
    alert("请输入密码!");
    theForm.pwd.focus();
    return (false);
  }


  if (!checktext(theForm.pwd.value)){
    alert("密码中不能含有空格或无效字符!");
    theForm.pwd.select();
    theForm.pwd.focus();
    return (false);
  }

	var checkOKpass = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";
	var checkStrpass = theForm.pwd.value;
	var allValidpass = true;
	for (i = 0;  i < checkStrpass.length;  i++)
	{
		ch = checkStrpass.charAt(i);
		for (j = 0;  j < checkOKpass.length;  j++)
		if (ch == checkOKpass.charAt(j))
			break;
		if (j == checkOKpass.length)
		{
			allValidpass = false;
			break;
		}
	}

	if (!allValidpass)
	{
	alert("密码有效值为数字或字母");
	theForm.pwd.select();
	theForm.pwd.focus();
		return (false);
	}
}
	
function popwin(url)
 {
  var newswin=window.open(url,"","toolbar=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=640,height=460,left=0,top=0");
  newswin.focus();
  
}

function win(url)
 {
  var newswin=window.open(url,"","toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=220,height=30,left=50,top=30");
  newswin.focus();
  
}




//-->

