function formSubmit(){
		if(document.getElementById("cardId").value.length==0){
			ShowMsg(SUCCESS,"温馨提示","保险卡号为空！","请您填写保险卡号。");
			return false;
		}
		if(document.getElementById("password").value.length==0){
			ShowMsg(SUCCESS,"温馨提示","保险卡密码为空！","请您填写保险卡密码。");
			return false;
		}
		if(document.getElementById("cardId").value.length!=16){
			ShowMsg(SUCCESS,"温馨提示","保险卡号有误！","保险卡号长度必须为16位，请您重新输入。");
			return false;
		}
		if(document.getElementById("password").value.length!=8){
			ShowMsg(SUCCESS,"温馨提示","保险卡密码有误！","保险卡密码长度必须为8位，请您重新输入。");
			return false;
		}
		return true;
	}
	function reset(formName){
		if(formName==1){
			document.getElementById("cardId").value="";
			document.getElementById("password").value="";
		}
		if (formName==2){
			document.getElementById("cardIdNo").value="";
			document.getElementById("passwordNo").value="";
		}
	}
	
	function setNull(){
		document.getElementById("cardIdNo").value="";
		document.getElementById("passwordNo").value="";
		document.getElementById("areaCode1").options[0].selected=true;

	}
	
	function checkform(){
		var cardIdStr=document.getElementById("cardIdNo").value;//保险卡号
		var passwordStr=document.getElementById("passwordNo").value;// 保险卡密码
		if(document.getElementById("areaCode1").value=="0"){//获取分公司的代码  0为没有选择

			ShowMsg(SUCCESS,"温馨提示","请选择查询条件！","请您确认分公司选择是否完整。");

			return false;
		}
	
		if (document.getElementById("card1").checked==true){//选择保险卡
			if (lengthValid(cardIdStr)!=16){

				ShowMsg(SUCCESS,"温馨提示","保险卡号有误！","保险卡号必须是16位，请您重新输入。");

				return false;
			}

			if (lengthValid(passwordStr)!=8){

				ShowMsg(SUCCESS,"温馨提示","密码有误！","密码必须是8位，请您重新输入。");

				return false;
			}
			
			if(isEmpty(cardIdStr)==1||isEmpty(passwordStr)==1){
				ShowMsg(SUCCESS,"温馨提示","请填写必录项！","请您输入完整的查询条件。");
				return false;
			}
		}
		else {//这里是选择的身份证号
			if("验证通过!"==checkIdcard(document.getElementById("cardIdNo").value)){
				
			}
			else {
				var temp=$("#cardIdNo").val();
				if(isEmpty(temp)==1){
					ShowMsg(SUCCESS,"温馨提示","身份证号码为空！","请您填写身份证号码。");
				}else{

				ShowMsg(SUCCESS,"温馨提示","请正确输入！",checkIdcard(document.getElementById("cardIdNo").value));
				}
				return false;
			}
			if(isEmpty(cardIdStr)==1){
				ShowMsg(SUCCESS,"温馨提示","请填写必录项！","请您输入完整的查询条件。");
				return false;
			}
		}
		//加入sql注入和JavaScript注入判断
		if(!(IsValid(cardIdStr)&&IsValid(passwordStr))){
			//ShowMsg(SUCCESS,"温馨提示","温馨提示","请您不要输入特殊字符！");
			return false;
		}
		return true;
	}

	function fresh(j){
		
		if (j=="保险卡"){
			$("#cardName").empty();
			$("#cardName").html("保险卡号");
			$("#passwordinput").show();
			$("#brace").hide();
		}
		if (j=="身份证"){
			$("#cardName").empty();
			$("#cardName").html("被保人身份证号");
			$("#passwordinput").hide();
			$("#brace").hide();
		}
		
	}
