Detect <DIV> size and insert into another page?

I have a goal in mind, and that is to get the width & height of a <DIV> tag in one document and insert them into another document…all on the same domain. It sounds like a simple task, but in case more detail is needed, let me explain:

I have a page called ‘demo.html’ which launches a page called ‘gallery/archive_iframe.html’ via Shadowbox as an iFrame. The problem is that ‘gallery/archive_iframe.html’ slightly differs in dimension on every browser and screen resolution. I want to have the iFrame’s size detected every time it launches so Shadowbox can get solid dimensions to display it without scrollbars.

You can see the current (fixed size) example at:
http://www.mikegermond.com/demo.html
Click on the ‘Video Archive’ image.

Here is the code I would like to insert the dimensions in to:

<A HREF="/gallery/archive_iframe.html" rel="shadowbox;width=[B][COLOR="Red"]???[/COLOR][/B];height=[B][COLOR="Red"]???[/COLOR][/B]" class="imgLink" title="Video Archive"><img src="gallery/videoarchive_thm.jpg" alt="Launch Video Archive (popup window)" width="260" height="162" border="0" /></A>