// JavaScript Document

				
				function checkForm1(form) {
					var errors = '';
					var numErrors = 0;
					
					if (!isValidLength(form.contact.value, 1, 80)) {
						errors += '- Please enter a Contact Name.\n';
						numErrors++;
					}
					if (!isValidLength(form.company_name.value, 1, 80)) {
						errors += '- Please enter a Company Name.\n';
						numErrors++;
					}
					if ((!isValidLength(form.phone.value, 10, 20))||(!isValidPhone(form.phone.value,1))) {
					errors += '- Please include a valid phone number with area code.\n';
					numErrors++;
					}
					if (!isValidLength(form.address.value, 2, 80)) {
						errors += '- Please enter a valid Mailing Address.\n';
						numErrors++;
					}
					
					if ((!isAlphabetic(form.city.value, 1))||(!isValidLength(form.city.value, 1, 30))) {
						errors += '- Please enter a valid City.\n';
						numErrors++;
					}
					if ((!isValidZipcode(form.zip.value))&&(!isValidPostalcode(form.zip.value))){
						errors += '- The zip code field is not valid.\n';
						numErrors++;
					}
					if ((!isNumeric(form.trucks.value, 1))||(!isValidLength(form.trucks.value, 1, 4))){
						errors += '- Please enter the number of Trucks.\n';
						numErrors++;
					}					
				
				
				if (numErrors) {
					errors = 'The form was not submitted due to the following problem' + ((numErrors > 1) ? 's' : '') + ':\n' + errors + 'Please fix ' + ((numErrors > 1) ? 'these' : 'this') + ' problem' + ((numErrors > 1) ? 's' : '') + ' and resubmit the form.';
					alert(errors);
					return false;
				}
				return true;
			}
		function checkForm2(form) {
					var errors = '';
					var numErrors = 0;
				if ((!isValidCreditCard(form.ccnum.value))||(!isValidLength(form.ccnum.value, 5, 30))){
					errors += '- Please enter a valid Credit Card Number. \n';
					numErrors++;					
					}	
					
				if ((!isValidExp(form.exp_date.value))||(!isValidLength(form.exp_date.value, 4, 4))){
					errors += '- Please enter a valid Expiration Date. \n';
					numErrors++;				
					}		
				
				if (numErrors) {
					errors = 'The form was not submitted due to the following problem' + ((numErrors > 1) ? 's' : '') + ':\n' + errors + 'Please fix ' + ((numErrors > 1) ? 'these' : 'this') + ' problem' + ((numErrors > 1) ? 's' : '') + ' and resubmit the form.';
					alert(errors);
					return false;
				}
				
				return true;
			}
	
	function checkForm3(form) {
					var errors = '';
					var numErrors = 0;
				if ((!isAlphanumeric(form.new_user_id.value, 1))||(!isValidLength(form.new_user_id.value, 1, 10))) {
						errors += '- Please enter a valid username. (up to 10 characters)\n';
						numErrors++;
					}	
				
				
				if ((!isAlphanumeric(form.password.value, 1))||(!isValidLength(form.password.value, 1, 30))) {
						errors += '- Please enter a valid password.\n';
						numErrors++;
					}		
				
				if ((!isValidEmail(form.email.value))||(!isValidLength(form.email.value, 1, 80))) {
						errors += '- Please enter a valid email.\n';
						numErrors++;
					}
					
					
				if (numErrors) {
					errors = 'The form was not submitted due to the following problem' + ((numErrors > 1) ? 's' : '') + ':\n' + errors + 'Please fix ' + ((numErrors > 1) ? 'these' : 'this') + ' problem' + ((numErrors > 1) ? 's' : '') + ' and resubmit the form.';
					alert(errors);
					return false;
				}
				
				return true;
			}
		
		function checkForm4(form) {
				var errors = '';
				var numErrors = 0;
								
				if (!isValidLength(form.contact.value, 2, 20)) {
					errors += '- Please enter a Contact Name.\n';
					numErrors++;
				}
				
				if (!isValidEmail(form.email.value)) {
					errors += '- The email field is not valid.\n';
					numErrors++;
				}
				if (!isValidLength(form.message.value, 1, 20000)) {
					errors += '- Please enter an email message.\n';
					numErrors++;
				}
												
				
				if (numErrors) {
					errors = 'The form was not submitted due to the following problem' + ((numErrors > 1) ? 's' : '') + ':\n' + errors + 'Please fix ' + ((numErrors > 1) ? 'these' : 'this') + ' problem' + ((numErrors > 1) ? 's' : '') + ' and resubmit the form.';
					alert(errors);
					return false;
				}
				
				return true;
			}
	
				
		function checkFormSetup(form) {
				var errors = '';
				var numErrors = 0;
				var message = '';
				var mcount = 0;
				

				if ((!isAlphanumeric(form.username.value))||(!isValidLength(form.username.value, 4, 10))) {
					errors += '- Please enter a Login. Between 4 and 10 characters.\n';
					numErrors++;
				}
				if ((!isAlphanumeric(form.password.value))||(!isValidLength(form.password.value, 4, 25))) {
					errors += '- Please enter a valid password.\n';
					numErrors++;
				}
				if ((!isAlphanumeric(form.verify_password.value))||(!isValidLength(form.verify_password.value, 4, 25))||(!isSame(form.password.value, form.verify_password.value))) {
					errors += '- Please verify your password.\n';
					numErrors++;
				}
				
				if (!isValidLength(form.company_name.value, 1, 50)) {
					errors += '- Please enter a Company Name.\n';
					numErrors++;
				}
				if (!isValidLength(form.address.value, 2, 30)) {
					errors += '- Please enter a valid Mailing Address.\n';
					numErrors++;
				}
				if ((!isAlphabetic(form.city.value, 1))||(!isValidLength(form.city.value, 1, 30))) {
					errors += '- Please enter a valid City.\n';
					numErrors++;
				}
				if ((!isValidZipcode(form.zip.value))&&(!isValidPostalcode(form.zip.value))){
					errors += '- The zip code field is not valid.\n';
					numErrors++;
				}
				
				
				if (!isValidLength(form.contact_name.value, 2, 20)) {
					errors += '- Please enter a Contact Name.\n';
					numErrors++;
				}
				
				if (!isValidEmail(form.email.value)) {
					errors += '- The email field is not valid.\n';
					numErrors++;
				}
				
				if (!isValidLength(form.phone.value, 10, 30)) {
					errors += '- Please include a valid phone number with area code.\n';
					numErrors++;
				}
				
				
				if ((!isValidCreditCard(form.ccnum.value))||(!isValidLength(form.ccnum.value, 5, 30))){
					errors += '- Please enter a valid Credit Card Number. \n';
					numErrors++;					
					}	
					
				if ((!isValidExp(form.exp_date.value))||(!isValidLength(form.exp_date.value, 4, 4))){
					errors += '- Please enter a valid Expiration Date. \n';
					numErrors++;				
					}
					
					
				if (form.agree.checked!=1){
					errors += "\n- Please select I Agree for our \n Data Access Agreement. \n\n";
					numErrors++;
				}		
				
				if (numErrors) {
					errors = 'The form was not submitted due to the following problem' + ((numErrors > 1) ? 's' : '') + ':\n' + errors + 'Please fix ' + ((numErrors > 1) ? 'these' : 'this') + ' problem' + ((numErrors > 1) ? 's' : '') + ' and resubmit the form.';
					alert(errors);
					return false;
				}
				
				return true;
			}
			

	function checkFormInCab(form) {
				var errors = '';
				var numErrors = 0;
				var message = '';
				var mcount = 0;
				

				if (!isValidLength(form.qcomm_id.value, 3, 50)) {
					errors += '- Please enter a Qualcomm Customer ID. Between 3 and 50 characters.\n';
					numErrors++;
				}
				if (!isNumeric(form.mct_count.value)) {
					errors += '- Please enter number of MCT Units.\n';
					numErrors++;
				}
					
				if (!isValidLength(form.company.value, 1, 80)) {
					errors += '- Please enter a Company Name.\n';
					numErrors++;
				}
				if (!isValidLength(form.address.value, 2, 100)) {
					errors += '- Please enter a valid Mailing Address.\n';
					numErrors++;
				}
				if ((!isAlphabetic(form.city.value, 1))||(!isValidLength(form.city.value, 1, 35))) {
					errors += '- Please enter a valid City.\n';
					numErrors++;
				}
				if ((!isValidZipcode(form.zip.value))&&(!isValidPostalcode(form.zip.value))){
					errors += '- The zip code field is not valid.\n';
					numErrors++;
				}
				
				
				if (!isValidLength(form.contact.value, 2, 20)) {
					errors += '- Please enter a Contact Name.\n';
					numErrors++;
				}
				
				if (!isValidEmail(form.email.value)) {
					errors += '- The email field is not valid.\n';
					numErrors++;
				}
				
				if (!isValidLength(form.phone.value, 10, 30)) {
					errors += '- Please include a valid phone number with area code.\n';
					numErrors++;
				}
				
				
							
					
				if ((form.cash.checked!=1)&&(form.comdata.checked!=1)&&(form.efs.checked!=1)&&(form.tchek.checked!=1)&&(form.trendar.checked!=1)&&(form.trans_plat.checked!=1)&&(form.other.checked!=1)){
					errors += "\n- Please select at least 1 fuel card option \n\n";
					numErrors++;
				}		
				
				if (numErrors) {
					errors = 'The form was not submitted due to the following problem' + ((numErrors > 1) ? 's' : '') + ':\n' + errors + 'Please fix ' + ((numErrors > 1) ? 'these' : 'this') + ' problem' + ((numErrors > 1) ? 's' : '') + ' and resubmit the form.';
					alert(errors);
					return false;
				}
				
				return true;
			}
			



			
		
	function LoadAgreementWin(){
			var href = null;
			href = "http://www.fueladvice.com/agreement.htm";
			window.open(href,'helpWin','menubar=no, height=450, width=720, outerHeight=20, outerWidth=20, innerHeight=20, innerWidth=20, resizable=no, left=20, right=20, toolbar=no, scrollbars=yes, copyhistory=yes');
		}
	function LoadForgotWin(){
			var href = null;
			href = "https://www.fueladvice.com/forgot.htm";
			window.open(href,'forgotWin','menubar=no, height=430, width=316, outerHeight=20, outerWidth=20, innerHeight=20, innerWidth=20, resizable=no, left=20, right=20, toolbar=no, scrollbars=yes, status=yes copyhistory=yes');
		}
	
	