function validateDriverInfoForm(){
	//验证数据的合法性
	obj = document.driverInfoForm;
		re = /(^[0-9]{18}$)|(^[0-9]{17}[X,x]$)|(^[0-9]{15}$)|(^[0-9]{14}[X,x]$)/;
		if (obj.bianhao.value == ""&&obj.identityCard.value == "")
		 {
		  alert("请输入档案编号或身份证号！！");
		  obj.bianhao.focus();
		  return ;
		 }
		 if(obj.identityCard.value!= ""){
			 if ( ! re.test(obj.identityCard.value) ) {
					alert( "错误的身份证号,请输入15位或18位身份证号!" );
					obj.identityCard.focus();
					return ;
			 }
		 }
	    if(obj.checkCode.value==""){
		   alert("验证码不能为空");
		   obj.checkCode.focus();	
	    	return ;
	    }
       obj.submit();
}


function formSubmitByKey(evt){
	var evt = window.event?window.event:evt;
	if(evt.keyCode==13){
	 	validateDriverInfoForm();
	 } 
}

function reloadImage(url) 
{ 
	document.getElementById("imgCheckCodeID").src = url; 
} 
