function RegCheck()//新用户注册输入检查
{
	if(document.RegForm.user_name.value.length == 0)
	{
		alert("请输入[用户名]");
		document.RegForm.user_name.focus();
		return false;
	}
	
	if(document.RegForm.password1.value.length == 0)
	{
		alert("请输入[密码]");
		document.RegForm.password1.focus();
		return false;
	}
	
	if(document.RegForm.password2.value.length == 0)
	{
		alert("请再次输入[密码]");
		document.RegForm.password2.focus();
		return false;
	}
	
	if(document.RegForm.real_name.value.length == 0)
	{
		alert("[联系人]?");
		document.RegForm.real_name.focus();
		return false;
	}	
	
	if(document.RegForm.email.value.length == 0)
	{
		alert("[管理员email]?");
		document.RegForm.email.focus();
		return false;
	}	
	
	if(document.RegForm.company_type.value.length == 0)
	{
		alert("您忘了[选择行业]");
		document.RegForm.company_type.focus();
		return false;
	}

	if(document.RegForm.company_shortname.value.length == 0)
	{
		alert("[公司简称]必需填写");
		document.RegForm.company_shortname.focus();
		return false;
	}

	if(document.RegForm.company_address.value.length == 0)
	{
		alert("[公司注册地址]没有填写哦");
		document.RegForm.company_address.focus();
		return false;
	}		

	if(document.RegForm.company_zone.value.length == 0)
	{
		alert("您忘了[选择地区]");
		document.RegForm.company_zone.focus();
		return false;
	}
	
	if(document.RegForm.company_tel.value.length == 0&&document.RegForm.company_fax.value.length == 0&&document.RegForm.mobil.value.length == 0)
	{
		alert("请填写您的电话");
		document.RegForm.company_tel.focus();
		return false;
	}	
	
	
	
	
		
	return true;
}




function add_memo()//添加留言
 {
	var e=window.event.srcElement,n=e;
	while(n=n.previousSibling)if(n.name=="memo[]")break;
	if(n)n.value+=e.value
}

function add_memo_all()//添加留言to all
 {
	var e=window.event.srcElement,n=e;
	while(n=n.previousSibling)if(n.name=="memo_all")break;
	if(n)n.value+=e.value
}




function showtip(text)  //显示链接的说明
{
	if (document.all&&document.readyState=="complete")//针对IE
	{
		 //显示跑马灯,内容就是提示框的内容
		document.all.tooltip.innerHTML="<div vAlign=center><font style='font-size: 12px;'>"+text+"</font></div>";
		document.all.tooltip.style.pixelLeft=event.clientX+document.body.scrollLeft;
		document.all.tooltip.style.pixelTop=event.clientY+document.body.scrollTop+20;
		 if (event.clientX>900)
		{
			document.all.tooltip.style.pixelLeft=780;
			document.all.tooltip.style.pixelTop=event.clientY+document.body.scrollTop+20;
		}
		document.all.tooltip.style.visibility="visible";
	}
}

document.write(
	"<div id=\"tooltip\" style=\"position:absolute;visibility:hidden; padding:3px;border:1px solid #C0C0C0;\
	;background-color:#D1F2AA; height: 19px; left:77;top: 96px;z-index:10;\"></div>");
function hidetip()  //隐藏链接的说明
{
	if (document.all)
	document.all.tooltip.style.visibility="hidden";
}

function setcolor(fntcolor,bgcolor)
{
	document.all.tooltip.style.bgcolor=bgcolor;
	document.all.tooltip.innerHTML.Color = fntcolor;
}

function showhint(text)
{
	onmousemove=showtip(text);
	onmouseover=showtip(text);
	onmouseout=hidetip();
}

function view(id) {
	var viewurl="/profile1.jsp?user="+id;
	window.open(viewurl,'viewurl','left=70,top=20,width=450,height=320,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no');

}
