I added a feature to my Zenphoto gallery that uses javascript to show the 'full' size version of the image without reloading the page. (Note: NOT AJAX). It gets the full image url using "getFullImageURL()" and replacing the data inside the DIV on the Image.php page using .innerHTML.
The problem is that I cannot have my "View Full" button change back into a "View Resized" button that actually works because the zenphoto "printDefaultSizedImage(getImageTitle())" function actually spits out the image using I guess echo, instead of placing the resulting string into a variable (returning it).
If it would return the string (
Just for your interesst and the next time, there is a (rough) template functions guide on the trac:
http://www.zenphoto.org/trac/wiki/TemplateFunctionsGuide