How to capture href event in a table row with multiple href's

How to capture href event in a table row with multiple href's

I have a table structure which contains several href elements.  One of the href elements calls a delete function and I'd like to pop up a dialog to ask the user if they're sure they want to do the delete. How do you capture the href click event and how do I identify which href was clicked when you have multiple href's in the table line.

Thanks,
Tom

 <tr>
    <td style="text-align:center; width:5%;"><a href=xxx.php?StaffEditID=<? echo $StaffID; ?> ><img src=pencil.gif border=0</a></td>
    <td style="text-align:center; width:5%"><a href=xxx.php?StaffDeleteID=<? echo $StaffID; ?> ><img src=delete.gif border=0</a></td>
    <td style="width:20%;"><? echo $StaffName; ?></td>
    <td style="width:70%;"><? echo $StaffPath; ?></td>
</tr>