
// The function below confirm the submit button
function confirmSubmit() {
	var sendForm = confirm("Is your information correct?");
	if (sendForm == true)
		document.form.submit();
	return false;
}
 
// the function below confirm the reset button.
function confirmReset() {
	var resetForm = confirm("Are you sure you want to reset the data?");
	if (resetForm == true)
		document.form.reset();
	return false;
}

// the function below verifies the validation of the form.
function verification()
{
  // verification of the name 
  if (form.Name.value == "")
  {
    alert("Please enter your name.");
    form.Name.focus();
    return (false);
  }

  // verification of the PhoneNumber
  if (form.PhoneNumber.value == "")
  {
    alert("Please enter your Phone Number.");
    form.PhoneNumber.focus();
    return (false);
  }
  
  // verification of the Pick up Date/Time
  if (form.PickupDateTime.value == "")
  {
    alert("Please enter your Pick up Date/Time.");
    form.PickupDateTime.focus();
    return (false);
  } 

  // verification of the Pick up Address - Street
  if (form.PickupAddress.value == "")
  {
    alert("Please enter your Pick up Address, City, Zipe Code.");
    form.PickupAddress.focus();
    return (false);
  } 
  
  // verification of the City
  if (form.DestinationAddress.value == "")
  {
    alert("Please enter your Destination Address, City, Zipe Code.");
    form.DestinationAddress.focus();
    return (false);
  } 


  confirmSubmit();
  return(true);
}

