This should work
function getRealId(partialid){
var re= new RegExp(partialid,'g')
var el = document.getElementsByTagName('*');
for(var i=0;i<el.length;i++){
if(el[i].id.match(re)){
alert(el[i].id)
}
}
}
Now pass the partial id to the function.
The code will work with reasonable speed if the page has a reasonable number of tags. If too many, the loop should be restricted somehow, for instance if your element with that id is nested in a certain parent (a table, a div, ...something like that)
For instance:
var el = document.getElementById('myTable').getElementsByTagName('*');