﻿function checkempty(frmObj) {
	var eleObj = frmObj.elements;
	for (i=0; i<eleObj.length; i++) {
		if (eleObj[i].needinput && eleObj[i].value == "") {
			if (eleObj[i].type.toLowerCase()!="hidden") {
				alert("内容不能为空");
				eleObj[i].focus();
			} else {
				alert("必须选择商品类别");
			}
			return false;
		}
	}
	return true;
}
function openPopWin(url, win, width, height, feature) {
	var mx = (screen.availWidth - width) /2;
	var my = (screen.availHeight - height) /2;
	var features = 'width='+width+',height='+height+',left='+ mx +',top='+ my;
	if (feature) features = features + ",scrollbars=yes";
	return window.open(url, win, features);
}
function go2(url, win) {
	if (win)
		window.open(url, win);
	else
		document.location.href = url;
}
function $(id) {
	return document.getElementById(id);
}
