function FormValidator(theForm){
  if (theForm.Truename.value == ""){
    alert("请填写【姓名】!");
    theForm.Truename.focus();
    return false;
  }
  else if (theForm.Gender.value == ""){
    alert("请填写【性别】!");
    theForm.Gender.focus();
    return false;
  }
  else if (theForm.AGE.value == ""){
    alert("请填写【年龄】!");
    theForm.AGE.focus();
    return false;
  }
  else if (theForm.LXDH.value == ""){
    alert("请填写【手机】!");
    theForm.LXDH.focus();
    return false;
  }
  else if (theForm.QQHM.value == "" ){
    alert("请填写【QQ号码】");
    theForm.QQHM.focus();
    return false;
  }
  else if (theForm.YYTIME.value == "" ){
    alert("请填写预约就诊时间");
    theForm.MAILHM.focus();
    return false;
  }

  else return true;
}

function checkform(theform) {
    if(theform.title.value == "") {
		alert("问题不能为空！");
		theform.title.focus();
		return false;
	} else if(mb_strlen(theform.title.value) > 80) {
		alert("问题太长，请修改，并使用问题补充");
		theform.title.focus();
		return false;
	} else if(theform.ValidCode.value == "") {
		alert("验证码不能空!");
		theform.ValidCode.focus();
		return false;
	}
}

function checkform1(theform) {
    if(theform.content.value == "") {
		alert("内容不能为空！");
		theform.content.focus();
		return false;
	} else if(theform.ValidCode.value == "") {
		alert("验证码不能空!");
		theform.ValidCode.focus();
		return false;
	}
}

function Get_ValidCode(dns)
{
	var obj = document.getElementById("strValidCode");
	obj.src = dns+"inc/validcode.asp?rnd="+Math.random();
}
function Ok3w_Search(frm)
{
	if(frm.q.value.trim()=="")
	{
		alert("请输入查询关键词。");
		frm.q.focus()
		return false;
	}
	frm.action = "search.asp";
	frm.bntSub.disabled = true;
	frm.submit();
}
/*第一种形式 第二种形式 更换显示样式*/
function setTab(name,cursel,n){
for(i=1;i<=n;i++){
var menu=document.getElementById(name+i);
var con=document.getElementById("con_"+name+"_"+i);
menu.className=i==cursel?"at":"";
con.style.display=i==cursel?"block":"none";
}
}
