function ChkForm(oForm)
{
	switch (oForm.name)
	{
	case "bystation":
		if (oForm.linename.value=="")
		{
			oForm.linename.focus();
			alert("站点名不能为空");
			return false;
		}
		break;
	case "bytrain":
		if (oForm.stationname.value=="")
		{
			oForm.stationname.focus();
			alert("线路名不能为空");
			return false;
		}
		break;
	case "byroute":
		if (oForm.from.value=="")
		{
			oForm.from.focus();
			alert("始发站名不能为空");
			return false;
		}
		if (oForm.from.value.length<2)
		{
			oForm.from.focus();
			alert("始发站名不能少于两个字");
			return false;
		}
		if (oForm.to.value=="")
		{
			oForm.to.focus();
			alert("终点站名不能为空");
			return false;
		}
		if (oForm.to.value.length<2)
		{
			oForm.to.focus();
			alert("终点站名不能少于两个字");
			return false;
		}
		break;
	}
}