var first_error_input=null;function checkForm(fm){if($_('lib_div_mask')||$_('lib_pop_info_tips')){return false;} var error_info=new Array;var submit_button=null;first_error_input=null;for(var i=0;i'+value+'');(format_tips=='')&&(format_tips=tips);if(format_need_last_char=='f'||format_need_last_char=='m'){var fromat_need_length=format_need.substring(0,format_need.length-1);if(!isNaN(fromat_need_length)&&(format_need_last_char=='f'&&value.length!=fromat_need_length)||(format_need_last_char=='m'&&value.length12||found[3]>31||d.getFullYear()!=year||d.getMonth()!=month||d.getDate()!=date){error_info[error_info.length]=format_tips;fm[i].className=fm[i].className+' form_focus';first_error_input==null&&fm[i].type.toLowerCase()!='hidden'&&(first_error_input=fm[i]);}}else if((format_need_first_char=='='&&trim(fm[format_need.substring(1,format_need.length)].value)!=value)||(format_need=='email'&&!/([\w][\w-\.]*@[\w][\w-_]*\.[\w][\w\.]+)/g.test(value))||(format_need=='mobile'&&!(/^13\d{9}$/g.test(value)||/^15[0-35-9]\d{8}$/g.test(value)||/^18[05-9]\d{8}$/g.test(value)))||(format_need=='tel'&&!(/^\d{3,4}-{0,1}\d{7,8}$/g.test(value)))){error_info[error_info.length]=format_tips;fm[i].className=fm[i].className+' form_focus';first_error_input==null&&fm[i].type.toLowerCase()!='hidden'&&(first_error_input=fm[i]);}} if(error_info.length){pop_info_tips(error_info);return false;}else{submit_button!=null&&(submit_button.disabled=true);return true;}} function trim(str){return str.replace(/^ */,'').replace(/ *$/,'');} function trim_0(str){if(str.length==0){return str;} str=str.replace(/^0*/,'');str.length==0&&(str='0');return str;}