function check_null(){
	if (document.form.memberid.value==""){
		alert("no MembersID!");
		return false;
		}
	if (document.form.password.value==""){
			alert("Password incorrect!");
			return false;
		}
	return true;
	}
function openwindow(filename,width,height,scr){
	var sLeft=(document.body.clientWidth-width)/2
	var sTop=(document.body.clientHeight-height)/2;
	window.open(filename,'','top='+sTop+',left='+sLeft+',resizeable=no,location=no,status=no,scrollbars='+scr+',menubar=no,toolbar=no,width='+width+',height='+height+'\'');
}
function goback(){
	history.back();
}

function additem(id){
	window.open('additem.asp?pid='+id,'','resizeable=yes,status=no,scrollbars=no,menubar=no,toolbar=no,width=250,height=110');
}
function check_admin(){
if (document.form.memberid.value==""){
		alert("你没有输入用户名，请输入用户名!");
		return false;
	}
	if (document.form.password.value==""){
		alert("你忘了输入密码!");
		return false;
	}
	if (document.form.safecode.value==""){
		alert("没有验证码，不能登录!");
		return false;
	}
	return true;
}
function setcenter(divname,dWidth,dHeight){
	var scrwidth=document.body.clientWidth;
	var scrheight=document.body.clientHeight;
		divname.style.left=(scrwidth-dWidth)/2;
		divname.style.top=(scrheight-dHeight)/2;
		divname.style.display='block';
}
