Well, it's certainly not a php question because even if you could get the size of the layer it would do no good to php as javascript is client-side (it would be too late as the page would have loaded things up).
However, I believe you want to read the height of something like an iframe or a div ID...right?
This probably wouldn't work, but I have it laying around from something I've done before - it might be a place for you to start and give you some clues what you should search on a javascript forum...
function setSizePrev() {
// Safari and Firefox
if (self.outerHeight)
{ document.getElementById('divIDname').style.height=self.outerHeight; }
// ???
else if (document.documentElement && document.documentElement.clientHeight)
{ document.getElementById('divIDname').style.height=document.documentElement.clientHeight; }
// Microsoft
else if (document.body)
{ document.getElementById('divIDname').style.height=document.body.clientHeight; }
}
Oh yeah, be sure to have an onLoad in your body tag.
Good luck...v