Javascript -dynamically change the width of one table based on the size of other table.

I need to  ensure that the width of one table on my html page be calculated from the width of other table. (less for determined value). Currently the size is hardcoded in the Server user control code. But ideally it could be done using  Javascript – to dynamically change the width of one table based on the size of other table.

The Task  looks very strightforward, but I decided to post a few links, that I found interesting:

Dynamic Content with DOM-2
:JavaScript | Table and in particular Q1594 How can I detect the width of a table?

JavaScript DOM Examples

Controlling Table Size