XML based button action?

ok i using an XML driven gallery(Scotty*) and what i would like
to do is add a button thats actions update with each
picture to open a specific external link … either another
web page or just a larger version of an image.
i have done my best to sift my way thru the epic tut on
XML here on Kirupa but i just cant seem to nail down
what i need to add or where to add it to make this happen.
my supsicions are that it needs to be updated on the load image
function some how as i also want the text for the button to be
specific for each item ( " launch project " , " open lg image " ,etc. )
and as far as the button action itself could there just be a simple
function that could be made that would dynamically seek out the
XML for the current item’s URL ?
thanks in advance
*