zipcodes = Array(); zipcodes[158] = '35610'; zipcodes[159] = '35611'; zipcodes[160] = '35612'; zipcodes[161] = '35613'; zipcodes[162] = '35614'; zipcodes[163] = '35615'; zipcodes[164] = '35620'; zipcodes[165] = '35647'; zipcodes[166] = '35649'; zipcodes[167] = '35671'; zipcodes[168] = '35739'; zipcodes[169] = '35742'; zipcodes[170] = '35749'; zipcodes[171] = '35756'; zipcodes[172] = '35757'; zipcodes[173] = '35773'; mv_mailer = new Image(); br_mailer = new Image(); mv_mailer.src = "../images/mv_mailer.jpg"; br_mailer.src = "../images/br_mailer.jpg"; sp_name = Array(); sp_image = Array(); sp_image[1] = new Image(); sp_image[1].src = '/sp/a_and_m.jpg'; sp_name[1] = 'Alabama A & M: $50.00'; sp_image[2] = new Image(); sp_image[2].src = '/sp/al_forest.jpg'; sp_name[2] = 'Alabama Forest: $50.00'; sp_image[5] = new Image(); sp_image[5].src = '/sp/asu.jpg'; sp_name[5] = 'Alabama State University: $50.00'; sp_image[6] = new Image(); sp_image[6].src = '/sp/athens.jpg'; sp_name[6] = 'Athens State University: $50.00'; sp_image[7] = new Image(); sp_image[7].src = '/sp/auburn.jpg'; sp_name[7] = 'Auburn University: $50.00'; sp_image[8] = new Image(); sp_image[8].src = '/sp/barber_mc.jpg'; sp_name[8] = 'Barber Vintage Motorcycles: $50.00'; sp_image[9] = new Image(); sp_image[9].src = '/sp/bsc.jpg'; sp_name[9] = 'Birmingham Southern College: $50.00'; sp_image[10] = new Image(); sp_image[10].src = '/sp/bvmm.jpg'; sp_name[10] = 'Barber Vintage: $50.00'; sp_image[11] = new Image(); sp_image[11].src = '/sp/cahaba.jpg'; sp_name[11] = 'Save The Cahaba: $50.00'; sp_image[12] = new Image(); sp_image[12].src = '/sp/choose_life.jpg'; sp_name[12] = 'Choose Life: $50.00'; sp_image[16] = new Image(); sp_image[16].src = '/sp/ctf.jpg'; sp_name[16] = 'Children Trust Fund: $50.00'; sp_image[17] = new Image(); sp_image[17].src = '/sp/ctl_man.jpg'; sp_name[17] = 'Cattleman Association: $50.00'; sp_image[18] = new Image(); sp_image[18].src = '/sp/cur_chd_cnr.jpg'; sp_name[18] = 'Curing Childhood Cancer: $50.00'; sp_image[23] = new Image(); sp_image[23].src = '/sp/duck_ulmtd.jpg'; sp_name[23] = 'Ducks Unlimited: $40.00'; sp_image[25] = new Image(); sp_image[25].src = '/sp/env.jpg'; sp_name[25] = 'Environment: $50.00'; sp_image[27] = new Image(); sp_image[27].src = '/sp/farming_feeds.jpg'; sp_name[27] = 'Farming Feeds: $50.00'; sp_image[28] = new Image(); sp_image[28].src = '/sp/faulkner.jpg'; sp_name[28] = 'Faulkner University: $50.00'; sp_image[32] = new Image(); sp_image[32].src = '/sp/frvr_wld.jpg'; sp_name[32] = 'Forever Wild: $50.00'; sp_image[33] = new Image(); sp_image[33].src = '/sp/god_bless_america.jpg'; sp_name[33] = 'God Bless America: $0.00'; sp_image[35] = new Image(); sp_image[35].src = '/sp/hlp_schls.jpg'; sp_name[35] = 'Helping Schools: $15.00'; sp_image[36] = new Image(); sp_image[36].src = '/sp/huntingdon.jpg'; sp_name[36] = 'Huntingdon College: $50.00'; sp_image[37] = new Image(); sp_image[37].src = '/sp/jacksonville.jpg'; sp_name[37] = 'Jacksonville State University: $50.00'; sp_image[38] = new Image(); sp_image[38].src = '/sp/judson.jpg'; sp_name[38] = 'Judson College: $50.00'; sp_image[39] = new Image(); sp_image[39].src = '/sp/kid_fishing.jpg'; sp_name[39] = 'Take A Kid Fishing: $50.00'; sp_image[42] = new Image(); sp_image[42].src = '/sp/miles.jpg'; sp_name[42] = 'Miles College: $50.00'; sp_image[43] = new Image(); sp_image[43].src = '/sp/mobile.jpg'; sp_name[43] = 'University of Mobile: $50.00'; sp_image[44] = new Image(); sp_image[44].src = '/sp/montevallo.jpg'; sp_name[44] = 'Montevallo: $50.00'; sp_image[46] = new Image(); sp_image[46].src = '/sp/north_alabama.jpg'; sp_name[46] = 'University of North Alabama: $50.00'; sp_image[47] = new Image(); sp_image[47].src = '/sp/nwtf.jpg'; sp_name[47] = 'National Wild Turkey Federation: $50.00'; sp_image[48] = new Image(); sp_image[48].src = '/sp/oakwood.jpg'; sp_name[48] = 'Oakwood College: $50.00'; sp_image[74] = new Image(); sp_image[74].src = '/sp/samford.jpg'; sp_name[74] = 'Samford University: $50.00'; sp_image[75] = new Image(); sp_image[75].src = '/sp/saturnv.JPG'; sp_name[75] = 'Saturn V: $50.00'; sp_image[76] = new Image(); sp_image[76].src = '/sp/scv.jpg'; sp_name[76] = 'Sons of Confederate Veterans: $50.00'; sp_image[77] = new Image(); sp_image[77].src = '/sp/selma.jpg'; sp_name[77] = 'Selma University: $50.00'; sp_image[80] = new Image(); sp_image[80].src = '/sp/spring_hill.jpg'; sp_name[80] = 'Spring Hill College: $50.00'; sp_image[81] = new Image(); sp_image[81].src = '/sp/sq_dnc_dec.jpg'; sp_name[81] = 'Square & Round Dancers: $5.00'; sp_image[82] = new Image(); sp_image[82].src = '/sp/stillman.jpg'; sp_name[82] = 'Stillman College: $50.00'; sp_image[83] = new Image(); sp_image[83].src = '/sp/support_arts.jpg'; sp_name[83] = 'Support the Arts: $50.00'; sp_image[84] = new Image(); sp_image[84].src = '/sp/talladega.jpg'; sp_name[84] = 'Talladega College: $50.00'; sp_image[86] = new Image(); sp_image[86].src = '/sp/troy.jpg'; sp_name[86] = 'Troy University: $50.00'; sp_image[88] = new Image(); sp_image[88].src = '/sp/tuskegee_university.jpg'; sp_name[88] = 'Tuskegee University: $50.00'; sp_image[89] = new Image(); sp_image[89].src = '/sp/u_of_a.jpg'; sp_name[89] = 'University of Alabama: $50.00'; sp_image[90] = new Image(); sp_image[90].src = '/sp/uab.jpg'; sp_name[90] = 'University of Alabama at Birmingham: $50.00'; sp_image[91] = new Image(); sp_image[91].src = '/sp/uah.jpg'; sp_name[91] = 'University of Alabama in Huntsville: $50.00'; sp_image[92] = new Image(); sp_image[92].src = '/sp/usa.jpg'; sp_name[92] = 'University of South Alabama: $50.00'; sp_image[95] = new Image(); sp_image[95].src = '/sp/west_alabama.jpg'; sp_name[95] = 'University of West Alabama: $50.00'; sp_image[96] = new Image(); sp_image[96].src = '/sp/wldlfe.jpg'; sp_name[96] = 'Wildlife: $50.00'; sp_image[98] = new Image(); sp_image[98].src = '/sp/ovarian_cancer.jpg'; sp_name[98] = 'Ovarian Cancer Research: $50.00'; sp_image[99] = new Image(); sp_image[99].src = '/sp/al_treasure_forest.jpg'; sp_name[99] = 'Alabama Treasure Forest Association: $50.00'; sp_image[103] = new Image(); sp_image[103].src = '/sp/Breast_Cancer_Research.jpg'; sp_name[103] = 'Breast Cancer Research Foundation: $50.00'; sp_image[104] = new Image(); sp_image[104].src = '/sp/Fight_Breast_Cancer.jpg'; sp_name[104] = 'Fight Breast Cancer (Joy to Life Foundation): $50.00'; sp_image[105] = new Image(); sp_image[105].src = '/sp/spay_neuter.jpg'; sp_name[105] = 'Spay-Neuter: $50.00'; sp_image[3] = new Image(); sp_image[3].src = '/sp/al_standard.jpg'; sp_name[3] = '*Standard Alabama Plate*: $0.00'; sp_image[106] = new Image(); sp_image[106].src = '/sp/sup_our_trp.jpg'; sp_name[106] = 'Support Our Troops: $50.00'; sp_image[107] = new Image(); sp_image[107].src = '/sp/hh_tag.jpg'; sp_name[107] = 'Huntsville Hospital: $50.00'; sp_image[29] = new Image(); sp_image[29].src = '/sp/cystfib.jpg'; sp_name[29] = 'Fighting Cystic Fibrosis: $50.00'; sp_image[108] = new Image(); sp_image[108].src = '/sp/autism.jpg'; sp_name[108] = 'Autism Awareness : $50.00'; sp_image[109] = new Image(); sp_image[109].src = '/sp/LawEnforcementMemorial.jpg'; sp_name[109] = 'Law Enforcement Memorial: $50.00'; sp_image[110] = new Image(); sp_image[110].src = '/sp/tennis.jpg'; sp_name[110] = 'Alabama Tennis Foundation: $50.00'; sp_image[111] = new Image(); sp_image[111].src = '/sp/civitandecal.jpg'; sp_name[111] = 'Civitan International: $25.00'; sp_image[112] = new Image(); sp_image[112].src = '/sp/freemason.jpg'; sp_name[112] = 'Freemasons of Alabama: $50.00'; sp_image[113] = new Image(); sp_image[113].src = '/sp/FriendsofCoal.JPG'; sp_name[113] = 'Friends of Coal (Walker College Foundation): $50.00'; sp_image[114] = new Image(); sp_image[114].src = '/sp/WhitetailWarrior2013.jpg'; sp_name[114] = 'Whitetail Warrior Project: $50.00'; /******************************************************************/ function disp_mailer(mailer) { image = document.getElementById('mailer'); image.height = 500; image.width = 750; image.src = mailer.src; } /******************************************************************/ function disp_sp_form() { chk = document.getElementById('sp_form'); if (chk.checked == true) _clientSideInclude('special_disp', 'select_sp.php'); else _clear('special_disp'); } /******************************************************************/ function disp_sp_dwngrd() { dwngrd_chk = document.getElementById('sp_dwngrd'); if (dwngrd_chk.checked == true) _clientSideInclude('standard_disp', 'select_sp_dwngrd.php'); else _clear('standard_disp'); } /******************************************************************/ function disp_sp_image(id) { image = document.getElementById('sp_image'); image.height = 150; image.width = 300; image.src = sp_image[id].src; _display('sp_name', sp_name[id]); } /******************************************************************/ function reset_(image) { image.height = 0; image.width = 0; image.src = ""; } /******************************************************************/ function validate_mv_form() { if(document.vehicle.mv_number.value == '') { alert("Please enter your Tag Number."); return false; } if(document.vehicle.mv_pin.value == '') { alert("Please enter your Secret Code / PIN."); return false; } my_return = _submitForm(document.vehicle, 'verify_container'); _clear('form_container'); return my_return; } /******************************************************************/ function chk_fein() { if(document.getElementById('feinchk').value == 'y') { for(i = 0; i < 3; i++) { //document.getElementById('FirstName['+i+']').value = ''; //document.getElementById('LastName['+i+']').value = '' //document.getElementById('DLNumber['+i+']').value = '' //document.getElementById('FirstName['+i+']').disabled = true; //document.getElementById('LastName['+i+']').disabled = true; //document.getElementById('DLNumber['+i+']').disabled = true; //document.getElementById('DLExpirationDateMonth['+i+']').disabled = true; //document.getElementById('DLExpirationDateDay['+i+']').disabled = true; //document.getElementById('DLExpirationDateYear['+i+']').disabled = true; } document.getElementById('FEIN').disabled = false; document.getElementById('FEIN').focus(); }else{ for(i = 0; i < 3; i++) { document.getElementById('FirstName['+i+']').disabled = false; document.getElementById('LastName['+i+']').disabled = false; document.getElementById('DLNumber['+i+']').disabled = false; document.getElementById('DLExpirationDateMonth['+i+']').disabled = false; document.getElementById('DLExpirationDateDay['+i+']').disabled = false; document.getElementById('DLExpirationDateYear['+i+']').disabled = false; } document.getElementById('FEIN').value = ''; document.getElementById('FEIN').disabled = true; document.getElementById('FirstName[0]').focus(); } //return false; } /******************************************************************/ function validate_dlpoc(atLeastCount) { if(document.getElementById('feinchk').value == 'y') { // check FEIN box if(document.getElementById('FEIN').value == '') { alert('You must supply a valid Federal Employer Identification Number to renew this registration.'); return false; } //ret_val = _submitForm(document.dlpoc, 'verify_container'); //return ret_val; } dateToday = 20180521; for(i = 0; i < 3; i++) { if( document.getElementById('DLNumber['+i+']').value != '' && document.getElementById('LastName['+i+']').value != '') { if(document.getElementById('DLExpirationDateYear['+i+']').value != 1900) { dateYear = document.getElementById('DLExpirationDateYear['+i+']').value; if(document.getElementById('DLExpirationDateMonth['+i+']').value.length == 1) dateMonth = '0'+document.getElementById('DLExpirationDateMonth['+i+']').value; else dateMonth = document.getElementById('DLExpirationDateMonth['+i+']').value; if(document.getElementById('DLExpirationDateDay['+i+']').value.length == 1) dateDay = '0'+document.getElementById('DLExpirationDateDay['+i+']').value; else dateDay = document.getElementById('DLExpirationDateDay['+i+']').value; dateExpires = dateYear+dateMonth+dateDay; if(Number(dateExpires) < Number(dateToday)) { alert('Driver\'s License/State ID for '+document.getElementById('FirstName['+i+']').value+' '+document.getElementById('LastName['+i+']').value+' is expired. An expired Driver\'s License/State ID is not an acceptable proof of citizenship.'); return false; }// END date check }// END 1900 check }// END values check }// END for // Make sure at least one DL is input if(!atLeastCount) atLeastCount = 1; Least = 0; atLeast = false; for(i = 0; i < 3; i++) { if( document.getElementById('DLNumber['+i+']').value != '' && document.getElementById('LastName['+i+']').value != '') { Least++; if(Least == atLeastCount) { atLeast = true; break; } } } if(atLeast) { ret_val = _submitForm(document.dlpoc, 'verify_container'); }else{ alert('Please complete the Driver\'s License information for the names listed on the registration.'); } return false; } /******************************************************************/ function validate_br_form() { if(document.boat.br_number.value == '' || document.boat.br_suffix.value == '') { alert("Please both parts of your Registration Number."); return false; } if(document.boat.br_pin.value == '') { alert("Please enter your Secret Code / PIN."); return false; } my_return = _submitForm(document.boat, 'verify_container'); _clear('form_container'); return my_return; } /******************************************************************/ function validate_br_verify(form) { rdo = false; no_motor = document.getElementById('no_motor'); if(document._verify.hull_serial.value == '') { if(document._verify.hull_serial.value != 'true') { alert("Please enter your hull serial number completely."); return false; } } if(document._verify.motor_serial.value == '') { if (no_motor.checked != true) { if(document._verify.motor_serial.value != 'true') { alert("Please enter your motor serial number."); return false; } } } for(i=form.msd.length-1; i>-1; i--) { if(form.msd[i].checked) { rdo = true; break; } } if(rdo == false) { alert('You must designate whether or not this boat has a Marine Sanitation Device installed. Please select your response and continue again.'); return false; } ret_val = _submitForm(form, 'cart_container'); _clientSideInclude('form_container','br_more.php'); _clear('verify_container'); return ret_val; } /******************************************************************/ function validate_mh_form() { if(document.manf_homes.mh_decal.value == '') { alert("Please enter your Decal #."); return false; } my_return = _submitForm(document.manf_homes, 'verify_container'); _clear('form_container'); return my_return; } /******************************************************************/ function validate_mh_verify(form) { ret_val = _submitForm(form, 'cart_container'); _clientSideInclude('form_container', 'mh_more.php'); _clear('verify_container'); return false; } /******************************************************************/ function validate_mv_verify(form) { ret_val = _submitForm(form, 'cart_container'); _clientSideInclude('form_container', 'mv_more.php'); _clear('verify_container'); return false; } /******************************************************************/ function validate_pl_form() { if(document.business.pl_number.value == '') { alert("Please enter your Account/License #."); return false; }else{ my_return = _submitForm(document.business, 'verify_container'); _clear('form_container'); return my_return; } } /******************************************************************/ function validate_pl_verify(form) { ret_val = _submitForm(form, 'cart_container'); _clientSideInclude('form_container', 'pl_more.php'); _clear('verify_container'); return false; } /******************************************************************/ function validate_sm_address(f) { // TODO THIS JAVASCRIPT t_rdo = false; r_rdo = false; cl_rdo = false; if(document.saddress.phone.value == "") { alert('Please fill in your phone number.'); document.saddress.phone.focus(); return false; } if(document.saddress.street0.value == "") { alert('Please fill in your street address.'); document.saddress.street0.focus(); return false; } if(document.saddress.city.value == "") { alert('Please fill in your city.'); document.saddress.city.focus(); return false; } if(document.saddress.state.value == "") { alert('Please fill in your state.'); document.saddress.state.focus(); return false; } if(document.saddress.zip.value == "") { alert('Please fill in your ZIP code.'); document.saddress.zip.focus(); return false; } for(i=document.saddress.reason.length-1; i>-1; i--) { if(document.saddress.reason[i].checked) { r_rdo = true; reason=document.saddress.reason[i].value; //alert(reason); break; } } if(r_rdo == false) { alert('Please select the reason for the mailing address.'); return false; } if(document.saddress.hinder0.value == "") { alert('Please fill out all reason fields.'); document.saddress.hinder0.focus(); return false; } if(reason != 'other') { if(document.saddress.hinder1.value == "") { alert('Please fill out all reason fields.'); document.saddress.hinder1.focus(); return false; } } return _submitForm(f, 'form_container'); //alert('passed all'); return false; } /******************************************************************/ function validate_coa_address(f) { // TODO THIS JAVASCRIPT t_rdo = false; r_rdo = false; cl_rdo = false; if(document.caddress.phone.value == "") { alert('Please fill in your phone number.'); document.caddress.phone.focus(); return false; } if(document.caddress.street0.value == "") { alert('Please fill in your street address.'); document.caddress.street0.focus(); return false; } if(document.caddress.city.value == "") { alert('Please fill in your city.'); document.caddress.city.focus(); return false; } if(document.caddress.state.value == "") { alert('Please fill in your state.'); document.caddress.state.focus(); return false; } if(document.caddress.zip.value == "") { alert('Please fill in your ZIP code.'); document.caddress.zip.focus(); return false; } if(zipcodes.indexOf(document.caddress.zip.value) == -1) { alert('This ZIP Code is not within Limestone County. Please use the "I\'m out of town" option for a temporary mailing.'); return false; } for(i=document.caddress.city_limits.length-1; i>-1; i--) { if(document.caddress.city_limits[i].checked) { cl_rdo = true; type=document.caddress.city_limits[i].value; break; } } if(cl_rdo == false) { alert('Please select whether or not the address is within the city limits.'); return false; } return _submitForm(f, 'form_container'); //alert('passed all'); return false; } /******************************************************************/ function show_additional(type) { sm = '
'; sm += '
Reason*:
'; sm += '
'; sm += ' Student  '; sm += ' Military  '; sm += '
'; sm += '
'; sm += '
'; sm += '
School/College*:
'; sm += '
'; sm += '
'; sm += '
'; sm += '
Student ID*:
'; sm += '
'; sm += '
'; coa = '
'; coa += '
Inside city limits*?
'; coa += '
Yes  No
'; coa += '
'; switch(type) { case 'sm': _display('additional', sm); break; case 'coa': _display('additional', coa); break; } } /******************************************************************/ function change_hinder(type) { switch(type) { case 'student': _display('hinder0_title', 'School Name*: '); _display('hinder1_title', 'Student #*: '); _display('hinder1_input', ''); break; case 'military': _display('hinder0_title', 'Base*: '); _display('hinder1_title', 'Commanding Officer*: '); _display('hinder1_input', ''); break; case 'other': _display('hinder0_title', 'Other*:'); _display('hinder1_title', ' '); _display('hinder1_input', ' '); break; } } /******************************************************************/ function cancel_poc() { _clear('verify_container'); _clientSideInclude('form_container', 'pl_form.php'); _clientSideInclude('cart_container', 'cart.php?mode=display'); }