// JavaScript Document

function CheckForm()
{
  if (document.myform1.carPolicy1.value=="")
  {
    alert("保单号不能为空！");
	document.myform1.carPolicy1.focus();
	return false;
  }  
  if (document.myform1.chejia1.value=="")
  {
    alert("证件号不能为空！");
	document.myform1.chejia1.focus();
	return false;
  } 
   if (document.myform1.code1.value=="")
  {
    alert("验证码不能为空！");
	document.myform1.code1.focus();
	return false;
  }
  
}
/*function CheckForm2()
{
  if (document.myform2.nocarPolicy1.value=="")
  {
    alert("保单号不能为空！");
	document.myform2.nocarPolicy1.focus();
	return false;
  }
  
  if ((document.myform2.card1.value=="" && document.myform2.organ1.value=="" &&  document.myform2.taxno1.value=="" )
     ||(document.myform2.card1.value=="" && document.myform2.organ1.value!="" &&  document.myform2.taxno1.value!="" )
     ||(document.myform2.card1.value!="" && document.myform2.organ1.value!="" &&  document.myform2.taxno1.value=="" )
     ||(document.myform2.card1.value!="" && document.myform2.organ1.value=="" &&  document.myform2.taxno1.value!="" )
     ||(document.myform2.card1.value!="" && document.myform2.organ1.value!="" &&  document.myform2.taxno1.value!="" ))
  {
    alert("身份证号、组织机构编码、税务登记证号三者只能填一项");
	
	return false;
  }
}*/
function CheckForm2()
{
  if (document.myform2.nocarPolicy1.value=="")
  {
    alert("保单号不能为空！");
	document.myform2.nocarPolicy1.focus();
	return false;
  }
  if (document.myform2.card1.value=="" &&document.myform2.card11.value=="")
  {
    alert("投保人证件号码和被保险人证件号码必填一项!");
	
	return false;
  }
  if((document.myform2.card1.value!="" &&document.myform2.card11.value!=""))
  {
  	alert("投保人证件号码和被保险人证件号码只能填一项!");
	
	return false;
  }
  if (document.myform2.code2.value=="")
  {
    alert("验证码不能为空！");
	document.myform2.code2.focus();
	return false;
  }
}
function CheckForm3()
{
  if (document.myform3.carPolicy3.value=="")
  {
    alert("保单号不能为空！");
	document.myform3.carPolicy3.focus();
	return false;
  }  
  if (document.myform3.chejia3.value=="")
  {
    alert("证件号不能为空！");
	document.myform3.chejia3.focus();
	return false;
  } 
 if (document.myform3.code3.value=="")
  {
    alert("验证码不能为空！");
	document.myform3.code3.focus();
	return false;
  }
  
}
/*function CheckForm4()
{
  if (document.myform4.nocarPolicy2.value=="")
  {
    alert("保单号不能为空！");
	document.myform4.nocarPolicy2.focus();
	return false;
  }
  
  if (document.myform4.card1.value=="")
  {
    alert("证件号码不能为空!");
	document.myform4.card2.focus();
	return false;
  }
}
*/
function CheckForm4()
{
  if (document.myform4.nocarPolicy2.value=="")
  {
    alert("保单号不能为空！");
	document.myform4.nocarPolicy2.focus();
	return false;
  }
  
  if (document.myform4.peono.value=="" &&document.myform4.card4.value=="")
  {
    alert("身份证号和证件号码必填一项!");
	
	return false;
  }
  if((document.myform4.peono.value!="" &&document.myform4.card4.value!=""))
  {
  	alert("身份证号和证件号码只能填一项!");
	
	return false;
  }
  if (document.myform4.code4.value=="")
  {
    alert("验证码不能为空！");
	document.myform4.code4.focus();
	return false;
  }
}
function CheckForm5()
{
  if (document.myform5.nocarPolicyf.value=="")
  {
    alert("保单号不能为空！");
	document.myform5.nocarPolicyf.focus();
	return false;
  }  
  if (document.myform5.insuredname.value=="")
  {
    alert("被保人姓名不能为空！");
	document.myform5.insuredname.focus();
	return false;
  } 
  if (document.myform5.identifynumber.value=="")
  {
    alert("被保人证件号不能为空！");
	document.myform5.identifynumber.focus();
	return false;
  } 
 if (document.myform5.code5.value=="")
  {
    alert("验证码不能为空！");
	document.myform5.code5.focus();
	return false;
  }
  
}
function CheckForm6()
{
  if (document.myform6.nocarPolicy6.value=="")
  {
    alert("保单号不能为空！");
	document.myform6.nocarPolicy6.focus();
	return false;
  }
  if (document.myform6.printno.value=="" &&document.myform6.insuredname.value=="")
  {
    alert("单证流水号和被保险人名称必填一项!");
	
	return false;
  }
  if((document.myform6.printno.value!="" &&document.myform6.insuredname.value!=""))
  {
  	alert("单证流水号和被保险人名称只能填一项!");
	
	return false;
  }
  if (document.myform6.code6.value=="")
  {
    alert("验证码不能为空！");
	document.myform6.code6.focus();
	return false;
  }
}
