I'm new at JavaScript, just started reading up on it yesterday. Any help or suggestions you guys can offer would be greatly appreciated.

A web page with JavaScript and PHP generated content.
A fictitious excerpt...

<th colspan="3">
<span class="outgoing hq">These <a href="#" onmouseover='this.T_WIDTH=150;return escape("Freighter 13 <br> Interceptor 3 <br> ")' class="hq">units </a>

<a href="" title="Freighter 13Interceptor 3"> </a>from grid Primary Alpha [A:BDD:UR] arrives at grid Poopy Poo [T:AAD:TYD]. Its task:

<a href="#" onmouseover='this.T_WIDTH=150;return escape("Carry: <br /> Res1: 157834 <br /> Res2: 75469 <br /> Res3: 25000")' class="hq">HQ </a>

<a href="#" title="Carry: Res1: 157834 Res2: 75469 Res3: 25000"></a>.

Most of the above code is dynamic and generated. Some is static.
This line is static <a href="#" title="Carry: Res1: 157834 Res2: 75469 Res3: 25000"></a> except for the generated numeric value of Res1, 2, and 3.

What I'm wanting is a script that will pull the values out of every th (up to 20 th's) with class="outgoing hq" (lets assume this th class="outgoing hq" is unique to these spans) for each Res1 Res2 Res3 and total them. The problem I'm having is selecting the numbers because they are part of the title attribute. I have no idea how to do this, again, I only just started learning JavaScript.

I figured XPath would be the best way to get at those values. So I came up with element = document.evaluate("//th[@class='outgoing hq']", document, null, XPathResult.BOOLEAN_TYPE,null).singleNodeValue;

now I'm stuck. Also, will XPathResult.BOOLEAN_TYPE only return TRUE or FALSE and not the value?

Once I can get those values into a script I can do the rest fine (I think).

Thanks Guys