function setHomePage(obj, url){
	if (document.all){//检查浏览器是否为IE
		obj.style.behavior='url(#default#homepage)';
		obj.setHomePage(url);
		return false;
	}
}
function myAddFavorite(title,url,desc){
	if ((typeof window.sidebar == 'object') && (typeof window.sidebar.addPanel == 'function')){
		window.sidebar.addPanel(title,url,desc);//加入firefox的书签中
	} else{//加入IE的收藏夹中
		window.external.AddFavorite(url,title);
	}
}

		function RegPost()
{
	if (regform.user.value.length<4)
	{
		alert("用户名不能小于4位");
		regform.user.focus();
		return false;
	}
		if (regform.password.value.length<6)
	{
		alert("密码不能小于6位");
		regform.password.focus();
		return false;
	}
		if (regform.password2.value.length<6)
	{
		alert("确认密码不能小于6位");
		regform.password2.focus();
		return false;
	}
			if (regform.password.value!=regform.password2.value)
	{
		alert("两次输入密码不一致,请重新输入");
		regform.password.focus();
		return false;
	}
			if (regform.email.value=="")
	{
		alert("请填写emial");
		regform.email.focus();
		return false;
	}
		if (regform.email.value!=""&& !regform.email.value.match( /.+@/ ) )
	{
		alert("emial格式不正确");
		regform.email.focus();
		return false;
	}
		if (regform.name.value=="")
	{
		alert("真实姓名必须填写");
		regform.name.focus();
		return false;
	}
	if (regform.address.value=="")
	{
		alert("收货地址必须填写");
		regform.address.focus();
		return false;
	}
		if (regform.postcode.value=="")
	{
		alert("邮编必须填写");
		regform.postcode.focus();
		return false;
	}
		if (regform.tel.value=="")
	{
		alert("联系电话必须填写");
		regform.tel.focus();
		return false;
	}
}
	function LoginPost()
{
	if (loginform.user.value=="")
	{
		alert("用户名不能为空");
		loginform.user.focus();
		return false;
	}
	if (loginform.password.value=="")
	{
		alert("密码不能为空");
		loginform.password.focus();
		return false;
	}
}
	function UnionPost()
{
	if (unionform.name.value=="")
	{
		alert("姓名不能为空");
		unionform.name.focus();
		return false;
	}
	if (unionform.age.value=="")
	{
		alert("年龄不能为空");
		unionform.age.focus();
		return false;
	}
	if (unionform.mobile.value=="")
	{
		alert("手机不能为空");
		unionform.mobile.focus();
		return false;
	}
	if (unionform.address.value=="")
	{
		alert("地址不能为空");
		unionform.address.focus();
		return false;
	}
	if (unionform.postcode.value=="")
	{
		alert("邮编不能为空");
		unionform.postcode.focus();
		return false;
	}
	if (unionform.tel.value=="")
	{
		alert("电话不能为空");
		unionform.tel.focus();
		return false;
	}
	if (unionform.fax.value=="")
	{
		alert("传真不能为空");
		unionform.fax.focus();
		return false;
	}
	if (unionform.email.value=="")
	{
		alert("E-mail不能为空");
		unionform.email.focus();
		return false;
	}
	if (unionform.renshu.value=="")
	{
		alert("从业人数不能为空");
		unionform.renshu.focus();
		return false;
	}
	if (unionform.quyu.value=="")
	{
		alert("申请区域不能为空");
		unionform.quyu.focus();
		return false;
	}
	if (unionform.shouru.value=="")
	{
		alert("年收入不能为空");
		unionform.shouru.focus();
		return false;
	}
	if (unionform.touru.value=="")
	{
		alert("计划投入资金不能为空");
		unionform.touru.focus();
		return false;
	}
}
	
		function GbPost()
{
	if (gbform.name.value=="")
	{
		alert("请填写姓名");
		gbform.name.focus();
		return false;
	}
			if (gbform.tel.value=="")
	{
		alert("请填写电话");
		gbform.tel.focus();
		return false;
	}
		if (gbform.email.value=="")
	{
		alert("请填写email");
		gbform.email.focus();
		return false;
	}

		if (gbform.email.value!=""&& !gbform.email.value.match( /.+@/ ) )
	{
		alert("emial格式不正确");
		gbform.email.focus();
		return false;
	}
	if (gbform.address.value=="")
	{
		alert("所在地区必须选择");
		gbform.province.focus();
		return false;
	}
	if (gbform.title.value.length<5)
	{
		alert("标题不能少于5个字符");
		gbform.title.focus();
		return false;
	}
	if (gbform.content.value=="")
	{
		alert("正文必须填写");
		gbform.content.focus();
		return false;
	}
}
