
function fob(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p)}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=fob(n,d.layers[i].document);return x}
function cb(){var a=cb.arguments;var b=fob(a[0]);e=document.forms(0).elements;if(b.checked==true){for(i=0;i<e.length;i++){e[i].checked=true}}else{for(i=0;i<e.length;i++){e[i].checked=false}}}
function vdf(){var i,j,name,value,message,length,type,a=vdf.arguments,cb_name;for(i=0;i<(a.length-2);i+=3){if(a[i].indexOf('#')!=-1){name=fob(a[i].substr(0,a[i].indexOf('#')));cb_name=fob(a[i].substr((a[i].indexOf('#')+1),a[i].length))}else{name=fob(a[i])}
message=a[i+1];type=a[i+2];if(type!="r_time"){value=name.value.replace(/ +/g,"")}else{value=name.value}
if(name){if(type=="r_cb"){e=document.forms(0).elements;var b=false;for(i=0;i<e.length;i++){if(e[i]!=cb_name){if(e[i].checked==true){b=true;break}}
if(i==e.length-1){break}}
if(b==false){alert(message+"!\n");return false}}
if(type=="r_sl"){if(name.selected==false){alert(message+"!\n");return false}}
if(type=="r"){if(value==""){alert(message+"!\n");name.focus();name.select();return false}}
if(type=="o_r"){if(value==""){alert(message+"!\n");return false}}
if(type=="r_china"){if(value.search(/^[\u4e00-\u9fa5]+$/)==-1){alert(message+"!\n");name.focus();name.select();return false}}
if(type=="r_num_char"){if(value==""){alert(message+"!\n");name.focus();name.select();return false}
if(value.search(/^[0-9a-zA-Z]+$/)==-1){alert(message+"!\n");name.focus();name.select();return false}}
if(type=="num"){if(value.search(/^[0-9]+$/)==-1&&value!=""){alert(message+"!\n");name.focus();name.select();return false}}
if(type=="r_num"){if(value==""){alert(message+"!\n");name.focus();name.select();return false}
if(value.search(/^[0-9]+$/)==-1){alert(message+"!\n");name.focus();name.select();return false}}
if(type.indexOf("r_num<")!=-1){length=type.substring((type.indexOf('<')+1),type.length);if(value==""){alert(message+"!\n");name.focus();name.select();return false}
if(value.search(/^[0-9]+$/)==-1){alert(message+"!\n");name.focus();name.select();return false}
if(value.length>length){alert(message+"!\n");name.focus();name.select();return false}}
if(type.indexOf("r_num>")!=-1){length=type.substring((type.indexOf('>')+1),type.length);if(value==""){alert(message+"!\n");name.focus();name.select();return false}
if(value.search(/^[0-9]+$/)==-1){alert(message+"!\n");name.focus();name.select();return false}
if(value.length<length){alert(message+"!\n");name.focus();name.select();return false}}
if(type.indexOf("r_num#<>")!=-1){length=type.substr((type.indexOf('>')+1),type.length);length=length.substr(0,length.lastIndexOf("-"));length1=type.substring((type.indexOf('-')+1),type.length)if(value==""){alert(message+"!\n");name.focus();name.select();return false}
if(value.search(/^[0-9]+$/)==-1){alert(message+"!\n");name.focus();name.select();return false}
if(value.length<length||value.length>length1){alert(message+"!\n");name.focus();name.select();return false}}
if(type.indexOf("email")!=-1){if(name.value!=""){if(value.search(/^[_\.a-z0-9]+@[a-z0-9]+[\.][a-z0-9]{2,}$/i)==-1){alert(message+"!\n");name.focus();name.select();return false}}}
if(type.indexOf("r_email")!=-1){if(name.value==""){alert(message+"!\n");name.focus();name.select();return false}
if(value.search(/^[_\.a-z0-9]+@[a-z0-9]+[\.][a-z0-9]{2,}$/i)==-1){alert(message+"!\n");name.focus();name.select();return false}}
if(type=="r_date"){b=true;getdate=value;if(getdate.search(/^[0-9]{4}-(0[1-9]|[1-9]|1[0-2])-((0[1-9]|[1-9])|1[0-9]|2[0-9]|3[0-1])$/)==-1){b=false}else{var c=getdate.substr(0,getdate.indexOf('-'))var d=getdate.substr(0,getdate.lastIndexOf('-'));var f=d.substr(d.lastIndexOf('-')+1,d.length);if(f.indexOf('0')==0){f=f.substr(1,f.length)}
var g=getdate.substr(getdate.lastIndexOf('-')+1,getdate.length);if(g.indexOf('0')==0){g=g.substr(1,g.length)}
if((f==4||f==6||f==9||f==11)&&(g>30)){b=false}
if(f==2){if(rdp(c)){if(g>29||g<1){b=false}}else{if(g>28||g<1){b=false}}}else{b=true}}
if(b==false){alert(message+"!\n");name.focus();name.select();return false}}
if(type=="date"){b=true;getdate=value;if(getdate=="")return true;if(getdate.search(/^[0-9]{4}-(0[1-9]|[1-9]|1[0-2])-((0[1-9]|[1-9])|1[0-9]|2[0-9]|3[0-1])$/)==-1){b=false}else{var c=getdate.substr(0,getdate.indexOf('-'))var d=getdate.substr(0,getdate.lastIndexOf('-'));var f=d.substr(d.lastIndexOf('-')+1,d.length);if(f.indexOf('0')==0){f=f.substr(1,f.length)}
var g=getdate.substr(getdate.lastIndexOf('-')+1,getdate.length);if(g.indexOf('0')==0){g=g.substr(1,g.length)}
if((f==4||f==6||f==9||f==11)&&(g>30)){b=false}
if(f==2){if(rdp(c)){if(g>29||g<1){b=false}}else{if(g>28||g<1){b=false}}}else{b=true}}
if(b==false){alert(message+"!\n");name.focus();name.select();return false}}
if(type=="r_time"){b=true;getdate=js_trim(value);if(getdate.search(/^[0-9]{4}-(0[1-9]|[1-9]|1[0-2])-((0[1-9]|[1-9])|1[0-9]|2[0-9]|3[0-1]) ((0[1-9]|[1-9])|1[0-9]|2[0-4]):((0[1-9]|[1-9])|[1-5][0-9]):((0[1-9]|[1-9])|[1-5][0-9])$/)==-1){b=false;alert(getdate)}else{var c=getdate.substr(0,getdate.indexOf('-'))var d=getdate.substr(0,getdate.lastIndexOf('-'));var f=d.substr(d.lastIndexOf('-')+1,d.length);if(f.indexOf('0')==0){f=f.substr(1,f.length)}
var g=getdate.substr(getdate.lastIndexOf('-')+1,getdate.length);if(g.indexOf('0')==0){g=g.substr(1,g.length)}
if((f==4||f==6||f==9||f==11)&&(g>30)){b=false}
if(f==2){if(rdp(c)){if(g>29||g<1){b=false}}else{if(g>28||g<1){b=false}}}else{b=true}}
if(b==false){alert(message+"!\n");name.focus();name.select();return false}}
if(type.indexOf("tel")!=-1){if(name.value!=""){if(value.search(/^(\([0-9]{3}\)|[0-9]{3}-)[0-9]{8}$/)==-1&&value.search(/^(\([0-9]{4}\)|[0-9]{4}-)[0-9]{7}$/)==-1){alert(message+"!\n");name.focus();name.select();return false}}}
if(type.indexOf("r_tel")!=-1){if(name.value==""){alert(message+"!\n");name.focus();name.select();return false}
if(value.search(/^(\([0-9]{3}\)|[0-9]{3}-)[0-9]{8}$/)==-1&&value.search(/^(\([0-9]{4}\)|[0-9]{4}-)[0-9]{7}$/)==-1){alert(message+"!\n");name.focus();name.select();return false}}
if(type.indexOf("mod")!=-1){if(name.value!=""){if(value.search(/^[0-9]{11}$/)==-1){alert(message+"!\n");name.focus();name.select();return false}}}
if(type.indexOf("r_mod")!=-1){if(name.value==""){alert(message+"!\n");name.focus();name.select();return false}
if(value.search(/^[0-9]{11}$/)==-1){alert(message+"!\n");name.focus();name.select();return false}}
if(type.indexOf("city")!=-1){if(name.value!=""){if(value.search(/^.{1,}(ÊÐ|Õò|Ïç).{1,}(Â·|½Ö|µÀ).{1,}ºÅ.{0,}$/)==-1){alert(message+"!\n");name.focus();name.select();return false}}}
if(type.indexOf("r_city")!=-1){if(name.value==""){alert(message+"!\n");name.focus();name.select();return false}
if(value.search(/^.{1,}(ÊÐ|Õò|Ïç).{1,}(Â·|½Ö|µÀ).{1,}ºÅ.{0,}$/)==-1){alert(message+"!\n");name.focus();name.select();return false}}}}}
function rdp(a){if(a%100==0){if(a%400==0){return true}}else{if((a%4)==0){return true}}
return false}