DivHeight = document.getElementById("TheDiv").offsetHeight
but i couldn't find any that uses php to do so.
php is a server side language, which you cannot get the height of a div.
you may specify the image size by adding attributes
You want to set the image size AFTER the div object has been rendered as to fill said div object (or something to that effect), but the div object's size is variable. In such a scenario, you cannot use
also you'll need to download this file that is referenced from jquery (the minified version will suffice): http://docs.jquery.com/Downloading_jQuery#Download_jQuery