Need help with jquery tabs.
The application loops project titles and IDs from data base and with php script they are turn into links. Using the IDs in a onclick event per link every thing works great. But when I click on one of the tabs I lose the focus of the ID. I have been working on this for a while now and could really use so help. At this point I am interested in any points of help.

<script type="text/javascript">
$(document).ready(function(){
$(function() {$( "#info" ).tabs();});
});
</script>

do {
$IDnum= $eachrow[Pro_ID];


printf("<tr class=\"diffColor\"><td>$IDnum</td><td><a href=\"#?IDnum=$IDnum\" onclick=\"getlisttext($IDnum)\">%s</a></td>...
}while ($eachrow = mysql_fetch_array($result));
//this works fine

<div id="info">
<ul>
<li><a href="#intro" onclick="getlisttext(<?php print $IDnum; ?>)">Details</a></li>
<li><a href="#Task" onclick="getlisttext(<?php print $IDnum; ?>)">Tasks</a></li>
</ul>
<div id='intro'>
<div id='ProjectDet'></div>//ajax call back
</div>
<div id='Task'>
<div id='TaskDet'></div>//ajax call back
</div>
</div>

//Ajax page
var IDNum
function getlisttext(ProID) {

var $tabs = $('#info').tabs();
var selected = $tabs.tabs('option', 'selected');
IDNum=ProID;

var url = "test2indexDetails.php?ProjectNum=" + IDNum + "&tbnum=" + selected + "&dummy=" + new Date().getTime();



if(selected===0){
request.open("GET", url, false);
request.onreadystatechange = updatePage;
request.send(null);
}
else if(selected===1){
request.open("GET", url, false);
request.onreadystatechange = updatePage5;
request.send(null);
}
}


function updatePage() {
if (request.readyState == 4) {
if (request.status == 200) {
var response = request.responseText;
document.getElementById("ProjectDet").innerHTML =request.responseText;

//alert("The server said: " + response);
} else
alert("status is " + request.status);
}

}
function updatePage5() {
if (request.readyState == 4) {
if (request.status == 200) {
var response = request.responseText;
document.getElementById("TaskDet").innerHTML =request.responseText;

//alert("The server said: " + response);
} else
alert("status is " + request.status);
}

}