<tr id=test><td><span id=test2></span></td></tr>
document.getElementById('test2').parentNode.parentNode.id