Given HTML content like this:

```
<span class="type">First Name</span>
<span class="entity">Bob</span>

<span class="type">Company Name</span>
<span class="entity">Apple</span>

<span class="type">Phone</span>
<span class="entity">800.555.5555</span>

```

How can you extract `Apple`? -- i.e. the first entity class closest to a `type` that has `Company Name` as the value.

**EDIT:**

Without using jQuery