[jQuery] scrolling function

[jQuery] scrolling function

Hi,
i have a div with the scrolling function attached to it as following:
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">$("#data_framework").scroll(function(e){
  //var maxScroll = $("#data_framework").attr("scrollWidth") - $("#data_framework").width();
  $("#frm_table").scrollLeft($('#data_framework').scrollLeft);
});
</blockquote>
as you can see when user scrol the div #data_framework, it should scroll by the same amount of pixel the next div called #frm_table.
however this code does not work...
1. how can i know if it was scroll on X-Axis or on Y-axis ?
2. how can i scroll the div #frm_table from the same amount of pixel ?
3. should i use animate ?
thanks a lot.<br clear="all">
--
Alain
-----------------------------------------------------------
Windows XP x64 SP2 / Fedora 10 KDE 4.2
PostgreSQL 8.3.5 / MS SQL server 2005
Apache 2.2.10
PHP 5.2.6
C# 2005-2008