var bigstring = " ";
function doesexist(inputValue, inputExpected) {
  var aCharExists=0
  if (inputValue) {
    for (var i=0; i<inputValue.length; i++) {
      if (inputValue.charAt(i) != " ") {
        aCharExists = 1
      }
    }
  }
  if (!aCharExists) {
    bigstring = bigstring += inputExpected += "\n ";
  }
}

function check_fields() {
//  var where_to= confirm("Ready To Submit Your Application?");
//	if (where_to== false)
//	{
//		return false
//	}
  doesexist(document.form1.name.value, 'Full Name')
  doesexist(document.form1.address.value, 'Address')
  doesexist(document.form1.city.value, 'City')
  doesexist(document.form1.state.value, 'State')
  doesexist(document.form1.zip.value, 'Zip Code')
  doesexist(document.form1.phone_day.value, 'Daytime Phone Number')
  doesexist(document.form1.phone_night.value, 'Night Phone Number')
  doesexist(document.form1.time_to_call.value, 'Best Time to Call')
  doesexist(document.form1.dob_M.value, 'Date of Birth (Month)')
  doesexist(document.form1.dob_D.value, 'Date of Birth (Day)')
  doesexist(document.form1.dob_Y.value, 'Date of Birth (Year)')
  doesexist(document.form1.ssn.value, 'Social Security Number')
  doesexist(document.form1.experience.value, 'Driving Experience')
  
  if ((document.form1.owner_operator.checked == 0)&&(document.form1.company_driver.checked == 0)&&(document.form1.student.checked == 0)){
    inputExpected = 'Type of Driver\n ';    
    bigstring = bigstring += inputExpected
  } 
  if (bigstring != " "){
    alert("The following Fields Must Be Completed: \n\n" + bigstring)
    bigstring = " "
    return false
  }
  return true
}
