function isemail( string ) { var pattern = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/; return pattern.test( string ); } function checkbox_one_checked( form, fname ) { var el, grp, e=0; while( el = form.elements[e++] ) { if( el.type=='checkbox' && el.name && el.name==fname ) { grp = form[el.name]; for( var i=0; i 1000 ) { missingfields += "\n- Mother Owner Information: (Max. chars: 1000)"; } } if( form.f19.value != "" ) { extension = getextension( form.f19.value ); if( !checkextension( extension ) ) { missingfields += "\n- Mother Picture Upload: (Extension not accepted)"; } } if( form.f18.value!="" ) { if( form.f18.value.length < 3 ) { missingfields += "\n- Other registry affiliations: (Min. chars: 3)"; } } if( form.f3.value != "" ) { extension = getextension( form.f3.value ); if( !checkextension( extension ) ) { missingfields += "\n- Other Registry Upload 1: (Extension not accepted)"; } } if( form.f4.value != "" ) { extension = getextension( form.f4.value ); if( !checkextension( extension ) ) { missingfields += "\n- Other Registry Upload 2: (Extension not accepted)"; } } if( form.f5.value != "" ) { extension = getextension( form.f5.value ); if( !checkextension( extension ) ) { missingfields += "\n- Other Registry Upload 3: (Extension not accepted)"; } } if( form.f6.value != "" ) { extension = getextension( form.f6.value ); if( !checkextension( extension ) ) { missingfields += "\n- Other Registry Upload 4: (Extension not accepted)"; } } if( form.f25.value!="" ) { if( form.f25.value.length < 3 ) { missingfields += "\n- Litter Father's Name: (Min. chars: 3)"; } } else { missingfields += "\n- Litter Father's Name: (Missing field)"; } if( !checkbox_one_checked(form, 'f26[]') ) { missingfields += "\n- Is the Father currently registered with the APBR?: (No option checked)"; } if( form.f27.value!="" ) { if( form.f27.value.length < 23 ) { missingfields += "\n- Father's APBR # if known: (Min. chars: 23)"; } } if( form.f7.value != "" ) { extension = getextension( form.f7.value ); if( !checkextension( extension ) ) { missingfields += "\n- APBR Certificate Upload: (Extension not accepted)"; } } if( form.f8.value!="" ) { if( form.f8.value.length < 3 ) { missingfields += "\n- Father Owner Information: (Min. chars: 3)"; } else if( form.f8.value.length > 500 ) { missingfields += "\n- Father Owner Information: (Max. chars: 500)"; } } if( form.f28.value != "" ) { extension = getextension( form.f28.value ); if( !checkextension( extension ) ) { missingfields += "\n- Father Picture Upload: (Extension not accepted)"; } } if( form.f29.value!="" ) { if( form.f29.value.length < 3 ) { missingfields += "\n- Other registry affiliations: (Min. chars: 3)"; } } if( form.f30.value != "" ) { extension = getextension( form.f30.value ); if( !checkextension( extension ) ) { missingfields += "\n- Other Registry Upload 1: (Extension not accepted)"; } } if( form.f31.value != "" ) { extension = getextension( form.f31.value ); if( !checkextension( extension ) ) { missingfields += "\n- Other Registry Upload 2: (Extension not accepted)"; } } if( form.f32.value != "" ) { extension = getextension( form.f32.value ); if( !checkextension( extension ) ) { missingfields += "\n- Other Registry Upload 3: (Extension not accepted)"; } } if( form.f33.value != "" ) { extension = getextension( form.f33.value ); if( !checkextension( extension ) ) { missingfields += "\n- Other Registry Upload 4: (Extension not accepted)"; } } if( form.f59.value!="" ) { if( form.f59.value.length < 8 ) { missingfields += "\n- Litter day of birth: (Min. chars: 8)"; } } else { missingfields += "\n- Litter day of birth: (Missing field)"; } if( form.f34.value!="" ) { if( form.f34.value.length < 1 ) { missingfields += "\n- Pit Bull pup name 1: (Min. chars: 1)"; } } else { missingfields += "\n- Pit Bull pup name 1: (Missing field)"; } if( form.f35.value!="" ) { if( form.f35.value.length < 1 ) { missingfields += "\n- Pit Bull pup name 2: (Min. chars: 1)"; } } if( form.f36.value!="" ) { if( form.f36.value.length < 1 ) { missingfields += "\n- Pit Bull pup name 3: (Min. chars: 1)"; } } if( form.f37.value!="" ) { if( form.f37.value.length < 1 ) { missingfields += "\n- Pit Bull pup name 4: (Min. chars: 1)"; } } if( form.f38.value!="" ) { if( form.f38.value.length < 1 ) { missingfields += "\n- Pit Bull pup name 5: (Min. chars: 1)"; } } if( form.f39.value!="" ) { if( form.f39.value.length < 1 ) { missingfields += "\n- Pit Bull pup name 6: (Min. chars: 1)"; } } if( form.f40.value!="" ) { if( form.f40.value.length < 1 ) { missingfields += "\n- Pit Bull pup name 7: (Min. chars: 1)"; } } if( form.f41.value!="" ) { if( form.f41.value.length < 1 ) { missingfields += "\n- Pit Bull pup name 8: (Min. chars: 1)"; } } if( form.f42.value!="" ) { if( form.f42.value.length < 1 ) { missingfields += "\n- Pit Bull pup name 9: (Min. chars: 1)"; } } if( form.f43.value!="" ) { if( form.f43.value.length < 1 ) { missingfields += "\n- Pit Bull pup name 10: (Min. chars: 1)"; } } if( form.f44.value!="" ) { if( form.f44.value.length < 1 ) { missingfields += "\n- Pit Bull pup name 11: (Min. chars: 1)"; } } if( form.f45.value!="" ) { if( form.f45.value.length < 1 ) { missingfields += "\n- Pit Bull pup name 12: (Min. chars: 1)"; } } if( form.f46.value!="" ) { if( form.f46.value.length < 1 ) { missingfields += "\n- Pit Bull pup name 13: (Min. chars: 1)"; } } if( form.f48.value!="" ) { if( form.f48.value.length < 1 ) { missingfields += "\n- Pit Bull pup name 14: (Min. chars: 1)"; } } if( form.f47.value!="" ) { if( form.f47.value.length < 1 ) { missingfields += "\n- Pit Bull pup name 15: (Min. chars: 1)"; } } if( form.f49.value!="" ) { if( form.f49.value.length < 1 ) { missingfields += "\n- Pit Bull pup name 16: (Min. chars: 1)"; } } if( form.f50.value!="" ) { if( form.f50.value.length < 10 ) { missingfields += "\n- Outside United States Mailing Label: (Min. chars: 10)"; } else if( form.f50.value.length > 300 ) { missingfields += "\n- Outside United States Mailing Label: (Max. chars: 300)"; } } if( form.f51.value=="" ) { missingfields += "\n- Method of payment: (Missing field)"; } if( !checkbox_one_checked(form, 'f52[]') ) { missingfields += "\n- Personal Affirmation: (No option checked)"; } if( form.f54.value != "" ) { extension = getextension( form.f54.value ); if( !checkextension( extension ) ) { missingfields += "\n- Misc. Uploads (Extension not accepted)"; } } if( form.f55.value != "" ) { extension = getextension( form.f55.value ); if( !checkextension( extension ) ) { missingfields += "\n- Misc. Uploads 2: (Extension not accepted)"; } } if( form.f56.value != "" ) { extension = getextension( form.f56.value ); if( !checkextension( extension ) ) { missingfields += "\n- Misc. Uploads 3: (Extension not accepted)"; } } if( form.f57.value != "" ) { extension = getextension( form.f57.value ); if( !checkextension( extension ) ) { missingfields += "\n- Misc. Uploads 4: (Extension not accepted)"; } } if( form.f58.value != "" ) { extension = getextension( form.f58.value ); if( !checkextension( extension ) ) { missingfields += "\n- Misc. Uploads 5: (Extension not accepted)"; } } if( missingfields != "" ) { alert( "The following fields are incorrect:\n" + missingfields ); return false; } else { var accepted = true; accepted = confirm( "Your files are going to be uploaded now. \nDepending on the size of these files and \nyour internet connection, this may take \nsome time. Please be patient. \n" ); if( accepted == true ) { form.submit.disabled = true; } return accepted; } }