Доброе время суток. 
Napisan skript , kotoryj probegajet po odnoj <table>, uznajet "width" eje <td>, i ustanavlivajet takoj zhe v drugoj <table>, no po4emu do on nepravilno opredeliajet shirinu.
window.onscroll = function  () {
if(scrollY>400)
{   
    $('top_line').style.display = '';
    pos = findPos($('real_table'));
    $('top_line').style.left = pos[0]-scrollX+'px';
    
    div = $('top_line').getChildren();
    
    div.each(function(el) {
        div1 = el.getChildren();
        div1.each(function(el1) {
            div2 = el1.getChildren();
            div2.each(function(el2) {
                el2.width = $(el2.className).offsetWidth;
            });
        });
    });
    
   // alert('Ne tiani tak bystro, bolno zhe!');
}
else
{
   $('top_line').style.display = 'none'; 
}
P.S.
izviniajush iz-za latinicy, na nout ese ne nakleil russkij shrift.