Maybe I am missing the point here, hope not...
If banner "x" links to document "y" why not have a template variable on document "y" where you upload the banner? ie. the banner that is going to link to the document is one of the tv´s for that document. Lets say the tv for uploading a banner is called "bannerImage", documents that are being linked to by a banner would need to have "bannerImage" tv which will be Input type: Image and will always serve as the banner link to the page.
Next, on document "z" you need banner "x" to appear and of course linking to document "y".
Make a tv called "banners" with Input Type: Text and assign it to all templates where banners should appear with a comment for the user:
insert the id´s of the documents that you would like to link to, comma separated numbers only eg. 1,2,3
Then use ditto to get the banners to appear on that page, ditto call would look something like this:
(remember this is in the template of the page where you would like the banners to appear)
[!Ditto? tpl=`insertBanner` &documents=`[*banners*]` !]
Template, called "insertBanner":
<a href="[~[+id+]~]" title="[+title+]">
<img src="[+bannerImage+]" alt="[+title+] class="banner" />
</a>
So in the ditto call we get the document ids of the documents we want to link to and in the template we are calling the banner image, making it link to its own document.
If you want the banner image to be different depending on the page it appears on, and not depending on the page it links to then that would be different...