function question_add_form_checkdata(theform)
{
	if (theform.bt.value == "" || theform.bt.value.length < 5 || theform.bt.value == "请用一句话描述你需要咨询的问题~")
	{
		alert("标题不能为空且要大于5个汉字！");
		if (theform.bt.value == "请用一句话描述你需要咨询的问题~") theform.bt.value = "";
		theform.bt.focus();
		return false;
	}
	if (theform.ks.value == "" || theform.ks.value == "0")
	{
		alert("请选择科室！");
		theform.ks.focus();
		return false;
	}
	if (theform.nr.value == "")
	{
		alert("请输入内容！");
		theform.nr.focus();
		return false;
	}
	return true;
}

function ask_form_checkdata(theform)
{
	if (theform.q.value == "" || theform.q.value == "请在此输入您的问题或要搜索的关键字，例如：不吃早餐会得什么病？")
	{
		alert("请输入你的问题或要搜索的关键字！");
		theform.q.value = "";
		theform.q.focus();
		return false;
	}
	return true;
}

function answer_form_checkdata(theform)
{
	if (theform.nr.value == "")
	{
		alert("请输入答案！");
		theform.nr.focus();
		return false;
	}
	return true;
}

function add_item(obj, objname, linecount, beginstr)
{
	var nrobj = document.getElementById(objname);
	var item_nr = obj.value;
	var strnr = nrobj.value;
	var nrarray = strnr.split('\n');
	var strresult = "";
	if (strnr.indexOf(beginstr) < 0)
	{
		nrobj.value += (linecount == 1 ? beginstr : item_nr) + "\n";
		return;
	}
	var bi = 0;
	for (var i=0;i<nrarray.length ;i++ )
	{
		if (nrarray[i].indexOf(beginstr) >= 0)
		{
			bi = 1;
			continue;
		}
		else
		{
			if (bi > 0 && bi < linecount)
			{
				bi++;
				continue;
			}
			else
			{
				strresult += nrarray[i];
				bi = 0;
			}
		}
	}
	nrobj.value = strresult;
}