I have various php scripts on my site where the user can click on a thumbnail image and a larger image will load in a popup window. The only problem is that sometimes the window is too small for the image.

here's my current code called from a sitewide .js file:

function openUp(thePage) {
my current popup links are like this: <a href=\"javascriptpenUp('full.php?img=$img')">view full size</a>

Basically, I was wondering if its possible to assign width/height based on the actual size of the image. I know how to get the dimensions of the image in php but passing them to a javascript link is my problem right now. If possible, I'd like to keep the javascript functions inside of the main .js file.

Any ideas on how I could get this to work are appreciated Thanks.