var franchiseListResults = null; // contains the current search results var franchiseListTotalCount = 0; var franchiseListLimit = ; var aErrorList = new Array(); var bVerifyAddressFields = false; var aStatesProvinces = new Array(); aStatesProvinces[0] = new Array( ['Select a State',''],['Alabama','AL'],['Alaska','AK'],['Arizona','AZ'],['Arkansas','AR'],['California','CA'],['Colorado','CO'],['Connecticut','CT'],['Delaware','DE'],['District Of Columbia','DC'],['Florida','FL'],['Georgia','GA'],['Hawaii','HI'],['Idaho','ID'],['Illinois','IL'],['Indiana','IN'],['Iowa','IA'],['Kansas','KS'],['Kentucky','KY'],['Louisiana','LA'],['Maine','ME'],['Maryland','MD'],['Massachusetts','MA'],['Michigan','MI'],['Minnesota','MN'],['Mississippi','MS'],['Missouri','MO'],['Montana','MT'],['Nebraska','NE'],['Nevada','NV'],['New Hampshire','NH'],['New Jersey','NJ'],['New Mexico','NM'],['New York','NY'],['North Carolina','NC'],['North Dakota','ND'],['Ohio','OH'],['Oklahoma','OK'],['Oregon','OR'],['Pennsylvania','PA'],['Puerto Rico','PR'],['Rhode Island','RI'],['South Carolina','SC'],['South Dakota','SD'],['Tennessee','TN'],['Texas','TX'],['Utah','UT'],['Vermont','VT'],['Virginia','VA'],['Washington','WA'],['West Virginia','WV'],['Wisconsin','WI'],['Wyoming','WY']); aStatesProvinces[1] = new Array(['Select a Province',''],['Alberta','AB'],['British Columbia','BC'],['Manitoba','MB'],['New Brunswick','NB'],['Newfoundland','NF'],['Northwest Territories','NT'],['Nova Scotia','NS'],['Nunavut','NU'],['Ontario','ON'],['Prince Edward Island','PE'],['Quebec','PQ'],['Saskatchewan','SK'],['Yukon','YK']); function validateForm() { // document.getElementById("helpbubble").style.display = "none"; aErrorList.splice(0, aErrorList.length); var oCustomCompanyName = document.getElementById("customCompanyName"); var oFirstName = document.getElementById("Fname"); var oLastName = document.getElementById("Lname"); var oEmailAddress = document.getElementById("email"); var oConfirmEmailAddress = document.getElementById("confirmEmail"); var oCountry = document.getElementById("country"); var oAddress = document.getElementById("address"); var oCity = document.getElementById("city"); var oZip = document.getElementById("zip"); var oPhone = document.getElementById("phone"); var oPhoneMobile = document.getElementById("phone_mobile"); var oState = document.getElementById("state"); var oCapital= document.getElementById("capital"); var oTimeFrame = document.getElementById("timeFrame"); var oGeo = document.getElementById("geo"); var oCertify = document.getElementById("certify"); var oErrorMessage = document.getElementById("ErrorMessage"); var oSubmit = document.getElementById("Submit"); oErrorMessage.innerHTML = ""; try{ ErrorCheckIsEmpty(oFirstName); ErrorCheckIsEmpty(oLastName); ErrorCheckIsValidEmail(oEmailAddress); ErrorCheckCompareFields(oEmailAddress, oConfirmEmailAddress); // ErrorCheckIsSelected(oCountry); // if(oCountry.options[oCountry.selectedIndex].value == "USA" || oCountry.options[oCountry.selectedIndex].value == "CAN"){ /* if(oState.length == 0){ DisplayCountryFields(); }*/ ErrorCheckIsEmpty(oAddress); ErrorCheckIsEmpty(oCity); ErrorCheckIsSelected(oState); ErrorCheckIsEmpty(oZip); // } ErrorCheckIsEmpty(oPhone); // if(oCountry.options[oCountry.selectedIndex].value == "USA" || oCountry.options[oCountry.selectedIndex].value == "CAN"){ ErrorCheckIsValidPhone(oPhone); ErrorCheckIsValidPhone(oPhoneMobile); /* } else { ErrorCheckIsValidIntPhone(oPhone); ErrorCheckIsValidIntPhone(oPhoneMobile); }*/ ErrorCheckIsSelected(oCapital); ErrorCheckIsSelected(oTimeFrame); ErrorCheckIsSelected(oGeo); /*if(ErrorCheckIsChecked(oCertify)){ oErrorMessage.innerHTML += "Please certify that all information below is correct by checking the certify checkbox below.
" }*/ } catch(err) { alert("Error in script. Message: " + err); return false; } if (aErrorList.length > 0) { oErrorMessage.innerHTML += "Please correct missing information below."; oErrorMessage.style.display = "block"; if(aErrorList[0].id == "certify"){ positionHelpBubble(); document.getElementById("helpbubble").style.display = "block"; } //alert(aErrorList[0].name); try { aErrorList[0].focus(); return false; } catch(err) { alert("Error in script. Message: " + err); return false; } } else { oErrorMessage.style.display = "none"; oSubmit.disabled = "disabled"; oSubmit.value = "Please Wait..."; return true; } }